deadbyte-mcp 0.8.9 → 0.9.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 (349) hide show
  1. package/CONTEXT.md +41 -0
  2. package/MANIFEST.SHA256 +348 -83
  3. package/R34-BASELINE.json +9 -0
  4. package/README.txt +135 -9
  5. package/bench/fixtures/corpus.json +17 -0
  6. package/bin/WORKER-REGISTRY.txt +3 -3
  7. package/bin/appcontainer-stage.exe +0 -0
  8. package/bin/appcontainer-stage.obj +0 -0
  9. package/bin/bootstrap-advapi32.exe +0 -0
  10. package/bin/bootstrap-advapi32.obj +0 -0
  11. package/bin/bootstrap-exitcode.exe +0 -0
  12. package/bin/bootstrap-exitcode.obj +0 -0
  13. package/bin/bootstrap-kernel32.exe +0 -0
  14. package/bin/bootstrap-kernel32.obj +0 -0
  15. package/bin/child-control-probe.exe +0 -0
  16. package/bin/child-control-probe.obj +0 -0
  17. package/bin/child-control-stage.exe +0 -0
  18. package/bin/child-control-stage.obj +0 -0
  19. package/bin/contained-reverse-worker.exe +0 -0
  20. package/bin/contained-reverse-worker.obj +0 -0
  21. package/bin/contained-transform-worker.exe +0 -0
  22. package/bin/contained-transform-worker.obj +0 -0
  23. package/bin/containment-probe.exe +0 -0
  24. package/bin/containment-probe.obj +0 -0
  25. package/bin/deadbyte-contain.exe +0 -0
  26. package/bin/deadbyte-contain.obj +0 -0
  27. package/bin/deadbyte-exec.exe +0 -0
  28. package/bin/deadbyte-exec.obj +0 -0
  29. package/bin/deadbyte-process-host.exe +0 -0
  30. package/bin/deadbyte-process-host.obj +0 -0
  31. package/bin/deadbyte-tunnel-host.exe +0 -0
  32. package/bin/deadbyte-tunnel-host.obj +0 -0
  33. package/controller/README.TXT +10 -4
  34. package/controller/deadbyte-controller.config.psd1.example +14 -0
  35. package/controller/deadbyte-controller.ps1 +144 -19
  36. package/controller/deadbyte-process-policy.json +5 -5
  37. package/controller/deadbyte-semantic-lsp-config.json +95 -0
  38. package/deadbyte-mcp-0.8.9.tgz +0 -0
  39. package/docs/ADR-0001-PRODUCTION-BASELINE-SEAMS.md +29 -0
  40. package/docs/ARCHITECTURE.md +6 -5
  41. package/docs/superpowers/plans/2026-09-16-deadbyte-loop-engine.md +846 -0
  42. package/docs/superpowers/plans/2026-09-17-r35-production-successor.md +408 -0
  43. package/docs/superpowers/specs/2026-09-16-deadbyte-loop-engine-design.md +435 -0
  44. package/docs/superpowers/specs/2026-09-17-r35-production-successor-design.md +220 -0
  45. package/node_modules/typescript/LICENSE.txt +55 -0
  46. package/node_modules/typescript/README.md +50 -0
  47. package/node_modules/typescript/SECURITY.md +41 -0
  48. package/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
  49. package/node_modules/typescript/bin/tsc +2 -0
  50. package/node_modules/typescript/bin/tsserver +2 -0
  51. package/node_modules/typescript/lib/_tsc.js +133818 -0
  52. package/node_modules/typescript/lib/_tsserver.js +659 -0
  53. package/node_modules/typescript/lib/_typingsInstaller.js +222 -0
  54. package/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2122 -0
  55. package/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2122 -0
  56. package/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2122 -0
  57. package/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2122 -0
  58. package/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2122 -0
  59. package/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2122 -0
  60. package/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2122 -0
  61. package/node_modules/typescript/lib/lib.d.ts +22 -0
  62. package/node_modules/typescript/lib/lib.decorators.d.ts +384 -0
  63. package/node_modules/typescript/lib/lib.decorators.legacy.d.ts +22 -0
  64. package/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +41 -0
  65. package/node_modules/typescript/lib/lib.dom.d.ts +39429 -0
  66. package/node_modules/typescript/lib/lib.dom.iterable.d.ts +571 -0
  67. package/node_modules/typescript/lib/lib.es2015.collection.d.ts +147 -0
  68. package/node_modules/typescript/lib/lib.es2015.core.d.ts +597 -0
  69. package/node_modules/typescript/lib/lib.es2015.d.ts +28 -0
  70. package/node_modules/typescript/lib/lib.es2015.generator.d.ts +77 -0
  71. package/node_modules/typescript/lib/lib.es2015.iterable.d.ts +605 -0
  72. package/node_modules/typescript/lib/lib.es2015.promise.d.ts +81 -0
  73. package/node_modules/typescript/lib/lib.es2015.proxy.d.ts +128 -0
  74. package/node_modules/typescript/lib/lib.es2015.reflect.d.ts +144 -0
  75. package/node_modules/typescript/lib/lib.es2015.symbol.d.ts +46 -0
  76. package/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
  77. package/node_modules/typescript/lib/lib.es2016.array.include.d.ts +116 -0
  78. package/node_modules/typescript/lib/lib.es2016.d.ts +21 -0
  79. package/node_modules/typescript/lib/lib.es2016.full.d.ts +23 -0
  80. package/node_modules/typescript/lib/lib.es2016.intl.d.ts +31 -0
  81. package/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +21 -0
  82. package/node_modules/typescript/lib/lib.es2017.d.ts +26 -0
  83. package/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
  84. package/node_modules/typescript/lib/lib.es2017.full.d.ts +23 -0
  85. package/node_modules/typescript/lib/lib.es2017.intl.d.ts +44 -0
  86. package/node_modules/typescript/lib/lib.es2017.object.d.ts +49 -0
  87. package/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
  88. package/node_modules/typescript/lib/lib.es2017.string.d.ts +45 -0
  89. package/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
  90. package/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
  91. package/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +53 -0
  92. package/node_modules/typescript/lib/lib.es2018.d.ts +24 -0
  93. package/node_modules/typescript/lib/lib.es2018.full.d.ts +24 -0
  94. package/node_modules/typescript/lib/lib.es2018.intl.d.ts +83 -0
  95. package/node_modules/typescript/lib/lib.es2018.promise.d.ts +30 -0
  96. package/node_modules/typescript/lib/lib.es2018.regexp.d.ts +37 -0
  97. package/node_modules/typescript/lib/lib.es2019.array.d.ts +79 -0
  98. package/node_modules/typescript/lib/lib.es2019.d.ts +24 -0
  99. package/node_modules/typescript/lib/lib.es2019.full.d.ts +24 -0
  100. package/node_modules/typescript/lib/lib.es2019.intl.d.ts +23 -0
  101. package/node_modules/typescript/lib/lib.es2019.object.d.ts +33 -0
  102. package/node_modules/typescript/lib/lib.es2019.string.d.ts +37 -0
  103. package/node_modules/typescript/lib/lib.es2019.symbol.d.ts +24 -0
  104. package/node_modules/typescript/lib/lib.es2020.bigint.d.ts +765 -0
  105. package/node_modules/typescript/lib/lib.es2020.d.ts +27 -0
  106. package/node_modules/typescript/lib/lib.es2020.date.d.ts +42 -0
  107. package/node_modules/typescript/lib/lib.es2020.full.d.ts +24 -0
  108. package/node_modules/typescript/lib/lib.es2020.intl.d.ts +474 -0
  109. package/node_modules/typescript/lib/lib.es2020.number.d.ts +28 -0
  110. package/node_modules/typescript/lib/lib.es2020.promise.d.ts +47 -0
  111. package/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +99 -0
  112. package/node_modules/typescript/lib/lib.es2020.string.d.ts +44 -0
  113. package/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
  114. package/node_modules/typescript/lib/lib.es2021.d.ts +23 -0
  115. package/node_modules/typescript/lib/lib.es2021.full.d.ts +24 -0
  116. package/node_modules/typescript/lib/lib.es2021.intl.d.ts +166 -0
  117. package/node_modules/typescript/lib/lib.es2021.promise.d.ts +48 -0
  118. package/node_modules/typescript/lib/lib.es2021.string.d.ts +33 -0
  119. package/node_modules/typescript/lib/lib.es2021.weakref.d.ts +78 -0
  120. package/node_modules/typescript/lib/lib.es2022.array.d.ts +121 -0
  121. package/node_modules/typescript/lib/lib.es2022.d.ts +25 -0
  122. package/node_modules/typescript/lib/lib.es2022.error.d.ts +75 -0
  123. package/node_modules/typescript/lib/lib.es2022.full.d.ts +24 -0
  124. package/node_modules/typescript/lib/lib.es2022.intl.d.ts +145 -0
  125. package/node_modules/typescript/lib/lib.es2022.object.d.ts +26 -0
  126. package/node_modules/typescript/lib/lib.es2022.regexp.d.ts +39 -0
  127. package/node_modules/typescript/lib/lib.es2022.string.d.ts +25 -0
  128. package/node_modules/typescript/lib/lib.es2023.array.d.ts +924 -0
  129. package/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
  130. package/node_modules/typescript/lib/lib.es2023.d.ts +22 -0
  131. package/node_modules/typescript/lib/lib.es2023.full.d.ts +24 -0
  132. package/node_modules/typescript/lib/lib.es2023.intl.d.ts +56 -0
  133. package/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +65 -0
  134. package/node_modules/typescript/lib/lib.es2024.collection.d.ts +29 -0
  135. package/node_modules/typescript/lib/lib.es2024.d.ts +26 -0
  136. package/node_modules/typescript/lib/lib.es2024.full.d.ts +24 -0
  137. package/node_modules/typescript/lib/lib.es2024.object.d.ts +29 -0
  138. package/node_modules/typescript/lib/lib.es2024.promise.d.ts +35 -0
  139. package/node_modules/typescript/lib/lib.es2024.regexp.d.ts +25 -0
  140. package/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +68 -0
  141. package/node_modules/typescript/lib/lib.es2024.string.d.ts +29 -0
  142. package/node_modules/typescript/lib/lib.es5.d.ts +4601 -0
  143. package/node_modules/typescript/lib/lib.es6.d.ts +23 -0
  144. package/node_modules/typescript/lib/lib.esnext.array.d.ts +35 -0
  145. package/node_modules/typescript/lib/lib.esnext.collection.d.ts +96 -0
  146. package/node_modules/typescript/lib/lib.esnext.d.ts +29 -0
  147. package/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
  148. package/node_modules/typescript/lib/lib.esnext.disposable.d.ts +193 -0
  149. package/node_modules/typescript/lib/lib.esnext.error.d.ts +24 -0
  150. package/node_modules/typescript/lib/lib.esnext.float16.d.ts +445 -0
  151. package/node_modules/typescript/lib/lib.esnext.full.d.ts +24 -0
  152. package/node_modules/typescript/lib/lib.esnext.intl.d.ts +21 -0
  153. package/node_modules/typescript/lib/lib.esnext.iterator.d.ts +148 -0
  154. package/node_modules/typescript/lib/lib.esnext.promise.d.ts +34 -0
  155. package/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +25 -0
  156. package/node_modules/typescript/lib/lib.scripthost.d.ts +322 -0
  157. package/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +41 -0
  158. package/node_modules/typescript/lib/lib.webworker.d.ts +13150 -0
  159. package/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
  160. package/node_modules/typescript/lib/lib.webworker.iterable.d.ts +340 -0
  161. package/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2122 -0
  162. package/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2122 -0
  163. package/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2122 -0
  164. package/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2122 -0
  165. package/node_modules/typescript/lib/tsc.js +8 -0
  166. package/node_modules/typescript/lib/tsserver.js +8 -0
  167. package/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
  168. package/node_modules/typescript/lib/tsserverlibrary.js +21 -0
  169. package/node_modules/typescript/lib/typesMap.json +497 -0
  170. package/node_modules/typescript/lib/typescript.d.ts +11437 -0
  171. package/node_modules/typescript/lib/typescript.js +200276 -0
  172. package/node_modules/typescript/lib/typingsInstaller.js +8 -0
  173. package/node_modules/typescript/lib/watchGuard.js +53 -0
  174. package/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2122 -0
  175. package/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2122 -0
  176. package/node_modules/typescript/package.json +120 -0
  177. package/package.json +5 -3
  178. package/proof/CONTAINMENT-BUILD.txt +6 -6
  179. package/proof/R34-TASK8-SUPERVISOR-CHECKPOINT.json +29 -0
  180. package/proof/R34-TASK9-MCP-SURFACE-CHECKPOINT.json +28 -0
  181. package/scripts/capability-benchmark.mjs +27 -0
  182. package/scripts/deferred-slot-operation.mjs +4 -2
  183. package/scripts/final-closure-verify.mjs +10 -10
  184. package/scripts/final-closure.mjs +11 -11
  185. package/scripts/gate-windows.ps1 +3 -3
  186. package/scripts/release-parity.mjs +14 -14
  187. package/scripts/semantic-preflight.ps1 +73 -0
  188. package/scripts/tool-surface-snapshot.mjs +73 -0
  189. package/scripts/windows-gate-evidence.mjs +5 -5
  190. package/src/audit-verify.mjs +6 -2
  191. package/src/autonomous-action-reconcile.mjs +142 -0
  192. package/src/autonomous-context-engine.mjs +255 -0
  193. package/src/autonomous-live-state.mjs +17 -0
  194. package/src/autonomous-local-supervisor.mjs +249 -0
  195. package/src/autonomous-loop-state.mjs +304 -0
  196. package/src/autonomous-output-contracts.mjs +22 -3
  197. package/src/autonomous-plan.mjs +181 -0
  198. package/src/autonomous-planner-contracts.mjs +44 -0
  199. package/src/autonomous-planner.mjs +91 -6
  200. package/src/autonomous-policy.mjs +15 -2
  201. package/src/autonomous-progress.mjs +127 -0
  202. package/src/autonomous-runtime.mjs +601 -48
  203. package/src/autonomous-supervisor-host.mjs +70 -0
  204. package/src/autonomous-supervisor.mjs +31 -8
  205. package/src/capability-benchmark-runner.mjs +108 -0
  206. package/src/capability-benchmark.mjs +50 -0
  207. package/src/coding-mcp-tools.mjs +46 -3
  208. package/src/coding-output-contracts.mjs +45 -0
  209. package/src/context-provenance.mjs +86 -0
  210. package/src/deadbyte-cli.mjs +136 -30
  211. package/src/document-adapter.mjs +43 -0
  212. package/src/lsp-stdio-client.mjs +112 -0
  213. package/src/machine-fs-smoke-client.mjs +2 -1
  214. package/src/mcp-server.mjs +17 -3
  215. package/src/observation-smoke-client.mjs +3 -2
  216. package/src/operator-surface.mjs +37 -0
  217. package/src/provider-circuit.mjs +125 -0
  218. package/src/release-generation.mjs +44 -5
  219. package/src/remote-mcp-autonomous-smoke-client.mjs +53 -14
  220. package/src/remote-mcp-coding-smoke-client.mjs +5 -4
  221. package/src/remote-mcp-r24-disarmed-smoke-client.mjs +4 -2
  222. package/src/remote-mcp-r33-parity-client.mjs +1 -1
  223. package/src/remote-mcp-r34-parity-client.mjs +177 -0
  224. package/src/remote-mcp-smoke-client.mjs +2 -1
  225. package/src/remote-result-journal.mjs +114 -0
  226. package/src/runtime-update.mjs +58 -8
  227. package/src/semantic-backend-registry.mjs +39 -0
  228. package/src/semantic-code.mjs +179 -0
  229. package/src/semantic-lsp-backend.mjs +183 -0
  230. package/src/semantic-lsp-config.mjs +112 -0
  231. package/src/tool-surface-ledger.mjs +92 -0
  232. package/src/version.mjs +1 -1
  233. package/test/audit-verify.test.mjs +1 -1
  234. package/test/autonomous-action-reconcile.test.mjs +106 -0
  235. package/test/autonomous-adversarial.test.mjs +149 -6
  236. package/test/autonomous-context-engine.test.mjs +181 -0
  237. package/test/autonomous-live-state.test.mjs +27 -0
  238. package/test/autonomous-local-supervisor.test.mjs +403 -0
  239. package/test/autonomous-loop-state.test.mjs +126 -0
  240. package/test/autonomous-loop-v2.test.mjs +105 -0
  241. package/test/autonomous-loop.test.mjs +79 -1
  242. package/test/autonomous-output-contract.test.mjs +54 -0
  243. package/test/autonomous-plan.test.mjs +101 -0
  244. package/test/autonomous-progress.test.mjs +106 -0
  245. package/test/autonomous-r34-e2e.test.mjs +338 -0
  246. package/test/autonomous-runtime.test.mjs +3 -3
  247. package/test/autonomous-supervisor-integration.test.mjs +48 -3
  248. package/test/capability-benchmark-runner.test.mjs +49 -0
  249. package/test/capability-benchmark.test.mjs +47 -0
  250. package/test/cli-entrypoint.test.mjs +12 -0
  251. package/test/coding-catalog-consistency.test.mjs +24 -0
  252. package/test/coding-plane.test.mjs +3 -3
  253. package/test/context-provenance.test.mjs +61 -0
  254. package/test/controller-r27.test.mjs +4 -3
  255. package/test/controller.test.mjs +52 -0
  256. package/test/core.test.mjs +1 -1
  257. package/test/deferred-slot-operation-behavior.test.mjs +5 -1
  258. package/test/deferred-slot-operation.test.mjs +2 -1
  259. package/test/document-adapter.test.mjs +23 -0
  260. package/test/fixtures/lsp-framed-server.mjs +33 -0
  261. package/test/fixtures/semantic/cpp/compile_commands.json +4 -0
  262. package/test/fixtures/semantic/cpp/lib.cpp +2 -0
  263. package/test/fixtures/semantic/cpp/lib.hpp +2 -0
  264. package/test/fixtures/semantic/cpp/main.cpp +2 -0
  265. package/test/fixtures/semantic/python/lib.py +2 -0
  266. package/test/fixtures/semantic/python/main.py +2 -0
  267. package/test/fixtures/semantic/rust/Cargo.lock +7 -0
  268. package/test/fixtures/semantic/rust/Cargo.toml +8 -0
  269. package/test/fixtures/semantic/rust/src/lib.rs +3 -0
  270. package/test/fixtures/semantic/rust/src/main.rs +5 -0
  271. package/test/fixtures/semantic/rust/src/math.rs +3 -0
  272. package/test/fixtures/semantic/rust/target/.rustc_info.json +1 -0
  273. package/test/fixtures/semantic/rust/target/CACHEDIR.TAG +3 -0
  274. package/test/fixtures/semantic/rust/target/debug/.cargo-lock +0 -0
  275. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-4c168fa33c79d09c/dep-test-lib-semantic_rust +0 -0
  276. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-4c168fa33c79d09c/invoked.timestamp +1 -0
  277. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-4c168fa33c79d09c/test-lib-semantic_rust +1 -0
  278. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-4c168fa33c79d09c/test-lib-semantic_rust.json +1 -0
  279. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-5dcd474439c54a26/dep-test-bin-semantic_rust_bin +0 -0
  280. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-5dcd474439c54a26/invoked.timestamp +1 -0
  281. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-5dcd474439c54a26/test-bin-semantic_rust_bin +1 -0
  282. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-5dcd474439c54a26/test-bin-semantic_rust_bin.json +1 -0
  283. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-6212ccd976aa3808/dep-lib-semantic_rust +0 -0
  284. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-6212ccd976aa3808/invoked.timestamp +1 -0
  285. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-6212ccd976aa3808/lib-semantic_rust +1 -0
  286. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-6212ccd976aa3808/lib-semantic_rust.json +1 -0
  287. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-d741378dccdef61c/bin-semantic_rust_bin +1 -0
  288. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-d741378dccdef61c/bin-semantic_rust_bin.json +1 -0
  289. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-d741378dccdef61c/dep-bin-semantic_rust_bin +0 -0
  290. package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-d741378dccdef61c/invoked.timestamp +1 -0
  291. package/test/fixtures/semantic/rust/target/debug/deps/libsemantic_rust-4c168fa33c79d09c.rmeta +0 -0
  292. package/test/fixtures/semantic/rust/target/debug/deps/libsemantic_rust-6212ccd976aa3808.rmeta +0 -0
  293. package/test/fixtures/semantic/rust/target/debug/deps/libsemantic_rust_bin-5dcd474439c54a26.rmeta +0 -0
  294. package/test/fixtures/semantic/rust/target/debug/deps/libsemantic_rust_bin-d741378dccdef61c.rmeta +0 -0
  295. package/test/fixtures/semantic/rust/target/debug/deps/semantic_rust-4c168fa33c79d09c.d +5 -0
  296. package/test/fixtures/semantic/rust/target/debug/deps/semantic_rust-6212ccd976aa3808.d +5 -0
  297. package/test/fixtures/semantic/rust/target/debug/deps/semantic_rust_bin-5dcd474439c54a26.d +6 -0
  298. package/test/fixtures/semantic/rust/target/debug/deps/semantic_rust_bin-d741378dccdef61c.d +6 -0
  299. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-1nzlugxi6lq16/s-hmdgo8b6hg-1n6glhc-1qb77z00k06rqw4jdkj92spax/dep-graph.bin +0 -0
  300. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-1nzlugxi6lq16/s-hmdgo8b6hg-1n6glhc-1qb77z00k06rqw4jdkj92spax/query-cache.bin +0 -0
  301. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-1nzlugxi6lq16/s-hmdgo8b6hg-1n6glhc-1qb77z00k06rqw4jdkj92spax/work-products.bin +0 -0
  302. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-1nzlugxi6lq16/s-hmdgo8b6hg-1n6glhc.lock +0 -0
  303. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-3s436v7g6f5xm/s-hmdgo8b58k-1ekj4lq-9twkpivsqnjon278x20bddozq/dep-graph.bin +0 -0
  304. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-3s436v7g6f5xm/s-hmdgo8b58k-1ekj4lq-9twkpivsqnjon278x20bddozq/metadata.rmeta +0 -0
  305. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-3s436v7g6f5xm/s-hmdgo8b58k-1ekj4lq-9twkpivsqnjon278x20bddozq/query-cache.bin +0 -0
  306. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-3s436v7g6f5xm/s-hmdgo8b58k-1ekj4lq-9twkpivsqnjon278x20bddozq/work-products.bin +0 -0
  307. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-3s436v7g6f5xm/s-hmdgo8b58k-1ekj4lq.lock +0 -0
  308. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-1jxcbdeehal7q/s-hmdgo8bxlf-1qr24o3-cmu3jai030no72y8u9eurrnjj/dep-graph.bin +0 -0
  309. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-1jxcbdeehal7q/s-hmdgo8bxlf-1qr24o3-cmu3jai030no72y8u9eurrnjj/query-cache.bin +0 -0
  310. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-1jxcbdeehal7q/s-hmdgo8bxlf-1qr24o3-cmu3jai030no72y8u9eurrnjj/work-products.bin +0 -0
  311. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-1jxcbdeehal7q/s-hmdgo8bxlf-1qr24o3.lock +0 -0
  312. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-2ocx55p60ni6b/s-hmdgo8bxj8-0ir41qt-diy9mqvc2eoiblmhjs3stcgi3/dep-graph.bin +0 -0
  313. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-2ocx55p60ni6b/s-hmdgo8bxj8-0ir41qt-diy9mqvc2eoiblmhjs3stcgi3/query-cache.bin +0 -0
  314. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-2ocx55p60ni6b/s-hmdgo8bxj8-0ir41qt-diy9mqvc2eoiblmhjs3stcgi3/work-products.bin +0 -0
  315. package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-2ocx55p60ni6b/s-hmdgo8bxj8-0ir41qt.lock +0 -0
  316. package/test/fixtures/semantic/rust/target/flycheck0/stderr +1 -0
  317. package/test/fixtures/semantic/rust/target/flycheck0/stdout +5 -0
  318. package/test/fixtures/semantic/typescript/lib.ts +3 -0
  319. package/test/fixtures/semantic/typescript/main.ts +2 -0
  320. package/test/fixtures/tool-surface-stdio-server.mjs +14 -0
  321. package/test/helpers/autonomous-r34-fixture.mjs +120 -0
  322. package/test/lsp-stdio-client.test.mjs +72 -0
  323. package/test/multi-file-read.test.mjs +41 -0
  324. package/test/observation-integration.test.mjs +3 -3
  325. package/test/production-docs.test.mjs +48 -0
  326. package/test/prompts-resources.test.mjs +35 -0
  327. package/test/provider-circuit.test.mjs +93 -0
  328. package/test/public-autonomous-ingress-budget.test.mjs +28 -0
  329. package/test/r33-closeout-regression.test.mjs +3 -3
  330. package/test/r33-finalization.test.mjs +19 -16
  331. package/test/release-generation.test.mjs +23 -2
  332. package/test/release-version.test.mjs +24 -17
  333. package/test/remote-r24-catalog.test.mjs +5 -4
  334. package/test/remote-result-journal.test.mjs +58 -0
  335. package/test/remote-session-cli.test.mjs +150 -15
  336. package/test/runtime-self-update.test.mjs +63 -0
  337. package/test/semantic-backend-registry.test.mjs +29 -0
  338. package/test/semantic-code.test.mjs +66 -0
  339. package/test/semantic-lsp-backend.test.mjs +99 -0
  340. package/test/semantic-lsp-config.test.mjs +81 -0
  341. package/test/semantic-lsp-readiness.test.mjs +34 -0
  342. package/test/semantic-lsp-transient-empty.test.mjs +32 -0
  343. package/test/semantic-lsp-transient-null.test.mjs +31 -0
  344. package/test/semantic-multilang.test.mjs +72 -0
  345. package/test/semantic-runtime-routing.test.mjs +32 -0
  346. package/test/semantic-server-config-integration.test.mjs +66 -0
  347. package/test/tool-surface-ledger.test.mjs +59 -0
  348. package/test/tool-surface-snapshot.test.mjs +17 -0
  349. package/test/tracer-bullet.test.mjs +77 -0
