Extensions add entity types and storage behavior without changing the workspace API.
1. What Extensions Do
HeavenBase extensions register additional entity types or developer hooks into a workspace. The workspace API stays the same: you still callregister, upsert, query, and get.
Two layers matter in 0.1.1.5:
- Entity extensions add optional entity types through
ExtensionSpecandws.enable_extension(...). - Developer extensions register backends, handlers, storage strategies, and query ops through
hb.ext.
2. Built-In System and Prompt Extensions
Every workspace enables the requiredsystem extension automatically during construction. You do not call enable_extension("system") in application code.
The system and default-loaded prompt extensions register built-in persistent entities:
Capsule and Toolkit are part of
system; Prompt and Translation are part of the default-loaded prompt extension.
prompt extension is enabled. Use hb.Prompt(...).register(ws=ws) through the root package API.
3. Inspect Enabled Extensions
Usews.extensions() for enabled extension metadata, or query MetaSchema for published extension rows:
system and prompt rows include meta.entities with their built-in entity ids.
4. Register a Custom Entity Extension
Package authors register entity extensions in the process registry before workspaces load them:heavenbase.extensions.default in config to a comma-separated list or array of extension ids.
5. Extend Backends and Handlers
Lower-level extension authors useheavenbase.ext (also hb.ext) to register backends, handler plugins, logical types, storage strategies, and query operations. Workspace routing picks them up through registries instead of central edits.
demos/04_extension_backend_template.py for a custom operation example.

