Skip to main content
Catalog finds the books; MetaSchema explains why one shelf is humming.

1. Motivation

Agents need two different kinds of discovery. They need to find concrete objects without knowing every Entity class, and they need to inspect the structure that makes those objects queryable. HeavenBase keeps those questions separate:
  • Catalog indexes concrete workspace objects.
  • MetaSchema projects safe workspace and module structure.
  • hb.capabilities reports selectable engine options.

2. Discover Concrete Objects

HeavenBase maintains Catalog rows after successful writes to ordinary user Entities.
Query Catalog when broad attributes such as type, name, description, or tags are enough:
Catalog.object_id identifies the Catalog row. The pair target_entity + target_id identifies the indexed object.

3. Hydrate the Typed Row

Catalog is a discovery index, not a replacement for typed Entity access. Hydrate a selected result through the workspace:
Always keep the Entity identifier when object ids may repeat across Entity types.

4. Respect Availability

Use .available() for ordinary discovery so inactive, hidden, expired, and stale rows do not leak into agent results.
stale=True includes stale rows, while invisible=True includes hidden rows. Hard-expired and inactive rows remain excluded. The JSON form is {"available": {"stale": true}}.

5. Inspect Workspace Structure

MetaSchema describes Entities, fields, storage placements, Backends, extensions, and safe Registry projections.
MetaSchema is descriptive, not an installation control plane. It redacts authored semantic tags, local paths, and executable implementation details. Use MetaSchema to learn what can be queried. Use Catalog to find actual objects.

6. Inspect Selectable Capabilities

hb.capabilities answers which logical types, storage strategies, Backend types, and operations are available.
Use ws.capabilities when the answer must reflect only live Backend instances in one workspace. Use ws.context.modules().tag(...) for direct module tag inspection.

7. Audit Derived Rows

Catalog rows are derived from Entity rows. After manual Backend recovery or a partial failure, audit before exposing the workspace:
dry_run=True reports the repair plan without writing or deleting Catalog rows.

Summary

  • Catalog discovers concrete objects.
  • MetaSchema describes safe workspace structure.
  • Capabilities reports selectable engine options.
  • Typed workspace access remains the authority for the underlying row.

Further Exploration

Related resources:
  • Entities — Define the rows Catalog indexes
  • Query — Query Catalog and MetaSchema
  • Routing — Inspect where fields execute
  • HeavenBase MCP — Let agents browse workspaces