(_ context.Context, execCtx ExecutionContext, input any)
| 873 | return "<tool_use_error>\nWSL sandbox is not available and local fallback is disabled.\nConfigure the WSL sandbox image or set wsl_sandbox_allow_local_fallback=true.\n</tool_use_error>", nil |
| 874 | } |
| 875 | resultPrefix = "[sandbox] WSL sandbox unavailable; command executed locally because local fallback was selected." |
| 876 | localFallback = true |
| 877 | default: |
| 878 | return "<tool_use_error>\nWSL sandbox is required for this command but the sandbox distro is not installed. Approve WSL sandbox setup or explicitly choose local fallback.\n</tool_use_error>", nil |
| 879 | } |
| 880 | } |
| 881 | if !yolo && !localFallback && (t.sandboxManager == nil || !t.sandboxManager.IsSandboxingEnabled()) { |
| 882 | return "<tool_use_error>\nOS sandbox backend is unavailable. The command was not executed. Enable YOLO mode explicitly to run without sandbox isolation.\n</tool_use_error>", nil |
| 883 | } |
| 884 | argv := bashpkg.ShellArgv(in.Command, "") |
| 885 | if bashpkg.ShouldUseSandbox(in.Command, t.sandboxManager, yolo || localFallback, nil) { |
| 886 | if runtimeDir := projectRuntimeDirFromContext(execCtx, cwd); strings.TrimSpace(runtimeDir) != "" { |
| 887 | _ = os.MkdirAll(runtimeDir, 0o755) |
| 888 | } |
| 889 | readRoots := append([]string{cwd}, rootsFromAny(execCtx["allowed_read_roots"])...) |
nothing calls this directly
no test coverage detected