Expand description
Embedded JSON Schemas (the “meta-schemas”) for authoring validation.
schema-manifest.schema.json and type-definition.schema.json are
generated from the Rust schema structs and committed under
generated/. They are baked into the binary here so the engine can
publish them into a workspace’s .memstead/meta-schemas/ at boot —
a well-known location an authored package’s
# yaml-language-server: $schema=… directive resolves against, giving
IDE-side validation as the YAML is edited. memstead schema install
rewrites a package’s directive to the installed-location form so the
published copy is what the editor checks against.
Constants§
- META_
SCHEMA_ DIR - Directory (under
<workspace>/.memstead/) the meta-schemas publish to. - META_
SCHEMA_ MANIFEST - JSON Schema for a schema package manifest (
schema.yaml). - META_
SCHEMA_ MANIFEST_ FILE - Published filename of the manifest meta-schema.
- META_
SCHEMA_ TYPE_ DEFINITION - JSON Schema for a type definition (
types/<type>.yaml). - META_
SCHEMA_ TYPE_ DEFINITION_ FILE - Published filename of the type-definition meta-schema.
Functions§
- publish_
meta_ schemas - Publish the embedded meta-schemas into
<workspace_root>/.memstead/meta-schemas/. Idempotent — rewrites a file only when its on-disk bytes differ. Best-effort by contract: the engine-boot caller ignores the error so a read-only or permission-restricted workspace still boots; the meta-schemas are an editor convenience, not load-bearing engine state.