Skip to main content

Module builtins

Module builtins 

Source
Expand description

Embedded builtin schemas, baked into the binary via include_dir!.

Every directory under builtins/schemas/ is loaded as a first-class schema and registered in the default SchemaRegistry. Ships default (the legacy 10-knowledge-type bundle) plus domain-specific schemas (ingest, planning, project, software) that mems may pin via schema = "<name>@<version>" in their per-mem config.

Structs§

BuiltinPackage
One embedded built-in schema package: its identity plus every file it ships, addressed relative to the package directory and sorted by path. The raw-bytes view of the catalogue — load_builtin_schemas is the parsed view. Consumed by the retention guard (tests/builtin_retention.rs), which seals each shipped package’s content hash in builtins/MANIFEST.toml: a shipped (name, version) must exist in every future binary with byte-identical content, so a rebuild can never strand a workspace pinning it.

Functions§

builtin_mem_template
Read a built-in schema package’s optional mem-template.json — the MemConfig starter a client (memstead mem create, the planning skills) fills and passes through the write_guidance create-parameter. Returns the parsed JSON object when the package ships a template, None when it does not (default, ingest) or when name is not a built-in.
builtin_packages
Enumerate every embedded built-in package with its raw file bytes. Identity comes from each package’s schema.yaml (name: / version: keys); the directory name is organisational only.
load_builtin_schemas
Load every embedded schema into owned Schema values.