agent-console 1.3.1: 全部自动同意 (Auto-approve all), split out of #727 (#747)

Auto-approve all (全部自动同意) ships in agent-console 1.3.1, split out of #727 (qingnian108).

The mode is off by default. In it, Codex runs with its sandbox off and Claude Code skips its checks. Cursor, OpenCode and dsh requests are answered allow-once by the console, never allow_always or acceptForSession. Each auto answer is saved with `auto: true` before the Agent goes on, and a banner shows while the mode is on. Plan confirmations and questions still ask. A 1.2 默认 of 全部放行 is not silently upgraded to real auto-approve. Pi keeps the `default` mode id ("Pi never asks"), so switching Agents before the first message never carries auto-approve into an Agent the user didn't pick.

Reviewed at 7e55c87ca merged onto main 20b89389:
- Linux (WSL2 Ubuntu 24.04): root `bun test packages/agent-console` 6/6; `bun scripts/check.mjs` OK; `npm run check` OK; vitest 461 passed / 17 skipped; `verify:build` 5/5 identical.
- Windows 11 (Edge): `e2e:v1` 29/29.
- Linux e2e stops at scenario 5 (steer timeout). It does the same on main 1.3.0, so it was filed as #753.
- Broken by hand:
  - Pi's modeMap back to bypassPermissions: 2 tests red.
  - The keeps line shown for every Agent: 1 test red.
  - Pi's label branch removed: 1 test red.
- An earlier round at 049449612 on macOS checked the daemon behaviour with probes. This version is published from the dist branch; the package isn't on npm.
This commit is contained in:
qingnian108
2026-11-05 14:02:29 +08:00
committed by GitHub
parent 20b893893f
commit 2c4e76dbba
38 changed files with 1378 additions and 136 deletions
@@ -29,6 +29,8 @@ const dict: Record<AppLocale, Record<string, string>> = {
"notice.sessionStartFailed": "会话启动失败:{detail}",
"notice.sendFailed": "发送失败:{detail}",
"notice.bashMissing": "没有找到 Git Bash。这个 Agent 在 Windows 上要用 Git Bash 运行命令(C:\\Windows\\System32\\bash.exe 是 WSL 启动器,不能用)。请安装 Git for Windows:https://git-scm.com/download/win ,或在「设置 → Bash 路径」里手动指定 bash.exe。",
"notice.autoApproveUpgrade": "1.3 新增「全部自动同意」:现在对 Cursor、OpenCode、dsh 也会真正自动同意(1.2 的「全部放行」对它们不生效,仍会询问)。你之前把默认权限模式设成了它,为安全起见这个对话仍从「每次询问」开始;需要时请在下方权限菜单里手动开启,或在设置里重新选择默认权限模式。",
"notice.autoApproveMigrated": "这个对话在 1.2 里设成了「全部放行」,当时这个 Agent 实际仍会询问。1.3 起「全部自动同意」会真正自动同意,所以已改回「每次询问」;需要时请在下方权限菜单里手动开启。",
"notice.effortNextTurn": "思考强度已保存,将在下一轮生效",
"notice.effortResetOnModel": "当前模型不支持该思考强度,已恢复为 Default",
"turn.agentExit": "Agent 进程意外退出",
@@ -140,6 +142,8 @@ const dict: Record<AppLocale, Record<string, string>> = {
"notice.sessionStartFailed": "Session start failed: {detail}",
"notice.sendFailed": "Send failed: {detail}",
"notice.bashMissing": "Git Bash was not found. On Windows this agent runs its commands with Git Bash (C:\\Windows\\System32\\bash.exe is the WSL launcher and won't work). Install Git for Windows: https://git-scm.com/download/win , or set bash.exe under Settings → Bash path.",
"notice.autoApproveUpgrade": "New in 1.3: Auto-approve all now really auto-approves for Cursor, OpenCode and dsh too (1.2's bypass mode did nothing for them; they still asked). Your default permission mode was set to it, so to be safe this conversation starts in Always Ask; switch it on in the permission menu below if you want it, or pick the default permission mode again in Settings.",
"notice.autoApproveMigrated": "This conversation was set to bypass permissions in 1.2, where this agent still asked anyway. From 1.3 Auto-approve all really auto-approves, so it was put back to Always Ask; switch it on in the permission menu below if you want it.",
"notice.effortNextTurn": "Reasoning effort saved — takes effect on the next turn",
"notice.effortResetOnModel": "This model does not support that effort level; reset to Default",
"turn.agentExit": "Agent process exited unexpectedly",