@logicseek/hello-cc 1.0.1 → 1.0.2-dsh.3
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/CHANGELOG.md +72 -0
- package/README.md +4 -0
- package/README.zh-CN.md +4 -0
- package/docs/README.md +9 -0
- package/docs/README.zh-CN.md +9 -0
- package/docs/commands.md +53 -0
- package/docs/commands.zh-CN.md +48 -0
- package/docs/dsh.md +137 -0
- package/docs/dsh.zh-CN.md +139 -0
- package/docs/mcp.md +9 -0
- package/docs/mcp.zh-CN.md +23 -0
- package/docs/native.md +295 -0
- package/docs/native.zh-CN.md +253 -0
- package/docs/web-handoff.zh-CN.md +53 -0
- package/lib/cli/app.mjs +25 -6
- package/lib/cli/commands/doctor.mjs +17 -2
- package/lib/cli/commands/dsh.mjs +79 -0
- package/lib/cli/commands/hook.mjs +241 -90
- package/lib/cli/commands/lock.mjs +34 -19
- package/lib/cli/commands/mcp.mjs +28 -0
- package/lib/cli/commands/native.mjs +130 -0
- package/lib/cli/commands/run.mjs +66 -21
- package/lib/cli/commands/task.mjs +6 -3
- package/lib/cli-args.mjs +4 -0
- package/lib/coordination-state.mjs +15 -1
- package/lib/core/coordination/event-retention.mjs +14 -2
- package/lib/core/coordination/gc-plan.mjs +3 -13
- package/lib/core/coordination/locks.mjs +45 -0
- package/lib/core/coordination/results.mjs +79 -0
- package/lib/core/peers/bindings.mjs +9 -3
- package/lib/diagnostics/codex.mjs +121 -0
- package/lib/integrations/codex-interactions.mjs +114 -0
- package/lib/integrations/dsh-collaboration.mjs +170 -0
- package/lib/integrations/dsh-cordis.d.ts +19 -0
- package/lib/integrations/dsh-cordis.mjs +177 -0
- package/lib/integrations/dsh.bundle.yml +7 -0
- package/lib/integrations/dsh.mjs +287 -0
- package/lib/integrations/native/claude.mjs +451 -0
- package/lib/integrations/native/codex.mjs +242 -0
- package/lib/integrations/native/dsh-acp.mjs +343 -0
- package/lib/integrations/native/index.mjs +19 -0
- package/lib/integrations/native/interactions.mjs +53 -0
- package/lib/integrations/native/jsonrpc.mjs +185 -0
- package/lib/integrations/peers/identity.mjs +36 -10
- package/lib/integrations/peers/processes.mjs +22 -8
- package/lib/integrations/providers.mjs +6 -2
- package/lib/mcp/scope.mjs +104 -0
- package/lib/mcp/stdio.mjs +80 -0
- package/lib/mcp/tools.mjs +197 -0
- package/lib/process/identity.mjs +3 -1
- package/lib/release/release-notes.mjs +9 -0
- package/lib/runtime/native/client.mjs +38 -0
- package/lib/runtime/native/service.mjs +511 -0
- package/lib/runtime/native/store.mjs +121 -0
- package/lib/ui/help.mjs +5 -2
- package/lib/web/adoption-state.mjs +55 -0
- package/lib/web/auto-attach.mjs +18 -2
- package/lib/web/codex-app-server.mjs +557 -0
- package/lib/web/codex-sessions.mjs +287 -0
- package/lib/web/control-lease.mjs +204 -0
- package/lib/web/http-routes.mjs +197 -15
- package/lib/web/http.mjs +5 -4
- package/lib/web/native-sessions.mjs +286 -0
- package/lib/web/project-contexts.mjs +2 -1
- package/lib/web/pty-sessions.mjs +60 -33
- package/lib/web/runtime-main.mjs +98 -6
- package/lib/web/session-serialize.mjs +0 -0
- package/lib/web/task-results.mjs +76 -0
- package/lib/web/tmux-sessions.mjs +92 -11
- package/lib/web/tmux-stream.mjs +2 -2
- package/lib/web/ui-codex.mjs +550 -0
- package/lib/web/ui-command-palette.mjs +119 -0
- package/lib/web/ui-handoff.mjs +102 -0
- package/lib/web/ui-history.mjs +118 -0
- package/lib/web/ui-i18n.mjs +841 -0
- package/lib/web/ui-interactions.mjs +78 -0
- package/lib/web/ui-login.mjs +101 -0
- package/lib/web/ui-native.mjs +165 -0
- package/lib/web/ui-preferences.mjs +278 -0
- package/lib/web/ui-review.mjs +132 -0
- package/lib/web/ui-template.mjs +1106 -576
- package/lib/web/ui-terminal-find.mjs +98 -0
- package/lib/web/ui-workbench.mjs +94 -0
- package/lib/web/ui-workspace.mjs +222 -0
- package/package.json +11 -3
- package/scripts/check-free-identifiers.mjs +67 -8
- package/scripts/codex-diagnostics-installed-acceptance.mjs +72 -0
- package/scripts/dsh-cordis-acceptance.mjs +200 -0
- package/scripts/dsh-installed-acceptance.mjs +247 -0
- package/scripts/dsh-official-acceptance.mjs +180 -0
- package/scripts/dsh-web-startup-acceptance.mjs +87 -0
- package/scripts/github-release.mjs +3 -1
- package/scripts/native-live-acceptance.mjs +369 -0
- package/scripts/regression.mjs +243 -89
- package/scripts/web-handoff-installed-acceptance.mjs +98 -0
- package/scripts/web-native-interaction-acceptance.mjs +204 -0
- package/scripts/web-native-model-acceptance.mjs +138 -0
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,78 @@ 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.0.2-dsh.3
|
|
20
|
+
|
|
21
|
+
### Summary
|
|
22
|
+
|
|
23
|
+
This preview keeps the DeepSeek Harness integration introduced in `1.0.2-dsh.2`
|
|
24
|
+
and fixes session cleanup when a temporary database failure interrupts shutdown.
|
|
25
|
+
It remains an npm `dsh` preview and a GitHub prerelease.
|
|
26
|
+
|
|
27
|
+
### Highlights
|
|
28
|
+
|
|
29
|
+
- Revoking a Cordis Agent immediately blocks its tools while allowing database
|
|
30
|
+
retirement to retry after storage becomes available again.
|
|
31
|
+
- Preserve failed cleanup records across plugin reloads. Recovery requires the
|
|
32
|
+
exact disposed Agent, provider session, and project; active owners cannot be
|
|
33
|
+
replaced based on another Agent's disposal event.
|
|
34
|
+
- Retain the pinned Harness `0.2.0-rc.2`, Node.js 24+, and Linux/macOS/WSL support
|
|
35
|
+
boundaries. Every candidate has independent package and acceptance receipts.
|
|
36
|
+
|
|
37
|
+
## 1.0.2-dsh.2
|
|
38
|
+
|
|
39
|
+
### Summary
|
|
40
|
+
|
|
41
|
+
This preview integrates DeepSeek Harness sessions with the hello-cc task,
|
|
42
|
+
message, lock, and handoff services. It adds project hooks, an installed Cordis
|
|
43
|
+
bundle, and owned ACP workers, including session recovery and explicit approval
|
|
44
|
+
handling. The preview is intended for the `dsh` npm dist-tag and a GitHub
|
|
45
|
+
prerelease; publication and business acceptance are separate delivery gates.
|
|
46
|
+
|
|
47
|
+
### Highlights
|
|
48
|
+
|
|
49
|
+
- `hcc dsh setup`, `status`, and `web` manage project hooks or a Cordis overlay.
|
|
50
|
+
Setup verifies its managed files before migrating paths from a source checkout
|
|
51
|
+
to an installed package and preserves user-edited configuration.
|
|
52
|
+
- The Cordis bundle exposes collaboration tools using each Agent's complete
|
|
53
|
+
provider session ID and project root. Inbox acknowledgements follow the
|
|
54
|
+
committed model context; simultaneous sessions retain separate ownership.
|
|
55
|
+
- A resumed Cordis session can reclaim ownership after a crashed owner only
|
|
56
|
+
when complete process identity evidence confirms that owner is dead. Live or
|
|
57
|
+
uncertain owners, competing transports, and changed bindings remain protected.
|
|
58
|
+
- Native ACP workers use a dedicated `dsh --profile acp` process with scoped MCP
|
|
59
|
+
tools. Queue admission and completed delivery are distinct; close, resume,
|
|
60
|
+
interruption, and approval responses retain the owning session boundary.
|
|
61
|
+
- ACP approval requests correlate tool-call IDs with their tool input, including
|
|
62
|
+
out-of-order updates. Requests with missing or truncated context cannot be
|
|
63
|
+
accepted; rejection remains available.
|
|
64
|
+
- Release tooling derives GitHub prerelease status from the version and exposes
|
|
65
|
+
it during dry runs, so preview releases do not receive stable release status.
|
|
66
|
+
|
|
67
|
+
### Compatibility Notes
|
|
68
|
+
|
|
69
|
+
- Node.js 24 or newer and matching DeepSeek Harness `0.2.0-rc.2` runtime packages
|
|
70
|
+
are required. The Cordis integration checks the actual Agent, AgentLoop, Tools,
|
|
71
|
+
and Sessions package versions before loading.
|
|
72
|
+
- Supported host environments are Linux and macOS; Windows users must use WSL.
|
|
73
|
+
Native Windows shells are not supported. The existing macOS arm64 acceptance
|
|
74
|
+
results do not establish Linux, WSL, or other-device acceptance for this preview.
|
|
75
|
+
- Choose one injection method per Harness process: profile bundle or project
|
|
76
|
+
overlay. Harness manages profile bundle installation; `setup --mode off`
|
|
77
|
+
disables a managed project overlay.
|
|
78
|
+
- Existing schema v7 and Runtime API v2 boundaries still apply. Real model
|
|
79
|
+
acceptance requires a provider route that permits Harness; a route restricted
|
|
80
|
+
to an official client remains restricted.
|
|
81
|
+
|
|
82
|
+
### Validation
|
|
83
|
+
|
|
84
|
+
Earlier local macOS arm64 candidates completed official plugin installation and
|
|
85
|
+
removal, real Cordis collaboration calls, ACP session lifecycle and approval
|
|
86
|
+
denial, and an isolated order-report workflow. Those dated receipts belong to
|
|
87
|
+
their recorded candidate hashes. This version requires its own frozen-package
|
|
88
|
+
installation receipt and release checks before publication. Other-device
|
|
89
|
+
installation and genuine business signoff remain separate, incomplete gates.
|
|
90
|
+
|
|
19
91
|
## 1.0.1
|
|
20
92
|
|
|
21
93
|
### Summary
|
package/README.md
CHANGED
|
@@ -207,6 +207,10 @@ generic session-isolation assumptions.
|
|
|
207
207
|
- [User Guide](docs/guide.md): setup, Web console, workflows, coordination
|
|
208
208
|
semantics, and environment behavior.
|
|
209
209
|
- [Command Reference](docs/commands.md): compact public command list.
|
|
210
|
+
- [DeepSeek Harness](docs/dsh.md): hooks/Cordis collaboration, ACP workers,
|
|
211
|
+
project setup and Web launch, with real-model and local-package acceptance evidence.
|
|
212
|
+
- [Native Workers](docs/native.md): HCC-owned Codex, Claude SDK, and dsh ACP
|
|
213
|
+
workers, delivery receipts, permissions, and saved-session ownership.
|
|
210
214
|
- [Changelog](CHANGELOG.md): release notes for published versions.
|
|
211
215
|
- [Design Notes](docs/design.md): product boundaries and coordination model.
|
|
212
216
|
- [Implementation Notes](docs/implementation.md): architecture and internal
|
package/README.zh-CN.md
CHANGED
|
@@ -186,6 +186,10 @@ hcc task done --id 1 --summary "Done"
|
|
|
186
186
|
- [文档目录](docs/README.zh-CN.md):全部用户文档和实现文档入口。
|
|
187
187
|
- [用户指南](docs/guide.zh-CN.md):安装、Web 控制台、协作流程、协作语义和环境变量行为。
|
|
188
188
|
- [命令参考](docs/commands.zh-CN.md):紧凑公共命令清单。
|
|
189
|
+
- [DeepSeek Harness 接入](docs/dsh.zh-CN.md):hooks/Cordis 协作、ACP worker、
|
|
190
|
+
项目配置与 Web 启动;附真实模型和本地包验收记录。
|
|
191
|
+
- [Native 后台 worker](docs/native.zh-CN.md):HCC 持有的 Codex、Claude SDK、dsh ACP
|
|
192
|
+
worker,以及投递回执、权限和保存会话的所有权边界。
|
|
189
193
|
- [更新日志](CHANGELOG.md):已发布版本的 release notes。
|
|
190
194
|
|
|
191
195
|
## 测试
|
package/docs/README.md
CHANGED
|
@@ -17,6 +17,10 @@ authenticated selection of any existing server directory are accepted risks.
|
|
|
17
17
|
workflow, stable peer identity, and environment behavior.
|
|
18
18
|
- [Command Reference](commands.md): compact list of public commands and the
|
|
19
19
|
intended use of each command group.
|
|
20
|
+
- [DeepSeek Harness](dsh.md): project setup, hooks/Cordis collaboration, ACP workers,
|
|
21
|
+
installable bundles, and session routing boundaries.
|
|
22
|
+
- [Native Workers](native.md): owned background workers, provider adapters,
|
|
23
|
+
delivery receipts, permission handling, and resume boundaries.
|
|
20
24
|
- [Changelog](../CHANGELOG.md): release notes for published versions.
|
|
21
25
|
- Release notes: run `npm run release:check` and
|
|
22
26
|
`npm run release:github:dry-run` before publishing. Pushing a `v*` tag runs
|
|
@@ -26,6 +30,11 @@ authenticated selection of any existing server directory are accepted risks.
|
|
|
26
30
|
|
|
27
31
|
## Design And Implementation
|
|
28
32
|
|
|
33
|
+
- DeepSeek Harness integration plan (Chinese) (source checkout: `docs/plans/2026-10-02-dsh-integration.md`): implementation stages, module contracts, and completion gates.
|
|
34
|
+
- DeepSeek Harness acceptance (Chinese) (source checkout: `docs/verification/2026-10-02-dsh-cordis-native.md`): real models, bundle loading, regression and browser evidence.
|
|
35
|
+
|
|
36
|
+
- [Web task handoff (Chinese)](web-handoff.zh-CN.md): browser control, draft recovery, persistent detachment, and opt-in Codex App Server sessions.
|
|
37
|
+
- [Executor-scoped MCP](mcp.md): project-bound coordination tools, ownership checks and local result evidence.
|
|
29
38
|
- [Design Notes](design.md): product boundary, project boundary, capability
|
|
30
39
|
levels, coordination semantics, and provider-session binding.
|
|
31
40
|
- [Implementation Notes](implementation.md): architecture, protocol, command
|
package/docs/README.zh-CN.md
CHANGED
|
@@ -14,6 +14,10 @@ provider peer ID 已变更且不会映射旧 ID;受保护接口使用 Runtime
|
|
|
14
14
|
- [用户指南](guide.zh-CN.md):安装、启动、Web 控制台、协作语义、工作流、稳定
|
|
15
15
|
peer 身份和环境变量行为。
|
|
16
16
|
- [命令参考](commands.zh-CN.md):公共命令的紧凑清单,以及每组命令的用途。
|
|
17
|
+
- [DeepSeek Harness 接入](dsh.zh-CN.md):项目配置、hooks/Cordis 协作、ACP worker、
|
|
18
|
+
可安装 bundle 与会话路由边界。
|
|
19
|
+
- [Native 后台 worker](native.zh-CN.md):后台 worker 所有权、provider adapter、
|
|
20
|
+
投递回执、权限处理和 resume 边界。
|
|
17
21
|
- [更新日志](../CHANGELOG.md):已发布版本的 release notes。
|
|
18
22
|
- 发行说明:发布前运行 `npm run release:check` 和
|
|
19
23
|
`npm run release:github:dry-run`。推送 `v*` tag 会触发
|
|
@@ -23,6 +27,11 @@ provider peer ID 已变更且不会映射旧 ID;受保护接口使用 Runtime
|
|
|
23
27
|
|
|
24
28
|
## 设计和实现
|
|
25
29
|
|
|
30
|
+
- DeepSeek Harness 接入计划 (源码目录: `docs/plans/2026-10-02-dsh-integration.md`):三个实现阶段、模块契约与完成门槛。
|
|
31
|
+
- DeepSeek Harness 验收 (源码目录: `docs/verification/2026-10-02-dsh-cordis-native.md`):真实模型、包加载、回归与浏览器证据。
|
|
32
|
+
|
|
33
|
+
- [Web 接手本地任务](web-handoff.zh-CN.md):控制租约、草稿恢复、暂停接管、Codex App Server 与历史交接边界。
|
|
34
|
+
- [MCP 协作工具](mcp.zh-CN.md):固定项目、peer 与执行器身份的任务、消息、锁和结果证据工具。
|
|
26
35
|
- [设计说明](design.md):产品边界、项目边界、能力层级、协作语义和 provider
|
|
27
36
|
session 绑定。
|
|
28
37
|
- [实现说明](implementation.md):架构、协议、命令面、技术栈、shim 行为和实现计划。
|
package/docs/commands.md
CHANGED
|
@@ -21,6 +21,24 @@ hcc uninstall [--purge --yes]
|
|
|
21
21
|
hooks, shims, and the shell PATH entry; add `--purge --yes` only when you also want to remove the
|
|
22
22
|
current project's `.hello-cc` data and guidance blocks.
|
|
23
23
|
|
|
24
|
+
## Read-only Diagnostics
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
hcc doctor [--codex] [--json]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
By default, doctor only checks project database integrity and schema compatibility;
|
|
31
|
+
corruption or an unsupported schema returns a nonzero exit code. `--codex` additionally
|
|
32
|
+
runs bounded `codex --version` and `codex app-server --help` probes in temporary
|
|
33
|
+
HOME/CODEX_HOME directories and removes their startup files. Hook checks read the
|
|
34
|
+
original Codex home's `hooks.json` and existing project hook invocation events. Help
|
|
35
|
+
advertises startup arguments; it does not prove a protocol handshake or model availability.
|
|
36
|
+
Hook configuration, historical invocation, stdout delivery, and provider acceptance
|
|
37
|
+
are separate facts. No explicit stdout receipt is recorded, so delivery, acceptance,
|
|
38
|
+
and trust remain `unknown`. Diagnostics never start a model/session, execute hooks, or
|
|
39
|
+
change accounts, trust, or shims. Unknown optional diagnostics do not fail a healthy
|
|
40
|
+
database. JSON adds `data.codex`; the default report remains unchanged.
|
|
41
|
+
|
|
24
42
|
## Start And Stop
|
|
25
43
|
|
|
26
44
|
```text
|
|
@@ -39,6 +57,41 @@ want coordination without the Web console or shims. Provider shims only join
|
|
|
39
57
|
projects with a local `.hello-cc/runtime.json` from `hcc web`; they do not use a
|
|
40
58
|
global runtime to manage arbitrary directories.
|
|
41
59
|
|
|
60
|
+
## Native Workers
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
hcc native up
|
|
64
|
+
hcc native start --peer NAME --provider codex|claude|dsh [--cwd DIR] [--model MODEL] [--binary PATH] [--resume last]
|
|
65
|
+
hcc native send --peer NAME --body TEXT [--from NAME] [--task ID]
|
|
66
|
+
hcc native status
|
|
67
|
+
hcc native deliveries [--peer NAME]
|
|
68
|
+
hcc native events --peer NAME [--after ID]
|
|
69
|
+
hcc native requests --peer NAME
|
|
70
|
+
hcc native respond --peer NAME --request ID --decision accept|decline|cancel [--response-file JSON]
|
|
71
|
+
hcc native interrupt --peer NAME [--turn ID]
|
|
72
|
+
hcc native close --peer NAME
|
|
73
|
+
hcc native down
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
These commands manage HCC-owned background workers through Codex app-server,
|
|
77
|
+
the optional Claude Agent SDK, or dsh ACP. A successful send queues a message;
|
|
78
|
+
inspect delivery receipts for submission, acceptance, and completion. Only saved
|
|
79
|
+
sessions owned by the same HCC peer/provider can resume. Existing TUI/Desktop
|
|
80
|
+
sessions keep their own transport. Hosted permission requests and questions wait
|
|
81
|
+
for an explicit Web or local CLI response bound to the current worker/session/turn.
|
|
82
|
+
See [Native Workers](native.md) for response-file examples, SDK installation, receipt meanings,
|
|
83
|
+
and current integration boundaries.
|
|
84
|
+
|
|
85
|
+
## DeepSeek Harness
|
|
86
|
+
|
|
87
|
+
```text
|
|
88
|
+
hcc dsh setup [--mode hooks|cordis|off]
|
|
89
|
+
hcc dsh status [--dsh-bin PATH]
|
|
90
|
+
hcc dsh web [--mode hooks|cordis|off] [--dsh-bin PATH] [--dsh-home PATH] -- [dsh arguments]
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Use `@deepseek-ai/dsh@0.2.0-rc.2` and Node.js 24+. Setup defaults to hooks on first use; `--mode cordis` provides native `hcc_*` tools and ACK after context commit, while `--mode off` disables overlay injection. Later calls retain the saved mode. Status checks content and the executable without model calls. Harness flags follow `--`. Harness Web owns its conversations; use native commands above for HCC-owned workers. See the [integration guide](dsh.md) for routing, bundles and real-model acceptance.
|
|
94
|
+
|
|
42
95
|
## Peers And Status
|
|
43
96
|
|
|
44
97
|
```text
|
package/docs/commands.zh-CN.md
CHANGED
|
@@ -19,6 +19,21 @@ hcc uninstall [--purge --yes]
|
|
|
19
19
|
只有在确定也要删除当前项目的 `.hello-cc` 数据和指导块时,才加
|
|
20
20
|
`--purge --yes`。
|
|
21
21
|
|
|
22
|
+
## 只读诊断
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
hcc doctor [--codex] [--json]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
默认只检查项目数据库完整性和 schema 兼容性;损坏或不支持的 schema 返回非零退出码。
|
|
29
|
+
加 `--codex` 才执行有时限和输出大小限制的 `codex --version`、`codex app-server --help`,
|
|
30
|
+
两个探测使用临时 HOME/CODEX_HOME 并清理启动文件;hooks 检查读取原 Codex home 的
|
|
31
|
+
`hooks.json` 并查看本项目已有 hook 调用事件。help 只能证明
|
|
32
|
+
启动参数被声明,不能证明协议握手或模型可用;hook 配置存在、历史调用记录、stdout 投递
|
|
33
|
+
和 provider 接收分别报告。当前无明确 stdout 回执,投递、接收和 trust 均保持 `unknown`。
|
|
34
|
+
诊断不启动模型或会话、不执行 hooks,不修改账号、信任或 shim;可选诊断未知不会使健康
|
|
35
|
+
数据库返回失败。`--json` 在现有报告中增加 `data.codex`,默认报告结构不变。
|
|
36
|
+
|
|
22
37
|
## 启动和停止
|
|
23
38
|
|
|
24
39
|
```text
|
|
@@ -36,6 +51,39 @@ runtime 生成 URL token。用 `--local` 可只绑定 `127.0.0.1`,用 `--token
|
|
|
36
51
|
已经由 `hcc web` 生成本地 `.hello-cc/runtime.json` 的项目,不会使用全局 runtime
|
|
37
52
|
去管理任意目录。
|
|
38
53
|
|
|
54
|
+
## Native 后台 worker
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
hcc native up
|
|
58
|
+
hcc native start --peer NAME --provider codex|claude|dsh [--cwd DIR] [--model MODEL] [--binary PATH] [--resume last]
|
|
59
|
+
hcc native send --peer NAME --body TEXT [--from NAME] [--task ID]
|
|
60
|
+
hcc native status
|
|
61
|
+
hcc native deliveries [--peer NAME]
|
|
62
|
+
hcc native events --peer NAME [--after ID]
|
|
63
|
+
hcc native requests --peer NAME
|
|
64
|
+
hcc native respond --peer NAME --request ID --decision accept|decline|cancel [--response-file JSON]
|
|
65
|
+
hcc native interrupt --peer NAME [--turn ID]
|
|
66
|
+
hcc native close --peer NAME
|
|
67
|
+
hcc native down
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
这些命令通过 Codex app-server、可选 Claude Agent SDK 或 dsh ACP 管理 HCC 持有的
|
|
71
|
+
后台 worker。send 成功只代表消息入队,需要查看投递回执区分提交、接受和完成。
|
|
72
|
+
resume 只允许同一个 HCC peer/provider 持有的保存会话;已有 TUI/桌面会话继续使用
|
|
73
|
+
原 transport。托管权限请求与问题等待当前 Web 控制窗口或本地 CLI 明确应答,
|
|
74
|
+
并检查当前 worker/session/turn 身份。响应文件示例、SDK 安装、回执和接入边界见
|
|
75
|
+
[Native 后台 worker](native.zh-CN.md)。
|
|
76
|
+
|
|
77
|
+
## DeepSeek Harness
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
hcc dsh setup [--mode hooks|cordis|off]
|
|
81
|
+
hcc dsh status [--dsh-bin PATH]
|
|
82
|
+
hcc dsh web [--mode hooks|cordis|off] [--dsh-bin PATH] [--dsh-home PATH] -- [dsh arguments]
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
验证基线为 `@deepseek-ai/dsh@0.2.0-rc.2`、Node.js 24+。Setup 生成项目局部配置,首次默认 hooks;`--mode cordis` 提供原生 `hcc_*` 工具和提交后 ACK,`--mode off` 关闭 overlay 注入,以后不带模式会沿用保存的选择。Status 校验文件与可执行文件,不调用模型。Harness 参数放在 `--` 后。Harness Web 会话通过自身界面交互;HCC 托管会话使用上方 native 命令控制。路由、bundle 和真实模型验收见[接入指南](dsh.zh-CN.md)。
|
|
86
|
+
|
|
39
87
|
## Peers 和状态
|
|
40
88
|
|
|
41
89
|
```text
|
package/docs/dsh.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# DeepSeek Harness Integration
|
|
2
|
+
|
|
3
|
+
English | [中文](dsh.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
DeepSeek Harness (`dsh`) shares hello-cc project tasks, messages, advisory locks and handoffs with Claude Code and Codex. The integration has three entry points: the official hooks bridge, a native Cordis collaboration plugin, and HCC-owned ACP workers.
|
|
6
|
+
|
|
7
|
+
The tested runtime is `@deepseek-ai/dsh@0.2.0-rc.2`, with matching plugin versions. Use Node.js 24+ on `PATH` as well as for the parent CLI: the dsh executable uses `/usr/bin/env node`. This preview ships Web/headless/SDK/ACP profiles and no built-in TUI.
|
|
8
|
+
|
|
9
|
+
Supported hosts are Linux and macOS; on Windows use WSL. Native Windows shells are not supported. Device acceptance must be recorded separately from container verification.
|
|
10
|
+
|
|
11
|
+
The source and real DeepSeek model acceptance are complete locally; no new npm release has been published. Use this checkout's CLI when testing:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
node /absolute/path/to/hello-cc/bin/hcc.mjs --root /path/to/project dsh setup --mode cordis
|
|
15
|
+
node /absolute/path/to/hello-cc/bin/hcc.mjs --root /path/to/project dsh status
|
|
16
|
+
node /absolute/path/to/hello-cc/bin/hcc.mjs --root /path/to/project dsh web -- --port 8080
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Below, `hcc` means a CLI containing these changes. An older global installation may not include them.
|
|
20
|
+
|
|
21
|
+
## Choose An Entry Point
|
|
22
|
+
|
|
23
|
+
| Entry | Use | Lifecycle owner |
|
|
24
|
+
| --- | --- | --- |
|
|
25
|
+
| `hcc dsh web --mode cordis` | Converse in Harness Web; the model uses `hcc_*` tools | Harness, with multiple independent Agents/workspaces per service |
|
|
26
|
+
| `hcc dsh web --mode hooks` | Use the official Claude hooks bridge and identity-bound CLI commands | Harness; the default compatibility mode |
|
|
27
|
+
| `hcc native start --provider dsh` | Submit prompts, inspect receipts, interrupt and close through HCC CLI/Web | One dedicated ACP process per HCC worker |
|
|
28
|
+
|
|
29
|
+
Use one collaboration injector per session. Native workers have their own scoped MCP capability and lifecycle; do not additionally mount the Cordis/hooks collaboration injector in that process.
|
|
30
|
+
|
|
31
|
+
## Harness Web And Cordis
|
|
32
|
+
|
|
33
|
+
Configure Harness credentials first. The launcher preserves an existing `DEEPSEEK_API_KEY` and provider-routing environment. Use your installed dsh, or install the tested preview yourself:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install -g @deepseek-ai/dsh@0.2.0-rc.2
|
|
37
|
+
cd /path/to/project
|
|
38
|
+
hcc dsh setup --mode cordis
|
|
39
|
+
hcc dsh status
|
|
40
|
+
hcc dsh web -- --port 8080
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Open the URL printed by Harness and create a real Agent using the project as its workspace. Starting the service alone creates no Agent peer. Start `hcc web --local` separately for the HCC dashboard; its dsh filter shows raw session IDs and lets you inspect state and send project messages.
|
|
44
|
+
|
|
45
|
+
The Cordis plugin awaits `agent/created`, delegates the `agent/pre-step` decision chain, observes Agent status/disposal and tool events, and fixes each execution's authority from `exec.agent`. It never borrows service-level `HCC_PEER` identity.
|
|
46
|
+
|
|
47
|
+
| Tools | Purpose |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| `hcc_state`, `hcc_task_list`, `hcc_inbox` | Read project state, tasks and this peer's inbox |
|
|
50
|
+
| `hcc_task_next` | Continue an owned task or claim pending work; never complete it automatically |
|
|
51
|
+
| `hcc_message_send` | Send a project message as this Agent |
|
|
52
|
+
| `hcc_handoff` | Record a handoff for an owned task |
|
|
53
|
+
| `hcc_lock_acquire`, `hcc_lock_release` | Acquire/release this peer's scoped locks |
|
|
54
|
+
| `hcc_result_list`, `hcc_result_record` | Read/record local verification evidence, without claiming publication or business acceptance |
|
|
55
|
+
|
|
56
|
+
The plugin reuses CLI/MCP transactions and task/lock ownership rules. Context and tool output are each bounded to 16,000 characters by default. Truncation is explicit; incompletely delivered messages remain unread. The shared service also validates argument bounds and authority. ACK occurs only when Harness commits the exact context as a `user/message`; rejected admission, preparation failure and cancellation do not ACK early.
|
|
57
|
+
|
|
58
|
+
`next()` delegation preserves deny/ask policy. Closing an Agent expires only its own peer. Unloading removes listeners/tool registrations and revokes stale authority; an existing Agent initializes again at its next awaited pre-step after reload. After an unclean exit, the same session can recover its Cordis owner only when the recorded process is verified dead or its PID has been reused. Live or unverifiable owners and conflicting hooks/native bindings remain protected. A project message does not wake an indefinitely idle Harness conversation. It enters at the next model step, or at an active turn's stop boundary.
|
|
59
|
+
|
|
60
|
+
## Modes, Arguments And Routing
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
hcc dsh setup [--mode hooks|cordis|off]
|
|
64
|
+
hcc dsh status [--dsh-bin PATH]
|
|
65
|
+
hcc dsh web [--mode hooks|cordis|off] [--dsh-bin PATH] [--dsh-home PATH] -- [dsh arguments]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
First setup defaults to `hooks`; later invocations without `--mode` retain the saved mode. Status verifies managed content and the executable without making a model request.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
hcc dsh setup --mode hooks
|
|
72
|
+
hcc dsh setup --mode cordis
|
|
73
|
+
hcc dsh setup --mode off
|
|
74
|
+
hcc dsh web --dsh-bin '/opt/harness/bin/dsh' --dsh-home '/path/to/dsh-home' -- --port 8080 --no-open
|
|
75
|
+
hcc dsh web --help # HCC wrapper help
|
|
76
|
+
hcc dsh web -- --help # Harness Web help
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`--dsh-bin` selects an executable file. `--dsh-home` sets child `DSH_HOME`; relative paths resolve from the invoking directory. Harness arguments go after `--` and retain order and values, including extra overlays. Mode changes apply to subsequent launches: close your owned runtime and relaunch. Existing hooks/native sessions are not forcibly rebound to Cordis; use a new session when switching and retain old collaboration records.
|
|
80
|
+
|
|
81
|
+
| Managed file | Purpose |
|
|
82
|
+
| --- | --- |
|
|
83
|
+
| `.hello-cc/dsh/hooks.json` | Dedicated HCC hooks for the five supported events |
|
|
84
|
+
| `.hello-cc/dsh/cordis.patch.yml` | Loads the selected injector only; off is an empty overlay |
|
|
85
|
+
| `.hello-cc/dsh/managed.json` | Mode, ownership, paths, baseline and SHA256 hashes |
|
|
86
|
+
|
|
87
|
+
Setup/disable/re-enable are idempotent. Re-run setup after moving/upgrading source to refresh absolute paths. Edited/foreign files, links and ownership conflicts are preserved and reported. Put custom configuration in a separate overlay. Setup does not install dsh, edit user homes, copy keys or import all Claude/Codex hooks.
|
|
88
|
+
|
|
89
|
+
The real session ID and absolute Agent cwd route to that workspace's `.hello-cc/mesh.db`, without searching parent projects. Raw non-UUID IDs remain intact. Hash collisions, aliases and another live transport's ownership are rejected. Hooks/Cordis peers cannot be stopped/restarted through detected-peer controls or converted to tmux terminals; a service-log pane remains an independent shell peer.
|
|
90
|
+
|
|
91
|
+
The rc.2 hooks bridge awaits SessionStart before the first turn. PreToolUse tracks activity; PostToolUse/Stop can deliver context. The official bridge does not consume PreToolUse additionalContext. Hook ACK follows successful hook output, while Cordis ACK follows the corresponding committed context record.
|
|
92
|
+
|
|
93
|
+
## ACP Workers
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
hcc native up
|
|
97
|
+
hcc native start --peer dsh-reviewer --provider dsh
|
|
98
|
+
hcc native send --peer dsh-reviewer --from coordinator --body 'Review the current diff and report verification evidence'
|
|
99
|
+
hcc native deliveries --peer dsh-reviewer
|
|
100
|
+
hcc native events --peer dsh-reviewer
|
|
101
|
+
hcc native interrupt --peer dsh-reviewer
|
|
102
|
+
hcc native close --peer dsh-reviewer
|
|
103
|
+
hcc native start --peer dsh-reviewer --provider dsh --binary /absolute/path/to/dsh --resume last
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
The default launcher is `dsh` on PATH; use `--binary /absolute/path/to/dsh` when necessary. A worker owns a dedicated `dsh --profile acp` process. Send returns an admission receipt; only authoritative prompt completion commits a delivery. Resume retains provider session identity and memory. ACP does not replay the full transcript or offer fork/steer. Use native Web controls and approval responses, rather than detected-peer registration actions. See [Native Workers](native.md).
|
|
107
|
+
|
|
108
|
+
## Bundle And Verification
|
|
109
|
+
|
|
110
|
+
The package declares `dsh.bundle`, ships `lib/integrations/dsh.bundle.yml` and `dsh-cordis.d.ts`, and declares `engines.dsh=0.2.0-rc.2`. The plugin also checks the actual agent/agent-loop/tools/session package versions before registration.
|
|
111
|
+
|
|
112
|
+
Project overlays work directly from source. The managed manifest records the Cordis module location, allowing setup to verify and migrate unedited overlays when switching between source and npm installation directories; edited files are preserved. For profile installation, generate a tarball containing these changes and use the official package-management entry point:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
npm pack --ignore-scripts
|
|
116
|
+
dsh plugin --profile web add /absolute/path/to/logicseek-hello-cc-1.0.1.tgz
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Harness requires explicit approval for native dependency builds. If add returns `ERR_PNPM_IGNORED_BUILDS`, merge the following into the selected profile's `pnpm-workspace.yaml` and rerun the same add command. The default path is `~/.dsh/profiles/web/pnpm-workspace.yaml`; use the configured DSH_HOME when different. Preserve existing settings and approve only the candidate's pinned native dependency:
|
|
120
|
+
|
|
121
|
+
```yaml
|
|
122
|
+
allowBuilds:
|
|
123
|
+
node-pty@1.2.0-beta.15: true
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Harness selects bundles through the profile's `dsh.profile.bundles`; do not also load the project Cordis/hooks overlay. Actual npm installation, official add/repeated add/remove, profile resolution and real-model collaboration calls have passed. The actual macOS desktop profile was installed and hot-loaded on 2026-10-02. Its paired ACP worker completed real collaboration calls using the existing DeepSeek route. The initially configured desktop sub2api model returned HTTP 403 because that account only accepts official Codex clients. After the desktop default was observed to have changed to official DeepSeek, a new session completed hcc_state, hcc_message_send and a real completed turn with that existing selection. The original sub2api route restriction remains. npm publication was not performed. Harness manages profile package removal; project-overlay integration is disabled with `setup --mode off`.
|
|
127
|
+
|
|
128
|
+
See Cordis/native acceptance (source checkout: `docs/verification/2026-10-02-dsh-cordis-native.md`), bridge acceptance (source checkout: `docs/verification/2026-10-02-dsh-official-bridge.md`), and the integration plan (source checkout: `docs/plans/2026-10-02-dsh-integration.md`). Real-model checks used temporary projects and owned processes, without replacing existing user sessions. The isolated order fixture passed artifact/evidence/handoff/lock-release/task-completion checks. See the Mac device receipt (source checkout: `docs/verification/2026-10-02-dsh-device-install.md`). Publication, deployment, other-device installation and genuine business acceptance remain separate delivery stages.
|
|
129
|
+
|
|
130
|
+
The installed acceptance script performs npm installation, official `plugin add` / repeated add / remove, and runs the installed public CLI. `--run-live` retains the existing DeepSeek authentication to test ACP approval denial and an isolated order-summary workflow. Without it, no real model is called. All homes, profiles, projects and processes belong to the acceptance run.
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
node scripts/dsh-installed-acceptance.mjs /absolute/path/to/isolated-dsh-install \
|
|
134
|
+
--run-live --output-dir /absolute/path/to/acceptance-output
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
The output contains a candidate tarball, its SHA256 and installation receipt, redacted command logs and the verified order report. The approval probe adds an ask policy for one test-owned file in a private profile, rejects the actual ACP request and verifies the file was not created. The fixture demonstrates a local task workflow; it does not establish genuine business acceptance.
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# DeepSeek Harness 接入
|
|
2
|
+
|
|
3
|
+
[English](dsh.md) | 中文
|
|
4
|
+
|
|
5
|
+
DeepSeek Harness(`dsh`)可以与 Claude Code、Codex 共用 hello-cc 的项目任务、消息、协作锁和交接。现在有三个入口:官方 hooks 兼容桥、原生 Cordis 协作插件,以及 hello-cc 持有的 ACP 后台 worker。
|
|
6
|
+
|
|
7
|
+
运行时基线固定为 `@deepseek-ai/dsh@0.2.0-rc.2`,相关插件使用相同版本。需要 Node.js 24+,并确认 `PATH` 中的 `node` 也符合要求,因为 dsh 通过 `/usr/bin/env node` 启动。此版本提供 Web/headless/SDK/ACP profile,没有内置 TUI。
|
|
8
|
+
|
|
9
|
+
支持 Linux 和 macOS;Windows 使用 WSL,不支持原生 Windows shell。容器验证与实际设备验收分别记录。
|
|
10
|
+
|
|
11
|
+
代码已在本地实现并做真实 DeepSeek 模型验收,尚未发布新的 npm 版本。验证源码时,用本仓库的 CLI:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
node /absolute/path/to/hello-cc/bin/hcc.mjs --root /path/to/project dsh setup --mode cordis
|
|
15
|
+
node /absolute/path/to/hello-cc/bin/hcc.mjs --root /path/to/project dsh status
|
|
16
|
+
node /absolute/path/to/hello-cc/bin/hcc.mjs --root /path/to/project dsh web -- --port 8080
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
下文 `hcc` 指包含这些代码的 CLI。已有的全局 `hcc` 未必包含此接入。
|
|
20
|
+
|
|
21
|
+
## 选择入口
|
|
22
|
+
|
|
23
|
+
| 入口 | 适用场景 | 会话由谁持有 |
|
|
24
|
+
| --- | --- | --- |
|
|
25
|
+
| `hcc dsh web --mode cordis` | 在 Harness Web 中对话,模型直接使用 `hcc_*` 协作工具 | Harness;一个服务可承载多个 Agent/工作区 |
|
|
26
|
+
| `hcc dsh web --mode hooks` | 保留官方 Claude hooks 兼容路线,模型用带身份的 hcc CLI 命令协作 | Harness;默认模式 |
|
|
27
|
+
| `hcc native start --provider dsh` | 从 hello-cc CLI/Web 管理提示、回执、中断和关闭 | hello-cc 专属 ACP worker;每个 worker 一个独立进程 |
|
|
28
|
+
|
|
29
|
+
Cordis 模式与 hooks 模式共用同一任务总线,但对同一个会话只允许一个注入器。ACP worker 使用自己的 native 生命周期与 scoped MCP 能力,不给它额外加载 Cordis/hooks 协作注入器。
|
|
30
|
+
|
|
31
|
+
## Harness Web 与 Cordis 插件
|
|
32
|
+
|
|
33
|
+
先配置 Harness 模型凭据。默认 DeepSeek provider 使用已有 `DEEPSEEK_API_KEY`,启动器保留凭据和 provider 路由环境变量。可以使用已有安装,或自行安装固定版本:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install -g @deepseek-ai/dsh@0.2.0-rc.2
|
|
37
|
+
cd /path/to/project
|
|
38
|
+
hcc dsh setup --mode cordis
|
|
39
|
+
hcc dsh status
|
|
40
|
+
hcc dsh web -- --port 8080
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
打开 Harness 输出的 URL,创建真实会话,并将项目设为会话工作区。仅启动服务不会创建 Agent peer。需要 hello-cc 控制台时另开 `hcc web --local`;dsh 筛选显示原始会话 ID,可以查看状态和发送项目消息。
|
|
44
|
+
|
|
45
|
+
Cordis 插件使用 `agent/created` 的等待式初始化、`agent/pre-step` 的决定链、`agent/status`/`agent/disposed` 和工具事件。每次执行从 `exec.agent` 获取固定项目与 peer,不读取服务级 `HCC_PEER`。插件提供:
|
|
46
|
+
|
|
47
|
+
| 工具 | 用途 |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| `hcc_state` / `hcc_task_list` / `hcc_inbox` | 读取项目状态、任务和本会话收件箱 |
|
|
50
|
+
| `hcc_task_next` | 继续当前任务或认领待办,不自动完成任务 |
|
|
51
|
+
| `hcc_message_send` | 以本 Agent 身份发送项目协作消息 |
|
|
52
|
+
| `hcc_handoff` | 记录所持任务的交接内容 |
|
|
53
|
+
| `hcc_lock_acquire` / `hcc_lock_release` | 获取/释放本 peer 的作用域协作锁 |
|
|
54
|
+
| `hcc_result_list` / `hcc_result_record` | 读取/记录本地验证证据,不代表发布或业务验收 |
|
|
55
|
+
|
|
56
|
+
底层复用 CLI/MCP 的事务、任务归属和锁规则。上下文与工具输出默认各限制 16,000 字符;过长输出明确标记截断,未完整投递的消息保留未读。工具参数的长度、数量和归属由服务再次验证。消息只在 Harness 提交对应 `user/message` 记录后 ACK;拒绝首轮、准备失败和取消不会提前 ACK。
|
|
57
|
+
|
|
58
|
+
插件委托 `next()`,保留现有 deny/ask 权限决定。关闭 Agent 只更新其自身 peer;卸载时移除监听与工具注册,并使旧的执行权限失效。重新加载时,既有 Agent 在下一个等待式 pre-step 重新取得身份。异常退出后,只有核实原进程已退出或 PID 已被复用时,同一会话才能恢复 Cordis 归属;活跃或无法验证的 owner,以及 hooks/native 冲突绑定仍会被拒绝。发送项目消息本身不会唤醒持续空闲的 Harness 会话;它在下一步骤进入上下文,或在活动轮次的停止边界继续处理。
|
|
59
|
+
|
|
60
|
+
## 配置模式与参数
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
hcc dsh setup [--mode hooks|cordis|off]
|
|
64
|
+
hcc dsh status [--dsh-bin PATH]
|
|
65
|
+
hcc dsh web [--mode hooks|cordis|off] [--dsh-bin PATH] [--dsh-home PATH] -- [dsh arguments]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
首次默认 `hooks`,以后不带 `--mode` 时沿用托管配置记录的选择。`status` 校验内容与可执行文件,不发模型请求。
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
hcc dsh setup --mode hooks # 官方兼容桥
|
|
72
|
+
hcc dsh setup --mode cordis # 原生协作插件
|
|
73
|
+
hcc dsh setup --mode off # 项目 overlay 不再加入协作插件
|
|
74
|
+
hcc dsh web --dsh-bin '/opt/harness/bin/dsh' --dsh-home '/path/to/dsh-home' -- --port 8080 --no-open
|
|
75
|
+
hcc dsh web --help # hello-cc 帮助
|
|
76
|
+
hcc dsh web -- --help # Harness Web 帮助
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`--dsh-bin` 是文件路径,`--dsh-home` 设置子进程 `DSH_HOME`;相对路径按执行目录解析。所有 Harness 参数放在 `--` 后,按原顺序传递,包括额外 `--patch`。模式变更影响后续启动,关闭当前自有 runtime 后重新启动才会生效。已有 hooks/native 会话不会被强行改绑为 Cordis;切换时使用新会话,保留旧会话的协作数据。
|
|
80
|
+
|
|
81
|
+
托管文件如下:
|
|
82
|
+
|
|
83
|
+
| 文件 | 用途 |
|
|
84
|
+
| --- | --- |
|
|
85
|
+
| `.hello-cc/dsh/hooks.json` | hello-cc 专用 SessionStart/UserPromptSubmit/PreToolUse/PostToolUse/Stop hooks |
|
|
86
|
+
| `.hello-cc/dsh/cordis.patch.yml` | 只加载选定注入器;off 为无插件 overlay |
|
|
87
|
+
| `.hello-cc/dsh/managed.json` | 模式、归属、路径、基线版本与 SHA256 |
|
|
88
|
+
|
|
89
|
+
Setup/disable/re-enable 幂等。升级或移动源码后可再次 setup 刷新绝对路径;手工修改、外来内容、符号链接、硬链接或归属冲突会保留原文件并返回错误。定制配置放在独立 overlay。Setup 不安装 dsh,不改用户 home,不复制密钥,不导入整份 Claude/Codex hooks。
|
|
90
|
+
|
|
91
|
+
每个 Agent 的真实 `session_id` 和绝对 `cwd` 路由到该工作区自己的 `.hello-cc/mesh.db`,不向父目录找项目。原始非 UUID ID 会保留,hash 碰撞、重复会话别名或其他 live transport 归属都会被拒绝。hooks 与 Cordis peer 禁止被 detected stop/restart 或 tmux attach 改成终端;服务日志面板仍可作为独立 shell peer。
|
|
92
|
+
|
|
93
|
+
hooks 基线 rc.2 会等待 SessionStart 返回后注入首轮,PreToolUse 用于活动跟踪,PostToolUse/Stop 用于消息投递;官方桥不消费 PreToolUse 的 `additionalContext`。这条兼容路线的 ACK 发生在 hook 输出成功后;Cordis 的 ACK 发生在对应上下文记录提交后。
|
|
94
|
+
|
|
95
|
+
## ACP 后台 worker
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
hcc native up
|
|
99
|
+
hcc native start --peer dsh-reviewer --provider dsh
|
|
100
|
+
hcc native send --peer dsh-reviewer --from coordinator --body '审查当前改动,报告验证结果'
|
|
101
|
+
hcc native deliveries --peer dsh-reviewer
|
|
102
|
+
hcc native events --peer dsh-reviewer
|
|
103
|
+
hcc native interrupt --peer dsh-reviewer
|
|
104
|
+
hcc native close --peer dsh-reviewer
|
|
105
|
+
hcc native start --peer dsh-reviewer --provider dsh --binary /absolute/path/to/dsh --resume last
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
默认从 PATH 查找官方 `dsh`;不在 PATH 时用 `--binary /absolute/path/to/dsh` 指定 launcher。worker 使用独立 `dsh --profile acp` 进程;send 返回入队回执,只有权威 prompt 完成事件才代表投递完成。恢复保留 provider session 身份和已有会话记忆;ACP 不回放整个 transcript,也不提供 fork/steer。Web 中使用 native 专属会话入口及审批响应,不能用 detected 注册状态操作代替 worker 生命周期。详见 [Native worker](native.zh-CN.md)。
|
|
109
|
+
|
|
110
|
+
## 可安装 bundle 与验收
|
|
111
|
+
|
|
112
|
+
包声明 `dsh.bundle`,overlay 位于 `lib/integrations/dsh.bundle.yml`,类型声明位于 `lib/integrations/dsh-cordis.d.ts`。元数据声明 `engines.dsh=0.2.0-rc.2`;插件还实际检查 agent/agent-loop/tools/session 包版本,遇到不匹配会在注册前拒绝启动。
|
|
113
|
+
|
|
114
|
+
本地项目 overlay 已可用。setup 的 managed manifest 记录 Cordis 模块位置;从源码切换到 npm 安装目录时会校验并迁移未编辑的配置,保留用户编辑过的文件。需要 profile 级安装时,先生成包含最新源码的 tarball,再通过官方包管理入口安装:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
npm pack --ignore-scripts
|
|
118
|
+
dsh plugin --profile web add /absolute/path/to/logicseek-hello-cc-1.0.1.tgz
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Harness 的 pnpm 策略要求明确允许原生依赖构建。若首次 add 返回 `ERR_PNPM_IGNORED_BUILDS`,在所选 profile 的 `pnpm-workspace.yaml` 中合并以下配置,然后重跑同一 add 命令;默认位置是 `~/.dsh/profiles/web/pnpm-workspace.yaml`,自定义 DSH_HOME 时以该目录为准。保留文件中已有设置,只批准候选包使用的固定版本:
|
|
122
|
+
|
|
123
|
+
```yaml
|
|
124
|
+
allowBuilds:
|
|
125
|
+
node-pty@1.2.0-beta.15: true
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
安装后由 Harness profile 的 `dsh.profile.bundles` 选择包;不要再同时加载项目 Cordis/hooks overlay。bundle 已通过实际 npm 安装、官方 add/重复 add/remove、隔离 profile 加载和真实模型工具调用。2026-10-02 已安装到本机真实 desktop profile 并热加载,配套 ACP 使用既有 DeepSeek 路由完成真实工具调用;初次桌面 sub2api 模型返回账户仅允许 Codex 官方客户端的 403;随后桌面默认模型已变为官方 DeepSeek,沿用当时配置的新建会话完成 hcc_state、hcc_message_send 和真实 completed 回合。原 sub2api 路由限制仍存在。npm 尚未发布。profile 插件安装/移除由 Harness 管理,项目 overlay 则使用 `setup --mode off` 关闭。
|
|
129
|
+
|
|
130
|
+
验证记录见 Cordis/native 验收 (源码目录: `docs/verification/2026-10-02-dsh-cordis-native.md`)、兼容桥记录 (源码目录: `docs/verification/2026-10-02-dsh-official-bridge.md`) 和详细接入计划 (源码目录: `docs/plans/2026-10-02-dsh-integration.md`)。真实模型验收在临时项目和自有进程中完成;既有会话与模型凭据保留;本机实际安装记录见 Mac 接入验收 (源码目录: `docs/verification/2026-10-02-dsh-device-install.md`)。尚未发布/部署,也没有跨设备验收或真实业务签收;隔离订单样例已完成报告、证据、交接、解锁与任务结束验证。
|
|
131
|
+
|
|
132
|
+
可用下面的安装验收脚本重现 npm 安装、官方 `plugin add` / 重复 add / remove,以及安装后的公共 CLI。`--run-live` 会沿用已有 DeepSeek 认证,验证 ACP 权限拒绝和一个隔离订单汇总任务;没有该参数时不调用真实模型。脚本只使用本次创建的 HOME、DSH_HOME、项目和进程。
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
node scripts/dsh-installed-acceptance.mjs /absolute/path/to/isolated-dsh-install \
|
|
136
|
+
--run-live --output-dir /absolute/path/to/acceptance-output
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
输出包含候选 tarball、SHA256 与安装回执、脱敏命令日志和正确的订单报告。权限探针在私有 profile 中为一个测试文件设置 ask 策略,实际收到 ACP 请求后拒绝并检查文件未生成;订单样例证明本地协作闭环,不替代真实业务签收。
|
package/docs/mcp.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Executor-scoped MCP coordination
|
|
2
|
+
|
|
3
|
+
Web-owned Codex App Server executors and HCC-hosted Codex/Claude/dsh native workers receive a dedicated stdio MCP server. Its temporary capability binds the project root, database, peer, worker owner and live runtime process identity. Configuration is passed through the provider session API; it does not modify global provider configuration, authentication or trust settings.
|
|
4
|
+
|
|
5
|
+
Tools expose coordination state, tasks, inbox, message sending, handoff, owned resource locks and local result records. They reuse the existing business commands. Model arguments cannot change the project/database/peer, force another peer's lock, or record publication/business acceptance. Task claiming, handoff and evidence recording never mark a task done automatically.
|
|
6
|
+
|
|
7
|
+
The internal entry point is `hcc --root PROJECT --db DATABASE mcp serve --peer PEER`. A private executor-issued capability is required; `--peer` alone grants no authority. Every call verifies the live executor and its database binding, and writes check ownership again in their business transaction. Closing the executor revokes and removes its capability. Unix permissions are 0700 for the temporary directory and 0600 for the capability file.
|
|
8
|
+
|
|
9
|
+
Native workers acquire the scoped capability before startup and revoke it before shutdown or failed-start cleanup. Codex uses thread config, Claude uses SDK mcpServers and dsh uses ACP session mcpServers. Arbitrary external CLI/TUI processes do not receive this capability automatically. See [the Chinese tool reference](mcp.zh-CN.md) for individual tools, [native workers](native.md) for provider approval behavior, and [Web handoff](web-handoff.zh-CN.md) for result review and lifecycle boundaries.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# 受执行器约束的 MCP 协作工具
|
|
2
|
+
|
|
3
|
+
Web 专用 Codex App Server,以及由 HCC 托管的 Codex/Claude/dsh native worker,都会获得专用 stdio MCP 配置。它固定项目 root、数据库、peer、worker owner 和活动 runtime 进程身份。配置通过 provider 会话 API 传入,不写用户的全局配置、账号或信任设置。
|
|
4
|
+
|
|
5
|
+
| 工具 | 作用 |
|
|
6
|
+
| --- | --- |
|
|
7
|
+
| `hcc_state` | 查询当前项目/peer 的协作状态 |
|
|
8
|
+
| `hcc_task_list` / `hcc_task_next` | 查询任务,返回已有任务或领取一个待办 |
|
|
9
|
+
| `hcc_inbox` | 读取当前 peer inbox,不自动确认消息已处理 |
|
|
10
|
+
| `hcc_message_send` | 以当前执行器 peer 身份写入项目消息总线 |
|
|
11
|
+
| `hcc_handoff` | 记录已归属任务的工作、测试和风险 |
|
|
12
|
+
| `hcc_lock_acquire` / `hcc_lock_release` | 获取或释放当前 peer 的资源锁 |
|
|
13
|
+
| `hcc_result_list` / `hcc_result_record` | 读取结果记录,写入已归属任务的本地证据 |
|
|
14
|
+
|
|
15
|
+
模型不能通过工具参数更换项目、数据库、peer,不能强制夺取别人的锁。每次调用检查原执行器仍存活且数据库 binding 仍由它持有;写入还在业务事务内复核身份与任务归属。执行器关闭、peer 被替换或能力凭据被撤销后,旧 MCP 进程不能继续写入。
|
|
16
|
+
|
|
17
|
+
内部入口为 `hcc --root PROJECT --db DATABASE mcp serve --peer PEER`。它需要执行器创建的临时私有 capability 文件及 token,单独填写 `--peer` 不授予身份。文件权限在 Unix 为目录 0700、文件 0600,执行器退出后删除。手工启动不会注册或覆盖已有 peer。
|
|
18
|
+
|
|
19
|
+
MCP 复用现有任务、消息、锁与 handoff 命令的业务规则。工具返回成功只说明对应协作操作完成;不会自动把任务改为 done。`hcc_result_record` 只报告本地证据,模型填写的记录会注明来源,不代替 Web 中人工记录的发布部署或业务验收。
|
|
20
|
+
|
|
21
|
+
native worker 在启动前建立受限 capability,关闭 worker 或启动失败清理前撤销。Codex 通过 thread config、Claude 通过 SDK mcpServers、dsh 通过 ACP session mcpServers 接入。任意外部 CLI/TUI 不会自动获得此权限。发信等写操作仍可能需要 provider 人工审批,处理方式见 [Native 指南](native.zh-CN.md)。
|
|
22
|
+
|
|
23
|
+
三种模型使用 MCP 发送协作消息的真实回执见 跨 provider 通信验收 (源码目录: `docs/verification/2026-10-02-native-live-communication.json`)。模型发信、接收方回复、ACK 和无回复循环均有单独检查;这不代替发布安装或业务任务验收。
|