remote-codex 0.11.45 → 0.11.49

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.
Files changed (47) hide show
  1. package/README.md +80 -10
  2. package/apps/relay-server/dist/index.js +1 -1
  3. package/apps/supervisor-api/dist/index.js +8370 -1501
  4. package/apps/supervisor-web/dist/assets/c-BIGW1oBm.js +1 -0
  5. package/apps/supervisor-web/dist/assets/{core-DODVy7wn.js → core-B0prQzhr.js} +1 -1
  6. package/apps/supervisor-web/dist/assets/cpp-DIPi6g--.js +1 -0
  7. package/apps/supervisor-web/dist/assets/csharp-DSvCPggb.js +1 -0
  8. package/apps/supervisor-web/dist/assets/go-C27-OAKa.js +1 -0
  9. package/apps/supervisor-web/dist/assets/index-DZI1aSXo.js +22 -0
  10. package/apps/supervisor-web/dist/assets/index-Dy8PgXgw.css +1 -0
  11. package/apps/supervisor-web/dist/assets/java-CylS5w8V.js +1 -0
  12. package/apps/supervisor-web/dist/assets/{markdown-vendor-RZk8L7-L.js → markdown-vendor-BG6PurxI.js} +33 -33
  13. package/apps/supervisor-web/dist/assets/ruby-B6AkvBWc.js +1 -0
  14. package/apps/supervisor-web/dist/assets/rust-B1yitclQ.js +1 -0
  15. package/apps/supervisor-web/dist/assets/{shellscript-CEILq0vU.js → shellscript-DfDnw5Jg.js} +1 -1
  16. package/apps/supervisor-web/dist/assets/thread-ui-gcslNXur.js +3968 -0
  17. package/apps/supervisor-web/dist/assets/xml-sdJ4AIDG.js +1 -0
  18. package/apps/supervisor-web/dist/index.html +4 -4
  19. package/docs/windows-device-manager.zh.md +143 -0
  20. package/docs/windows-device-setup.zh.md +263 -0
  21. package/docs/windows-one-click-installer-research.zh.md +481 -0
  22. package/docs/windows.md +6 -0
  23. package/package.json +7 -2
  24. package/packages/acp/src/agent-catalog.test.ts +57 -0
  25. package/packages/acp/src/agent-catalog.ts +361 -0
  26. package/packages/acp/src/catalog-runtime.test.ts +99 -0
  27. package/packages/acp/src/catalog-runtime.ts +507 -0
  28. package/packages/acp/src/codex-environment.test.ts +58 -0
  29. package/packages/acp/src/codex-environment.ts +33 -0
  30. package/packages/acp/src/index.ts +5 -0
  31. package/packages/acp/src/item-mapper.test.ts +137 -0
  32. package/packages/acp/src/item-mapper.ts +473 -0
  33. package/packages/acp/src/runtimeAdapter.test.ts +79 -0
  34. package/packages/acp/src/runtimeAdapter.ts +1193 -0
  35. package/packages/acp/src/terminal-service.test.ts +31 -0
  36. package/packages/acp/src/terminal-service.ts +137 -0
  37. package/packages/agent-runtime/src/runtime-errors.ts +1 -0
  38. package/packages/agent-runtime/src/types.ts +8 -0
  39. package/packages/db/migrations/0030_thread_agent_id.sql +9 -0
  40. package/packages/db/src/repositories.ts +3 -0
  41. package/packages/db/src/schema.ts +1 -0
  42. package/packages/shared/src/agent-providers.ts +10 -1
  43. package/packages/shared/src/index.ts +24 -0
  44. package/scripts/windows/build-device-manager.ps1 +64 -0
  45. package/apps/supervisor-web/dist/assets/index-BO9S3vTX.css +0 -1
  46. package/apps/supervisor-web/dist/assets/index-GqVDOqbI.js +0 -22
  47. package/apps/supervisor-web/dist/assets/thread-ui-BWC_ljvN.js +0 -3714
package/README.md CHANGED
@@ -26,9 +26,10 @@ home or office workstation through an inbound port.
26
26
  - npm CLI: `npm install -g remote-codex`
27
27
 
28
28
  Native Windows Relay Supervisor support targets Windows 11 x64 with Node.js 22
29
- and Codex. The Terminal plugin is not available on Windows. See
30
- [Native Windows support](docs/windows.md) for setup, background management, and
31
- the current compatibility boundary.
29
+ and Codex. The self-contained [Windows Device Manager](docs/windows-device-manager.zh.md)
30
+ installs missing runtime components and keeps the device available from the system
31
+ tray. The Terminal plugin is not available on Windows. See
32
+ [Native Windows support](docs/windows.md) for the current compatibility boundary.
32
33
 
