Skip to main content

Crate mlua_swarm_compile

Crate mlua_swarm_compile 

Source
Expand description

Blueprint compile pipeline for mlua-swarm.

§Position in the crate graph

  • mlua-swarm-schema — pure Blueprint / AgentDef types (no runtime dep).
  • mlua-swarm-dsl — Lua authoring frontend (.bp.luaserde_json::Value).
  • mlua-swarm-compile (this crate) — takes a wire body (serde_json::Value, whether hand-written or DSL-produced) and turns it into a BPReady state: refs resolved via the linker’s include cascade, agent.md frontmatter parsed into AgentDef, and shape checks applied. Consumed by both the CLI (mse bp lint / mse bp build) and the server register path.
  • mlua-swarm — engine runtime (dispatch / middleware / spawner adapters), depends on this crate for the register-time transformation.
  • mlua-swarm-cli / mlua-swarm-server — call into this crate at the HTTP request → typed BP boundary, so authoring and registration go through the same code (single-linker discipline, GH issue 4c4e3eb8).

Re-exports§

pub use linker::env_blueprint_includes;
pub use linker::expand_file_refs;
pub use linker::expand_file_refs_with_config;
pub use linker::load_blueprint_from_path;
pub use linker::pre_read_default_agent_kind;
pub use linker::pre_read_in_bp_includes;
pub use linker::LoadError;
pub use linker::ResolveConfig;

Modules§

agent_md
agent.md frontmatter + body loader — turns agent-profiles agents/*.md files into AgentDefs.
linker
Blueprint loader (Phase B). Loads a Blueprint from a JSON / YAML file and recursively expands the internal {"$file": "..."} refs.