dsh-ptc-plus 0.4.10 → 0.5.0

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 (122) hide show
  1. package/README.en.md +60 -130
  2. package/README.md +60 -130
  3. package/assets/dsh-ptc-plus-banner-en.webp +0 -0
  4. package/assets/dsh-ptc-plus-banner-zh.webp +0 -0
  5. package/assets/ptc-plus-repl-workspace-en.png +0 -0
  6. package/assets/ptc-plus-repl-workspace-zh.png +0 -0
  7. package/assets/ptc-plus-settings-en.png +0 -0
  8. package/assets/ptc-plus-settings-zh.png +0 -0
  9. package/client.cjs +42336 -0
  10. package/cordis.patch.yml +1 -0
  11. package/docs/README.md +6 -2
  12. package/docs/adr/0005-temporary-rejected-cell-edit-transport.md +31 -198
  13. package/docs/adr/0008-define-agent-operating-contract.md +5 -1
  14. package/docs/adr/0009-bound-expensive-acceptance-default.md +2 -2
  15. package/docs/adr/0016-archive-resolved-review-findings.md +1 -1
  16. package/docs/adr/0017-track-the-latest-dsh-public-surface.md +2 -2
  17. package/docs/adr/0019-plugin-settings-and-kill-switch.md +1 -1
  18. package/docs/adr/0020-optional-cordis-tools-in-ptc-mode.md +1 -1
  19. package/docs/adr/0022-stage-npm-releases-with-oidc.md +4 -2
  20. package/docs/adr/0023-global-user-bindings.md +2 -0
  21. package/docs/adr/0026-persist-the-delivery-verdict-against-the-verified-candidate.md +2 -0
  22. package/docs/adr/0028-attach-to-the-host-ptc-execution-seam.md +25 -23
  23. package/docs/adr/0031-close-semantic-obligations-by-owner.md +1 -1
  24. package/docs/adr/0034-keep-program-values-separate-from-output-projections.md +29 -0
  25. package/docs/adr/0035-run-coverage-only-before-a-new-release.md +27 -0
  26. package/docs/adr/0036-separate-focused-development-from-delivery-verification.md +29 -0
  27. package/docs/adr/0037-keep-tool-hover-previews-passive.md +52 -0
  28. package/docs/adr/0038-freeze-session-capability-plans.md +71 -0
  29. package/docs/adr/0039-verify-documentation-without-runtime-suites.md +29 -0
  30. package/docs/adr/0040-separate-capability-configurations-from-session-observations.md +39 -0
  31. package/docs/adr/0041-record-cell-execution-directories.md +65 -0
  32. package/docs/adr/0042-persist-provider-availability-and-handback.md +41 -0
  33. package/docs/adr/0043-compose-capability-and-context-policies.md +37 -0
  34. package/docs/adr/README.md +6 -0
  35. package/docs/architecture.md +23 -25
  36. package/docs/capability-planning-components.md +93 -0
  37. package/docs/capability-projection.md +7 -0
  38. package/docs/client-ui.md +70 -23
  39. package/docs/client-visual-contract.md +26 -9
  40. package/docs/context-management.md +22 -0
  41. package/docs/context-optimization-plan.md +353 -0
  42. package/docs/context-public-interface-coverage.md +25 -0
  43. package/docs/durability-design.md +20 -15
  44. package/docs/evaluation.md +41 -6
  45. package/docs/evaluations/command-goat-deepseek-v4.1-flash-20261006.md +126 -0
  46. package/docs/evaluations/command-goat-deepseek-v4.1-flash.md +281 -0
  47. package/docs/installation.md +31 -10
  48. package/docs/program-data-plane.md +5 -3
  49. package/docs/publishing.md +5 -5
  50. package/docs/release-coverage.md +73 -0
  51. package/docs/release-notes.md +1 -1
  52. package/docs/review-procedure.md +56 -0
  53. package/docs/runtime-reference.md +48 -16
  54. package/docs/semantic-validation.md +14 -2
  55. package/docs/stateful-binding-updates-proposal.md +2 -2
  56. package/docs/user-bindings.md +1 -1
  57. package/docs/value-wire.md +11 -1
  58. package/docs/verification-optimization-work.md +26 -15
  59. package/docs/verification.md +30 -88
  60. package/index.js +123 -20
  61. package/internal/binding-toggle-receipt.js +24 -0
  62. package/internal/capability-command-receipt.js +29 -0
  63. package/internal/capability-environment.js +1247 -0
  64. package/internal/capability-plan.js +285 -0
  65. package/internal/capability-policy.js +96 -0
  66. package/internal/capability-statistics-store.js +180 -0
  67. package/internal/capability-statistics.js +210 -0
  68. package/internal/config-spec.js +79 -9
  69. package/internal/direct-surface-owner.js +27 -29
  70. package/internal/dynamic-environment-runtime.js +9 -9
  71. package/internal/edit-transport-owner.js +180 -139
  72. package/internal/execution-provider-owner.js +15 -12
  73. package/internal/execution-seam-compat.js +8 -8
  74. package/internal/kernel-worker.js +104 -32
  75. package/internal/native-root-dynamic.js +12 -13
  76. package/internal/program-bindings.js +190 -0
  77. package/internal/recovery-tips.js +3 -2
  78. package/internal/rejected-cell-editor.js +8 -8
  79. package/internal/repl-observation-interest.js +11 -3
  80. package/internal/rpc-contract.js +1 -0
  81. package/internal/runtime-bridge-owner.js +272 -34
  82. package/internal/runtime-config.js +58 -0
  83. package/internal/runtime-contexts.js +74 -5
  84. package/internal/runtime-intrinsics.js +1 -0
  85. package/internal/runtime-messages.js +41 -0
  86. package/internal/sdk-projection.js +10 -82
  87. package/internal/session-cell-executor.js +42 -19
  88. package/internal/session-events.js +34 -0
  89. package/internal/session-journal-recovery.js +234 -11
  90. package/internal/session-journal-schema.js +6 -3
  91. package/internal/session-journal.js +31 -2
  92. package/internal/session-log-view.js +1 -1
  93. package/internal/session-runtime.js +119 -15
  94. package/internal/settings-compat.js +12 -5
  95. package/internal/stateful-module-compiler.js +3 -2
  96. package/internal/stateful-module-runtime.js +7 -3
  97. package/internal/stateful-root-runtime.js +9 -4
  98. package/internal/user-binding-authoring.js +2 -7
  99. package/internal/user-bindings-owner.js +41 -2
  100. package/internal/validated-parse-repair.js +1 -1
  101. package/internal/value-wire.js +68 -21
  102. package/internal/worker-cwd-virtualization.js +20 -18
  103. package/internal/worker-realm-surfaces.js +3 -3
  104. package/package.json +47 -29
  105. package/src/client-authoring-view.js +67 -30
  106. package/src/client-binding-review.js +2 -1
  107. package/src/client-binding-toggle.js +18 -0
  108. package/src/client-capabilities-view.js +1341 -0
  109. package/src/client-capability-sort.js +29 -0
  110. package/src/client-copy.js +871 -8
  111. package/src/client-feature-gates.js +3 -0
  112. package/src/client-indicator-view.js +4 -6
  113. package/src/client-primitives.js +33 -2
  114. package/src/client-repl-view.js +20 -13
  115. package/src/client-settings-view.js +411 -41
  116. package/src/client-styles.js +108 -15
  117. package/src/client-tool-hover.js +185 -0
  118. package/src/client-tool-view.js +37 -8
  119. package/src/client-transport.js +44 -9
  120. package/src/client-workbench.js +6 -7
  121. package/src/client.js +76 -22
  122. package/client.js +0 -32479
