Skip to main content
If your extension needs a host patch, it is still a feature request wearing a fake moustache.

1. Motivation

Importing an external class proves only that Python can find it. A real HeavenBase Extension must also survive declarative discovery, inert inspection, Context-local resolution, workspace activation, ordinary CRUD, a fresh process, and exact uninstall targeting. This quickstart builds the smallest useful parity test. You will contribute one Entity and one Extension through the same module protocol used by bundled HeavenBase modules.

2. Create the Module Folder

Create this structure outside the heavenbase package:
Leave __init__.py empty. Put one public Entity in entities.py:
The implementation imports the public facade and does not depend on a private host path.

3. Declare the Entity and Extension

Save this as acme_notes/meta.yaml:
The Entity record points to code inside the module folder. The Extension definition depends on that record and activates it by identifier.

4. Install and Inspect Without Importing

Run this from the directory that contains acme_notes:
install() validates the descriptor, captures path-based code as a content-addressed artifact, publishes the records through the Context Registry, and returns an exact receipt. inspect() reads stored metadata without materializing AcmeNote.

5. Enable and Exercise the Extension

Use a detached in-memory workspace so this smoke test does not create a durable workspace identity:
The class comes from the installed artifact through the workspace’s Context. CRUD uses the canonical class that activation registered in this workspace.
The script prints inline during inspection and Installed outside HeavenBase after CRUD.

6. Clean Up Deliberately

drop() is the destructive workspace-data cleanup. uninstall(receipt) removes the exact installed module generation. Module uninstall does not delete rows from other workspaces that enabled the Extension. For a real application, keep the installation and open durable workspaces normally. Reinstall after editing path-based source because installed artifacts are immutable snapshots.

7. Turn the Smoke Test into a Package Gate

Before publishing an external module:
  1. Run install and inert inspection in a clean Context.
  2. Resolve and enable the Extension in a new workspace.
  3. Exercise its Entity, attached API, Toolkit family, or backend behavior.
  4. Close the Context and prove a fresh Context can restore the installed records.
  5. Uninstall by exact receipt and verify the intended generation disappeared.
  6. Test the oldest and newest HeavenBase versions declared by compatibility.
Add Toolkit families and MCP profiles only after the owning workspace API is stable. Keep CLI, MCP, and other interfaces as adapters over that API.

Summary

  • One module folder declares data, implementation targets, and Extension behavior.
  • Install and inspect stay import-free until resolution is required.
  • Lifecycle tests should cover activation, restore, and exact-receipt cleanup.

Further Exploration

Related resources: