remote-codex 0.11.44 → 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.
- package/README.md +84 -5
- package/apps/relay-server/dist/index.js +18 -2
- package/apps/supervisor-api/dist/index.js +10034 -2782
- package/apps/supervisor-web/dist/assets/c-BIGW1oBm.js +1 -0
- package/apps/supervisor-web/dist/assets/{core-DODVy7wn.js → core-B0prQzhr.js} +1 -1
- package/apps/supervisor-web/dist/assets/cpp-DIPi6g--.js +1 -0
- package/apps/supervisor-web/dist/assets/csharp-DSvCPggb.js +1 -0
- package/apps/supervisor-web/dist/assets/go-C27-OAKa.js +1 -0
- package/apps/supervisor-web/dist/assets/index-DZI1aSXo.js +22 -0
- package/apps/supervisor-web/dist/assets/index-Dy8PgXgw.css +1 -0
- package/apps/supervisor-web/dist/assets/java-CylS5w8V.js +1 -0
- package/apps/supervisor-web/dist/assets/{markdown-vendor-RZk8L7-L.js → markdown-vendor-BG6PurxI.js} +33 -33
- package/apps/supervisor-web/dist/assets/ruby-B6AkvBWc.js +1 -0
- package/apps/supervisor-web/dist/assets/rust-B1yitclQ.js +1 -0
- package/apps/supervisor-web/dist/assets/{shellscript-CEILq0vU.js → shellscript-DfDnw5Jg.js} +1 -1
- package/apps/supervisor-web/dist/assets/thread-ui-gcslNXur.js +3968 -0
- package/apps/supervisor-web/dist/assets/xml-sdJ4AIDG.js +1 -0
- package/apps/supervisor-web/dist/index.html +4 -4
- package/bin/remote-codex.mjs +426 -35
- package/docs/windows-device-manager.zh.md +143 -0
- package/docs/windows-device-setup.zh.md +263 -0
- package/docs/windows-one-click-installer-research.zh.md +481 -0
- package/docs/windows.md +87 -0
- package/package.json +20 -4
- package/packages/acp/src/agent-catalog.test.ts +57 -0
- package/packages/acp/src/agent-catalog.ts +361 -0
- package/packages/acp/src/catalog-runtime.test.ts +99 -0
- package/packages/acp/src/catalog-runtime.ts +507 -0
- package/packages/acp/src/codex-environment.test.ts +58 -0
- package/packages/acp/src/codex-environment.ts +33 -0
- package/packages/acp/src/index.ts +5 -0
- package/packages/acp/src/item-mapper.test.ts +137 -0
- package/packages/acp/src/item-mapper.ts +473 -0
- package/packages/acp/src/runtimeAdapter.test.ts +79 -0
- package/packages/acp/src/runtimeAdapter.ts +1193 -0
- package/packages/acp/src/terminal-service.test.ts +31 -0
- package/packages/acp/src/terminal-service.ts +137 -0
- package/packages/agent-runtime/src/runtime-errors.ts +1 -0
- package/packages/agent-runtime/src/types.ts +8 -0
- package/packages/claude/src/runtimeAdapter.test.ts +2 -2
- package/packages/claude/src/runtimeAdapter.ts +10 -19
- package/packages/codex/src/appServerManager.test.ts +47 -0
- package/packages/codex/src/appServerManager.ts +6 -2
- package/packages/codex/src/runtimeAdapter.test.ts +9 -2
- package/packages/db/migrations/0030_thread_agent_id.sql +9 -0
- package/packages/db/src/repositories.ts +3 -0
- package/packages/db/src/schema.ts +1 -0
- package/packages/opencode/src/historyItems.ts +7 -6
- package/packages/opencode/src/runtimeAdapter.ts +7 -11
- package/packages/process-runtime/src/index.test.ts +132 -0
- package/packages/process-runtime/src/index.ts +253 -0
- package/packages/shared/src/agent-providers.ts +10 -1
- package/packages/shared/src/index.ts +36 -0
- package/scripts/service-manager.mjs +112 -4
- package/scripts/verify-relay-supervisor-smoke.mjs +262 -0
- package/scripts/windows/build-device-manager.ps1 +64 -0
- package/scripts/windows/install-relay-supervisor-task.ps1 +44 -0
- package/scripts/windows/relay-smoke.ps1 +16 -0
- package/scripts/windows/uninstall-relay-supervisor-task.ps1 +27 -0
- package/scripts/windows/validate-real-codex.mjs +680 -0
- package/apps/supervisor-web/dist/assets/index-BcCLYWAf.css +0 -1
- package/apps/supervisor-web/dist/assets/index-CO8cU7a0.js +0 -21
- package/apps/supervisor-web/dist/assets/thread-ui-Dmrigdek.js +0 -3714
package/README.md
CHANGED
|
@@ -25,6 +25,12 @@ home or office workstation through an inbound port.
|
|
|
25
25
|
- iOS IPA: [RemoteCodex.ipa](https://github.com/dufangshi/remoteCodex/releases/latest/download/RemoteCodex.ipa)
|
|
26
26
|
- npm CLI: `npm install -g remote-codex`
|
|
27
27
|
|
|
28
|
+
Native Windows Relay Supervisor support targets Windows 11 x64 with Node.js 22
|
|
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.
|
|
33
|
+
|
|
28
34
|
### Why Remote Codex
|
|
29
35
|
|
|
30
36
|
| Capability | What it means in practice |
|
|
@@ -66,7 +72,8 @@ client to load the latest transcript and continue from the current state.
|
|
|
66
72
|
approvals or structured questions remotely.
|
|
67
73
|
- Select agent backend, model, reasoning effort, collaboration mode, and
|
|
68
74
|
approval policy when starting work.
|
|
69
|
-
- Work with Codex, Claude, and
|
|
75
|
+
- Work with Codex, Claude, OpenCode, and any ACP-compatible agent through one
|
|
76
|
+
supervisor surface.
|
|
70
77
|
- Upload attachments and export transcripts as PDF or HTML.
|
|
71
78
|
|
|
72
79
|
#### Workspaces and files
|
|
@@ -195,8 +202,10 @@ REMOTE_CODEX_RELAY_SUPERVISOR_PORT=45679 \
|
|
|
195
202
|
remote-codex relay-supervisor
|
|
196
203
|
```
|
|
197
204
|
|
|
198
|
-
|
|
199
|
-
|
|
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.
|
|
200
209
|
|
|
201
210
|
By default, `remote-codex relay-supervisor` starts itself inside a detached
|
|
202
211
|
`tmux` session so closing the terminal does not take the device offline. Manage
|
|
@@ -230,6 +239,39 @@ use it only on a trusted LAN/VPN. Set `SERVICE_HOST=127.0.0.1` and
|
|
|
230
239
|
|
|
231
240
|
Override with `SERVICE_PORT` and `SERVICE_API_PORT`.
|
|
232
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
|
+
|
|
233
275
|
### Development
|
|
234
276
|
|
|
235
277
|
```bash
|
|
@@ -279,6 +321,11 @@ Remote Codex 支持本机、Tailscale/LAN 和公网 Relay 三种访问方式。R
|
|
|
279
321
|
- iOS IPA: [RemoteCodex.ipa](https://github.com/dufangshi/remoteCodex/releases/latest/download/RemoteCodex.ipa)
|
|
280
322
|
- npm CLI: `npm install -g remote-codex`
|
|
281
323
|
|
|
324
|
+
原生 Windows Relay Supervisor 首版支持 Windows 11 x64、Node.js 22 和 Codex;
|
|
325
|
+
自包含的 [Windows Device Manager](docs/windows-device-manager.zh.md) 可以探测并
|
|
326
|
+
补齐运行环境,通过系统托盘维持 Device 在线。Windows 暂不提供 Terminal 插件,
|
|
327
|
+
兼容范围见 [原生 Windows 支持说明](docs/windows.md)。
|
|
328
|
+
|
|
282
329
|
### 为什么使用 Remote Codex
|
|
283
330
|
|
|
284
331
|
| 能力 | 实际价值 |
|
|
@@ -316,7 +363,7 @@ flowchart LR
|
|
|
316
363
|
- 查看流式回答、reasoning 摘要、工具调用、运行状态、token 使用和完成状态。
|
|
317
364
|
- Agent 运行期间继续发送指令,并远程处理授权请求或结构化问题。
|
|
318
365
|
- 创建任务时选择 Agent backend、模型、reasoning effort、协作模式和授权策略。
|
|
319
|
-
- 在同一个 Supervisor 界面使用 Codex、Claude
|
|
366
|
+
- 在同一个 Supervisor 界面使用 Codex、Claude、OpenCode 和任意 ACP 兼容 Agent。
|
|
320
367
|
- 上传附件,并将 transcript 导出为 PDF 或 HTML。
|
|
321
368
|
|
|
322
369
|
#### Workspace 与文件
|
|
@@ -438,7 +485,9 @@ REMOTE_CODEX_RELAY_SUPERVISOR_PORT=45679 \
|
|
|
438
485
|
remote-codex relay-supervisor
|
|
439
486
|
```
|
|
440
487
|
|
|
441
|
-
|
|
488
|
+
复制命令默认在 macOS/Linux 使用 `45679`,在 Windows 使用 `45680`。两个端口互不
|
|
489
|
+
相同,因此 Windows 主机和 WSL 可以同时运行 supervisor,并且都能避开本机常见的
|
|
490
|
+
`8787` 端口冲突;需要时可以手动修改。
|
|
442
491
|
|
|
443
492
|
默认情况下,`remote-codex relay-supervisor` 会尝试启动到 detached `tmux`
|
|
444
493
|
session 里,这样关闭终端窗口不会让设备下线。可以用下面命令管理:
|
|
@@ -471,6 +520,36 @@ npm CLI 默认端口:
|
|
|
471
520
|
|
|
472
521
|
可用 `SERVICE_PORT` 和 `SERVICE_API_PORT` 覆盖。
|
|
473
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
|
+
|
|
474
553
|
### 开发
|
|
475
554
|
|
|
476
555
|
```bash
|
|
@@ -367,6 +367,9 @@ var RelayStore = class _RelayStore {
|
|
|
367
367
|
path.join(resolvedDataDir, "relay-store.json")
|
|
368
368
|
);
|
|
369
369
|
}
|
|
370
|
+
close() {
|
|
371
|
+
this.sqlite.close();
|
|
372
|
+
}
|
|
370
373
|
seedAdmin(input) {
|
|
371
374
|
const existing = this.getUsers().find((user2) => user2.role === "admin");
|
|
372
375
|
if (existing) {
|
|
@@ -3888,6 +3891,8 @@ var WEBVIEW_CORS_ALLOW_METHODS = [
|
|
|
3888
3891
|
"DELETE",
|
|
3889
3892
|
"OPTIONS"
|
|
3890
3893
|
].join(", ");
|
|
3894
|
+
var RELAY_HTTP_BODY_LIMIT_MB = 50;
|
|
3895
|
+
var RELAY_HTTP_BODY_LIMIT_BYTES = RELAY_HTTP_BODY_LIMIT_MB * 1024 * 1024;
|
|
3891
3896
|
var RELAY_REQUEST_HEADER_BLOCKLIST = /* @__PURE__ */ new Set([
|
|
3892
3897
|
"authorization",
|
|
3893
3898
|
"connection",
|
|
@@ -3941,7 +3946,10 @@ var RELAY_RESPONSE_HEADER_BLOCKLIST = /* @__PURE__ */ new Set([
|
|
|
3941
3946
|
"upgrade"
|
|
3942
3947
|
]);
|
|
3943
3948
|
function buildRelayServer(config2, options = {}) {
|
|
3944
|
-
const app2 = Fastify({
|
|
3949
|
+
const app2 = Fastify({
|
|
3950
|
+
logger: false,
|
|
3951
|
+
bodyLimit: RELAY_HTTP_BODY_LIMIT_BYTES
|
|
3952
|
+
});
|
|
3945
3953
|
app2.addContentTypeParser(
|
|
3946
3954
|
"*",
|
|
3947
3955
|
{ parseAs: "buffer" },
|
|
@@ -4884,6 +4892,7 @@ function buildRelayServer(config2, options = {}) {
|
|
|
4884
4892
|
app2.addHook("onClose", () => {
|
|
4885
4893
|
hostedSandboxService.close();
|
|
4886
4894
|
hostedSandboxReconciler.close();
|
|
4895
|
+
store.close();
|
|
4887
4896
|
});
|
|
4888
4897
|
app2.setErrorHandler((error, _request, reply) => {
|
|
4889
4898
|
if (error instanceof RelayStoreError) {
|
|
@@ -4893,6 +4902,13 @@ function buildRelayServer(config2, options = {}) {
|
|
|
4893
4902
|
});
|
|
4894
4903
|
return;
|
|
4895
4904
|
}
|
|
4905
|
+
if (isObject(error) && error.code === "FST_ERR_CTP_BODY_TOO_LARGE") {
|
|
4906
|
+
reply.status(413).send({
|
|
4907
|
+
code: "bad_request",
|
|
4908
|
+
message: `Relay uploads must be ${RELAY_HTTP_BODY_LIMIT_MB} MB or smaller.`
|
|
4909
|
+
});
|
|
4910
|
+
return;
|
|
4911
|
+
}
|
|
4896
4912
|
if (error instanceof z.ZodError) {
|
|
4897
4913
|
const firstIssue = error.issues[0];
|
|
4898
4914
|
const field = firstIssue?.path[0];
|
|
@@ -5853,7 +5869,7 @@ function isAllowedSharedRuntimeMetadataRequest(method, pathname) {
|
|
|
5853
5869
|
if (pathname === "/api/plugins") {
|
|
5854
5870
|
return true;
|
|
5855
5871
|
}
|
|
5856
|
-
return /^\/api\/agent-runtimes\/[^/]+\/(?:status|models|subscription-usage)$/.test(pathname);
|
|
5872
|
+
return /^\/api\/agent-runtimes\/[^/]+\/(?:status|models|agents|subscription-usage)$/.test(pathname);
|
|
5857
5873
|
}
|
|
5858
5874
|
function threadIdFromPath(pathValue) {
|
|
5859
5875
|
const pathname = new URL(pathValue, "http://relay.local").pathname;
|