homeagent-runner 0.4.18 → 0.4.19

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/docs/CLIENTS.md CHANGED
@@ -1,60 +1,62 @@
1
- # AI 客户端连接
1
+ # Connecting AI Clients
2
2
 
3
- 核对日期:2026-10-26。客户端界面和账户权限可能变化;本项目不提供模型服务,也不要求模型 API Key。
3
+ **English** · [简体中文](CLIENTS.zh-CN.md)
4
4
 
5
- v0.3 日常编码优先采用 [开发工作流](DEVELOPMENT_WORKFLOW.md):get_project_context → read_files/search_files → edit_files/apply_unified_diff → run_command/wait_process → git_commit_paths。原有工具继续可用。
5
+ Originally verified 2026-10-26. Client UIs and account permissions may change; this project provides no model service and requires no model API key.
6
6
 
7
- ## 共同前提
7
+ For day-to-day coding, prefer the current [Development Workflow](DEVELOPMENT_WORKFLOW.md): `list_devices` / `get_project_context` → `search_files` / `read_files` (plus the `lsp_*` tools for symbol navigation and diagnostics) → `edit_files` / `apply_unified_diff` (with bounded `fuzz` relocation) → `run_command` or `run_shell` with `wait_process` → `git_diff` → `git_commit_paths` → `save_project_note`. All original tools remain available.
8
8
 
9
- 先确保 Runner 配对且在线,客户端可以访问 `https://mcp.example.com/mcp`,TLS 证书有效。Server 同时支持 OAuth discovery + DCR + S256 PKCE 和 Dashboard 创建的 Bearer PAT,后者必须限制到具体设备,可以进一步限制项目和 scopes。
9
+ ## Common Prerequisites
10
10
 
11
- `/mcp` 使用无状态 Streamable HTTP,支持 MCP 2026-07-28 的 server/discover/每请求 envelope,并兼容 2025 客户端 initialize。官方 SDK 会处理协商、Accept、JSON/SSE 和协议头;原始请求不能把 SSE 响应直接当 JSON 解析。不要使用旧版 `/sse` URL。
11
+ Make sure the Runner is paired and online, the client can reach `https://mcp.example.com/mcp`, and the TLS certificate is valid. The Server supports both OAuth discovery + DCR + S256 PKCE and Bearer PATs created in the Dashboard; a PAT must be restricted to specific devices and may be further restricted to projects and scopes.
12
12
 
13
- ### 授权按钮无反应或提示 expired
13
+ `/mcp` uses stateless Streamable HTTP, supporting MCP 2026-07-28 server/discover with per-request envelopes, and compatible with 2025 client initialize. The official SDK handles negotiation, Accept, JSON/SSE and protocol headers; raw requests must not parse an SSE response as JSON. Do not use the legacy `/sse` URL.
14
14
 
15
- v0.3.0 的授权表单直接重定向到外部回调,Chrome 可能按 `form-action 'self'` 拦截该跳转;授权请求却已被消费,第二次点击便显示 `Authorization request expired`。**升级 Server 到 v0.3.1**:新版本先进入站内完成页,再返回已注册客户端,保留严格 CSP;按钮显示提交状态并防止重复提交。
15
+ ### Historical issue: unresponsive authorization button or "expired" prompt (fixed in v0.3.1)
16
16
 
17
- 升级后重启 Server,回到 AI 客户端重新发起 OAuth 授权,不要刷新或重复提交旧标签页。npm 部署升级 `homeagent-server` 包后重启对应服务;Runner 使用独立的 `homeagent-runner` 包,两者应升级到相同版本。Compose 部署检出 v0.4.11 后重新构建并启动,保留原 `.env` 和数据卷。Runner v0.3.0 不需要为 OAuth 回调修复升级;要使用 v0.4 的 Web 权限管理,则 Server 和 Runner 都应升级到 v0.4.11。
17
+ The following is kept as a historical troubleshooting record. In v0.3.0 the authorization form redirected directly to an external callback, which Chrome could block under `form-action 'self'`; the authorization request was already consumed, so a second click showed `Authorization request expired`. **The fix was to upgrade the Server to v0.3.1**: that version first shows an on-site completion page before returning to the registered client, retains strict CSP, and shows a submitting state on the button to prevent double submits.
18
18
 
19
- 若完成页没有自动返回,点击“继续返回客户端”。已使用或过期的授权码不会被重新签发;客户端仍未连接时,从客户端新建一次授权请求。设备凭据及已完成的客户端授权不因升级被主动清空。
19
+ After upgrading, restart the Server and start a fresh OAuth authorization from the AI client; do not refresh or re-submit the old tab. For npm deployments upgrade the `homeagent-server` package and restart the corresponding service; the Runner uses the separate `homeagent-runner` package and both should be upgraded to the same version. For Compose deployments check out `v0.4.19`, rebuild and start again, keeping the original `.env` and data volume. A Runner v0.3.0 did not need upgrading for the OAuth callback fix; to use v0.4 Web permission management, both Server and Runner should be on v0.4.19.
20
+
21
+ If the completion page does not return automatically, click "Continue back to client". A used or expired authorization code is never re-issued; if the client is still not connected, create a new authorization request from the client. Device credentials and completed client authorizations are not proactively cleared by an upgrade.
20
22
 
21
23
  ## ChatGPT
