Add optional tools, model, and maxTurns to prompt modules
Why: User overrides of a subagent profile need a place on the shared contract, and empty fields must stay omitted so older modules keep their meaning. Evidence: go test ./... passed, including the new prompt_module_subagent golden. Impact: Existing modules serialize the same. Frontend and UI contracts still need a copy of the type. Refs: feature/agent-harness-p3b Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -60,6 +60,14 @@ func sampleRun() Run {
|
||||
}
|
||||
}
|
||||
|
||||
func TestGoldenPromptModule(t *testing.T) {
|
||||
golden(t, "prompt_module_subagent", PromptModule{
|
||||
ID: "agent.sub.explore", Layer: LayerAgent, Version: 1,
|
||||
Title: "探索子代理", Body: "只读检索。",
|
||||
Tools: []string{"knowledge_search", "web_search"}, Model: "lightweight", MaxTurns: 8,
|
||||
})
|
||||
}
|
||||
|
||||
func TestGoldenDomain(t *testing.T) {
|
||||
golden(t, "message", sampleMessage())
|
||||
golden(t, "run", sampleRun())
|
||||
|
||||
Reference in New Issue
Block a user