Public declaration syntax from forge-rs/crates/forge-agent/src/subagent.rs Original source SHA-256: 1073dd6b8f60a127b7ebebdbe424c14dcd76f13f95103aa5352605503d8f90e5 Function bodies and constant values are omitted. This is not the complete implementation. Source line 81 #[derive(Debug, Clone, Serialize, Deserialize)] pub struct SubAgentConfig { } Source line 128 pub fn new(name: impl Into) -> Self; Source line 160 pub fn with_tool_names(mut self, names: Vec) -> Self; Source line 184 pub fn with_system_prompt(mut self, prompt: impl Into) -> Self; Source line 207 pub fn with_max_steps(mut self, max: u32) -> Self; Source line 213 pub fn name(&self) -> &str; Source line 220 pub fn tool_names(&self) -> &[String]; Source line 225 pub fn system_prompt(&self) -> Option<&str>; Source line 230 pub fn max_steps(&self) -> Option; Source line 237 #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct SubAgentDelegationContext { /// Optional stable child agent id. Falls back to the child's configured DID /// or child name when omitted. pub subagent_id: Option, /// Host-assigned run id for the delegated child agent. pub subagent_run_id: String, /// Optional summary of why the delegation happened. pub delegation_reason: Option, /// Governed artifact ref for delegated instructions. pub instruction_ref: Option, /// Capability refs granted to the child. pub capability_refs: Vec, /// Governed artifact ref for handoff state. pub handoff_ref: Option } Source line 316 pub fn create_subagent( parent_config: &AgentConfig, sub_config: SubAgentConfig, model: Arc, tool_registry: ToolRegistry, approval: Arc, ) -> ForgeAgentResult; Source line 408 pub async fn create_subagent_with_observer( parent_config: &AgentConfig, sub_config: SubAgentConfig, model: Arc, tool_registry: ToolRegistry, approval: Arc, observer: &dyn AgentLoopObserver, context: SubAgentDelegationContext, ) -> ForgeAgentResult;