33
34
  ### Why Remote Codex
34
35
 
@@ -71,7 +72,8 @@ client to load the latest transcript and continue from the current state.
71
72
  approvals or structured questions remotely.
72
73
  - Select agent backend, model, reasoning effort, collaboration mode, and
73
74
  approval policy when starting work.
74
- - Work with Codex, Claude, and OpenCode backends through one supervisor surface.
75
+ - Work with Codex, Claude, OpenCode, and any ACP-compatible agent through one
76
+ supervisor surface.
75
77
  - Upload attachments and export transcripts as PDF or HTML.
76
78
 
77
79
  #### Workspaces and files
@@ -200,8 +202,10 @@ REMOTE_CODEX_RELAY_SUPERVISOR_PORT=45679 \
200
202
  remote-codex relay-supervisor
201
203
  ```
202
204
 
203
- `45679` is used by default in copied setup commands to avoid common local
204
- `8787` port conflicts. You can change it if needed.
205
+ Copied setup commands use `45679` for macOS/Linux and `45680` for Windows by
206
+ default. The distinct ports allow a Windows host and WSL to run supervisors at
207
+ the same time, while both avoid common local `8787` port conflicts. You can
208
+ change either port if needed.
205
209
 
206
210
  By default, `remote-codex relay-supervisor` starts itself inside a detached
207
211
  `tmux` session so closing the terminal does not take the device offline. Manage
@@ -235,6 +239,39 @@ use it only on a trusted LAN/VPN. Set `SERVICE_HOST=127.0.0.1` and
235
239
 
236
240
  Override with `SERVICE_PORT` and `SERVICE_API_PORT`.
237
241
 
242
+ ### ACP Agents
243
+
244
+ Enable the generic ACP backend, then choose the concrete agent when creating a
245
+ thread:
246
+
247
+ ```bash
248
+ REMOTE_CODEX_ENABLED_AGENT_PROVIDERS=acp \
249
+ remote-codex start
250
+ ```
251
+
252
+ The supervisor detects the base agent first. Missing base agents remain disabled
253
+ and show their probe command. When a base agent exists but its ACP adapter is
254
+ missing, the create-thread form offers an adapter install action.
255
+
256
+ | Agent | ACP transport | Base probe | ACP command |
257
+ | --- | --- | --- | --- |
258
+ | Grok Build | Native | `grok --version` | `grok agent stdio` |
259
+ | Cursor Agent | Native | `cursor-agent --version` | `cursor-agent acp` |
260
+ | OpenAI Codex | Adapter | `codex --version` | `codex-acp` |
261
+ | Claude Agent | Adapter | `claude --version` | `claude-agent-acp` |
262
+ | Gemini CLI | Native | `gemini --version` | `gemini --acp` |
263
+ | GitHub Copilot CLI | Native | `copilot --version` | `copilot --acp` |
264
+ | OpenCode | Native | `opencode --version` | `opencode acp` |
265
+ | DeepSeek Harness | Adapter | `dsh --version` | `dsh-acp` |
266
+
267
+ `ACP_COMMAND` remains available for an additional custom ACP stdio server.
268
+
269
+ `ACP_STARTUP_TIMEOUT_MS` controls initialize timeout. ACP agents may support
270
+ `session/load`, `session/resume`, both, or neither. Remote Codex persists every
271
+ normalized turn item in its supervisor SQLite database, so transcript history
272
+ remains available even when an ACP agent resumes context without replaying old
273
+ turns.
274
+
238
275
  ### Development
239
276
 
240
277
  ```bash
@@ -285,8 +322,9 @@ Remote Codex 支持本机、Tailscale/LAN 和公网 Relay 三种访问方式。R
285
322
  - npm CLI: `npm install -g remote-codex`
286
323
 
287
324
  原生 Windows Relay Supervisor 首版支持 Windows 11 x64、Node.js 22 和 Codex;
288
- Windows 暂不提供 Terminal 插件。安装、后台运行方法和兼容范围见
289
- [原生 Windows 支持说明](docs/windows.md)。
325
+ 自包含的 [Windows Device Manager](docs/windows-device-manager.zh.md) 可以探测并
326
+ 补齐运行环境,通过系统托盘维持 Device 在线。Windows 暂不提供 Terminal 插件,
327
+ 兼容范围见 [原生 Windows 支持说明](docs/windows.md)。
290
328
 
291
329
  ### 为什么使用 Remote Codex
