Refactor runtime around world core

This commit is contained in:
lpf
2026-03-15 23:46:06 +08:00
parent ba95aeed35
commit afae9076df
79 changed files with 6526 additions and 6960 deletions

View File

@@ -4,7 +4,6 @@ import (
"context"
"strings"
"testing"
"time"
"github.com/YspCoder/clawgo/pkg/config"
)
@@ -68,29 +67,6 @@ func TestFilesystemToolsParseStringArgs(t *testing.T) {
}
}
func TestSpawnToolParsesStringNumbers(t *testing.T) {
manager := NewSubagentManager(nil, t.TempDir(), nil)
manager.SetRunFunc(func(ctx context.Context, task *SubagentTask) (string, error) {
return "ok", nil
})
tool := NewSpawnTool(manager)
out, err := tool.Execute(context.Background(), map[string]interface{}{
"task": "implement check",
"agent_id": "coder",
"max_retries": "2",
"retry_backoff_ms": "100",
"timeout_sec": "5",
})
if err != nil {
t.Fatalf("spawn failed: %v", err)
}
if !strings.Contains(out, "spawned") && !strings.Contains(strings.ToLower(out), "subagent") {
t.Fatalf("unexpected spawn output: %s", out)
}
time.Sleep(50 * time.Millisecond)
}
func TestExecBrowserWebToolsParseStringArgs(t *testing.T) {
t.Parallel()