deadbyte-mcp 0.8.10 → 0.10.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 (388) hide show
  1. package/CONTEXT.md +41 -0
  2. package/MANIFEST.SHA256 +386 -94
  3. package/R34-BASELINE.json +9 -0
  4. package/README.txt +141 -10
  5. package/bench/fixtures/corpus.json +36 -0
  6. package/bench/fixtures/r36/case-map.json +8 -0
  7. package/bin/WORKER-REGISTRY.txt +3 -3
  8. package/bin/appcontainer-stage.exe +0 -0
  9. package/bin/appcontainer-stage.obj +0 -0
  10. package/bin/bootstrap-advapi32.exe +0 -0
  11. package/bin/bootstrap-advapi32.obj +0 -0
  12. package/bin/bootstrap-exitcode.exe +0 -0
  13. package/bin/bootstrap-exitcode.obj +0 -0
  14. package/bin/bootstrap-kernel32.exe +0 -0
  15. package/bin/bootstrap-kernel32.obj +0 -0
  16. package/bin/child-control-probe.exe +0 -0
  17. package/bin/child-control-probe.obj +0 -0
  18. package/bin/child-control-stage.exe +0 -0
  19. package/bin/child-control-stage.obj +0 -0
  20. package/bin/contained-reverse-worker.exe +0 -0
  21. package/bin/contained-reverse-worker.obj +0 -0
  22. package/bin/contained-transform-worker.exe +0 -0
  23. package/bin/contained-transform-worker.obj +0 -0
  24. package/bin/containment-probe.exe +0 -0
  25. package/bin/containment-probe.obj +0 -0
  26. package/bin/deadbyte-contain.exe +0 -0
  27. package/bin/deadbyte-contain.obj +0 -0
  28. package/bin/deadbyte-exec.exe +0 -0
  29. package/bin/deadbyte-exec.obj +0 -0
  30. package/bin/deadbyte-process-host.exe +0 -0
  31. package/bin/deadbyte-process-host.obj +0 -0
  32. package/bin/deadbyte-tunnel-host.exe +0 -0
  33. package/bin/deadbyte-tunnel-host.obj +0 -0
  34. package/controller/README.TXT +12 -4
  35. package/controller/deadbyte-controller.config.psd1.example +14 -0
  36. package/controller/deadbyte-controller.ps1 +191 -20
  37. package/controller/deadbyte-process-policy.json +5 -5
  38. package/controller/deadbyte-semantic-lsp-config.json +95 -0
  39. package/docs/ADR-0001-PRODUCTION-BASELINE-SEAMS.md +29 -0
  40. package/docs/ARCHITECTURE.md +6 -5
  41. package/docs/R36-CAPABILITY-EVIDENCE.md +43 -0
  42. package/docs/superpowers/plans/2026-09-16-deadbyte-loop-engine.md +846 -0
  43. package/docs/superpowers/plans/2026-09-17-r35-production-successor.md +408 -0
  44. package/docs/superpowers/plans/2026-09-18-r36-zero-loss-autonomy.md +739 -0
  45. package/docs/superpowers/specs/2026-09-16-deadbyte-loop-engine-design.md +435 -0
  46. package/docs/superpowers/specs/2026-09-17-r35-production-successor-design.md +220 -0
  47. package/docs/superpowers/specs/2026-09-18-r36-zero-loss-autonomy-design.md +640 -0
  48. package/node_modules/typescript/LICENSE.txt +55 -0
  49. package/node_modules/typescript/README.md +50 -0
  50. package/node_modules/typescript/SECURITY.md +41 -0
  51. package/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
  52. package/node_modules/typescript/bin/tsc +2 -0
  53. package/node_modules/typescript/bin/tsserver +2 -0
  54. package/node_modules/typescript/lib/_tsc.js +133818 -0
  55. package/node_modules/typescript/lib/_tsserver.js +659 -0
  56. package/node_modules/typescript/lib/_typingsInstaller.js +222 -0
  57. package/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2122 -0
  58. package/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2122 -0
  59. package/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2122 -0
  60. package/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2122 -0
  61. package/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2122 -0
  62. package/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2122 -0
  63. package/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2122 -0
  64. package/node_modules/typescript/lib/lib.d.ts +22 -0
  65. package/node_modules/typescript/lib/lib.decorators.d.ts +384 -0
  66. package/node_modules/typescript/lib/lib.decorators.legacy.d.ts +22 -0
  67. package/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +41 -0
  68. package/node_modules/typescript/lib/lib.dom.d.ts +39429 -0
  69. package/node_modules/typescript/lib/lib.dom.iterable.d.ts +571 -0
  70. package/node_modules/typescript/lib/lib.es2015.collection.d.ts +147 -0
  71. package/node_modules/typescript/lib/lib.es2015.core.d.ts +597 -0
  72. package/node_modules/typescript/lib/lib.es2015.d.ts +28 -0
  73. package/node_modules/typescript/lib/lib.es2015.generator.d.ts +77 -0
  74. package/node_modules/typescript/lib/lib.es2015.iterable.d.ts +605 -0
  75. package/node_modules/typescript/lib/lib.es2015.promise.d.ts +81 -0
  76. package/node_modules/typescript/lib/lib.es2015.proxy.d.ts +128 -0
  77. package/node_modules/typescript/lib/lib.es2015.reflect.d.ts +144 -0
  78. package/node_modules/typescript/lib/lib.es2015.symbol.d.ts +46 -0
  79. package/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
  80. package/node_modules/typescript/lib/lib.es2016.array.include.d.ts +116 -0
  81. package/node_modules/typescript/lib/lib.es2016.d.ts +21 -0
  82. package/node_modules/typescript/lib/lib.es2016.full.d.ts +23 -0
  83. package/node_modules/typescript/lib/lib.es2016.intl.d.ts +31 -0
  84. package/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +21 -0
  85. package/node_modules/typescript/lib/lib.es2017.d.ts +26 -0
  86. package/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
  87. package/node_modules/typescript/lib/lib.es2017.full.d.ts +23 -0
  88. package/node_modules/typescript/lib/lib.es2017.intl.d.ts +44 -0
  89. package/node_modules/typescript/lib/lib.es2017.object.d.ts +49 -0
  90. package/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
  91. package/node_modules/typescript/lib/lib.es2017.string.d.ts +45 -0
  92. package/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
  93. package/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
  94. package/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +53 -0
  95. package/node_modules/typescript/lib/lib.es2018.d.ts +24 -0
  96. package/node_modules/typescript/lib/lib.es2018.full.d.ts +24 -0
  97. package/node_modules/typescript/lib/lib.es2018.intl.d.ts +83 -0
  98. package/node_modules/typescript/lib/lib.es2018.promise.d.ts +30 -0
  99. package/node_modules/typescript/lib/lib.es2018.regexp.d.ts +37 -0
  100. package/node_modules/typescript/lib/lib.es2019.array.d.ts +79 -0
  101. package/node_modules/typescript/lib/lib.es2019.d.ts +24 -0
  102. package/node_modules/typescript/lib/lib.es2019.full.d.ts +24 -0
  103. package/node_modules/typescript/lib/lib.es2019.intl.d.ts +23 -0
  104. package/node_modules/typescript/lib/lib.es2019.object.d.ts +33 -0
  105. package/node_modules/typescript/lib/lib.es2019.string.d.ts +37 -0
  106. package/node_modules/typescript/lib/lib.es2019.symbol.d.ts +24 -0
  107. package/node_modules/typescript/lib/lib.es2020.bigint.d.ts +765 -0
  108. package/node_modules/typescript/lib/lib.es2020.d.ts +27 -0
  109. package/node_modules/typescript/lib/lib.es2020.date.d.ts +42 -0
  110. package/node_modules/typescript/lib/lib.es2020.full.d.ts +24 -0
  111. package/node_modules/typescript/lib/lib.es2020.intl.d.ts +474 -0
  112. package/node_modules/typescript/lib/lib.es2020.number.d.ts +28 -0
  113. package/node_modules/typescript/lib/lib.es2020.promise.d.ts +47 -0
  114. package/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +99 -0
  115. package/node_modules/typescript/lib/lib.es2020.string.d.ts +44 -0
  116. package/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
  117. package/node_modules/typescript/lib/lib.es2021.d.ts +23 -0
  118. package/node_modules/typescript/lib/lib.es2021.full.d.ts +24 -0
  119. package/node_modules/typescript/lib/lib.es2021.intl.d.ts +166 -0
  120. package/node_modules/typescript/lib/lib.es2021.promise.d.ts +48 -0
  121. package/node_modules/typescript/lib/lib.es2021.string.d.ts +33 -0
  122. package/node_modules/typescript/lib/lib.es2021.weakref.d.ts +78 -0
  123. package/node_modules/typescript/lib/lib.es2022.array.d.ts +121 -0
  124. package/node_modules/typescript/lib/lib.es2022.d.ts +25 -0
  125. package/node_modules/typescript/lib/lib.es2022.error.d.ts +75 -0
  126. package/node_modules/typescript/lib/lib.es2022.full.d.ts +24 -0
  127. package/node_modules/typescript/lib/lib.es2022.intl.d.ts +145 -0
  128. package/node_modules/typescript/lib/lib.es2022.object.d.ts +26 -0
  129. package/node_modules/typescript/lib/lib.es2022.regexp.d.ts +39 -0
  130. package/node_modules/typescript/lib/lib.es2022.string.d.ts +25 -0
  131. package/node_modules/typescript/lib/lib.es2023.array.d.ts +924 -0
  132. package/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
  133. package/node_modules/typescript/lib/lib.es2023.d.ts +22 -0
  134. package/node_modules/typescript/lib/lib.es2023.full.d.ts +24 -0
  135. package/node_modules/typescript/lib/lib.es2023.intl.d.ts +56 -0
  136. package/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +65 -0
  137. package/node_modules/typescript/lib/lib.es2024.collection.d.ts +29 -0
  138. package/node_modules/typescript/lib/lib.es2024.d.ts +26 -0
  139. package/node_modules/typescript/lib/lib.es2024.full.d.ts +24 -0
  140. package/node_modules/typescript/lib/lib.es2024.object.d.ts +29 -0
  141. package/node_modules/typescript/lib/lib.es2024.promise.d.ts +35 -0
  142. package/node_modules/typescript/lib/lib.es2024.regexp.d.ts +25 -0
  143. package/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +68 -0
  144. package/node_modules/typescript/lib/lib.es2024.string.d.ts +29 -0
  145. package/node_modules/typescript/lib/lib.es5.d.ts +4601 -0
  146. package/node_modules/typescript/lib/lib.es6.d.ts +23 -0
  147. package/node_modules/typescript/lib/lib.esnext.array.d.ts +35 -0
  148. package/node_modules/typescript/lib/lib.esnext.collection.d.ts +96 -0
  149. package/node_modules/typescript/lib/lib.esnext.d.ts +29 -0
  150. package/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
  151. package/node_modules/typescript/lib/lib.esnext.disposable.d.ts +193 -0
  152. package/node_modules/typescript/lib/lib.esnext.error.d.ts +24 -0
  153. package/node_modules/typescript/lib/lib.esnext.float16.d.ts +445 -0
  154. package/node_modules/typescript/lib/lib.esnext.full.d.ts +24 -0
  155. package/node_modules/typescript/lib/lib.esnext.intl.d.ts +21 -0
  156. package/node_modules/typescript/lib/lib.esnext.iterator.d.ts +148 -0
  157. package/node_modules/typescript/lib/lib.esnext.promise.d.ts +34 -0
  158. package/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +25 -0
  159. package/node_modules/typescript/lib/lib.scripthost.d.ts +322 -0
  160. package/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +41 -0
  161. package/node_modules/typescript/lib/lib.webworker.d.ts +13150 -0
  162. package/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
  163. package/node_modules/typescript/lib/lib.webworker.iterable.d.ts +340 -0
  164. package/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2122 -0
  165. package/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2122 -0
  166. package/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2122 -0
  167. package/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2122 -0
  168. package/node_modules/typescript/lib/tsc.js +8 -0
  169. package/node_modules/typescript/lib/tsserver.js +8 -0
  170. package/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
  171. package/node_modules/typescript/lib/tsserverlibrary.js +21 -0
  172. package/node_modules/typescript/lib/typesMap.json +497 -0
  173. package/node_modules/typescript/lib/typescript.d.ts +11437 -0
  174. package/node_modules/typescript/lib/typescript.js +200276 -0
  175. package/node_modules/typescript/lib/typingsInstaller.js +8 -0
  176. package/node_modules/typescript/lib/watchGuard.js +53 -0
  177. package/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2122 -0
  178. package/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2122 -0
  179. package/node_modules/typescript/package.json +120 -0
  180. package/package.json +5 -3
  181. package/proof/CONTAINMENT-BUILD.txt +6 -6
  182. package/proof/R34-TASK8-SUPERVISOR-CHECKPOINT.json +29 -0
  183. package/proof/R34-TASK9-MCP-SURFACE-CHECKPOINT.json +28 -0
  184. package/scripts/capability-benchmark.mjs +27 -0
  185. package/scripts/deferred-slot-operation.mjs +56 -16
  186. package/scripts/final-closure-verify.mjs +88 -39
  187. package/scripts/final-closure.mjs +63 -56
  188. package/scripts/gate-windows.ps1 +3 -3
  189. package/scripts/release-parity-tests.ps1 +9 -0
  190. package/scripts/release-parity.mjs +149 -139
  191. package/scripts/semantic-preflight.ps1 +73 -0
  192. package/scripts/tool-surface-snapshot.mjs +73 -0
  193. package/scripts/windows-gate-evidence.mjs +5 -5
  194. package/src/audit-verify.mjs +6 -2
  195. package/src/autonomous-action-reconcile.mjs +142 -0
  196. package/src/autonomous-context-engine.mjs +256 -0
  197. package/src/autonomous-live-state.mjs +17 -0
  198. package/src/autonomous-local-supervisor.mjs +249 -0
  199. package/src/autonomous-loop-state.mjs +304 -0
  200. package/src/autonomous-mcp-tools.mjs +5 -1
  201. package/src/autonomous-output-contracts.mjs +26 -7
  202. package/src/autonomous-plan.mjs +181 -0
  203. package/src/autonomous-planner-contracts.mjs +79 -0
  204. package/src/autonomous-planner.mjs +113 -6
  205. package/src/autonomous-policy.mjs +15 -2
  206. package/src/autonomous-progress.mjs +127 -0
  207. package/src/autonomous-runtime.mjs +785 -62
  208. package/src/autonomous-supervisor-host.mjs +70 -0
  209. package/src/autonomous-supervisor.mjs +31 -8
  210. package/src/capability-benchmark-runner.mjs +193 -0
  211. package/src/capability-benchmark.mjs +95 -0
  212. package/src/capability-ledger.mjs +158 -0
  213. package/src/coding-mcp-tools.mjs +65 -8
  214. package/src/coding-output-contracts.mjs +91 -8
  215. package/src/coding-plane.mjs +45 -9
  216. package/src/coding-search.mjs +130 -47
  217. package/src/compact-gateway-mcp-tools.mjs +128 -0
  218. package/src/compact-gateway-output-contracts.mjs +16 -0
  219. package/src/context-provenance.mjs +86 -0
  220. package/src/deadbyte-cli.mjs +145 -30
  221. package/src/document-adapter.mjs +43 -0
  222. package/src/lsp-stdio-client.mjs +112 -0
  223. package/src/machine-fs-smoke-client.mjs +2 -1
  224. package/src/machine-fs.mjs +51 -8
  225. package/src/mcp-server.mjs +46 -9
  226. package/src/native-diff-v2.mjs +337 -0
  227. package/src/native-diff.mjs +50 -2
  228. package/src/observation-smoke-client.mjs +3 -2
  229. package/src/operator-surface.mjs +43 -0
  230. package/src/process-runtime.mjs +98 -11
  231. package/src/process-smoke-client.mjs +11 -3
  232. package/src/provider-circuit.mjs +125 -0
  233. package/src/r36-compact-disarmed-probe.mjs +50 -0
  234. package/src/r36-full-surface-probe.mjs +56 -0
  235. package/src/release-generation.mjs +44 -5
  236. package/src/remote-live-log.mjs +76 -0
  237. package/src/remote-mcp-autonomous-smoke-client.mjs +58 -15
  238. package/src/remote-mcp-coding-smoke-client.mjs +5 -4
  239. package/src/remote-mcp-r24-disarmed-smoke-client.mjs +4 -2
  240. package/src/remote-mcp-r34-parity-client.mjs +177 -0
  241. package/src/remote-mcp-r36-parity-client.mjs +175 -0
  242. package/src/remote-mcp-smoke-client.mjs +113 -56
  243. package/src/remote-result-journal.mjs +114 -0
  244. package/src/runtime-update.mjs +109 -9
  245. package/src/search-cursor.mjs +45 -0
  246. package/src/semantic-backend-registry.mjs +39 -0
  247. package/src/semantic-code.mjs +246 -0
  248. package/src/semantic-lsp-backend.mjs +219 -0
  249. package/src/semantic-lsp-config.mjs +112 -0
  250. package/src/tool-surface-ledger.mjs +92 -0
  251. package/src/version.mjs +1 -1
  252. package/test/audit-verify.test.mjs +1 -1
  253. package/test/autonomous-action-reconcile.test.mjs +106 -0
  254. package/test/autonomous-adversarial.test.mjs +149 -6
  255. package/test/autonomous-capability-r36.test.mjs +151 -0
  256. package/test/autonomous-context-engine.test.mjs +181 -0
  257. package/test/autonomous-live-state.test.mjs +27 -0
  258. package/test/autonomous-local-supervisor.test.mjs +403 -0
  259. package/test/autonomous-loop-state.test.mjs +126 -0
  260. package/test/autonomous-loop-v2.test.mjs +105 -0
  261. package/test/autonomous-loop.test.mjs +79 -1
  262. package/test/autonomous-output-contract.test.mjs +54 -0
  263. package/test/autonomous-plan.test.mjs +101 -0
  264. package/test/autonomous-progress.test.mjs +106 -0
  265. package/test/autonomous-r34-e2e.test.mjs +338 -0
  266. package/test/autonomous-runtime.test.mjs +3 -3
  267. package/test/autonomous-supervisor-integration.test.mjs +48 -3
  268. package/test/capability-benchmark-r36.test.mjs +107 -0
  269. package/test/capability-benchmark-runner.test.mjs +49 -0
  270. package/test/capability-benchmark-semantic-r36.test.mjs +52 -0
  271. package/test/capability-benchmark.test.mjs +47 -0
  272. package/test/capability-claims-r36.test.mjs +23 -0
  273. package/test/capability-ledger-r36.test.mjs +102 -0
  274. package/test/cli-entrypoint.test.mjs +12 -0
  275. package/test/coding-catalog-consistency.test.mjs +24 -0
  276. package/test/coding-plane.test.mjs +3 -3
  277. package/test/coding-runtime.test.mjs +16 -0
  278. package/test/coding-search-r36.test.mjs +90 -0
  279. package/test/compact-catalog-r36.test.mjs +37 -0
  280. package/test/compact-gateway-r36.test.mjs +66 -0
  281. package/test/contained.test.mjs +1 -1
  282. package/test/context-provenance.test.mjs +61 -0
  283. package/test/controller-r27.test.mjs +4 -3
  284. package/test/controller.test.mjs +52 -0
  285. package/test/core.test.mjs +1 -1
  286. package/test/deferred-slot-operation-behavior.test.mjs +5 -1
  287. package/test/deferred-slot-operation.test.mjs +11 -1
  288. package/test/document-adapter.test.mjs +23 -0
  289. package/test/fixtures/lsp-framed-server.mjs +35 -0
  290. package/test/fixtures/semantic/cpp/compile_commands.json +4 -0
  291. package/test/fixtures/semantic/cpp/lib.cpp +2 -0
  292. package/test/fixtures/semantic/cpp/lib.hpp +2 -0
  293. package/test/fixtures/semantic/cpp/main.cpp +2 -0
  294. package/test/fixtures/semantic/python/lib.py +2 -0
  295. package/test/fixtures/semantic/python/main.py +2 -0
  296. package/test/fixtures/semantic/rust/Cargo.lock +7 -0
  297. package/test/fixtures/semantic/rust/Cargo.toml +8 -0
  298. package/test/fixtures/semantic/rust/src/lib.rs +3 -0
  299. package/test/fixtures/semantic/rust/src/main.rs +5 -0
  300. package/test/fixtures/semantic/rust/src/math.rs +3 -0
  301. package/test/fixtures/semantic/rust/target/.rustc_info.json +1 -0
  302. package/test/fixtures/semantic/rust/target/CACHEDIR.TAG +3 -0
  303. package/test/fixtures/semantic/rust/target/debug/.cargo-lock +0 -0
  304. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-4c168fa33c79d09c/dep-test-lib-semantic_rust +0 -0
  305. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-4c168fa33c79d09c/invoked.timestamp +1 -0
  306. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-4c168fa33c79d09c/test-lib-semantic_rust +1 -0
  307. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-4c168fa33c79d09c/test-lib-semantic_rust.json +1 -0
  308. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-5dcd474439c54a26/dep-test-bin-semantic_rust_bin +0 -0
  309. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-5dcd474439c54a26/invoked.timestamp +1 -0
  310. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-5dcd474439c54a26/test-bin-semantic_rust_bin +1 -0
  311. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-5dcd474439c54a26/test-bin-semantic_rust_bin.json +1 -0
  312. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-6212ccd976aa3808/dep-lib-semantic_rust +0 -0
  313. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-6212ccd976aa3808/invoked.timestamp +1 -0
  314. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-6212ccd976aa3808/lib-semantic_rust +1 -0
  315. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-6212ccd976aa3808/lib-semantic_rust.json +1 -0
  316. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-d741378dccdef61c/bin-semantic_rust_bin +1 -0
  317. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-d741378dccdef61c/bin-semantic_rust_bin.json +1 -0
  318. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-d741378dccdef61c/dep-bin-semantic_rust_bin +0 -0
  319. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-d741378dccdef61c/invoked.timestamp +1 -0
  320. package/test/fixtures/semantic/rust/target/debug/deps/libsemantic_rust-4c168fa33c79d09c.rmeta +0 -0
  321. package/test/fixtures/semantic/rust/target/debug/deps/libsemantic_rust-6212ccd976aa3808.rmeta +0 -0
  322. package/test/fixtures/semantic/rust/target/debug/deps/libsemantic_rust_bin-5dcd474439c54a26.rmeta +0 -0
  323. package/test/fixtures/semantic/rust/target/debug/deps/libsemantic_rust_bin-d741378dccdef61c.rmeta +0 -0
  324. package/test/fixtures/semantic/rust/target/debug/deps/semantic_rust-4c168fa33c79d09c.d +5 -0
  325. package/test/fixtures/semantic/rust/target/debug/deps/semantic_rust-6212ccd976aa3808.d +5 -0
  326. package/test/fixtures/semantic/rust/target/debug/deps/semantic_rust_bin-5dcd474439c54a26.d +6 -0
  327. package/test/fixtures/semantic/rust/target/debug/deps/semantic_rust_bin-d741378dccdef61c.d +6 -0
  328. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-1nzlugxi6lq16/s-hmdgo8b6hg-1n6glhc-1qb77z00k06rqw4jdkj92spax/dep-graph.bin +0 -0
  329. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-1nzlugxi6lq16/s-hmdgo8b6hg-1n6glhc-1qb77z00k06rqw4jdkj92spax/query-cache.bin +0 -0
  330. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-1nzlugxi6lq16/s-hmdgo8b6hg-1n6glhc-1qb77z00k06rqw4jdkj92spax/work-products.bin +0 -0
  331. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-1nzlugxi6lq16/s-hmdgo8b6hg-1n6glhc.lock +0 -0
  332. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-3s436v7g6f5xm/s-hmdgo8b58k-1ekj4lq-9twkpivsqnjon278x20bddozq/dep-graph.bin +0 -0
  333. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-3s436v7g6f5xm/s-hmdgo8b58k-1ekj4lq-9twkpivsqnjon278x20bddozq/metadata.rmeta +0 -0
  334. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-3s436v7g6f5xm/s-hmdgo8b58k-1ekj4lq-9twkpivsqnjon278x20bddozq/query-cache.bin +0 -0
  335. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-3s436v7g6f5xm/s-hmdgo8b58k-1ekj4lq-9twkpivsqnjon278x20bddozq/work-products.bin +0 -0
  336. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-3s436v7g6f5xm/s-hmdgo8b58k-1ekj4lq.lock +0 -0
  337. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-1jxcbdeehal7q/s-hmdgo8bxlf-1qr24o3-cmu3jai030no72y8u9eurrnjj/dep-graph.bin +0 -0
  338. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-1jxcbdeehal7q/s-hmdgo8bxlf-1qr24o3-cmu3jai030no72y8u9eurrnjj/query-cache.bin +0 -0
  339. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-1jxcbdeehal7q/s-hmdgo8bxlf-1qr24o3-cmu3jai030no72y8u9eurrnjj/work-products.bin +0 -0
  340. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-1jxcbdeehal7q/s-hmdgo8bxlf-1qr24o3.lock +0 -0
  341. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-2ocx55p60ni6b/s-hmdgo8bxj8-0ir41qt-diy9mqvc2eoiblmhjs3stcgi3/dep-graph.bin +0 -0
  342. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-2ocx55p60ni6b/s-hmdgo8bxj8-0ir41qt-diy9mqvc2eoiblmhjs3stcgi3/query-cache.bin +0 -0
  343. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-2ocx55p60ni6b/s-hmdgo8bxj8-0ir41qt-diy9mqvc2eoiblmhjs3stcgi3/work-products.bin +0 -0
  344. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-2ocx55p60ni6b/s-hmdgo8bxj8-0ir41qt.lock +0 -0
  345. package/test/fixtures/semantic/rust/target/flycheck0/stderr +1 -0
  346. package/test/fixtures/semantic/rust/target/flycheck0/stdout +5 -0
  347. package/test/fixtures/semantic/typescript/lib.ts +3 -0
  348. package/test/fixtures/semantic/typescript/main.ts +2 -0
  349. package/test/fixtures/tool-surface-stdio-server.mjs +14 -0
  350. package/test/helpers/autonomous-r34-fixture.mjs +122 -0
  351. package/test/lsp-stdio-client.test.mjs +72 -0
  352. package/test/multi-file-read.test.mjs +44 -0
  353. package/test/native-diff-topology-r36.test.mjs +105 -0
  354. package/test/observation-integration.test.mjs +3 -3
  355. package/test/package-boundary.test.mjs +6 -0
  356. package/test/process-longrun-r36.test.mjs +82 -0
  357. package/test/process-release-gate.test.mjs +9 -0
  358. package/test/production-docs.test.mjs +48 -0
  359. package/test/prompts-resources.test.mjs +41 -0
  360. package/test/provider-circuit.test.mjs +93 -0
  361. package/test/public-autonomous-ingress-budget.test.mjs +28 -0
  362. package/test/r33-closeout-regression.test.mjs +4 -3
  363. package/test/r33-finalization.test.mjs +26 -18
  364. package/test/r36-finalization.test.mjs +104 -0
  365. package/test/r36-release-identity.test.mjs +52 -0
  366. package/test/release-generation.test.mjs +23 -2
  367. package/test/release-version.test.mjs +27 -17
  368. package/test/remote-live-log-r36.test.mjs +37 -0
  369. package/test/remote-live-log-recovery-r36.test.mjs +41 -0
  370. package/test/remote-r24-catalog.test.mjs +18 -4
  371. package/test/remote-result-journal.test.mjs +58 -0
  372. package/test/remote-session-cli.test.mjs +135 -30
  373. package/test/runtime-self-update.test.mjs +121 -1
  374. package/test/semantic-backend-registry.test.mjs +29 -0
  375. package/test/semantic-code.test.mjs +66 -0
  376. package/test/semantic-lsp-backend.test.mjs +108 -0
  377. package/test/semantic-lsp-config.test.mjs +81 -0
  378. package/test/semantic-lsp-readiness.test.mjs +34 -0
  379. package/test/semantic-lsp-transient-empty.test.mjs +32 -0
  380. package/test/semantic-lsp-transient-null.test.mjs +31 -0
  381. package/test/semantic-multilang.test.mjs +72 -0
  382. package/test/semantic-r36-rename.test.mjs +82 -0
  383. package/test/semantic-runtime-routing.test.mjs +32 -0
  384. package/test/semantic-server-config-integration.test.mjs +66 -0
  385. package/test/tool-surface-ledger.test.mjs +59 -0
  386. package/test/tool-surface-snapshot.test.mjs +17 -0
  387. package/test/tracer-bullet.test.mjs +77 -0
  388. package/deadbyte-mcp-0.8.9.tgz +0 -0
