diff --git a/runtime/subagent/subagent.go b/runtime/subagent/subagent.go index 3da9297..0cfe8b1 100644 --- a/runtime/subagent/subagent.go +++ b/runtime/subagent/subagent.go @@ -30,6 +30,9 @@ type Request struct { // Deadline / MaxToolCalls 是宿主注入的预算余量(模型不可自行扩权)。 Deadline time.Time `json:"-"` MaxToolCalls int `json:"-"` + // Background 为真时宿主以后台方式派生(语义同产品 delegate 的 + // background 参数;AgentSpec.Background 声明经宿主写入本字段消费)。 + Background bool `json:"background,omitempty"` } // Result 是子代理的回传:至少包含结论文本;文件由宿主按写范围物化。 @@ -73,7 +76,8 @@ func (t *delegateTool) Parameters() json.RawMessage { "write_scope":{"type":"string"}, "non_goals":{"type":"string"}, "done_criteria":{"type":"string"}, - "deliverables":{"type":"array","items":{"type":"string"}} + "deliverables":{"type":"array","items":{"type":"string"}}, + "background":{"type":"boolean"} }}`) }