Enable parallel tool execution, fix delegate truncation, sandbox deps layer
ci / vet-and-test (pull_request) Successful in 43s
ci / vet-and-test (pull_request) Successful in 43s
Why: Real runs were fully serial: the direct path never set the kernel's parallel tool mode, delegate_task handed the parent only the child's 160-char summary (the full text was dropped), MiniMax streamed its reasoning inside content <think> blocks, and the EXT-16 sandbox hid ~/.local so python-docx/openpyxl/pptx could not even import. All four were measured defects (F1/F2/F3/F5) in the delegation/routing proposal. Why: Serial-only mutual exclusion is not enough for order-sensitive tools - the card-stream test failed with out-of-order appends - so the ordering moved into the kernel (SerialTools partition, Agent-Native #44); process events pair by CallID (#42) and tool results write back through the injected call context (#43). Evidence: go test ./... green, including new regression anchors: TestDelegateToolReturnsFullText, TestToolEventsPairByCallID, TestToolExecModeAndSerialSet, TestOpenLLMClientReasoningSplitAuto, TestSandboxArgvDepsLayer, TestExecEnvJoinsPythonPath. Impact: Direct runs now execute independent same-turn calls (searches, reads, delegate_task, review_findings) concurrently by default (runtime.parallelTools=false restores sequential); card flow, plans, workflows, exec primitives and file edits keep model-declared order. delegate_task returns the capped full child text. MiniMax-* models get reasoning_split=true so thinking streams via reasoning_content. --exec-deps-dir/AGENT_SYSTEM_EXEC_DEPS_DIR mounts a read-only dependency layer into the sandbox and merges PYTHONPATH. Bumps deps/agent-native to c348441. Refs: proposal 2026-10-10-agent-delegation-routing-sandbox.md (E1, F1-F5); Agent-Native #42/#43/#44; Dev task feature/agent-e1-parallel-fixes.
This commit is contained in:
@@ -46,6 +46,7 @@ func main() {
|
||||
allowedHosts := fs.String("allowed-hosts", "", "逗号分隔的额外主机名,供反向代理的 Host 与 Origin 校验")
|
||||
noExec := fs.Bool("disable-exec-tools", false, "硬关闭执行原语 run_shell/run_python/register_artifact(用户设置无法覆盖;多用户部署在执行隔离就位前建议开启)")
|
||||
execBackend := fs.String("exec-backend", "", "执行后端:direct(默认,现状直启)| sandbox(bwrap 隔离档:断网、只读系统根、仅会话目录可写、进程数限额)")
|
||||
execDepsDir := fs.String("exec-deps-dir", "", "sandbox 档只读依赖层目录(site-packages 等;空=不挂载)")
|
||||
fs.Parse(os.Args[1:])
|
||||
cliSet := visited(fs)
|
||||
|
||||
@@ -53,7 +54,7 @@ func main() {
|
||||
Addr: *addr, DataDir: *data, PluginsDir: *pluginsDir, Mock: *mock,
|
||||
StorageDSN: *dsn, ArtifactsDir: *artifacts, AuthMode: *auth, Instance: *instance,
|
||||
InsecureListen: *insecure, AllowedHostsRaw: *allowedHosts, DisableExecTools: *noExec,
|
||||
ExecBackend: *execBackend,
|
||||
ExecBackend: *execBackend, ExecDepsDir: *execDepsDir,
|
||||
}, cliSet)
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, "agent-system:", err)
|
||||
@@ -63,7 +64,7 @@ func main() {
|
||||
Addr: resolved.Addr, DataDir: resolved.DataDir, PluginsDir: resolved.PluginsDir, ForceMock: resolved.Mock,
|
||||
StorageDSN: resolved.StorageDSN, ArtifactsDir: resolved.ArtifactsDir, AuthMode: resolved.AuthMode,
|
||||
InstanceID: resolved.Instance, InsecureListen: resolved.InsecureListen, AllowedHosts: resolved.AllowedHosts(),
|
||||
DisableExecTools: resolved.DisableExecTools, ExecBackend: resolved.ExecBackend,
|
||||
DisableExecTools: resolved.DisableExecTools, ExecBackend: resolved.ExecBackend, ExecDepsDir: resolved.ExecDepsDir,
|
||||
}); err != nil {
|
||||
fmt.Fprintln(os.Stderr, "agent-system:", err)
|
||||
os.Exit(1)
|
||||
@@ -108,12 +109,13 @@ func runConfig(args []string) int {
|
||||
allowedHosts := fs.String("allowed-hosts", "", "")
|
||||
noExec := fs.Bool("disable-exec-tools", false, "")
|
||||
execBackend := fs.String("exec-backend", "", "")
|
||||
execDepsDir := fs.String("exec-deps-dir", "", "")
|
||||
fs.Parse(args[1:])
|
||||
resolved, err := config.Load(*cfgFile, os.LookupEnv, config.Config{
|
||||
Addr: *addr, DataDir: *data, PluginsDir: *pluginsDir, Mock: *mock,
|
||||
StorageDSN: *dsn, ArtifactsDir: *artifacts, AuthMode: *auth, Instance: *instance,
|
||||
InsecureListen: *insecure, AllowedHostsRaw: *allowedHosts, DisableExecTools: *noExec,
|
||||
ExecBackend: *execBackend,
|
||||
ExecBackend: *execBackend, ExecDepsDir: *execDepsDir,
|
||||
}, visited(fs))
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, "agent-system:", err)
|
||||
|
||||
Reference in New Issue
Block a user