PackageRegistry is an in-memory catalog for b01t algorithm packages. You publish a compiled program as a PackageMeta entry, then retrieve it by name or tag, resolve its dependencies in topological order, and save or load the entire registry to a JSON file. A global DEFAULT_REGISTRY instance is available for convenience.
PackageMeta
PackageMeta is a dataclass that describes a published algorithm package.
Names of other packages this package depends on. Used for topological resolution. Default:
[].Attached broad IR program, if any. Not persisted in JSON (
save stores its text dump; load does not restore it). Default: None.Attached exact program. Persisted to JSON using
exact-oracle-v1 format when save is called. Restored on load. Default: None.PackageRegistry
publish
meta.name.
The package metadata to store. If a package with the same name already exists, it is overwritten.
get
None if not found.
find_by_tag
tags list includes tag.
all
save
path. Each entry includes all scalar fields. If a package has an exact_program, it is serialized using exact-oracle-v1 format. Broad IRProgram objects are saved as their text dump but are not restored on load.
load
save and merges them into this registry.
resolve
name in topological order (dependencies first, then name itself). Raises DSLValidationError if a circular dependency is detected or a required package is missing.
dependency_graph_dot
DEFAULT_REGISTRY
DEFAULT_REGISTRY is a module-level PackageRegistry instance. Use it to publish packages without managing your own registry object.