Skip to main content

Module blueprints

Module blueprints 

Source
Expand description

HTTP surface for inspecting/registering Blueprint state (/v1/blueprints/*). HTTP surface for inspecting Blueprint state (= for debug / animation verification). /v1/blueprints/:id/head returns the head Blueprint JSON; /v1/blueprints/:id/history returns the commit-version list. Callers pass a shared Store via Arc and mount the router.

Structs§

BlueprintsState
Router state: BP store + the base dir used to resolve $file / $agent_md refs + default_agent_kind from the CLI (= layer (2) of the 4-tier cascade — the CLI override layer). When ref_base = None, ref expansion is skipped (= seed bodies are parsed as raw JSON).

Functions§

build_blueprints_router
Minimal entry: no ref_base (ref expansion skipped) and no CLI default kind override.
build_blueprints_router_with_refs
When ref_base is set, seed_blueprint resolves {"$file": ...} / {"$agent_md": ...} refs in the body under that base dir and expands them. Path hygiene (absolute paths and .. are rejected) is enforced inside expand_file_refs, sandboxed to the subtree under the base dir.