@@ -0,0 +1,281 @@
1
+ # Command Goat / DeepSeek V4.1 Flash 实测
2
+
3
+ ## 结论范围
4
+
5
+ 2026-10-05 的真实额度实验使用 Command Goat 的 `deepseek/deepseek-v4.1-flash`,在实验开始时安装官方最新 DSH。记录到的实际宿主为 `0.2.0-rc.2`、Windows Node `v24.14.0`;这些版本只标识本次证据,不是兼容性开关。插件运行时代码为 `0.4.10`、来源提交 `e36b6aab013483c1a2a31b8006a94c0bf704f95c`;本次修改范围是评估器与文档。正常 Windows DSH 配置与凭据存储未改动,实验使用独立 home 与 workspace。
6
+
7
+ 验收观察到跨 cell 直接复用、同名函数/类更新、增量编辑、静态 import 和真实主/子代理独立计算及 BigInt 返回。两轮各 60 个根会话的 A/B 都没有证明普遍 token 节省:首轮环境受污染,修正实验完整家族的已报告 traffic 仍比基线高 5.67%。全部失败和成本保留,特定能力收益不能替代普通任务的质量与成本判断。
8
+
9
+ ## 真实主/子代理验收
10
+
11
+ 首轮 8 个场景的冻结机器结果为 **7/8**。失败场景先声明数值并返回 `declared`,再在独立 cell 复用绑定得到正确和。任务只禁止返回“此值”,oracle 却禁止返回任何值,因此这是验收指令错配。原始失败和用量保留;后续统一三个连续性任务的 setup 指令,明确禁止任何返回值,另行预定一次 durable 补充实验。
12
+
13
+ | 场景 | 冻结机器结果 | 已观察到的实际行为 |
14
+ | --- | --- | --- |
15
+ | 成功/失败 cell 的增量编辑 | 通过 | 两次只发送 delta,含一次故意语法拒绝,修复后正确完成 |
16
+ | Durable 连续绑定 | 失败:指令/oracle 错配 | 两个独立 cell 正确声明和复用;确认字符串触发冻结条件 |
17
+ | Typed program surface | 通过 | 正式能力发现、单次文件读取、单次隔离计算返回完整标记 |
18
+ | Node I/O 后连续计算 | 通过 | 精确字节摘要跨 cell 复用,保持 volatile 分类 |
19
+ | 静态 import | 通过 | 直接静态声明和后续绑定复用成功 |
20
+ | 已有/新增混合解构 | 通过 | 模型未手拆声明,绑定自动适配成功 |
21
+ | 函数/类同名更新 | 通过 | 三个独立 cell 更新并复用新实现 |
22
+ | 真实主/子代理 | 通过 | 主子绑定相互隔离,子代理同名更新、self identity 与隔离 BigInt 运算成功 |
23
+
24
+ 首轮包含 8 个主会话和 1 个真实子代理,完整检查 251,524 压缩字节、774,976 解压字节、304 物理行、295 逻辑事件、38 模型循环步骤和 29 对直接调用/结果。原始行分段和文件保留 SHA-256;日志经实际 Windows 官方 Session catalog 严格恢复后,再检查所有 assistant/tool 步骤、来源关系、journal、主子身份和请求表面。
25
+
26
+ 取证过程中另外修复了评估器报告的值边界:真实 child 成功返回 `2n`,旧报告直接 JSON.stringify 解码值会失败;现在报告保留 canonical `valueWire`,内存消费者仍使用原类型。循环/共享引用、undefined、非有限数及负零也通过两套报告回归。这属于实验工具缺陷,未改插件值语义;先前付费记录保持原样。
27
+
28
+ 结果中有 1 个测试预设语法错误、0 个意外工具错误;未观察到状态丢失、主子绑定泄漏、BigInt 传输错误或插件 catalog 重复注入。self identity 证明的是子环境内的 live 对象关系,不是循环图跨边界传输。BigInt 在隔离计算中返回后仍可进行 BigInt 算术;这不改变 JavaScript 对 BigInt 与 Number 混合算术的规则。
29
+
30
+ 每个会话内实际投递的有序 system 文本和完整工具 schema 字节稳定;不同 workspace 的 system 文本为 30,770–30,787 UTF-8 字节,schema 为 3,375 字节。9 个正式 runtime snapshot 未包含插件 catalog/状态段。仍观察到模型重复查询、重复 inspect,以及误选子代理 reasoning block;已有 SDK 指令明确区分这些用途,原生子代理结果由 DSH 拥有,插件没有改写它。
31
+
32
+ | 首轮用量范围 | 未缓存输入 | 输出(含 reasoning) | 缓存读取 | 缓存写入 | Token traffic |
33
+ | --- | ---: | ---: | ---: | ---: | ---: |
34
+ | 8 个主会话 | 84,401 | 13,111 | 239,488 | 0 | 337,000 |
35
+ | 真实子代理 | 2,896 | 1,955 | 45,696 | 0 | 50,547 |
36
+ | 完整会话家族 | **87,297** | **15,066** | **285,184** | **0** | **387,547** |
37
+
38
+ 补充实验单独执行 1 个新版 durable 场景:先声明 `19017` 且不返回任何值,再在独立 cell 直接加 `95265`,得到 `114282`。机器判定通过;原始 7/8 不变。补充用量为未缓存输入 8,790、输出 227、缓存读取 16,768、缓存写入 0,traffic 25,785。独立审计完整覆盖 18,583 压缩字节、51,122 解压字节、27 物理行、26 逻辑事件、3 模型步骤和 2 次工具调用,0 错误;系统提示 30,772 字节、schema 3,375 字节稳定,runtime snapshot 没有插件段。正式身份扫描确认此次没有子代理,因此家族用量等于根会话用量。
39
+
40
+ 缓存读取占输入为 285,184 / (87,297 + 285,184) = 76.56%。这只是 provider 经 adapter 报告的缓存计数;首轮没有禁用插件的对照,不能将其解释为插件导致的缓存收益。现有 runner 总表仅计主会话;本报告根据正式父子关系及 own-event 边界独立汇总,避免把子代理漏算成节省。
41
+
42
+ ## A/B 方法
43
+
44
+ 冻结 15 个任务 × 每组 2 次,13 个普通任务为主要分层,强制 transport canary 和静态 import 为两个独立能力探针。两组使用同一 provider/model、权限、任务、fixture、初始 Git 历史与 dirty state;唯一配置处理差异是 `ptc-plus.disabled`。能力探针不能代替普通任务收益。
45
+
46
+ 每对先后次序由执行前 run identity 与 task/repetition 的 hash 决定,两组顺序可不同(原轮先 PTC Plus 14 对、先基线 16 对);同一配对按序执行,原机器 canary 判定通过后最多四对并行(下文披露一次假通过)。这降低固定“总先运行某组”的偏差,却没有构成 provider 缓存隔离或时间效应控制。运行选择无数值结果输入,不以有利样本停止。
47
+
48
+ 使用 `ab-node-project-v1` / `1.0.0`,fixture SHA-256 为 `807580baf64e367bb2dc047c389edf471e13077d54d50ee4b3a143c38f0cebd1`;任务描述 SHA-256 为 `60ad7a844ddaf9f45c06dbd73e48c21914f51d7ba0192b34e380e89bd5ef470e`。两组保留相同的 greeting 改动和 untracked draft;原 greeting 测试故意不通过,诚实报告该失败是正确答案,顺手改成全绿违反任务。
49
+
50
+ 全部尝试和失败保留,不按结果重采样。独立 reviewer 在揭示分组前按照预先冻结的事实/源码/计算 oracle,分别评分 correctness、efficiency、clarity(每项 0–3);先封存评分与证据 hash,再关联分组。统计消费者验证独立提供的评分 seal 与实际字节一致,要求分组映射、报告与评分组成精确 60 样本双射;证据不完整即保留 incomplete 配对,正式主子家族不闭合则不报告完整成本。标签和 workspace identity 隐去,语法本身仍可能提示处理组,因此是身份盲评,不保证 reviewer 无法推测处理。
51
+
52
+ 评分规则在付费结果前从任务与 fixture 冻结:correctness 0 为重要结果错误/矛盾的完成宣称/缺少必需产物,1 为重要要求未解决,2 为大体正确但有有限遗漏,3 为所有重要要求有实际证据;证据缺失单独保留 incomplete。efficiency 0–3 分别为严重、实质、轻微无谓工作和适度直接;clarity 0–3 分别为混乱/无依据确定性、明显置信失当、少量歧义和清晰且匹配证据。完成状态判断与分数分开,efficiency 或 clarity 不能补偿 correctness 回退。
53
+
54
+ 数值 oracle 独立固定:普通统计和为 77、平均 9.625、中位数 9、样本方差 2287/56;分阶段原均值 9.8、中位数 7,修正后均值 9.2、中位数 7、范围 17。编辑 oracle 检查实际源码与保留 dirty bytes,并用可区分 median/average 的输入验证集成;配置 oracle 区分 retries 的非负安全整数和 timeoutMs 的正安全整数以及非法类型/边界,既有 greeting 失败保持。委派必须有正式 child 关系、实际子结论和主代理独立检查,创建 child 本身不足以证明交付完成。
55
+
56
+ 盲评证据包含完整匿名 trajectory、最终文件快照、独立源码后条件与正式子代理 own-event 证据。快照原子替换,包含 ignored 文件,唯一默认排除为 Git 管理元数据;非普通文件或缺失证据保持 incomplete。原始字节私下校验后生成带独立 hash 的匿名源码视图。所有 60 个固定标签保留,缺失材料不被当作成功或删除。
57
+
58
+ 比较质量、工具错误、预算与完整家族用量。Token traffic 为未缓存输入 + cacheRead + cacheWrite + 输出,reasoning 已包含在输出中;逻辑步骤不等于物理 HTTP 尝试。所有正式链接子会话只统计 own events,继承历史不重复计费。缺失 usage 不按零计,缓存计数不证明完整账单或因果关系。
59
+
60
+ ## 首轮 A/B 的评估环境缺陷
61
+
62
+ 第一轮固定 60 个主会话全部完成,正式日志证明另有 4 个子代理。独立匿名评分和原始日志审计分别发现:隔离启动器把 Linux 快照用的 `git` 包装器目录也加入 Windows PATH,PowerShell 因而把该脚本作为文档处理,出现空输出或管道启动错误。模型后续尝试定位 `git.exe`;额外探索的成本不能归因于插件,配置两组共享错误环境也不能保证恢复成本对称。
63
+
64
+ 修正在执行世界路由的 owner:Windows 只 prepend Windows launcher 目录,Linux 快照工具只留在 WSL evaluator PATH。真实无模型探针确认原生 Git 与管道工作正常。fixture、source、模型、预算和重复数不改;另外澄清已证歧义的整数任务算法并冻结新实验,完整保留原 60 个样本、评分和用量,不按不利结果挑选替换。
65
+
66
+ | 首轮分层 | PTC Plus 完成 / 总数 | 基线完成 / 总数 | PTC Plus Traffic | 基线 Traffic | Traffic 差异 |
67
+ | --- | ---: | ---: | ---: | ---: | ---: |
68
+ | 全部任务 | 28/30 | 25/30 | 2,663,541 | 2,199,466 | +21.10% |
69
+ | 普通任务(主要分层) | 24/26 | 23/26 | 2,595,123 | 2,075,874 | +25.01% |
70
+ | 能力探针 | 4/4 | 2/4 | 68,418 | 123,592 | -44.64% |
71
+ | 双方均完成的普通配对(次要分层) | 22/22 | 22/22 | 2,391,622 | 1,844,396 | +29.67% |
72
+
73
+ | 首轮任务 | PTC Plus / 基线完成数(各 2 次) | Correctness 合计(各满分 6) | PTC Plus / 基线 Traffic |
74
+ | --- | ---: | ---: | ---: |
75
+ | package-name | 2 / 2 | 6 / 6 | 34,279 / 29,531 |
76
+ | orientation | 2 / 2 | 5 / 5 | 88,780 / 145,494 |
77
+ | test-check | 2 / 1 | 5 / 3 | 192,327 / 222,442 |
78
+ | worktree-status | 2 / 2 | 6 / 6 | 249,383 / 137,605 |
79
+ | runtime-requirement | 2 / 2 | 6 / 6 | 92,157 / 56,099 |
80
+ | code-explanation | 2 / 1 | 4 / 5 | 83,236 / 103,763 |
81
+ | small-edit | 2 / 2 | 6 / 6 | 71,476 / 73,303 |
82
+ | negative-fact | 2 / 2 | 6 / 6 | 90,840 / 58,845 |
83
+ | static-import-cell | 2 / 0 | 6 / 0 | 34,139 / 94,061 |
84
+ | numeric-analysis | 2 / 2 | 4 / 6 | 55,621 / 50,386 |
85
+ | cross-file-change | 2 / 2 | 6 / 4 | 396,339 / 355,778 |
86
+ | boundary-repair | 2 / 2 | 6 / 5 | 424,394 / 356,745 |
87
+ | successive-calculation | 2 / 2 | 6 / 6 | 70,369 / 63,388 |
88
+ | delegated-review | 2 / 2 | 4 / 6 | 693,900 / 400,375 |
89
+ | precise-integers | 0 / 1 | 0 / 2 | 86,301 / 51,651 |
90
+
91
+ 首轮盲评还保留了一次基线 test-check 擅自把 dirty greeting 改成测试期望值的失败;检查任务不授权改文件,不能把改成全绿当作检查成功。
92
+
93
+ 首轮全部质量:PTC Plus 28 个完成、2 个失败;基线 25 个完成、1 个部分完成、4 个失败。普通配对 correctness 为 5 胜、14 平、7 负;能力探针为 2 胜、2 平。完成表示重要任务条件获得证据支持,仍可含少量事实错误;满分 correctness 更严格。全部成本与双方均完成的次要分层同时保留,后者没有删除原总体中的失败成本。
94
+
95
+ 首轮整数任务原文为:“用真实代码处理交易金额字符串 ["9007199254740993","7","-2"],计算精确总和,再按 3:2:1 比例以整数份额分摊(余数依次分配至前面的份额),证明三份之和等于总额。不得转换为浮点金额或损失精度;最终给出十进制结果和检验事实,不改文件。”
96
+
97
+ 上述整数任务完成数是**冻结 oracle 匹配分数**,不能直接等同业务计算错误。原 prompt 没明确规定先分别计算带权份额并取整;先取总额的六分之一再乘权重,也符合原措辞并精确守恒,却得到不同份额。独立源头审查用总额 8 给出 [5,2,1] 与 [4,3,1] 两个反例,证明歧义。新实验只澄清该算法:分别 floor(total × weight / 6),再按原份额顺序加一分配剩余整数;所有数值、oracle、预算及其余十四任务不变,原评分封存不重写。
98
+
99
+ 原家族包含 60 个根会话与 4 个真实子会话,完整处理 2,731,370 存储字节、9,918,936 解压字节、4,247 物理行及 4,183 逻辑事件;411 模型步骤、347 直接调用、689 原生分派。字节范围、UTF-8、JSON、正式恢复、流与结算一致性、call/result、source 关系、主子身份和用量采用全覆盖检查。独立审阅已逐步完整读取 411/411 步 reasoning、源码、结果与最终回答;64 会话的唯一步骤身份和每步材料 hash/字节复核无遗漏,语义材料共 1,772,057 字节。完全重复的 provider 流与结算已逐字节比对,无需把重复流再算成另一执行步骤。
100
+
101
+ 直接结果错误为 PTC Plus 1、基线 6;689 次原生分派中,DSH 原生 isError 为 PTC Plus 1、基线 1(后者为将子代理 ID 当作 job ID 后捕获的 unknown-job 错误),不能与直接错误重复计数。另有 34 次非零 exit(PTC Plus 18、基线 16),多次是保留 fixture 已有 greeting 测试失败,不能全称意外工具错误;15 次文档管道错误甚至可能伴随外层成功和 exit 0。PTC Plus 的错误是模型生成的畸形 glob pattern 被原生工具底层 ripgrep 拒绝。基线包括未定义名称、相对模块解析、三次静态 import 拒绝,以及 BigInt 与 Number 严格比较造成的模型自写断言失败;后者不是序列化失败。 独立核对实际 reasoning 与冻结提示发现:PTC Plus 第一例为构建独立算术证明主动手写十进制加法;第二例明确引用了允许 plain-object BigInt 的正确指导,却仍选择输出字符串。四例都将 BigInt 投影为十进制字符串,只有基线第二例实际 `JSON.stringify` 报告;这四例没有 native 子调用,不能归因于原生 JSON 参数边界。提示/schema 未观察到与 canonical V1 契约冲突,因此不能从这些例子的额外算术代码反推插件误导。shell 的外层成功不保证内部进程 exit code 成功,已分别审阅。PATH 污染影响 18 个根会话(PTC Plus 8、基线 10)、58 次 bare Git 分派与 15 次文档管道错误;不得把恢复探索计为插件缺陷。
102
+
103
+ 预算共有 56 条超限记录,涉及 23 个根会话(PTC Plus 12、基线 11);预算超限与重要任务质量分别报告。所有正式主子 model route 相同,用量完整;继承历史不重复计数。未观察到 system、工具 schema 或 runtime-context 约束失败。
104
+
105
+ | 首轮完整家族 | 未缓存输入 | 输出(含 reasoning) | 缓存读取 | 缓存写入 | Token traffic | 模型步骤 | 直接调用 |
106
+ | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
107
+ | PTC Plus | 421,669 | 110,928 | 2,130,944 | 0 | 2,663,541 | 214 | 182 |
108
+ | 基线 | 390,450 | 124,152 | 1,684,864 | 0 | 2,199,466 | 197 | 165 |
109
+
110
+ 每个会话的 leading system 和工具 schema 都保持字节稳定;首轮 PTC Plus 为 30,784 / 3,375 字节,基线为 26,954 / 2,130 字节。插件增加 3,830 字节系统说明与 1,245 字节 schema,这是能力的固定上下文成本,不是状态反复注入;32 个 PTC Plus 家族成员的 snapshot 都没有插件 catalog/状态段。较高缓存读取率不能抵消或证明较低账单,静态字节稳定也不证明 provider 的所有缓存键、TTL 与物理请求行为。
111
+
112
+ 逐步骤审阅区分了模型事实错误与运行时缺陷:样本中的误称全部数据为奇数、虚假的最优性检验、过宽的输入契约批评、重复测试和大规模 fuzzing,并不证成插件编译/传输错误。首轮没有 capabilities.find/inspect 调用,capabilities.tree 仅一次;不能把 shell 路径恢复探索误写成插件导致的重复能力发现。连续计算任务两次 PTC Plus 都重建第二阶段数据,因此其成本不是直接复用的对照证据;前面的独立连续性验收才观察了真正跨 cell 复用。
113
+
114
+ ## 修正路由与明确算法的新实验
115
+
116
+ 新协议在模型调用前冻结,配置-only 与完整无模型验证通过后执行全部 60 根会话,正式扫描关联 4 子代理。原轮未替换;修正路由但尚未澄清算法的一次启动在 keyless 阶段停止,模型样本为零。新记录独立封存评分与日志,预算不因结果调高。
117
+
118
+ 独立审阅已逐步全文读取 **347/347 已结算步骤**,覆盖全部 64 会话的 reasoning、源码、直接/原生结果、relay 与最终回答;语义材料 1,735,752 字节,唯一 session/assistant 身份和每步 hash 与字节索引闭合,未结算的第 348 次启动保持明确。字节审计完整覆盖 2,411,864 存储字节、8,602,961 解压字节、3,656 物理行、3,592 逻辑事件,285 次直接调用和 561 次原生分派。53 次 Git 相关分派中有 46 次 bare Git,文档管道错误与旧 helper 引用均为零。所选日志通过公开严格恢复、完整流/结算与来源检查,实际 schema 与 system 会话内稳定;两组的固定字节成本与原轮相同,无插件 catalog/状态段重复注入。
119
+
120
+ | 新实验完整家族 | 未缓存输入 | 输出(含 reasoning) | 缓存读取 | 缓存写入 | Token traffic | 已结算模型步骤 | 直接调用 |
121
+ | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
122
+ | PTC Plus | 393,917 | 103,526 | 1,513,856 | 0 | 2,011,299 | 170 | 138 |
123
+ | 基线 | 368,304 | 104,114 | 1,430,912 | 0 | 1,903,330 | 177 | 147 |
124
+
125
+ 记录中有 348 次 step/start、347 次已结算 assistant 步骤和 63/64 个 turn/end:一个基线真实子代理开始了第十次请求但没有结算。所有已结算请求都有 usage,未结算请求不按零费用计;此前全家族汇总只统计已落盘用量,不证明完整账单。该基线主代理也只留下中间报告,不能因 child 已创建就判定委派任务完成;另一个基线委派存在真实完成消息和主代理交叉验证。后者声称“独立 3,000 次随机 oracle”,实际源码复制 fixture 算法,零差异没有独立语义证明力。只读核对公开 headless driver 发现,它等待主代理 whenIdle、flush 主 session 后按主 turn 完成退出,不等待全部子代理。本例主代理提前结束使 one-shot 生命周期退出时子请求仍在进行;实际进程 exit 0、无超时。委派交付仍不完整,不能据 exit 0 判定成功,也不能据日志推算 HTTP 取消或该未结算请求的账单。插件不接管宿主调度以掩盖这一结果。
126
+
127
+ | 新实验分层 | PTC Plus 完成 / 总数 | 基线完成 / 总数 | PTC Plus Traffic | 基线 Traffic | Traffic 差异 |
128
+ | --- | ---: | ---: | ---: | ---: | ---: |
129
+ | 全部任务 | 30/30 | 25/30 | 2,011,299 | 1,903,330 | +5.67% |
130
+ | 普通任务(主要分层) | 26/26 | 24/26 | 1,943,053 | 1,822,703 | +6.60% |
131
+ | 能力探针 | 4/4 | 1/4 | 68,246 | 80,627 | -15.36% |
132
+ | 双方均完成的普通配对(次要分层) | 24/24 | 24/24 | 1,585,452 | 1,530,420 | +3.60% |
133
+
134
+ | 新实验任务 | PTC Plus / 基线完成数(各 2 次) | Correctness 合计(各满分 6) | PTC Plus / 基线 Traffic |
135
+ | --- | ---: | ---: | ---: |
136
+ | package-name | 2 / 1 | 6 / 3 | 34,089 / 30,021 |
137
+ | orientation | 2 / 2 | 5 / 4 | 175,452 / 113,806 |
138
+ | test-check | 2 / 2 | 6 / 4 | 129,615 / 173,558 |
139
+ | worktree-status | 2 / 2 | 6 / 6 | 53,615 / 46,468 |
140
+ | runtime-requirement | 2 / 2 | 5 / 6 | 91,986 / 82,141 |
141
+ | code-explanation | 2 / 1 | 5 / 4 | 96,717 / 91,167 |
142
+ | small-edit | 2 / 2 | 6 / 6 | 83,268 / 71,407 |
143
+ | negative-fact | 2 / 2 | 6 / 6 | 71,208 / 71,117 |
144
+ | static-import-cell | 2 / 0 | 6 / 0 | 34,157 / 50,606 |
145
+ | numeric-analysis | 2 / 2 | 5 / 4 | 103,374 / 78,101 |
146
+ | cross-file-change | 2 / 2 | 6 / 6 | 139,054 / 200,617 |
147
+ | boundary-repair | 2 / 2 | 4 / 5 | 174,658 / 199,388 |
148
+ | successive-calculation | 2 / 2 | 6 / 6 | 82,403 / 43,377 |
149
+ | delegated-review | 2 / 1 | 4 / 3 | 702,904 / 604,026 |
150
+ | precise-integers | 2 / 2 | 5 / 5 | 38,799 / 47,530 |
151
+
152
+
153
+ 独立盲评揭示新实验第一对 transport canary 的基线是假通过:模型实际 `return JSON.stringify(pkg.name)`,返回的是带引号的字符串;旧机器 validator 再次 JSON.parse 展示文本,误将它还原成要求的包名。盲评按原任务判失败,未被机器结果影响。该 pair 不满足冻结的“双方 canary 通过再扩展”条件,矩阵却已执行;故新实验是保留全部结果的描述性证据,不能称为完全遵循预登记门槛的确认性实验。原 paid report 的机器 pass、独立 fail 及全部成本保持原样;不会为纠正此误判重采样。后续评估改用公开 `tools/result` 的执行内 canonical 结果证据;细节见[评估协议](../evaluation.md#protocol)。本轮历史日志不具备该新证据,不回写机器判定。
154
+
155
+ 新实验 PTC Plus 30 个完成;基线 25 个完成、1 个部分完成、3 个失败、1 个不完整。普通配对 correctness 为 **5 胜、18 平、2 负、1 不完整**;能力探针为 3 胜、1 平。普通任务的两个非完成基线样本分别是未完成的委派和code-explanation 的部分完成回答。能力探针的三个基线失败包含两次静态 import 不满足指定语法,以及一次返回经 JSON 编码的包名字符串。
156
+
157
+ 普通任务 correctness / efficiency / clarity 总分分别为 PTC Plus **69 / 45 / 62**、基线 **65 / 35 / 61**(各项满分 78)。全部任务分别为 **81 / 56 / 74** 与 **68 / 45 / 70**(各项满分 90);不完整项没有虚构完成分数。分数和完成数衡量不同条件,不能把 30/30 理解为所有陈述正确。
158
+
159
+ 整数任务四例最终实际结果都满足明确的 floor(total×weight/6) 再按原顺序分配余数规则,但执行与说明仍可出错:基线第二例将 Number 索引 `0` 执行 `i += 1n`,实际抛出 “Cannot mix BigInt and other types”,随后修正成功。这是原生混合算术,不是序列化失败;PTC Plus 第一例主动转换 Number 作诊断后仍声称无浮点,第二例错误写出 T mod 6 = 4(实际 2)。基线第一例文字解释又把已加权基数重复乘权重。正确的最终份额不能掩盖模型证明/说明错误。独立盲评已记录其中一些问题;后续日志审计另行发现 PTC Plus 第二例的模数错误,而该样本冻结评分仍为满分、无 flags。冻结评分保持原样,两种检查的发现不能混为一项。
160
+
161
+ PTC Plus 唯一直接错误为模型 code-explanation 探测结果含函数,插件按不支持的输出域报 `PTC-O001`;随后代码复用仍保留的 `out` 并投影可传输数据后成功。函数可留在会话中继续调用,与把函数放入返回图是不同契约。本轮没有证明任意 JavaScript 对象都可传输,亦未观察到 BigInt canonical 编码失败。
162
+
163
+ 错误层次独立对账为 1 个 PTC Plus / 5 个基线直接错误,原生分派 isError 为零;24 次原生非零退出包括 21 次 fixture 已有 greeting 断言失败、两次模型生成的外部 Node 语法错误,以及一次模型错误输出过滤表达式导致空输出与 exit 1。另有一次 `node --test test/` 的 MODULE_NOT_FOUND 被其后的 PowerShell Get-Content 掩盖为总 exit 0,后续针对具体文件的测试成功;非零标记数并非全部内部进程失败数。不得把这些全算成 plugin tool error,也不得仅凭原生 isError 为零称执行全成功。
164
+
165
+ 新增语义检查还发现:所有跨文件实现都实际调用了正确 median,但新增测试数据的 median 全都等于 average,因此测试不能拒绝 `median: average(values)`;验收的独立行为 oracle 使用可区分数据,实际实现通过,测试质量缺口另记。边界配置改动正确,部分最终回答误计测试数;数值分析中有模型修复错误公式、正确结果配上错误 Σx² 的情况。两组均有额外搜索、重复测试、console 与 return 重复输出及过度输入域探测,尚无实际证据把这些行为归为插件提示冲突。
166
+
167
+ 新冻结预算仍失败:23 条超限(PTC Plus 11、基线 12),涉及两组各 5 个根会话。context 配对失败为零,没有 task machine exception;free-form 正确性仍由独立盲评判定。完整家族 traffic 为 PTC Plus +5.67%,已结算步骤和直接调用更少;这些描述不能以请求减少抵消质量回退,也不能换算账单。
168
+
169
+
170
+ ## 提示契约修正轮:定向主/子代理 A/B
171
+
172
+ 为验证本轮提示契约修正,另以同一 Command Goat / `deepseek/deepseek-v4.1-flash` 路由
173
+ 执行四类窄任务,每类两次重复、每次都有完整主会话;两组都启用 PTC Plus,唯一差异是
174
+ 冻结的旧/新 `replGuidance`。任务覆盖特殊值观察、明确 JSON 输出、委派文本审查和
175
+ 独立 Node 引擎对照。配置预检、安装文件、模型路由、权限、fixture、预算和主/子关系
176
+ 均由独立审计核对;子代理只计 own events。独立盲评分者在揭示分组前读取 16 个匿名
177
+ packet 并封存评分,质量 **92/92**,两组每个任务层均无质量下降。
178
+
179
+ 解盲后的已报告 token traffic 为候选 **560,403**、控制 **504,030**,候选高 **11.18%**;
180
+ 候选 48 个已结算模型步骤、控制 47 个,直接错误分别为 3 和 5。候选在明确 JSON 任务
181
+ 两次均避免了控制组出现的一次 literal `\\n` 外部脚本语法失败和一次路径准备错误,
182
+ 但独立引擎层仍出现 BigInt 混合算术、原生 JSON.stringify BigInt 拒绝及函数输出边界
183
+ 拒绝各类模型选择错误。它们随后都通过保留 binding、编辑或显式投影恢复;这些现象
184
+ 不是 PTC Plus codec 丢值,也不证明模型永远遵守提示。委派任务两组都保留正式 child
185
+ 完成关系和父级合并证据。
186
+
187
+ 因此本轮确认了:run_code schema 与 PTC cell 语言契约一致;特殊值应直接观察,显式
188
+ JSON 是有损格式选择;当前 cell 足够时存在直接 Node module 路径,独立引擎仍可使用;
189
+ authoring SDK 的完整类型结构保持不变。实验支持关闭四条记录的错误归因和入口缺失,
190
+ 但没有证明普遍 token、缓存或账单收益,也不能宣称任意 JavaScript 类型都可直接传输。
191
+ 完整度量、错误分类和盲评封存 hash 留在 checkout-local 评估材料中,不进入版本库。
192
+
193
+ ## 可复现与限制
194
+
195
+ 两个仓库入口分别为 `npm run test:expensive` 和 `npm run test:ab`。先按 [配置预检](../evaluation.md#configuration-preflight) 显式配置 provider、model 与凭据变量,分别用专属 CONFIG_ONLY 入口验证隔离配置,再运行已授权模型场景。原始日志、分组映射、凭据及本机路径不进入版本库;本报告只保存方法、汇总结果和结论范围。验收、补充和两轮 A/B 共执行 138 个正式会话(129 根会话、9 子代理),合计已报告 token traffic 为 9,190,968;这不是费用清单,缺失物理尝试不按零费用解释。
196
+
197
+ ## 冻结与独立证据标识
198
+
199
+ 下列 SHA-256 绑定本次有限结论使用的字节对象。原始材料保留在隔离评估存储中,不随仓库发布;hash 本身不能替代内容、独立评分或重现,也不使未结算请求具有完整账单。评分先封存再关联分组,后续审计核对两组封存 hash 未变。
200
+
201
+ | 对象 | SHA-256 |
202
+ | --- | --- |
203
+ | 修正实验调用前冻结协议 | `f7c94c6abff9daf7ec81a3967f85a901cdc627916e2319a85dbc3579d8e5a0df` |
204
+ | 修正实验冻结中立评分 oracle | `9268d476bcd67037ed69590d02ccbb94936daa5e0038c120055c8cd8a582e459` |
205
+ | 修正实验任务文件 | `d4293987626bc855c9bcd1a45273ea6bcf068f88b7f1f6a203467a2ac5f3b4fd` |
206
+ | 原实验盲评分 | `95343dfac7fd7fe41df7957f65009a649fa06f0864de17c1adf5f2a087834445` |
207
+ | 原实验盲评报告 | `c7131d5c3343c38b3608f5094ec9b30623e69a9e7c895c6934acabb9b37a4176` |
208
+ | 原实验全步骤聚合索引 | `c41ae20ec9fcce51c801cb8a1cc4b4c65b788b53cc6edb3eadb942bd96f03779` |
209
+ | 修正实验匿名材料 inventory | `936f436842a4239ce5d407538cee67978584d55c66a5172e413f97f27a8d1e8c` |
210
+ | 修正实验盲评分 | `f03e01c1cbf579f1f94c2ae178932d6aac541088b98ca5a4a157abe283d0d131` |
211
+ | 修正实验盲评报告 | `fc87e454771bcf712e5d5cb94290ed3e0fa7a34f8ebba4fd45fef981a1e3744f` |
212
+ | 修正实验全步骤聚合索引 | `7b4fa7b68f53cdd333dbb43c175b3192750faaac8a409a176db075eb61b0ebea` |
213
+ | 修正实验语义覆盖闭合 | `b024fca1db2c20dbfa18422c413cc7dad9364725908cb09a5fdca9cc54aa7fab` |
214
+ | 修正实验独立日志审计报告 | `8a658a2d4138c0e0b52fadeddbce4f45da8d8f144231c50d5781bf9ecd210f85` |
215
+
216
+ ## 实验任务与冻结预算
217
+
218
+ 下表给出修正实验的精确任务。首轮只有 precise-integers 的算法措辞不同,原文及歧义在前文单列;其余十四条逐字相同。预算是单个根会话的验收阈值,完整家族另计。
219
+
220
+ | 任务 ID | 精确任务 |
221
+ | --- | --- |
222
+ | package-name | 请直接调用一次 run_code(不要先调用 capabilities 或其他工具)读取当前项目的 package.json。run_code 必须直接 return name 字段的 JSON 字符串值本身,不要返回对象或数组,也不要 console.log;然后报告该值。 |
223
+ | orientation | 这个项目是做什么的? |
224
+ | test-check | 检查这个项目能否通过测试。 |
225
+ | worktree-status | 这个仓库当前有哪些未提交的变更? |
226
+ | runtime-requirement | 这个项目要求的最低 Node.js 版本是什么? |
227
+ | code-explanation | 解释 internal/value-wire.js 中 projectValueWire 的返回策略。 |
228
+ | small-edit | 在 package.json 中新增 test:unit 脚本,值为 node --test,并验证 JSON 有效。 |
229
+ | negative-fact | README 是否要求 Python 3.12?只报告结论和依据。 |
230
+ | static-import-cell | 在 run_code cell 中直接使用静态 import 声明导入 node:path 的 basename(不要改写为动态导入),用它返回 C:/logs/session.jsonl 的文件名,并报告该文件名。 |
231
+ | numeric-analysis | 读取 data/facts.json 的实际数据,解释其用途;另对 [2,3,5,7,11,13,17,19] 计算和、平均值、中位数、样本方差并核对结果。只读操作,最终给出数据来源和全部数值。 |
232
+ | cross-file-change | 让 lib/processor.js 的 summarize 在保留 count/average 契约基础上增加 median 字段;使用现有 stats 模块中的 median,添加覆盖空数组、奇数和偶数长度的自动化测试,然后运行所有测试。保留已有未提交变更。 |
233
+ | boundary-repair | 修复 internal/config.js:retries 只接受非负安全整数,timeoutMs 只接受正安全整数;无效值恢复现有 defaults。增加负数、零、小数和合法边界测试并运行整个套件,保持其他字段语义及既有未提交变更。 |
234
+ | successive-calculation | 分步骤计算以下固定数据。先读取并保留 [3,7,7,12,20],计算原始平均值与中位数;然后把 12 修正为 9,再计算平均值、中位数和范围;最后解释两阶段差异。每阶段需要用一次真实代码执行得到结果,不要写文件,不预设 REPL 是否保留状态。 |
235
+ | delegated-review | 请委派一个真正的独立子代理只读审查 src/math/stats.js 的平均值和中位数实现,覆盖空数组、奇偶长度、重复值和输入数组是否被排序改变。主代理独立运行少量验证后比较子代理结论,最终给出有依据的审查结果。不要改文件,也不要修改模型路由。 |
236
+ | precise-integers | 用真实代码处理交易金额字符串 ["9007199254740993","7","-2"],计算精确总和,再按 3:2:1 比例分摊。先分别对总额乘以每个权重再除以 6 向下取整,得到三份整数基础份额;把总额减去三份基础份额之和的剩余单位,按原份额顺序依次给前面的份额,每份加一,直到分完。证明三份之和等于总额。不得转换为浮点金额或损失精度;最终给出十进制结果和检验事实,不改文件。 |
237
+
238
+ 所有任务的 runtime-context 实验条件相同:两组均为 `{ "allowed": [], "requiredTransitions": [], "maxSnapshotChars": 8192 }`,不允许插件 catalog/状态注入;仅 package-name 为 canary。
239
+
240
+ 预算向量依次为 `maxModelRequests / maxDirectCalls / maxSourceChars / maxRepeatedSourceCalls / maxResultChars / maxAssistantChars / maxTokenTraffic / maxRuntimeContextChars`;分别约束逻辑模型步骤、直接调用、源码字符、重复源码、结果字符、回答字符、报告的 token traffic 和 runtime-context 字符。
241
+
242
+ | 任务 | 完整预算向量 |
243
+ | --- | --- |
244
+ | package-name | 4 / 3 / 6000 / 0 / 30000 / 12000 / 40000 / 16000 |
245
+ | orientation | 5 / 4 / 12000 / 0 / 50000 / 20000 / 60000 / 20000 |
246
+ | test-check | 6 / 5 / 16000 / 0 / 100000 / 20000 / 80000 / 24000 |
247
+ | worktree-status | 5 / 4 / 12000 / 0 / 50000 / 20000 / 60000 / 20000 |
248
+ | runtime-requirement | 5 / 4 / 12000 / 0 / 50000 / 20000 / 60000 / 20000 |
249
+ | code-explanation | 6 / 5 / 18000 / 0 / 80000 / 30000 / 80000 / 24000 |
250
+ | small-edit | 6 / 5 / 18000 / 0 / 80000 / 20000 / 80000 / 24000 |
251
+ | negative-fact | 5 / 4 / 12000 / 0 / 50000 / 20000 / 60000 / 20000 |
252
+ | static-import-cell | 5 / 3 / 8000 / 0 / 30000 / 10000 / 50000 / 24000 |
253
+ | numeric-analysis | 12 / 10 / 30000 / 1 / 150000 / 40000 / 240000 / 40000 |
254
+ | cross-file-change | 12 / 10 / 30000 / 1 / 150000 / 40000 / 240000 / 40000 |
255
+ | boundary-repair | 12 / 10 / 30000 / 1 / 150000 / 40000 / 240000 / 40000 |
256
+ | successive-calculation | 12 / 10 / 30000 / 1 / 150000 / 40000 / 240000 / 40000 |
257
+ | delegated-review | 12 / 10 / 30000 / 1 / 150000 / 40000 / 240000 / 40000 |
258
+ | precise-integers | 12 / 10 / 30000 / 1 / 150000 / 40000 / 240000 / 40000 |
259
+
260
+
261
+ 复现使用顶层数组,每个条目包括 `id`、上表的 `prompt`、完整八维 `machineBudget`、`validator` 和两组 `runtimeContexts`;未设置额外 headerPolicy。Validator 及额外字段如下:
262
+
263
+ | 任务 | validator | 额外字段 |
264
+ | --- | --- | --- |
265
+ | package-name | `package-name` | `{"canary":true}` |
266
+ | orientation | `blind` | 无 |
267
+ | test-check | `test-gate` | 无 |
268
+ | worktree-status | `git-status` | 无 |
269
+ | runtime-requirement | `package-engine` | 无 |
270
+ | code-explanation | `blind` | 无 |
271
+ | small-edit | `package-script` | `{"script":"test:unit","value":"node --test"}` |
272
+ | negative-fact | `readme-phrase` | `{"phrase":"Python 3.12"}` |
273
+ | static-import-cell | `blind` | 无 |
274
+ | numeric-analysis | `blind` | 无 |
275
+ | cross-file-change | `blind` | 无 |
276
+ | boundary-repair | `blind` | 无 |
277
+ | successive-calculation | `blind` | 无 |
278
+ | delegated-review | `blind` | 无 |
279
+ | precise-integers | `blind` | 无 |
280
+
281
+ 单一小型 fixture、单一模型路由与每任务两次重复只能提供描述性观测。未预登记或进行统计显著性检验;同一任务的重复也不能当作不同项目的独立样本。不能据此保证任意项目都有收益,也不能证明所有数据类型、冷恢复、所有原生工具、provider 重试、远端缓存规则或实际费用。
@@ -18,11 +18,11 @@ Install the plugin into the profile that actually runs the target DSH surface. D
18
18
 
19
19
  `danger-full-access` is the primary supported experience. The worker isolates the REPL lifecycle; it is not a malicious-code sandbox. DSH continues to own native-tool scope, policy, approval, cancellation, sandboxing, and scheduling. Narrower profiles expose only their available capabilities; PTC Plus does not simulate missing authority or add another permission system.
20
20
 
21
- The optional `cordisToolsEnabled` integration requires the current DSH installation to provide its shipped `cordis` preset plus the public preset, Skill, Cordis, settings, and tool-runtime services. PTC Plus declares the shared service packages as unrestricted required peers instead of installing private runtime copies. For a pathless preset it asks the Host's `pluginPackages.packageOf` service for the active generation's official preset package and requires the exact `cordis-plugin-development/SKILL.md` before mounting it; an older generation with no package service may resolve only its historical plural preset package relative to the Host's `ctx.baseUrl`. This compatibility path is disabled whenever `pluginPackages` exists, so packages merely reachable from the plugin profile cannot override an active Host result. Runtime capability validation owns compatibility, and CI loads the packed plugin against frozen official `latest` and `next` DSH graphs. That load step mounts the pathless Cordis companion from a separated active-host resource while a resolvable stale package is present beside the packed plugin, runs `scripts/dsh-execution-seam-smoke.mjs` to exercise public provider composition around the execution service the installed tool runtime uses, and runs `scripts/dsh-rpc-contract-smoke.mjs` to register the packed Remote descriptors with the installed TYPERT registry and evaluate the decoder that generation reads ([ADR 0030](adr/0030-serve-both-typert-codec-generations-from-one-codec.md)); an import alone cannot distinguish a loaded plugin from one whose injection is unsatisfied, because Cordis leaves the latter pending without an error, and it cannot show that the Host accepts a wire contract it validates only at registration. The same suite round-trips argument diagnostics through the selected Host's compressed JSONL Session persistence. Service packages retain the dependency graph selected by their Host distribution rather than independently selecting each service's release tag. DSH's profile module fallback must resolve the peers, while `pluginPackages` identifies the official preset resource from an active installation that publishes the service. Do not copy `SKILL.md` or add the Cordis preset's Skill directory to global roots. If the host surface is incomplete, plugin activation or enabling the setting fails instead of loading a second DSH core.
21
+ The optional `cordisToolsEnabled` integration requires the current DSH installation to provide its shipped `cordis` preset plus the public preset, Skill, Cordis, settings, and tool-runtime services. PTC Plus declares the shared service packages as unrestricted required peers instead of installing private runtime copies. For a pathless preset it asks the Host's `pluginPackages.packageOf` service for the active generation's official preset package and requires the exact `cordis-plugin-development/SKILL.md` before mounting it; an older generation with no package service may resolve only its historical plural preset package relative to the Host's `ctx.baseUrl`. This compatibility path is disabled whenever `pluginPackages` exists, so packages merely reachable from the plugin profile cannot override an active Host result. Runtime capability validation owns compatibility, and CI checks the packed plugin against frozen official `latest`, `next`, and newest published release graphs. Each result applies only to the tested cohort. That load step mounts the pathless Cordis companion from a separated active-host resource while a resolvable stale package is present beside the packed plugin, runs `scripts/dsh-execution-seam-smoke.mjs` to exercise public provider composition around the execution service the installed tool runtime uses, and runs `scripts/dsh-rpc-contract-smoke.mjs` to register the packed Remote descriptors with the installed TYPERT registry and evaluate the decoder that generation reads ([ADR 0030](adr/0030-serve-both-typert-codec-generations-from-one-codec.md)); an import alone cannot distinguish a loaded plugin from one whose injection is unsatisfied, because Cordis leaves the latter pending without an error, and it cannot show that the Host accepts a wire contract it validates only at registration. The same suite round-trips argument diagnostics through the selected Host's compressed JSONL Session persistence. Service packages retain the dependency graph selected by their Host distribution rather than independently selecting each service's release tag. DSH's profile module fallback must resolve the peers, while `pluginPackages` identifies the official preset resource from an active installation that publishes the service. Do not copy `SKILL.md` or add the Cordis preset's Skill directory to global roots. If the host surface is incomplete, plugin activation or enabling the setting fails instead of loading a second DSH core.
22
22
 
23
23
  The plugin attaches to whichever program-execution service the installed DSH registers, and it presents the capabilities of the execution it performs ([ADR 0028](adr/0028-attach-to-the-host-ptc-execution-seam.md)). Cells run in the session kernel under the session's configured budgets, so `run_code` advertises neither a per-call deadline nor a file sandbox, and DSH rejects `timeoutMs` and `sandbox_permissions` with its own message instead of the plugin accepting an input it would then ignore.
24
24
 
25
- Install the complete `cordis.patch.yml` bundle, not only its main plugin row. The bundle preserves the original `ptc-runtime` module and configuration, isolates its `ptcRuntime` service as `ptc-plus-original`, and adds the independent `dsh-ptc-plus/execution-provider` row before the main row. A custom composition must set that provider row's `originalEntryId` to its actual source row ID relative to the provider row's Loader tree (the profile Include subtree in standard installations) and its `isolation` to the same value as the source row's `isolate.ptcRuntime`; keep PTC Plus runtime settings on the main row. The adapter registers its own public provider and never writes to the original instance. Disabling the main row restores native delegation through the adapter; removing the complete bundle also restores the original global service. An uncomposed original produces an explicit composition diagnostic rather than a mutation fallback.
25
+ Install the complete `cordis.patch.yml` bundle, not only its main plugin row. The bundle preserves the original `ptc-runtime` module and configuration, isolates its `ptcRuntime` service as `ptc-plus-original`, and adds the independent `dsh-ptc-plus/execution-provider` row before the main row. A custom composition must set that provider row's `originalEntryId` to its actual source row ID relative to the provider row's Loader tree (the profile Include subtree in standard installations) and its `isolation` to the same value as the source row's `isolate[serviceName]`; set `serviceName` to the source service (`codeRuntime` for request-only execution, `ptcRuntime` for the resolved-spec contract); keep PTC Plus runtime settings on the main row. The adapter registers its own public provider and never writes to the original instance. Disabling the main row restores native delegation through the adapter; removing the complete bundle also restores the original global service. An uncomposed original produces an explicit composition diagnostic rather than a mutation fallback.
26
26
 
27
27
  Supported installations use an unmodified official DSH release. Local plugin development packages this checkout. The release development launcher uses the published Host; the opt-in [upstream source launcher](#upstream-source-development-launcher-windows) builds the unmodified official repository for testing unreleased changes. Neither path patches the Host. Missing public layout interfaces remain a feature limitation, not an instruction to customize DSH. See [ADR 0017](adr/0017-track-the-latest-dsh-public-surface.md) for distribution and acceptance requirements.
28
28
 
@@ -30,7 +30,7 @@ The Client root requires `slots`, `locale`, `connection`, and `remote`; it adopt
30
30
 
31
31
  ### Compatibility Evidence
32
32
 
33
- The two frozen dependency graphs are installation cohorts, not proof of two distinct capability generations. `compat/latest/package-lock.json` and the root `package-lock.json` record the releases each smoke actually installs; their channel names do not prove the live npm dist-tags or compatibility with an adjacent earlier release. Both recorded cohorts exercise `ptcRuntime`, `configForms`, `plugins.row.config`, volatile configuration and `codec.create()`. `npm run host:baseline:verify` checks frozen graph consistency, not every historical fallback or current registry availability.
33
+ The frozen dependency graphs are installation cohorts, not proof of distinct capability generations. `compat/latest/package-lock.json`, the root `package-lock.json`, and `compat/current/package-lock.json` record the latest-tag, next-tag, and newest published-release cohorts respectively; their recorded provenance does not prove live registry availability or untested compatibility. The latest/next cohorts exercise `ptcRuntime`, `configForms`, `plugins.row.config`, volatile configuration and `codec.create()`. `npm run host:baseline:verify` checks frozen graph consistency, not every historical fallback or current registry availability.
34
34
 
35
35
  | Retained interface | Evidence and consequence of removal |
36
36
  | --- | --- |
@@ -40,19 +40,19 @@ The two frozen dependency graphs are installation cohorts, not proof of two dist
40
40
  | Historical icon names and missing primitives | Fixtures establish component fallback, not a complete earlier Client. Removal of icon candidates loses native glyphs; usable text/component fallbacks must remain. |
41
41
  | Menu without a `children` region | Rendering probe plus a plugin-owned fallback. Removal makes binding actions unreachable on that historical primitive; JSX is not passed through the Host's string-only label field. |
42
42
  | `codec.schema` | Historical, unfrozen registry shape. Removal rejects Remote registration on schema-only Hosts. The factory and schema share one decoder. |
43
- | `codeRuntime.run(request)` | Historical, unfrozen execution shape. Removal leaves that Host without a session REPL attachment. Fixture tests preserve it; both frozen graphs exercise resolve/run instead. |
43
+ | `codeRuntime.run(request)` | Explicit request-only composition support. Public Loader tests preserve request identity, reload and removal; the default bundle and current official base profile use the resolved-spec `ptcRuntime` contract. |
44
44
  | Plural preset-package layout and Host-anchored resolution | Historical Hosts without `pluginPackages` need this companion-resource path. Removal breaks their Cordis companion; it must never override an available active-Host package service. |
45
45
  | `sessionQuery.observeSession` and host-only `sessionProjections` | Current history and presentation owners; missing services are diagnosed, not treated as empty recovery evidence. The projection publishes no Client wire view. |
46
46
  | Legacy session event arrays and V0 boundary migration | Read-only fixtures preserve historical ancestry and file conversion through the shared event transition. Removal can discard reconstructable older sessions; malformed arrays are diagnosed, and format conversion does not prove a complete older Host's live behavior. |
47
47
 
48
- Capabilities select behavior, never a release number. Historical fixture success is not packed-Host evidence. Full Host smoke is bounded to its selected graph, and a clean build is not live browser activation. Public provider composition supports frozen original execution instances without changing their descriptors. Two integration boundaries are accepted: the result bridge requires mutable registered tool definitions ([ADR 0028](adr/0028-attach-to-the-host-ptc-execution-seam.md)), and the two-tool model projection retains a complete native registry and SDK through scoped `both` presentation plus assembly projection ([ADR 0005](adr/0005-temporary-rejected-cell-edit-transport.md)). Proven native miscalls are normalized before Host dispatch; an unnormalized root call can reach approval before the plugin rejects it. Frozen tool definitions remain unsupported. Acceptance preserves current behavior and DSH governance; it does not claim that the missing public metadata or independent direct-admission contracts have been implemented.
48
+ Capabilities select behavior, never a release number. Historical fixture success is not packed-Host evidence. Full Host smoke is bounded to its selected graph, and a clean build is not live browser activation. Public provider composition supports frozen original execution instances without changing their descriptors. The result bridge requires mutable registered tool definitions ([ADR 0028](adr/0028-attach-to-the-host-ptc-execution-seam.md)); frozen tool definitions remain unsupported. The public admission boundary uses DSH's published `ptc` mode: `run_code` is the sole top-level transport, and the agent-scoped editor is invoked through `tools.edit_run_code` inside a program ([ADR 0005](adr/0005-temporary-rejected-cell-edit-transport.md#public-integration-status)). Packed lifecycle evidence covers actual nested admission, derived execution, persisted recovery and provider handback on its frozen official Host graph; an internal fixture or provider seam probe alone does not establish that compatibility. Proven native miscalls are normalized before Host dispatch; an unnormalized root call can reach approval before the plugin rejects it.
49
49
 
50
50
  ## npm Release
51
51
 
52
52
  Use this form after the selected version is available from the npm registry:
53
53
 
54
54
  ```sh
55
- dsh plugin --profile <profile> add dsh-ptc-plus@0.4.10
55
+ dsh plugin --profile <profile> add dsh-ptc-plus@0.5.0
56
56
  dsh --profile <profile> --dump-config
57
57
  ```
58
58
 
@@ -89,7 +89,7 @@ pnpm dsh --profile <profile> --dump-config
89
89
 
90
90
  ```sh
91
91
  npm pack
92
- dsh plugin --profile <profile> add /absolute/path/to/dsh-ptc-plus-0.4.10.tgz
92
+ dsh plugin --profile <profile> add /absolute/path/to/dsh-ptc-plus-0.5.0.tgz
93
93
  dsh --profile <profile> --dump-config
94
94
  ```
95
95
 
@@ -99,6 +99,10 @@ Windows development checkouts can create and install an immutable content-addres
99
99
  scripts\install-dev.cmd <profile>
100
100
  ```
101
101
 
102
+ `install-dev.cmd`, `run-dev-dsh.cmd`, and `run-upstream-dsh.cmd` share a Windows dependency check before packing. The check validates installed direct dependencies against `package-lock.json`, checks that resolvable module entries and declared CLI executables exist in their local installed packages, and executes esbuild with the selected Windows Node. Executable-only packages and packages without an exported require root remain valid. A working checkout uses its existing dependencies. If they are missing, stale, or contain a Linux binary installed by WSL, the scripts automatically run Windows `npm ci` in the Git-ignored `win_node_modules` directory. That directory holds a refreshed copy of package inputs and prepack scripts alongside its own standard `node_modules`, so both ESM imports and bundler resolution use the Windows dependencies. The original checkout's `node_modules` is untouched.
103
+
104
+ Unchanged manifest, lockfile, Node runtime, and process registry settings reuse the cached dependencies after the dependency check. Changed inputs or detected dependency damage trigger a fresh isolated installation. Failed installation leaves no successful-install marker and can be retried. Failed packing in the cache also clears that marker, preserving the original failure and requiring a clean installation on retry if prepack exposed damage beyond the probe. Concurrent packing in the same cache stops with a clear diagnostic. Source inputs refresh on every pack, and stale generated bundles still fail `build:check` rather than being rebuilt silently. You can remove `win_node_modules` while these scripts are stopped to reclaim the cache; the next fallback recreates it.
105
+
102
106
  Installation and a successful Host import do not prove browser activation. Run the model-free packed Web smoke from this checkout with the latest DSH installed, its `pnpm` available, and a Playwright browser:
103
107
 
104
108
  ```sh
@@ -108,9 +112,17 @@ npm run test:client:web -- --dsh-entry /absolute/path/to/dsh/lib/bin.js
108
112
 
109
113
  On Windows, `--browser-channel msedge` can use the existing Edge installation. The script packs the current source, installs the tarball through `dsh plugin` into a temporary `DSH_HOME`, starts Web on a free loopback port, and opens the conversation and PTC Plus settings surfaces. It closes its browser/Host and removes the temporary profile; screenshots and release evidence remain under ignored `artifacts/client-web-smoke/`. It makes no model request and does not use or update the normal profile. `npm run test:client` supplies the deterministic provider, renderer, projection, and disposal tests included in `verify`/`check`.
110
114
 
115
+ The README's bilingual interface screenshots come from the same prerequisites. Refresh them from the current candidate instead of capturing by hand:
116
+
117
+ ```sh
118
+ npm run readme:screenshots -- --dsh-entry /absolute/path/to/dsh/lib/bin.js
119
+ ```
120
+
121
+ `scripts/readme-screenshots.mjs` packs the checkout, installs the tarball into a temporary `DSH_HOME`, boots the official Web Host with the deterministic `scripts/readme-screenshots-fixture.mjs` provider, runs one PTC session per locale — each session's title is that locale's prompt — plus the plugin settings dialog, and writes `assets/ptc-plus-repl-workspace-<locale>.png` and `assets/ptc-plus-settings-<locale>.png` at 1.5× pixel density. The settings frame photographs the dialog at the width the product gives it on a wide window; the REPL frame photographs the window with its sidebar collapsed. `--out <directory>` stages the frames elsewhere for review and `--locale zh` or `--locale en` refreshes one language. The run makes no model request and leaves the operator's profile untouched. Each capture confirms its surface while photographing into a staging directory — surface present, REPL observation settled, layout photographable — and all frames reach the output directory only after the whole run, including its page-error assertion, passes, so a broken candidate cannot replace a README image. A headless runner needs a font covering both locales (`fonts-noto-cjk` on Debian and Ubuntu images); without one the frames render missing-glyph boxes.
122
+
111
123
  ## Isolated latest-DSH development launcher
112
124
 
113
- To test this checkout in a separate DSH installation, double-click `scripts\run-dev-dsh.cmd`. It orders all published DSH releases by semantic version, prereleases included, and selects the newest release whose complete dependency cohort npm can install, rather than following a dist-tag that a release can leave behind. If a newly published root package still has missing exact-version dependencies, the launcher warns and tries the preceding release; an explicit `DSH_DEV_VERSION` remains exact and fails instead of falling back. It installs only when the selected cached version changes, creates the shipped `web` profile inside an isolated `DSH_HOME`, installs this checkout, and starts DSH. When no port is supplied, the default Web profile reuses its cached loopback port while that port is available; an invalid cache entry or occupied port is replaced with a free port. This keeps browser authentication stable across ordinary restarts without blocking another DSH on port 3080. The launched Host receives a 64 KiB HTTP request-header limit while retaining existing Node options to accommodate development authentication cookies and the combined Client plugin request during Web boot. The launcher does not modify the repository or your normal DSH home.
125
+ To test this checkout in a separate DSH installation, double-click `scripts\run-dev-dsh.cmd`. It orders all published DSH releases by semantic version, prereleases included, and selects the newest release whose complete dependency cohort npm can install, rather than following a dist-tag that a release can leave behind. If a newly published root package still has missing exact-version dependencies, the launcher warns and tries the preceding release; an explicit `DSH_DEV_VERSION` remains exact and fails instead of falling back. It installs only when the selected cached version changes, creates the shipped `web` profile inside an isolated `DSH_HOME`, installs this checkout, and starts DSH. When no port is supplied, the default Web profile reuses its cached loopback port while that port is available; an invalid cache entry or occupied port is replaced with a free port. This keeps browser authentication stable across ordinary restarts without blocking another DSH on port 3080. The launched Host receives a 64 KiB HTTP request-header limit while retaining existing Node options to accommodate development authentication cookies and the combined Client plugin request during Web boot. The launcher does not modify tracked repository files, the checkout dependency directory, or your normal DSH home.
114
126
 
115
127
  The launcher defaults to `https://registry.npmjs.org/` for version queries, npm installs and DSH's pnpm subprocesses, including the `@deepseek-ai` scope. This avoids mirror synchronization gaps where a new DSH package is available before its dependencies. It prints the selected registry and refreshes version metadata online; an unavailable version query can still reuse the previously cached version. Set `DSH_DEV_REGISTRY` to an absolute HTTP(S) registry URL to select another source explicitly. The choice applies only to the launcher process and its children; npm configuration files and persistent environment settings are unchanged. Other explicitly configured package scopes retain their own registries.
116
128
 
@@ -145,11 +157,20 @@ dsh plugin add github:muyuanjin/dsh-ptc-plus#main
145
157
  dsh --dump-config
146
158
  ```
147
159
 
148
- After an npm release, the package spec may instead be `dsh-ptc-plus@0.4.10`. For a local package, use its absolute tarball path. Restart DSH Desktop after installation. Linux Desktop is not a current DSH Desktop release target; use DSH CLI/Web on Linux.
160
+ After an npm release, the package spec may instead be `dsh-ptc-plus@0.5.0`. For a local package, use its absolute tarball path. Restart DSH Desktop after installation. Linux Desktop is not a current DSH Desktop release target; use DSH CLI/Web on Linux.
149
161
 
150
162
  ## Upgrades
151
163
 
152
- PTC Plus upgrades independently of the host. Replace the installed package with the new release the same way it was installed — `npm install dsh-ptc-plus@latest`, a new tarball, or an updated pinned Git revision in the profile patch — and restart the host so every profile reloads the plugin. The plugin never patches DSH and never requires a custom host build, so a host upgrade keeps the plugin working as long as the public surfaces it needs are still published.
164
+ PTC Plus upgrades through the official profile package transaction. From any working directory, explicitly target the installed profile:
165
+
166
+ ```sh
167
+ dsh plugin --profile <profile> add dsh-ptc-plus@latest
168
+ dsh --profile <profile> --dump-config
169
+ ```
170
+
171
+ For a tarball or a different pinned Git revision, replace the `add` argument with the absolute tarball path or `github:muyuanjin/dsh-ptc-plus#COMMIT_SHA`. This updates the profile dependency spec; the Loader module name remains `dsh-ptc-plus`. `dsh plugin --profile <profile> update dsh-ptc-plus` updates within its saved dependency constraint, so it cannot move an exact pinned revision to a different revision. Bare commands in Desktop's **Open DSH Terminal** target its active profile.
172
+
173
+ Restart the selected Host after the package transaction and verify its selected package and full bundle in the plugin page and `--dump-config`; installing dependencies alone does not replace already loaded JavaScript. Preserve the bundle's existing enabled/disabled choice. A source-checkout `npm ci` only prepares developer dependencies, and Windows build-cache preparation only prepares a tarball: neither upgrades a profile. Avoid `npm install` in an unrelated shell directory and do not edit Loader module names to encode revisions. The plugin never patches DSH or requires a custom Host build. Compatibility claims require the current published cohort's packed acceptance evidence.
153
174
 
154
175
  Your settings document and session logs are not rewritten by an upgrade. A release that adds a configuration field applies its documented default until you choose a value. A release that raises the Session format generation requires the migration below before an older log is opened by the new Host; the plugin reports that condition instead of rewriting history on its own.
155
176
 
@@ -4,11 +4,11 @@
4
4
 
5
5
  ## Typed tools
6
6
 
7
- 浏览、搜索和 DSH 服务调用使用当前 scope 的 native `tools.*`。canonical result 直接进入 cell,不经过 PTC 参数翻译或结果裁剪。对完全省略参数的 native call,runtime 只在 DSH 的 live object schema 验证 `{}` 合法时把 omission 规范为 `{}`;该值随后统一进入 encoding、dispatch、journal 和 replay comparison。`tools.cordis_inspect_list()` 因而等价于显式传入 `{}`,但显式 `undefined`、需要输入的工具、`capabilities.*` 和 owner-provided namespace 不受影响。具体结果可能 complete、bounded、incremental、open-world 或 unknown;模型/UI rendering 的裁剪不能反推 program value 的完整性。
7
+ 浏览、搜索和 DSH 服务调用使用当前 scope 的 native `tools.*`。canonical result 经 PTC graph IPC 进入 cell,不经过参数翻译或结果裁剪;IPC 支持域不扩展 native 工具的 JSON schema 与 lossless JSON 校验。参数编码拒绝发生在 dispatch 前;调用完成后的结果编码拒绝不能声称工具未执行,也不会自动重试。对完全省略参数的 native call,runtime 只在 DSH 的 live object schema 验证 `{}` 合法时把 omission 规范为 `{}`;该值随后统一进入 encoding、dispatch、journal 和 replay comparison。`tools.cordis_inspect_list()` 因而等价于显式传入 `{}`,但显式 `undefined`、需要输入的工具、`capabilities.*` 和 owner-provided namespace 不受影响。具体结果可能 complete、bounded、incremental、open-world 或 unknown;模型/UI rendering 的裁剪不能反推 program value 的完整性。
8
8
 
9
- PTC 模式的 code-only direct-tool projection 只声明模型直接调用真实注册的 `run_code` 与 `edit_run_code`。模型误发的顶层 native call 不属于这个合法 direct protocol;当 live schema 能唯一证明该工具时,transport normalization 将它包装为 `run_code`,cell 再调用同一 `tools.*` member。canonicalizer 先解析并校验一次原始 JSON:普通参数原样嵌入 JavaScript,含 own `__proto__` 的值改用安全字面量;因此派生 cell 不需要 `JSON.parse`,同时保持参数执行语义。规范化不向模型暴露 provenance、纠错提示或额外标记。参数仍由 DSH owner contract 正式验证,未知、畸形或不一致调用原样交给宿主诊断。该历史规范化只适用于无效的 out-of-surface call,不适用于已经合法声明的 `edit_run_code`。
9
+ PTC 模式的 code-only direct-tool projection 只声明顶层 `run_code`。真实注册的 editor 从首轮 program SDK 通过 `tools.edit_run_code` 调用。模型误发的顶层 native call 只有在 live schema 唯一证明该工具时才可规范为调用同一 member 的 `run_code`;editor 不由这条修复路径取得执行资格。canonicalizer 保留原始 JSON 参数,含 own `__proto__` 的值使用安全字面量,超过 TypeScript parser 安全深度的 JSON 使用浅层 `JSON.parse` 表达式。DSH 仍拥有正式 validation、authority 和 result semantics。
10
10
 
11
- `edit_run_code` 是宿主 composite tool:外层 result 向模型返回精简的编辑状态、值与日志,完整物化源码和 journal 只进入标记为 derived 的私有 metadata。cold replay 消费该记录,不把完整源码重新投影给模型,也不把派生 `run_code` 归因给 assistant。
11
+ `tools.edit_run_code` 返回接受或拒绝收据;接受安排完整修订源码在当前外层 cell 结束后经 DSH 正式工具流水线执行。根结果保留外层 canonical return/error,并转发派生执行的正式展示内容。完整派生源码、journal 和 nested 来源关系进入根结果的私有 metadata。cold replay 验证该证据并返回 recorded program-call 值,不重新派发 editor,不把派生 `run_code` 归因给 assistant。参见 [编辑与结算契约](adr/0005-temporary-rejected-cell-edit-transport.md)。
12
12
 
13
13
  每次调用进入 journal:
14
14
 
@@ -20,6 +20,8 @@ DSH authority/policy -> native dispatch -> canonical result
20
20
 
21
21
  cold replay 校验相同的调用序列并返回 recorded value,不重新执行工具。这保证 REPL 计算状态可重建,但不声称外部 effect 可逆或仍与历史相同。Cordis Plugin、Run 和 Inspect observation 属于进程内实时状态;恢复出的 Cordis value 只作为历史数据保留,后续状态性决策必须先按恢复 context 执行新的 live Inspect。
22
22
 
23
+ 插件自有隔离 `code.run` 向父程序返回 canonical completion 的值图,模型展示投影仅用于外层;native 委托保持其 owner-defined result。父子 binding 保持隔离,显式 undefined 与无 return 有区别;历史 recorded-value 字符串不被重新解释。详见 [值契约](value-wire.md)。
24
+
23
25
  同一 settlement 规则适用于当前 request 中的全部 program binding,包括 owner-provided namespace 与 `code.run`。已结算的 value/error 可进入 durable transcript;若取消、超时或 worker failure 发生时调用仍未结算,cell heap 回滚,discarded journal 以实际 `global.member` 保留 possible-effect boundary。分类来自可观察生命周期,不来自 capability 名称表。
24
26
 
25
27
  直接 Node/OS 输入没有 binding transcript。worker 首次观察到这类 volatile 边界时立即通知主线程;即使 cell 随后 hard abort、timeout 或 worker exit,discarded journal 仍保留已观察原因。该恢复事实不作为普通成功任务的模型可见警告。
@@ -20,7 +20,7 @@
20
20
 
21
21
  npm 发布遵循 [ADR 0022](adr/0022-stage-npm-releases-with-oidc.md),使用 `.github/workflows/release.yml` 声明的 Trusted Publisher,不向 GitHub 保存 npm write token。npm package settings 必须把 publisher 精确绑定到 `muyuanjin/dsh-ptc-plus`、workflow filename `release.yml` 和 environment `npm-release`,且只允许 `npm stage publish`。Publishing access 选择页面中最严格且标记为 recommended 的 2FA 选项;npm 文档称其为 `Require two-factor authentication and disallow tokens`,当前 npm 页面也可能显示 `Require two-factor authentication and disallow bypass 2fa tokens (recommended)`。不要从滚动变化的标签推断账户中已不存在传统 token。OIDC 只把经过验证的 tarball 放入 npm staging,维护者仍须在 npm CLI 或 npmjs.com 检查 staged package 并以 2FA approve,包才会进入公开 registry。
22
22
 
23
- 普通 `CI` 只在 `main` push 或 pull request 包含非纯文档变更时运行:只改动 `**.md`、`assets/**` 或 `LICENSE` 的提交不触发矩阵。发布 commit 因包含 `package.json` 与 `package-lock.json` 变更必然产生一次 `main` push run,Release workflow 仍要求该 commit 有成功的 run 才继续。发布前创建 annotated `v<package.version>` tag,原子推送 release commit 与 tag,等待该 commit 的 `CI` 成功,然后以该 tag 作为 ref 显式运行 `Release` workflow。workflow 不接受另一个 tag input,并会重新证明 dispatch 的 `GITHUB_REF`、`GITHUB_SHA`、annotated tag target、checkout HEAD、manifest 版本和成功 CI 的 SHA 完全一致;release job 使用 GitHub-hosted Node `24.15.0`、npm `12.0.2`、无 package-manager cache 和最小 `id-token: write` 权限,构建一个 tarball、执行 clean-consumer smoke,再对同一文件执行 `npm stage publish`。`package.json#allowScripts` 显式拒绝当前不需要的 `esbuild` install script;`replace-registry-host=always` 让 release install 将 lockfile 中的 registry tarball 路由到显式 npm 官方 registry,而不放宽 npm 12 的 Git/remote dependency 默认拒绝。
23
+ 普通 `CI` 只在 `main` push 或 pull request 包含非纯文档变更时运行:只改动 `**.md`、`assets/**` 或 `LICENSE` 的提交不触发矩阵。发布 commit 因包含 `package.json` 与 `package-lock.json` 变更必然产生一次 `main` push run,Release workflow 仍要求该 commit 有成功的 run 才继续。发布前创建 annotated `v<package.version>` tag,原子推送 release commit 与 tag,等待该 commit 的 `CI` 成功,然后以该 tag 作为 ref 显式运行 `Release` workflow。workflow 不接受另一个 tag input,并会重新证明 dispatch 的 `GITHUB_REF`、`GITHUB_SHA`、annotated tag target、checkout HEAD、manifest 版本和成功 CI 的 SHA 完全一致;release job 使用 GitHub-hosted Node `24.15.0`、npm `12.0.2`、无 package-manager cache 和最小 `id-token: write` 权限,构建一个 tarball、执行使用同一冻结宿主 peer 图的 clean-consumer smoke,再对同一文件执行 `npm stage publish`。`package.json#allowScripts` 显式拒绝当前不需要的 `esbuild` install script;`replace-registry-host=always` 让 release install 将 lockfile 中的 registry tarball 路由到显式 npm 官方 registry,而不放宽 npm 12 的 Git/remote dependency 默认拒绝。
24
24
 
25
25
  ```powershell
26
26
  git tag -a "v$((Get-Content package.json | ConvertFrom-Json).version)" -m "v$((Get-Content package.json | ConvertFrom-Json).version)"
@@ -42,11 +42,11 @@ npm.cmd stage approve '<stage-id>' --registry=https://registry.npmjs.org/
42
42
 
43
43
  ## Release checklist
44
44
 
45
- 1. 提交前在稳定工作树上运行完整 `npm run check`,生成 coverage 与 review proof。仓库 CI 在 Linux Node `22.19.0`、24.x、26.x,以及 Windows 与 macOS Node 24.x 的干净安装上运行 `npm run verify:ci`,检查构建、Client 与跨平台关键运行契约;Ubuntu Node 24.x 另运行打包后的 `latest` / `next` Host contracts。CI 不重复收集 coverage 或执行穷尽式后端套件。
46
- 2. 运行 `npm audit --omit=dev`、`npx publint`、`git diff --check`、Markdown local-link check 和 `npm pack --silent --dry-run --json`。audit 检查随包安装的 production 依赖图;宿主 DSH 及其开发依赖不进入插件 tarball,由冻结宿主契约和 CI 单独验证。确认 tarball 只包含发布白名单内的运行时代码、文档和展示资产,不含凭据、本地路径、开发脚本或测试夹具,并从 tarball 安装到空目录执行 ESM import smoke。机器读取 `npm pack --json` 时保持 `--silent`,避免 lifecycle 输出混入 JSON stream。
45
+ 1. 提交前在稳定工作树上运行完整 `npm run check`,执行无覆盖插桩的完整普通后端测试并生成 review proof。覆盖率只在准备发布新版本时运行;Release workflow 在打包与 npm staging 前对 release tag 执行 `npm run coverage`,要求行与函数覆盖率 100%、分支覆盖率至少 95%。发布准备期间可在本地运行同一命令,并用 `npm run coverage:focus` 诊断覆盖率缺口;日常开发、审查与提交不运行覆盖率专用套件、采集探针或插桩分支;这些测试由 `test/coverage/` 和发布入口的显式标记拥有。仓库 CI 在 Linux Node `22.19.0`、24.x、26.x,以及 Windows 与 macOS Node 24.x 的干净安装上运行 `npm run verify:ci`,检查构建、Client 与跨平台关键运行契约;Ubuntu Node 24.x 另运行打包后的 `latest` / `next` Host contracts。普通 CI 不收集 coverage 或执行穷尽式后端套件。
46
+ 2. 运行 `npm audit --omit=dev`、`npx publint`、`git diff --check`、Markdown local-link check 和 `npm pack --silent --dry-run --json`。audit 检查随包安装的 production 依赖图;宿主 DSH 及其开发依赖不进入插件 tarball,由冻结宿主契约和 CI 单独验证。确认 tarball 只包含发布白名单内的运行时代码、文档和展示资产,不含凭据、本地路径、开发脚本或测试夹具,并执行 `npm run test:package:consumer -- <tarball>`:入口先校验当前安装的宿主与其 lock 一致,再将宿主实际提供的 peer 版本与 tarball 放在同一次 npm 安装事务中,在空目录执行 ESM import、内置编译器栈与内核 worker 加载 smoke。不能让 npm 对各宿主 peer 分别选用 dist-tag;插件继续声明不限制版本的 required peers,不私装宿主服务副本。机器读取 `npm pack --json` 时保持 `--silent`,避免 lifecycle 输出混入 JSON stream。
47
47
  3. 更新到最新可用 DSH release 并记录 `dsh --version`。分别从 npm 包、固定 Git commit、源码 checkout 和 tarball 安装到临时 profile,再执行 `dsh --profile <profile> --dump-config`,确认只新增 `ptc-plus` row。每个上游 release 都重新验证公共扩展面、CLI/Web 集成和 profile 装配,不设置版本白名单。
48
- 4. 在 Windows 与 Linux 运行无模型调用的 `npm run test:client:web -- --dsh-entry <latest-installed-dsh/lib/bin.js>`,验证 tarball 安装后的真实 Web Client、设置与对话 surface;浏览器前置条件见 [安装指南](installation.md)。`build:check`、Host ESM import 和 factory smoke 均不能替代浏览器激活验收。macOS 由原生 runner 验证 CLI/Web;Windows 与 macOS Desktop 从托盘打开当前 profile 的 DSH Terminal 安装,重启 Desktop 后做一次 PTC 模式 smoke。Desktop 当前发布平台不包括 Linux。
49
- 5. 只有在明确授权模型消耗后才运行 `npm run test:expensive` 与 `npm run test:ab`。发布结论以结构化测试结果为准,不把一次模型样本推广为普遍保证。
48
+ 4. 在 Windows 与 Linux 运行无模型调用的 `npm run test:client:web -- --dsh-entry <latest-installed-dsh/lib/bin.js>`,验证 tarball 安装后的真实 Web Client、设置与对话 surface;浏览器前置条件见 [安装指南](installation.md)。`build:check`、Host ESM import 和 factory smoke 均不能替代浏览器激活验收。macOS 由原生 runner 验证 CLI/Web;Windows 与 macOS Desktop 从托盘打开当前 profile 的 DSH Terminal 安装,重启 Desktop 后做一次 PTC 模式 smoke。Desktop 当前发布平台不包括 Linux。界面有变化时用同一前置条件刷新 README 截图:`npm run readme:screenshots -- --dsh-entry <latest-installed-dsh/lib/bin.js>` 从当前打包候选各写回一帧中英文 REPL 工作台与设置窗口;先用 `--out <directory>` 落到别处检查,命令、前置条件与失败边界见 [安装指南](installation.md)。
49
+ 5. 只有在明确授权模型消耗后才运行 `npm run test:expensive` 与 `npm run test:ab`;发布候选还要用 `DSH_PTC_ACCEPTANCE_SCENARIOS=managed-adaptive-surface,managed-session-resume,managed-surface-change,subagent-continuity` 追加托管能力面、会话恢复、宿主表面变化与子代理场景(运行方式、预算与版本差异判别见[评估](evaluation.md#managed-session-continuity-cohort))。发布结论以结构化测试结果为准,不把一次模型样本推广为普遍保证。
50
50
  6. 确认 npm 包名可用、待发布版本高于 registry 版本、README 截图来自真实 DSH 会话,并核对 repository、homepage、bugs、license 与 `dsh-plugin` topic。
51
51
  7. 最后检查 `npm pack --silent --json` 的名称、版本、大小与文件列表,创建 annotated release tag,并确认 tag commit 已通过 `CI`。运行 `Release` workflow 将同一源码产生的 tarball送入 npm staging;人工检查并以 2FA approve 后,等待 registry 扫描完成,再创建 GitHub Release。Release notes 的内容取舍与风格由 [release-notes.md](release-notes.md) 拥有。
52
52