@logicseek/hello-cc 1.0.2-dsh.3 → 1.1.0-rc.1

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 (77) hide show
  1. package/CHANGELOG.md +121 -0
  2. package/README.md +10 -1
  3. package/README.zh-CN.md +8 -1
  4. package/docs/commands.md +28 -4
  5. package/docs/commands.zh-CN.md +20 -4
  6. package/docs/native.md +84 -10
  7. package/docs/native.zh-CN.md +66 -5
  8. package/docs/web-handoff.zh-CN.md +11 -3
  9. package/lib/cli/app.mjs +42 -1
  10. package/lib/cli/commands/coordination.mjs +7 -2
  11. package/lib/cli/commands/dsh.mjs +1 -1
  12. package/lib/cli/commands/gc.mjs +9 -4
  13. package/lib/cli/commands/hook.mjs +6 -1
  14. package/lib/cli/commands/install.mjs +48 -6
  15. package/lib/cli/commands/lifecycle.mjs +14 -3
  16. package/lib/cli/commands/native.mjs +16 -9
  17. package/lib/cli/commands/query.mjs +15 -10
  18. package/lib/cli/commands/run.mjs +7 -6
  19. package/lib/core/coordination/results.mjs +27 -10
  20. package/lib/db/connection.mjs +135 -10
  21. package/lib/db/schema.mjs +59 -0
  22. package/lib/discover.mjs +4 -4
  23. package/lib/guidance.mjs +3 -2
  24. package/lib/integrations/codex-interactions.mjs +13 -11
  25. package/lib/integrations/dsh-collaboration.mjs +6 -12
  26. package/lib/integrations/dsh-cordis.mjs +17 -13
  27. package/lib/integrations/dsh.mjs +12 -9
  28. package/lib/integrations/hooks.mjs +132 -40
  29. package/lib/integrations/mcp-elicitation.mjs +116 -0
  30. package/lib/integrations/mcp-url-elicitation.mjs +25 -0
  31. package/lib/integrations/native/interactions.mjs +2 -1
  32. package/lib/integrations/peers/identity.mjs +42 -7
  33. package/lib/process/identity.mjs +15 -14
  34. package/lib/runtime/buffer-evidence.mjs +2 -1
  35. package/lib/runtime/native/service.mjs +11 -5
  36. package/lib/runtime/native/store.mjs +70 -18
  37. package/lib/runtime/paths.mjs +17 -2
  38. package/lib/runtime/private-file.mjs +76 -0
  39. package/lib/runtime/private-state.mjs +546 -0
  40. package/lib/runtime/project-context.mjs +2 -1
  41. package/lib/runtime/project-path.mjs +148 -12
  42. package/lib/runtime/project-trust.mjs +79 -0
  43. package/lib/runtime/projects.mjs +6 -3
  44. package/lib/runtime/state-migration.mjs +697 -0
  45. package/lib/runtime/state.mjs +22 -11
  46. package/lib/shared/automatic-result-key.mjs +6 -0
  47. package/lib/shared/json-file.mjs +55 -6
  48. package/lib/ui/help.mjs +6 -4
  49. package/lib/web/codex-app-server.mjs +26 -5
  50. package/lib/web/codex-sessions.mjs +5 -3
  51. package/lib/web/cookie-auth.mjs +1 -1
  52. package/lib/web/external-sessions.mjs +54 -5
  53. package/lib/web/http-routes.mjs +13 -9
  54. package/lib/web/http.mjs +20 -2
  55. package/lib/web/native-sessions.mjs +14 -7
  56. package/lib/web/peer-actions.mjs +27 -27
  57. package/lib/web/project-contexts.mjs +2 -3
  58. package/lib/web/runtime-main.mjs +22 -5
  59. package/lib/web/runtime.mjs +18 -4
  60. package/lib/web/session-serialize.mjs +1 -1
  61. package/lib/web/startup.mjs +115 -22
  62. package/lib/web/task-results.mjs +20 -17
  63. package/lib/web/terminal-assets.mjs +18 -0
  64. package/lib/web/tls.mjs +84 -33
  65. package/lib/web/tmux-sessions.mjs +2 -2
  66. package/lib/web/tmux-stream.mjs +3 -4
  67. package/lib/web/ui-codex.mjs +161 -32
  68. package/lib/web/ui-interactions.mjs +137 -4
  69. package/lib/web/ui-native.mjs +31 -13
  70. package/lib/web/ui-template.mjs +10 -3
  71. package/package.json +1 -1
  72. package/scripts/mcp-form-live-fixture.mjs +81 -0
  73. package/scripts/native-installed-acceptance.mjs +413 -0
  74. package/scripts/regression.mjs +46 -29
  75. package/scripts/web-mcp-form-acceptance.mjs +119 -0
  76. package/scripts/web-mcp-form-live-acceptance.mjs +368 -0
  77. package/scripts/web-native-interaction-acceptance.mjs +77 -10
package/CHANGELOG.md CHANGED
@@ -16,6 +16,127 @@ the release description from the current changelog section. Use
16
16
  `npm run release:github` with `GH_TOKEN` or `GITHUB_TOKEN` only for local
17
17
  backfills.
18
18
 
