dsh-completion-guard 0.8.2 → 0.8.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.
@@ -1,283 +0,0 @@
1
- # DSH Completion Guard:精准适配 DSH 0.1.7-rc.2 开发计划
2
-
3
- 计划版本:1.0。调研日期:2026-09-26。状态:可供后续会话执行的开发计划,尚未实施、测试候选或完成原生验收;不是已通过独立审查的冻结规格。
4
-
5
- 目标:将当前 `dsh-completion-guard@0.7.1` 迁移到 **仅支持 DSH `0.1.7-rc.2`**,保留普通工作、恢复反馈、proof、Goal 和受控 release 的职责边界。建议插件下一版使用 `0.8.0`,因为宿主支持范围收窄且涉及生命周期与持久化接入变化;实施入口核对版本是否已被占用,再确定最终版本。
6
-
7
- 本计划的编写授权不包含执行升级、安装日常 Profile、修改其他仓库、提交、推送或发布。后续会话的执行权限由用户当时的指令确定。计划中的发布流程是将来的交付条件。
8
-
9
- ## 1. 结论与适配范围
10
-
11
- 这次不是修改版本字符串即可完成的升级。rc.1 引入的 Agent 初始化、Session V4、Jobs 调用者身份和 shell 后台化变化都被 rc.2 继承;rc.2 又增加动态工具历史和请求构造变化。必须同时处理这两层。
12
-
13
- 最终只保留一条生产适配路径:DSH `0.1.7-rc.2`。不构建 rc.1 兼容分支,不保留旧宿主作为自动 fallback,也不使用 `>=0.1.7`、`^0.1.7` 或多个 RC 的并集。历史测试数据可以保留,但不能让历史 cohort 成为可运行的支持入口。
14
-
15
- 范围包括:依赖与包元数据、宿主图和已审计实现字节、生命周期、Session V4 证据、Jobs/终端结果、工具注册及卸载、现有文件观察和 Goal/Stop 接线、测试夹具、原生验收入口、文档与生成的 `dist/`。
16
-
17
- 不扩展到:实现定时任务插件、远程 SSH 文件认证、完整 Desktop 专项支持、浏览器/Computer Use 证据适配、新模型供应商、重写共享语义核或全面异步化历史投影。新宿主具备某项能力不等于 Guard 已能认证该能力。未覆盖的来源保持 unknown/unavailable,普通宿主工作仍按既有职责运行。
18
-
19
- ## 2. 已核实基线与证据
20
-
21
- 下表是调研时快照;实施入口重新核对可变状态,但目标版本保持 rc.2,不随 `latest` 漂移。
22
-
23
- | 对象 | 核实结果 |
24
- | --- | --- |
25
- | 本仓库 | `c6e14cd8aaf755e8cfb41a343c67e6e64659969c`,开始调研时工作区干净,包版本 `0.7.1` |
26
- | 当前支持声明 | `0.1.5-rc.2 || 0.1.5-rc.1`;开发依赖主体仍是 `0.1.5-rc.1`,Cordis 为 `4.0.2` |
27
- | 对比起点 | `dsh-v0.1.5-rc.2` → `fb2c4b9e698e30edb738bca4cf0618587db7d203` |
28
- | 中间版本 | `dsh-v0.1.7-rc.1` → `46a7f68b0922371ce7144b668b90e377d8e799f4`,2026-09-23 发布 |
29
- | 唯一目标 | `dsh-v0.1.7-rc.2` → `477b4f420553e8a52c2fbccc464d7561b239c443`,2026-09-24 发布 |
30
- | 目标 Cordis | 上游源码为 `4.0.4`;npm 中 DSH rc.2 依赖 `~4.0.4` |
31
- | Registry 初查 | 当前 cohort/开发依赖涉及的 36 个包名均查到目标版本元数据;这不是完整运行图,也没有证明 tarball 或安装字节 |
32
-
33
- 本次比较了三个 tag 的源码归档,而非只读 release notes。GitHub compare API 的文件列表只返回了 300 项,不能把该列表当作完整差异。rc.1 的说明自称汇总自 0.1.5-rc.3 以来的变化,所以只阅读 rc.1/rc.2 两份发布说明还会漏掉当前插件基线之前的一段差异;从 0.1.5-rc.2 起比较源码覆盖了这段缺口。
34
-
35
- 可复核材料:
36
-
37
- - [rc.1 官方发布说明](https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.1.7-rc.1)
38
- - [rc.2 官方发布说明](https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.1.7-rc.2)
39
- - [rc.1 到 rc.2 官方比较](https://github.com/deepseek-ai/deepseek-harness/compare/dsh-v0.1.7-rc.1...dsh-v0.1.7-rc.2)
40
- - [调研证据清单](dsh-0.1.7-rc.2-planning-evidence.json):完整 commit、所读上游文件的 SHA-256/固定链接,以及 36 项 Registry SRI。
41
-
42
- 证据清单只能用于重现调研,不得直接作为新的 `supported-host` 清单或原生通过记录。后续必须读取目标安装图,并核验实际包字节。
43
-
44
- ## 3. rc.1 与 rc.2 分别影响什么
45
-
46
- | 编号 | 来源与源码事实 | 当前插件影响 | 处理决定 |
47
- | --- | --- | --- | --- |
48
- | U01 | rc.1 将 `agent/session-start` 改为串行等待的 `agent/created`;`AgentRegistry.register()` 返回需等待的 effect disposer | `src/runtime.ts` 仍监听旧事件;多处测试/探针模拟旧回调 | 必改。迁移注册事件和等待顺序,首次请求之前完成 Guard 初始化;禁止两个事件同时监听 |
49
- | U02 | rc.1 将 `SESSION_FORMAT_VERSION` 从 3 改为 4,并调整 fork seed 闭合语义 | `host-workdir.ts` 显式要求 `header.version === 3`,并以 3 计算会话摘要 | 必改。V4 会话身份、fork/resume、真实日志恢复共同验证;禁止伪装成 V3 |
50
- | U03 | rc.1 弃用 `snapshotEvents/eventAt/ownEvents`;rc.2 实现仍保留完整内存日志及这些方法,上游允许既有调用暂缓迁移 | Guard 的同步投影、命令、观察器和部分证据读取依赖 `snapshotSessionEvents` | 保留既有单一入口作为本轮受控技术债,校正 V4 描述和校验;不新增任意同步历史扫描,不把弃用当成方法已删除 |
51
- | U04 | rc.1 的 Jobs `get(id, caller)` 从 `Agent`/`JobSnapshot` 改为 `SessionId`/`JobView` | `readExternalOperation()` 仍传整个 Agent,并用结构强转隐藏接口差异 | 必改。按真实类型传会话身份;错误和越权不得兜底成 running |
52
- | U05 | rc.1 的 bash/pwsh 在有 Jobs 服务时可把超时前台任务保留为后台任务;rc.2 保留该行为 | 旧规则主要依据 `run_in_background` 与尾部失败标记,默认前台无标记可能判为成功;新 promotion 文本尾部还有说明句 | 必改。识别未终结结果,不能仅替换 renderer hash 后继续沿用旧成功推断 |
53
- | U06 | rc.1 引入本地宿主访问远程工作区、异步可取消 shell/sandbox 接口与路径解析调整 | 现有 cwd 收据、文件观察和本地字节读取依赖已审计本地路由 | 重审本地执行路径;远端/未知 provider 不产出本地认证证据,不把远端路径交给本地 fs 回读 |
54
- | U07 | rc.1 改变插件加载/卸载与配置热更新:激活失败可能部分生效;安装启动会检查 DSH peers | 仅改 `engines.dsh` 不够;agent 作用域注册可能随插件卸载残留 | 所有支持声明一致;隔离测试重载、失败与清理;禁止通过 `allow-version` 绕过验收 |
55
- | U08 | rc.2 增加 `developer/message`、`toolHistory()`,工具增删通过 `headerSeq` 关联请求历史 | `derive`、root 来源判定、工具重载和恢复轨迹出现新事件 | 新事件可以参与宿主投影,但不能成为用户授权、业务成功或完成证据;覆盖增删后首次请求、resume 和 compact |
56
- | U09 | rc.2 修正 request series 起点,恢复首个 pre-step 压缩仍须标记新序列 | Guard 的恢复去重、触发原因和首轮注入可能被请求级变化扰动 | 以真实业务/持久化水位决定恢复;请求 header 变化本身不制造新待办 |
57
- | U10 | rc.2 的 `PreToolDecision.ask` 加入可本地化 `displayReason`;自动审阅拒绝与失败处理调整 | Guard 必须继续使用真实工具结果与单调拒绝,不可解析 UI 提示当审批事实 | 保持 `tools.guard` 的禁止语义;覆盖 allow/deny/cancel/ask、人工处理后的实际执行结果 |
58
- | U11 | rc.2 的 Goal 工具主要调整描述;Goal 初始化在 rc.1 已改到 `agent/created`,`complete`/`disarm` 仍存在 | 不需要重做 Goal 服务,但要验证 Guard 初始化及宿主工具 guard 顺序 | 保留 complete 前校验、持久化失败拒绝、resume 后 disarm 行为;不用工具描述文字匹配判断身份 |
59
- | U12 | rc.1 PTC 服务统一为 `ptc-runtime`,workflow 也更名;rc.2 保留调度/日志机制 | `run_code` 子调用证据和原生 composition 可能用到旧插件名/服务名 | 检查原生 fixture 与 PTC 日志真实入口;不为旧命名保留生产 shim |
60
-
61
- 此外,rc.2 新增定时任务与动态启用工具、默认关闭部分时间/定时能力、Inspector 不再默认提供。Guard 不应硬依赖这些默认组件;定时触发、工具注册通知和自动审阅消息均不能冒充根用户输入。界面外观、Office 预览等变化不进入此次实现范围。
62
-
63
- ### 3.1 关键源码定位
64
-
65
- 上游路径均相对于证据清单中的 rc.2 commit:
66
-
67
- - `packages/core/agent/src/runtime-types.ts`、`index.ts`:`agent/created`、serial 初始化、register/announce/dispose。
68
- - `packages/core/session/src/{types,index,fork,tool-history}.ts`:V4、仍存在的 deprecated API、fork 合成关闭、动态工具历史。
69
- - `packages/core/agent-loop/src/agent.ts`:`developer/message`、`headerSeq`、`startsSeries`。
70
- - `packages/jobs/jobs/src/{index,view}.ts`、`jobs-local/src/index.ts`:SessionId 调用者及 owner fence。
71
- - `packages/shell/tool-{bash,pwsh}/src/{index,render}.ts`:超时后台化和结果文本;bash 的 `renderPromoted()` 产生 still-running 标记并追加说明。
72
- - `packages/boot/app-boot/src/plugin-compatibility.ts`:安装前基于 DSH peers 检查,不依赖载入插件代码。
73
- - `packages/goal/{goal,tool-goal}/src/index.ts`、`packages/core/tools/src/index.ts`:Goal 生命周期与单调 tool guard。
74
-
75
- ## 4. 实施时必须维持的约束
76
-
77
- 1. **唯一宿主身份**:元数据、devDependencies、运行时支持集、CLI、fixture、文档均指向 rc.2。Cordis 单独定版;建议本插件 peer/dev 与首个 cohort 都固定 `4.0.4`,后续独立版本不自动视为支持。
78
- 2. **身份与能力分开**:目标版本字符串、Registry SRI、安装路径/模块字节、当前加载图、原生行为分别取证。版本匹配不能替代 host-lock。
79
- 3. **Session 格式与摘要版本分开**:DSH V4 不是 Guard protocol v4,也不是 digest v4。现有 digest 算法/共享字段原则上不变,真实 `version: 4` 作为已有字段输入;不可把它强制改回 3 以保住旧证书。
80
- 4. **来源不升级**:system/developer/plugin/scheduler/subagent 信息不因新格式而成为 root instruction;fork 的合成 `turn/end: forked` 不是正常完成。
81
- 5. **未结束不是成功**:后台化、取消、审批拒绝、未知输出、水位未持久化,均不能生成成功认证。后台任务 completed 也不自动证明测试通过或业务状态已满足。
82
- 6. **既有职责不回退**:普通工作通过宿主工具完成;unknown 证据不得让用户重做业务。恢复、prepare、checkpoint 使用同一当前投影,保留 0.7.1 的恢复反馈修复。
83
- 7. **不扩权清旧状态**:移除旧宿主运行支持不意味着删除历史记录、改写历史证书、自动迁移 release reservation 或默默解除禁止事项。
84
-
85
- ### 4.1 历史会话与旧宿主的区别
86
-
87
- 不再支持旧宿主,但 rc.2 可以打开上游已迁移的旧会话。因此需验证“rc.2 读取迁移后的 V4”以及历史证据降级,不需保留 Guard 自有 V3 运行分支或启动旧宿主进行长期兼容测试。
88
-
89
- 默认迁移政策:旧记录保留为历史;host-lock、会话身份或私有 ledger context 不匹配时,不提升为当前认证,也不自动重签。release reservation/settlement 或 restart intent 绑定旧 context 时,明确显示历史状态及当前不可认证原因。普通任务可以继续;严格契约必须重新建立当前有效的证明基础。不要自动删除或重新 anchor 旧 ledger。
90
-
91
- 若实际迁移改变了事件序号/来源引用,新增专门迁移诊断并保留原始引用;不得用序号猜测映射。该问题的修复限于安全读取与明确诊断,不扩展成旧宿主支持。
92
-
93
- ## 5. 工作包与执行顺序
94
-
95
- 依赖顺序:P0 → P1 → P2/P3/P4 → P5/P6 → P7 → P8。这是同一写入者的工作拆分,不要求并行代理;需要并行时先明确各自独立的路径或 worktree。
96
-
97
- ### P0:建立 rc.2 可重现输入
98
-
99
- 产出:升级分支、实际包图/来源清单、上游 API 对照表更新草案。
100
-
101
- - 核对 HEAD/dirty、当前用户权限和既有未完工作;需要隔离时使用 `codex/` 前缀的新分支/worktree。
102
- - 固定本计划给出的 rc.2 commit、npm 精确版本;查询时禁止依赖 dist-tag。
103
- - 下载实际需要的 rc.2 tgz,验证 SRI,记录 tarball digest、包 manifest、运行时模块文件 hash。
104
- - 从真实 rc.2 Web/Headless 安装解析 active graph 与 `.package-map.json`。不要假设旧的 33 行图依然完整;为保留、删除、新增的关键包逐项记录原因。
105
- - 审核 CLI、session/persistence、projection、goal/round-driver、jobs、shell/local/sandbox、plugin manager/boot 这些实际承担可信链的模块。是否扩入 host-lock 由它是否参与被认证行为决定,不把整个上游依赖树无差别固化。
106
- - Registry 清单可由单一数据源生成 TypeScript/JSON,或增加二者严格一致性检查;不要维护两份可漂移的手写清单。
107
-
108
- 退出条件:不存在未知版本、占位 hash 或用旧 SRI 替换版本号的行;缺少原生审计时保持 `auditedPlatforms: []` 与准确 provenance。
109
-
110
- ### P1:收窄依赖、cohort 与实现字节
111
-
112
- 主要文件:`package.json`、`pnpm-lock.yaml`、`src/domain/host-version.ts`、`host-lock.ts`、`host-resolver.ts`、`manifests/supported-host.v1.json`、host-lock CLI。
113
-
114
- - `dsh.engines.dsh`、`engines.dsh`、全部 DSH peers 与实际开发依赖统一精确 `0.1.7-rc.2`;Cordis 按 P0 的单独版本处理。保留 Goal optional 的产品语义,并验证缺少 Goal 时普通路径可用。
115
- - 新增目标专用包行模块(建议 `src/domain/rc017-rc2-host.ts`),活动 cohort 只有 rc.2。消除最低版本诊断被当成广义支持判定的可能。
116
- - 历史 cohort 若仍用于解码/负例,移入明确的历史数据路径;不再进入生产 resolver 的可接受集合或新安装选择器。不能仅保留一个 `supported=false` 标签却仍参与能力授权。
117
- - 重新审计 `AUDITED_FOREGROUND_BYTES` 和 `AUDITED_DEFAULT_WORKDIR_BYTES`。更新 `activeRendererModule()` 中旧版本正则、manifest 约束以及实际 entry 路径;从已验证的 published tgz 取 hash,而不是源码构建替代品。
118
- - 保留 hoisted/pnpm 路径、唯一 reachable 实例、root containment、混合版本/修改文件拒绝。CLI inspect/configure/strict-noop 必须与库一致。
119
-
120
- 退出条件:rc.2 正例通过;0.1.5 RC、0.1.7-rc.1、0.1.7 正式版、未来 RC、混合图和版本正确但字节被改均不受支持。`allow-version` 不能让 Guard host-lock 变绿。
121
-
122
- ### P2:Agent 初始化、注册与卸载
123
-
124
- 主要文件:`src/runtime.ts`、`src/commands/context-guard.ts`,生命周期测试及所有手工触发初始化的 fixture/probe。
125
-
126
- - 用 `agent/created` 替换旧监听;遵循 `undefined | Promise<undefined>` 回调约定。初始化失败向宿主返回清楚错误,不能留下一半注册却报告保护开启。
127
- - 真实 `AgentRegistry.register()`/factory 需要等待;测试不再依靠同步调用假处理器来模拟就绪。
128
- - 新会话 T0 保持安静,不写 Guard notice、不污染空白会话。T1 仅对真实 root input 注入;resume/compact 的恢复原因和去重保持准确。
129
- - 处理初始化取消、重复 attach、销毁、同一 Agent 的 disable/re-enable、配置重载。检查通过 `agent.ctx` 注册的 tool、guard、observer disposer 是否确实归插件所有;若不会自动清理,显式收集并在 owner dispose 时移除。
130
- - 动态启用时覆盖已经存在的 Agent;先核实上游有没有创建事件重放。没有时用 rc.2 支持的 registry 枚举接入一次,不冒用 startup/resume 来源,不重复注册。
131
- - `agent/created` 内禁止等待 `agent.whenIdle()` 或自身 owner disposal,避免 serial 初始化死锁。
132
-
133
- 退出条件:首个模型请求看见完整工具/guard;工具集合恰好一份;插件禁用后无残留拦截,重新启用后恢复;失败/取消无泄漏。
134
-
135
- ### P3:Session V4 与会话证据
136
-
137
- 主要文件:`src/domain/session-events.ts`、`host-workdir.ts`、`digest.ts`、`derive.ts`、`delivery.ts`、`src/core-v2/session.ts`、`src/raw-replay.ts`、`src/domain/private-ledger.ts`、`src/tools/{observe,evidence}.ts`。
138
-
139
- - 删除生产逻辑中硬编码的 V3 前提,用目标宿主常量/明确 V4 合同统一校验。`host-workdir` 与 `sessionHeaderForDigest` 必须计算相同会话引用。
140
- - 原有 `snapshotSessionEvents` 继续校验数组与连续事件 envelope。保持单一入口;禁止异常时返回空事件数组并推导成“已完成”。不新增同步历史读取 wrapper。
141
- - 对既有同步读取建立调用清单,说明其在精确 rc.2 中仍合法可运行、未来迁移未承诺。若实施中发现必要的新读取,优先使用现有投影/当前事件或受限异步读取;不要为这次升级重写整个核。
142
- - 验证新 `developer/message`、tool-addition/removal、`headerSeq`、request/context 变化不会成为 root、effect 或 acceptance。保留宿主未知必需事件校验与 Guard envelope 校验的原有分工。
143
- - 用真实 V4 Session/fork builder 构造 open-turn fork、compact/resume、重启及持久化往返;`forked`/interrupted turn 不生成普通 delivery。
144
- - 保持摘要算法及现有黄金向量不变;增加 V4 输入和迁移隔离的产品测试。若确需改共享字段/算法,按独立契约变更处理,不能顺手更新镜像来让测试通过。
145
- - 旧私有 ledger 的 host/session context 不匹配要保留并准确诊断;测试普通工作与严格 release 路径受到的影响不同。
146
-
147
- 退出条件:真实 V4 正例可闭合;损坏/未持久化/错误身份/子代理继承/旧证书不能闭合;恢复仍与 prepare/checkpoint 一致。
148
-
149
- ### P4:Jobs、shell 结果与文件观察
150
-
151
- 主要文件:`src/runtime.ts:readExternalOperation`、`src/domain/evidence.ts`、`host-workdir.ts`、`host-resolver.ts`、`src/tools/observe.ts`、`external-operation.ts`。
152
-
153
- - 将 Jobs 调用改成 rc.2 的真实类型和会话 ID;上游工具使用 `exec.agent?.id`。验证它与当前 Session 的身份一致,避免 `unknown as { get(..., Agent) }` 掩盖错误。
154
- - 同 owner 任务可读取;跨 owner、错误 job ID、已删除、服务缺失/抛错保持 unavailable/unknown。保留 running/stopping/completed/failed/killed 的含义,不把状态读取失败判为可等待。
155
- - 单独建前台终结、显式后台、超时 promoted 三类结果。尽可能用宿主真实持久化的可信结构字段;若只能使用文本,必须绑定审计过的 renderer,并识别标记后仍有说明的结构。
156
- - promotion 的部分 stdout 即使出现 PASS 或 `[exit code: 0]` 也不能关闭本次任务。原始 call、job id、owner、终结结果和独立状态回读必须形成同一目标链,才能用于后续认证;做不到则保持未认证,不重跑业务。
157
- - 重审 `[stopped: ...]`、sandbox runner failure、输出丢失/spill/truncation、取消、非零退出的结果;不要由 `isError=false` 推导进程成功。
158
- - 重审省略 workdir 与显式 workdir、本地文件 provider、符号链接和 Windows 路径。保留“原始调用+已审计 provider+当前 session+相同目标”的证据门槛。
159
- - PTC 的子调用保持 rootCallId/parent 归属,不因新 `ptc-runtime` 或并发顺序将外层成功复制给每个子调用。
160
-
161
- 退出条件:成功正例仍可认证;后台未完成、错 owner、失败、截断不明、远端未知 provider 均不误通过。审批/host 工具行为不由 Guard 另起一层重复决定。
162
-
163
- ### P5:Goal、动态工具与宿主功能组合
164
-
165
- - 在真实 rc.2 ToolRuntime 上验证 `tools.guard` 仍单调拒绝,后续 waterfall 的 allow 不能覆盖 Goal complete 拒绝。
166
- - 显式 Goal 启用/缺省未启用分别测试;证书缺失或 flush 失败时 complete 被挡住,证据齐全时允许;resume/compact 后 continuation/disarm 不变成自动完成。
167
- - 动态安装/启停 Guard 或相关工具后,同会话下一次请求的工具集合与实际 registry 一致;新增工具的 developer 通知不重设工作单元、覆盖用户禁止或重复恢复。
168
- - Auto review 拒绝、审阅失败、人工确认、取消分别记录实际工具结果;UI 显示文案及 `displayReason` 不产生权限或完成事实。
169
- - 对 scheduler/subagent/plugin 注入至少做来源负例;本版不承诺计划任务的端到端业务认证。
170
-
171
- ### P6:原生验收入口与说明更新
172
-
173
- 主要文件:`scripts/native_acceptance.py`、`native_host_acceptance.py`、`native_host_probe*.mjs`、`native_release_fixture_v070.mjs`、关联 schema/单测、`UPSTREAM_API_AUDIT.md`、README 中英文、两份 changelog、兼容/host-lock/验收文档。
174
-
175
- - 修改真实 native composition、V4 日志路径/读回、等待 Agent 就绪的时序与 rc.2 CLI 参数;参数以目标发行版 `--help`/源码为准,不猜测旧参数仍有效。
176
- - 原生入口保留当前 versioned annex 接口;若新增字段/必修 gate 改变语义,显式升级 schema 并更新全部生产者/验证者,禁止通过手写 transcript 替代。
177
- - `UPSTREAM_API_AUDIT.md` 以 rc.2 为当前适配表,清楚标明同步读取仍是既有 deprecated 依赖、尚未实现的远端能力与 restart 认证限制。
178
- - 文档先说明用户须升级到 rc.2、安装插件并重建 host-lock/重启,再解释诊断。历史 release 文档保持历史原文;当前 README 与兼容声明只写 rc.2。
179
- - 0.7.1 recovery 修复、普通工具职责和显式 proof/release 限制保持可读。不能宣称新 DSH 默认包含 Inspector、Goal 或定时能力。
180
- - 更新 `validation-map.json`、修复家族列表或测试入口,让新增文件参与相应检查;测试仅换名字但未走新生命周期不算覆盖。
181
-
182
- ### P7:源码候选与精确制品
183
-
184
- - 完成下节矩阵;有限审查聚焦 U01–U12 和验收 A01–A16,不另开无边界功能审查。
185
- - 冻结最终插件版本、包文件清单、文档、manifests 和 committed `dist/`;运行完整候选检查。
186
- - 在后续获得相应提交/远程操作授权后,检查 exact-commit CI。未授权时交付本地候选与待执行门槛,不自行推送。
187
- - 从 clean source 用仓库 canonical packer 生成一次冻结集合:tgz、`SHA256SUMS.txt`、`release-artifact.json`;重复 pack 仅用于确认相同输入的字节确定性,不在不同平台重打包。
188
-
189
- ### P8:原生与发布交接
190
-
191
- - 先用当前仓库 versioned native entrypoint 的 `--preflight` 检查版本、输入 identity、能力和路径,再启动隔离 macOS/Windows 验收。
192
- - 两个平台使用相同冻结 tgz,分别验证 Web/Headless、安装、严格第二次 no-op、package parity、host-lock 读回、真实 loaded tools/guard、持久化恢复、Web restart、shell shim 与清理。
193
- - 真实模型最小场景覆盖:普通文件修改+测试+回答;中途 compact/resume 后继续剩余工作;前台转后台后等待真实结果;证据齐全/不全的显式 Goal complete。使用临时资产,不重放用户历史业务,不借生产发布验证。
194
- - 没有某平台、登录或模型执行条件时,记录 pending 的具体 owner/恢复条件;不能把 capability skip 算作通过,也不因此阻止已授权的独立源码工作。
195
- - 发布、日常 Profile 升级和 codex-sync 消费者登记需要后续用户授权;这些不属于本次“写开发计划”的完成条件。
196
-
197
- ## 6. 验收矩阵
198
-
199
- | ID | 场景与独立期望 | 最低证据层 |
200
- | --- | --- | --- |
201
- | A01 | 支持声明仅 rc.2;旧 RC/未来版本/混合图/错 SRI 拒绝;目标完整图成功 | 元数据、真实包图、host-lock 单测 |
202
- | A02 | `agent/created` 完成后才有首个请求;init 失败/取消不留下工具,空白会话无多余 notice | 真实 AgentRegistry/ToolRuntime composition |
203
- | A03 | 同一 Agent 的安装、禁用、再启用、卸载无重复 tool/guard/listener;已有会话动态生效 | composition + 原生 Web |
204
- | A04 | V4 新会话/恢复/compact 具有稳定且真实的会话 digest;V3 header 不作为 V4 接受 | Session 构造/持久化往返 |
205
- | A05 | fork open turn 的 `forked` 关闭不能当正常完成,父/子证据不能交叉认证 | 真实 fork seed + 投影 |
206
- | A06 | developer/tool registry/scheduler/plugin/subagent 事件不造 root 权限、不造 effect、不重复恢复 | 新事件 fixture + 注册入口 |
207
- | A07 | 前台无失败标记的真实正常退出可闭合;非零/取消/runner failure 不通过 | 审计 renderer + 真实 shell |
208
- | A08 | 超时 promoted 即使 stdout 含 PASS/exit 0 仍未终结;完成后同 job/owner/目标的真实终结与回读才可闭合 | bash 与 pwsh;真实 Jobs |
209
- | A09 | Jobs caller 使用 SessionId,同 owner 可读,错 owner/未知/删除/抛错不变成 running | 真实 JobsLocal + Guard reader |
210
- | A10 | 省略 cwd 的本地正例可认证;错误 provider、远端路径、错 session、篡改模块字节拒绝 | workdir observer + active graph |
211
- | A11 | write/edit/read 和 PTC 子调用保留目标/来源关联;外层 success 不能替代子调用失败 | 已注册工具 + 持久化事件 |
212
- | A12 | ordinary 模式与 0.7.1 recovery/prepare/checkpoint 一致;不索要已完成测试,不让证据不足触发重复业务 | 既有 recovery 家族 + 新 V4 组合 |
213
- | A13 | Goal 缺失正常退化;complete 有证书允许、缺证据或 flush 失败拒绝;单调 guard 不可覆盖 | 真实 Goal/ToolRuntime |
214
- | A14 | rc.2 已迁移旧会话:历史证书/ledger 不重签、不删除、不升级当前权限;普通继续仍可行 | 迁移 fixture + 隔离原生恢复 |
215
- | A15 | 两平台的 Web/Headless 同一 tgz 安装、strict-noop、parity、host-lock、restart/cleanup 可读回 | versioned native annex |
216
- | A16 | 最小真实模型业务能继续、等待并正确结束;单元/人工注入探针不能替代此项 | 原生模型执行独立记录 |
217
-
218
- 建议新增聚焦测试文件 `v080-rc017-{host,lifecycle,session,jobs,shell,hot-reload}.test.ts`,也可按现有目录约定拆分;文件名不是验收标准。优先修改现有拥有对应不变量的测试,再增加未覆盖场景。
219
-
220
- 现有优先复用:`v051-host-version-production`、`v051-dsh015-adaptation`、`v051-activation-order`、`v051-goal-lifecycle-composed`、`v051-host-loop`、`v051-wait-lifecycle`、`v041-session-events`、`v070-structured-host-error`、`host-workdir-v070`、`native-file-v2`、`persistence-control-v6`、`v6-recovery-feedback`、`private-ledger-v070`、`tools/external-operation`、`tool-surface`、`artifact-entry` 及 native Python 测试。保留其行为断言,替换掉只认识旧生命周期的假实现。
221
-
222
- ## 7. 检查命令与证据失效规则
223
-
224
- 修复时先最小 reproducer 和 owning Vitest 文件;同一不变量再次漏修,合并入口×字段×状态检查,不反复跑全矩阵。`node tests/run-repair-families.mjs --list` 选择已存在的家族,按本次风险扩展,不能用 named bundle 替代最终候选检查。
225
-
226
- 最终本地候选至少执行仓库 AGENTS 规定的完整矩阵:
227
-
228
- ```sh
229
- pnpm run typecheck
230
- pnpm run lint
231
- pnpm test
232
- pnpm run test:release-pack
233
- pnpm run test:stats
234
- pnpm run build
235
- pnpm run pack:check
236
- python scripts/audit_repository_documentation.py .
237
- python -m unittest discover -s tests -p 'audit_repository_documentation_test.py'
238
- git diff --check
239
- ```
240
-
241
- 上面 `python` 指已验证的 Python 3.11+ 解释器。自动串行运行时启用 shell 的失败传播。更新生成物后必须确认重复 build 不再变化;当候选 `dist/` 已提交/应当最新时执行 `git diff --exit-code -- dist`,不能撤销正确生成物去满足旧 HEAD。
242
-
243
- 另按改动执行 mirror/conformance/digest 与 native entrypoint 单测。共享算法、schema 或镜像变更才触发对应跨语言产消链重验;仅传入 Session `version:4` 不自动要求改共享契约。保留已通过的相同输入证据,提交/打 tag 不是重跑无关测试的理由。
244
-
245
- CI portability 按本仓库现有 Ubuntu/macOS/Windows × Node 22/24 策略,在 exact main candidate/manual dispatch 上通过;它不能替代原生宿主运行。
246
-
247
- 原生命令模板(实际参数由更新后的入口 `--help` 核对):
248
-
249
- ```sh
250
- python scripts/native_acceptance.py --gate-profile host_bound \
251
- --repo-root <clean-candidate> --runtime-root <exact-rc2-runtime> \
252
- --web-cohort <registered-rc2-core-id> --headless-cohort <registered-rc2-core-id> \
253
- --web-market-version <exact-version-or-none> \
254
- --artifact <frozen.tgz> --artifact-sha256 <sha256> \
255
- --source-commit <full-commit> --output <unused-outside-repository-annex.json> \
256
- --preflight
257
- ```
258
-
259
- preflight 通过后移除该 flag 执行;结果路径和 transfer receipt 用不同且未使用的路径。官方 plugin manager 不能直接当作旧 dshmarket;没有对应 market 就显式 `none`,不能虚构版本。宿主自行重启的验收不等于 Guard 已能认证 market restart。
260
-
261
- 包内容或 `gitHead` 变化均产生新的制品身份。准确区分源码检查、CI、npm 字节、安装、加载、真实模型、发布与公开回读。发布准备完成后如获授权,使用已验收 tgz,读回 tag、registry integrity、下载 tgz、嵌入 gitHead 与 Release target。
262
-
263
- ## 8. 待实施核实事项与停止规则
264
-
265
- | 事项 | 当前证据边界 | 关闭方式 |
266
- | --- | --- | --- |
267
- | rc.2 实际 Web/Headless 关键图及包数量 | 已读 36 项 Registry 元数据,未安装审计 | P0 解析两种 composition,列出增删及真实 bytes |
268
- | 插件热卸载的 effect ownership、已有 Agent 接入 | 上游已改框架行为,当前 Guard 注册所有权尚未动态验证 | P2/P5 实测,必要时显式 disposer 与枚举接入 |
269
- | promotion 到终结结果的可认证链 | 已证实上游可后台化;Guard 端尚未接线测试 | P4/A08;链不全则明确保留 unavailable,不伪造正例 |
270
- | 迁移后旧私有 ledger 的用户诊断 | 现有 digest 绑定 header/host;新 context 必然需要严格区分 | P3/A14 保留历史、准确诊断,不自动 reanchor |
271
- | 原生平台和真实模型可用性 | 本轮未运行 | P8/A15/A16 单独留证;无条件时明确 pending |
272
-
273
- 开发完成条件:P0–P6 实现及 A01–A14 满足,完整确定性检查通过,无开放的可复现身份/权限/错误完成 P1,文档与包声明一致,`dist/` 当前。此时可称“源码候选完成”。
274
-
275
- “精准适配 rc.2 已验收”还要求 P7/P8 和 A15/A16 的精确制品与原生证据。未完成这部分只能报告具体覆盖范围,不能宣称所有宿主/模型行为已通过。外部发布与日常安装按后续授权执行,分别报告。
276
-
277
- 新复现的权限提升、错身份认证、数据损坏或错误完成是阻断项;不相关 UI 优化、全部异步读取重构、完整远程/调度功能属于后续工作。完成既定门槛即可交付,不无限增加审查维度。
278
-
279
- ## 9. 给下一会话的执行提示
280
-
281
- 可将以下内容作为新会话任务,按需要另行补充提交、推送、安装或发布权限:
282
-
283
- > 请按 `docs/DEVELOPMENT_PLAN_DSH_0_1_7_RC2.md` 实施 DSH Completion Guard 对 DSH 0.1.7-rc.2 的精准适配,并读取配套 planning-evidence.json。先刷新仓库基线与上游身份,保留无关工作;仅支持 rc.2,不保留历史宿主 fallback。按 P0–P8 推进可执行的工作,优先关闭 lifecycle、Session V4、Jobs SessionId、shell promotion 和宿主字节审计问题,保留 0.7.1 恢复反馈与既有 proof/Goal/release 边界。逐项返回 A01–A16 的证据状态与未完成条件。不要把本计划视为日常 Profile 变更、Git 推送或发布授权。
@@ -1,85 +0,0 @@
1
- # Completion Guard:DSH RC.2 与 Desktop 开发任务
2
-
3
- 本任务在 `dsh-context-guard` 仓库内独立完成。公开仓库及 npm 产品名是 `dsh-completion-guard`,Cordis entry id 仍为 `context-guard`。目标是把最低支持版本提高到 DSH `0.2.0-rc.2`,支持官方 Desktop,并在本次适配中完成全仓审阅、修复已复现的功能、性能和安全问题。实现完成后交给另一个 Codex 线程独立验收;本文件不是已经通过的实现或发布证明。
4
-
5
- ## 1. 基线与工作边界
6
-
7
- 2026-09-30 的调查基线是 `b18d31dda7fdecae5c6496446f33238ea945a93a`、插件 `0.8.1`,调查开始时工作区干净。启动开发时重新读取 HEAD、分支、dirty paths、AGENTS 和工具链,保留非本任务改动。基线变化不自动改变本文件的功能要求。
8
-
9
- 最低版本是固定策略 `>=0.2.0-rc.2`,最新实际测试宿主暂定 RC.2;构建依赖和测试 runtime 则使用精确 RC.2。三者分别记录。未来升级不自动追随 registry `latest` 提高下限;高于下限的宿主不能因为未列入测试清单而被拒绝。实际 API、完整性或行为不合格仍必须拒绝相应能力。
10
-
11
- 本轮准备已把本机 Web runtime 升至 RC.2,官方 Desktop 也为 RC.2。现有 Guard 保留安装但暂时禁用;旧 RC.1 host lock 保留用于恢复,不能直接用于 RC.2。当前状态及私有回读在 codex-sync 的 RC.2 准备记录中,不能当成新插件验收。
12
-
13
- 本仓库自行设计、实现、检查和交付,不依赖 Session Insights 的进度或发布。开发 harness 不修改另一个插件、codex-sync 的消费者 pins、日常 runtime 或 Desktop app bundle。需要消费者适配时返回明确的适配要求。不要发布 npm、创建 tag/Release、推送、迁移日常 profile 或启用日常插件;这些是后续独立操作。分支采用 `codex/` 前缀,按平台权限执行。
14
-
15
- ## 2. 已核实的上游与源码事实
16
-
17
- - [官方 RC.2 发布页](https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.2.0-rc.2),tag `dsh-v0.2.0-rc.2`,发布关联提交 `639ed01`。相关变化包括 Desktop 官方 dsh 命令、图形启动的登录 shell 环境、PowerShell 完成状态识别、定时消息语义及实验性异步问答。
18
- - RC.2 官方 `dsh-app-boot` 的 `evaluatePluginCompatibility()` 使用 `includePrerelease: true` 检查 DSH peers。必须用这个真实消费者及市场消费者验证范围,不能只测普通 node-semver。
19
- - 现有 `src/domain/host-version.ts` 已把最低版本与 `HOST_VALIDATED_VERSIONS` 分离;`host-lock.ts`、`host-trust.ts`、`host-resolver.ts` 和 `host-contract-program.ts` 已有 graph-derived registry rebind 路径。保留它,不能退回“每个新版本加一行才支持”的实现。
20
- - `HostProfileKind` 只有 `web | headless`;profile 识别、目标图、lock 注入和 native 工具均没有正式 Desktop 分支。`resolveActiveProfileHostLock()` 用 Web bundle/market 推断 profile,Desktop 也包含 Web app bundle,不能沿用该推断。
21
- - 现有源码测试基线(RC.1 测试依赖):`pnpm test` 为 169 个文件通过、1 个文件跳过;2812 个测试通过、7 个跳过。只建立现有源码基线,不建立 RC.2、Desktop、新 tgz 或新模型行为证据。
22
-
23
- ## 3. 本次问题登记
24
-
25
- | ID | 级别与状态 | 定位与影响 | 结案要求 |
26
- | --- | --- | --- | --- |
27
- | CG-RC2-001 | 必须实现;已确认 | package.json 的双层 engines/DSH peers,`host-version.ts`、RC.1 manifest/dev pins:下限仍为 RC.1 | 所有当前准入面统一 RC.2 下限;RC.1 拒绝,后续 RC/stable 接受版本准入;历史记录保持原事实 |
28
- | CG-RC2-002 | 必须实现;已确认 | `host-lock.ts`、`host-resolver.ts`、`config.ts`、bin、native scripts:Desktop 缺失且可被误识别为 Web | 显式 Desktop 身份、正确官方 CLI/Node/包图、独立 profile-bound lock 和生命周期证据 |
29
- | CG-RC2-003 | P2;强制测量后结案 | `runtime.ts` 的 `rebuild()`、`sync()`,`session-events.ts` 与 private-ledger:反复全日志投影;host audit 是同步 I/O | 测事件数/entry 次数/文件读取/耗时和峰值资源;可复现回退必须修复。不得凭猜测新增跨 entry 信任缓存 |
30
- | CG-RC2-004 | 语义适配;强制设计与复现 | RC.2 schedule 产生 `source.kind=schedule` 的 user message;`derive.ts` 对 root input 只接受 `kind=user` | 明确定时指令/用户授权继承策略,覆盖真实生产路径;不能简单把所有 schedule 或 role=user 都升级成 root authority |
31
- | CG-RC2-005 | 审阅风险;待复现 | RC.2 异步问答、late answer、取消、resume、子代理通知与 Stop/Goal/boundary 状态交互 | 无提前结案、重复 capture、错误暂停或旧证书复用;实验功能关闭/开启分别检查适用行为 |
32
-
33
- CG-RC2-004 的合成对照已在提交的 dist/domain 运行:相同 user-role 文本,`source.kind=user` 得到 `realRootInputSeen=true`,`kind=schedule` 得到 false。它证明现行来源分类差异,尚不证明新的授权策略应当如何实现。必须核对实际定时任务记录、用户授权与宿主投递关系,再决定适配或保留限制并给出理由。
34
-
35
- 对于新增发现:先建立最小复现和稳定 ID,记录影响、共同原因、修复与回归。不能把猜测写成已确认漏洞,也不能以“这只是审阅”略过已复现的本次范围内问题。低价值重构和新产品功能可列 backlog,必须说明边界。
36
-
37
- ## 4. 设计与实现要求
38
-
39
- ### 版本准入与宿主资格
40
-
41
- 1. 同步顶层 `engines.dsh`、`dsh.engines.dsh`、各 DSH peer 最低值、运行时 floor、支持 manifest、生成工具、当前 README/兼容性/迁移文档及 fixture identity。dev pins 和实际测试 runtime 精确绑定 RC.2;Cordis 单独验证,不因 DSH 版本一起随意放宽。
42
- 2. 版本向量至少含:RC.1、RC.2、RC.3、0.2.0 stable、0.2.1-rc.1、0.3.0-rc.1、1.0.0、带 build metadata 的 RC.2、非法值。未来版本仅做消费者/生产准入合成测试,不谎称真实宿主验收。
43
- 3. RC.2 关键包从官方 archive/SRI 重新研究,报告实际 API/程序/依赖与 RC.1 差异。保留旧 manifest 的历史用途;新的资格证明必须绑定所有实际选中 executable/JSON inventory、ESM/CJS 路由、Node conditions 和依赖身份。
44
- 4. 验证“新但兼容的程序经生产 rebind 可以资格化”和“API/行为/字节/路由破坏被拒绝”。不能用测试 seam、复制已签信任、仅换版本字串或只扩 cohort 表来替代。
45
- 5. 核对 Goal、jobs、shell、fs、session flush 的必要/可选能力边界;缺可选 Goal 时只按既定策略禁用 Goal,不把整套 core 误报支持或全部瘫痪。
46
-
47
- ### Desktop
48
-
49
- 1. 使用官方 app 的命令 carrier 与 bundled Node/pnpm。Web/Headless 仍使用显式管理的 CLI runtime。PATH 上同名 dsh、系统 Node、临时 npm CLI 均不是 Desktop 身份替代物。
50
- 2. 读取 app/runtime/host/primary metadata、profile bundles、实际 import graph 和真实解析路由。app.asar/安装型图没有 pnpm `.package-map.json` 时设计真实适配器;不能伪造 map,也不能把 app bundle 解包后当作官方运行图。
51
- 3. Desktop profile 身份独立进入 digest、trust receipt、lock、config schema 和 native annex。Web lock 或证书不得复制到 Desktop;app 或 profile 路径别名、同名包 shadow、混合图、错误 Node startup conditions 均需负例。
52
- 4. 扩展 repository-owned host-lock/native 工具:显式选择 Desktop,不要求 CLI 启动桌面 UI;通过官方图形启动/退出处理生命周期,安装前检查主程序及 host children 已退出,尤其 Windows 原生模块占用。
53
- 5. 升级与重装保留模型/MCP、bundles、禁用偏好、skins、日常数据和 account state;备份、atomic apply、失败恢复及第二次严格 no-op。不要改 app.asar 或绕过 Desktop 保留 profile 管理。
54
-
55
- ### 全仓审阅与性能
56
-
57
- 至少逐项覆盖:root capture/附件及引用授权、work units/supersession、evidence/target/locator/digest、checkpoint/closure/Stop、Goal、recovery/compaction/replay、private ledger/损坏恢复、external operations/jobs/用户暂停、release reservation/settlement、shell/pwsh/fs/native adapters、host version/graph/trust/rebind、CLI/安装/迁移、公开隐私、双语文档、pack inventory/CI。包含提交的 dist、manifests、tests、scripts、bin 和 npm 文件表;文档里的宣称也要对照实际执行入口。
58
-
59
- 提交覆盖表:模块/阅读位置/生产入口/现有测试/新增复现/结案或残余风险。审阅不是给所有目录标一个“看过”。特别检查 RC.2 PowerShell 末尾空格/退出码、unknown tool outcome 不能成为成功或确定失败、late user answer 不能串 turn、历史工具文本不能创建 authority。
60
-
61
- 性能至少对 0、100、1000、10000 个事件和短/长私有账本测量,包含长 tool output;同一宿主同一环境各 5 次,报告中位数与 p95、物理读取次数/字节、投影次数和峰值 RSS。性能 harness 的 synthetic/source/native 分类必须明确。修复重复解析/无界输入/泄漏时保留新鲜的 pre-effect host validation、durability 与 fail-closed;无可复现回退可用有依据的“无需变更”结案。
62
-
63
- ## 5. 开发、打包与验收
64
-
65
- 先关闭复现问题,再做完整 candidate gate。按 AGENTS 的完整矩阵:typecheck、lint、Vitest、release-pack tests、stats tests、build、pack dry run、文档 audit 及其测试、`git diff --check`;build 后核对 dist 无意外漂移。选择器和 repair-families 可用于修复阶段,不代替 freeze 矩阵。
66
-
67
- 最终按仓库干净源码要求提交一个本任务候选 commit(若接收线程的实际权限允许);不要混入 unrelated changes。使用 `scripts/release-pack.mjs` 生成唯一 tgz、SHA256SUMS 和 release-artifact。新版本原暂建议 0.9.0;独立复核确认未改变任务、证书或数据协议,按维护者的版本连续性要求采用 0.8.2;不占用已发布版本。不在不同平台重打包,不提前发布。
68
-
69
- | Gate | 独立验收要检查的事实 |
70
- | --- | --- |
71
- | G1 源码与准入 | RC.2 floor、真实 DSH/market 消费者、未来版本合成向量、Core/Goal 资格与拒绝路径;全仓问题登记结案 |
72
- | G2 portable/CI | repository-owned 实际生产入口、RC.2 契约、跨 OS/Node 矩阵;不将 fixture pass 报成原生通过 |
73
- | G3 制品 | 全 commit、tgz SHA256、嵌入 gitHead、安装文件 inventory、clean source、dist 同步 |
74
- | G4 macOS native | 同一 tgz 的 Web、Headless、官方 Desktop 安装、strict no-op、lock/字节/路由、启动/取消/重启/恢复、卸载/清理与状态还原 |
75
- | G5 Windows native | 独立执行同样三种宿主;Desktop 真 app、pwsh/shim/原生模块占用,不用 macOS 或 CI 代替 |
76
- | G6 行为与页面 | 非空真实生产路径的 capture→checkpoint→Stop,未满足拒绝、满足允许、暂停/等待/Goal/compaction;Desktop 实际设置和插件状态;必要的模型批次单独绑定来源和结果 |
77
- | G7 文档 | 中英文 README/CHANGELOG/兼容性/升级操作清晰且事实一致;最终字节 cold review,公开面无私有路径/真实会话 |
78
-
79
- 初始开发验收至少完成 G1–G3 和可用平台的 G4/G5;缺少平台或模型能力必须保留 pending,不能整体标“支持 Desktop 已验收”。独立 Codex 验收最终关闭所需平台/模型/UI gates,输出逐项结果,不把发布或消费者 apply 混入开发结论。真实模型沿用现有登录,不因隔离 HOME 重做登录;未运行的部分明确给出 owner 和 resume event。
80
-
81
- ## 6. 返回给独立验收线程
82
-
83
- 交付一个聚合 handback:候选 commit/dirty 状态与任务 diff;稳定问题 ID、复现及修复解释;全仓审阅覆盖与性能数据;源码/CI/制品/native/模型/UI 各自的命令、结果和 subject identity;唯一 tgz 与 checksum/inventory;final reader-review;公开可用的迁移说明;仍待验收项、未执行外部操作和恢复方法。使用 `agent-handoff/v1`,不要返回真实会话或原始凭据日志。
84
-
85
- 独立 Codex 线程先阅读这个 handback、检查 subject 和差异,再对缺失或失效的 gate 验收。修复回合只重跑受影响 gates,重复同类失败时审查共同原因及所有入口,不重复无关通过项。
@@ -1,57 +0,0 @@
1
- # DSH 0.1.7-rc.2 adaptation evidence
2
-
3
- Status: **source-stage snapshot, before exact-artifact CI/native acceptance and publication**. Later artifact and publication receipts supersede the corresponding pending statuses in this historical snapshot; this document does not assert their outcome. This record follows [the development plan](DEVELOPMENT_PLAN_DSH_0_1_7_RC2.md) and its unchanged [planning inputs](dsh-0.1.7-rc.2-planning-evidence.json). It does not authorize daily-profile changes, Git push or publication.
4
-
5
- ## Identity and phase status
6
-
7
- Baseline: `c6e14cd8aaf755e8cfb41a343c67e6e64659969c` (0.7.1), checked against remote main before editing. Upstream `dsh-v0.1.7-rc.2` resolved to `477b4f420553e8a52c2fbccc464d7561b239c443`. Existing plan/evidence files were preserved. Work is on `codex/dsh-017-rc2`. The canonical packer records the final exact commit in `release-artifact.json` and the package `gitHead`; this source document does not predict that self-referential identity.
8
-
9
- - **P0/P1:** 46 critical package tarballs verified against SRI; tarball, executable and package-manifest SHA-256 recorded in `manifests/rc017-rc2-byte-audit.json`. Active TypeScript and JSON identities agree; only rc.2 is admitted. Both CLI profile templates compose in an isolated home. Runtime graph and installed bytes were read back without changing the supplied runtime. Populated profile-local plugin graphs remain native acceptance work.
10
- - **P2–P5:** lifecycle ownership, V4 and flat ToolMessage reading, Jobs SessionId, shell promotion/truncation and Goal composition changes are implemented. The limitations below remain explicit.
11
- - **P6:** current English/Chinese README and changelogs, compatibility, upgrade and API audit updated. Versioned native drivers retain their annex schema. Their injected tool traces now include V4 turn/step/advertised-call relationships and matched compaction records, checked by the published V4 restore validator with a missing-advertisement negative. This is distinct from running the driver on a frozen artifact.
12
- - **P7:** local checks are recorded below. Local candidate commit and canonical packing were subsequently authorized by the coordinating installation task. Exact identity and reproducibility are delivered in the external artifact receipt. Remote CI and publication are not authorized by that local preparation.
13
- - **P8:** no same-tgz macOS/Windows Web/Headless or real-model acceptance. No profile switch, push, tag, npm upload or Release is authorized by this record.
14
-
15
- ## A01–A16
16
-
17
- “Covered” below means the listed source/composition evidence only. A pending native condition is not a pass.
18
-
19
- | ID | Current evidence | Unfinished condition |
20
- | --- | --- | --- |
21
- | A01 | Exact rc.2 metadata; old/future/stable/mixed/missing/SRI negative cases; single 46-row cohort; real runtime graph and module/manifest bytes pass | Populated Web/Headless installed Guard graph and exact artifact |
22
- | A02 | Real scoped AgentRegistry awaited registration, T0 seq=0, cancelled-signal rejection and later initializer failure rollback; real AgentLoop first request and V4 JSONL restore | Native first-request observation |
23
- | A03 | Same-Agent disable/re-enable, existing-Agent attachment, disposal cleanup through real ToolRuntime | Native Web configuration reload; independently count all guard/listener registrations across scoped-Agent reload |
24
- | A04 | Actual V4 header digest/restore; V3 rejected as current identity; real loop persisted restore | Native compact/restart identity on the exact artifact |
25
- | A05 | Actual fork builder closes open turn as `forked`; no ordinary delivery from that close; existing child/session identity negatives | Full parent/child native fork certificate attempt |
26
- | A06 | Developer/tool-registry/scheduler/subagent/plugin source negatives; existing source attribution and recovery suites | Dynamic native registry notifications and scheduled/subagent end-to-end behavior are not certified |
27
- | A07 | Actual published bash/pwsh renderer positive/nonzero/stopped/runner-failure/truncation cases; isolated actual bash success/nonzero/cancel execution passed | PowerShell execution unavailable on this host; exact-artifact native shell still pending |
28
- | A08 | Promotion containing PASS/exit 0 remains unknown even with trailing prose; actual bash promotion plus Jobs owner fence and completed readback passed | The original-call/job/owner/terminal/target-readback certification chain remains unavailable. A completed Jobs row alone cannot upgrade partial output; no business rerun is requested |
29
- | A09 | Real JobsLocal same SessionId, foreign owner, mismatched Agent/session, unknown/deleted job and terminal read; throwing service remains unavailable | Native application Jobs integration on the exact artifact |
30
- | A10 | Omitted workdir positive, wrong session/provider/path and modified module negatives; real installed policy/executor class and byte checks | Windows actual filesystem/provider behavior; remote providers remain unavailable |
31
- | A11 | Existing native-file/PTC lineage suites now read rc.2 flat persisted tool results; outer success cannot replace failed child | Actual rc.2 native PTC/file tool execution and persistence on both platforms |
32
- | A12 | 0.7.1 recovery/prepare/checkpoint suites retained; real V4 loop and new source shapes | Model continuation after compact/side-question is still not established |
33
- | A13 | Real Goal/ToolRuntime and round-driver tests, flush failure and monotonic denial; no Goal service in ordinary lifecycle composition | Native adopted Goal with real-model complete success and rejection |
34
- | A14 | Existing old-certificate eligibility and explicit V3→V4/old-host private-ledger context mismatch fail closed without changing stored bytes; no digest vectors or historical ledger rewritten | Actual DSH V3→V4 migrated session with old ledger, ordinary continuation and strict release diagnosis |
35
- | A15 | Versioned native driver/preflight unit checks updated to the sole rc.2 cohort | Canonical artifact identity from the separate packer receipt; exact CI, both platforms and both profiles, same digest, strict-noop/parity/restart/cleanup annexes |
36
- | A16 | Deterministic loop model stubs remain identified as stubs | Real model ordinary work, compact/resume, promoted wait and adopted Goal scenarios with independent retained results |
37
-
38
- ## Reproduction and evidence boundaries
39
-
40
- Run the affected bundle with `node tests/run-repair-families.mjs rc017-adaptation`. Setting `DSH_RUNTIME_ROOT` to an isolated rc.2 runtime enables the otherwise explicitly skipped real graph/provider checks. `tests/rc017-native-shell.node.mjs` is a local source probe of the published bash executor and Jobs; it is not a versioned native-artifact annex and is not run on Windows.
41
-
42
- Synthetic graph/config tests isolate injection and strict-noop from installed byte authentication. The separate actual-runtime tests check the unmocked byte gate. The shared core mirror, digest algorithm and golden vectors are unchanged. Current host identity and certificate authority never derive from historical test cohorts.
43
-
44
- Initial source verification (before the dependency-route review repair), on macOS / Node 25.1.0 / pnpm 11.22.0:
45
-
46
- - Vitest: **2605 passed, 2 Windows-only tests skipped** with the isolated runtime supplied. The skipped checks are Windows Session drive identity and exact cmd-shim execution.
47
- - Typecheck, lint, build, release-pack tests (2), npm-stat tests (10), package inventory dry run, documentation audit and `git diff --check` passed. Lint has warnings; they are not represented as a warning-free result.
48
- - Python: **95 passed**, including native-entrypoint/cohort, document audit and tarball-audit tamper/inventory cases.
49
- - Published input replay: **46 tarballs / 215 JS, CJS and package-manifest files passed**.
50
- - Local source probes: actual bash terminal/cancel/promotion/Jobs and the native-driver V4 restore positive/negative both passed. They do not constitute exact-artifact host acceptance.
51
- - Core mirror and digest fixtures were unchanged. Repeated generated-output checks and canonical-package reproducibility are recorded by the local handoff receipts.
52
-
53
- A passing local matrix cannot close the native and artifact conditions in this table. Candidate CI is required before spending native-platform acceptance slots; no remote dispatch was authorized here.
54
-
55
- ## Dependency-route review repair
56
-
57
- The byte-audit review found that an unchanged package map could hide a nearer native dependency. The repair binds critical dependency edges to the authenticated mapped instance at each audited importer directory, distinguishes installation native resolution from rc.2 Profile interception, and checks concrete runtime export targets. The matrix in `tests/repair-families.md` covers normal pnpm links, absent/local Profile peers, missing and redirected edges, shadows, duplicate map identities, conditional-export refusal and escaping subpaths. An unmodified official rc.2 loader probe verifies ESM and CJS Profile interception; the public profile resolver and runtime revalidation reject the same drift. Final check counts and temporary pack comparison digests belong to the repair handoff, not the initial results above. Native/model requirements in A01–A16 remain separate.
@@ -1,21 +0,0 @@
1
- # DSH Completion Guard 0.7.1 — Accurate recovery feedback
2
-
3
- ## English
4
-
5
- Upgrade if resumed tasks keep asking for evidence of an already completed test, or send ordinary work through unnecessary clarification and rebinding. Recovery now uses the current results shown by prepare and checkpoint.
6
-
7
- Recovery also retains verifiable prohibitions, approval waits and the dependency-free cleanup condition. Short messages prioritize these boundaries and report omitted rows; read-only details preserve long original text. Historical sibling tasks remain history, and unavailable completion evidence is reported as unknown.
8
-
9
- Update to `dsh-completion-guard@0.7.1` and restart DSH. Supported hosts remain DSH `0.1.5-rc.2` and `0.1.5-rc.1`. Some combined wait clauses remain unrecognized; this patch does not establish correct model continuation after a commentary answer and compaction. Explicit proof, adopted Goal and release checks retain their own requirements.
10
-
11
- See the [English changelog](../CHANGELOG.md#071---2026-09-22) for the changes. Exact-artifact acceptance results belong to the versioned Release attachments; source tests alone are not native acceptance.
12
-
13
- ## 简体中文
14
-
15
- 如果恢复任务反复索要已完成测试的证据,或要求普通工作额外澄清、重新绑定,可以升级此补丁。恢复提示现在与 prepare、checkpoint 使用一致的当前结果。
16
-
17
- 恢复消息保留来源可核验的禁止事项、确认等待和无依赖清理条件。短消息优先展示这些边界并报告折叠数量,过长原文可从只读详情完整取回。历史兄弟任务保持历史身份;完成证据不可用时明确报告未知。
18
-
19
- 更新至 `dsh-completion-guard@0.7.1` 后请重启 DSH。受支持宿主仍为 DSH `0.1.5-rc.2` 和 `0.1.5-rc.1`。部分复合等待句仍无法识别,本补丁也不证明模型在进度回复回答插问、再经过压缩后一定正确续接。显式 proof、已采用的 Goal 和 release 检查仍分别生效。
20
-
21
- 具体变化见[中文更新日志](../CHANGELOG.zh-CN.md#0712026-09-22)。精确制品验收结果以对应 Release 附件为准,源码测试不能替代原生验收。
@@ -1,21 +0,0 @@
1
- # DSH Completion Guard 0.8.2
2
-
3
- ## English
4
-
5
- This release adapts Guard to DSH RC.2 and adds an independent host lock for the official Desktop app. It keeps the 0.8.x task, certificate and data protocols. It also fixes shell evidence that could mistake an obscured failure marker for success.
6
-
7
- Upgrade DSH to `0.2.0-rc.2` or later before installing Guard. Keep the host stopped while installing, inspecting and injecting the new lock, and verifying the composed configuration. Each profile needs its own lock; existing certificates retain their historical identity. Follow the [upgrade guide](HOST_LOCK_UPGRADE.md).
8
-
9
- For Desktop, use the CLI shipped with the application to install plugins. Guard checks the vendor-signed carrier, archive bytes and actual dependency routes. Its `dump-desktop` command composes configuration through the bundled APIs without starting a host. The graphical app owns its restart lifecycle.
10
-
11
- The reviewed baseline is DSH `0.2.0-rc.2` with Cordis `4.0.4`. Later versions require implementation qualification. Source checks, portability CI, same-artifact native backend acceptance, GUI/model observations and public publication identity have separate evidence. Use the Release attachments for the exact commit, package checksum and platform scope; see [compatibility](COMPATIBILITY.md) and [acceptance](LOCAL_ACCEPTANCE.md).
12
-
13
- ## 简体中文
14
-
15
- 本版本适配 DSH RC.2,并为官方 Desktop 应用新增独立宿主锁;任务、证书与数据协议延续 0.8.x。同时修复 shell 失败退出标记被后续文字遮挡时可能误报成功的问题。
16
-
17
- 请先将 DSH 升级到 `0.2.0-rc.2` 或更高版本,再安装 Guard。安装、检查、注入新锁及回读组合配置期间保持宿主停止;每个 profile 分别建立锁,旧证书保留历史身份。具体步骤见[升级指南](HOST_LOCK_UPGRADE.md)。
18
-
19
- Desktop 插件须通过应用附带的 CLI 安装。Guard 核验厂商签名载体、归档字节与实际依赖路由;`dump-desktop` 通过应用内 API 组合配置,不启动宿主。图形应用的重启仍由应用自行管理。
20
-
21
- 已审查基线是 DSH `0.2.0-rc.2`、Cordis `4.0.4`;较新版本仍须通过实现资格验证。源码检查、跨平台 CI、同包原生后端、GUI/模型观察与公开发布身份分别建立证据。请用 Release 附件核对精确提交、包摘要和平台范围;详见[兼容性](COMPATIBILITY.md)及[验收记录](LOCAL_ACCEPTANCE.md)。