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 carries #727's reviewed part forward, without auto-approve (that comes as its own PR). Permission behaviour is the same as 1.2.
- Windows Git Bash detection, never the WSL System32 bash. It can be overridden in Settings and is passed per spawn only.
- GBK / system code page decoding of raw process output.
- Folded tool steps that don't wrap at ~600px.
- Select-to-quote, and copy/edit under the user bubble.
- Instant send with the echo replacing the bubble in place, and retry when a send fails.
- `/app` heals itself after sleep/wake. `frame-ancestors` is limited to loopback and Magpie's window.
- Grayscale timeline polish: one-line tool rows, a task-list pill, a reply footer and code blocks.
- Test fixes:
- The `initializing` push is awaited.
- `afterEach` waits for the thread store's writes.
- `runtimeInfo().starting` is exposed, and the steer test waits on it.
- "idle recycling" waits for closed.
Run on mote (macOS) at 65ab7c94:
- `npm ci`, `npm run check` and `build` are ok; `verify:build` gives 5/5 OK.
- Full `vitest run` x5: 4 green (427 passed). One red, "send while running → queued", is a race that is on main too.
- Cause: `setStatus(idle)` runs before `queue.shift()`.
- A 300ms pause injected there makes it red 3/3 on main and on this head.
- Filed on #585 with the cause and the repro.
- Focused send-latency + manager runs: 12/12. `e2e:v1`: 25/25, with no pageerror or console error.
- Broken by hand:
- With the old steer wait and the mock send held 400ms, the test is red 3/3; the new wait passes 3/3.
- With `recycleIdle` made a no-op, "idle recycling" goes red.
- Playwright render:
- Chromium and WebKit × zh/en × light/dark × 1280/420.
- No gradients, no coloured left borders, no `<select>`, no page errors.
- At 420 the page scrolls sideways (scrollWidth 480), the same as main.
Not tried: Windows (Git Bash detection, GBK decoding) and a real agent, rather than the mock.
agent-console 1.2.0 by qingnian108 (#582): Preview tab, chat links, file chips, font size/width settings, live magpie theme.
Reviewed and run at c459773107caa20f7063d12b2133c230f91c066c (mote, macOS, Node 22, sandbox HOME):
- npm ci --workspaces=false; npm run check ok; npm test: 48 files, 339 passed, 17 skipped; npm run verify:build 5/5 OK; bun scripts/check.mjs agent-console ok.
- Only test/v1/ws.test.ts changed since the last reviewed head 66d1070 (the new "preview.open returns host from previewHost()" test, through registerMethods).
- Broke by hand: methods.ts `return { ...r, host: previewHost() }` -> `return r;` turns that test red (1 of 5); restored, green. Changing previewHost's body alone stays green, as the test compares to previewHost(); fix582.test.ts covers its values.
- Earlier reviews' findings (per-listener key host, nonce/canary, gateway port + identity check, mentions path, Darwin major from the daemon) were checked in the earlier rounds. The proxy listens on 127.0.0.1 only and answers only the keyed Host.
- Not run: preview-attack.mjs browser half at this head, Windows box.
Adds Agent Console (@magpie-community/page-agent-console 1.0.0), a community page plugin that drives the Agent CLIs on this computer (Claude Code, Codex, ACP agents) through a local daemon on 127.0.0.1, with its source in packages/agent-console and a registry entry. Claude Code is the user's own `claude` CLI driven over stream-json (daemon/src/providers/claude/cli.ts); no Anthropic SDK is installed, bundled or in the branch's history. Cold install ~45 MB (node-pty ~26 MB), stated in the README and registry summary in en and zh.
By qingnian108 (#535).
What was run at 8e8f910 (mote, macOS, throwaway HOME, no real accounts):
- packages/agent-console: `npm ci --ignore-scripts --workspaces=false`; `node scripts/verify-build.mjs`: all five bundles byte-identical (daemon/dist/main.js 08c95aa3…, app/app.js 9a6911f3…); `vitest run`: 45 files, 254 passed, 17 skipped; `npm run check` clean.
- Real Claude Code 2.1.316 (npm @anthropic-ai/claude-code, sandbox HOME/CLAUDE_CONFIG_DIR, local fake Messages API): `AC_REAL_CLAUDE=… vitest run --config vitest.real.config.ts test/real/claude-cli.real.test.ts`: 4 of 4 (initialize lists 51 slash commands, streaming turn, Bash permission approved and denied, interrupt, --resume with set_model).
- Probe: the driver's exact argv with `--permission-mode bypassPermissions --allow-dangerously-skip-permissions`: the tool runs with no can_use_tool request.
- Repo root: `HOME=$(mktemp -d) bun test`: 4006 tests, 0 fail; `bun scripts/check.mjs` exit 0.
- Install as magpie does: `npm pack --ignore-scripts` (552 KB) then `bun add --ignore-scripts`: 45 MB node_modules, no @anthropic-ai/*, index.mjs imports.
- Read every changed line since 41c7a94: argv values limited to SAFE_ARG tokens (no cmd.exe metacharacters reach the shim path), no new network hosts, no install scripts, no eval; no commit in main..8e8f910 contains claude-agent-sdk.
Not tried: magpie's desktop window loading the page; a Windows .cmd/.ps1 claude shim end to end.