Add internal subagent stream and notify policy

This commit is contained in:
lpf
2026-03-07 11:52:36 +08:00
parent 557633b698
commit 1218d68b7e
12 changed files with 641 additions and 41 deletions

View File

@@ -110,3 +110,21 @@ func TestValidateNodeBackedSubagentAllowsMissingPromptFile(t *testing.T) {
t.Fatalf("expected node-backed config to be valid, got %v", errs)
}
}
func TestValidateSubagentsRejectsInvalidNotifyMainPolicy(t *testing.T) {
t.Parallel()
cfg := DefaultConfig()
cfg.Agents.Subagents["coder"] = SubagentConfig{
Enabled: true,
SystemPromptFile: "agents/coder/AGENT.md",
NotifyMainPolicy: "loud",
Runtime: SubagentRuntimeConfig{
Proxy: "proxy",
},
}
if errs := Validate(cfg); len(errs) == 0 {
t.Fatalf("expected validation errors")
}
}