19
+ ## 1.1.0-rc.1
20
+
21
+ ### Summary
22
+
23
+ hello-cc 1.1.0-rc.1 brings project and session navigation, structured
24
+ conversations, recoverable split panes, and bounded rendering to the Web
25
+ workbench. It also brings HCC-owned Codex, Claude and DeepSeek Harness workers
26
+ into the same task, message, handoff and result-review workflow, with explicit
27
+ permissions and delivery receipts. This release is intended for the npm
28
+ `preview` dist-tag and a GitHub prerelease.
29
+
30
+ ### Highlights
31
+
32
+ - Switch between English, Chinese or the system language; choose system,
33
+ light or dark interface and terminal themes, comfortable or compact spacing,
34
+ terminal font size and focus mode. Settings apply without replacing active
35
+ terminal connections or discarding drafts, and remain reachable on mobile.
36
+ - Search sessions by name, task, provider, path or command; combine keywords
37
+ and provider/activity filters. Project changes clear old session state
38
+ immediately and ignore delayed responses from the previous project.
39
+ - Read Codex conversations by turn with focused user, assistant, command,
40
+ file-change and status cards. Preserve reading position, drafts, expanded
41
+ details and keyboard focus during updates. Keep approvals visible
42
+ independently of the conversation page.
43
+ - Use the keyboard command palette for project, session and workbench
44
+ navigation. Search the current terminal scrollback locally with match counts,
45
+ previous/next navigation, case sensitivity and whole-word matching. The search
46
+ addon is served locally.
47
+ - Restore a project-specific two-pane workspace with horizontal or vertical
48
+ layout, adjustable proportions and a saved secondary session. Each pane
49
+ retains its own connection and draft; viewing the same session twice leaves
50
+ the secondary pane read-only until an explicit control handoff.
51
+ - Page long Codex timelines and large output segments while keeping all
52
+ retained content accessible. Copy the complete original text, including
53
+ content outside the visible segment. Preserve Unicode characters, scroll
54
+ anchors, tool expansion and drafts across streaming updates.
55
+ - Coalesce Codex text-delta notifications within a bounded 50 ms window while
56
+ updating internal state immediately. Approvals, completion, errors and
57
+ connection changes publish promptly. Unchanged native snapshots avoid
58
+ redundant broadcasts without skipping ownership checks.
59
+ - Manage owned native workers through `hcc native`: Codex App Server, the
60
+ optional Claude Agent SDK and DeepSeek Harness ACP share HCC coordination
61
+ while retaining their provider-specific lifecycle and session identity. Web
62
+ can discover and control an existing native worker without creating a second
63
+ provider process.
64
+ - Distinguish queued, submitted, provider-accepted, completed, failed and
65
+ uncertain delivery states. Uncertain submissions are not automatically
66
+ replayed; runtime restarts preserve the uncertainty needed to avoid duplicate
67
+ work.
68
+ - Handle supported Codex permission requests, questions and common MCP form
69
+ fields from Web or the local CLI. Claude responses approve the original tool
70
+ input once, and ACP approval selects a provider-offered one-time option.
71
+ Responses remain bound to the current worker, session, turn, request and
72
+ controller.
73
+ - Give hosted executors a temporary MCP capability scoped to the project,
74
+ database, peer and live runtime. Coordination tools support tasks, inbox,
75
+ messages, handoff, owned locks and local result records. Executor shutdown
76
+ revokes the capability without rewriting global provider configuration.
77
+ - Review local command results, explicitly submitted evidence and manual
78
+ acceptance records with separate local-validation, publication and
79
+ business-acceptance categories. A completed model turn or successful command
80
+ does not automatically complete an HCC task.
81
+ - Include DeepSeek Harness hooks, the Cordis bundle and owned ACP workers,
82
+ with identity-bound crash recovery and retryable cleanup after temporary
83
+ database failures.
84
+ - Use macOS `kern.bootsessionuuid` for the boot component of process identity
85
+ instead of wall-clock boot time. Clock adjustments no longer make the same
86
+ process appear replaced, while a different boot UUID still identifies a
87
+ reboot. Missing or malformed boot identity remains unknown.
88
+ - Publish private-state binding manifests atomically, reject legacy-state
89
+ takeover during interrupted initialization, and recheck the project identity
90
+ before reading, writing or clearing its runtime state. A reused directory
91
+ path does not silently inherit the previous project's private state.
92
+ - Validate existing SQLite files without opening and closing an additional
93
+ descriptor, preserving locks held by another SQLite connection in the same
94
+ process. File ownership, permissions, identity and sidecar checks remain in
95
+ place.
96
+
97
+ ### Compatibility Notes
98
+
99
+ - Projects under shared or writable ancestors use per-user private state.
100
+ Existing legacy state in those projects requires an explicit offline
101
+ `migrate-state --offline --yes` after stopping all writers; it is not silently
102
+ copied or discarded. Back up both the private store and its authority marker
103
+ before manual recovery of a replaced project directory.
104
+ - Node.js 24 or newer is required. Linux and macOS are supported host
105
+ environments; Windows users use WSL. Native Windows shells are outside the
106
+ supported host contract.
107
+ - Browser-controllable terminals require tmux where documented. `node-pty`
108
+ remains pinned to `1.2.0-beta.15`; the terminal search addon is pinned to
109
+ `0.16.0`.
110
+ - Native workers require an installed and authenticated provider. Claude's
111
+ Agent SDK remains optional and is loaded when a Claude worker starts; HCC
112
+ does not install it automatically. DeepSeek Harness integration targets
113
+ `0.2.0-rc.2`.
114
+ - Closing a browser page does not stop a hosted executor. An independent
115
+ native runtime also survives Web-runtime shutdown; explicitly closing its
116
+ worker terminates that worker. Web-owned App Server executors remain owned
117
+ by their Web runtime.
118
+ - Saved-session resume creates a newly owned provider connection and requires
119
+ the prior owner to be confirmed stopped. It does not migrate an arbitrary
120
+ live TUI or desktop process, and uncertain owners remain protected.
121
+ - Existing schema v7, Runtime API v2 and provider authentication boundaries
122
+ continue to apply. Browser control handoff never approves a provider operation
123
+ by itself. Persisted macOS identities using the older boot-token format remain
124
+ unknown across the format transition, rather than being treated as confirmed
125
+ dead.
126
+
127
+ ### Validation
128
+
129
+ Feature-specific records cover controlled browser interactions, real PTY/tmux
130
+ behavior, provider protocols and selected authenticated model workflows. Each
131
+ record applies to its recorded inputs and scope. The final release record
132
+ identifies the frozen package, platform installations and checks that apply to
133
+ this combined candidate; performance samples are controlled observations, not
134
+ production capacity or long-term memory guarantees.
135
+
136
+ Publication readback, registry installation, employee-device acceptance and
137
+ genuine business acceptance remain distinct evidence categories. No result in
138
+ one category automatically establishes another.
139
+
19
140
  ## 1.0.2-dsh.3
20
141
 
21
142
  ### Summary
package/README.md CHANGED
@@ -43,11 +43,20 @@ grace. `hcc gc` retains history unless `--history` is explicit. `--tls` encrypts
43
43
  the console; `--trust-proxy` requires a fixed `--proxy-origin`. Two risks remain
44
44
  intentional: the default listener is plaintext HTTP on `0.0.0.0` for trusted
45
45
  LANs, and an authenticated browser may select any existing server directory.
46
+ Managed `.hello-cc` state is private to the current OS user. Keep project roots
47
+ behind cross-user-stable paths for project-local storage. For a root that
48
+ another OS user could replace, hello-cc stores managed state under
49
+ `~/.hello-cc/projects/<root-hash>/` instead. An existing project-local state
50
+ must be migrated explicitly while every old writer is stopped:
51
+ `hcc --root DIR migrate-state --offline --yes`. Migration keeps the original
52
+ directory for recovery. If you set `--db` or `HCC_DB` outside managed state,
53
+ secure that database and its parent directory yourself.
46
54
 
47
55
  ## Highlights
48
56
 
49
57
  - **Shared project memory**: peers, tasks, messages, locks, handoffs, and
