feat: ship subagent runtime and remove autonomy/task legacy

This commit is contained in:
lpf
2026-03-05 21:54:54 +08:00
parent 29d6480058
commit e8e1cdae32
32 changed files with 1844 additions and 2867 deletions

View File

@@ -0,0 +1,31 @@
package tools
import "testing"
func TestExpandToolAllowlistEntries_GroupPrefix(t *testing.T) {
got := ExpandToolAllowlistEntries([]string{"group:files_read"})
contains := map[string]bool{}
for _, item := range got {
contains[item] = true
}
if !contains["read_file"] || !contains["list_dir"] {
t.Fatalf("files_read group expansion missing expected tools: %v", got)
}
if contains["write_file"] {
t.Fatalf("files_read group should not include write_file: %v", got)
}
}
func TestExpandToolAllowlistEntries_BareGroupAndAlias(t *testing.T) {
got := ExpandToolAllowlistEntries([]string{"memory_all", "@pipeline"})
contains := map[string]bool{}
for _, item := range got {
contains[item] = true
}
if !contains["memory_search"] || !contains["memory_write"] {
t.Fatalf("memory_all expansion missing memory tools: %v", got)
}
if !contains["pipeline_dispatch"] || !contains["pipeline_status"] {
t.Fatalf("pipeline alias expansion missing pipeline tools: %v", got)
}
}