@@ -0,0 +1,61 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { createHash } from 'node:crypto';
4
+ import { canonicalJson } from '../src/canonical-json.mjs';
5
+ import { provenanceFor, dedupeEvidence } from '../src/context-provenance.mjs';
6
+
7
+ const sha256=value=>createHash('sha256').update(value).digest('hex');
8
+
9
+ function provenance(overrides={}){
10
+ return provenanceFor({
11
+ sourceKind:'file',sourceId:'src/main.ts',bytes:'export const x = 1;\n',
12
+ observedAtUtc:'2026-09-17T09:00:00.000Z',trustClass:'workspace',relevanceEpoch:4,
13
+ ...overrides
14
+ });
15
+ }
16
+
17
+ test('R35 provenance identity is deterministic and observation time is not part of stable identity',()=>{
18
+ const a=provenance();
19
+ const b=provenance({observedAtUtc:'2026-09-17T09:00:05.000Z'});
20
+ assert.equal(a.schema,'deadbyte.context-provenance.v1');
21
+ assert.equal(a.source_kind,'file');
22
+ assert.equal(a.source_id,'src/main.ts');
23
+ assert.equal(a.byte_count,Buffer.byteLength('export const x = 1;\n','utf8'));
24
+ assert.equal(a.source_sha256,sha256(Buffer.from('export const x = 1;\n','utf8')));
25
+ assert.match(a.provenance_id,/^[0-9a-f]{64}$/);
26
+ assert.equal(a.provenance_id,b.provenance_id);
27
+ assert.notEqual(a.observed_at_utc,b.observed_at_utc);
28
+ });
29
+
30
+ test('R35 structured secret evidence never exposes a secret-derived digest oracle',()=>{
31
+ const a=provenance({sourceKind:'provider_response',sourceId:'planner',bytes:{status:'failed',api_token:'alpha-secret'}});
32
+ const b=provenance({sourceKind:'provider_response',sourceId:'planner',bytes:{status:'failed',api_token:'different-secret'}});
33
+ assert.equal(a.source_sha256,undefined);
34
+ assert.equal(b.source_sha256,undefined);
35
+ assert.equal(a.digest_withheld,'secret');
36
+ assert.equal(b.digest_withheld,'secret');
37
+ assert.equal(a.provenance_id,b.provenance_id,'stable identity must not become a secret oracle');
38
+ assert.equal(a.byte_count,Buffer.byteLength(canonicalJson({status:'failed',api_token:'alpha-secret'}),'utf8'));
39
+ });
40
+
41
+ test('R35 dedupeEvidence keeps the newest item for identical provenance while preserving stable identity order',()=>{
42
+ const p1=provenance({sourceId:'a.ts',observedAtUtc:'2026-09-17T09:00:00.000Z'});
43
+ const p1New=provenance({sourceId:'a.ts',observedAtUtc:'2026-09-17T09:01:00.000Z'});
44
+ const p2=provenance({sourceId:'b.ts',observedAtUtc:'2026-09-17T09:00:30.000Z'});
45
+ const out=dedupeEvidence([
46
+ {provenance:p1,content:'old'},
47
+ {provenance:p2,content:'other'},
48
+ {provenance:p1New,content:'new'}
49
+ ]);
50
+ assert.equal(out.length,2);
51
+ assert.equal(out[0].content,'new');
52
+ assert.equal(out[0].provenance.provenance_id,p1.provenance_id);
53
+ assert.equal(out[1].content,'other');
54
+ });
55
+
56
+ test('R35 provenance validates bounded identity, trust and relevance inputs',()=>{
57
+ assert.throws(()=>provenanceFor({sourceKind:'',sourceId:'x',bytes:'x',observedAtUtc:'2026-09-17T09:00:00.000Z',trustClass:'workspace',relevanceEpoch:0}),/sourceKind/i);
58
+ assert.throws(()=>provenanceFor({sourceKind:'file',sourceId:'x',bytes:'x',observedAtUtc:'not-time',trustClass:'workspace',relevanceEpoch:0}),/observedAtUtc/i);
59
+ assert.throws(()=>provenanceFor({sourceKind:'file',sourceId:'x',bytes:'x',observedAtUtc:'2026-09-17T09:00:00.000Z',trustClass:'',relevanceEpoch:0}),/trustClass/i);
60
+ assert.throws(()=>provenanceFor({sourceKind:'file',sourceId:'x',bytes:'x',observedAtUtc:'2026-09-17T09:00:00.000Z',trustClass:'workspace',relevanceEpoch:-1}),/relevanceEpoch/i);
61
+ });
@@ -31,9 +31,10 @@ test('R27 controller supports a trusted stable WorkspaceRoot independent of rele
31
31
 
32
32
  test('R27 controller pins external Bridge script bytes into owned runtime identity', async () => {
33
33
  const text = await source();
34
- assert.match(text,/Bridge ScriptPath missing/);
35
- assert.match(text,/Bridge ScriptSha256 invalid/);
36
- assert.match(text,/bridge script hash mismatch/i);
34
+ assert.match(text,/\$name -in @\('Bridge','Supervisor'\)/);
35
+ assert.match(text,/Fail "\$name ScriptPath missing"/);
36
+ assert.match(text,/Fail "\$name ScriptSha256 invalid"/);
37
+ assert.match(text,/Fail "\$name script hash mismatch:/);
37
38
  assert.match(text,/\$body\['script_path'\] = \[string\]\$Spec\.ScriptPath/);
38
39
  assert.match(text,/\$body\['script_sha256'\] = \[string\]\$Spec\.ScriptSha256/);
39
40
  assert.match(text,/script-hash-mismatch/);
@@ -134,6 +134,22 @@ test('controller feature-gates coding runtime and policy only into the Bridge ch
134
134
  assert.match(example, /CodingRuntimeEnabled = \$false/);
135
135
  });
136
136
 
137
+ test('R35 controller binds semantic LSP config path and SHA only into the Bridge child environment', async () => {
138
+ const source = await readFile(controller, 'utf8');
139
+ const example = await readFile(fileURLToPath(new URL('../controller/deadbyte-controller.config.psd1.example', import.meta.url)), 'utf8');
140
+ assert.match(source, /SemanticLspConfigFile/);
141
+ assert.match(source, /SemanticLspConfigSha256/);
142
+ assert.match(source, /DEADBYTE_SEMANTIC_LSP_CONFIG/);
143
+ assert.match(source, /DEADBYTE_SEMANTIC_LSP_CONFIG_SHA256/);
144
+ assert.match(source, /semantic LSP config SHA-256 mismatch/i);
145
+ assert.match(source, /Remove-Item Env:DEADBYTE_SEMANTIC_LSP_CONFIG/);
146
+ assert.match(source, /Remove-Item Env:DEADBYTE_SEMANTIC_LSP_CONFIG_SHA256/);
147
+ assert.match(source, /\$env:DEADBYTE_SEMANTIC_LSP_CONFIG = \$previousSemanticLspConfigEnv/);
148
+ assert.match(source, /\$env:DEADBYTE_SEMANTIC_LSP_CONFIG_SHA256 = \$previousSemanticLspConfigShaEnv/);
149
+ assert.match(example, /SemanticLspConfigFile = ''/);
150
+ assert.match(example, /SemanticLspConfigSha256 = ''/);
151
+ });
152
+
137
153
  test('R31 controller feature-gates machine filesystem only into the Bridge child and requires coding runtime', async () => {
138
154
  const source = await readFile(controller, 'utf8');
139
155
  const example = await readFile(fileURLToPath(new URL('../controller/deadbyte-controller.config.psd1.example', import.meta.url)), 'utf8');
@@ -163,3 +179,39 @@ test('R29 controller exposes a non-mutating public machine identity live gate',
163
179
  assert.match(source, /remote-mcp-machine-smoke-client\.mjs/);
164
180
  assert.match(source, /MACHINE IDENTITY LIVE GATE PASS/);
165
181
  });
182
+
183
+ test('R34 controller owns a separate local autonomous supervisor lifecycle with pinned host identity', async () => {
184
+ const source=await readFile(controller,'utf8');
185
+ const example=await readFile(fileURLToPath(new URL('../controller/deadbyte-controller.config.psd1.example', import.meta.url)),'utf8');
186
+ for(const command of ['supervisorstart','supervisorstop','supervisorstatus','supervisorrecover']) assert.match(source,new RegExp(command));
187
+ assert.match(source,/AutonomousSupervisorEnabled/);
188
+ assert.match(source,/Start-OwnedComponent 'Supervisor'/);
189
+ assert.match(source,/Stop-OwnedComponent 'Supervisor'/);
190
+ assert.match(source,/Test-OwnedInstance 'Supervisor'/);
191
+ assert.match(source,/autonomous-supervisor-host\.mjs/);
192
+ assert.match(source,/ScriptSha256/);
193
+ assert.match(example,/AutonomousSupervisorEnabled = \$false/);
194
+ assert.match(example,/Supervisor\s*=\s*@\{/);
195
+ assert.match(example,/autonomous-supervisor-host\.mjs/);
196
+ });
197
+
198
+ test('R34 controller assigns external supervisor ownership to Bridge when local supervisor is enabled', async () => {
199
+ const source=await readFile(controller,'utf8');
200
+ assert.match(source,/DEADBYTE_AUTONOMOUS_SUPERVISOR_MODE/);
201
+ assert.match(source,/AutonomousSupervisorEnabled\) \{ 'external' \} else \{ 'in_process' \}/);
202
+ assert.match(source,/Remove-Item Env:DEADBYTE_AUTONOMOUS_SUPERVISOR_MODE/);
203
+ assert.match(source,/\$env:DEADBYTE_AUTONOMOUS_SUPERVISOR_MODE = \$previousAutonomousSupervisorModeEnv/);
204
+ });
205
+
206
+ test('R34 supervisor lifecycle never arms privileged planes', async () => {
207
+ const source=await readFile(controller,'utf8');
208
+ const start=source.indexOf('function Start-AutonomousSupervisor');
209
+ const end=source.indexOf('function Show-State',start);
210
+ assert.ok(start>=0&&end>start,'supervisor lifecycle block missing');
211
+ const block=source.slice(start,end);
212
+ assert.doesNotMatch(block,/Arm-(?:Process|Coding|Autonomous|Host)/);
213
+ assert.match(block,/Disarm-Autonomous/);
214
+ assert.match(block,/Disarm-Coding/);
215
+ assert.match(block,/Disarm-Process/);
216
+ assert.match(block,/Disarm-Host/);
217
+ });
@@ -105,7 +105,7 @@ test('proof execution creates deterministic output and signed verifiable receipt
105
105
  assert.equal(result.receipt.request.schema, 'deadbyte.request.v1');
106
106
  assert.match(result.receipt.request.nonce, /^[0-9a-f]{64}$/);
107
107
  assert.match(result.receipt.request.sha256, /^[0-9a-f]{64}$/);
108
- assert.equal(result.receipt.runtime.package_version, '0.8.9');
108
+ assert.equal(result.receipt.runtime.package_version, '0.9.0');
109
109
  assert.match(result.receipt.runtime.mcp_ingress_adapter, /^(?:none|tunnel-stdio-probe-compat-v1)$/);
110
110
  assert.match(result.receipt.runtime.mcp_ingress_adapter_sha256, /^[0-9a-f]{64}$/);
111
111
  assert.match(result.receipt.runtime.mcp_ingress_mode_source_sha256, /^[0-9a-f]{64}$/);
@@ -22,7 +22,11 @@ test('R33 deferred worker survives scheduler exit and stays bound to explicit st
22
22
  assert.equal(scheduled.status,'scheduled');
23
23
  assert.ok(path.resolve(scheduled.state_path).startsWith(path.resolve(state)+path.sep));
24
24
  let record;
25
- for(let i=0;i<20;i++){ await sleep(300); record=JSON.parse(await readFile(scheduled.state_path,'utf8')); if(record.state!=='scheduled') break; }
25
+ for(let i=0;i<30;i++){
26
+ await sleep(300);
27
+ record=JSON.parse(await readFile(scheduled.state_path,'utf8'));
28
+ if(record.state==='failed'||record.state==='passed') break;
29
+ }
26
30
  assert.equal(record?.state,'failed');
27
31
  assert.match(record.error,/trust|ENOENT|ed25519/i);
28
32
  } finally { await rm(state,{recursive:true,force:true}); }
@@ -5,12 +5,13 @@ import path from 'node:path';
5
5
  import { fileURLToPath } from 'node:url';
6
6
 
7
7
  const root=path.resolve(path.dirname(fileURLToPath(import.meta.url)),'..');
8
- test('R33 deferred slot operation exposes only exact activation or signed-receipt rollback',async()=>{
8
+ test('R34 deferred slot operation preserves supervisor bootstrap across rollback restore',async()=>{
9
9
  const source=await readFile(path.join(root,'scripts','deferred-slot-operation.mjs'),'utf8');
10
10
  assert.match(source,/mode==='activate'/);
11
11
  assert.match(source,/mode==='rollback'/);
12
12
  assert.match(source,/verifySlotUpdateEnvelope/);
13
13
  assert.match(source,/runSlotUpdateCli\(args,\{stateRoot\}\)/);
14
+ assert.match(source,/--enable-autonomous-supervisor/);
14
15
  assert.match(source,/detached:true/);
15
16
  assert.match(source,/rdc_operation_count:0/);
16
17
  assert.doesNotMatch(source,/shell:\s*true/);
@@ -0,0 +1,23 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { createDocumentAdapterRegistry } from '../src/document-adapter.mjs';
4
+
5
+ test('document adapter registry is bounded, explicit and rejects ambiguous adapter contracts',async()=>{
6
+ const registry=createDocumentAdapterRegistry({maxInputBytes:1024*1024,maxOutputBytes:2*1024*1024});
7
+ registry.register({
8
+ id:'fixture-markdown-pdf',operation:'markdown_to_pdf',inputMime:['text/markdown'],outputMime:'application/pdf',
9
+ async transform({bytes}){return {bytes:Buffer.concat([Buffer.from('%PDF-fixture\n'),bytes]),metadata:{engine:'fixture'}};}
10
+ });
11
+ assert.deepEqual(registry.list(),[{id:'fixture-markdown-pdf',operation:'markdown_to_pdf',input_mime:['text/markdown'],output_mime:'application/pdf'}]);
12
+ const out=await registry.run({adapterId:'fixture-markdown-pdf',operation:'markdown_to_pdf',inputMime:'text/markdown',bytes:Buffer.from('# hello\n')});
13
+ assert.equal(out.status,'ok'); assert.equal(out.output_mime,'application/pdf'); assert.match(out.bytes.toString('utf8'),/^%PDF-fixture/); assert.equal(out.metadata.engine,'fixture');
14
+ assert.throws(()=>registry.register({id:'fixture-markdown-pdf',operation:'x',inputMime:['text/plain'],outputMime:'text/plain',transform:async()=>({bytes:Buffer.alloc(0)})}),/already registered/);
15
+ await assert.rejects(()=>registry.run({adapterId:'fixture-markdown-pdf',operation:'markdown_to_pdf',inputMime:'application/octet-stream',bytes:Buffer.from('x')}),/input MIME denied/);
16
+ });
17
+
18
+ test('document adapter registry enforces input and output byte budgets',async()=>{
19
+ const registry=createDocumentAdapterRegistry({maxInputBytes:4,maxOutputBytes:8});
20
+ registry.register({id:'bounded',operation:'extract_text',inputMime:['application/test'],outputMime:'text/plain',async transform({bytes}){return {bytes:Buffer.concat([bytes,bytes]),metadata:{}};}});
21
+ await assert.rejects(()=>registry.run({adapterId:'bounded',operation:'extract_text',inputMime:'application/test',bytes:Buffer.from('12345')}),/input exceeds/);
22
+ const small=await registry.run({adapterId:'bounded',operation:'extract_text',inputMime:'application/test',bytes:Buffer.from('1234')}); assert.equal(small.bytes.length,8);
23
+ });
@@ -0,0 +1,33 @@
1
+ let buffer=Buffer.alloc(0);
2
+ let queued=[];
3
+ let expectedLanguageId=null;
4
+ let requiredOpenCount=0;
5
+ let readyAfterMs=0;
6
+ let documentSymbolNullCount=0;
7
+ let referencesEmptyCount=0;
8
+ let initializedAt=0;
9
+ const openedUris=[];
10
+ const frame=value=>{const body=Buffer.from(JSON.stringify(value),'utf8');return Buffer.concat([Buffer.from(`Content-Length: ${body.length}\r\n\r\n`,'ascii'),body]);};
11
+ const ready=()=>Date.now()-initializedAt>=readyAfterMs;
12
+ function send(value,{split=false}={}){const bytes=frame(value);if(!split){process.stdout.write(bytes);return;}const cut=Math.max(1,Math.floor(bytes.length/3));process.stdout.write(bytes.subarray(0,cut));setTimeout(()=>process.stdout.write(bytes.subarray(cut)),5);}
13
+ function respond(msg){
14
+ if(msg.method==='initialize') { expectedLanguageId=msg.params?.initializationOptions?.expectedLanguageId??null; requiredOpenCount=Number(msg.params?.initializationOptions?.requiredOpenCount??0); readyAfterMs=Number(msg.params?.initializationOptions?.readyAfterMs??0); documentSymbolNullCount=Number(msg.params?.initializationOptions?.documentSymbolNullCount??0); referencesEmptyCount=Number(msg.params?.initializationOptions?.referencesEmptyCount??0); initializedAt=Date.now(); return send({jsonrpc:'2.0',id:msg.id,result:{capabilities:{},serverInfo:{name:'fixture'}}},{split:true}); }
15
+ if(msg.method==='textDocument/didOpen') { if(expectedLanguageId&&msg.params?.textDocument?.languageId!==expectedLanguageId) return process.exit(7); if(msg.params?.textDocument?.uri&&!openedUris.includes(msg.params.textDocument.uri))openedUris.push(msg.params.textDocument.uri); return; }
16
+ if(msg.method==='echo') return send({jsonrpc:'2.0',method:'fixture/note',params:{seen:msg.params?.value}},{}),send({jsonrpc:'2.0',id:msg.id,result:{value:msg.params?.value}},{split:true});
17
+ if(msg.method==='queue') { queued.push(msg); if(queued.length===2){const [a,b]=queued.splice(0);process.stdout.write(Buffer.concat([frame({jsonrpc:'2.0',id:b.id,result:{value:b.params?.value}}),frame({jsonrpc:'2.0',id:a.id,result:{value:a.params?.value}})]));} return; }
18
+ if(msg.method==='textDocument/documentSymbol') { if(documentSymbolNullCount>0){documentSymbolNullCount-=1;return send({jsonrpc:'2.0',id:msg.id,result:null});} return send({jsonrpc:'2.0',id:msg.id,result:[{name:'alpha',kind:12,range:{start:{line:0,character:0},end:{line:0,character:26}},selectionRange:{start:{line:0,character:16},end:{line:0,character:21}},children:[]}]}); }
19
+ if(msg.method==='textDocument/definition') { if(!Number.isInteger(msg.params?.position?.character)) return send({jsonrpc:'2.0',id:msg.id,error:{code:-32602,message:'position.character required'}}); if(!ready())return send({jsonrpc:'2.0',id:msg.id,result:null}); if(requiredOpenCount>0&&openedUris.length<requiredOpenCount)return send({jsonrpc:'2.0',id:msg.id,result:null}); const targetUri=requiredOpenCount>0?(openedUris.find(uri=>uri!==msg.params.textDocument.uri)??msg.params.textDocument.uri):msg.params.textDocument.uri; return send({jsonrpc:'2.0',id:msg.id,result:{uri:targetUri,range:{start:{line:0,character:16},end:{line:0,character:21}}}}); }
20
+ if(msg.method==='textDocument/references') { if(!Number.isInteger(msg.params?.position?.character)) return send({jsonrpc:'2.0',id:msg.id,error:{code:-32602,message:'position.character required'}}); if(referencesEmptyCount>0){referencesEmptyCount-=1;return send({jsonrpc:'2.0',id:msg.id,result:[]});} if(requiredOpenCount>0&&openedUris.length<requiredOpenCount)return send({jsonrpc:'2.0',id:msg.id,result:[]}); const uris=requiredOpenCount>0?openedUris:[msg.params.textDocument.uri]; return send({jsonrpc:'2.0',id:msg.id,result:uris.map(uri=>({uri,range:{start:{line:0,character:16},end:{line:0,character:21}}}))}); }
21
+ if(msg.method==='textDocument/diagnostic') return send({jsonrpc:'2.0',id:msg.id,result:{kind:'full',items:[{range:{start:{line:0,character:0},end:{line:0,character:5}},severity:1,code:'fixture',message:'fixture diagnostic'}]}});
22
+ if(msg.method==='never') return;
23
+ if(msg.method==='oversize') return send({jsonrpc:'2.0',id:msg.id,result:{blob:'x'.repeat(65536)}});
24
+ if(msg.method==='crash') { setTimeout(()=>process.exit(9),5); return; }
25
+ if(msg.method==='shutdown') { if(Object.prototype.hasOwnProperty.call(msg,'params')) return send({jsonrpc:'2.0',id:msg.id,error:{code:-32602,message:'shutdown params must be omitted'}}); return send({jsonrpc:'2.0',id:msg.id,result:null}); }
26
+ if(msg.method==='exit') return process.exit(0);
27
+ if(msg.id!==undefined) return send({jsonrpc:'2.0',id:msg.id,error:{code:-32601,message:'method not found'}});
28
+ }
29
+ function drain(){
30
+ while(true){const marker=buffer.indexOf('\r\n\r\n');if(marker<0)return;const head=buffer.subarray(0,marker).toString('ascii');const match=/^Content-Length:\s*(\d+)$/mi.exec(head);if(!match)process.exit(2);const size=Number(match[1]);const start=marker+4;if(buffer.length<start+size)return;const body=buffer.subarray(start,start+size);buffer=buffer.subarray(start+size);respond(JSON.parse(body.toString('utf8')));}
31
+ }
32
+ process.stdin.on('data',chunk=>{buffer=Buffer.concat([buffer,chunk]);drain();});
33
+ process.stdin.on('end',()=>process.exit(0));
@@ -0,0 +1,4 @@
1
+ [
2
+ {"directory":".","command":"clang++ -std=c++20 -I. -c lib.cpp","file":"lib.cpp"},
3
+ {"directory":".","command":"clang++ -std=c++20 -I. -c main.cpp","file":"main.cpp"}
4
+ ]
@@ -0,0 +1,2 @@
1
+ #include "lib.hpp"
2
+ int alpha(int x) { return x + 1; }
@@ -0,0 +1,2 @@
1
+ #pragma once
2
+ int alpha(int x);
@@ -0,0 +1,2 @@
1
+ #include "lib.hpp"
2
+ int main() { return alpha(1); }
@@ -0,0 +1,2 @@
1
+ def alpha(x: int) -> int:
2
+ return x + 1
@@ -0,0 +1,2 @@
1
+ from lib import alpha
2
+ value = alpha(1)
@@ -0,0 +1,7 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "semantic_rust"
7
+ version = "0.1.0"
@@ -0,0 +1,8 @@
1
+ [package]
2
+ name = "semantic_rust"
3
+ version = "0.1.0"
4
+ edition = "2024"
5
+
6
+ [[bin]]
7
+ name = "semantic_rust_bin"
8
+ path = "src/main.rs"
@@ -0,0 +1,3 @@
1
+ pub fn alpha(x: i32) -> i32 {
2
+ x + 1
3
+ }
@@ -0,0 +1,5 @@
1
+ mod math;
2
+ use math::alpha;
3
+ fn main() {
4
+ let _value = alpha(1);
5
+ }
@@ -0,0 +1,3 @@
1
+ pub fn alpha(x: i32) -> i32 {
2
+ x + 1
3
+ }
@@ -0,0 +1 @@
1
+ {"rustc_fingerprint":488889025332616082,"outputs":{"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\nC:\\Users\\DEADBYTE\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\npacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"msvc\"\ntarget_family=\"windows\"\ntarget_feature=\"cmpxchg16b\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"windows\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"pc\"\nwindows\n","stderr":""},"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.95.0 (59807616e 2026-04-14)\nbinary: rustc\ncommit-hash: 59807616e1fa2540724bfbac14d7976d7e4a3860\ncommit-date: 2026-04-14\nhost: x86_64-pc-windows-msvc\nrelease: 1.95.0\nLLVM version: 22.1.2\n","stderr":""}},"successes":{}}
@@ -0,0 +1,3 @@
1
+ Signature: 8a477f597d28d172789f06886806bc55
2
+ # This file is a cache directory tag created by cargo.
3
+ # For information about cache directory tags see https://bford.info/cachedir/
@@ -0,0 +1 @@
1
+ This file has an mtime of when this was started.
@@ -0,0 +1 @@
1
+ {"rustc":8891013984288978370,"features":"[]","declared_features":"[]","target":1767539846898895204,"profile":3316208278650011218,"path":10763286916239946207,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug\\.fingerprint\\semantic_rust-4c168fa33c79d09c\\dep-test-lib-semantic_rust","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -0,0 +1 @@
1
+ This file has an mtime of when this was started.
@@ -0,0 +1 @@
1
+ {"rustc":8891013984288978370,"features":"[]","declared_features":"[]","target":13421206264646069821,"profile":3316208278650011218,"path":4942398508502643691,"deps":[[11869315561588691901,"semantic_rust",false,9543626721491377734]],"local":[{"CheckDepInfo":{"dep_info":"debug\\.fingerprint\\semantic_rust-5dcd474439c54a26\\dep-test-bin-semantic_rust_bin","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -0,0 +1 @@
1
+ This file has an mtime of when this was started.
@@ -0,0 +1 @@
1
+ {"rustc":8891013984288978370,"features":"[]","declared_features":"[]","target":1767539846898895204,"profile":17672942494452627365,"path":10763286916239946207,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug\\.fingerprint\\semantic_rust-6212ccd976aa3808\\dep-lib-semantic_rust","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -0,0 +1 @@
1
+ {"rustc":8891013984288978370,"features":"[]","declared_features":"[]","target":13421206264646069821,"profile":17672942494452627365,"path":4942398508502643691,"deps":[[11869315561588691901,"semantic_rust",false,9543626721491377734]],"local":[{"CheckDepInfo":{"dep_info":"debug\\.fingerprint\\semantic_rust-d741378dccdef61c\\dep-bin-semantic_rust_bin","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -0,0 +1 @@
1
+ This file has an mtime of when this was started.
@@ -0,0 +1,5 @@
1
+ D:\Projects\deadbyte-mcp-r35-release-v0.9.0\test\fixtures\semantic\rust\target\debug\deps\semantic_rust-4c168fa33c79d09c.d: src\lib.rs
2
+
3
+ D:\Projects\deadbyte-mcp-r35-release-v0.9.0\test\fixtures\semantic\rust\target\debug\deps\libsemantic_rust-4c168fa33c79d09c.rmeta: src\lib.rs
4
+
5
+ src\lib.rs:
@@ -0,0 +1,5 @@
1
+ D:\Projects\deadbyte-mcp-r35-release-v0.9.0\test\fixtures\semantic\rust\target\debug\deps\semantic_rust-6212ccd976aa3808.d: src\lib.rs
2
+
3
+ D:\Projects\deadbyte-mcp-r35-release-v0.9.0\test\fixtures\semantic\rust\target\debug\deps\libsemantic_rust-6212ccd976aa3808.rmeta: src\lib.rs
4
+
5
+ src\lib.rs:
@@ -0,0 +1,6 @@
1
+ D:\Projects\deadbyte-mcp-r35-release-v0.9.0\test\fixtures\semantic\rust\target\debug\deps\semantic_rust_bin-5dcd474439c54a26.d: src\main.rs src\math.rs
2
+
3
+ D:\Projects\deadbyte-mcp-r35-release-v0.9.0\test\fixtures\semantic\rust\target\debug\deps\libsemantic_rust_bin-5dcd474439c54a26.rmeta: src\main.rs src\math.rs
4
+
5
+ src\main.rs:
6
+ src\math.rs:
@@ -0,0 +1,6 @@
1
+ D:\Projects\deadbyte-mcp-r35-release-v0.9.0\test\fixtures\semantic\rust\target\debug\deps\semantic_rust_bin-d741378dccdef61c.d: src\main.rs src\math.rs
2
+
3
+ D:\Projects\deadbyte-mcp-r35-release-v0.9.0\test\fixtures\semantic\rust\target\debug\deps\libsemantic_rust_bin-d741378dccdef61c.rmeta: src\main.rs src\math.rs
4
+
5
+ src\main.rs:
6
+ src\math.rs:
@@ -0,0 +1 @@
1
+ Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.05s
@@ -0,0 +1,5 @@
1
+ {"reason":"compiler-artifact","package_id":"path+file:///D:/Projects/deadbyte-mcp-r35-release-v0.9.0/test/fixtures/semantic/rust#semantic_rust@0.1.0","manifest_path":"D:\\Projects\\deadbyte-mcp-r35-release-v0.9.0\\test\\fixtures\\semantic\\rust\\Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"semantic_rust","src_path":"D:\\Projects\\deadbyte-mcp-r35-release-v0.9.0\\test\\fixtures\\semantic\\rust\\src\\lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["D:\\Projects\\deadbyte-mcp-r35-release-v0.9.0\\test\\fixtures\\semantic\\rust\\target\\debug\\deps\\libsemantic_rust-6212ccd976aa3808.rmeta"],"executable":null,"fresh":true}
2
+ {"reason":"compiler-artifact","package_id":"path+file:///D:/Projects/deadbyte-mcp-r35-release-v0.9.0/test/fixtures/semantic/rust#semantic_rust@0.1.0","manifest_path":"D:\\Projects\\deadbyte-mcp-r35-release-v0.9.0\\test\\fixtures\\semantic\\rust\\Cargo.toml","target":{"kind":["bin"],"crate_types":["bin"],"name":"semantic_rust_bin","src_path":"D:\\Projects\\deadbyte-mcp-r35-release-v0.9.0\\test\\fixtures\\semantic\\rust\\src\\main.rs","edition":"2024","doc":true,"doctest":false,"test":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":false},"features":[],"filenames":["D:\\Projects\\deadbyte-mcp-r35-release-v0.9.0\\test\\fixtures\\semantic\\rust\\target\\debug\\deps\\libsemantic_rust_bin-d741378dccdef61c.rmeta"],"executable":null,"fresh":true}
3
+ {"reason":"compiler-artifact","package_id":"path+file:///D:/Projects/deadbyte-mcp-r35-release-v0.9.0/test/fixtures/semantic/rust#semantic_rust@0.1.0","manifest_path":"D:\\Projects\\deadbyte-mcp-r35-release-v0.9.0\\test\\fixtures\\semantic\\rust\\Cargo.toml","target":{"kind":["bin"],"crate_types":["bin"],"name":"semantic_rust_bin","src_path":"D:\\Projects\\deadbyte-mcp-r35-release-v0.9.0\\test\\fixtures\\semantic\\rust\\src\\main.rs","edition":"2024","doc":true,"doctest":false,"test":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":true},"features":[],"filenames":["D:\\Projects\\deadbyte-mcp-r35-release-v0.9.0\\test\\fixtures\\semantic\\rust\\target\\debug\\deps\\libsemantic_rust_bin-5dcd474439c54a26.rmeta"],"executable":null,"fresh":true}
4
+ {"reason":"compiler-artifact","package_id":"path+file:///D:/Projects/deadbyte-mcp-r35-release-v0.9.0/test/fixtures/semantic/rust#semantic_rust@0.1.0","manifest_path":"D:\\Projects\\deadbyte-mcp-r35-release-v0.9.0\\test\\fixtures\\semantic\\rust\\Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"semantic_rust","src_path":"D:\\Projects\\deadbyte-mcp-r35-release-v0.9.0\\test\\fixtures\\semantic\\rust\\src\\lib.rs","edition":"2024","doc":true,"doctest":true,"test":true},"profile":{"opt_level":"0","debuginfo":2,"debug_assertions":true,"overflow_checks":true,"test":true},"features":[],"filenames":["D:\\Projects\\deadbyte-mcp-r35-release-v0.9.0\\test\\fixtures\\semantic\\rust\\target\\debug\\deps\\libsemantic_rust-4c168fa33c79d09c.rmeta"],"executable":null,"fresh":true}
5
+ {"reason":"build-finished","success":true}
@@ -0,0 +1,3 @@
1
+ export function alpha(value: number): number {
2
+ return value + 1;
3
+ }
@@ -0,0 +1,2 @@
1
+ import { alpha } from './lib';
2
+ export const result = alpha(41);
@@ -0,0 +1,14 @@
1
+ import { McpServer } from '@modelcontextprotocol/server';
2
+ import { serveStdio } from '@modelcontextprotocol/server/stdio';
3
+ import * as z from 'zod/v4';
4
+
5
+ serveStdio(()=>{
6
+ const server=new McpServer({name:'surface-fixture',version:'1.0.0'});
7
+ const outputSchema=z.strictObject({status:z.literal('ok')});
8
+ server.registerTool('alpha',{
9
+ description:'fixture',
10
+ inputSchema:z.strictObject({value:z.string()}),
11
+ outputSchema
12
+ },async()=>({content:[{type:'text',text:'ok'}],structuredContent:{status:'ok'}}));
13
+ return server;
14
+ },{legacy:'reject'});