magpie-agent-console 0.1.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,115 +1,158 @@
1
1
  # Agent Console
2
2
 
3
- Magpie 窗口里的 Agent 控制台:驱动本机真实的 Agent CLI(Claude Code、Codex、Cursor、Copilot、OpenCode、Pi、Devin、dsh)。每个对话是一条**常驻 Agent 会话**,挂在独立的 Node daemon 上——关掉页面、刷新、重启 magpie,Agent 还在跑;重新打开就接回现场。
3
+ A Magpie page plugin that drives real local Agent CLIs (Claude Code, Codex, Cursor, Copilot, OpenCode, Pi, Devin, dsh). Each conversation is a **persistent Agent session** on a standalone Node daemon. Close or refresh the page — the Agent keeps running while Magpie is open. Reopen the page and you pick up where you left off. When Magpie quits, the daemon and its Agents stop; threads are persisted and can be resumed next time.
4
4
 
5
- ## 安装
5
+ ## Install
6
6
 
7
- 需要 [Magpie](https://usemagpie.ai) ≥ 0.1.1340,以及本机 Node.js ≥ 20。
7
+ Requires [Magpie](https://usemagpie.ai) ≥ 0.1.1340 and Node.js ≥ 20.
8
8
 
9
9
  ```bash
10
10
  magpie plugin add magpie-agent-console
11
11
  ```
12
12
 
13
- 或在 Magpie:**设置 → 插件 → 添加插件**,填 `magpie-agent-console`。装好后侧栏插件分组会出现「Agent 控制台」。
13
+ Or in Magpie: **Settings → Plugins → Add plugin**, enter `magpie-agent-console`. After install, **Agent Console** appears in the sidebar plugin group.
14
14
 
15
- 本机要已安装你想用的 Agent CLI(如 `claude`、`codex`)。未安装的会在设置里显示安装提示。
15
+ Install the Agent CLIs you want to use (for example `claude` or `codex`). Missing CLIs show an install hint in Settings.
16
16
 
17
17
  ---
18
18
 
19
- 不是打网关的聊天框:daemon 通过 `@anthropic-ai/claude-agent-sdk` / `codex app-server` / ACP 持久连接真实 CLI,规范化结构化事件流(工具调用、思考、授权请求、用量),经 WebSocket 实时推给 React 页面。
19
+ This is not a gateway chat box. The daemon talks to the real CLIs through `@anthropic-ai/claude-agent-sdk`, `codex app-server`, and ACP, normalizes a structured event stream (tool calls, thinking, permission requests, usage), and pushes it to the React page over WebSocket.
20
20
 
21
- 不是打网关的聊天框:daemon 通过 `@anthropic-ai/claude-agent-sdk` / `codex app-server` 持久连接真实 CLI,规范化结构化事件流(工具调用、思考、授权请求、用量),经 WebSocket 实时推给 React 页面。
21
+ UI principle: **obvious at a glance, nothing extra**. Three columns — sidebar (projects × threads), conversation timeline, and a right panel (changes / files / terminal).
22
22
 
23
- 界面原则:**一眼就懂,没有多余的东西**。三列工作台——侧栏(项目×对话)、对话时间线、右侧面板(改动/文件/终端)。
23
+ ## Features
24
24
 
25
- ## 功能
25
+ - **Persistent sessions**: each thread binds to a long-lived Agent process; after a daemon restart, running threads are marked closed and can be resumed (`--resume` / `thread/resume`)
26
+ - **Multiple Agents**: Claude Code, Codex, Cursor, Copilot, OpenCode, Pi, Devin, dsh; missing CLIs show an install hint
27
+ - **Model / permission / thinking**: per-thread; four permission modes and five thinking levels (what each Agent actually supports)
28
+ - **Structured timeline**: user message → thinking (expandable) → tool calls (read / edit / command, with line-level diffs) → todos → usage and duration; answer permission requests (tools / plan / questions) on the card
29
+ - **Steer and queue**: steer while running, queue the next message, interrupt
30
+ - **Changes panel**: git status refresh every 3s, unified per-file diffs; discarded untracked files go to trash instead of a hard delete
31
+ - **Files panel**: lazy directory tree (respects `.gitignore`), syntax-highlighted preview
32
+ - **Terminal panel**: real PTY via node-pty (pwsh / powershell); reconnects after reopening the page; degrades if PTY is unavailable
33
+ - **Import history**: import matching sessions from `~/.claude/projects` and `~/.codex/sessions` as new threads (resumable)
34
+ - **Thread management**: search (Ctrl+K), pin, rename, archive, delete (trash), export Markdown, thread info (usage / cost / session ID)
35
+ - **Mock Agent**: `AGENT_CONSOLE_MOCK=1` registers a demo Agent with 8 scripts (`default` / `perm` / `plan` / `ask` / `slow` / `error` / `long` / `exit`) so UI work does not burn tokens
26
36
 
27
- - **常驻会话**:每个对话绑定一个持久 Agent 进程;daemon 重启后 running 对话标为已关闭并可一键续接(`--resume` / `thread/resume`)
28
- - **多 Agent**:Claude Code、Codex、Cursor、Copilot、OpenCode、Pi、Devin、dsh;未安装的显示安装提示
29
- - **模型/权限/思考强度**:每对话可改;权限四档(计划/默认/接受编辑/放开全部),思考强度五档
30
- - **结构化时间线**:用户消息 → 思考(可展开)→ 工具调用(读/改/跑命令,带行级 diff)→ 待办 → 用量与耗时;授权请求(工具/计划/提问)卡片内应答
31
- - **插话与排队**:运行中可 steer 插话、排队下一条、打断(interrupt)
32
- - **改动面板**:git status 实时刷新(3s),逐文件统一 diff,放弃改动(未跟踪文件移入回收区不硬删)
33
- - **文件面板**:目录树懒加载(遵守 .gitignore),文件预览带语法高亮
34
- - **终端面板**:node-pty 真终端(pwsh/powershell),重开页面可接回;无 PTY 时降级为简化模式
35
- - **导入历史**:把 `~/.claude/projects`、`~/.codex/sessions` 里与项目匹配的既有会话导入为新对话(可续接)
36
- - **会话管理**:搜索(Ctrl+K)、置顶、重命名、归档、删除(移回收目录)、导出 Markdown、对话信息(用量/费用/会话 ID)
37
- - **Mock Agent**:`AGENT_CONSOLE_MOCK=1` 注册演示 Agent,8 个剧本(默认/perm/plan/ask/slow/error/long/exit)联调 UI 不烧 token
38
-
39
- ## 架构
37
+ ## Architecture
40
38
 
41
39
  ```
42
- magpie 插件页(sandbox iframe,opaque origin)
43
- │ location.replace → http://127.0.0.1:3488
44
- ▼
45
- index.mjs 插件入口:ensureDaemon——读 daemon.json、pid 存活检查、
46
- ping 校验、复用或 spawn 新 daemon;端口迁移时优雅重启
47
- │
48
- daemon/ 独立 Node 进程(默认端口 3488,数据目录 ~/.config/magpie/agent-console)
49
- http.ts 静态文件 + /api/ping + /api/upload;Host/Origin/页面令牌校验
50
- ws/gateway.ts /ws:hello 鉴权、req/res 方法分派、订阅频道推送、二进制终端帧
51
- ws/methods.ts zod 校验的全部方法(projects/threads/settings/git/files/history/terminal…)
52
- agents/manager.ts 会话运行时:send/steer/queue/interrupt、授权 pending、coalescer(60ms 合并 delta)、
53
- 崩溃补 turn_ended、空闲回收、重启恢复
54
- providers/ claude(SDK)+ codex(app-server)+ mock;detect/listModels/createSession
55
- store/ projects/threads/settings/attachments:json + jsonl,串行写队列,原子落盘
56
- terminal/ node-pty 终端池(≤8/项目),环形缓冲 + 16ms 合并推送
57
- git/ files/ 改动状态/diff/放弃;目录树/文件读取
58
- history/ Claude/Codex 历史会话扫描与导入
59
- │ WebSocket(文本帧 req/res/evt + 二进制终端帧)
60
- ▼
61
- web/src → app/ React 19 + zustand 前端:三列布局、虚拟化时间线、
62
- xterm 终端、diff 渲染、marked+dompurify Markdown
40
+ Magpie window
41
+ └─ page/index.html (sandbox="allow-scripts" iframe, served by Magpie from /_magpie/plugin/<per-run id>/)
42
+ │ reads page/session.js {port, key} (gate key only, written by the plugin host)
43
+ │ navigates itself to http://127.0.0.1:<port>/open?k=<key>&theme=…
44
+ ▼
45
+ Magpie plugin host (Bun) ── index.mjs + lib/gate.mjs "gate" on 127.0.0.1:<port> (default 3488)
46
+ │ first /open: spawns the daemon as a child process (node, --port 0, stdin lifeline, --parent-pid)
47
+ │ 302 → http://127.0.0.1:<daemonPort>/?theme=…#t=<token>
48
+ ▼
49
+ daemon (Node, daemon/dist/main.js) ── HTTP + WebSocket on an ephemeral 127.0.0.1 port
50
+ └─ React app (app/) reads the token from location.hash, sends it as the x-agent-console header
51
+ and in the WebSocket hello
52
+ ```
53
+
54
+ ## Security model
55
+
56
+ The daemon can run Agents with full access to your machine, so the token that unlocks it must never be readable by another web page.
57
+
58
+ - **Two secrets per plugin-host run.** Each run generates two independent random 256-bit values: a **gate key** and the **daemon token**. Only the gate key is ever written to a file.
59
+ - **Why `session.js` holds only the gate key.** Magpie serves the page folder at `/_magpie/plugin/<per-run id>/`, where the id is an HMAC that changes every time Magpie starts and is handed out only to Magpie's own window. Magpie does not check `Origin`, `Host`, `Sec-Fetch-*` or a cookie on these files, and sends no `Cross-Origin-Resource-Policy`, so the unguessable path is their only protection. A classic `<script src>` include is not subject to CORS, so any page that learned the path (a different localhost port, a `file:` page, any website) could run `session.js` and read `globalThis.AgentConsoleSession`. That is why the file never contains the daemon token.
60
+ - **Token handoff.** After the gate binds its port, the host writes `{port, key}` to `page/session.js` (atomic write, mode 0600; git-ignored and excluded from the npm package). The page navigates to the gate's `/open?k=<key>`; the gate compares the key in constant time, starts or reuses the daemon and redirects to it with the daemon token **only in the URL fragment** (`#t=…`). The fragment is never sent to a server, written to a log, or leaked through `Referer`, and the window that ends up holding it belongs to the daemon's origin (an opaque origin inside Magpie's sandboxed frame), so the page that started the navigation cannot read it. A leaked gate key therefore lets another page at most open the console UI in a frame or tab it cannot read; it does not unlock the daemon's API or WebSocket. No HTML served by the daemon contains the token; an unauthenticated `GET /` returns a page with no secret in it.
61
+ - **`Origin: null` is not trusted.** Any site can produce `Origin: null` (sandboxed iframes, `data:` and `file:` pages). The token is the only authority:
62
+ - static routes (`/`, `app.js`, …) refuse `Origin: null` and foreign origins with 403 and never send CORS headers;
63
+ - token routes (`/api/*`, `/attachments/*`, WebSocket hello) accept `Origin: null` only as a way to *present* the token (the Magpie iframe has an opaque origin); `access-control-allow-origin: null` is emitted only on responses to requests that carried a valid token, plus the preflight for `/api/upload`; credentials are never allowed;
64
+ - any other origin gets 403 even with a valid token.
65
+ - **Host is checked on every request and WebSocket upgrade** (gate and daemon): it must be `127.0.0.1:<port>` or `localhost:<port>` with the actually bound port, otherwise 421. This blocks DNS rebinding, where the attacker's requests carry no `Origin` at all.
66
+ - The gate answers only `GET /open?k=<gate key>` (the daemon token is not accepted there), refuses any request that carries an `Origin` header, and sends `Cache-Control: no-store`, `X-Content-Type-Options: nosniff`, `Referrer-Policy: no-referrer`.
67
+ - WebSocket connections must send `hello` with the token within 5 seconds, otherwise they are closed with code 4401.
68
+
69
+ ## Lifecycle
70
+
71
+ - Importing `index.mjs` has no side effects (no port, no process, no files).
72
+ - `server()` (called by Magpie's plugin host at host start-up — this includes short-lived hosts started by CLI commands such as `magpie plugin add` or `magpie plugin list`) binds the gate and writes `page/session.js`. If the port is busy it retries every 2 s in the background without blocking the host; a detached 0.1.0 daemon still holding the port is shut down once, only after it proves its identity by answering `/api/ping` with the token from `daemon.json`.
73
+ - The daemon starts when the page is opened for the first time and is reused for later opens. It is a normal (non-detached) child of the plugin host.
74
+ - The daemon exits when its stdin pipe closes or its parent pid disappears (checked every 2 s) — i.e. when Magpie quits or the plugin host restarts — and after 60 minutes idle.
75
+ - Magpie's plugin host treats the value returned by `server()` as OpenCode hooks and never calls `stop()`; it exits the Bun process when Magpie closes its stdin. A synchronous `exit` handler therefore closes the daemon's lifeline, signals it, and removes the `session.js` this host wrote. `stop()` (used by tests and other hosts) closes the gate, ends the daemon (graceful, then forced) and removes `session.js`.
76
+ - Agents stop with the daemon. Threads are persisted and can be resumed after reopening the page. On macOS/Linux every Agent CLI, the Codex app-server and the no-PTY shell run in their own process group, so stopping one ends everything it started; on Windows the same is done with `taskkill /T`. A process `exit` hook reaps any tree still alive when the daemon exits.
77
+
78
+ ## Platforms
79
+
80
+ The plugin runs wherever Magpie runs (Windows, macOS, Linux). It needs **Node.js 20+** on `PATH`: Magpie's plugin host is Bun, but the daemon and `node-pty` need Node. If Node is missing, opening the page shows "Node.js was not found" (the gate's 503 page) instead of silently running under Bun; a too-old Node gives a similar message.
81
+
82
+ - **Finding Agent CLIs.** `PATH` is scanned in JavaScript (no `where.exe`/`which`; `where.exe` prints in the console code page, which garbled Chinese user names). The first hit in `PATH` order wins. Common install dirs are also searched because a GUI app may start with a minimal `PATH` (Magpie adds the login-shell `PATH` itself; this is a fallback): Homebrew (`/opt/homebrew/bin`, `/usr/local/bin`), `~/.local/bin`, npm global, Volta, Bun, `~/.claude/local`, `%APPDATA%\npm`.
83
+ - **Windows shims.** `.exe` runs directly; npm `.cmd` shims run their `cli.js` with Node; `.ps1`-only shims run with `powershell -NoProfile -ExecutionPolicy Bypass -File`; any other `.cmd`/`.bat` runs through `cmd.exe` with cross-spawn-style escaping (spaces, `&`, `%`, quotes and Chinese in paths and arguments are safe).
84
+ - **Terminal.** `node-pty` prebuilds cover win32/darwin/linux × x64/arm64 (Linux prebuilds are glibc only). Default shell: Windows `pwsh` → `powershell` → `cmd`; macOS/Linux `$SHELL` if it exists, else `zsh` (macOS) / `bash` / `sh`. If `node-pty` cannot load, a simple non-PTY terminal is used. On macOS the exec bit of `node-pty`'s `spawn-helper` is restored if the package extraction dropped it.
85
+ - **Folder picker.** Windows: PowerShell `FolderBrowserDialog`; macOS: `osascript` "choose folder"; Linux: `zenity` or `kdialog` when a graphical session exists; otherwise type the path.
86
+ - **Paths.** Project paths are compared case-insensitively on Windows and macOS (and NFC-normalized on macOS); `realpath.native` resolves 8.3 short names and `subst` drives; UNC paths work. Discarding an untracked file moves it to the trash with a copy fallback when the project and data dir are on different drives.
87
+ - **Encoding.** Agent output is decoded as UTF-8; the folder picker falls back to GBK (CP936); the file preview tries UTF-8, then GBK. Git runs with `core.quotepath=false` so Chinese file names show as-is.
88
+ - **Magpie desktop window → `http://127.0.0.1`.** Magpie's window origin is `wails://` on macOS/Linux and `http://wails.localhost` on Windows. The plugin frame navigates itself to the gate on `http://127.0.0.1`, as Magpie's plugin-runtime docs describe for page plugins. On macOS, Magpie's `Info.plist` has no ATS keys and ATS exempts IP-address hosts by default, and the main window has no CSP that could block the frame, so the navigation is allowed. This is the one item that still needs a run on a real Mac.
89
+ - **Clickjacking / `frame-ancestors`.** Not set on purpose. The UI must load inside Magpie's frame on every mode: `wails://` (a non-special scheme whose origin WebKit may treat as opaque), `http://wails.localhost`, and `magpie web` on any address, LAN IP or reverse proxy. No `frame-ancestors` list covers all of them without breaking one. Framing the console also requires the gate key, which only Magpie's per-run page path hands out.
90
+
91
+ ## Reproducible build
92
+
93
+ `app/app.js`, `app/app.css`, `app/index.html`, `daemon/dist/main.js` and `daemon/dist/main.js.map` are committed build outputs of `web/src` and `daemon/src` (esbuild, options in `scripts/build-v1.mjs`). The build is deterministic: no timestamps, no absolute paths, LF line endings enforced by `.gitattributes`.
94
+
95
+ ```bash
96
+ npm ci
97
+ npm run build
98
+ git diff --exit-code app daemon/dist # no output = identical bytes
99
+ npm run verify:build # rebuilds into a temp dir, byte-compares, prints SHA-256
63
100
  ```
64
101
 
65
- ## 安全模型
102
+ `verify:build` prints `OK <sha256> <file>` for each bundle and exits non-zero on any mismatch.
66
103
 
67
- magpie 的插件页是 `sandbox="allow-scripts"` iframe,跳走后是 opaque origin(`Origin: null`)——靠 Origin 区分不了"真 UI"和恶意 iframe:
104
+ ## Dependencies
68
105
 
69
- - daemon 启动时生成随机页面令牌,写进 `daemon.json`;返回 index.html 时注入 `<meta>`,前端所有请求带 `x-agent-console: <token>`,不符 403/4401
70
- - Host 必须是 `127.0.0.1:<port>`/`localhost:<port>`,否则 421(防 DNS rebinding);静态响应不带 `access-control-allow-origin`
71
- - WS hello 5 秒内必须鉴权;终端输入帧只在订阅 `terminal:<index>` 后才接受
106
+ All dependencies and devDependencies are pinned to exact versions, and `package-lock.json` matches them (`npm ci` succeeds). Runtime dependencies: `@agentclientprotocol/sdk`, `@anthropic-ai/claude-agent-sdk`, `@tanstack/react-virtual`, `@xterm/addon-fit`, `@xterm/xterm`, `clsx`, `dompurify`, `highlight.js`, `ignore`, `lucide-react`, `marked`, `node-pty`, `react`, `react-dom`, `ws`, `zod`, `zustand` (most of the UI packages are bundled into `app/app.js`; the daemon loads its packages from `node_modules`).
72
107
 
73
- ## 数据目录
108
+ - `node-pty` is a native module and ships prebuilt binaries. Magpie installs plugins with install scripts disabled; if the binary cannot load, the terminal panel degrades to a simple non-PTY terminal.
109
+ - `@anthropic-ai/claude-agent-sdk` is distributed under Anthropic's commercial terms.
110
+
111
+ ## Data directory
74
112
 
75
113
  ```
76
- $XDG_CONFIG_HOME/magpie/agent-console/ (默认 ~/.config/magpie/agent-console)
77
- daemon.json pid/port/token/version(插件入口据此复用)
78
- settings.json 设置(默认 Agent/权限/发送键/面板宽度…)
79
- projects.json 项目列表
80
- threads/<id>/ meta.json + timeline.jsonl(事件持久化,重连补推)
81
- attachments/ 上传的附件
82
- trash/ 删除的对话与放弃的新文件(不硬删)
83
- logs/ 按天滚动日志(留 7 天)
114
+ $XDG_CONFIG_HOME/magpie/agent-console/ (default ~/.config/magpie/agent-console on every OS;
115
+ on Windows ~ is %USERPROFILE%, the same root Magpie uses)
116
+ daemon.json pid/port/token/version of the running daemon (mode 0600)
117
+ settings.json settings (default Agent / permission / send key / panel widths…)
118
+ projects.json project list
119
+ threads/<id>/ meta.json + timeline.jsonl (event persistence, replay on reconnect)
120
+ attachments/ uploaded files
121
+ trash/ deleted threads and discarded new files (not hard-deleted)
122
+ logs/ daily rotating logs (kept 7 days); logs/daemon-spawn.log has the plugin host's view
84
123
  ```
85
124
 
86
- ## 开发
125
+ Magpie in portable mode keeps its own config next to the executable, but this plugin still uses the directory above (it follows `XDG_CONFIG_HOME`).
126
+
127
+ ## Development
87
128
 
88
129
  ```bash
89
- npm run build # daemon esm + web iife(app/ 四件套;daemon/dist 也提交)
90
- npm run dev # 起 daemon:端口 3499、数据目录 _tmp/xdg-dev(不碰真实数据)
91
- npm run check # 双 tsconfig 类型检查
92
- npm test # vitest 单测(test/v1 + web/src)
93
- npm run e2e:v1 # 端到端:spawn daemon(3497)+Edge CDP 全场景(Mock Agent)
94
- npm run shot:v1 # 截图集(亮/暗 × 各场景 → _tmp/shots-v1/)
95
-
96
- # Mock 联调(不烧真 token)
130
+ npm run build # daemon esm + web iife (app/ and daemon/dist are committed)
131
+ npm run verify:build # check committed bundles match a clean build
132
+ npm run dev # daemon on port 3499, data dir _tmp/xdg-dev (does not touch real data)
133
+ npm run check # typecheck both tsconfigs
134
+ npm test # vitest (test/v1 + web/src)
135
+ npm run e2e:v1 # e2e: spawn daemon(3497) + Edge/Chrome/Chromium, Mock Agent (MSEDGE_PATH / CHROME_PATH to override)
136
+ node scripts/verify-windows.mjs [--quick] # one-command platform self-check, see docs/VERIFY-windows.md
137
+ npm run shot:v1 # screenshot set (light/dark × scenes → _tmp/shots-v1/)
138
+
139
+ # Mock (no real tokens)
97
140
  AGENT_CONSOLE_MOCK=1 npm run dev
98
- # 剧本:默认 /perm /plan /ask /slow /error /long(5000 事件压测) /exit
141
+ # scripts: default /perm /plan /ask /slow /error /long (5000-event stress) /exit
99
142
  ```
100
143
 
101
- | 环境变量 | 作用 |
144
+ | Env | Purpose |
102
145
  |---|---|
103
- | `AGENT_CONSOLE_PORT` | daemon 默认端口(默认 3488;插件 options.port 优先) |
104
- | `AGENT_CONSOLE_MOCK=1` | 注册 mock provider |
105
- | `AGENT_CONSOLE_TOKEN` | 固定页面令牌(测试/截图用,生产不要设) |
106
- | `AGENT_CONSOLE_IDLE_EXIT_MIN` | 空闲自动退出分钟数(默认 60) |
107
- | `XDG_CONFIG_HOME` | 数据根目录(开发用 `_tmp/xdg-dev`) |
146
+ | `AGENT_CONSOLE_PORT` | gate port in the plugin / daemon port in standalone mode (3488; plugin `options.port` wins) |
147
+ | `AGENT_CONSOLE_MOCK=1` | register the mock provider |
148
+ | `AGENT_CONSOLE_TOKEN` | fixed page token (tests/screenshots only; do not set in production) |
149
+ | `AGENT_CONSOLE_IDLE_EXIT_MIN` | idle auto-exit minutes (default 60) |
150
+ | `XDG_CONFIG_HOME` | data root (`_tmp/xdg-dev` in development) |
108
151
 
109
- daemon CLI:`node daemon/dist/main.js [--port N] [--data DIR] [--token T]`。
152
+ Daemon CLI: `node daemon/dist/main.js [--port N|0] [--data DIR] [--token T] [--parent-pid PID]`. In standalone mode (no `--parent-pid`) it prints the URL to open, `http://127.0.0.1:<port>/#t=<token>`, to the console.
110
153
 
111
- ## 依赖与许可证
154
+ ## License
112
155
 
113
- 本插件 MIT(见 LICENSE)。第三方依赖许可证见 THIRD-PARTY-NOTICES.md:运行时 16 个包(多为 MIT;dompurify MPL-2.0/Apache-2.0、highlight.js BSD-3-Clause、lucide-react ISC;`@anthropic-ai/claude-agent-sdk` 为 Anthropic 商用条款),构建/测试依赖 esbuild/vitest/typescript/playwright-core。
156
+ MIT (see LICENSE). Third-party licenses are in THIRD-PARTY-NOTICES.md: 16 runtime packages (mostly MIT; DOMPurify MPL-2.0/Apache-2.0, highlight.js BSD-3-Clause, lucide-react ISC; `@anthropic-ai/claude-agent-sdk` is Anthropic's commercial terms). Build/test: esbuild, vitest, TypeScript, playwright-core.
114
157
 
115
- 架构设计参考了 Paseo(常驻 daemon + provider 抽象)与 T3 Code(时间线形态与三列布局)——仅参考思路,未复制代码。
158
+ Architecture takes cues from Paseo (persistent daemon + provider abstraction) and T3 Code (timeline shape and three-column layout) — ideas only, no copied code.
@@ -1,22 +1,24 @@
1
- # 第三方声明
1
+ # Third-Party Notices
2
2
 
3
- ## 设计参考
3
+ ## Design references
4
4
 
5
- 本插件 v1.0 的常驻会话架构、事件协议与界面布局在设计时参考了以下开源项目
6
- (仅参考设计思路与协议形态,未复制源代码):
5
+ The persistent-session architecture, event protocol and UI layout of this plugin were designed
6
+ with reference to the following open-source projects (only design ideas and protocol shapes were
7
+ referenced; no source code was copied):
7
8
 
8
- - **Paseo**(https://github.com/anthropics/paseo 类项目,Apache-2.0)
9
- —— 常驻 daemon + WebSocket 事件推送、provider 会话抽象的思路。
10
- - **T3 Code**(https://github.com/pingdotgg/t3code 类项目,MIT)
11
- —— 时间线条目形态(工具组、授权卡片、计划卡片)与三列工作台布局。
9
+ - **Paseo** (https://github.com/getpaseo/paseo)
10
+ — persistent daemon + WebSocket event push, and the provider session abstraction.
11
+ - **T3 Code** (https://github.com/pingdotgg/t3code, MIT)
12
+ — timeline item shapes (tool groups, permission cards, plan cards) and the three-column workbench layout.
12
13
 
13
- ## npm 依赖及其许可证
14
+ ## npm dependencies and their licenses
14
15
 
15
- 运行时依赖(`dependencies`):
16
+ Runtime dependencies (`dependencies`):
16
17
 
17
- | 包 | 版本 | 许可证 |
18
+ | Package | Version | License |
18
19
  |---|---|---|
19
- | @anthropic-ai/claude-agent-sdk | 0.3.312 | SEE LICENSE IN README.md(Anthropic 商用条款) |
20
+ | @agentclientprotocol/sdk | 2.1.0 | Apache-2.0 |
21
+ | @anthropic-ai/claude-agent-sdk | 0.3.312 | SEE LICENSE IN README.md (Anthropic commercial terms) |
20
22
  | @tanstack/react-virtual | 3.14.24 | MIT |
21
23
  | @xterm/addon-fit | 0.11.0 | MIT |
22
24
  | @xterm/xterm | 6.0.0 | MIT |
@@ -33,10 +35,10 @@
33
35
  | zod | 4.6.7 | MIT |
34
36
  | zustand | 5.0.16 | MIT |
35
37
 
36
- 开发依赖(`devDependencies`,不随发布包分发构建产物以外的内容):
37
- typescript(Apache-2.0)、esbuild(MIT)、vitest(MIT)、playwright-core(Apache-2.0)、
38
- @types/*(MIT)。
38
+ Development dependencies (`devDependencies`; nothing from them ships except the built output):
39
+ typescript (Apache-2.0), esbuild (MIT), vitest (MIT), playwright-core (Apache-2.0),
40
+ @types/* (MIT).
39
41
 
40
- Codex app-server 的 JSON-RPC schema 文件(`daemon/src/providers/codex/schema/`)由
41
- `codex app-server generate-json-schema` 在本机生成,属于 OpenAI Codex CLI 的接口描述,
42
- 按 Codex 的许可证使用;插件仅将其用于协议对接。
42
+ The Codex app-server JSON-RPC schema files (`daemon/src/providers/codex/schema/`) are generated
43
+ locally by `codex app-server generate-json-schema`. They describe the OpenAI Codex CLI interface
44
+ and are used under the Codex license; the plugin uses them only for protocol integration.