Files
next-tjwater-agent/src/routes/chatPermissionPolicy.ts
T
jiang e476569ebc
Generic Container CI/CD / test-build-publish (push) Successful in 1m19s
Agent CI/CD / build-test-publish-and-deploy (push) Successful in 1m19s
fix(agent): auto-approve scoped investigation edits
2026-11-08 02:02:58 +08:00

6 lines
379 B
TypeScript

// Called only for native "asked" events. Explicit denials and host isolation
// still run before this point; the selected round mode answers pending requests.
export function canAutomaticallyApprove(mode: string, action: string, backgroundSandboxPermissions = false) {
return mode === "always" || (backgroundSandboxPermissions && (action === "shell" || action === "edit"));
}