//! Manifest struct — deserialized from _manifests/*.toml. //! One manifest = one agent. Source of truth; the .md file is generated. use serde::Deserialize; #[derive(Deserialize)] pub struct Manifest { pub name: String, pub description: String, pub tools: Vec, pub model: String, /// v0.39 (multi-CLI): optional LLM provider this agent prefers when invoked /// via `kei agent `. Values: claude / grok / agy / copilot / kimi / /// codex. Empty / missing → DNA resolver falls back to ~/.claude/config/ /// primary.toml, then to claude. Affects `kei run-via` / `kei agent` /// dispatch; does NOT change Claude Code's in-session model. #[serde(default)] pub provider: Option, pub role: String, pub blocks: Vec, /// v0.16 (phase 5): agent substrate role. When present, assembler loads /// `_roles/.toml` and emits each capability's `text.md` /// fragment between the ROLE section and the existing blocks. Optional /// for backward compatibility with pre-substrate manifests. #[serde(default)] pub substrate_role: Option, pub domain_in: Vec, pub forbidden_domain: Vec, pub handoff: Vec, #[serde(default)] pub output_extra_fields: Vec, pub memory_project: Option, pub project_claudemd: Option, pub references: Option, /// v0.15: optional typed-artifact schema this agent emits on completion. /// Must be one of the names in `artifact_schemas::KNOWN`. #[serde(default)] pub produces_artifact: Option, /// v0.16 rule_blocks: registry fragment names to inject after blocks. /// Format: `"::"`, e.g. /// `"karpathy-behavioral::1-think-before-coding"`. /// Fragments are fetched from `~/.claude/registry.sqlite` at assemble time. #[serde(default)] pub rule_blocks: Vec, } #[derive(Deserialize)] pub struct Handoff { pub target: String, pub trigger: String, /// v0.15: optional schema name the target consumes from this handoff. #[serde(default)] pub expects_artifact: Option, /// v0.15: optional schema name this agent produces for the target. #[serde(default)] pub produces_artifact: Option, } #[derive(Deserialize)] pub struct References { #[serde(default)] pub extra: Vec, }