diff options
Diffstat (limited to 'internal/agentloop')
| -rw-r--r-- | internal/agentloop/tools.go | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/internal/agentloop/tools.go b/internal/agentloop/tools.go index 2bdf0e0..7f98705 100644 --- a/internal/agentloop/tools.go +++ b/internal/agentloop/tools.go @@ -51,12 +51,13 @@ func agentToolSpecs() []provider.ToolSpec { ParametersJSONSchema: map[string]any{ "type": "object", "properties": map[string]any{ - "name": strProp("short descriptive name for the subtask"), - "instructions": strProp("complete instructions for the subtask agent"), - "model": strProp("optional model override"), - "max_budget_usd": map[string]any{"type": "number", "description": "optional budget cap in USD"}, - "role": strProp("optional role name to dispatch the subtask through instead of a fixed model (e.g. an evaluator role); when set, model is ignored and the role's escalation ladder picks the provider/model"), - "depends_on": map[string]any{"type": "array", "items": map[string]any{"type": "string"}, "description": "optional list of sibling subtask IDs (returned by prior spawn_subtask calls in this same decomposition) this subtask must wait for before it can run"}, + "name": strProp("short descriptive name for the subtask"), + "instructions": strProp("complete instructions for the subtask agent"), + "model": strProp("optional model override"), + "max_budget_usd": map[string]any{"type": "number", "description": "optional budget cap in USD"}, + "role": strProp("optional role name to dispatch the subtask through instead of a fixed model (e.g. an evaluator role); when set, model is ignored and the role's escalation ladder picks the provider/model"), + "depends_on": map[string]any{"type": "array", "items": map[string]any{"type": "string"}, "description": "optional list of sibling subtask IDs (returned by prior spawn_subtask calls in this same decomposition) this subtask must wait for before it can run"}, + "acceptance_criteria": map[string]any{"type": "array", "items": map[string]any{"type": "string"}, "description": "optional list of concrete criteria this subtask's work must satisfy"}, }, "required": []string{"name", "instructions"}, }, @@ -218,21 +219,23 @@ func (l *Loop) dispatchTool(ctx context.Context, name, argsJSON string) (result case "spawn_subtask": var a struct { - Name string `json:"name"` - Instructions string `json:"instructions"` - Model string `json:"model"` - MaxBudgetUSD float64 `json:"max_budget_usd"` - Role string `json:"role"` - DependsOn []string `json:"depends_on"` + Name string `json:"name"` + Instructions string `json:"instructions"` + Model string `json:"model"` + MaxBudgetUSD float64 `json:"max_budget_usd"` + Role string `json:"role"` + DependsOn []string `json:"depends_on"` + AcceptanceCriteria []string `json:"acceptance_criteria"` } _ = json.Unmarshal([]byte(argsJSON), &a) id, ssErr := l.Channel.SpawnSubtask(ctx, agentchannel.SubtaskSpec{ - Name: a.Name, - Instructions: a.Instructions, - Model: a.Model, - MaxBudgetUSD: a.MaxBudgetUSD, - Role: a.Role, - DependsOn: a.DependsOn, + Name: a.Name, + Instructions: a.Instructions, + Model: a.Model, + MaxBudgetUSD: a.MaxBudgetUSD, + Role: a.Role, + DependsOn: a.DependsOn, + AcceptanceCriteria: a.AcceptanceCriteria, }) if ssErr != nil { return "", false, ssErr |