@@ -0,0 +1,105 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { createHash, randomBytes } from 'node:crypto';
4
+ import { access, mkdtemp, mkdir, readFile, rm, symlink, writeFile } from 'node:fs/promises';
5
+ import os from 'node:os';
6
+ import path from 'node:path';
7
+ import { generateTrustKeypair } from '../src/trust.mjs';
8
+ import { createCodingRuntime, loadCodingPolicy } from '../src/coding-plane.mjs';
9
+ import { createMachineFsRuntime } from '../src/machine-fs.mjs';
10
+ import { loadAutonomousPolicy } from '../src/autonomous-policy.mjs';
11
+ import { createNativeDiffRuntime, NATIVE_DIFF_V2_SCHEMA } from '../src/native-diff.mjs';
12
+
13
+ const sha=bytes=>createHash('sha256').update(bytes).digest('hex');
14
+ const exists=file=>access(file).then(()=>true,()=>false);
15
+ async function fixture(){
16
+ const root=await mkdtemp(path.join(os.tmpdir(),'deadbyte-r36-topology-'));
17
+ const project=path.join(root,'project'); const trust=path.join(root,'trust');
18
+ await mkdir(project); await mkdir(trust);
19
+ const keys=await generateTrustKeypair({privateKeyPath:path.join(trust,'private.pem'),publicKeyPath:path.join(trust,'public.pem')});
20
+ const codingPath=path.join(root,'coding-policy.json');
21
+ await writeFile(codingPath,JSON.stringify({schema:'deadbyte.coding-policy.v1',enabled:true,lease_file:path.join(root,'coding-lease.json'),evidence_dir:path.join(root,'coding-evidence'),roots:{project:{path:project,read:true,write:true,exec:false,deny_paths:[]}},commands:{},max_read_bytes:524288,max_write_bytes:2097152}));
22
+ const codingPolicy=await loadCodingPolicy(codingPath);
23
+ await writeFile(codingPolicy.lease_file,JSON.stringify({schema:'deadbyte.coding-lease.v1',policy_sha256:codingPolicy.policy_sha256,instance_nonce:randomBytes(32).toString('hex'),root_ids:['project'],armed_at_utc:new Date().toISOString(),expires_at_utc:new Date(Date.now()+3600000).toISOString()}));
24
+ const autoPath=path.join(root,'autonomous-policy.json');
25
+ await writeFile(autoPath,JSON.stringify({schema:'deadbyte.autonomous-policy.v1',enabled:true,lease_file:path.join(root,'auto-lease.json'),evidence_dir:path.join(root,'auto-evidence'),root_ids:['project'],coding_policy_sha256:codingPolicy.policy_sha256,planner:{backend:'client_sampling',max_tokens:2048},profiles:{},limits:{max_files_per_diff:12,max_diff_bytes:1048576}}));
26
+ const policy=await loadAutonomousPolicy(autoPath,codingPolicy);
27
+ await writeFile(policy.lease_file,JSON.stringify({schema:'deadbyte.autonomous-lease.v1',policy_sha256:policy.policy_sha256,instance_nonce:randomBytes(32).toString('hex'),root_ids:['project'],armed_at_utc:new Date().toISOString(),expires_at_utc:new Date(Date.now()+1800000).toISOString()}));
28
+ const codingRuntime=createCodingRuntime({policy:codingPolicy,signingKeyPath:keys.privateKeyPath,verifyKeyPath:keys.publicKeyPath});
29
+ const machineFsRuntime=createMachineFsRuntime({policy:codingPolicy,signingKeyPath:keys.privateKeyPath,verifyKeyPath:keys.publicKeyPath});
30
+ const nativeDiff=createNativeDiffRuntime({policy,codingRuntime,machineFsRuntime,signingKeyPath:keys.privateKeyPath,verifyKeyPath:keys.publicKeyPath});
31
+ return {root,project,keys,policy,codingRuntime,machineFsRuntime,nativeDiff};
32
+ }
33
+
34
+ test('R36 Native Diff V2 commits mkdir write move and independently verifies mixed receipts',async()=>{
35
+ const f=await fixture(); try{
36
+ await writeFile(path.join(f.project,'seed.txt'),'seed\n');
37
+ const seed=await f.machineFsRuntime.stat({rootId:'project',relativePath:'seed.txt',hash:true});
38
+ const preview=await f.nativeDiff.preview({rootId:'project',title:'topology commit',operations:[
39
+ {kind:'mkdir',path:'dst'},
40
+ {kind:'write',path:'dst/new.txt',expected_sha256:'absent',encoding:'utf8',content:'new\n'},
41
+ {kind:'move',source_path:'seed.txt',destination_path:'dst/seed.txt',expected_source_identity:seed.identity_sha256}
42
+ ]});
43
+ assert.equal(preview.schema,NATIVE_DIFF_V2_SCHEMA); assert.equal(preview.operation_count,3);
44
+ const applied=await f.nativeDiff.apply({diffId:preview.diff_id});
45
+ assert.equal(applied.status,'committed');
46
+ assert.equal(await readFile(path.join(f.project,'dst','new.txt'),'utf8'),'new\n');
47
+ assert.equal(await readFile(path.join(f.project,'dst','seed.txt'),'utf8'),'seed\n');
48
+ assert.equal(await exists(path.join(f.project,'seed.txt')),false);
49
+ const verified=await f.nativeDiff.verify({diffId:preview.diff_id});
50
+ assert.equal(verified.ok,true); assert.equal(verified.current_state_matches,true);
51
+ assert.equal(verified.operation_receipts_verified,3);
52
+ } finally {await rm(f.root,{recursive:true,force:true});}
53
+ });
54
+
55
+ test('R36 Native Diff V2 rolls back mkdir/write when later topology operation fails',async()=>{
56
+ const f=await fixture(); try{
57
+ await writeFile(path.join(f.project,'seed.txt'),'seed\n');
58
+ const seed=await f.machineFsRuntime.stat({rootId:'project',relativePath:'seed.txt',hash:true});
59
+ const preview=await f.nativeDiff.preview({rootId:'project',title:'topology rollback',operations:[
60
+ {kind:'mkdir',path:'dst'},
61
+ {kind:'write',path:'dst/temp.txt',expected_sha256:'absent',encoding:'utf8',content:'temporary\n'},
62
+ {kind:'move',source_path:'seed.txt',destination_path:'dst/seed.txt',expected_source_identity:seed.identity_sha256}
63
+ ]});
64
+ const sabotaged=Object.freeze({...f.machineFsRuntime,move:async()=>{throw new Error('forced topology failure');}});
65
+ const runtime=createNativeDiffRuntime({policy:f.policy,codingRuntime:f.codingRuntime,machineFsRuntime:sabotaged,signingKeyPath:f.keys.privateKeyPath,verifyKeyPath:f.keys.publicKeyPath});
66
+ await assert.rejects(runtime.apply({diffId:preview.diff_id}),/rolled back/i);
67
+ assert.equal(await exists(path.join(f.project,'dst')),false);
68
+ assert.equal(await readFile(path.join(f.project,'seed.txt'),'utf8'),'seed\n');
69
+ } finally {await rm(f.root,{recursive:true,force:true});}
70
+ });
71
+
72
+ test('R36 Native Diff V2 rejects stale move identity and destination collision before mutation',async()=>{
73
+ const f=await fixture(); try{
74
+ await writeFile(path.join(f.project,'a.txt'),'one'); await writeFile(path.join(f.project,'b.txt'),'occupied');
75
+ const state=await f.machineFsRuntime.stat({rootId:'project',relativePath:'a.txt',hash:true});
76
+ await writeFile(path.join(f.project,'a.txt'),'two');
77
+ await assert.rejects(f.nativeDiff.preview({rootId:'project',operations:[{kind:'move',source_path:'a.txt',destination_path:'c.txt',expected_source_identity:state.identity_sha256}]}),/identity|precondition/i);
78
+ const fresh=await f.machineFsRuntime.stat({rootId:'project',relativePath:'a.txt',hash:true});
79
+ await assert.rejects(f.nativeDiff.preview({rootId:'project',operations:[{kind:'move',source_path:'a.txt',destination_path:'b.txt',expected_source_identity:fresh.identity_sha256}]}),/destination.*absent|collision|precondition/i);
80
+ assert.equal(await readFile(path.join(f.project,'a.txt'),'utf8'),'two');
81
+ } finally {await rm(f.root,{recursive:true,force:true});}
82
+ });
83
+
84
+ test('R36 Native Diff V2 rmdir accepts only exact empty directory identity',async()=>{
85
+ const f=await fixture(); try{
86
+ await mkdir(path.join(f.project,'empty')); await mkdir(path.join(f.project,'nonempty')); await writeFile(path.join(f.project,'nonempty','x.txt'),'x');
87
+ const empty=await f.machineFsRuntime.stat({rootId:'project',relativePath:'empty'});
88
+ const nonempty=await f.machineFsRuntime.stat({rootId:'project',relativePath:'nonempty'});
89
+ await assert.rejects(f.nativeDiff.preview({rootId:'project',operations:[{kind:'rmdir',path:'nonempty',expected_source_identity:nonempty.identity_sha256}]}),/empty/i);
90
+ const preview=await f.nativeDiff.preview({rootId:'project',operations:[{kind:'rmdir',path:'empty',expected_source_identity:empty.identity_sha256}]});
91
+ assert.equal((await f.nativeDiff.apply({diffId:preview.diff_id})).status,'committed');
92
+ assert.equal(await exists(path.join(f.project,'empty')),false);
93
+ assert.equal((await f.nativeDiff.verify({diffId:preview.diff_id})).ok,true);
94
+ } finally {await rm(f.root,{recursive:true,force:true});}
95
+ });
96
+
97
+ test('R36 Native Diff V2 denies topology through reparse points',async t=>{
98
+ const f=await fixture(); try{
99
+ const outside=path.join(f.root,'outside'); await mkdir(outside);
100
+ const link=path.join(f.project,'link');
101
+ try { await symlink(outside,link,process.platform==='win32'?'junction':'dir'); }
102
+ catch(error){ if(['EPERM','EACCES','ENOSYS'].includes(error?.code)){t.skip(`symlink unavailable: ${error.code}`);return;} throw error; }
103
+ await assert.rejects(f.nativeDiff.preview({rootId:'project',operations:[{kind:'rmdir',path:'link',expected_source_identity:'0'.repeat(64)}]}),/reparse|symlink/i);
104
+ } finally {await rm(f.root,{recursive:true,force:true});}
105
+ });
@@ -35,7 +35,7 @@ test('R32 updater exposes explicit observation enable and threads it into the ca
35
35
  assert.match(source, /enableObservation:args\.enableObservation/);
36
36
  });