50
- events are stored in `<project>/.hello-cc/mesh.db`.
58
+ events are stored in a private managed `mesh.db` (project-local for stable
59
+ roots, otherwise under the current user's home directory).
51
60
  - **Real terminal control**: Web attaches to the same local tmux pane as your
52
61
  terminal, not a separate browser-only shell.
53
62
  - **Claude/Codex awareness**: hooks inject live `hcc` state before model turns,
package/README.zh-CN.md CHANGED
@@ -37,10 +37,17 @@ unknown 证据获得最长 120 秒宽限。`hcc gc` 默认保留历史,必须
37
37
  `--history`。`--tls` 提供传输加密;`--trust-proxy` 必须固定
38
38
  `--proxy-origin`。两项风险是有意保留的:默认在可信内网以明文 HTTP 监听
39
39
  `0.0.0.0`,且已认证浏览器可以选择服务器上任意已存在目录。
40
+ 默认的 `.hello-cc` 状态目录仅允许当前系统用户访问。不要把项目根目录放在
41
+ 不可信系统用户可写的位置;如果其他系统用户可替换项目路径,受管状态会改存于
42
+ `~/.hello-cc/projects/<项目根路径哈希>/`。已有项目本地状态不会自动丢弃或迁移:
43
+ 先停止所有旧进程及外部数据库写入者,再运行
44
+ `hcc --root 目录 migrate-state --offline --yes`;原目录保留供恢复。
45
+ 若通过 `--db` 或 `HCC_DB` 将数据库放在受管状态目录之外,请自行保护数据库及其
46
+ 父目录的权限。
40
47
 
41
48
  ## 特色
42
49
 
43
- - **项目本地共享状态**:peers、tasks、messages、locks、handoffs 和 events 写入 `<project>/.hello-cc/mesh.db`。
50
+ - **项目共享状态**:peers、tasks、messages、locks、handoffs 和 events 写入私有的 `mesh.db`;路径稳定时保留项目本地目录,否则存于当前用户的 home 目录。
44
51
  - **Web 控制真实终端**:浏览器 attach 到和本地终端相同的 tmux pane,不是浏览器里另开的临时 shell。
45
52
  - **Claude/Codex 感知项目状态**:hooks 会在模型回答前注入实时 `hcc` 状态。
46
53
  - **减少编辑冲突**:通过 advisory lock 和 handoff 显式协调多 agent 修改。
package/docs/commands.md CHANGED
@@ -14,12 +14,36 @@ authenticated access to any existing server directory are accepted risks.
14
14
 
15
15
  ```text
16
16
  hcc update [--tag TAG] [--registry URL] [--dry-run]
17
+ hcc --root DIR migrate-state --offline --yes
17
18
  hcc uninstall [--purge --yes]
18
19
  ```
19
20
 
20
- `hcc update` updates the global npm install. `hcc uninstall` removes local
21
- hooks, shims, and the shell PATH entry; add `--purge --yes` only when you also want to remove the
22
- current project's `.hello-cc` data and guidance blocks.
21
+ `hcc update` updates the global npm install. If another OS user can replace a
22
+ project path, managed state is kept in a private directory under the current
23
+ user's home. Existing project-local `.hello-cc` data requires an explicit
24
+ offline migration: stop all hello-cc and external writers first, then run
25
+ `migrate-state --offline --yes`. It copies SQLite snapshots (including WAL
26
+ contents) and other validated state, keeps the old directory untouched, and
27
+ rebuilds managed DSH path-bound configuration. Do not restart an old writer
28
+ against the retained directory. `hcc uninstall` removes local hooks, shims,
29
+ and the shell PATH entry; add `--purge --yes` only when you also want to remove
30
+ the selected current project's managed data and guidance blocks. A retained
31
+ legacy migration source is not deleted by purge.
32
+ Private-state creation and purge leave a durable authority marker so a retained
33
+ or newly written project-local database cannot silently become active again.
34
+ After purge, a remaining legacy directory still requires an explicit offline
35
+ `migrate-state --offline --yes`; if no legacy directory remains, a fresh `init`
36
+ creates new private state. If a private store disappears without an explicit
37
+ purge, restore it from backup or use `uninstall --purge --yes` to deliberately
38
+ discard the missing state before starting fresh.
39
+ An interrupted private purge stays marked `purging`; normal access fails closed.
40
+ After confirming old writers are stopped, repeat `uninstall --purge --yes` to
41
+ finish deleting that private store. If the project root is replaced by a new
42
+ directory at the same path, its inode no longer matches the old private binding.
43
+ The CLI intentionally refuses automatic purge or rebinding: preserve and back
44
+ up both the old private store and its `.authority.json` marker, stop all writers,
45
+ and have an operator compare the old and new root identities before a manual
46
+ recovery. Do not delete the marker alone or point the new root at the old data.
23
47
 
24
48
  ## Read-only Diagnostics
25
49
 
@@ -54,7 +78,7 @@ Use `--local` to bind only `127.0.0.1`, `--token` or `HCC_WEB_TOKEN` to set an
54
78
  explicit token, `HCC_RUNTIME_CA` to trust a private HTTPS Runtime API CA, and
55
79
  `--no-token` only in trusted local/test environments. Use `hcc up` only when you
56
80
  want coordination without the Web console or shims. Provider shims only join
57
- projects with a local `.hello-cc/runtime.json` from `hcc web`; they do not use a
81
+ projects with a managed `runtime.json` from `hcc web`; they do not use a
58
82
  global runtime to manage arbitrary directories.
59
83
 
60
84
  ## Native Workers
@@ -12,12 +12,28 @@ unknown 证据获得 120 秒宽限;历史清理必须显式使用 `gc --histor
12
12
 
13
13
  ```text
14
14
  hcc update [--tag TAG] [--registry URL] [--dry-run]
15
+ hcc --root 目录 migrate-state --offline --yes
15
16
  hcc uninstall [--purge --yes]
16
17
  ```
17
18
 
18
- `hcc update` 更新全局 npm 安装。`hcc uninstall` 移除本机 hooks、shims 和 shell PATH 配置;
19
- 只有在确定也要删除当前项目的 `.hello-cc` 数据和指导块时,才加
20
- `--purge --yes`。
19
+ `hcc update` 更新全局 npm 安装。如果其他系统用户可替换项目路径,受管状态会放在
20
+ 当前用户 home 下的私有目录。已有项目本地 `.hello-cc` 必须离线迁移:先停止
21
+ 所有 hello-cc 进程和外部写入者,再显式执行 `migrate-state --offline --yes`。
22
+ 迁移会复制包含 WAL 内容的 SQLite 快照和其他经检查的状态,保留原目录,
23
+ 并重建由 hello-cc 管理且绑定旧绝对路径的 DSH 配置。不要让旧版写入者继续写原目录。
24
+ `hcc uninstall` 移除本机 hooks、shims 和 shell PATH 配置;只有在确定也要删除
25
+ 当前项目选定的受管数据和指导块时,才加 `--purge --yes`。迁移后保留的旧目录
26
+ 不会被 purge 删除。
27
+ 新建或 purge 私有数据后仍保留持久的权威标记,防止保留或后来写入的项目本地数据库
28
+ 自动重新生效。purge 后若旧目录仍在,必须停止所有旧写入者并显式执行
29
+ `migrate-state --offline --yes`;若旧目录已不存在,可重新运行 `init` 创建新的私有
30
+ 状态。如果私有目录未经 purge 就丢失,请从备份恢复,或通过
31
+ `uninstall --purge --yes` 明确放弃已丢失的状态后重新初始化。
32
+ 私有状态的 purge 若中断,会保留 `purging` 标记并拒绝正常访问。确认旧写入者均已停止后,
33
+ 再次运行 `uninstall --purge --yes` 完成删除。若项目根目录在同一路径被新目录替换,
34
+ 新 inode 与旧私有绑定不符;CLI 会拒绝自动 purge 或重绑。请先保留并备份旧私有状态目录
35
+ 及其 `.authority.json` 标记,停止所有写入者,由管理员核对新旧根目录身份后再人工恢复。
36
+ 不要只删除标记,也不要让新根目录直接使用旧数据。
21
37
 
22
38
  ## 只读诊断
23
39
 
@@ -48,7 +64,7 @@ runtime 生成 URL token。用 `--local` 可只绑定 `127.0.0.1`,用 `--token
48
64
  `HCC_WEB_TOKEN` 可设置显式 token;私有 HTTPS Runtime API CA 用
49
65
  `HCC_RUNTIME_CA` 指定。只有在可信本地/测试环境才使用 `--no-token`。
50
66
  只想使用本地协作、不需要 Web 或 shims 时,再使用 `hcc up`。provider shim 只会加入
51
- 已经由 `hcc web` 生成本地 `.hello-cc/runtime.json` 的项目,不会使用全局 runtime
67
+ 已经由 `hcc web` 生成受管 `runtime.json` 的项目,不会使用全局 runtime
52
68
  去管理任意目录。
53
69
 
54
70
  ## Native 后台 worker
package/docs/native.md CHANGED
@@ -87,7 +87,7 @@ or dsh executable. Claude uses the SDK and rejects `--binary`.
87
87
  | `hcc native deliveries` | Optional `--peer NAME`; inspect delivery receipts |
88
88
  | `hcc native events` | Required `--peer NAME`; optional `--after ID`; inspect a bounded event history |
89
89
  | `hcc native requests` | Requires `--peer NAME`; inspect pending requests bound to this executor, session and turn |
90
- | `hcc native respond` | Requires `--peer NAME --request ID --decision accept\|decline\|cancel`; use `--response-file JSON` for permission subsets or answers |
90
+ | `hcc native respond` | Requires `--peer NAME --request ID --decision accept\|decline\|cancel`; use `--response-file JSON` for permission subsets, answers or MCP form content |
91
91
  | `hcc native interrupt` | Required `--peer NAME`; optional `--turn ID`; request interruption of the active turn |
92
92
  | `hcc native close` | Required `--peer NAME`; close that worker's owned connection/process |
93
93
  | `hcc native down` | Request worker closure and runtime shutdown; returns a stop-request receipt |
@@ -170,12 +170,18 @@ hosted responder retain conservative denial.
170
170
 
171
171
  | Provider | Hosted interaction |
172
172
  | --- | --- |
173
- | Codex | Command/file approval, requested filesystem/network permission subsets with explicit turn/session duration, questions including freeform/secret input, and one-call empty-form MCP tool approvals |
173
+ | Codex | Command/file approval, requested filesystem/network permission subsets with explicit turn/session duration, questions including freeform/secret input, one-call empty-form MCP tool approvals and common MCP form fields |
174
174
  | Claude | SDK tool permission callback; approval grants the original tool input once without rewriting it |
175
175
  | dsh ACP | Offered permission choices; approval selects only `allow_once`, never `allow_always` |
176
176
 
177
177
  rc.2 may send only a tool-call ID in an ACP approval request. The adapter correlates same-session/turn tool updates to show the operation input. Missing or truncated input still allows rejection; acceptance returns `NATIVE_APPROVAL_CONTEXT_MISSING`. See dsh installed acceptance (source checkout: `docs/verification/2026-10-02-dsh-cordis-native.md`).
178
178
 
179
+ Native approval cards show the tool, command or target path and a content
180
+ preview before the decision. Full operation details can be expanded and stay
181
+ expanded across state refreshes. ACP approval is disabled when operation input
182
+ or a one-time option is missing; rejection remains available. Shortened
183
+ previews are identified, with complete parameters still available.
184
+
179
185
  Hosted interactive Codex threads explicitly enable
180
186
  `features.default_mode_request_user_input` and `features.request_permissions_tool`
181
187
  in their private start/resume configuration. Web-owned start/resume/fork uses
@@ -209,12 +215,10 @@ hcc native respond --peer codex-reviewer --request REQUEST_ID --decision accept
209
215
  hcc native respond --peer codex-reviewer --request REQUEST_ID --decision cancel
210
216
  ```
211
217
 
212
- Only `permissions`, `scope` and `answers` are accepted in that file. Permissions
218
+ Only `permissions`, `scope`, `answers` and `content` are accepted in that file. For MCP forms, use the original field names and types, for example `{"content":{"project":"demo","count":2,"enabled":false}}`. Permissions
213
219
  can narrow the request but cannot add paths or network access; requested deny
214
220
  entries must be retained when granting filesystem access. Answer every question
215
- explicitly. Truncated requests can only be declined or cancelled. Arbitrary MCP
216
- forms, URL authentication, dynamic tools and account-token refresh requests are
217
- outside this responder's supported interaction set.
221
+ explicitly. Truncated requests can only be declined or cancelled. Nested schemas, dynamic tools and account-token refresh requests remain unsupported. Correlated MCP `url` requests are supported through the Web authorization entry described below.
218
222
 
219
223
  ## Current boundaries
220
224
 
@@ -234,7 +238,8 @@ outside this responder's supported interaction set.
234
238
  task's business acceptance.
235
239
  - Adapter tests cover protocol and interaction boundaries. The authenticated
236
240
  checks below provide separate evidence for model execution and scoped MCP;
237
- packaged-client installation and business acceptance remain unverified.
241
+ the installed-package harness below checks installation separately.
242
+ Stakeholder acceptance of a production workflow remains a separate step.
238
243
 
239
244
 
240
245
  ## Authenticated acceptance on October 2, 2026
@@ -255,8 +260,20 @@ survival after closing that bridge. These receipts are separate source snapshots
255
260
 
256
261
  Codex MCP tool approvals use `mcpServer/elicitation/request`. HCC submits the
257
262
  official action/content response for explicit tool confirmations without
258
- persisting session/always authorization. Approving arbitrary form fields or URL
259
- authentication is unsupported; decline and cancel remain available.
263
+ persisting session/always authorization. Standard `form` requests support strings, numbers/integers, booleans, single-select and string-enum multi-select fields, with titles, descriptions, suggested defaults, required fields, length/numeric/selection limits and common mailbox/URI/date/date-time format checks. Optional fields are sent only when explicitly included, and booleans require a yes/no choice. Limits are 50 fields, 100 options per field, 8192 UTF-16 units per string and 65536 characters each for schema and response content.
264
+
265
+ Correlated MCP `url` requests display the authorization destination and an **Open authorization page** action. Only the current controller can submit it. HCC reserves a blank tab on the explicit click and navigates after the original executor accepts the exact request; stale requests close the blank tab. Popup blocking leaves the request pending. HTTPS and loopback HTTP are allowed; credentials in the URL, other schemes, missing elicitation identities and truncated requests block acceptance while retaining decline/cancel. The new tab has no opener or referrer. Loopback destinations require a browser on the executor computer; HCC does not proxy local login callbacks to another device.
266
+
267
+ Opening sends only `{ "action": "accept" }` and is not proof of successful authentication. Complete the external flow, then return to the task and follow the provider result. HCC does not invent a completion event or collect credentials in its form. URLs, device messages, opaque elicitation ids and metadata remain in the live pending request only; HCC interaction events and browser storage do not retain them. Provider-owned logs/history and the destination browser retain their existing behavior. Account login, token refresh, `openai/userVerification` and external-flow completion APIs remain separate unsupported capabilities.
268
+
269
+ State refresh keeps edits in page memory. Submission, request removal or session changes clear them; a full page reload does not recover answers. HCC browser storage, events and delivery receipts do not retain form responses through the interaction-response path. Provider-owned history and model output retain their existing behavior. The owning server revalidates types and constraints and preserves executor/session/turn/request fencing. Nested objects, unrestricted arrays, unknown constraints and OpenAI extended form modes remain visibly unsupported with decline/cancel available.
270
+
271
+ To reproduce browser acceptance, set `HCC_ACCEPTANCE_PLAYWRIGHT` to a Playwright module and run `node scripts/web-mcp-form-acceptance.mjs --run-browser`; optionally set `HCC_ACCEPTANCE_CHROME`. This uses simulated providers with the production HTTP/SQLite/native runtime and isolated browsers; it makes no model calls. See the source-checkout report `docs/verification/2026-10-02-mcp-form-web-validation.md`.
272
+
273
+ Installed-model acceptance uses `node scripts/web-mcp-form-live-acceptance.mjs --run-live` with `HCC_ACCEPTANCE_PLAYWRIGHT`; `HCC_ACCEPTANCE_CHROME`, `HCC_ACCEPTANCE_TMUX`, `--codex-bin PATH` and `--output NEW_FILE` are optional. Without the opt-in flag it only prints help. A live run consumes quota on the currently configured model/account. Installed Codex calls a disposable stdio MCP tool; actual Web interactions accept the tool confirmation and submit the field form. The harness checks typed responses, model-written results, continuation on the same native executor after Web shuts down, and a Web-owned App Server form. It injects neither model output nor App Server requests.
274
+
275
+ The HCC user directory, Codex home, project, tmux socket and browser profile are disposable. A configured external credential helper can retain its original user home for read-only credential retrieval; the original provider/model, login and configuration remain intact. Receipts include source hashes, checks, cleanup results and original config/auth/shell-config hash checks. Output paths must be new so existing receipts are preserved. Fixture logs contain synthetic form values only.
276
+
260
277
 
261
278
  The local validation receipt (source checkout: `docs/verification/2026-10-02-native-live-validation.json`)
262
279
  records the unit suite (785 passed, one platform-dependent skip), a 63-module
@@ -286,10 +303,67 @@ acceptance remains a separate check.
286
303
 
287
304
  For real model and browser interactions, use
288
305
  `scripts/web-native-interaction-acceptance.mjs`. It defaults to help; only
289
- `--run-live --provider codex|claude|all` invokes models. Set
306
+ `--run-live --provider codex|claude|dsh|all` invokes models. Set
290
307
  `HCC_ACCEPTANCE_PLAYWRIGHT` and optionally `HCC_ACCEPTANCE_CHROME`.
291
308
  `--claude-package DIR` links an installed SDK package into the isolated worker
292
309
  project for default resolution, without injecting its query function. The
293
310
  harness checks explicit approval and rejection and continuing the original
294
311
  session. It uses existing authentication/quota, cleans test provider homes and
295
312
  processes, and never attaches to existing user conversations.
313
+
314
+
315
+ `--provider dsh --dsh-bin /absolute/path/to/dsh` uses the installed public launcher
316
+ and existing `DEEPSEEK_API_KEY`. The harness adds an official `tools/pre-execute`
317
+ ask policy to a private ACP profile for only two acceptance-owned target files.
318
+ Permission requests come from real model tool calls; no ACP request injection is
319
+ used. It verifies an approved write, absence of a declined target, local return
320
+ to the same session, and desktop and 390px mobile approval controls. See the
321
+ dsh Web interaction receipt (source checkout: `docs/verification/2026-10-02-native-web-dsh-final-snapshot-interactions.json`).
322
+
323
+
324
+ ## Installed-package acceptance
325
+
326
+ `scripts/native-installed-acceptance.mjs` tests an already installed HCC archive
327
+ through the public `hcc native` commands. Install the archive and the optional
328
+ Claude SDK into the same isolated npm prefix before running it. The script uses
329
+ the SDK's default package resolver; it does not inject an adapter or query
330
+ function. Running it without `--run-live` prints help and makes no model calls.
331
+
332
+ ```sh
333
+ npm install --prefix /absolute/path/to/acceptance-prefix \
334
+ /absolute/path/to/hello-cc.tgz @anthropic-ai/claude-agent-sdk
335
+
336
+ HCC_ACCEPTANCE_PLAYWRIGHT=file:///absolute/path/to/playwright/index.mjs \
337
+ HCC_ACCEPTANCE_CHROME=/absolute/path/to/chrome \
338
+ node /absolute/path/to/acceptance-prefix/node_modules/@logicseek/hello-cc/scripts/native-installed-acceptance.mjs \
339
+ --run-live --codex-bin /absolute/path/to/codex \
340
+ --dsh-bin /absolute/path/to/dsh --archive /absolute/path/to/hello-cc.tgz \
341
+ --browser --task --output /absolute/path/to/receipt.json
342
+ ```
343
+
344
+ The checks cover correlated replies and ACKs, duplicate submission, continuing
345
+ context, owned close/resume and interruption for all three installed providers.
346
+ A separate Codex check explicitly rejects a write outside the allowed sandbox. Each worker first receives a bounded task through the local user controls.
347
+ Models then send messages through MCP along `Codex → Claude → dsh → Codex`. The browser check verifies default SDK
348
+ loading, an explicit approved write, desktop/mobile rendering, released control
349
+ and local continuation of the same session after closing Web. `--task` adds an
350
+ independent file collaboration example: Codex implements invoice arithmetic,
351
+ five contract tests run, and Claude receives the model-authored handoff and
352
+ writes its review. This example is separate from stakeholder acceptance of a
353
+ production workflow.
354
+
355
+ Existing authentication and provider quota are used. HCC's global HOME, provider
356
+ homes, tmux server and project are private acceptance directories. A copied
357
+ Codex credential command preserves the caller's HOME only while retrieving
358
+ existing credentials; the original configuration is unchanged. Owned processes
359
+ and credential copies are removed on exit. The receipt records the archive
360
+ SHA-256, provider versions, source hashes, browser evidence and cleanup results.
361
+ The script neither publishes npm packages nor deploys to employee devices.
362
+
363
+ Requests submitted through authenticated native CLI/Web controls are recorded
364
+ as local user requests. Messages arriving through the shared HCC bus remain
365
+ peer coordination data, even if the sender calls itself `web` or `shell`.
366
+ Legacy deliveries retain peer origin during migration. This distinction does
367
+ not grant tool permissions: writes and other gated tools still require approval.
368
+ For delegated file work, first authorize the receiving agent's bounded task,
369
+ then send the peer handoff.
@@ -80,7 +80,7 @@ hcc msg inbox --peer coordinator
80
80
  | `hcc native deliveries` | 可选 `--peer NAME`,查看投递回执 |
81
81
  | `hcc native events` | 必须 `--peer NAME`;可选 `--after ID`,查看有界事件历史 |
82
82
  | `hcc native requests` | 必须 `--peer NAME`;查看与该执行器、会话、turn 绑定的待处理请求 |
83
- | `hcc native respond` | 必须 `--peer NAME --request ID --decision accept\|decline\|cancel`;权限子集或问题答案通过 `--response-file JSON` 提交 |
83
+ | `hcc native respond` | 必须 `--peer NAME --request ID --decision accept\|decline\|cancel`;权限子集、问题答案或 MCP 表单内容通过 `--response-file JSON` 提交 |
84
84
  | `hcc native interrupt` | 必须 `--peer NAME`;可选 `--turn ID`,请求中断活动 turn |
85
85
  | `hcc native close` | 必须 `--peer NAME`,关闭该 worker 持有的连接或进程 |
86
86
  | `hcc native down` | 请求关闭 worker 和停止 runtime,返回停止请求回执 |
@@ -147,12 +147,16 @@ ID。观察窗口不能应答,控制权切换后旧窗口的 epoch 失效。
147
147
 
148
148
  | Provider | 已接入的人工交互 |
149
149
  | --- | --- |
150
- | Codex | 命令/文件审批、所请求文件与网络权限的子集、明确的 turn/session 有效期、选项/自由输入/敏感问题,以及单次空表单 MCP 工具确认 |
150
+ | Codex | 命令/文件审批、所请求文件与网络权限的子集、明确的 turn/session 有效期、选项/自由输入/敏感问题,以及单次空表单 MCP 工具确认与常用 MCP 表单字段 |
151
151
  | Claude | SDK 工具权限 callback,批准原始输入本次执行,不改写工具参数 |
152
152
  | dsh ACP | 选择 provider 提供的 `allow_once`,不自动选择 `allow_always` |
153
153
 
154
154
  rc.2 的 ACP 审批可能只携带工具 ID。适配器会关联同一 session/turn 的工具更新以展示操作输入;等待后仍缺输入或输入被截断时可以拒绝,允许会返回 `NATIVE_APPROVAL_CONTEXT_MISSING`。实际安装与拒绝证明见 dsh 验收 (源码目录: `docs/verification/2026-10-02-dsh-cordis-native.md`)。
155
155
 
156
+ Native 审批卡片先显示工具、命令或文件路径和内容预览,并明确本次授权范围。
157
+ 完整操作详情可以展开,状态刷新保留展开状态;ACP 缺少操作输入或单次批准选项
158
+ 时禁用批准按钮,仍可拒绝。长内容预览会明确提示缩短,完整参数继续可查看。
159
+
156
160
  Codex 交互会话在 thread start/resume 的私有配置中显式开启
157
161
  `features.default_mode_request_user_input` 和 `features.request_permissions_tool`,
158
162
  使执行模式下的模型能够调用提问和权限请求工具。Web 专用 App Server 的 start、resume、
@@ -184,13 +188,26 @@ hcc native respond --peer codex-reviewer --request REQUEST_ID --decision accept
184
188
  hcc native respond --peer codex-reviewer --request REQUEST_ID --decision cancel
185
189
  ```
186
190
 
187
- 响应文件只允许 `permissions`、`scope`、`answers`。不能添加原请求没有的路径或
191
+ 响应文件只允许 `permissions`、`scope`、`answers`、`content`;MCP 表单用 `content` 对象提交原字段名和类型,例如 `{"content":{"project":"demo","count":2,"enabled":false}}`。不能添加原请求没有的路径或
188
192
  网络权限;授予文件权限时必须保留原请求的 deny 条目。所有问题都需明确回答;
189
193
  请求参数被截断时,只能拒绝或取消。动态工具与账号 token 刷新尚未接入。
190
194
 
191
195
  Codex MCP 工具审批使用 `mcpServer/elicitation/request`,与命令/文件审批的返回结构
192
196
  不同。HCC 对显式 MCP 工具确认提交单次 action/content,不写入 session/always 授权。
193
- 任意表单字段和 URL 身份认证尚不支持批准,可明确拒绝或取消。
197
+ 标准 `form` 模式支持字符串、数值/整数、布尔值、单选和字符串枚举多选,包含标题、说明、默认建议值、必填项、长度/数值/选择数量范围及常用邮箱/URI/date/date-time 格式校验。可选字段只在勾选填写后发送;布尔值需明确选择是或否。字段数量上限 50、单字段选项上限 100、字符串上限 8192 个 UTF-16 单元,表单结构与应答内容各限 65536 字符。
198
+
199
+ Web 刷新执行状态时在页面内存中保留填写内容;提交、请求消失或切换会话后清除,不写入浏览器存储、HCC 事件或投递回执。页面整体重载不会恢复这些答复。此约束针对 HCC 的交互应答路径;provider 自身记录及模型输出继续按其原有行为处理。服务端重复校验内容,审批继续绑定原 executor/session/turn/request;错误输入保留请求供修正。嵌套对象、任意数组、未知约束和 OpenAI 扩展表单模式仍不可批准,页面显示原因并提供拒绝/取消。此能力未改变动态工具或 token 刷新的接入边界。
200
+
201
+ 带原 thread/turn 标识的 MCP `url` 请求现在可在 Web 打开授权页面。界面显示 MCP 服务和目标域名,当前控制者明确点击后先保留空白标签页;原执行器接受同一个请求后才跳转,过期或被拒绝的请求会关闭空白页。弹窗被拦截时保留待处理请求,允许弹窗后可重试。仅允许 HTTPS 或 loopback HTTP,拒绝带用户名/密码的 URL、其他协议、缺少 elicitation 标识或被截断的请求;拒绝/取消始终可用。新标签页不保留 opener 或 referrer。loopback 地址需在执行器所在电脑的浏览器访问,HCC 不把本地授权回调代理到另一台设备。
202
+
203
+ 打开只回传 `{ "action": "accept" }`,不代表身份认证完成。需在外部页面完成操作,再返回查看原任务的 provider 结果。HCC 不推测授权完成事件,也不在表单中收集凭证;授权 URL、设备码消息、elicitation 标识和元数据仅存在于实时待处理请求,不留在 HCC 交互事件或浏览器存储中。provider 自身日志/历史和外部授权浏览器仍按各自规则处理。账号登录、token 刷新、`openai/userVerification` 与外部授权完成 API 属于独立的未接入能力。
204
+
205
+ 浏览器复现:设置 `HCC_ACCEPTANCE_PLAYWRIGHT` 指向 Playwright 模块,再执行 `node scripts/web-mcp-form-acceptance.mjs --run-browser`;`HCC_ACCEPTANCE_CHROME` 可指定 Chrome 路径。该脚本用模拟 provider、真实 HTTP/SQLite/native runtime 和隔离浏览器,不调用模型。表单验收见 `docs/verification/2026-10-02-mcp-form-web-validation.md`。
206
+
207
+ 真实模型与浏览器验收使用 `node scripts/web-mcp-form-live-acceptance.mjs --run-live`,同样需要设置 `HCC_ACCEPTANCE_PLAYWRIGHT`,可选 `HCC_ACCEPTANCE_CHROME`、`HCC_ACCEPTANCE_TMUX`、`--codex-bin PATH` 与 `--output NEW_FILE`。默认只打印帮助;显式运行会使用当前模型和账号的额度。脚本让安装版 Codex 调用隔离 stdio MCP 工具,通过实际 Web 操作完成工具确认、字段填写和提交,核对原类型答复、模型文件落盘,以及 Web 关闭后原 native 执行器继续执行;另覆盖 Web-owned App Server 路径,没有注入模型输出或 App Server 请求。
208
+
209
+ 此验收分别隔离 HCC 的用户目录、Codex home、项目、tmux socket 和浏览器 profile。已配置的外部认证辅助程序可在原用户目录下只读运行,以保持当前账号的正常凭据获取;不更改原 provider、模型、登录状态或原配置。回执记录源码摘要、实际检查、清理结果及原配置/认证/shell 配置摘要核对,`--output` 必须使用新路径,既有回执不会覆盖。验收工具日志只包含合成表单值,直接答复不应被误当成真实业务数据。
210
+
194
211
 
195
212
  ## 当前边界
196
213
 
@@ -246,8 +263,52 @@ Web 验证覆盖服务与 bridge 控制接口,尚不等于完整浏览器操
246
263
 
247
264
 
248
265
  真实模型与浏览器人工交互可使用 `scripts/web-native-interaction-acceptance.mjs`。
249
- 默认只显示帮助;`--run-live --provider codex|claude|all` 才调用模型。
266
+ 默认只显示帮助;`--run-live --provider codex|claude|dsh|all` 才调用模型。
250
267
  设置 `HCC_ACCEPTANCE_PLAYWRIGHT`,以及按需设置 `HCC_ACCEPTANCE_CHROME`。
251
268
  `--claude-package DIR` 可将已经安装的 SDK 包链接到隔离 worker 项目,由默认加载器
252
269
  解析,不注入 query 函数。脚本验证明确批准与拒绝、原会话续接,退出后关闭测试
253
270
  进程并清理临时 provider home;使用现有认证和调用额度。它不连接现有用户会话。
271
+
272
+ `--provider dsh --dsh-bin /absolute/path/to/dsh` 使用已安装的公开 launcher 和现有
273
+ `DEEPSEEK_API_KEY`。脚本在私有 ACP profile 中通过公开 `tools/pre-execute` 策略
274
+ 让两个指定验收文件的写入请求审批;审批请求来自真实模型工具调用,不注入 ACP 请求。
275
+ 验证批准后写入、拒绝后文件不存在、释放 Web 控制后原 session 本地续接,另检查
276
+ 桌面和 390px 手机审批卡片。真实结果见 dsh Web 交互回执 (源码目录: `docs/verification/2026-10-02-native-web-dsh-final-snapshot-interactions.json`)。
277
+
278
+
279
+ ## 安装包验收
280
+
281
+ `scripts/native-installed-acceptance.mjs` 对已经安装的 HCC 包执行验收,通过公开
282
+ `hcc native` 命令启动 daemon 和三个 provider。先把本地包与可选的 Claude SDK
283
+ 安装在同一个独立 npm prefix;脚本使用 SDK 默认包解析,不注入 adapter 或 query
284
+ 函数。不加 `--run-live` 只显示帮助,不调用模型。
285
+
286
+ ```sh
287
+ npm install --prefix /absolute/path/to/acceptance-prefix \
288
+ /absolute/path/to/hello-cc.tgz @anthropic-ai/claude-agent-sdk
289
+
290
+ HCC_ACCEPTANCE_PLAYWRIGHT=file:///absolute/path/to/playwright/index.mjs \
291
+ HCC_ACCEPTANCE_CHROME=/absolute/path/to/chrome \
292
+ node /absolute/path/to/acceptance-prefix/node_modules/@logicseek/hello-cc/scripts/native-installed-acceptance.mjs \
293
+ --run-live --codex-bin /absolute/path/to/codex \
294
+ --dsh-bin /absolute/path/to/dsh --archive /absolute/path/to/hello-cc.tgz \
295
+ --browser --task --output /absolute/path/to/receipt.json
296
+ ```
297
+
298
+ 验收覆盖三个已安装 provider 的关联回复与 ACK、重复提交、连续上下文、owned
299
+ close/resume、中断,以及一次明确拒绝 Codex 越界写入审批。先通过人工控制入口给每个 worker 授权限定任务,再由模型通过 MCP 沿
300
+ `Codex → Claude → dsh → Codex` 发消息并消费回复。浏览器检查 SDK 默认加载、
301
+ 明确批准文件写入、桌面和手机渲染、释放控制权,以及关闭 Web 后原会话本地续接。
302
+ `--task` 增加独立文件协作样例:Codex 实现金额计算,通过五个合同测试,再通过
303
+ 模型发出的交接消息让 Claude 写出审查文件。这个样例与生产业务的用户验收分开。
304
+
305
+ 脚本使用现有认证和调用额度。HCC 全局 HOME、provider home、tmux server 和项目
306
+ 使用私有验收目录;复制到私有配置中的 Codex 凭据命令,仅在读取现有凭据时保留
307
+ 原 HOME,原配置保持不变。退出后清理自有进程与临时凭据。回执记录包 SHA-256、
308
+ provider 版本、源码摘要、浏览器证据和清理结果;脚本不会发布 npm 包或部署到
309
+ 员工设备。
310
+
311
+ 通过已认证的 native CLI/Web 控制入口提交的任务,持久记录为人工请求;共享 HCC
312
+ 消息总线送达的内容保持 peer 消息身份,即使发送方自称 `web` 或 `shell`。旧回执
313
+ 迁移后仍按 peer 消息处理。来源区分不授予工具权限,写入等受控操作仍需审批。
314
+ 委派文件任务时,先由用户明确授权接收 agent 的限定任务,再发送 peer 交接。
@@ -16,7 +16,11 @@
16
16
 
17
17
  结构化界面提供消息、当前 turn 状态、追加指令、轮次中断、计划、差异和人工交互。命令/文件审批以及空表单 MCP 工具确认由当前控制窗口明确批准本次或拒绝。文件与网络权限可逐项勾选,并明确选择本轮或会话有效期;只能授予原请求的子集。问题支持选项、其他/自由输入和敏感答案,需逐题明确填写。接管控制本身不会批准工具。
18
18
 
19
- 表单输入与焦点会跨状态刷新保留,直接答案不写入 HCC 状态、事件、回执或浏览器存储。原 turn 完成、中断成功、provider 解决请求或执行器关闭后,请求卡片失效;旧控制窗口不能用过期 epoch 应答。参数被截断时只能拒绝或取消。任意 MCP 表单字段、URL 登录、动态工具及账号 token 刷新尚未接入。
19
+ 表单输入与焦点会跨状态刷新保留,直接答案不写入 HCC 状态、事件、回执或浏览器存储。原 turn 完成、中断成功、provider 解决请求或执行器关闭后,请求卡片失效;旧控制窗口不能用过期 epoch 应答。参数被截断时只能拒绝或取消。MCP 支持下述标准表单和带原 thread/turn 标识的 URL 请求;嵌套对象、任意数组等复杂结构、动态工具及账号 token 刷新尚未接入。
20
+
21
+ MCP URL 请求显示授权目标,当前控制窗口点击“打开授权页面”后,原执行器接受请求才跳转。弹窗被拦截时不提交请求;过期请求不会打开授权地址。仅允许 HTTPS 或 loopback HTTP,链接带用户名/密码、其他协议、请求标识缺失或参数截断时保留拒绝/取消入口。loopback 地址需在执行器所在电脑打开,其他设备无法通过 HCC 代理本地授权页。
22
+
23
+ 打开页面只表示同意发起外部流程,不表示认证成功。请在外部页面完成操作,再返回关注原任务结果;新页面不保留 opener/referrer。URL、设备码消息和元数据不进入 HCC 交互事件或浏览器存储,实时待处理请求仍可供控制窗口查看。账号登录、token 刷新和 OpenAI 用户验证扩展不包含在此能力内。
20
24
 
21
25
  运行中发消息使用 steer;空闲时开始新 turn。中断当前轮与终止执行器是不同操作。turn 完成不自动把 hcc task 标记为验收完成。
22
26
 
@@ -26,6 +30,10 @@
26
30
 
27
31
  关闭浏览器后 App Server 仍由 hello-cc runtime 管理;停止 runtime 会关闭它。新 runtime 不会自动重启 App Server 或重放未确认消息,可以从已保存 thread 显式恢复。
28
32
 
33
+ MCP 标准表单可以直接在 Web 填写文本、数值、是/否和单选/多选;两种执行器共用校验,答复仍回到同一请求。状态刷新保留页面内的填写内容,可选项不自动发送默认值;页面重载会清空答复。未支持的模式或结构会说明原因,保留拒绝/取消入口。实现和验收范围见 `docs/verification/2026-10-02-mcp-form-web-validation.md`。
34
+
35
+ 真实模型复现脚本为 `scripts/web-mcp-form-live-acceptance.mjs --run-live`:先由本地 Codex 实际发起 MCP 交互,再从桌面/手机 Web 提交,核对同一 native 执行器继续完成和交回本地;另覆盖 Web-owned App Server。环境变量与隔离/账号范围见 `docs/native.zh-CN.md` 的真实模型与浏览器验收说明。成功以该次回执为准,默认运行只打印帮助,不调用模型。
36
+
29
37
  ## 本地 native worker 接手
30
38
 
31
39
  先用 `hcc native start --peer codex-worker --provider codex` 启动后台任务,再打开 Web 的同一项目。Web 自动发现实际仍由 native runtime 持有的 worker,显示其原 peer/session、事件和投递回执;发送、中断和明确关闭都通过原 runtime 执行,不新建 provider 子进程。Claude/dsh worker 也走这条路径,按实际能力显示中断操作。
@@ -42,12 +50,12 @@
42
50
 
43
51
  Web 专用 Codex App Server,以及由 HCC 托管的 Codex/Claude/dsh native worker,自动接入 [项目与 peer 受限的 MCP 协作工具](mcp.zh-CN.md)。配置只传给对应执行器或 worker,不写全局 provider 配置;关闭 worker 前撤销其临时权限。模型可查询任务与 inbox、领取任务、发送消息、写 handoff、获取/释放自己的资源锁和记录本地证据;不替用户执行发布或业务验收。
44
52
 
45
- 会话栏“结果审阅”汇总结构化 command 的退出码与输出、turn 差异、模型通过 MCP 提交的本地证据,以及人工添加的验收记录。命令退出成功仅说明该命令成功;人工填写“通过”必须附证据引用。界面分别展示本地验证、发布部署、业务验收,并注明记录来源。turn 完成、测试记录或人工验收均不自动改变 hcc task 状态。记录保存于项目数据库 events 中,`gc --history` 保留结果审计记录和最小提交去重凭据。
53
+ 会话栏“结果审阅”汇总结构化 command 的执行状态与退出码、是否有 turn 差异、模型通过 MCP 明确提交的本地证据,以及人工添加的验收记录。自动结果仅在实时观察到新 turn 开始后归属当前任务;缺失该事件时,不会从历史快照补认任务证据。自动结果在项目数据库 events 中只保存中性标题、状态、退出码和来源 ID,不保存命令、输出或差异正文;正文仍可在可用的执行器会话或 provider 历史中查看。命令退出成功仅说明该命令成功;人工填写“通过”必须附证据引用。界面分别展示本地验证、发布部署、业务验收,并注明记录来源。turn 完成、测试记录或人工验收均不自动改变 hcc task 状态。`gc --history` 保留结果审计记录和最小提交去重凭据。
46
54
 
47
55
  ## 验收边界
48
56
 
49
57
  本地验证包含真实 SQLite/HTTP、模拟交互请求、隔离 tmux 与桌面/手机浏览器。安装版 Codex 0.144.6 的协议验收另行覆盖 initialize、thread/start/list、10 个 MCP 工具发现和实际 `hcc_state` 读回;此协议检查不调用模型,可用 `node scripts/web-handoff-installed-acceptance.mjs` 重现。
50
58
 
51
- 真实模型验收已在隔离项目和 Codex home 中完成“本地 → Web → 本地”三段文件任务,全程保持原 Codex 进程和 thread;关闭 Web runtime 后仍可继续。可用 `scripts/web-native-model-acceptance.mjs` 在明确需要真实模型调用时重现。三种 provider 的真实生命周期、模型 MCP 发信、回复/ACK 和无回复循环另有独立回执。交互表单另有 11 项模拟 provider 浏览器检查。真实 Codex 已经完成“提问 → Web 答复 → 指定文件权限 → 本轮授权 → 写入所选答案 → 后续请求拒绝 → 本地继续”的验收;默认加载的 Claude SDK 已完成真实 Write 工具批准、拒绝和本地续接。dsh 的真实权限弹窗尚无本轮浏览器验收。完整结果与运行条件见 本地验收记录 (源码目录: `docs/verification/2026-10-02-web-local-task-handoff.md`)。
59
+ 真实模型验收已在隔离项目和 Codex home 中完成“本地 → Web → 本地”三段文件任务,全程保持原 Codex 进程和 thread;关闭 Web runtime 后仍可继续。可用 `scripts/web-native-model-acceptance.mjs` 在明确需要真实模型调用时重现。三种 provider 的真实生命周期、模型 MCP 发信、回复/ACK 和无回复循环另有独立回执。交互表单另有 11 项模拟 provider 浏览器检查。真实 Codex 已经完成“提问 → Web 答复 → 指定文件权限 → 本轮授权 → 写入所选答案 → 后续请求拒绝 → 本地继续”的验收;默认加载的 Claude SDK 已完成真实 Write 工具批准、拒绝和本地续接。dsh 已完成真实 ACP 写入的 Web 批准、拒绝和原 session 本地续接,审批卡片另通过桌面与 390px 手机检查;仅在隔离 profile 中对指定验收文件设置公开审批策略。完整结果与运行条件见 本地验收记录 (源码目录: `docs/verification/2026-10-02-web-local-task-handoff.md`)。
52
60
 
53
61
  任意未托管 TUI/普通终端的活动执行器迁移、私有 daemon endpoint、任意协议版本的完整兼容矩阵,以及发布安装和真实业务验收仍在本次证据范围之外。