Skip to main content
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 call register, upsert, query, and get. Two layers matter in 0.1.1.5:
  • Entity extensions add optional entity types through ExtensionSpec and ws.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 required system 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.
When you register a prompt in a workspace, HeavenBase ensures the prompt extension is enabled. Use hb.Prompt(...).register(ws=ws) through the root package API.

3. Inspect Enabled Extensions

Use ws.extensions() for enabled extension metadata, or query MetaSchema for published extension rows:
The 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:
To enable custom extensions on every new workspace, set heavenbase.extensions.default in config to a comma-separated list or array of extension ids.

5. Extend Backends and Handlers

Lower-level extension authors use heavenbase.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.
Discover supported combinations through the public capability index:
Use this surface when you ship a new storage provider or compiler, not for everyday workspace application code. See demos/04_extension_backend_template.py for a custom operation example.

Further Exploration

Related resources:
  • Extensions - Entity and developer extension reference
  • Architecture - Where extensions sit in the core path
  • Catalog - System entities from the system extension
  • Prompt - Callable prompts backed by sys-prompt
  • Capsules - Executable manifests under sys-capsule
  • Backends - Backend families extensions can register