pub fn subagent_definitions(
cap: &CapabilityConfig,
) -> HashMap<String, NamedAgentDefinition>Expand description
P5-3 (design §2 module 9, §3.1 capabilities.subagents.agents.<name>,
D3 “named-defs”): parse the named-subagent-definition sub-table into
crate::subagents::NamedAgentDefinitions, keyed by name. Missing or
malformed fields degrade gracefully (an entry with no system_prompt
gets an empty one — the caller falls back to the parent’s own system
prompt, see Agent::run_spawn_subagent) rather than erroring the whole
resolve — a config-shape mistake here is a weaker agent definition, not
a security-relevant silent-allow (unlike the permissions-layer
case-sensitivity carry-forward elsewhere in this file).