292
330
 
@@ -325,7 +363,7 @@ flowchart LR
325
363
  - 查看流式回答、reasoning 摘要、工具调用、运行状态、token 使用和完成状态。
326
364
  - Agent 运行期间继续发送指令,并远程处理授权请求或结构化问题。
327
365
  - 创建任务时选择 Agent backend、模型、reasoning effort、协作模式和授权策略。
328
- - 在同一个 Supervisor 界面使用 Codex、Claude OpenCode backend
366
+ - 在同一个 Supervisor 界面使用 Codex、Claude、OpenCode 和任意 ACP 兼容 Agent
329
367
  - 上传附件,并将 transcript 导出为 PDF 或 HTML。
330
368
 
331
369
  #### Workspace 与文件
@@ -447,7 +485,9 @@ REMOTE_CODEX_RELAY_SUPERVISOR_PORT=45679 \
447
485
  remote-codex relay-supervisor
448
486
  ```
449
487
 
450
- 复制命令默认使用 `45679`,用于避开本机常见的 `8787` 端口冲突;需要时可以手动换。
488
+ 复制命令默认在 macOS/Linux 使用 `45679`,在 Windows 使用 `45680`。两个端口互不
489
+ 相同,因此 Windows 主机和 WSL 可以同时运行 supervisor,并且都能避开本机常见的
490
+ `8787` 端口冲突;需要时可以手动修改。
451
491
 
452
492
  默认情况下,`remote-codex relay-supervisor` 会尝试启动到 detached `tmux`
453
493
  session 里,这样关闭终端窗口不会让设备下线。可以用下面命令管理:
@@ -480,6 +520,36 @@ npm CLI 默认端口:
480
520
 
481
521
  可用 `SERVICE_PORT` 和 `SERVICE_API_PORT` 覆盖。
482
522
 
523
+ ### ACP Agent
524
+
525
+ 启用通用 ACP backend,然后在创建 thread 时选择具体 Agent:
526
+
527
+ ```bash
528
+ REMOTE_CODEX_ENABLED_AGENT_PROVIDERS=acp \
529
+ remote-codex start
530
+ ```
531
+
532
+ Supervisor 会先探测基础 Agent。基础 Agent 不存在时选项保持灰色并显示探测命令;
533
+ 基础 Agent 已存在但缺少 ACP adapter 时,创建 thread 界面会提供 adapter 安装按钮。
534
+
535
+ | Agent | ACP 接入方式 | 基础探测 | ACP 命令 |
536
+ | --- | --- | --- | --- |
537
+ | Grok Build | 原生 | `grok --version` | `grok agent stdio` |
538
+ | Cursor Agent | 原生 | `cursor-agent --version` | `cursor-agent acp` |
539
+ | OpenAI Codex | Adapter | `codex --version` | `codex-acp` |
540
+ | Claude Agent | Adapter | `claude --version` | `claude-agent-acp` |
541
+ | Gemini CLI | 原生 | `gemini --version` | `gemini --acp` |
542
+ | GitHub Copilot CLI | 原生 | `copilot --version` | `copilot --acp` |
543
+ | OpenCode | 原生 | `opencode --version` | `opencode acp` |
544
+ | DeepSeek Harness | Adapter | `dsh --version` | `dsh-acp` |
545
+
546
+ `ACP_COMMAND` 仍可用于额外配置一个自定义 ACP stdio server。
547
+
548
+ `ACP_STARTUP_TIMEOUT_MS` 用于控制 initialize 超时。ACP Agent 可能支持
549
+ `session/load`、`session/resume`、同时支持两者,或都不支持。Remote Codex 会把
550
+ 所有规范化后的 turn item 持久化到 supervisor SQLite,因此即使 Agent 恢复上下文时
551
+ 不回放旧 turn,前端 transcript 历史仍然可用。
552
+
483
553
  ### 开发
484
554
 
485
555
  ```bash
@@ -5869,7 +5869,7 @@ function isAllowedSharedRuntimeMetadataRequest(method, pathname) {
5869
5869
  if (pathname === "/api/plugins") {
5870
5870
  return true;
5871
5871
  }
5872
- return /^\/api\/agent-runtimes\/[^/]+\/(?:status|models|subscription-usage)$/.test(pathname);
5872
+ return /^\/api\/agent-runtimes\/[^/]+\/(?:status|models|agents|subscription-usage)$/.test(pathname);
5873
5873
  }
5874
5874
  function threadIdFromPath(pathValue) {
5875
5875
  const pathname = new URL(pathValue, "http://relay.local").pathname;