37
37
 
38
- test('R32 exact remote catalog adds six observation tools and disarmed gate requires 68 after named action', async () => {
38
+ test('R34 exact remote catalog keeps observation and disarmed gate bound to the canonical 73-tool surface', async () => {
39
39
  const source = await read('../src/remote-mcp-smoke-client.mjs');
40
40
  const disarmed = await read('../src/remote-mcp-r24-disarmed-smoke-client.mjs');
41
41
  assert.match(source, /const observationTools = \[/);
@@ -43,8 +43,8 @@ test('R32 exact remote catalog adds six observation tools and disarmed gate requ
43
43
  assert.match(source, new RegExp(`'${name}'`));
44
44
  }
45
45
  assert.match(source, /observation_runtime: observationRuntime/);
46
- assert.match(disarmed, /listed\.tools\.length !== 68/);
47
- assert.match(disarmed, /tool_count:68/);
46
+ assert.match(disarmed, /R34_EXPECTED_TOOLS/);
47
+ assert.match(disarmed, /tool_count:R34_EXPECTED_TOOLS\.length/);
48
48
  });
49
49
 
50
50
  test('R32 package and Windows gate include observation live smoke before final manifest verify', async () => {
@@ -2,6 +2,7 @@ import test from 'node:test';
2
2
  import assert from 'node:assert/strict';
3
3
  import path from 'node:path';
4
4
  import { spawnSync } from 'node:child_process';
5
+ import { readdirSync } from 'node:fs';
5
6
  import { fileURLToPath } from 'node:url';
6
7
 
7
8
  const root = path.resolve(fileURLToPath(new URL('..', import.meta.url)));
@@ -22,6 +23,11 @@ function packFiles() {
22
23
  return entry.files.map(item => item.path.replaceAll('\\', '/')).sort();
23
24
  }
24
25
 
26
+ test('R36 successor source root contains no nested npm tarball artifacts',()=>{
27
+ const tarballs=readdirSync(root,{withFileTypes:true}).filter(item=>item.isFile()&&item.name.endsWith('.tgz')).map(item=>item.name).sort();
28
+ assert.deepEqual(tarballs,[]);
29
+ });
30
+
25
31
  test('R28 package boundary contains only immutable workspace seed files', () => {
26
32
  const files = packFiles();
27
33
  const workspacePayload = files.filter(rel => rel.startsWith('workspaces/'));
@@ -0,0 +1,82 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { createHash } from 'node:crypto';
4
+ import { mkdtemp, mkdir, readFile, rm, writeFile } from 'node:fs/promises';
5
+ import os from 'node:os';
6
+ import path from 'node:path';
7
+ import { fileURLToPath } from 'node:url';
8
+ import { PROCESS_GRANT_SCHEMA, PROCESS_POLICY_SCHEMA, loadProcessPolicy } from '../src/process-policy.mjs';
9
+ import { createProcessRuntime } from '../src/process-runtime.mjs';
10
+ import { generateTrustKeypair } from '../src/trust.mjs';
11
+
12
+ const repo=path.resolve(path.dirname(fileURLToPath(import.meta.url)),'..');
13
+ const host=path.join(repo,'bin','deadbyte-process-host.exe');
14
+ const sha=bytes=>createHash('sha256').update(bytes).digest('hex');
15
+ const sleep=ms=>new Promise(resolve=>setTimeout(resolve,ms));
16
+
17
+ async function fixture(){
18
+ const root=await mkdtemp(path.join(os.tmpdir(),'deadbyte-r36-longrun-'));
19
+ const project=path.join(root,'project'); const trust=path.join(root,'trust');
20
+ await mkdir(project); await mkdir(trust);
21
+ const script=path.join(project,'longrun.mjs');
22
+ await writeFile(script,`process.stdout.write('chunk-1\\n');\nsetTimeout(()=>process.stdout.write('chunk-2\\n'),180);\nsetTimeout(()=>process.stdout.write('chunk-3\\n'),360);\nsetTimeout(()=>process.exit(0),540);\n`);
23
+ const grantFile=path.join(root,'process-grant.json'); const stateDir=path.join(root,'state'); const policyPath=path.join(root,'process-policy.json');
24
+ const raw={schema:PROCESS_POLICY_SCHEMA,enabled:true,grant_file:grantFile,state_dir:stateDir,native_host:{path:host,sha256:sha(await readFile(host))},roots:{core:{path:project,deny_paths:[]}},profiles:{longrun:{executable:process.execPath,executable_sha256:sha(await readFile(process.execPath)),root_ids:['core'],transport:'pipe',prefix_args:[script],max_args:0,max_arg_bytes:256,max_sessions:1,max_input_bytes:4096,max_retained_output_bytes:65536,env_allow:['PATH','TEMP','TMP'],input_actions:{}}}};
25
+ await writeFile(policyPath,JSON.stringify(raw));
26
+ const policy=await loadProcessPolicy(policyPath);
27
+ await writeFile(grantFile,JSON.stringify({schema:PROCESS_GRANT_SCHEMA,policy_sha256:policy.policy_sha256,instance_nonce:'6'.repeat(64),profile_ids:['longrun'],root_ids:['core'],granted_at_utc:new Date().toISOString()}));
28
+ const keys=await generateTrustKeypair({privateKeyPath:path.join(trust,'private.pem'),publicKeyPath:path.join(trust,'public.pem')});
29
+ const make=()=>createProcessRuntime({policy,signingKeyPath:keys.privateKeyPath,verifyKeyPath:keys.publicKeyPath});
30
+ return {root,project,stateDir,policy,keys,make,runtime:make()};
31
+ }
32
+
33
+ async function waitState(runtime,id,state,timeout=5000){const end=Date.now()+timeout;while(Date.now()<end){const s=await runtime.status({sessionId:id});if(s.state===state)return s;await sleep(30);}throw new Error(`timeout waiting ${state}`);}
34
+
35
+ test('R36 process runtime publishes terminal state only after durable terminal journal commit', async()=>{
36
+ const source=await readFile(path.join(repo,'src','process-runtime.mjs'),'utf8');
37
+ assert.match(source,/const terminalState = session\.terminate_requested \? 'terminated' : 'exited'/);
38
+ const commit=source.indexOf("await appendEvent(runtime, session, terminalState");
39
+ const publish=source.indexOf('session.state = terminalState;',commit);
40
+ assert.ok(commit>=0&&publish>commit,'terminal state must publish after terminal event commit');
41
+ });
42
+
43
+ test('R36 long process returns before exit and exposes monotonic cursor chunks', {skip:process.platform!=='win32'}, async()=>{
44
+ const f=await fixture(); try{
45
+ const startedAt=Date.now();
46
+ const started=await f.runtime.start({profileId:'longrun',rootId:'core',cwd:'.',args:[]});
47
+ assert.equal(started.state,'running');
48
+ assert.ok(Date.now()-startedAt<500,'start waited for child exit');
49
+ let offset=0; let text=''; let sawPartial=false;
50
+ const end=Date.now()+5000;
51
+ while(Date.now()<end){
52
+ const page=await f.runtime.read({sessionId:started.session_id,offset,maxBytes:8});
53
+ assert.ok(page.next_offset>=offset); assert.ok(page.next_offset<=page.stream_head);
54
+ if(page.next_offset<page.stream_head||page.state==='running') sawPartial=true;
55
+ text+=Buffer.from(page.data_base64,'base64').toString('utf8'); offset=page.next_offset;
56
+ if(page.state==='exited'&&offset===page.stream_head) break;
57
+ await sleep(35);
58
+ }
59
+ assert.equal(sawPartial,true); assert.match(text,/chunk-1/); assert.match(text,/chunk-2/); assert.match(text,/chunk-3/);
60
+ const terminal=await waitState(f.runtime,started.session_id,'exited'); assert.equal(terminal.exit_code,0);
61
+ await assert.rejects(()=>f.runtime.status({sessionId:'f'.repeat(64)}),/unknown process session/i);
62
+ } finally {await rm(f.root,{recursive:true,force:true});}
63
+ });
64
+
65
+ test('R36 terminal process session is recovered from signed journal after wrapper restart', {skip:process.platform!=='win32'}, async()=>{
66
+ const f=await fixture(); try{
67
+ const started=await f.runtime.start({profileId:'longrun',rootId:'core',cwd:'.',args:[]});
68
+ await waitState(f.runtime,started.session_id,'exited');
69
+ const original=await f.runtime.status({sessionId:started.session_id});
70
+ const checked=await f.runtime.verifyEventJournal({sessionId:started.session_id}); assert.equal(checked.ok,true);
71
+ const restarted=f.make();
72
+ const recovered=await restarted.status({sessionId:started.session_id});
73
+ assert.equal(recovered.state,'exited'); assert.equal(recovered.exit_code,0); assert.equal(recovered.session_id,started.session_id);
74
+ assert.equal(recovered.journal_head_sha256,original.journal_head_sha256);
75
+ const listed=await restarted.list(); assert.ok(listed.sessions.some(s=>s.session_id===started.session_id));
76
+ const page=await restarted.read({sessionId:started.session_id,offset:0,maxBytes:65536});
77
+ const text=Buffer.from(page.data_base64,'base64').toString('utf8');
78
+ assert.match(text,/chunk-1/); assert.match(text,/chunk-3/); assert.equal(page.state,'exited');
79
+ const verified=await restarted.verifyEventJournal({sessionId:started.session_id}); assert.equal(verified.ok,true); assert.equal(verified.head_sha256,recovered.journal_head_sha256);
80
+ await assert.rejects(()=>restarted.status({sessionId:'e'.repeat(64)}),/unknown process session/i);
81
+ } finally {await rm(f.root,{recursive:true,force:true});}
82
+ });
@@ -5,12 +5,21 @@ import { fileURLToPath } from 'node:url';
5
5
 
6
6
  const packagePath = fileURLToPath(new URL('../package.json', import.meta.url));
7
7
  const gatePath = fileURLToPath(new URL('../scripts/gate-windows.ps1', import.meta.url));
8
+ const processSmokePath = fileURLToPath(new URL('../src/process-smoke-client.mjs', import.meta.url));
8
9
 
9
10
  test('R31 package exposes the bounded process smoke command', async () => {
10
11
  const pkg = JSON.parse(await readFile(packagePath, 'utf8'));
11
12
  assert.equal(pkg.scripts['mcp:process:smoke'], 'node src/process-smoke-client.mjs');
12
13
  });
13
14
 
15
+ test('R36 process smoke isolates grant and recovery state outside the release source tree', async () => {
16
+ const source = await readFile(processSmokePath, 'utf8');
17
+ assert.match(source, /smoke-policy\.json/);
18
+ assert.match(source, /grant_file:\s*path\.join\(smokeTrust,\s*'process-grant\.json'\)/);
19
+ assert.match(source, /state_dir:\s*path\.join\(smokeTrust,\s*'process-state'\)/);
20
+ assert.match(source, /DEADBYTE_PROCESS_POLICY:\s*smokePolicyPath/);
21
+ });
22
+
14
23
  test('R31 Windows gate refreshes the native-host policy pin before manifest freeze', async () => {
15
24
  const pkg = JSON.parse(await readFile(packagePath, 'utf8'));
16
25
  const source = await readFile(gatePath, 'utf8');
@@ -0,0 +1,48 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { readFile } from 'node:fs/promises';
4
+ import path from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+
7
+ const root=path.resolve(fileURLToPath(new URL('..',import.meta.url)));
8
+ const readme=()=>readFile(path.join(root,'README.txt'),'utf8');
9
+
10
+ test('production README documents one-command stdio configs for major MCP clients',async()=>{
11
+ const text=await readme();
12
+ assert.match(text,/npx -y deadbyte-mcp@0\.10\.0 mcp/);
13
+ assert.match(text,/CLAUDE DESKTOP/);
14
+ assert.match(text,/"mcpServers"[\s\S]*?"command"\s*:\s*"npx"[\s\S]*?"-y"[\s\S]*?"deadbyte-mcp@0\.10\.0"[\s\S]*?"mcp"/);
15
+ assert.match(text,/CURSOR/);
16
+ assert.match(text,/\.cursor\/mcp\.json/);
17
+ assert.match(text,/VS CODE/);
18
+ assert.match(text,/\.vscode\/mcp\.json/);
19
+ assert.match(text,/"servers"[\s\S]*?"type"\s*:\s*"stdio"/);
20
+ assert.match(text,/CODEX/);
21
+ assert.match(text,/\[mcp_servers\.deadbyte\]/);
22
+ assert.match(text,/command\s*=\s*"npx"/);
23
+ assert.match(text,/args\s*=\s*\["-y",\s*"deadbyte-mcp@0\.10\.0",\s*"mcp"\]/);
24
+ });
25
+
26
+ test('production README records tracer bullet, semantic scope, remote UX, safety and document extension',async()=>{
27
+ const text=await readme();
28
+ for(const token of ['coding_file_read','coding_text_replace','coding_command_run','coding_receipt_verify']) assert.match(text,new RegExp(token));
29
+ for(const token of ['coding_files_read','coding_symbol_outline','coding_symbol_definition','coding_symbol_references','coding_symbol_replace']) assert.match(text,new RegExp(token));
30
+ assert.match(text,/JavaScript\/TypeScript|JS\/TS/);
31
+ assert.match(text,/does not claim|not claim|limited to/i);
32
+ assert.match(text,/remote --verbose/);
33
+ assert.match(text,/compact/i);
34
+ assert.match(text,/workspace allowlist|coding-policy root/i);
35
+ assert.match(text,/destructive|standing grant|authority plane/i);
36
+ assert.match(text,/document adapter/i);
37
+ assert.match(text,/markdown_to_pdf/);
38
+ });
39
+
40
+ test('production README contains an evidence-based competitor comparison without pretending semantic breadth parity',async()=>{
41
+ const text=await readme();
42
+ assert.match(text,/Desktop Commander/i);
43
+ assert.match(text,/Serena/i);
44
+ assert.match(text,/comparison/i);
45
+ assert.match(text,/signed receipt|Ed25519/i);
46
+ assert.match(text,/rollback/i);
47
+ assert.match(text,/semantic breadth|language breadth|broader language/i);
48
+ });
@@ -0,0 +1,41 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { Client } from '@modelcontextprotocol/client';
4
+ import { StdioClientTransport, getDefaultEnvironment } from '@modelcontextprotocol/client/stdio';
5
+ import { fileURLToPath } from 'node:url';
6
+ import path from 'node:path';
7
+
8
+ const here=path.dirname(fileURLToPath(import.meta.url));
9
+ const repoRoot=path.resolve(here,'..');
10
+ const serverPath=path.join(repoRoot,'src','mcp-server.mjs');
11
+
12
+ test('MCP exposes compact workflow prompts and source-of-truth context resources',async()=>{
13
+ const client=new Client({name:'deadbyte-prompt-resource-test',version:'0.8.11'},{versionNegotiation:{mode:{pin:'2026-07-28'}}});
14
+ const transport=new StdioClientTransport({command:process.execPath,args:[serverPath],cwd:repoRoot,env:{...getDefaultEnvironment()},stderr:'pipe'});
15
+ try{
16
+ await client.connect(transport);
17
+ const prompts=await client.listPrompts();
18
+ const promptNames=prompts.prompts.map(p=>p.name).sort();
19
+ assert.deepEqual(promptNames,['deadbyte.diagnose','deadbyte.patch','deadbyte.review','deadbyte.run-tests']);
20
+ const patch=await client.getPrompt({name:'deadbyte.patch',arguments:{goal:'fix the failing parser test'}});
21
+ const patchText=patch.messages.map(m=>m.content?.text??'').join('\n');
22
+ assert.match(patchText,/inspect/i); assert.match(patchText,/surgical/i); assert.match(patchText,/verify/i); assert.match(patchText,/fix the failing parser test/);
23
+ assert.ok(patchText.length<1400,'prompt must remain compact');
24
+
25
+ const resources=await client.listResources();
26
+ const uris=resources.resources.map(r=>r.uri).sort();
27
+ assert.deepEqual(uris,['deadbyte://architecture','deadbyte://context','deadbyte://surface-profile']);
28
+ const surface=await client.readResource({uri:'deadbyte://surface-profile'});
29
+ const surfaceText=surface.contents.map(c=>'text' in c?c.text:'').join('\n');
30
+ const surfaceState=JSON.parse(surfaceText);
31
+ assert.equal(surfaceState.schema,'deadbyte.surface-profile.v1');
32
+ assert.equal(surfaceState.profile,'full');
33
+ assert.equal(surfaceState.compact_tool_limit,42);
34
+ const context=await client.readResource({uri:'deadbyte://context'});
35
+ const contextText=context.contents.map(c=>'text' in c?c.text:'').join('\n');
36
+ assert.match(contextText,/Machine truth/i); assert.match(contextText,/Authority plane/i); assert.match(contextText,/Loop Supervisor/i);
37
+ const architecture=await client.readResource({uri:'deadbyte://architecture'});
38
+ const architectureText=architecture.contents.map(c=>'text' in c?c.text:'').join('\n');
39
+ assert.match(architectureText,/protocol/i); assert.match(architectureText,/semantic/i); assert.match(architectureText,/telemetry/i);
40
+ } finally { await client.close().catch(()=>{}); }
41
+ });
@@ -0,0 +1,93 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import {
4
+ PROVIDER_CIRCUIT_STATES,
5
+ classifyProviderFailure,
6
+ deriveCircuit,
7
+ providerCallDisposition
8
+ } from '../src/provider-circuit.mjs';
9
+
10
+ const providerId='openai-compatible:gpt-test';
11
+ const policy=Object.freeze({failure_threshold:3,open_ms:1000,half_open_probe_limit:1});
12
+ const event=(type,created_at_utc,payload={})=>({
13
+ schema:'deadbyte.autonomous-event.v1',
14
+ event_sha256:'a'.repeat(64),
15
+ type,
16
+ created_at_utc,
17
+ payload:{provider_id:providerId,...payload}
18
+ });
19
+
20
+ test('provider circuit state enum is exact and failure classifier is bounded',()=>{
21
+ assert.deepEqual(PROVIDER_CIRCUIT_STATES,['CLOSED','OPEN','HALF_OPEN','UNAVAILABLE']);
22
+ assert.equal(classifyProviderFailure(new Error('request timed out')),'timeout');
23
+ assert.equal(classifyProviderFailure(new Error('fetch failed ECONNRESET')),'transport');
24
+ assert.equal(classifyProviderFailure(new Error('planner HTTP 429: rate limit')),'rate_limit');
25
+ assert.equal(classifyProviderFailure(new Error('planner HTTP 401: unauthorized')),'auth');
26
+ assert.equal(classifyProviderFailure(new Error('planner HTTP response is not JSON')),'invalid_response');
27
+ assert.equal(classifyProviderFailure(new Error('weird')),'other');
28
+ });
29
+
30
+ test('CLOSED opens exactly at threshold and OPEN suppresses provider invocation',()=>{
31
+ const events=[
32
+ event('provider_call_failed','2026-09-17T00:00:00.000Z',{failure_class:'transport'}),
33
+ event('provider_call_failed','2026-09-17T00:00:01.000Z',{failure_class:'timeout'}),
34
+ event('provider_call_failed','2026-09-17T00:00:02.000Z',{failure_class:'rate_limit'})
35
+ ];
36
+ const circuit=deriveCircuit(events,providerId,policy,'2026-09-17T00:00:02.500Z');
37
+ assert.equal(circuit.state,'OPEN');
38
+ assert.equal(circuit.failure_count,3);
39
+ assert.equal(circuit.opened_at_utc,'2026-09-17T00:00:02.000Z');
40
+ assert.equal(circuit.next_probe_at_utc,'2026-09-17T00:00:03.000Z');
41
+ assert.deepEqual(providerCallDisposition(circuit),{allowed:false,probe:false,reason:'circuit_open'});
42
+ });
43
+
44
+ test('OPEN becomes HALF_OPEN only at boundary and permits one bounded probe',()=>{
45
+ const events=[
46
+ event('provider_call_failed','2026-09-17T00:00:00.000Z',{failure_class:'transport'}),
47
+ event('provider_call_failed','2026-09-17T00:00:01.000Z',{failure_class:'transport'}),
48
+ event('provider_call_failed','2026-09-17T00:00:02.000Z',{failure_class:'transport'})
49
+ ];
50
+ const before=deriveCircuit(events,providerId,policy,'2026-09-17T00:00:02.999Z');
51
+ assert.equal(before.state,'OPEN');
52
+ const half=deriveCircuit(events,providerId,policy,'2026-09-17T00:00:03.000Z');
53
+ assert.equal(half.state,'HALF_OPEN');
54
+ assert.deepEqual(providerCallDisposition(half),{allowed:true,probe:true,reason:'half_open_probe'});
55
+ const consumed=deriveCircuit([...events,event('provider_probe_started','2026-09-17T00:00:03.000Z')],providerId,policy,'2026-09-17T00:00:03.100Z');
56
+ assert.deepEqual(providerCallDisposition(consumed),{allowed:false,probe:false,reason:'half_open_probe_limit'});
57
+ });
58
+
59
+ test('HALF_OPEN success closes circuit and failure reopens it from failure time',()=>{
60
+ const base=[
61
+ event('provider_call_failed','2026-09-17T00:00:00.000Z',{failure_class:'transport'}),
62
+ event('provider_call_failed','2026-09-17T00:00:01.000Z',{failure_class:'transport'}),
63
+ event('provider_call_failed','2026-09-17T00:00:02.000Z',{failure_class:'transport'}),
64
+ event('provider_probe_started','2026-09-17T00:00:03.000Z')
65
+ ];
66
+ const closed=deriveCircuit([...base,event('provider_call_succeeded','2026-09-17T00:00:03.100Z')],providerId,policy,'2026-09-17T00:00:03.100Z');
67
+ assert.equal(closed.state,'CLOSED');
68
+ assert.equal(closed.failure_count,0);
69
+ assert.equal(closed.last_success_at_utc,'2026-09-17T00:00:03.100Z');
70
+ const reopened=deriveCircuit([...base,event('provider_call_failed','2026-09-17T00:00:03.100Z',{failure_class:'timeout'})],providerId,policy,'2026-09-17T00:00:03.100Z');
71
+ assert.equal(reopened.state,'OPEN');
72
+ assert.equal(reopened.opened_at_utc,'2026-09-17T00:00:03.100Z');
73
+ assert.equal(reopened.next_probe_at_utc,'2026-09-17T00:00:04.100Z');
74
+ });
75
+
76
+ test('replay is deterministic and malformed authenticated evidence becomes unavailable',()=>{
77
+ const events=[event('provider_call_failed','2026-09-17T00:00:00.000Z',{failure_class:'timeout'})];
78
+ const first=deriveCircuit(events,providerId,policy,'2026-09-17T00:00:00.500Z');
79
+ const replay=deriveCircuit(structuredClone(events),providerId,policy,'2026-09-17T00:00:00.500Z');
80
+ assert.deepEqual(replay,first);
81
+ const corrupt=[{...events[0],event_sha256:'bad'}];
82
+ const unavailable=deriveCircuit(corrupt,providerId,policy,'2026-09-17T00:00:00.500Z');
83
+ assert.equal(unavailable.state,'UNAVAILABLE');
84
+ assert.equal(providerCallDisposition(unavailable).allowed,false);
85
+ });
86
+
87
+ test('events for other providers never affect this provider circuit',()=>{
88
+ const other=event('provider_call_failed','2026-09-17T00:00:00.000Z',{failure_class:'timeout'});
89
+ other.payload.provider_id='openai-compatible:other-model';
90
+ const circuit=deriveCircuit([other],providerId,policy,'2026-09-17T00:00:05.000Z');
91
+ assert.equal(circuit.state,'CLOSED');
92
+ assert.equal(circuit.failure_count,0);
93
+ });
@@ -0,0 +1,28 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { readFile } from 'node:fs/promises';
4
+
5
+ const sourceUrl = new URL('../src/remote-mcp-autonomous-smoke-client.mjs', import.meta.url);
6
+
7
+ test('public autonomous smoke chunks resumable goal runs below the 120 second proxy ceiling', async () => {
8
+ const source = await readFile(sourceUrl, 'utf8');
9
+ const cycles = /const AUTONOMOUS_RUN_MAX_CYCLES_PER_REQUEST = (\d+);/.exec(source);
10
+ const timeout = /const AUTONOMOUS_RUN_REQUEST_TIMEOUT_MS = (\d+);/.exec(source);
11
+
12
+ assert.ok(cycles, 'smoke client must declare a per-request autonomous cycle budget');
13
+ assert.ok(timeout, 'smoke client must declare a per-request HTTP timeout budget');
14
+ assert.equal(Number(cycles[1]), 1, 'one autonomous cycle per public request keeps progress resumable');
15
+ assert.ok(Number(timeout[1]) > 0 && Number(timeout[1]) < 120000,
16
+ 'public autonomous request timeout must stay below the Cloudflare 120 second read timeout');
17
+ assert.doesNotMatch(source, /max_cycles\s*:\s*32/,
18
+ 'public smoke must not batch all autonomous cycles into one proxy request');
19
+ assert.match(source, /max_cycles\s*:\s*AUTONOMOUS_RUN_MAX_CYCLES_PER_REQUEST/);
20
+ assert.match(source, /ran\.status === 'yielded'/,
21
+ 'public smoke must explicitly resume yielded autonomous state');
22
+ assert.match(source, /REQUEST_TIMEOUT/,
23
+ 'public smoke must recognize a bounded client timeout without treating durable server work as lost');
24
+ assert.match(source, /autonomous_goal_status/,
25
+ 'timeout recovery must poll authenticated durable goal state instead of replaying the mutation');
26
+ assert.match(source, /recoverTimedOutGoal/,
27
+ 'public smoke must use one explicit timeout-recovery path');
28
+ });
@@ -86,7 +86,7 @@ test('audit restart reconciles an orphan request with an explicit interrupted re
86
86
  }finally{await rm(stateRoot,{recursive:true,force:true});}
87
87
  });
88
88
 
89
- test('Windows R33 gate emits manifest-bound machine-readable evidence outside the candidate tree', async()=>{
89
+ test('Windows R36 gate emits manifest-bound machine-readable evidence outside the candidate tree', async()=>{
90
90
  const stateRoot=await temp('deadbyte-r33-windows-evidence-');
91
91
  try{
92
92
  const gate=await readFile(path.join(root,'scripts','gate-windows.ps1'),'utf8');
@@ -99,11 +99,12 @@ test('Windows R33 gate emits manifest-bound machine-readable evidence outside th
99
99
  assert.equal(summary.status,'written');
100
100
  const evidence=JSON.parse(await readFile(summary.path,'utf8'));
101
101
  const manifestSha=sha256(await readFile(path.join(root,'MANIFEST.SHA256')));
102
- assert.equal(evidence.schema,'deadbyte.r33-windows-gate.v1');
102
+ assert.equal(evidence.schema,'deadbyte.r36-windows-gate.v1');
103
103
  assert.equal(evidence.status,'passed');
104
104
  assert.equal(evidence.exit_code,0);
105
+ assert.equal(evidence.version,'0.10.0');
105
106
  assert.equal(evidence.manifest_sha256,manifestSha);
106
- assert.equal(evidence.marker,'DEADBYTE V0.8.10 / R33 WINDOWS BATCH GATE: PASS');
107
+ assert.equal(evidence.marker,'DEADBYTE V0.10.0 / R36 WINDOWS BATCH GATE: PASS');
107
108
  assert.ok(summary.path.startsWith(path.join(stateRoot,'evidence','release')));
108
109
  }finally{await rm(stateRoot,{recursive:true,force:true});}
109
110
  });
@@ -1,17 +1,20 @@
1
1
  import test from 'node:test';
2
2
  import assert from 'node:assert/strict';
3
3
  import { readFile } from 'node:fs/promises';
4
- import { R33_EXPECTED_TOOLS } from '../src/remote-mcp-r33-parity-client.mjs';
4
+ import { R34_EXPECTED_TOOLS } from '../src/remote-mcp-r34-parity-client.mjs';
5
5
  import { validateParityEvidence } from '../scripts/release-parity.mjs';
6
6
  import { verifyFinalClosureObject } from '../scripts/final-closure-verify.mjs';
7
7
 
8
8
  const root = new URL('../', import.meta.url);
9
9
  const text = rel => readFile(new URL(rel, root), 'utf8');
10
10
 
11
- test('R33 public parity catalog is exact and unique', () => {
12
- assert.equal(R33_EXPECTED_TOOLS.length, 68);
13
- assert.equal(new Set(R33_EXPECTED_TOOLS).size, 68);
14
- assert.deepEqual([...R33_EXPECTED_TOOLS].sort(), R33_EXPECTED_TOOLS);
11
+ test('R34 public parity catalog is exact, unique, and includes production coding ergonomics', () => {
12
+ assert.equal(R34_EXPECTED_TOOLS.length, 73);
13
+ assert.equal(new Set(R34_EXPECTED_TOOLS).size, 73);
14
+ assert.deepEqual([...R34_EXPECTED_TOOLS].sort(), R34_EXPECTED_TOOLS);
15
+ for (const name of ['coding_files_read','coding_symbol_outline','coding_symbol_definition','coding_symbol_references','coding_symbol_replace']) {
16
+ assert.ok(R34_EXPECTED_TOOLS.includes(name),`missing ${name}`);
17
+ }
15
18
  });
16
19
 
17
20
  test('release parity and final verifier are package entry points', async () => {
@@ -23,16 +26,17 @@ test('release parity and final verifier are package entry points', async () => {
23
26
  assert.equal(typeof verifyFinalClosureObject, 'function');
24
27
  });
25
28
 
26
- test('final closure verifier is implementation-independent from production helpers', async () => {
29
+ test('R36 final closure verifier is implementation-independent from production helpers', async () => {
27
30
  const verifier = await text('scripts/final-closure-verify.mjs');
28
31
  const writer = await text('scripts/final-closure.mjs');
29
32
  assert.doesNotMatch(verifier, /from ['"]\.\.\/src\//);
30
33
  assert.match(verifier, /DEADBYTE-R27-SLOT-UPDATE-V1/);
31
34
  assert.match(verifier, /DEADBYTE-MACHINE-PING-V1/);
32
- assert.match(verifier, /DEADBYTE-R33-FINAL-CLOSURE-V1/);
33
- assert.match(writer, /pointer\.version==='0\.8\.10'/);
34
- assert.match(verifier, /envelope\.body\.version==='0\.8\.10'/);
35
- assert.match(verifier, /release_label==='R33 FINAL MACHINE BASELINE'/);
35
+ assert.match(verifier, /DEADBYTE-R36-FINAL-CLOSURE-V1/);
36
+ assert.match(writer, /pointer\.version==='0\.10\.0'/);
37
+ assert.match(verifier, /envelope\.body\.version==='0\.10\.0'/);
38
+ assert.match(verifier, /release_label==='R36 FINAL MACHINE BASELINE'/);
39
+ assert.match(verifier, /b95e1ec1d9a7e26a96ef492306c1be4df18c883ff03ab3b6015f677d7429ec8d/);
36
40
  });
37
41
 
38
42
  test('final closure verifier canonicalizes traversal order before exact-tree comparison', async () => {
@@ -41,15 +45,19 @@ test('final closure verifier canonicalizes traversal order before exact-tree com
41
45
  assert.match(verifier, /const expected=\[\.\.\.entries\.keys\(\)\]\.sort\(\(a,b\)=>a\.localeCompare\(b,'en'\)\);/);
42
46
  });
43
47
 
44
- test('autonomous live gate reuses the canonical R33 68-tool catalog', async () => {
48
+ test('R36 autonomous live gate binds the compact gateway contract instead of the historical 73-tool public catalog', async () => {
45
49
  const autonomous = await text('src/remote-mcp-autonomous-smoke-client.mjs');
46
- assert.match(autonomous, /import \{ R33_EXPECTED_TOOLS \} from '\.\/remote-mcp-r33-parity-client\.mjs';/);
47
- assert.doesNotMatch(autonomous, /const expectedTools\s*=\s*\[/);
48
- assert.match(autonomous, /JSON\.stringify\(names\) !== JSON\.stringify\(R33_EXPECTED_TOOLS\)/);
50
+ assert.match(autonomous, /R36_COMPACT_GATEWAYS/);
51
+ assert.match(autonomous, /R36_COMPACT_TOOL_LIMIT/);
52
+ assert.match(autonomous, /names\.length > R36_COMPACT_TOOL_LIMIT/);
53
+ for (const name of ['autonomous_goal_submit','autonomous_goal_run','autonomous_goal_verify','autonomous_release_gate','native_diff_apply','native_diff_verify']) {
54
+ assert.match(autonomous,new RegExp(name));
55
+ }
56
+ assert.doesNotMatch(autonomous, /R34_EXPECTED_TOOLS/);
49
57
  });
50
58
 
51
- test('R33 parity proves coding package tests before package-visible scratch mutation', async () => {
52
- const parity = await text('src/remote-mcp-r33-parity-client.mjs');
59
+ test('R34 parity proves coding package tests before package-visible scratch mutation', async () => {
60
+ const parity = await text('src/remote-mcp-r34-parity-client.mjs');
53
61
  const codingTests = parity.indexOf('const tests = structured(');
54
62
  const scratchWrite = parity.indexOf('const write = structured(');
55
63
  assert.notEqual(codingTests, -1);
@@ -57,8 +65,8 @@ test('R33 parity proves coding package tests before package-visible scratch muta
57
65
  assert.ok(codingTests < scratchWrite, 'coding tests must complete before machine-FS scratch mutation');
58
66
  });
59
67
 
60
- test('R33 parity isolates scratch mutation and search from the core release tree', async () => {
61
- const parity = await text('src/remote-mcp-r33-parity-client.mjs');
68
+ test('R34 parity isolates scratch mutation and search from the core release tree', async () => {
69
+ const parity = await text('src/remote-mcp-r34-parity-client.mjs');
62
70
  assert.match(parity, /const scratchRoot = 'parity_scratch';/);
63
71
  assert.match(parity, /machine_fs_write[\s\S]*?root_id:scratchRoot/);
64
72
  assert.match(parity, /machine_search_start[\s\S]*?root_id:scratchRoot/);