22
24
 
23
- 根据目前的 [OpenAI 官方连接文档](https://developers.openai.com/plugins/deploy/connect-chatgpt),在 **ChatGPT Plugins** 页面使用加号 → **Add custom MCP server**,填写名称与描述,选择公共 HTTPS 连接方式,URL 为 `https://mcp.example.com/mcp`,配置 OAuth 并完成风险确认。可用性受账户和 workspace 策略影响;若你的产品界面仍使用 Apps/Connectors 名称,请在该界面寻找对应的自定义 MCP 入口,并以实际账户提供的入口为准。
25
+ Following the current [OpenAI official connection guide](https://developers.openai.com/plugins/deploy/connect-chatgpt), on the **ChatGPT Plugins** page use the plus button → **Add custom MCP server**, fill in a name and description, choose the public HTTPS connection method, use `https://mcp.example.com/mcp` as the URL, configure OAuth and complete the risk confirmation. Availability depends on account and workspace policy; if your UI still uses the Apps/Connectors naming, look for the corresponding custom MCP entry there and follow what your account actually offers.
24
26
 
25
- OAuth 会打开 HomeAgent 登录页。确认:
27
+ OAuth opens the HomeAgent login page. Confirm:
26
28
 
27
- 1. 地址是自己的 Server。
28
- 2. 显示的客户端与 HTTPS/loopback 回调地址符合当前操作。
29
- 3. 勾选允许使用的已配对设备、该设备上的具体项目与权限。默认只勾选 read;写入需 write,终端需 execute,Git add/commit 需 git。新增项目不会自动进入这次授权,刷新令牌也不扩大范围。
30
- 4. 允许后回到 ChatGPT,刷新工具列表并在对话中启用该连接。
29
+ 1. The address is your own Server.
30
+ 2. The displayed client and HTTPS/loopback callback match the current operation.
31
+ 3. Select the paired devices, the specific projects on those devices and the permissions to allow. Only `read` is checked by default; writing needs `write`, the terminal needs `execute`, and Git add/commit needs `git`. Newly added projects do not join this authorization automatically, and refreshing a token does not widen the scope.
32
+ 4. After allowing, return to ChatGPT, refresh the tool list and enable the connection in the conversation.
31
33
 
32
- 自托管 Server 不依赖 OpenAI 的托管隧道。如果使用 ChatGPT,返回的文件内容、命令结果会进入你选择的 AI 服务;“自托管执行系统”并不等于“AI 服务无法看到工具结果”。完全离线时使用局域网可达的本地 MCP 客户端和本地模型。
34
+ A self-hosted Server does not depend on an OpenAI-hosted tunnel. If you use ChatGPT, returned file content and command results go to the AI service you chose; "self-hosted execution system" does not mean "the AI service cannot see tool results". For a fully offline setup use a LAN-reachable local MCP client and a local model.
33
35
 
34
- 这里提供的是协议与官方接入流程;仓库自动化测试使用 MCP SDK 客户端,不宣称已替你登录真实 ChatGPT 账户完成验收。
36
+ This is the protocol and official onboarding flow; the repository's automated tests use an MCP SDK client and do not claim to have signed into a real ChatGPT account for acceptance.
35
37
 
36
38
  ## Claude Code
37
39
 
38
- [Claude Code 官方 MCP 文档](https://code.claude.com/docs/en/mcp) 支持 HTTP 远程服务器和 OAuth:
40
+ The [Claude Code official MCP documentation](https://code.claude.com/docs/en/mcp) supports HTTP remote servers and OAuth:
39
41
 
40
42
  ```sh
41
43
  claude mcp add --transport http homeagent https://mcp.example.com/mcp
42
44
  ```
43
45
 
44
- 在 Claude Code 的 `/mcp` 中选择该服务并认证,浏览器完成 HomeAgent 授权。只需 read 时保持默认,写入/执行需在授权页面勾选相应权限。
46
+ In Claude Code's `/mcp`, select the service and authenticate, then complete HomeAgent authorization in the browser. Keep the default when only `read` is needed; check the corresponding permissions on the authorization page for write/execute.
45
47
 
46
- 若使用 PAT,可使用客户端支持的 `--header`:
48
+ If using a PAT, use the client's supported `--header`:
47
49
 
48
50
  ```sh
49
51
  claude mcp add --transport http homeagent https://mcp.example.com/mcp \
50
- --header "Authorization: Bearer <Dashboard 创建的令牌>"
52
+ --header "Authorization: Bearer <token-created-in-Dashboard>"
51
53
  ```
52
54
 
53
- 注意 shell 历史和客户端配置文件会保存命令中的静态令牌;生产更推荐 OAuth 或客户端自己的安全凭据管理。Claude 网页或 Desktop 的远程自定义连接器也应使用同一个 HTTPS `/mcp`,前提是账户提供远程自定义 MCP 功能;不用本地 stdio 配置冒充远程连接。
55
+ Note that shell history and the client config file will store the static token in the command; production is better served by OAuth or the client's own secure credential management. Claude web or Desktop remote custom connectors should also use the same HTTPS `/mcp`, provided the account offers remote custom MCP; do not impersonate a remote connection with a local stdio config.
54
56
 
55
57
  ## Cursor
56
58
 
57
- 按照 [Cursor 官方 MCP 文档](https://cursor.com/docs/context/mcp),在用户级 MCP 配置中添加:
59
+ Following the [Cursor official MCP documentation](https://cursor.com/docs/context/mcp), add this to the user-level MCP config:
58
60
 
59
61
  ```json
60
62
  {
@@ -66,7 +68,7 @@ claude mcp add --transport http homeagent https://mcp.example.com/mcp \
66
68
  }
67
69
  ```
68
70
 
69
- 支持 OAuth 的 Cursor 会通过元数据发起登录,完成设备与权限批准。若需要静态令牌:
71
+ A Cursor build that supports OAuth will start login from the metadata and complete device and permission approval. If a static token is needed:
70
72
 
71
73
  ```json
72
74
  {
@@ -74,57 +76,57 @@ claude mcp add --transport http homeagent https://mcp.example.com/mcp \
74
76
  "homeagent": {
75
77
  "url": "https://mcp.example.com/mcp",
76
78
  "headers": {
77
- "Authorization": "Bearer <Dashboard 创建的令牌>"
79
+ "Authorization": "Bearer <token-created-in-Dashboard>"
78
80
  }
79
81
  }
80
82
  }
81
83
  }
82
84
  ```
83
85
 
84
- 把实际令牌放在用户私有配置,不要提交到项目 `.cursor/mcp.json`。Cursor 当前文档列出的远程 OAuth 回调使用固定 HTTPS 地址,本项目 DCR 会记录实际请求的 redirect_uris 并在授权时展示,不要求手工添加回调覆盖。
86
+ Keep the real token in user-private config; do not commit it to a project's `.cursor/mcp.json`. Cursor's current documentation lists a fixed HTTPS remote OAuth callback; this project's DCR records the actually requested `redirect_uris` and displays them at authorization time, so no manual callback override is needed.
85
87
 
86
- ## 通用 MCP 客户端与调试
88
+ ## Generic MCP Clients and Debugging
87
89
 
88
90
  ```sh
89
91
  npx @modelcontextprotocol/inspector
90
92
  ```
91
93
 
92
- 在 Inspector 选择 Streamable HTTP,填写 `/mcp` URL,提供 Bearer Token 或完成 OAuth。先初始化、列出工具,再调用:
94
+ In the Inspector choose Streamable HTTP, enter the `/mcp` URL, and provide a Bearer Token or complete OAuth. Initialize first, list tools, then call:
93
95
 
94
96
  ```json
95
97
  {"name":"list_devices","arguments":{}}
96
98
  ```
97
99
 
98
- 取得允许的设备和项目后:
100
+ After obtaining the allowed devices and projects:
99
101
 
100
102
  ```json
101
103
  {
102
104
  "name": "read_file",
103
105
  "arguments": {
104
- "deviceId": "实际设备 UUID",
106
+ "deviceId": "actual-device-uuid",
105
107
  "projectId": "my-app",
106
108
  "path": "README.md"
107
109
  }
108
110
  }
109
111
  ```
110
112
 
111
- 长任务示例:
113
+ Long-job example:
112
114
 
113
115
  ```json
114
116
  {
115
117
  "name": "start_process",
116
118
  "arguments": {
117
- "deviceId": "实际设备 UUID",
119
+ "deviceId": "actual-device-uuid",
118
120
  "projectId": "my-app",
119
121
  "executable": "/usr/bin/node",
120
122
  "args": ["--test"],
121
123
  "cwd": ".",
122
124
  "timeoutMs": 3600000,
123
- "idempotencyKey": "为本次启动生成并保留的唯一键"
125
+ "idempotencyKey": "a-unique-key-generated-and-kept-for-this-launch"
124
126
  }
125
127
  }
126
128
  ```
127
129
 
128
- 读取输出时使用返回的 `id` 作为 `processId`,把下一次 `cursor` 设为前次 `nextCursor`。不能向另一个客户端主体查询该任务。OAuth 刷新仍使用同一主体,新的独立 PAT 则是另一个主体。
130
+ When reading output, use the returned `id` as `processId` and set the next `cursor` to the previous `nextCursor`. Another client principal cannot query that job. OAuth refresh keeps the same principal; a new independent PAT is a different principal.
129
131
 
130
- 如果工具调用超时或断线,写入/提交先读取文件或 Git 状态确认;进程启动可用相同 idempotencyKey 和完全相同参数重试,在 48 小时收据窗口内返回原任务而不再次启动。换 key、改参数、过期后的请求不在这个保证内。也可以在 Dashboard 查看保留的任务元数据并对在线的准确实例读取输出/停止。
132
+ If a tool call times out or disconnects, read the file or Git status first to confirm the result of a write/commit; a process launch can be retried with the same `idempotencyKey` and exactly identical arguments, returning the original job within the 48-hour receipt window without launching again. Changing the key, changing arguments, or requests after expiry are outside that guarantee. You can also inspect retained job metadata in the Dashboard and read output / stop a job on the exact online instance.
@@ -0,0 +1,132 @@
1
+ # AI 客户端连接
2
+
3
+ [English](CLIENTS.md) · **简体中文**
4
+
5
+ 原核对日期:2026-10-26。客户端界面和账户权限可能变化;本项目不提供模型服务,也不要求模型 API Key。
6
+
7
+ 日常编码优先采用当前 [开发工作流](DEVELOPMENT_WORKFLOW.zh-CN.md):`list_devices` / `get_project_context` → `search_files` / `read_files`(需要符号跳转或诊断时配合 `lsp_*` 工具)→ `edit_files` / `apply_unified_diff`(支持有界 `fuzz` 重定位)→ `run_command` 或 `run_shell` 配合 `wait_process` → `git_diff` → `git_commit_paths` → `save_project_note`。原有工具继续可用。
8
+
9
+ ## 共同前提
10
+
11
+ 先确保 Runner 配对且在线,客户端可以访问 `https://mcp.example.com/mcp`,TLS 证书有效。Server 同时支持 OAuth discovery + DCR + S256 PKCE 和 Dashboard 创建的 Bearer PAT,后者必须限制到具体设备,可以进一步限制项目和 scopes。
12
+
13
+ `/mcp` 使用无状态 Streamable HTTP,支持 MCP 2026-07-28 的 server/discover/每请求 envelope,并兼容 2025 客户端 initialize。官方 SDK 会处理协商、Accept、JSON/SSE 和协议头;原始请求不能把 SSE 响应直接当 JSON 解析。不要使用旧版 `/sse` URL。
14
+
15
+ ### 历史问题:授权按钮无反应或提示 expired(v0.3.1 已修复)
16
+
17
+ 以下保留为历史排错记录。v0.3.0 的授权表单直接重定向到外部回调,Chrome 可能按 `form-action 'self'` 拦截该跳转;授权请求却已被消费,第二次点击便显示 `Authorization request expired`。**修复方式是升级 Server 到 v0.3.1**:新版本先进入站内完成页,再返回已注册客户端,保留严格 CSP;按钮显示提交状态并防止重复提交。
18
+
19
+ 升级后重启 Server,回到 AI 客户端重新发起 OAuth 授权,不要刷新或重复提交旧标签页。npm 部署升级 `homeagent-server` 包后重启对应服务;Runner 使用独立的 `homeagent-runner` 包,两者应升级到相同版本。Compose 部署检出 `v0.4.19` 后重新构建并启动,保留原 `.env` 和数据卷。Runner v0.3.0 不需要为 OAuth 回调修复升级;要使用 v0.4 的 Web 权限管理,则 Server 和 Runner 都应升级到 v0.4.19。
20
+
21
+ 若完成页没有自动返回,点击"继续返回客户端"。已使用或过期的授权码不会被重新签发;客户端仍未连接时,从客户端新建一次授权请求。设备凭据及已完成的客户端授权不因升级被主动清空。
22
+
23
+ ## ChatGPT
24
+
25
+ 根据目前的 [OpenAI 官方连接文档](https://developers.openai.com/plugins/deploy/connect-chatgpt),在 **ChatGPT Plugins** 页面使用加号 → **Add custom MCP server**,填写名称与描述,选择公共 HTTPS 连接方式,URL 为 `https://mcp.example.com/mcp`,配置 OAuth 并完成风险确认。可用性受账户和 workspace 策略影响;若你的产品界面仍使用 Apps/Connectors 名称,请在该界面寻找对应的自定义 MCP 入口,并以实际账户提供的入口为准。
26
+
27
+ OAuth 会打开 HomeAgent 登录页。确认:
28
+
29
+ 1. 地址是自己的 Server。
30
+ 2. 显示的客户端与 HTTPS/loopback 回调地址符合当前操作。
31
+ 3. 勾选允许使用的已配对设备、该设备上的具体项目与权限。默认只勾选 read;写入需 write,终端需 execute,Git add/commit 需 git。新增项目不会自动进入这次授权,刷新令牌也不扩大范围。
32
+ 4. 允许后回到 ChatGPT,刷新工具列表并在对话中启用该连接。
33
+
34
+ 自托管 Server 不依赖 OpenAI 的托管隧道。如果使用 ChatGPT,返回的文件内容、命令结果会进入你选择的 AI 服务;"自托管执行系统"并不等于"AI 服务无法看到工具结果"。完全离线时使用局域网可达的本地 MCP 客户端和本地模型。
35
+
36
+ 这里提供的是协议与官方接入流程;仓库自动化测试使用 MCP SDK 客户端,不宣称已替你登录真实 ChatGPT 账户完成验收。
37
+
38
+ ## Claude Code
39
+
40
+ [Claude Code 官方 MCP 文档](https://code.claude.com/docs/en/mcp) 支持 HTTP 远程服务器和 OAuth:
41
+
42
+ ```sh
43
+ claude mcp add --transport http homeagent https://mcp.example.com/mcp
44
+ ```
45
+
46
+ 在 Claude Code 的 `/mcp` 中选择该服务并认证,浏览器完成 HomeAgent 授权。只需 read 时保持默认,写入/执行需在授权页面勾选相应权限。
47
+
48
+ 若使用 PAT,可使用客户端支持的 `--header`:
49
+
50
+ ```sh
51
+ claude mcp add --transport http homeagent https://mcp.example.com/mcp \
52
+ --header "Authorization: Bearer <Dashboard 创建的令牌>"
53
+ ```
54
+
55
+ 注意 shell 历史和客户端配置文件会保存命令中的静态令牌;生产更推荐 OAuth 或客户端自己的安全凭据管理。Claude 网页或 Desktop 的远程自定义连接器也应使用同一个 HTTPS `/mcp`,前提是账户提供远程自定义 MCP 功能;不用本地 stdio 配置冒充远程连接。
56
+
57
+ ## Cursor
58
+
59
+ 按照 [Cursor 官方 MCP 文档](https://cursor.com/docs/context/mcp),在用户级 MCP 配置中添加:
60
+
61
+ ```json
62
+ {
63
+ "mcpServers": {
64
+ "homeagent": {
65
+ "url": "https://mcp.example.com/mcp"
66
+ }
67
+ }
68
+ }
69
+ ```
70
+
71
+ 支持 OAuth 的 Cursor 会通过元数据发起登录,完成设备与权限批准。若需要静态令牌:
72
+
73
+ ```json
74
+ {
75
+ "mcpServers": {
76
+ "homeagent": {
77
+ "url": "https://mcp.example.com/mcp",
78
+ "headers": {
79
+ "Authorization": "Bearer <Dashboard 创建的令牌>"
80
+ }
81
+ }
82
+ }
83
+ }
84
+ ```
85
+
86
+ 把实际令牌放在用户私有配置,不要提交到项目 `.cursor/mcp.json`。Cursor 当前文档列出的远程 OAuth 回调使用固定 HTTPS 地址,本项目 DCR 会记录实际请求的 `redirect_uris` 并在授权时展示,不要求手工添加回调覆盖。
87
+
88
+ ## 通用 MCP 客户端与调试
89
+
90
+ ```sh
91
+ npx @modelcontextprotocol/inspector
92
+ ```
93
+
94
+ 在 Inspector 选择 Streamable HTTP,填写 `/mcp` URL,提供 Bearer Token 或完成 OAuth。先初始化、列出工具,再调用:
95
+
96
+ ```json
97
+ {"name":"list_devices","arguments":{}}
98
+ ```
99
+
100
+ 取得允许的设备和项目后:
101
+
102
+ ```json
103
+ {
104
+ "name": "read_file",
105
+ "arguments": {
106
+ "deviceId": "实际设备 UUID",
107
+ "projectId": "my-app",
108
+ "path": "README.md"
109
+ }
110
+ }
111
+ ```
112
+
113
+ 长任务示例:
114
+
115
+ ```json
116
+ {
117
+ "name": "start_process",
118
+ "arguments": {
119
+ "deviceId": "实际设备 UUID",
120
+ "projectId": "my-app",
121
+ "executable": "/usr/bin/node",
122
+ "args": ["--test"],
123
+ "cwd": ".",
124
+ "timeoutMs": 3600000,
125
+ "idempotencyKey": "为本次启动生成并保留的唯一键"
126
+ }
127
+ }
128
+ ```
129
+
130
+ 读取输出时使用返回的 `id` 作为 `processId`,把下一次 `cursor` 设为前次 `nextCursor`。不能向另一个客户端主体查询该任务。OAuth 刷新仍使用同一主体,新的独立 PAT 则是另一个主体。
131
+
132
+ 如果工具调用超时或断线,写入/提交先读取文件或 Git 状态确认;进程启动可用相同 `idempotencyKey` 和完全相同参数重试,在 48 小时收据窗口内返回原任务而不再次启动。换 key、改参数、过期后的请求不在这个保证内。也可以在 Dashboard 查看保留的任务元数据并对在线的准确实例读取输出/停止。
@@ -1,36 +1,38 @@
1
- # 参考项目对比
1
+ # Reference Project Comparison
2
2
 
3
- 核对日期:2026-10-26。比较基于公开源码,而非仅依据功能宣传。
3
+ **English** · [简体中文](COMPARISON.zh-CN.md)
4
4
 
5
- 本文件是架构概览。更完整的源码核查、逐工具映射、本轮发现并修复的缺口,以及仍未实现的全部领域,见 [WebCodex 源码对照审计](WEBCODEX_CODE_AUDIT.md) 与 [192 条声明清单](webcodex-source-inventory.json)。当前实现不具备 WebCodex 的全量产品能力。
5
+ Verified 2026-10-26. This comparison is based on public source code, not merely on feature claims.
6
6
 
7
- 用户给出的 `https://github.com/better-remote-commander` 不是具体仓库地址。本实现核对并参考的是 [shahidx0x/better-remote-commander](https://github.com/shahidx0x/better-remote-commander)。如实际指向其他项目,需要重新比较。
7
+ This file is an architectural overview. For the fuller source audit, the per-tool mapping, the gaps found and fixed this round, and all domains still unimplemented, see [Source Audit](WEBCODEX_CODE_AUDIT.md) and the [192-declaration inventory](webcodex-source-inventory.json). The current implementation does not have WebCodex's full product capabilities.
8
8
 
9
- | 参考项目 | 本次核对的 main 修订 | 主要来源 |
9
+ The `https://github.com/better-remote-commander` URL supplied by the user is not a specific repository address. What this implementation checked and referenced is [shahidx0x/better-remote-commander](https://github.com/shahidx0x/better-remote-commander). If the intended target is a different project, the comparison must be redone.
10
+
11
+ | Reference project | main revision verified this round | Primary sources |
10
12
  | --- | --- | --- |
11
- | WebCodex | `4ab06a5574792a86302dcd9a13bb4214ee09cc50` | [README](https://github.com/yyjeqhc/webcodex/blob/4ab06a5574792a86302dcd9a13bb4214ee09cc50/README.zh-CN.md)、[Runner 信封](https://github.com/yyjeqhc/webcodex/blob/4ab06a5574792a86302dcd9a13bb4214ee09cc50/crates/webcodex-core/src/runner_protocol/transport.rs)、[架构](https://github.com/yyjeqhc/webcodex/blob/4ab06a5574792a86302dcd9a13bb4214ee09cc50/docs/ARCHITECTURE.md) |
12
- | Better Remote Commander | `cbe511702dd0147650353c29ac6ab1decd8afda1` | [架构及阶段记录](https://github.com/shahidx0x/better-remote-commander/blob/cbe511702dd0147650353c29ac6ab1decd8afda1/docs/architecture.md)、[协议](https://github.com/shahidx0x/better-remote-commander/blob/cbe511702dd0147650353c29ac6ab1decd8afda1/packages/shared/src/protocol.ts)、[安全说明](https://github.com/shahidx0x/better-remote-commander/blob/cbe511702dd0147650353c29ac6ab1decd8afda1/SECURITY.md) |
13
+ | WebCodex | `4ab06a5574792a86302dcd9a13bb4214ee09cc50` | [README](https://github.com/yyjeqhc/webcodex/blob/4ab06a5574792a86302dcd9a13bb4214ee09cc50/README.zh-CN.md), [Runner envelope](https://github.com/yyjeqhc/webcodex/blob/4ab06a5574792a86302dcd9a13bb4214ee09cc50/crates/webcodex-core/src/runner_protocol/transport.rs), [architecture](https://github.com/yyjeqhc/webcodex/blob/4ab06a5574792a86302dcd9a13bb4214ee09cc50/docs/ARCHITECTURE.md) |
14
+ | Better Remote Commander | `cbe511702dd0147650353c29ac6ab1decd8afda1` | [architecture and phase notes](https://github.com/shahidx0x/better-remote-commander/blob/cbe511702dd0147650353c29ac6ab1decd8afda1/docs/architecture.md), [protocol](https://github.com/shahidx0x/better-remote-commander/blob/cbe511702dd0147650353c29ac6ab1decd8afda1/packages/shared/src/protocol.ts), [security notes](https://github.com/shahidx0x/better-remote-commander/blob/cbe511702dd0147650353c29ac6ab1decd8afda1/SECURITY.md) |
13
15
 
14
- ## 架构与协议
16
+ ## Architecture and Protocol
15
17
 
16
- | 维度 | WebCodex | Better Remote Commander | HomeAgent 的选择 |
18
+ | Dimension | WebCodex | Better Remote Commander | HomeAgent's choice |
17
19
  | --- | --- | --- | --- |
18
- | 组织方式 | Rust 多 crate 的完整运行时,包含 Desktop、CLI、Server、Runner、注册表等 | TypeScript 的 relay/agent/shared,工具核心移植自 Desktop Commander | TypeScript 的 server/runner/shared,独立工具实现,降低构建成本 |
19
- | 客户端入口 | Server 认证并路由到真实开发环境,含丰富运行时工作流 | `/mcp` Streamable HTTP,OAuth discovery、DCR、PKCE | 官方 MCP SDK,固定 `/mcp`,OAuth 和具范围的 PAT |
20
- | Runner 通道 | 传输中立的注册、请求、结果、job_update 等信封;源码还定义 QUIC 帧 | 主动 WS,hello/call/result/ping/pong | 主动 WSS,版本化 hello/call/result/cancel,WS ping/pong |
21
- | 项目边界 | 项目、能力授权、任务生命周期体系更丰富 | 设备路由 + allowedDirectories + blockedCommands | 每项目独立 root/readOnly/commands/Git 写入开关,本地再次验证 |
22
- | 长任务 | Job、持久 shell、观察与会话接续等完整模型 | start_process、读取输出、进程管理 | 持久进程元数据、限额输出文件、游标读取、stdin、整组终止、归属校验 |
23
- | 运维形态 | 更全面,但组件、构建与原生安装验收更复杂 | SQLite、Compose、Dashboard、反代/隧道、自启动 | SQLite 单节点、Compose、原生 Runner、Caddy/Nginx、可选隧道 |
24
- | 工具覆盖 | 强调真实项目开发流程与可审查工作结果 | Desktop Commander 的文件、搜索、编辑、终端能力更广,还含非核心文档功能 | 直接使用实用工具名,覆盖本需求文件/终端/Git,不引入 PDF/浏览器下载依赖 |
20
+ | Organization | A full Rust multi-crate runtime including Desktop, CLI, Server, Runner, and registry | TypeScript relay/agent/shared, with the tool core ported from Desktop Commander | TypeScript server/runner/shared with an independent tool implementation, lowering build cost |
21
+ | Client entry point | Server authenticates and routes to a real dev environment, with rich runtime workflows | `/mcp` Streamable HTTP, OAuth discovery, DCR, PKCE | Official MCP SDK, fixed `/mcp`, OAuth and scoped PAT |
22
+ | Runner channel | Transport-neutral registration/request/result/job_update envelopes; the source also defines QUIC frames | Proactive WS, hello/call/result/ping/pong | Proactive WSS, versioned hello/call/result/cancel, WS ping/pong |
23
+ | Project boundary | A richer system of projects, capability grants, and job lifecycle | Device routing + allowedDirectories + blockedCommands | Per-project independent root/readOnly/commands/Git write switch, re-validated locally |
24
+ | Long jobs | A fuller model of jobs, persistent shells, observation, and session resumption | start_process, output reads, process management | Persistent process metadata, bounded output files, cursor reads, stdin, whole-group termination, ownership checks |
25
+ | Operations footprint | More comprehensive, but with more complex components, builds, and native-install acceptance | SQLite, Compose, Dashboard, reverse proxy/tunnel, autostart | Single-node SQLite, Compose, native Runner, Caddy/Nginx, optional tunnel |
26
+ | Tool coverage | Emphasizes real project development workflows and reviewable work results | Desktop Commander's broader file, search, edit, terminal capabilities, plus non-core document features | Uses pragmatic tool names directly, covering the file/terminal/Git needs of this project; now 45 tools including fuzzy diffs, persistent shell sessions, and lightweight LSP, but still not full parity — no PDF/browser-download dependencies are introduced |
25
27
 
26
- WebCodex 的优势是开发任务的上下文、生命周期和项目治理比较完整,适合持续运行与审查。代价是系统规模更大,原生构建和平台安装面更广;其 README 本身也明确区分安装交付目标与尚待完成的真实平台验收,不能把计划能力当作已验证能力。HomeAgent 吸收项目边界、Runner 主动连接、长任务观察、多设备与审计,但不重建它的 Desktop、工作流会话和 QUIC 栈。
28
+ WebCodex's strengths are fairly complete context, lifecycle, and project governance for development tasks, suited to sustained running and review. The cost is a larger system with a wider native-build and platform-install surface; its README itself explicitly distinguishes install-delivery targets from real platform acceptance still to be done, so planned capabilities must not be treated as verified ones. HomeAgent absorbs project boundaries, proactive Runner connection, long-job observation, multi-device support, and auditing, but does not rebuild its Desktop, workflow sessions, or QUIC stack.
27
29
 
28
- BRC 的优势是轻量、工具实用,OAuth、配对和 Dashboard 与远程 MCP 的常见接入需求贴合。代价是移植工具核心的依赖与维护负担;它的阶段记录提到 PDF 工具存在首次使用下载 Chrome 的行为。它使用目录限制与命令阻止表,这种策略不能自动隔离可执行的解释器和构建脚本。HomeAgent 采用默认空的可执行文件允许列表,不提供远程修改本机策略的工具。
30
+ BRC's strengths are being lightweight with practical tools; its OAuth, pairing, and Dashboard fit the common integration needs of remote MCP. The cost is the dependency and maintenance burden of a ported tool core; its phase notes mention that PDF tools download Chrome on first use. It uses directory restrictions and a command-block table, a policy that cannot automatically isolate executable interpreters and build scripts. HomeAgent uses a default-empty executable allowlist and offers no tool for remotely changing local policy.
29
31
 
30
- ## 安全结论与兼容边界
32
+ ## Security Conclusions and Compatibility Boundaries
31
33
 
32
- 两种项目都把 Runner/Agent 作为执行实际系统操作的信任主体。主动连出解决 NAT 和入站暴露问题,不会减少一个获准执行命令的 AI 客户端本身拥有的操作权限。
34
+ Both projects treat the Runner/Agent as the trusted principal that performs real system operations. Proactive outbound connection solves NAT and inbound-exposure problems; it does not reduce the operating privileges that an AI client authorized to run commands already has on its own.
33
35
 
34
- HomeAgent 的 Server 协议是标准 MCP;Runner 信封是项目自己的内部协议,不与 WebCodex 或 BRC 的 Runner 二进制互通。工具命名参考 Desktop Commander 常用语义,参数刻意增加 `projectId`、权限与进程归属,也不宣称与其全部工具逐参数兼容。
36
+ HomeAgent's Server protocol is standard MCP; the Runner envelope is this project's own internal protocol and is not binary-interoperable with WebCodex's or BRC's Runner. Tool naming follows common Desktop Commander semantics, with `projectId`, permissions, and process ownership deliberately added to parameters, and no claim of full per-parameter compatibility with all of its tools.
35
37
 
36
- 本项目仅借鉴架构与行为设计,代码独立编写。没有将第三方遥测、云中继或托管配对服务引入运行链路。
38
+ This project borrows only architecture and behavioral design; the code is written independently. No third-party telemetry, cloud relay, or hosted pairing service has been introduced into the runtime pipeline.
@@ -0,0 +1,38 @@
1
+ # 参考项目对比
2
+
3
+ [English](COMPARISON.md) · **简体中文**
4
+
5
+ 核对日期:2026-10-26。比较基于公开源码,而非仅依据功能宣传。
6
+
7
+ 本文件是架构概览。更完整的源码核查、逐工具映射、本轮发现并修复的缺口,以及仍未实现的全部领域,见 [WebCodex 源码对照审计](WEBCODEX_CODE_AUDIT.zh-CN.md) 与 [192 条声明清单](webcodex-source-inventory.json)。当前实现不具备 WebCodex 的全量产品能力。
8
+
9
+ 用户给出的 `https://github.com/better-remote-commander` 不是具体仓库地址。本实现核对并参考的是 [shahidx0x/better-remote-commander](https://github.com/shahidx0x/better-remote-commander)。如实际指向其他项目,需要重新比较。
10
+
11
+ | 参考项目 | 本次核对的 main 修订 | 主要来源 |
12
+ | --- | --- | --- |
13
+ | WebCodex | `4ab06a5574792a86302dcd9a13bb4214ee09cc50` | [README](https://github.com/yyjeqhc/webcodex/blob/4ab06a5574792a86302dcd9a13bb4214ee09cc50/README.zh-CN.md)、[Runner 信封](https://github.com/yyjeqhc/webcodex/blob/4ab06a5574792a86302dcd9a13bb4214ee09cc50/crates/webcodex-core/src/runner_protocol/transport.rs)、[架构](https://github.com/yyjeqhc/webcodex/blob/4ab06a5574792a86302dcd9a13bb4214ee09cc50/docs/ARCHITECTURE.md) |
14
+ | Better Remote Commander | `cbe511702dd0147650353c29ac6ab1decd8afda1` | [架构及阶段记录](https://github.com/shahidx0x/better-remote-commander/blob/cbe511702dd0147650353c29ac6ab1decd8afda1/docs/architecture.md)、[协议](https://github.com/shahidx0x/better-remote-commander/blob/cbe511702dd0147650353c29ac6ab1decd8afda1/packages/shared/src/protocol.ts)、[安全说明](https://github.com/shahidx0x/better-remote-commander/blob/cbe511702dd0147650353c29ac6ab1decd8afda1/SECURITY.md) |
15
+
16
+ ## 架构与协议
17
+
18
+ | 维度 | WebCodex | Better Remote Commander | HomeAgent 的选择 |
19
+ | --- | --- | --- | --- |
20
+ | 组织方式 | Rust 多 crate 的完整运行时,包含 Desktop、CLI、Server、Runner、注册表等 | TypeScript 的 relay/agent/shared,工具核心移植自 Desktop Commander | TypeScript 的 server/runner/shared,独立工具实现,降低构建成本 |
21
+ | 客户端入口 | Server 认证并路由到真实开发环境,含丰富运行时工作流 | `/mcp` Streamable HTTP,OAuth discovery、DCR、PKCE | 官方 MCP SDK,固定 `/mcp`,OAuth 和具范围的 PAT |
22
+ | Runner 通道 | 传输中立的注册、请求、结果、job_update 等信封;源码还定义 QUIC 帧 | 主动 WS,hello/call/result/ping/pong | 主动 WSS,版本化 hello/call/result/cancel,WS ping/pong |
23
+ | 项目边界 | 项目、能力授权、任务生命周期体系更丰富 | 设备路由 + allowedDirectories + blockedCommands | 每项目独立 root/readOnly/commands/Git 写入开关,本地再次验证 |
24
+ | 长任务 | Job、持久 shell、观察与会话接续等完整模型 | start_process、读取输出、进程管理 | 持久进程元数据、限额输出文件、游标读取、stdin、整组终止、归属校验 |
25
+ | 运维形态 | 更全面,但组件、构建与原生安装验收更复杂 | SQLite、Compose、Dashboard、反代/隧道、自启动 | SQLite 单节点、Compose、原生 Runner、Caddy/Nginx、可选隧道 |
26
+ | 工具覆盖 | 强调真实项目开发流程与可审查工作结果 | Desktop Commander 的文件、搜索、编辑、终端能力更广,还含非核心文档功能 | 直接使用实用工具名,覆盖本需求文件/终端/Git;当前共 45 个工具,含模糊 diff、持久 Shell 会话与轻量 LSP,但仍非全量对等——不引入 PDF/浏览器下载依赖 |
27
+
28
+ WebCodex 的优势是开发任务的上下文、生命周期和项目治理比较完整,适合持续运行与审查。代价是系统规模更大,原生构建和平台安装面更广;其 README 本身也明确区分安装交付目标与尚待完成的真实平台验收,不能把计划能力当作已验证能力。HomeAgent 吸收项目边界、Runner 主动连接、长任务观察、多设备与审计,但不重建它的 Desktop、工作流会话和 QUIC 栈。
29
+
30
+ BRC 的优势是轻量、工具实用,OAuth、配对和 Dashboard 与远程 MCP 的常见接入需求贴合。代价是移植工具核心的依赖与维护负担;它的阶段记录提到 PDF 工具存在首次使用下载 Chrome 的行为。它使用目录限制与命令阻止表,这种策略不能自动隔离可执行的解释器和构建脚本。HomeAgent 采用默认空的可执行文件允许列表,不提供远程修改本机策略的工具。
31
+
32
+ ## 安全结论与兼容边界
33
+
34
+ 两种项目都把 Runner/Agent 作为执行实际系统操作的信任主体。主动连出解决 NAT 和入站暴露问题,不会减少一个获准执行命令的 AI 客户端本身拥有的操作权限。
35
+
36
+ HomeAgent 的 Server 协议是标准 MCP;Runner 信封是项目自己的内部协议,不与 WebCodex 或 BRC 的 Runner 二进制互通。工具命名参考 Desktop Commander 常用语义,参数刻意增加 `projectId`、权限与进程归属,也不宣称与其全部工具逐参数兼容。
37
+
38
+ 本项目仅借鉴架构与行为设计,代码独立编写。没有将第三方遥测、云中继或托管配对服务引入运行链路。