Files
plugins/packages/agent-console/package.json
T
qingnian108 a431798fe1 agent-console 1.0.0: a page plugin that drives the local Agent CLIs (#535)
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.
2026-10-31 20:11:22 +08:00

105 lines
3.7 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"name": "@magpie-community/page-agent-console",
"version": "1.0.0",
"description": "在 magpie 窗口里加一个「Agent 控制台」页面:用常驻本地服务驱动本机的 Agent CLI(Claude Code、Codex、Cursor 等),带结构化时间线。A Magpie page that drives local Agent CLIs (Claude Code, Codex, Cursor, and others) with a persistent local daemon and a structured timeline.",
"author": "qingnian108 (https://github.com/qingnian108)",
"homepage": "https://github.com/magpie-community/plugins/tree/main/packages/agent-console#readme",
"bugs": {
"url": "https://github.com/magpie-community/plugins/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/magpie-community/plugins.git",
"directory": "packages/agent-console"
},
"files": [
"index.mjs",
"lib",
"page/index.html",
"page/boot.js",
"app",
"daemon/dist",
"assets",
"README.md",
"LICENSE",
"THIRD-PARTY-NOTICES.md"
],
"keywords": [
"magpie",
"magpie-page",
"magpie-plugin",
"opencode",
"opencode-plugin",
"agent",
"claude",
"codex"
],
"license": "MIT",
"magpie": {
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjggMTI4IiB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCI+CiAgPHJlY3Qgd2lkdGg9IjEyOCIgaGVpZ2h0PSIxMjgiIHJ4PSIyOCIgZmlsbD0iIzBkOTQ4OCIvPgogIDxwYXRoIGQ9Ik0zNCA0NGg2MGE4IDggMCAwIDEgOCA4djI0YTggOCAwIDAgMS04IDhINjJsLTE0IDEydi0xMkgzNGE4IDggMCAwIDEtOC04VjUyYTggOCAwIDAgMSA4LTh6IiBmaWxsPSIjZmZmIi8+CiAgPGcgZmlsbD0iIzBkOTQ4OCI+CiAgICA8Y2lyY2xlIGN4PSI0OCIgY3k9IjYyIiByPSI1Ii8+CiAgICA8Y2lyY2xlIGN4PSI2NCIgY3k9IjYyIiByPSI1Ii8+CiAgICA8Y2lyY2xlIGN4PSI4MCIgY3k9IjYyIiByPSI1Ii8+CiAgPC9nPgogIDxwYXRoIGQ9Ik00MCA5NmwtOCAxMk04OCA5Nmw4IDEyIiBzdHJva2U9IiNmZmYiIHN0cm9rZS13aWR0aD0iNiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+Cjwvc3ZnPgo=",
"page": {
"title": "Agent Console",
"titles": {
"zh": "Agent 控制台",
"zh-TW": "Agent 控制台"
},
"file": "page/index.html",
"icon": "assets/icon.svg"
},
"permissions": []
},
"main": "./index.mjs",
"type": "module",
"scripts": {
"dev": "node daemon/dist/main.js --port 3499 --data _tmp/xdg-dev",
"start": "node daemon/dist/main.js",
"test": "vitest run",
"build": "node scripts/build-v1.mjs",
"check": "tsc -p tsconfig.daemon.json --noEmit && tsc -p tsconfig.web.json --noEmit",
"build:v1": "node scripts/build-v1.mjs",
"dev:v1": "node scripts/build-v1.mjs --watch",
"daemon:v1": "node daemon/dist/main.js --port 3499 --data _tmp/xdg-dev",
"test:v1": "vitest run",
"check:v1": "tsc -p tsconfig.daemon.json --noEmit && tsc -p tsconfig.web.json --noEmit",
"e2e:v1": "node scripts/e2e-v1.mjs",
"shot:v1": "node scripts/shot-v1.mjs",
"verify:build": "node scripts/verify-build.mjs",
"test:real": "vitest run --config vitest.real.config.ts"
},
"engines": {
"node": ">=20",
"magpie": ">=0.1.1340"
},
"dependencies": {
"@agentclientprotocol/sdk": "2.1.0",
"ignore": "7.0.14",
"ws": "8.22.0",
"zod": "4.6.7"
},
"optionalDependencies": {
"node-pty": "1.2.0-beta.15"
},
"devDependencies": {
"@tanstack/react-virtual": "3.14.24",
"@types/dompurify": "3.0.5",
"@types/node": "26.6.6",
"@types/react": "19.3.0",
"@types/react-dom": "19.3.0",
"@types/ws": "8.18.2",
"@xterm/addon-fit": "0.11.0",
"@xterm/xterm": "6.0.0",
"clsx": "2.1.1",
"dompurify": "3.4.17",
"esbuild": "0.28.2",
"highlight.js": "11.12.0",
"lucide-react": "1.64.0",
"marked": "18.1.2",
"playwright-core": "1.64.1",
"react": "19.3.1",
"react-dom": "19.3.1",
"typescript": "7.0.2",
"vitest": "5.0.5",
"zustand": "5.0.16"
}
}