deadbyte-mcp 0.8.7

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 (1390) hide show
  1. package/DEADBYTE-MCP-R27-FINAL/R27-ADMIN-CLOSURE.json +22 -0
  2. package/DEADBYTE-MCP-R27-FINAL/R27-CLEANUP-FINAL-RECEIPT.json +24 -0
  3. package/DEADBYTE-MCP-R27-FINAL/R27-FINAL-CLOSURE.json +188 -0
  4. package/DEADBYTE-MCP-R27-FINAL/R27-SLOT-UPDATE-RECEIPT.json +109 -0
  5. package/DEADBYTE-MCP.cmd +4 -0
  6. package/MANIFEST.SHA256 +1389 -0
  7. package/README.txt +260 -0
  8. package/bin/WORKER-REGISTRY.txt +12 -0
  9. package/bin/appcontainer-stage.exe +0 -0
  10. package/bin/appcontainer-stage.obj +0 -0
  11. package/bin/bootstrap-advapi32.exe +0 -0
  12. package/bin/bootstrap-advapi32.obj +0 -0
  13. package/bin/bootstrap-exitcode.exe +0 -0
  14. package/bin/bootstrap-exitcode.obj +0 -0
  15. package/bin/bootstrap-kernel32.exe +0 -0
  16. package/bin/bootstrap-kernel32.obj +0 -0
  17. package/bin/child-control-probe.exe +0 -0
  18. package/bin/child-control-probe.obj +0 -0
  19. package/bin/child-control-stage.exe +0 -0
  20. package/bin/child-control-stage.obj +0 -0
  21. package/bin/contained-reverse-worker.exe +0 -0
  22. package/bin/contained-reverse-worker.obj +0 -0
  23. package/bin/contained-transform-worker.exe +0 -0
  24. package/bin/contained-transform-worker.obj +0 -0
  25. package/bin/containment-probe.exe +0 -0
  26. package/bin/containment-probe.obj +0 -0
  27. package/bin/deadbyte-contain.exe +0 -0
  28. package/bin/deadbyte-contain.obj +0 -0
  29. package/bin/deadbyte-exec.exe +0 -0
  30. package/bin/deadbyte-exec.obj +0 -0
  31. package/bin/deadbyte-process-host.exe +0 -0
  32. package/bin/deadbyte-process-host.obj +0 -0
  33. package/bin/deadbyte-tunnel-host.exe +0 -0
  34. package/bin/deadbyte-tunnel-host.obj +0 -0
  35. package/conpty-input-observer.obj +0 -0
  36. package/controller/DEADBYTE-MCP.cmd +5 -0
  37. package/controller/README.TXT +127 -0
  38. package/controller/deadbyte-controller.config.psd1.example +60 -0
  39. package/controller/deadbyte-controller.ps1 +1090 -0
  40. package/controller/deadbyte-host-policy.json.example +33 -0
  41. package/controller/deadbyte-process-policy.json +47 -0
  42. package/docs/ARCHITECTURE.md +168 -0
  43. package/docs/AUTHORITY.md +56 -0
  44. package/docs/CHILD-CONTROL.md +31 -0
  45. package/docs/CONSTRUCTION-LADDER.md +84 -0
  46. package/docs/CONTAINMENT.md +92 -0
  47. package/docs/EXECUTION.md +330 -0
  48. package/docs/NETWORK.md +64 -0
  49. package/docs/R221-STRICT-OUTPUT-CONTRACT.md +24 -0
  50. package/docs/REFERENCES.txt +117 -0
  51. package/docs/TRUST.md +46 -0
  52. package/docs/V070-HARDENING.md +48 -0
  53. package/docs/V071-HOST-PLANE.md +113 -0
  54. package/docs/V073-TUNNEL-STDIO-COMPAT.md +37 -0
  55. package/docs/V080-AGENT-RUNTIME.md +101 -0
  56. package/docs/V080-R23-CODING-AGENT.md +50 -0
  57. package/docs/V080-R24-AUTONOMOUS-PRODUCTION.md +74 -0
  58. package/docs/V081-R25-MANUS-CONTROL-SEMANTICS.md +145 -0
  59. package/docs/V082-R26-RUNTIME-SELF-UPDATE.md +86 -0
  60. package/docs/V083-R27-IMMUTABLE-RELEASE-SLOTS.md +55 -0
  61. package/docs/V084-R28-PERSISTENT-NAMED-TUNNEL.md +57 -0
  62. package/docs/V085-R29-MACHINE-IDENTITY.md +99 -0
  63. package/docs/superpowers/plans/2026-09-14-r30-process-plane.md +178 -0
  64. package/docs/superpowers/plans/2026-09-14-r31-process-prerequisite.md +132 -0
  65. package/docs/superpowers/plans/2026-09-15-r33-audit-chain-npx.md +132 -0
  66. package/docs/superpowers/specs/2026-09-14-r30-r33-machine-control-design.md +214 -0
  67. package/docs/superpowers/specs/2026-09-14-r31-r33-final-baseline-successor-design.md +133 -0
  68. package/docs/superpowers/specs/2026-09-15-r33-audit-chain-npx-design.md +145 -0
  69. package/mcp-server.mjs +1 -0
  70. package/miniconpty.obj +0 -0
  71. package/native/appcontainer-stage.cpp +353 -0
  72. package/native/bootstrap-advapi32.cpp +70 -0
  73. package/native/bootstrap-exitcode.cpp +6 -0
  74. package/native/bootstrap-kernel32.cpp +47 -0
  75. package/native/child-control-probe.cpp +67 -0
  76. package/native/child-control-stage.cpp +347 -0
  77. package/native/contained-network-proof.h +118 -0
  78. package/native/contained-reverse-worker.cpp +299 -0
  79. package/native/contained-transform-worker.cpp +312 -0
  80. package/native/containment-probe.cpp +269 -0
  81. package/native/deadbyte-contain.cpp +625 -0
  82. package/native/deadbyte-exec.cpp +966 -0
  83. package/native/deadbyte-process-host.cpp +340 -0
  84. package/native/deadbyte-tunnel-host.cpp +109 -0
  85. package/node_modules/@modelcontextprotocol/client/LICENSE +216 -0
  86. package/node_modules/@modelcontextprotocol/client/README.md +26 -0
  87. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-1b6pVpkg.cjs +7531 -0
  88. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-1b6pVpkg.cjs.map +1 -0
  89. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-97rDpkRx.mjs +7514 -0
  90. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-97rDpkRx.mjs.map +1 -0
  91. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-FOQRM7up.d.cts +1071 -0
  92. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-FOQRM7up.d.cts.map +1 -0
  93. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-INpkxUi1.d.mts +1071 -0
  94. package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-INpkxUi1.d.mts.map +1 -0
  95. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-B3ZJEoRM.d.mts +74 -0
  96. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-B3ZJEoRM.d.mts.map +1 -0
  97. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-B3dvjU3F.cjs +986 -0
  98. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-B3dvjU3F.cjs.map +1 -0
  99. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-BylNJ1R5.mjs +981 -0
  100. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-BylNJ1R5.mjs.map +1 -0
  101. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-doTkZbTr.d.cts +74 -0
  102. package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-doTkZbTr.d.cts.map +1 -0
  103. package/node_modules/@modelcontextprotocol/client/dist/chunk-Bnu9O96Y.cjs +60 -0
  104. package/node_modules/@modelcontextprotocol/client/dist/chunk-Br0eD_fh.mjs +42 -0
  105. package/node_modules/@modelcontextprotocol/client/dist/dialects-BGO_ZrYF.cjs +46 -0
  106. package/node_modules/@modelcontextprotocol/client/dist/dialects-BGO_ZrYF.cjs.map +1 -0
  107. package/node_modules/@modelcontextprotocol/client/dist/dialects-BOhdv1Fc.mjs +34 -0
  108. package/node_modules/@modelcontextprotocol/client/dist/dialects-BOhdv1Fc.mjs.map +1 -0
  109. package/node_modules/@modelcontextprotocol/client/dist/index-CHhhk6PQ.d.cts +2526 -0
  110. package/node_modules/@modelcontextprotocol/client/dist/index-CHhhk6PQ.d.cts.map +1 -0
  111. package/node_modules/@modelcontextprotocol/client/dist/index-D4xIIEF6.d.mts +2523 -0
  112. package/node_modules/@modelcontextprotocol/client/dist/index-D4xIIEF6.d.mts.map +1 -0
  113. package/node_modules/@modelcontextprotocol/client/dist/index.cjs +5690 -0
  114. package/node_modules/@modelcontextprotocol/client/dist/index.cjs.map +1 -0
  115. package/node_modules/@modelcontextprotocol/client/dist/index.d.cts +3252 -0
  116. package/node_modules/@modelcontextprotocol/client/dist/index.d.cts.map +1 -0
  117. package/node_modules/@modelcontextprotocol/client/dist/index.d.mts +3252 -0
  118. package/node_modules/@modelcontextprotocol/client/dist/index.d.mts.map +1 -0
  119. package/node_modules/@modelcontextprotocol/client/dist/index.mjs +5481 -0
  120. package/node_modules/@modelcontextprotocol/client/dist/index.mjs.map +1 -0
  121. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.cjs +14 -0
  122. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.cjs.map +1 -0
  123. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.cts +13 -0
  124. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.cts.map +1 -0
  125. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.mts +13 -0
  126. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.mts.map +1 -0
  127. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.mjs +13 -0
  128. package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.mjs.map +1 -0
  129. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.cjs +14 -0
  130. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.cjs.map +1 -0
  131. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.cts +13 -0
  132. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.cts.map +1 -0
  133. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.mts +13 -0
  134. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.mts.map +1 -0
  135. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.mjs +13 -0
  136. package/node_modules/@modelcontextprotocol/client/dist/shimsNode.mjs.map +1 -0
  137. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs +21 -0
  138. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs.map +1 -0
  139. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.cts +13 -0
  140. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.cts.map +1 -0
  141. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.mts +13 -0
  142. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.mts.map +1 -0
  143. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs +20 -0
  144. package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs.map +1 -0
  145. package/node_modules/@modelcontextprotocol/client/dist/src-D_zzAWoS.mjs +7063 -0
  146. package/node_modules/@modelcontextprotocol/client/dist/src-D_zzAWoS.mjs.map +1 -0
  147. package/node_modules/@modelcontextprotocol/client/dist/src-NAgB4Mp8.cjs +7431 -0
  148. package/node_modules/@modelcontextprotocol/client/dist/src-NAgB4Mp8.cjs.map +1 -0
  149. package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs +217 -0
  150. package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs.map +1 -0
  151. package/node_modules/@modelcontextprotocol/client/dist/stdio.d.cts +96 -0
  152. package/node_modules/@modelcontextprotocol/client/dist/stdio.d.cts.map +1 -0
  153. package/node_modules/@modelcontextprotocol/client/dist/stdio.d.mts +96 -0
  154. package/node_modules/@modelcontextprotocol/client/dist/stdio.d.mts.map +1 -0
  155. package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs +212 -0
  156. package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs.map +1 -0
  157. package/node_modules/@modelcontextprotocol/client/dist/types-DsbMXNFL.d.cts +1099 -0
  158. package/node_modules/@modelcontextprotocol/client/dist/types-DsbMXNFL.d.cts.map +1 -0
  159. package/node_modules/@modelcontextprotocol/client/dist/types-mS0yxCL0.d.mts +1099 -0
  160. package/node_modules/@modelcontextprotocol/client/dist/types-mS0yxCL0.d.mts.map +1 -0
  161. package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.cjs +5 -0
  162. package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.d.cts +2 -0
  163. package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.d.mts +2 -0
  164. package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.mjs +3 -0
  165. package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.cjs +3 -0
  166. package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.d.cts +2 -0
  167. package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.d.mts +2 -0
  168. package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.mjs +3 -0
  169. package/node_modules/@modelcontextprotocol/client/package.json +166 -0
  170. package/node_modules/@modelcontextprotocol/core/LICENSE +216 -0
  171. package/node_modules/@modelcontextprotocol/core/README.md +40 -0
  172. package/node_modules/@modelcontextprotocol/core/dist/auth-BWdKR39I.d.mts +8501 -0
  173. package/node_modules/@modelcontextprotocol/core/dist/auth-BWdKR39I.d.mts.map +1 -0
  174. package/node_modules/@modelcontextprotocol/core/dist/auth-CUe6YdwF.mjs +1678 -0
  175. package/node_modules/@modelcontextprotocol/core/dist/auth-CUe6YdwF.mjs.map +1 -0
  176. package/node_modules/@modelcontextprotocol/core/dist/auth-CfDMXiII.cjs +2899 -0
  177. package/node_modules/@modelcontextprotocol/core/dist/auth-CfDMXiII.cjs.map +1 -0
  178. package/node_modules/@modelcontextprotocol/core/dist/auth-hYtaIUZm.d.cts +8501 -0
  179. package/node_modules/@modelcontextprotocol/core/dist/auth-hYtaIUZm.d.cts.map +1 -0
  180. package/node_modules/@modelcontextprotocol/core/dist/index.cjs +175 -0
  181. package/node_modules/@modelcontextprotocol/core/dist/index.d.cts +2 -0
  182. package/node_modules/@modelcontextprotocol/core/dist/index.d.mts +2 -0
  183. package/node_modules/@modelcontextprotocol/core/dist/index.mjs +3 -0
  184. package/node_modules/@modelcontextprotocol/core/dist/internal.cjs +201 -0
  185. package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts +99 -0
  186. package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts.map +1 -0
  187. package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts +99 -0
  188. package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts.map +1 -0
  189. package/node_modules/@modelcontextprotocol/core/dist/internal.mjs +3 -0
  190. package/node_modules/@modelcontextprotocol/core/package.json +85 -0
  191. package/node_modules/@modelcontextprotocol/server/LICENSE +216 -0
  192. package/node_modules/@modelcontextprotocol/server/README.md +30 -0
  193. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CEoC__sr.mjs +7514 -0
  194. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CEoC__sr.mjs.map +1 -0
  195. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CgI-5L6O.d.mts +1071 -0
  196. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CgI-5L6O.d.mts.map +1 -0
  197. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-FOQRM7up.d.cts +1071 -0
  198. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-FOQRM7up.d.cts.map +1 -0
  199. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-ZaoO9afR.cjs +7531 -0
  200. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-ZaoO9afR.cjs.map +1 -0
  201. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BwbPzsdI.cjs +986 -0
  202. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BwbPzsdI.cjs.map +1 -0
  203. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-C03CSigr.d.mts +74 -0
  204. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-C03CSigr.d.mts.map +1 -0
  205. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-doTkZbTr.d.cts +74 -0
  206. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-doTkZbTr.d.cts.map +1 -0
  207. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-p3WaZPqB.mjs +981 -0
  208. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-p3WaZPqB.mjs.map +1 -0
  209. package/node_modules/@modelcontextprotocol/server/dist/chunk-Bnu9O96Y.cjs +60 -0
  210. package/node_modules/@modelcontextprotocol/server/dist/chunk-Br0eD_fh.mjs +42 -0
  211. package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-CLhGwQTn.d.mts +4043 -0
  212. package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-CLhGwQTn.d.mts.map +1 -0
  213. package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-dBHMsxwf.d.cts +4045 -0
  214. package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-dBHMsxwf.d.cts.map +1 -0
  215. package/node_modules/@modelcontextprotocol/server/dist/dialects-D8eXzoGv.cjs +46 -0
  216. package/node_modules/@modelcontextprotocol/server/dist/dialects-D8eXzoGv.cjs.map +1 -0
  217. package/node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs +34 -0
  218. package/node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs.map +1 -0
  219. package/node_modules/@modelcontextprotocol/server/dist/index.cjs +2055 -0
  220. package/node_modules/@modelcontextprotocol/server/dist/index.cjs.map +1 -0
  221. package/node_modules/@modelcontextprotocol/server/dist/index.d.cts +739 -0
  222. package/node_modules/@modelcontextprotocol/server/dist/index.d.cts.map +1 -0
  223. package/node_modules/@modelcontextprotocol/server/dist/index.d.mts +739 -0
  224. package/node_modules/@modelcontextprotocol/server/dist/index.d.mts.map +1 -0
  225. package/node_modules/@modelcontextprotocol/server/dist/index.mjs +1870 -0
  226. package/node_modules/@modelcontextprotocol/server/dist/index.mjs.map +1 -0
  227. package/node_modules/@modelcontextprotocol/server/dist/mcp-D7GmuPnv.cjs +2022 -0
  228. package/node_modules/@modelcontextprotocol/server/dist/mcp-D7GmuPnv.cjs.map +1 -0
  229. package/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs +1931 -0
  230. package/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs.map +1 -0
  231. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs +23 -0
  232. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs.map +1 -0
  233. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts +11 -0
  234. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts.map +1 -0
  235. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts +11 -0
  236. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts.map +1 -0
  237. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs +22 -0
  238. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs.map +1 -0
  239. package/node_modules/@modelcontextprotocol/server/dist/shimsNode.cjs +12 -0
  240. package/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.cts +3 -0
  241. package/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.mts +3 -0
  242. package/node_modules/@modelcontextprotocol/server/dist/shimsNode.mjs +4 -0
  243. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs +30 -0
  244. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs.map +1 -0
  245. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts +10 -0
  246. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts.map +1 -0
  247. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts +10 -0
  248. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts.map +1 -0
  249. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs +29 -0
  250. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs.map +1 -0
  251. package/node_modules/@modelcontextprotocol/server/dist/src-CX2iR2pK.mjs +7606 -0
  252. package/node_modules/@modelcontextprotocol/server/dist/src-CX2iR2pK.mjs.map +1 -0
  253. package/node_modules/@modelcontextprotocol/server/dist/src-STyD_Vvf.cjs +8104 -0
  254. package/node_modules/@modelcontextprotocol/server/dist/src-STyD_Vvf.cjs.map +1 -0
  255. package/node_modules/@modelcontextprotocol/server/dist/stdio.cjs +564 -0
  256. package/node_modules/@modelcontextprotocol/server/dist/stdio.cjs.map +1 -0
  257. package/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts +107 -0
  258. package/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts.map +1 -0
  259. package/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts +107 -0
  260. package/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts.map +1 -0
  261. package/node_modules/@modelcontextprotocol/server/dist/stdio.mjs +562 -0
  262. package/node_modules/@modelcontextprotocol/server/dist/stdio.mjs.map +1 -0
  263. package/node_modules/@modelcontextprotocol/server/dist/types-DUs7mGBv.d.mts +1099 -0
  264. package/node_modules/@modelcontextprotocol/server/dist/types-DUs7mGBv.d.mts.map +1 -0
  265. package/node_modules/@modelcontextprotocol/server/dist/types-DsbMXNFL.d.cts +1099 -0
  266. package/node_modules/@modelcontextprotocol/server/dist/types-DsbMXNFL.d.cts.map +1 -0
  267. package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.cjs +5 -0
  268. package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.cts +2 -0
  269. package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.mts +2 -0
  270. package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.mjs +3 -0
  271. package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.cjs +3 -0
  272. package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.cts +2 -0
  273. package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.mts +2 -0
  274. package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.mjs +3 -0
  275. package/node_modules/@modelcontextprotocol/server/package.json +160 -0
  276. package/node_modules/cross-spawn/LICENSE +21 -0
  277. package/node_modules/cross-spawn/README.md +89 -0
  278. package/node_modules/cross-spawn/index.js +39 -0
  279. package/node_modules/cross-spawn/lib/enoent.js +59 -0
  280. package/node_modules/cross-spawn/lib/parse.js +91 -0
  281. package/node_modules/cross-spawn/lib/util/escape.js +47 -0
  282. package/node_modules/cross-spawn/lib/util/readShebang.js +23 -0
  283. package/node_modules/cross-spawn/lib/util/resolveCommand.js +52 -0
  284. package/node_modules/cross-spawn/package.json +73 -0
  285. package/node_modules/eventsource/LICENSE +22 -0
  286. package/node_modules/eventsource/README.md +167 -0
  287. package/node_modules/eventsource/dist/index.cjs +273 -0
  288. package/node_modules/eventsource/dist/index.cjs.map +1 -0
  289. package/node_modules/eventsource/dist/index.d.cts +332 -0
  290. package/node_modules/eventsource/dist/index.d.ts +332 -0
  291. package/node_modules/eventsource/dist/index.js +273 -0
  292. package/node_modules/eventsource/dist/index.js.map +1 -0
  293. package/node_modules/eventsource/package.json +130 -0
  294. package/node_modules/eventsource/src/EventSource.ts +596 -0
  295. package/node_modules/eventsource/src/errors.ts +141 -0
  296. package/node_modules/eventsource/src/index.ts +3 -0
  297. package/node_modules/eventsource/src/types.ts +152 -0
  298. package/node_modules/eventsource-parser/LICENSE +21 -0
  299. package/node_modules/eventsource-parser/README.md +157 -0
  300. package/node_modules/eventsource-parser/dist/index.cjs +177 -0
  301. package/node_modules/eventsource-parser/dist/index.cjs.map +1 -0
  302. package/node_modules/eventsource-parser/dist/index.d.cts +169 -0
  303. package/node_modules/eventsource-parser/dist/index.d.ts +169 -0
  304. package/node_modules/eventsource-parser/dist/index.js +177 -0
  305. package/node_modules/eventsource-parser/dist/index.js.map +1 -0
  306. package/node_modules/eventsource-parser/dist/stream.cjs +29 -0
  307. package/node_modules/eventsource-parser/dist/stream.cjs.map +1 -0
  308. package/node_modules/eventsource-parser/dist/stream.d.cts +134 -0
  309. package/node_modules/eventsource-parser/dist/stream.d.ts +134 -0
  310. package/node_modules/eventsource-parser/dist/stream.js +30 -0
  311. package/node_modules/eventsource-parser/dist/stream.js.map +1 -0
  312. package/node_modules/eventsource-parser/package.json +92 -0
  313. package/node_modules/eventsource-parser/src/errors.ts +44 -0
  314. package/node_modules/eventsource-parser/src/index.ts +8 -0
  315. package/node_modules/eventsource-parser/src/parse.ts +439 -0
  316. package/node_modules/eventsource-parser/src/stream.ts +107 -0
  317. package/node_modules/eventsource-parser/src/types.ts +122 -0
  318. package/node_modules/eventsource-parser/stream.js +2 -0
  319. package/node_modules/isexe/.npmignore +2 -0
  320. package/node_modules/isexe/LICENSE +15 -0
  321. package/node_modules/isexe/README.md +51 -0
  322. package/node_modules/isexe/index.js +57 -0
  323. package/node_modules/isexe/mode.js +41 -0
  324. package/node_modules/isexe/package.json +31 -0
  325. package/node_modules/isexe/test/basic.js +221 -0
  326. package/node_modules/isexe/windows.js +42 -0
  327. package/node_modules/jose/LICENSE.md +21 -0
  328. package/node_modules/jose/README.md +150 -0
  329. package/node_modules/jose/dist/types/index.d.ts +56 -0
  330. package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +37 -0
  331. package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +54 -0
  332. package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +37 -0
  333. package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +72 -0
  334. package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +43 -0
  335. package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +74 -0
  336. package/node_modules/jose/dist/types/jwk/embedded.d.ts +13 -0
  337. package/node_modules/jose/dist/types/jwk/thumbprint.d.ts +17 -0
  338. package/node_modules/jose/dist/types/jwks/local.d.ts +20 -0
  339. package/node_modules/jose/dist/types/jwks/remote.d.ts +106 -0
  340. package/node_modules/jose/dist/types/jws/compact/sign.d.ts +25 -0
  341. package/node_modules/jose/dist/types/jws/compact/verify.d.ts +37 -0
  342. package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +31 -0
  343. package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +37 -0
  344. package/node_modules/jose/dist/types/jws/general/sign.d.ts +52 -0
  345. package/node_modules/jose/dist/types/jws/general/verify.d.ts +44 -0
  346. package/node_modules/jose/dist/types/jwt/decrypt.d.ts +41 -0
  347. package/node_modules/jose/dist/types/jwt/encrypt.d.ts +62 -0
  348. package/node_modules/jose/dist/types/jwt/sign.d.ts +26 -0
  349. package/node_modules/jose/dist/types/jwt/unsecured.d.ts +28 -0
  350. package/node_modules/jose/dist/types/jwt/verify.d.ts +38 -0
  351. package/node_modules/jose/dist/types/key/export.d.ts +19 -0
  352. package/node_modules/jose/dist/types/key/generate_key_pair.d.ts +40 -0
  353. package/node_modules/jose/dist/types/key/generate_secret.d.ts +37 -0
  354. package/node_modules/jose/dist/types/key/import.d.ts +73 -0
  355. package/node_modules/jose/dist/types/types.d.ts +871 -0
  356. package/node_modules/jose/dist/types/util/base64url.d.ts +16 -0
  357. package/node_modules/jose/dist/types/util/decode_jwt.d.ts +10 -0
  358. package/node_modules/jose/dist/types/util/decode_protected_header.d.ts +9 -0
  359. package/node_modules/jose/dist/types/util/errors.d.ts +220 -0
  360. package/node_modules/jose/dist/webapi/index.js +32 -0
  361. package/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +9 -0
  362. package/node_modules/jose/dist/webapi/jwe/compact/encrypt.js +49 -0
  363. package/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +15 -0
  364. package/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +65 -0
  365. package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +51 -0
  366. package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +177 -0
  367. package/node_modules/jose/dist/webapi/jwk/embedded.js +33 -0
  368. package/node_modules/jose/dist/webapi/jwk/thumbprint.js +74 -0
  369. package/node_modules/jose/dist/webapi/jwks/local.js +70 -0
  370. package/node_modules/jose/dist/webapi/jwks/remote.js +149 -0
  371. package/node_modules/jose/dist/webapi/jws/compact/sign.js +22 -0
  372. package/node_modules/jose/dist/webapi/jws/compact/verify.js +9 -0
  373. package/node_modules/jose/dist/webapi/jws/flattened/sign.js +32 -0
  374. package/node_modules/jose/dist/webapi/jws/flattened/verify.js +25 -0
  375. package/node_modules/jose/dist/webapi/jws/general/sign.js +76 -0
  376. package/node_modules/jose/dist/webapi/jws/general/verify.js +74 -0
  377. package/node_modules/jose/dist/webapi/jwt/decrypt.js +21 -0
  378. package/node_modules/jose/dist/webapi/jwt/encrypt.js +72 -0
  379. package/node_modules/jose/dist/webapi/jwt/sign.js +18 -0
  380. package/node_modules/jose/dist/webapi/jwt/unsecured.js +43 -0
  381. package/node_modules/jose/dist/webapi/jwt/verify.js +15 -0
  382. package/node_modules/jose/dist/webapi/key/export.js +44 -0
  383. package/node_modules/jose/dist/webapi/key/generate_key_pair.js +52 -0
  384. package/node_modules/jose/dist/webapi/key/generate_secret.js +41 -0
  385. package/node_modules/jose/dist/webapi/key/import.js +61 -0
  386. package/node_modules/jose/dist/webapi/lib/asn1.js +179 -0
  387. package/node_modules/jose/dist/webapi/lib/base64.js +22 -0
  388. package/node_modules/jose/dist/webapi/lib/buffer_utils.js +44 -0
  389. package/node_modules/jose/dist/webapi/lib/content_encryption.js +134 -0
  390. package/node_modules/jose/dist/webapi/lib/crypto_key.js +28 -0
  391. package/node_modules/jose/dist/webapi/lib/deflate.js +52 -0
  392. package/node_modules/jose/dist/webapi/lib/helpers.js +42 -0
  393. package/node_modules/jose/dist/webapi/lib/invalid_key_input.js +26 -0
  394. package/node_modules/jose/dist/webapi/lib/is_key_like.js +17 -0
  395. package/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +107 -0
  396. package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +243 -0
  397. package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +142 -0
  398. package/node_modules/jose/dist/webapi/lib/jwk_metadata.js +20 -0
  399. package/node_modules/jose/dist/webapi/lib/jwk_to_key.js +17 -0
  400. package/node_modules/jose/dist/webapi/lib/jws_algorithms.js +73 -0
  401. package/node_modules/jose/dist/webapi/lib/jws_sign.js +85 -0
  402. package/node_modules/jose/dist/webapi/lib/jws_verify.js +139 -0
  403. package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +232 -0
  404. package/node_modules/jose/dist/webapi/lib/key.js +147 -0
  405. package/node_modules/jose/dist/webapi/lib/key_algorithm.js +10 -0
  406. package/node_modules/jose/dist/webapi/lib/key_descriptor.js +7 -0
  407. package/node_modules/jose/dist/webapi/lib/key_management.js +262 -0
  408. package/node_modules/jose/dist/webapi/lib/key_options.js +6 -0
  409. package/node_modules/jose/dist/webapi/lib/options.js +74 -0
  410. package/node_modules/jose/dist/webapi/lib/signing.js +26 -0
  411. package/node_modules/jose/dist/webapi/lib/type_checks.js +33 -0
  412. package/node_modules/jose/dist/webapi/util/base64url.js +39 -0
  413. package/node_modules/jose/dist/webapi/util/decode_jwt.js +32 -0
  414. package/node_modules/jose/dist/webapi/util/decode_protected_header.js +24 -0
  415. package/node_modules/jose/dist/webapi/util/errors.js +99 -0
  416. package/node_modules/jose/package.json +198 -0
  417. package/node_modules/path-key/index.d.ts +40 -0
  418. package/node_modules/path-key/index.js +16 -0
  419. package/node_modules/path-key/license +9 -0
  420. package/node_modules/path-key/package.json +39 -0
  421. package/node_modules/path-key/readme.md +61 -0
  422. package/node_modules/pkce-challenge/CHANGELOG.md +114 -0
  423. package/node_modules/pkce-challenge/LICENSE +21 -0
  424. package/node_modules/pkce-challenge/README.md +55 -0
  425. package/node_modules/pkce-challenge/dist/index.browser.d.ts +19 -0
  426. package/node_modules/pkce-challenge/dist/index.browser.js +75 -0
  427. package/node_modules/pkce-challenge/dist/index.node.cjs +83 -0
  428. package/node_modules/pkce-challenge/dist/index.node.d.cts +19 -0
  429. package/node_modules/pkce-challenge/dist/index.node.d.ts +19 -0
  430. package/node_modules/pkce-challenge/dist/index.node.js +78 -0
  431. package/node_modules/pkce-challenge/package.json +59 -0
  432. package/node_modules/shebang-command/index.js +19 -0
  433. package/node_modules/shebang-command/license +9 -0
  434. package/node_modules/shebang-command/package.json +34 -0
  435. package/node_modules/shebang-command/readme.md +34 -0
  436. package/node_modules/shebang-regex/index.d.ts +22 -0
  437. package/node_modules/shebang-regex/index.js +2 -0
  438. package/node_modules/shebang-regex/license +9 -0
  439. package/node_modules/shebang-regex/package.json +35 -0
  440. package/node_modules/shebang-regex/readme.md +33 -0
  441. package/node_modules/which/LICENSE +15 -0
  442. package/node_modules/which/README.md +54 -0
  443. package/node_modules/which/bin/node-which +52 -0
  444. package/node_modules/which/package.json +43 -0
  445. package/node_modules/which/which.js +125 -0
  446. package/node_modules/zod/LICENSE +21 -0
  447. package/node_modules/zod/README.md +191 -0
  448. package/node_modules/zod/index.cjs +33 -0
  449. package/node_modules/zod/index.d.cts +4 -0
  450. package/node_modules/zod/index.d.ts +4 -0
  451. package/node_modules/zod/index.js +4 -0
  452. package/node_modules/zod/locales/index.cjs +17 -0
  453. package/node_modules/zod/locales/index.d.cts +1 -0
  454. package/node_modules/zod/locales/index.d.ts +1 -0
  455. package/node_modules/zod/locales/index.js +1 -0
  456. package/node_modules/zod/locales/package.json +7 -0
  457. package/node_modules/zod/mini/index.cjs +32 -0
  458. package/node_modules/zod/mini/index.d.cts +3 -0
  459. package/node_modules/zod/mini/index.d.ts +3 -0
  460. package/node_modules/zod/mini/index.js +3 -0
  461. package/node_modules/zod/mini/package.json +7 -0
  462. package/node_modules/zod/package.json +135 -0
  463. package/node_modules/zod/src/index.ts +4 -0
  464. package/node_modules/zod/src/locales/index.ts +1 -0
  465. package/node_modules/zod/src/mini/index.ts +3 -0
  466. package/node_modules/zod/src/v3/ZodError.ts +330 -0
  467. package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  468. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  469. package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  470. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  471. package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  472. package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  473. package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  474. package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  475. package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  476. package/node_modules/zod/src/v3/errors.ts +13 -0
  477. package/node_modules/zod/src/v3/external.ts +6 -0
  478. package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  479. package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  480. package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  481. package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  482. package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  483. package/node_modules/zod/src/v3/helpers/util.ts +224 -0
  484. package/node_modules/zod/src/v3/index.ts +4 -0
  485. package/node_modules/zod/src/v3/locales/en.ts +124 -0
  486. package/node_modules/zod/src/v3/standard-schema.ts +113 -0
  487. package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  488. package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  489. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  490. package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  491. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  492. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  493. package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  494. package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  495. package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  496. package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  497. package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  498. package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
  499. package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  500. package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  501. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  502. package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  503. package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  504. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  505. package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  506. package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
  507. package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  508. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  509. package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
  510. package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  511. package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  512. package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  513. package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  514. package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  515. package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  516. package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  517. package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  518. package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  519. package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
  520. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  521. package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  522. package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  523. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  524. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  525. package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
  526. package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  527. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  528. package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  529. package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  530. package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  531. package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  532. package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  533. package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  534. package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  535. package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  536. package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  537. package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  538. package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  539. package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  540. package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  541. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  542. package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
  543. package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  544. package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  545. package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  546. package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  547. package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  548. package/node_modules/zod/src/v3/types.ts +5138 -0
  549. package/node_modules/zod/src/v4/classic/checks.ts +32 -0
  550. package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  551. package/node_modules/zod/src/v4/classic/compat.ts +70 -0
  552. package/node_modules/zod/src/v4/classic/errors.ts +82 -0
  553. package/node_modules/zod/src/v4/classic/external.ts +52 -0
  554. package/node_modules/zod/src/v4/classic/from-json-schema.ts +659 -0
  555. package/node_modules/zod/src/v4/classic/index.ts +5 -0
  556. package/node_modules/zod/src/v4/classic/iso.ts +90 -0
  557. package/node_modules/zod/src/v4/classic/parse.ts +82 -0
  558. package/node_modules/zod/src/v4/classic/schemas.ts +2672 -0
  559. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  560. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
  561. package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  562. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +216 -0
  563. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  564. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  565. package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  566. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  567. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
  568. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +326 -0
  569. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  570. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
  571. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +703 -0
  572. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  573. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
  574. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  575. package/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
  576. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
  577. package/node_modules/zod/src/v4/classic/tests/default.test.ts +409 -0
  578. package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
  579. package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  580. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +197 -0
  581. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +694 -0
  582. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  583. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +807 -0
  584. package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  585. package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
  586. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
  587. package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
  588. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +895 -0
  589. package/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
  590. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  591. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +39 -0
  592. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
  593. package/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
  594. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
  595. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
  596. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +46 -0
  597. package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
  598. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  599. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
  600. package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
  601. package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
  602. package/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
  603. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  604. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  605. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
  606. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  607. package/node_modules/zod/src/v4/classic/tests/number.test.ts +325 -0
  608. package/node_modules/zod/src/v4/classic/tests/object.test.ts +717 -0
  609. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +333 -0
  610. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +450 -0
  611. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
  612. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
  613. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
  614. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +26 -0
  615. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
  616. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  617. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  618. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  619. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  620. package/node_modules/zod/src/v4/classic/tests/record.test.ts +717 -0
  621. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +631 -0
  622. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +633 -0
  623. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
  624. package/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
  625. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
  626. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
  627. package/node_modules/zod/src/v4/classic/tests/string.test.ts +1224 -0
  628. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
  629. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
  630. package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
  631. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +3125 -0
  632. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
  633. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +496 -0
  634. package/node_modules/zod/src/v4/classic/tests/union.test.ts +273 -0
  635. package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
  636. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  637. package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  638. package/node_modules/zod/src/v4/core/api.ts +1823 -0
  639. package/node_modules/zod/src/v4/core/checks.ts +1293 -0
  640. package/node_modules/zod/src/v4/core/config.ts +15 -0
  641. package/node_modules/zod/src/v4/core/core.ts +153 -0
  642. package/node_modules/zod/src/v4/core/doc.ts +44 -0
  643. package/node_modules/zod/src/v4/core/errors.ts +455 -0
  644. package/node_modules/zod/src/v4/core/index.ts +16 -0
  645. package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
  646. package/node_modules/zod/src/v4/core/json-schema-processors.ts +666 -0
  647. package/node_modules/zod/src/v4/core/json-schema.ts +147 -0
  648. package/node_modules/zod/src/v4/core/parse.ts +195 -0
  649. package/node_modules/zod/src/v4/core/regexes.ts +190 -0
  650. package/node_modules/zod/src/v4/core/registries.ts +105 -0
  651. package/node_modules/zod/src/v4/core/schemas.ts +4730 -0
  652. package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
  653. package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
  654. package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  655. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  656. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +215 -0
  657. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  658. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
  659. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
  660. package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
  661. package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
  662. package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
  663. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  664. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  665. package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
  666. package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
  667. package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
  668. package/node_modules/zod/src/v4/core/to-json-schema.ts +622 -0
  669. package/node_modules/zod/src/v4/core/util.ts +983 -0
  670. package/node_modules/zod/src/v4/core/versions.ts +5 -0
  671. package/node_modules/zod/src/v4/core/zsf.ts +323 -0
  672. package/node_modules/zod/src/v4/index.ts +4 -0
  673. package/node_modules/zod/src/v4/locales/ar.ts +115 -0
  674. package/node_modules/zod/src/v4/locales/az.ts +111 -0
  675. package/node_modules/zod/src/v4/locales/be.ts +176 -0
  676. package/node_modules/zod/src/v4/locales/bg.ts +128 -0
  677. package/node_modules/zod/src/v4/locales/ca.ts +116 -0
  678. package/node_modules/zod/src/v4/locales/cs.ts +118 -0
  679. package/node_modules/zod/src/v4/locales/da.ts +123 -0
  680. package/node_modules/zod/src/v4/locales/de.ts +116 -0
  681. package/node_modules/zod/src/v4/locales/el.ts +121 -0
  682. package/node_modules/zod/src/v4/locales/en.ts +123 -0
  683. package/node_modules/zod/src/v4/locales/eo.ts +118 -0
  684. package/node_modules/zod/src/v4/locales/es.ts +141 -0
  685. package/node_modules/zod/src/v4/locales/fa.ts +126 -0
  686. package/node_modules/zod/src/v4/locales/fi.ts +121 -0
  687. package/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
  688. package/node_modules/zod/src/v4/locales/fr.ts +132 -0
  689. package/node_modules/zod/src/v4/locales/he.ts +246 -0
  690. package/node_modules/zod/src/v4/locales/hr.ts +131 -0
  691. package/node_modules/zod/src/v4/locales/hu.ts +117 -0
  692. package/node_modules/zod/src/v4/locales/hy.ts +164 -0
  693. package/node_modules/zod/src/v4/locales/id.ts +115 -0
  694. package/node_modules/zod/src/v4/locales/index.ts +52 -0
  695. package/node_modules/zod/src/v4/locales/is.ts +119 -0
  696. package/node_modules/zod/src/v4/locales/it.ts +116 -0
  697. package/node_modules/zod/src/v4/locales/ja.ts +114 -0
  698. package/node_modules/zod/src/v4/locales/ka.ts +123 -0
  699. package/node_modules/zod/src/v4/locales/kh.ts +7 -0
  700. package/node_modules/zod/src/v4/locales/km.ts +119 -0
  701. package/node_modules/zod/src/v4/locales/ko.ts +121 -0
  702. package/node_modules/zod/src/v4/locales/lt.ts +239 -0
  703. package/node_modules/zod/src/v4/locales/mk.ts +118 -0
  704. package/node_modules/zod/src/v4/locales/ms.ts +115 -0
  705. package/node_modules/zod/src/v4/locales/nl.ts +121 -0
  706. package/node_modules/zod/src/v4/locales/no.ts +116 -0
  707. package/node_modules/zod/src/v4/locales/ota.ts +117 -0
  708. package/node_modules/zod/src/v4/locales/pl.ts +118 -0
  709. package/node_modules/zod/src/v4/locales/ps.ts +126 -0
  710. package/node_modules/zod/src/v4/locales/pt.ts +116 -0
  711. package/node_modules/zod/src/v4/locales/ro.ts +129 -0
  712. package/node_modules/zod/src/v4/locales/ru.ts +176 -0
  713. package/node_modules/zod/src/v4/locales/sl.ts +118 -0
  714. package/node_modules/zod/src/v4/locales/sv.ts +119 -0
  715. package/node_modules/zod/src/v4/locales/ta.ts +118 -0
  716. package/node_modules/zod/src/v4/locales/th.ts +119 -0
  717. package/node_modules/zod/src/v4/locales/tr.ts +111 -0
  718. package/node_modules/zod/src/v4/locales/ua.ts +7 -0
  719. package/node_modules/zod/src/v4/locales/uk.ts +117 -0
  720. package/node_modules/zod/src/v4/locales/ur.ts +119 -0
  721. package/node_modules/zod/src/v4/locales/uz.ts +117 -0
  722. package/node_modules/zod/src/v4/locales/vi.ts +117 -0
  723. package/node_modules/zod/src/v4/locales/yo.ts +124 -0
  724. package/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
  725. package/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
  726. package/node_modules/zod/src/v4/mini/checks.ts +32 -0
  727. package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
  728. package/node_modules/zod/src/v4/mini/external.ts +41 -0
  729. package/node_modules/zod/src/v4/mini/index.ts +3 -0
  730. package/node_modules/zod/src/v4/mini/iso.ts +66 -0
  731. package/node_modules/zod/src/v4/mini/parse.ts +14 -0
  732. package/node_modules/zod/src/v4/mini/schemas.ts +1947 -0
  733. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
  734. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  735. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
  736. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  737. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +548 -0
  738. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  739. package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  740. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
  741. package/node_modules/zod/src/v4/mini/tests/index.test.ts +993 -0
  742. package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  743. package/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
  744. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  745. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +325 -0
  746. package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
  747. package/node_modules/zod/src/v4/mini/tests/string.test.ts +352 -0
  748. package/node_modules/zod/src/v4-mini/index.ts +3 -0
  749. package/node_modules/zod/v3/ZodError.cjs +138 -0
  750. package/node_modules/zod/v3/ZodError.d.cts +164 -0
  751. package/node_modules/zod/v3/ZodError.d.ts +164 -0
  752. package/node_modules/zod/v3/ZodError.js +133 -0
  753. package/node_modules/zod/v3/errors.cjs +17 -0
  754. package/node_modules/zod/v3/errors.d.cts +5 -0
  755. package/node_modules/zod/v3/errors.d.ts +5 -0
  756. package/node_modules/zod/v3/errors.js +9 -0
  757. package/node_modules/zod/v3/external.cjs +22 -0
  758. package/node_modules/zod/v3/external.d.cts +6 -0
  759. package/node_modules/zod/v3/external.d.ts +6 -0
  760. package/node_modules/zod/v3/external.js +6 -0
  761. package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
  762. package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  763. package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  764. package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  765. package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
  766. package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  767. package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  768. package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  769. package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
  770. package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  771. package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  772. package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  773. package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
  774. package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  775. package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  776. package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  777. package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
  778. package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  779. package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  780. package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  781. package/node_modules/zod/v3/helpers/util.cjs +137 -0
  782. package/node_modules/zod/v3/helpers/util.d.cts +85 -0
  783. package/node_modules/zod/v3/helpers/util.d.ts +85 -0
  784. package/node_modules/zod/v3/helpers/util.js +133 -0
  785. package/node_modules/zod/v3/index.cjs +33 -0
  786. package/node_modules/zod/v3/index.d.cts +4 -0
  787. package/node_modules/zod/v3/index.d.ts +4 -0
  788. package/node_modules/zod/v3/index.js +4 -0
  789. package/node_modules/zod/v3/locales/en.cjs +112 -0
  790. package/node_modules/zod/v3/locales/en.d.cts +3 -0
  791. package/node_modules/zod/v3/locales/en.d.ts +3 -0
  792. package/node_modules/zod/v3/locales/en.js +109 -0
  793. package/node_modules/zod/v3/package.json +7 -0
  794. package/node_modules/zod/v3/standard-schema.cjs +2 -0
  795. package/node_modules/zod/v3/standard-schema.d.cts +102 -0
  796. package/node_modules/zod/v3/standard-schema.d.ts +102 -0
  797. package/node_modules/zod/v3/standard-schema.js +1 -0
  798. package/node_modules/zod/v3/types.cjs +3777 -0
  799. package/node_modules/zod/v3/types.d.cts +1034 -0
  800. package/node_modules/zod/v3/types.d.ts +1034 -0
  801. package/node_modules/zod/v3/types.js +3695 -0
  802. package/node_modules/zod/v4/classic/checks.cjs +33 -0
  803. package/node_modules/zod/v4/classic/checks.d.cts +1 -0
  804. package/node_modules/zod/v4/classic/checks.d.ts +1 -0
  805. package/node_modules/zod/v4/classic/checks.js +1 -0
  806. package/node_modules/zod/v4/classic/coerce.cjs +47 -0
  807. package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  808. package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  809. package/node_modules/zod/v4/classic/coerce.js +17 -0
  810. package/node_modules/zod/v4/classic/compat.cjs +61 -0
  811. package/node_modules/zod/v4/classic/compat.d.cts +50 -0
  812. package/node_modules/zod/v4/classic/compat.d.ts +50 -0
  813. package/node_modules/zod/v4/classic/compat.js +31 -0
  814. package/node_modules/zod/v4/classic/errors.cjs +74 -0
  815. package/node_modules/zod/v4/classic/errors.d.cts +30 -0
  816. package/node_modules/zod/v4/classic/errors.d.ts +30 -0
  817. package/node_modules/zod/v4/classic/errors.js +48 -0
  818. package/node_modules/zod/v4/classic/external.cjs +73 -0
  819. package/node_modules/zod/v4/classic/external.d.cts +16 -0
  820. package/node_modules/zod/v4/classic/external.d.ts +16 -0
  821. package/node_modules/zod/v4/classic/external.js +20 -0
  822. package/node_modules/zod/v4/classic/from-json-schema.cjs +625 -0
  823. package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
  824. package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
  825. package/node_modules/zod/v4/classic/from-json-schema.js +599 -0
  826. package/node_modules/zod/v4/classic/index.cjs +33 -0
  827. package/node_modules/zod/v4/classic/index.d.cts +4 -0
  828. package/node_modules/zod/v4/classic/index.d.ts +4 -0
  829. package/node_modules/zod/v4/classic/index.js +4 -0
  830. package/node_modules/zod/v4/classic/iso.cjs +60 -0
  831. package/node_modules/zod/v4/classic/iso.d.cts +22 -0
  832. package/node_modules/zod/v4/classic/iso.d.ts +22 -0
  833. package/node_modules/zod/v4/classic/iso.js +30 -0
  834. package/node_modules/zod/v4/classic/package.json +7 -0
  835. package/node_modules/zod/v4/classic/parse.cjs +41 -0
  836. package/node_modules/zod/v4/classic/parse.d.cts +31 -0
  837. package/node_modules/zod/v4/classic/parse.d.ts +31 -0
  838. package/node_modules/zod/v4/classic/parse.js +15 -0
  839. package/node_modules/zod/v4/classic/schemas.cjs +1511 -0
  840. package/node_modules/zod/v4/classic/schemas.d.cts +767 -0
  841. package/node_modules/zod/v4/classic/schemas.d.ts +767 -0
  842. package/node_modules/zod/v4/classic/schemas.js +1395 -0
  843. package/node_modules/zod/v4/core/api.cjs +1227 -0
  844. package/node_modules/zod/v4/core/api.d.cts +325 -0
  845. package/node_modules/zod/v4/core/api.d.ts +325 -0
  846. package/node_modules/zod/v4/core/api.js +1087 -0
  847. package/node_modules/zod/v4/core/checks.cjs +601 -0
  848. package/node_modules/zod/v4/core/checks.d.cts +278 -0
  849. package/node_modules/zod/v4/core/checks.d.ts +278 -0
  850. package/node_modules/zod/v4/core/checks.js +575 -0
  851. package/node_modules/zod/v4/core/core.cjs +85 -0
  852. package/node_modules/zod/v4/core/core.d.cts +70 -0
  853. package/node_modules/zod/v4/core/core.d.ts +70 -0
  854. package/node_modules/zod/v4/core/core.js +78 -0
  855. package/node_modules/zod/v4/core/doc.cjs +39 -0
  856. package/node_modules/zod/v4/core/doc.d.cts +14 -0
  857. package/node_modules/zod/v4/core/doc.d.ts +14 -0
  858. package/node_modules/zod/v4/core/doc.js +35 -0
  859. package/node_modules/zod/v4/core/errors.cjs +216 -0
  860. package/node_modules/zod/v4/core/errors.d.cts +221 -0
  861. package/node_modules/zod/v4/core/errors.d.ts +221 -0
  862. package/node_modules/zod/v4/core/errors.js +185 -0
  863. package/node_modules/zod/v4/core/index.cjs +47 -0
  864. package/node_modules/zod/v4/core/index.d.cts +16 -0
  865. package/node_modules/zod/v4/core/index.d.ts +16 -0
  866. package/node_modules/zod/v4/core/index.js +16 -0
  867. package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
  868. package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
  869. package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
  870. package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
  871. package/node_modules/zod/v4/core/json-schema-processors.cjs +644 -0
  872. package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
  873. package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
  874. package/node_modules/zod/v4/core/json-schema-processors.js +601 -0
  875. package/node_modules/zod/v4/core/json-schema.cjs +2 -0
  876. package/node_modules/zod/v4/core/json-schema.d.cts +88 -0
  877. package/node_modules/zod/v4/core/json-schema.d.ts +88 -0
  878. package/node_modules/zod/v4/core/json-schema.js +1 -0
  879. package/node_modules/zod/v4/core/package.json +7 -0
  880. package/node_modules/zod/v4/core/parse.cjs +131 -0
  881. package/node_modules/zod/v4/core/parse.d.cts +49 -0
  882. package/node_modules/zod/v4/core/parse.d.ts +49 -0
  883. package/node_modules/zod/v4/core/parse.js +93 -0
  884. package/node_modules/zod/v4/core/regexes.cjs +172 -0
  885. package/node_modules/zod/v4/core/regexes.d.cts +85 -0
  886. package/node_modules/zod/v4/core/regexes.d.ts +85 -0
  887. package/node_modules/zod/v4/core/regexes.js +139 -0
  888. package/node_modules/zod/v4/core/registries.cjs +56 -0
  889. package/node_modules/zod/v4/core/registries.d.cts +35 -0
  890. package/node_modules/zod/v4/core/registries.d.ts +35 -0
  891. package/node_modules/zod/v4/core/registries.js +51 -0
  892. package/node_modules/zod/v4/core/schemas.cjs +2270 -0
  893. package/node_modules/zod/v4/core/schemas.d.cts +1184 -0
  894. package/node_modules/zod/v4/core/schemas.d.ts +1184 -0
  895. package/node_modules/zod/v4/core/schemas.js +2239 -0
  896. package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
  897. package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
  898. package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
  899. package/node_modules/zod/v4/core/standard-schema.js +1 -0
  900. package/node_modules/zod/v4/core/to-json-schema.cjs +457 -0
  901. package/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
  902. package/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
  903. package/node_modules/zod/v4/core/to-json-schema.js +448 -0
  904. package/node_modules/zod/v4/core/util.cjs +734 -0
  905. package/node_modules/zod/v4/core/util.d.cts +200 -0
  906. package/node_modules/zod/v4/core/util.d.ts +200 -0
  907. package/node_modules/zod/v4/core/util.js +674 -0
  908. package/node_modules/zod/v4/core/versions.cjs +8 -0
  909. package/node_modules/zod/v4/core/versions.d.cts +5 -0
  910. package/node_modules/zod/v4/core/versions.d.ts +5 -0
  911. package/node_modules/zod/v4/core/versions.js +5 -0
  912. package/node_modules/zod/v4/index.cjs +22 -0
  913. package/node_modules/zod/v4/index.d.cts +3 -0
  914. package/node_modules/zod/v4/index.d.ts +3 -0
  915. package/node_modules/zod/v4/index.js +3 -0
  916. package/node_modules/zod/v4/locales/ar.cjs +133 -0
  917. package/node_modules/zod/v4/locales/ar.d.cts +5 -0
  918. package/node_modules/zod/v4/locales/ar.d.ts +4 -0
  919. package/node_modules/zod/v4/locales/ar.js +106 -0
  920. package/node_modules/zod/v4/locales/az.cjs +132 -0
  921. package/node_modules/zod/v4/locales/az.d.cts +5 -0
  922. package/node_modules/zod/v4/locales/az.d.ts +4 -0
  923. package/node_modules/zod/v4/locales/az.js +105 -0
  924. package/node_modules/zod/v4/locales/be.cjs +183 -0
  925. package/node_modules/zod/v4/locales/be.d.cts +5 -0
  926. package/node_modules/zod/v4/locales/be.d.ts +4 -0
  927. package/node_modules/zod/v4/locales/be.js +156 -0
  928. package/node_modules/zod/v4/locales/bg.cjs +147 -0
  929. package/node_modules/zod/v4/locales/bg.d.cts +5 -0
  930. package/node_modules/zod/v4/locales/bg.d.ts +4 -0
  931. package/node_modules/zod/v4/locales/bg.js +120 -0
  932. package/node_modules/zod/v4/locales/ca.cjs +134 -0
  933. package/node_modules/zod/v4/locales/ca.d.cts +5 -0
  934. package/node_modules/zod/v4/locales/ca.d.ts +4 -0
  935. package/node_modules/zod/v4/locales/ca.js +107 -0
  936. package/node_modules/zod/v4/locales/cs.cjs +138 -0
  937. package/node_modules/zod/v4/locales/cs.d.cts +5 -0
  938. package/node_modules/zod/v4/locales/cs.d.ts +4 -0
  939. package/node_modules/zod/v4/locales/cs.js +111 -0
  940. package/node_modules/zod/v4/locales/da.cjs +142 -0
  941. package/node_modules/zod/v4/locales/da.d.cts +5 -0
  942. package/node_modules/zod/v4/locales/da.d.ts +4 -0
  943. package/node_modules/zod/v4/locales/da.js +115 -0
  944. package/node_modules/zod/v4/locales/de.cjs +135 -0
  945. package/node_modules/zod/v4/locales/de.d.cts +5 -0
  946. package/node_modules/zod/v4/locales/de.d.ts +4 -0
  947. package/node_modules/zod/v4/locales/de.js +108 -0
  948. package/node_modules/zod/v4/locales/el.cjs +136 -0
  949. package/node_modules/zod/v4/locales/el.d.cts +5 -0
  950. package/node_modules/zod/v4/locales/el.d.ts +4 -0
  951. package/node_modules/zod/v4/locales/el.js +109 -0
  952. package/node_modules/zod/v4/locales/en.cjs +140 -0
  953. package/node_modules/zod/v4/locales/en.d.cts +5 -0
  954. package/node_modules/zod/v4/locales/en.d.ts +4 -0
  955. package/node_modules/zod/v4/locales/en.js +113 -0
  956. package/node_modules/zod/v4/locales/eo.cjs +136 -0
  957. package/node_modules/zod/v4/locales/eo.d.cts +5 -0
  958. package/node_modules/zod/v4/locales/eo.d.ts +4 -0
  959. package/node_modules/zod/v4/locales/eo.js +109 -0
  960. package/node_modules/zod/v4/locales/es.cjs +159 -0
  961. package/node_modules/zod/v4/locales/es.d.cts +5 -0
  962. package/node_modules/zod/v4/locales/es.d.ts +4 -0
  963. package/node_modules/zod/v4/locales/es.js +132 -0
  964. package/node_modules/zod/v4/locales/fa.cjs +141 -0
  965. package/node_modules/zod/v4/locales/fa.d.cts +5 -0
  966. package/node_modules/zod/v4/locales/fa.d.ts +4 -0
  967. package/node_modules/zod/v4/locales/fa.js +114 -0
  968. package/node_modules/zod/v4/locales/fi.cjs +139 -0
  969. package/node_modules/zod/v4/locales/fi.d.cts +5 -0
  970. package/node_modules/zod/v4/locales/fi.d.ts +4 -0
  971. package/node_modules/zod/v4/locales/fi.js +112 -0
  972. package/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
  973. package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
  974. package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  975. package/node_modules/zod/v4/locales/fr-CA.js +107 -0
  976. package/node_modules/zod/v4/locales/fr.cjs +152 -0
  977. package/node_modules/zod/v4/locales/fr.d.cts +5 -0
  978. package/node_modules/zod/v4/locales/fr.d.ts +4 -0
  979. package/node_modules/zod/v4/locales/fr.js +125 -0
  980. package/node_modules/zod/v4/locales/he.cjs +241 -0
  981. package/node_modules/zod/v4/locales/he.d.cts +5 -0
  982. package/node_modules/zod/v4/locales/he.d.ts +4 -0
  983. package/node_modules/zod/v4/locales/he.js +214 -0
  984. package/node_modules/zod/v4/locales/hr.cjs +149 -0
  985. package/node_modules/zod/v4/locales/hr.d.cts +5 -0
  986. package/node_modules/zod/v4/locales/hr.d.ts +4 -0
  987. package/node_modules/zod/v4/locales/hr.js +122 -0
  988. package/node_modules/zod/v4/locales/hu.cjs +135 -0
  989. package/node_modules/zod/v4/locales/hu.d.cts +5 -0
  990. package/node_modules/zod/v4/locales/hu.d.ts +4 -0
  991. package/node_modules/zod/v4/locales/hu.js +108 -0
  992. package/node_modules/zod/v4/locales/hy.cjs +174 -0
  993. package/node_modules/zod/v4/locales/hy.d.cts +5 -0
  994. package/node_modules/zod/v4/locales/hy.d.ts +4 -0
  995. package/node_modules/zod/v4/locales/hy.js +147 -0
  996. package/node_modules/zod/v4/locales/id.cjs +133 -0
  997. package/node_modules/zod/v4/locales/id.d.cts +5 -0
  998. package/node_modules/zod/v4/locales/id.d.ts +4 -0
  999. package/node_modules/zod/v4/locales/id.js +106 -0
  1000. package/node_modules/zod/v4/locales/index.cjs +111 -0
  1001. package/node_modules/zod/v4/locales/index.d.cts +52 -0
  1002. package/node_modules/zod/v4/locales/index.d.ts +52 -0
  1003. package/node_modules/zod/v4/locales/index.js +52 -0
  1004. package/node_modules/zod/v4/locales/is.cjs +136 -0
  1005. package/node_modules/zod/v4/locales/is.d.cts +5 -0
  1006. package/node_modules/zod/v4/locales/is.d.ts +4 -0
  1007. package/node_modules/zod/v4/locales/is.js +109 -0
  1008. package/node_modules/zod/v4/locales/it.cjs +135 -0
  1009. package/node_modules/zod/v4/locales/it.d.cts +5 -0
  1010. package/node_modules/zod/v4/locales/it.d.ts +4 -0
  1011. package/node_modules/zod/v4/locales/it.js +108 -0
  1012. package/node_modules/zod/v4/locales/ja.cjs +134 -0
  1013. package/node_modules/zod/v4/locales/ja.d.cts +5 -0
  1014. package/node_modules/zod/v4/locales/ja.d.ts +4 -0
  1015. package/node_modules/zod/v4/locales/ja.js +107 -0
  1016. package/node_modules/zod/v4/locales/ka.cjs +139 -0
  1017. package/node_modules/zod/v4/locales/ka.d.cts +5 -0
  1018. package/node_modules/zod/v4/locales/ka.d.ts +4 -0
  1019. package/node_modules/zod/v4/locales/ka.js +112 -0
  1020. package/node_modules/zod/v4/locales/kh.cjs +12 -0
  1021. package/node_modules/zod/v4/locales/kh.d.cts +5 -0
  1022. package/node_modules/zod/v4/locales/kh.d.ts +5 -0
  1023. package/node_modules/zod/v4/locales/kh.js +5 -0
  1024. package/node_modules/zod/v4/locales/km.cjs +137 -0
  1025. package/node_modules/zod/v4/locales/km.d.cts +5 -0
  1026. package/node_modules/zod/v4/locales/km.d.ts +4 -0
  1027. package/node_modules/zod/v4/locales/km.js +110 -0
  1028. package/node_modules/zod/v4/locales/ko.cjs +138 -0
  1029. package/node_modules/zod/v4/locales/ko.d.cts +5 -0
  1030. package/node_modules/zod/v4/locales/ko.d.ts +4 -0
  1031. package/node_modules/zod/v4/locales/ko.js +111 -0
  1032. package/node_modules/zod/v4/locales/lt.cjs +230 -0
  1033. package/node_modules/zod/v4/locales/lt.d.cts +5 -0
  1034. package/node_modules/zod/v4/locales/lt.d.ts +4 -0
  1035. package/node_modules/zod/v4/locales/lt.js +203 -0
  1036. package/node_modules/zod/v4/locales/mk.cjs +136 -0
  1037. package/node_modules/zod/v4/locales/mk.d.cts +5 -0
  1038. package/node_modules/zod/v4/locales/mk.d.ts +4 -0
  1039. package/node_modules/zod/v4/locales/mk.js +109 -0
  1040. package/node_modules/zod/v4/locales/ms.cjs +134 -0
  1041. package/node_modules/zod/v4/locales/ms.d.cts +5 -0
  1042. package/node_modules/zod/v4/locales/ms.d.ts +4 -0
  1043. package/node_modules/zod/v4/locales/ms.js +107 -0
  1044. package/node_modules/zod/v4/locales/nl.cjs +137 -0
  1045. package/node_modules/zod/v4/locales/nl.d.cts +5 -0
  1046. package/node_modules/zod/v4/locales/nl.d.ts +4 -0
  1047. package/node_modules/zod/v4/locales/nl.js +110 -0
  1048. package/node_modules/zod/v4/locales/no.cjs +135 -0
  1049. package/node_modules/zod/v4/locales/no.d.cts +5 -0
  1050. package/node_modules/zod/v4/locales/no.d.ts +4 -0
  1051. package/node_modules/zod/v4/locales/no.js +108 -0
  1052. package/node_modules/zod/v4/locales/ota.cjs +136 -0
  1053. package/node_modules/zod/v4/locales/ota.d.cts +5 -0
  1054. package/node_modules/zod/v4/locales/ota.d.ts +4 -0
  1055. package/node_modules/zod/v4/locales/ota.js +109 -0
  1056. package/node_modules/zod/v4/locales/package.json +7 -0
  1057. package/node_modules/zod/v4/locales/pl.cjs +136 -0
  1058. package/node_modules/zod/v4/locales/pl.d.cts +5 -0
  1059. package/node_modules/zod/v4/locales/pl.d.ts +4 -0
  1060. package/node_modules/zod/v4/locales/pl.js +109 -0
  1061. package/node_modules/zod/v4/locales/ps.cjs +141 -0
  1062. package/node_modules/zod/v4/locales/ps.d.cts +5 -0
  1063. package/node_modules/zod/v4/locales/ps.d.ts +4 -0
  1064. package/node_modules/zod/v4/locales/ps.js +114 -0
  1065. package/node_modules/zod/v4/locales/pt.cjs +135 -0
  1066. package/node_modules/zod/v4/locales/pt.d.cts +5 -0
  1067. package/node_modules/zod/v4/locales/pt.d.ts +4 -0
  1068. package/node_modules/zod/v4/locales/pt.js +108 -0
  1069. package/node_modules/zod/v4/locales/ro.cjs +146 -0
  1070. package/node_modules/zod/v4/locales/ro.d.cts +5 -0
  1071. package/node_modules/zod/v4/locales/ro.d.ts +4 -0
  1072. package/node_modules/zod/v4/locales/ro.js +119 -0
  1073. package/node_modules/zod/v4/locales/ru.cjs +183 -0
  1074. package/node_modules/zod/v4/locales/ru.d.cts +5 -0
  1075. package/node_modules/zod/v4/locales/ru.d.ts +4 -0
  1076. package/node_modules/zod/v4/locales/ru.js +156 -0
  1077. package/node_modules/zod/v4/locales/sl.cjs +136 -0
  1078. package/node_modules/zod/v4/locales/sl.d.cts +5 -0
  1079. package/node_modules/zod/v4/locales/sl.d.ts +4 -0
  1080. package/node_modules/zod/v4/locales/sl.js +109 -0
  1081. package/node_modules/zod/v4/locales/sv.cjs +137 -0
  1082. package/node_modules/zod/v4/locales/sv.d.cts +5 -0
  1083. package/node_modules/zod/v4/locales/sv.d.ts +4 -0
  1084. package/node_modules/zod/v4/locales/sv.js +110 -0
  1085. package/node_modules/zod/v4/locales/ta.cjs +137 -0
  1086. package/node_modules/zod/v4/locales/ta.d.cts +5 -0
  1087. package/node_modules/zod/v4/locales/ta.d.ts +4 -0
  1088. package/node_modules/zod/v4/locales/ta.js +110 -0
  1089. package/node_modules/zod/v4/locales/th.cjs +137 -0
  1090. package/node_modules/zod/v4/locales/th.d.cts +5 -0
  1091. package/node_modules/zod/v4/locales/th.d.ts +4 -0
  1092. package/node_modules/zod/v4/locales/th.js +110 -0
  1093. package/node_modules/zod/v4/locales/tr.cjs +132 -0
  1094. package/node_modules/zod/v4/locales/tr.d.cts +5 -0
  1095. package/node_modules/zod/v4/locales/tr.d.ts +4 -0
  1096. package/node_modules/zod/v4/locales/tr.js +105 -0
  1097. package/node_modules/zod/v4/locales/ua.cjs +12 -0
  1098. package/node_modules/zod/v4/locales/ua.d.cts +5 -0
  1099. package/node_modules/zod/v4/locales/ua.d.ts +5 -0
  1100. package/node_modules/zod/v4/locales/ua.js +5 -0
  1101. package/node_modules/zod/v4/locales/uk.cjs +135 -0
  1102. package/node_modules/zod/v4/locales/uk.d.cts +5 -0
  1103. package/node_modules/zod/v4/locales/uk.d.ts +4 -0
  1104. package/node_modules/zod/v4/locales/uk.js +108 -0
  1105. package/node_modules/zod/v4/locales/ur.cjs +137 -0
  1106. package/node_modules/zod/v4/locales/ur.d.cts +5 -0
  1107. package/node_modules/zod/v4/locales/ur.d.ts +4 -0
  1108. package/node_modules/zod/v4/locales/ur.js +110 -0
  1109. package/node_modules/zod/v4/locales/uz.cjs +137 -0
  1110. package/node_modules/zod/v4/locales/uz.d.cts +5 -0
  1111. package/node_modules/zod/v4/locales/uz.d.ts +4 -0
  1112. package/node_modules/zod/v4/locales/uz.js +110 -0
  1113. package/node_modules/zod/v4/locales/vi.cjs +135 -0
  1114. package/node_modules/zod/v4/locales/vi.d.cts +5 -0
  1115. package/node_modules/zod/v4/locales/vi.d.ts +4 -0
  1116. package/node_modules/zod/v4/locales/vi.js +108 -0
  1117. package/node_modules/zod/v4/locales/yo.cjs +134 -0
  1118. package/node_modules/zod/v4/locales/yo.d.cts +5 -0
  1119. package/node_modules/zod/v4/locales/yo.d.ts +4 -0
  1120. package/node_modules/zod/v4/locales/yo.js +107 -0
  1121. package/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
  1122. package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
  1123. package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  1124. package/node_modules/zod/v4/locales/zh-CN.js +109 -0
  1125. package/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
  1126. package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
  1127. package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  1128. package/node_modules/zod/v4/locales/zh-TW.js +107 -0
  1129. package/node_modules/zod/v4/mini/checks.cjs +34 -0
  1130. package/node_modules/zod/v4/mini/checks.d.cts +1 -0
  1131. package/node_modules/zod/v4/mini/checks.d.ts +1 -0
  1132. package/node_modules/zod/v4/mini/checks.js +1 -0
  1133. package/node_modules/zod/v4/mini/coerce.cjs +52 -0
  1134. package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  1135. package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  1136. package/node_modules/zod/v4/mini/coerce.js +22 -0
  1137. package/node_modules/zod/v4/mini/external.cjs +63 -0
  1138. package/node_modules/zod/v4/mini/external.d.cts +13 -0
  1139. package/node_modules/zod/v4/mini/external.d.ts +13 -0
  1140. package/node_modules/zod/v4/mini/external.js +14 -0
  1141. package/node_modules/zod/v4/mini/index.cjs +32 -0
  1142. package/node_modules/zod/v4/mini/index.d.cts +3 -0
  1143. package/node_modules/zod/v4/mini/index.d.ts +3 -0
  1144. package/node_modules/zod/v4/mini/index.js +3 -0
  1145. package/node_modules/zod/v4/mini/iso.cjs +64 -0
  1146. package/node_modules/zod/v4/mini/iso.d.cts +22 -0
  1147. package/node_modules/zod/v4/mini/iso.d.ts +22 -0
  1148. package/node_modules/zod/v4/mini/iso.js +34 -0
  1149. package/node_modules/zod/v4/mini/package.json +7 -0
  1150. package/node_modules/zod/v4/mini/parse.cjs +16 -0
  1151. package/node_modules/zod/v4/mini/parse.d.cts +1 -0
  1152. package/node_modules/zod/v4/mini/parse.d.ts +1 -0
  1153. package/node_modules/zod/v4/mini/parse.js +1 -0
  1154. package/node_modules/zod/v4/mini/schemas.cjs +1083 -0
  1155. package/node_modules/zod/v4/mini/schemas.d.cts +445 -0
  1156. package/node_modules/zod/v4/mini/schemas.d.ts +445 -0
  1157. package/node_modules/zod/v4/mini/schemas.js +961 -0
  1158. package/node_modules/zod/v4/package.json +7 -0
  1159. package/node_modules/zod/v4-mini/index.cjs +32 -0
  1160. package/node_modules/zod/v4-mini/index.d.cts +3 -0
  1161. package/node_modules/zod/v4-mini/index.d.ts +3 -0
  1162. package/node_modules/zod/v4-mini/index.js +3 -0
  1163. package/node_modules/zod/v4-mini/package.json +7 -0
  1164. package/package.json +68 -0
  1165. package/proof/CONTAINMENT-BUILD.txt +163 -0
  1166. package/proof/MCP-SMOKE-STATUS.txt +9 -0
  1167. package/proof/NODE-SYNTAX.txt +4 -0
  1168. package/proof/PROOF.txt +6 -0
  1169. package/proof/SECRET-SCAN.txt +4 -0
  1170. package/proof/SOURCE-GATES.txt +16 -0
  1171. package/proof/STATUS.txt +11 -0
  1172. package/proof/TARGET-V0313-CONTAINMENT-PASS.sha256 +1 -0
  1173. package/proof/TARGET-V0313-CONTAINMENT-PASS.txt +215 -0
  1174. package/proof/TARGET-V040-CONTAINED-IPC-FAIL.sha256 +1 -0
  1175. package/proof/TARGET-V040-CONTAINED-IPC-FAIL.txt +299 -0
  1176. package/proof/TARGET-V041-CONTAINED-CREATEPROCESS-203.sha256 +1 -0
  1177. package/proof/TARGET-V041-CONTAINED-CREATEPROCESS-203.txt +311 -0
  1178. package/proof/TARGET-V042-CONTAINED-CREATEPROCESS-203.sha256 +1 -0
  1179. package/proof/TARGET-V042-CONTAINED-CREATEPROCESS-203.txt +313 -0
  1180. package/proof/TARGET-V043-CONTAINED-CREATEPROCESS-203.sha256 +1 -0
  1181. package/proof/TARGET-V043-CONTAINED-CREATEPROCESS-203.txt +308 -0
  1182. package/proof/TARGET-V044-CONTAINED-PASS.sha256 +1 -0
  1183. package/proof/TARGET-V044-CONTAINED-PASS.txt +432 -0
  1184. package/proof/TARGET-V045-DUAL-OPERATION-PASS.sha256 +1 -0
  1185. package/proof/TARGET-V045-DUAL-OPERATION-PASS.txt +481 -0
  1186. package/proof/TARGET-V046-FIXED-EXECUTABLE-REGISTRY-PASS.sha256 +1 -0
  1187. package/proof/TARGET-V046-FIXED-EXECUTABLE-REGISTRY-PASS.txt +610 -0
  1188. package/proof/TARGET-V047-RUNTIME-MANIFEST-PASS.sha256 +1 -0
  1189. package/proof/TARGET-V047-RUNTIME-MANIFEST-PASS.txt +642 -0
  1190. package/proof/TARGET-V050-BATCH-GATE-PASS.sha256 +1 -0
  1191. package/proof/TARGET-V050-BATCH-GATE-PASS.txt +713 -0
  1192. package/proof/TESTS.txt +686 -0
  1193. package/proof/TRUST-EPHEMERAL.txt +4 -0
  1194. package/proof/V03-FREEZE.txt +27 -0
  1195. package/proof/V041-IPC-HOTFIX.txt +16 -0
  1196. package/proof/V042-ENV-HOTFIX.txt +15 -0
  1197. package/proof/V043-DRIVE-CWD-HOTFIX.txt +14 -0
  1198. package/proof/V044-LOCALAPPDATA-HOTFIX.txt +18 -0
  1199. package/proof/V045-OPERATION-REGISTRY.txt +7 -0
  1200. package/proof/V046-WORKER-REGISTRY.txt +12 -0
  1201. package/proof/V047-WORKER-MANIFEST.txt +18 -0
  1202. package/proof/V050-BATCH-TRUST-CLOSURE.txt +21 -0
  1203. package/proof/V060-ACTIVE-NETWORK-AUTHORITY.txt +29 -0
  1204. package/proof/V070-NODE-SYNTAX.txt +36 -0
  1205. package/proof/V070-NODE-TESTS.txt +752 -0
  1206. package/proof/V070-PACK-DRY-RUN.txt +126 -0
  1207. package/proof/V070-SOURCE-GATE.txt +30 -0
  1208. package/proof/V070-STATIC-SCAN.txt +4 -0
  1209. package/proof/V070-WINDOWS-GATE-PENDING.txt +25 -0
  1210. package/proof/V071-NODE-SYNTAX.txt +1 -0
  1211. package/proof/V071-NODE-TESTS.txt +796 -0
  1212. package/proof/V071-PACK-DRY-RUN.json +656 -0
  1213. package/proof/V071-SOURCE-GATE.txt +16 -0
  1214. package/proof/V071-WINDOWS-GATE-PENDING.txt +24 -0
  1215. package/proof/V073-NODE-SYNTAX.txt +4 -0
  1216. package/proof/V073-SOURCE-GATE.txt +21 -0
  1217. package/proof/V073-STATIC-SCAN.txt +10 -0
  1218. package/proof/V073-WINDOWS-GATE-PENDING.txt +5 -0
  1219. package/proof/VERIFY.txt +7 -0
  1220. package/proof/WINDOWS-CONTAINED-STATUS.txt +5 -0
  1221. package/proof/WINDOWS-CONTAINMENT-STATUS.txt +3 -0
  1222. package/scripts/autonomous-benchmark.mjs +12 -0
  1223. package/scripts/autonomous-build.ps1 +20 -0
  1224. package/scripts/autonomous-tests.ps1 +9 -0
  1225. package/scripts/build-containment.ps1 +279 -0
  1226. package/scripts/coding-live-smoke.mjs +5 -0
  1227. package/scripts/deferred-slot-operation.mjs +84 -0
  1228. package/scripts/final-closure-verify.mjs +159 -0
  1229. package/scripts/final-closure.mjs +106 -0
  1230. package/scripts/gate-windows.ps1 +42 -0
  1231. package/scripts/init-host-policy.ps1 +121 -0
  1232. package/scripts/refresh-process-policy.mjs +68 -0
  1233. package/scripts/release-manifest.mjs +187 -0
  1234. package/scripts/release-parity.mjs +190 -0
  1235. package/scripts/runtime-self-update.mjs +15 -0
  1236. package/scripts/windows-gate-evidence.mjs +52 -0
  1237. package/src/agent-mcp-tools.mjs +158 -0
  1238. package/src/agent-runtime.mjs +874 -0
  1239. package/src/audit-context.mjs +73 -0
  1240. package/src/audit-verify.mjs +93 -0
  1241. package/src/authority-smoke.mjs +117 -0
  1242. package/src/autonomous-mcp-tools.mjs +118 -0
  1243. package/src/autonomous-output-contracts.mjs +125 -0
  1244. package/src/autonomous-planner-contracts.mjs +73 -0
  1245. package/src/autonomous-planner.mjs +290 -0
  1246. package/src/autonomous-policy.mjs +146 -0
  1247. package/src/autonomous-runtime.mjs +993 -0
  1248. package/src/autonomous-supervisor.mjs +86 -0
  1249. package/src/canonical-json.mjs +17 -0
  1250. package/src/coding-mcp-tools.mjs +143 -0
  1251. package/src/coding-output-contracts.mjs +189 -0
  1252. package/src/coding-plane.mjs +657 -0
  1253. package/src/coding-search.mjs +55 -0
  1254. package/src/coding-task-runtime.mjs +725 -0
  1255. package/src/contained-cli.mjs +30 -0
  1256. package/src/contained-executor.mjs +276 -0
  1257. package/src/contained-result.mjs +149 -0
  1258. package/src/contained-smoke.mjs +101 -0
  1259. package/src/containment-bootstrap.mjs +94 -0
  1260. package/src/containment-child-control.mjs +109 -0
  1261. package/src/containment-construction.mjs +107 -0
  1262. package/src/containment-result.mjs +87 -0
  1263. package/src/containment-smoke.mjs +71 -0
  1264. package/src/deadbyte-cli.mjs +55 -0
  1265. package/src/executor.mjs +158 -0
  1266. package/src/hash.mjs +17 -0
  1267. package/src/host-plane.mjs +423 -0
  1268. package/src/ingress-mode.mjs +22 -0
  1269. package/src/invocation.mjs +34 -0
  1270. package/src/machine-fs-mcp-tools.mjs +80 -0
  1271. package/src/machine-fs-output-contracts.mjs +67 -0
  1272. package/src/machine-fs-smoke-client.mjs +134 -0
  1273. package/src/machine-fs.mjs +475 -0
  1274. package/src/machine-identity.mjs +275 -0
  1275. package/src/machine-mcp-tools.mjs +43 -0
  1276. package/src/machine-output-contracts.mjs +58 -0
  1277. package/src/mcp-contained-smoke-client.mjs +139 -0
  1278. package/src/mcp-host-smoke-client.mjs +136 -0
  1279. package/src/mcp-server.mjs +419 -0
  1280. package/src/mcp-smoke-client.mjs +136 -0
  1281. package/src/native-diff.mjs +403 -0
  1282. package/src/observation-mcp-tools.mjs +44 -0
  1283. package/src/observation-output-contracts.mjs +50 -0
  1284. package/src/observation-runtime.mjs +257 -0
  1285. package/src/observation-smoke-client.mjs +97 -0
  1286. package/src/operation-policy.mjs +19 -0
  1287. package/src/output-contracts.mjs +252 -0
  1288. package/src/path-policy.mjs +91 -0
  1289. package/src/process-mcp-tools.mjs +72 -0
  1290. package/src/process-output-contracts.mjs +79 -0
  1291. package/src/process-policy.mjs +150 -0
  1292. package/src/process-runtime.mjs +297 -0
  1293. package/src/process-smoke-client.mjs +124 -0
  1294. package/src/proof-cli.mjs +23 -0
  1295. package/src/proof-worker.mjs +11 -0
  1296. package/src/receipt.mjs +111 -0
  1297. package/src/release-generation.mjs +233 -0
  1298. package/src/release-slot.mjs +293 -0
  1299. package/src/remote-mcp-autonomous-smoke-client.mjs +138 -0
  1300. package/src/remote-mcp-coding-smoke-client.mjs +111 -0
  1301. package/src/remote-mcp-host-smoke-client.mjs +84 -0
  1302. package/src/remote-mcp-machine-smoke-client.mjs +66 -0
  1303. package/src/remote-mcp-r24-disarmed-smoke-client.mjs +38 -0
  1304. package/src/remote-mcp-r33-parity-client.mjs +177 -0
  1305. package/src/remote-mcp-smoke-client.mjs +162 -0
  1306. package/src/request-identity.mjs +63 -0
  1307. package/src/runtime-identity.mjs +33 -0
  1308. package/src/runtime-update.mjs +961 -0
  1309. package/src/text-policy.mjs +9 -0
  1310. package/src/tool-audit.mjs +261 -0
  1311. package/src/trust-init.mjs +21 -0
  1312. package/src/trust.mjs +82 -0
  1313. package/src/tunnel-stdio-compat-smoke.mjs +142 -0
  1314. package/src/tunnel-stdio-compat.mjs +126 -0
  1315. package/src/verifier-cli.mjs +13 -0
  1316. package/src/verifier.mjs +333 -0
  1317. package/src/version.mjs +6 -0
  1318. package/src/worker-registry.mjs +108 -0
  1319. package/test/DEADBYTE-MCP-WRITE-PROBE.txt +5 -0
  1320. package/test/agent-crash-child.mjs +25 -0
  1321. package/test/agent-crash-worker.mjs +19 -0
  1322. package/test/agent-runtime-adversarial.test.mjs +228 -0
  1323. package/test/agent-runtime-crash.test.mjs +76 -0
  1324. package/test/agent-runtime.test.mjs +124 -0
  1325. package/test/agent-task-receipt.test.mjs +73 -0
  1326. package/test/audit-context.test.mjs +50 -0
  1327. package/test/audit-server-integration.test.mjs +30 -0
  1328. package/test/audit-verify.test.mjs +32 -0
  1329. package/test/autonomous-adversarial.test.mjs +329 -0
  1330. package/test/autonomous-live-fixture.test.mjs +10 -0
  1331. package/test/autonomous-loop.test.mjs +188 -0
  1332. package/test/autonomous-output-contract.test.mjs +24 -0
  1333. package/test/autonomous-runtime.test.mjs +93 -0
  1334. package/test/autonomous-supervisor-integration.test.mjs +106 -0
  1335. package/test/cli-entrypoint.test.mjs +34 -0
  1336. package/test/coding-crash.test.mjs +74 -0
  1337. package/test/coding-observation.test.mjs +62 -0
  1338. package/test/coding-plane-adversarial.test.mjs +130 -0
  1339. package/test/coding-plane.test.mjs +93 -0
  1340. package/test/coding-runtime.test.mjs +165 -0
  1341. package/test/contained.test.mjs +931 -0
  1342. package/test/containment.test.mjs +557 -0
  1343. package/test/controller-r21.test.mjs +28 -0
  1344. package/test/controller-r211.test.mjs +21 -0
  1345. package/test/controller-r212.test.mjs +31 -0
  1346. package/test/controller-r24-dns.test.mjs +14 -0
  1347. package/test/controller-r24.test.mjs +32 -0
  1348. package/test/controller-r27.test.mjs +56 -0
  1349. package/test/controller-r29.test.mjs +25 -0
  1350. package/test/controller-r30.test.mjs +30 -0
  1351. package/test/controller.test.mjs +165 -0
  1352. package/test/core.test.mjs +305 -0
  1353. package/test/deferred-slot-operation-behavior.test.mjs +29 -0
  1354. package/test/deferred-slot-operation.test.mjs +18 -0
  1355. package/test/helpers/coding-crash-child.mjs +22 -0
  1356. package/test/host-plane.test.mjs +129 -0
  1357. package/test/machine-fs-mcp-tools.test.mjs +46 -0
  1358. package/test/machine-fs-runtime.test.mjs +105 -0
  1359. package/test/machine-identity.test.mjs +131 -0
  1360. package/test/machine-mcp-integration.test.mjs +88 -0
  1361. package/test/machine-mcp-tools.test.mjs +77 -0
  1362. package/test/mcp-contained-smoke-isolation.test.mjs +14 -0
  1363. package/test/named-tunnel-host.test.mjs +27 -0
  1364. package/test/native-diff.test.mjs +102 -0
  1365. package/test/observation-integration.test.mjs +56 -0
  1366. package/test/observation-mcp-tools.test.mjs +40 -0
  1367. package/test/observation-runtime.test.mjs +123 -0
  1368. package/test/output-schema.test.mjs +86 -0
  1369. package/test/package-boundary.test.mjs +38 -0
  1370. package/test/process-mcp-tools.test.mjs +71 -0
  1371. package/test/process-native.test.mjs +78 -0
  1372. package/test/process-policy-refresh.test.mjs +64 -0
  1373. package/test/process-policy.test.mjs +118 -0
  1374. package/test/process-release-gate.test.mjs +41 -0
  1375. package/test/process-runtime.test.mjs +184 -0
  1376. package/test/process-supervision.test.mjs +24 -0
  1377. package/test/r33-closeout-regression.test.mjs +109 -0
  1378. package/test/r33-finalization.test.mjs +67 -0
  1379. package/test/release-generation.test.mjs +116 -0
  1380. package/test/release-manifest-windows.test.mjs +89 -0
  1381. package/test/release-slot.test.mjs +122 -0
  1382. package/test/release-smoke-isolation.test.mjs +22 -0
  1383. package/test/release-version.test.mjs +35 -0
  1384. package/test/remote-r24-catalog.test.mjs +75 -0
  1385. package/test/runtime-self-update.test.mjs +280 -0
  1386. package/test/standing-grants.test.mjs +77 -0
  1387. package/test/tool-audit.test.mjs +134 -0
  1388. package/test/tunnel-stdio-compat.test.mjs +163 -0
  1389. package/workspaces/autonomous-live/fixture.txt +1 -0
  1390. package/workspaces/demo/input.txt +1 -0
@@ -0,0 +1,134 @@
1
+ import { createHash, randomBytes } from 'node:crypto';
2
+ import { mkdtemp, mkdir, readFile, rm, writeFile } from 'node:fs/promises';
3
+ import os from 'node:os';
4
+ import path from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+ import { Client } from '@modelcontextprotocol/client';
7
+ import { StdioClientTransport, getDefaultEnvironment } from '@modelcontextprotocol/client/stdio';
8
+ import { CODING_GRANT_SCHEMA, loadCodingPolicy } from './coding-plane.mjs';
9
+ import { verifyMachineFsReceiptFile } from './machine-fs.mjs';
10
+ import { generateTrustKeypair } from './trust.mjs';
11
+
12
+ const here = path.dirname(fileURLToPath(import.meta.url));
13
+ const repoRoot = path.resolve(here, '..');
14
+ const serverPath = path.join(repoRoot, 'src', 'mcp-server.mjs');
15
+ const sha256 = bytes => createHash('sha256').update(bytes).digest('hex');
16
+ const structured = (result, label) => {
17
+ if (result.isError) throw new Error(`${label} returned error: ${JSON.stringify(result.structuredContent ?? result.content)}`);
18
+ if (!result.structuredContent || typeof result.structuredContent !== 'object') throw new Error(`${label} missing structured output`);
19
+ return result.structuredContent;
20
+ };
21
+
22
+ const scratch = await mkdtemp(path.join(os.tmpdir(), 'deadbyte-machine-fs-smoke-'));
23
+ const coreRoot = path.join(scratch, 'core');
24
+ const trustRoot = path.join(scratch, 'trust');
25
+ await mkdir(coreRoot, { recursive: true });
26
+ await mkdir(trustRoot, { recursive: true });
27
+ const keys = await generateTrustKeypair({
28
+ privateKeyPath: path.join(trustRoot, 'private.pem'),
29
+ publicKeyPath: path.join(trustRoot, 'public.pem')
30
+ });
31
+ const policyPath = path.join(scratch, 'coding-policy.json');
32
+ const grantPath = path.join(scratch, 'coding-grant.json');
33
+ const evidenceDir = path.join(scratch, 'evidence');
34
+ const rawPolicy = {
35
+ schema: 'deadbyte.coding-policy.v1', enabled: true,
36
+ lease_file: grantPath, evidence_dir: evidenceDir,
37
+ roots: { core: { path: coreRoot, read: true, write: true, exec: false, deny_paths: ['.deadbyte-machine-fs-recovery'] } },
38
+ commands: {}, max_read_bytes: 1024 * 1024, max_write_bytes: 1024 * 1024
39
+ };
40
+ const policyBytes = Buffer.from(`${JSON.stringify(rawPolicy, null, 2)}\n`, 'utf8');
41
+ await writeFile(policyPath, policyBytes, { flag: 'wx' });
42
+ const policy = await loadCodingPolicy(policyPath);
43
+ await writeFile(grantPath, `${JSON.stringify({
44
+ schema: CODING_GRANT_SCHEMA, policy_sha256: policy.policy_sha256,
45
+ instance_nonce: randomBytes(32).toString('hex'), root_ids: ['core'],
46
+ granted_at_utc: new Date().toISOString()
47
+ }, null, 2)}\n`, { flag: 'wx' });
48
+
49
+ const client = new Client({ name: 'deadbyte-machine-fs-smoke', version: '0.8.0' },
50
+ { versionNegotiation: { mode: { pin: '2026-07-28' } } });
51
+ const transport = new StdioClientTransport({
52
+ command: process.execPath, args: [serverPath], cwd: repoRoot,
53
+ env: { ...getDefaultEnvironment(), DEADBYTE_CODING_RUNTIME: '1', DEADBYTE_MACHINE_FS_RUNTIME: '1',
54
+ DEADBYTE_CODING_POLICY: policyPath, DEADBYTE_SIGNING_KEY: keys.privateKeyPath,
55
+ DEADBYTE_VERIFY_KEY: keys.publicKeyPath }, stderr: 'pipe'
56
+ });
57
+ const stderrChunks = [];
58
+ transport.stderr?.on('data', chunk => stderrChunks.push(Buffer.from(chunk)));
59
+ const baseTools = ['contained_transform','evidence_verify','file_read','proof_execute','workspace_open'];
60
+ const codingTools = [
61
+ 'coding_benchmark_run','coding_command_run','coding_file_read','coding_file_write',
62
+ 'coding_receipt_verify','coding_search','coding_session_status','coding_stat',
63
+ 'coding_task_approve','coding_task_cancel','coding_task_events','coding_task_run',
64
+ 'coding_task_status','coding_task_submit','coding_task_verify','coding_text_replace','coding_tree'
65
+ ];
66
+ const machineFsTools = [
67
+ 'machine_fs_delete','machine_fs_edit_exact','machine_fs_list','machine_fs_mkdir',
68
+ 'machine_fs_move','machine_fs_read','machine_fs_stat','machine_fs_write'
69
+ ];
70
+ const expectedCatalog = [...baseTools, ...codingTools, ...machineFsTools].sort();
71
+ const receipts = [];
72
+ const remember = (operation, result) => {
73
+ if (result.status !== 'committed' || !/^[0-9a-f]{24}$/.test(result.receipt_id ?? '')) throw new Error(`${operation} missing committed receipt`);
74
+ receipts.push({ operation, receipt_id: result.receipt_id });
75
+ return result;
76
+ };
77
+ try {
78
+ await client.connect(transport);
79
+ const listed = await client.listTools();
80
+ const names = listed.tools.map(tool => tool.name).sort();
81
+ if (JSON.stringify(names) !== JSON.stringify(expectedCatalog)) throw new Error(`machine fs smoke catalog mismatch: ${JSON.stringify(names)}`);
82
+ for (const tool of listed.tools) {
83
+ if (tool.outputSchema?.type !== 'object' || tool.outputSchema?.additionalProperties !== false) throw new Error(`tool ${tool.name} missing strict output schema`);
84
+ }
85
+ const rootStat = structured(await client.callTool({ name:'machine_fs_stat', arguments:{ root_id:'core', path:'.', hash:false } }), 'machine_fs_stat(root)');
86
+ if (rootStat.status !== 'ok' || rootStat.kind !== 'directory') throw new Error('machine fs root stat malformed');
87
+ const made = remember('machine_fs_mkdir', structured(await client.callTool({
88
+ name:'machine_fs_mkdir', arguments:{ root_id:'core', path:'case' }
89
+ }), 'machine_fs_mkdir'));
90
+ const written = remember('machine_fs_write', structured(await client.callTool({
91
+ name:'machine_fs_write', arguments:{ root_id:'core', path:'case/a.txt', content:'alpha', encoding:'utf8', expected_sha256:'absent' }
92
+ }), 'machine_fs_write'));
93
+ if (written.sha256 !== sha256(Buffer.from('alpha'))) throw new Error('machine fs write digest mismatch');
94
+ const listedCase = structured(await client.callTool({
95
+ name:'machine_fs_list', arguments:{ root_id:'core', path:'case', cursor:null, limit:1, hash_files:true }
96
+ }), 'machine_fs_list');
97
+ if (listedCase.status !== 'ok' || listedCase.entries.length !== 1 || listedCase.entries[0].path !== 'case/a.txt') throw new Error('machine fs list malformed');
98
+ const read = structured(await client.callTool({
99
+ name:'machine_fs_read', arguments:{ root_id:'core', path:'case/a.txt', offset:0, max_bytes:5, hash_file:true }
100
+ }), 'machine_fs_read');
101
+ if (read.status !== 'ok' || Buffer.from(read.data_base64, 'base64').toString('utf8') !== 'alpha' || read.file_sha256 !== written.sha256) throw new Error('machine fs read malformed');
102
+ const edited = remember('machine_fs_edit_exact', structured(await client.callTool({
103
+ name:'machine_fs_edit_exact', arguments:{ root_id:'core', path:'case/a.txt', expected_sha256:written.sha256,
104
+ old_string:'alpha', new_string:'beta', expected_replacements:1 }
105
+ }), 'machine_fs_edit_exact'));
106
+ if (edited.sha256 !== sha256(Buffer.from('beta'))) throw new Error('machine fs edit digest mismatch');
107
+ const fileStat = structured(await client.callTool({
108
+ name:'machine_fs_stat', arguments:{ root_id:'core', path:'case/a.txt', hash:true }
109
+ }), 'machine_fs_stat(file)');
110
+ if (fileStat.status !== 'ok' || fileStat.sha256 !== edited.sha256 || !/^[0-9a-f]{64}$/.test(fileStat.identity_sha256 ?? '')) throw new Error('machine fs file stat malformed');
111
+ const moved = remember('machine_fs_move', structured(await client.callTool({
112
+ name:'machine_fs_move', arguments:{ root_id:'core', source_path:'case/a.txt', destination_path:'case/b.txt', expected_source_identity:fileStat.identity_sha256 }
113
+ }), 'machine_fs_move'));
114
+ if (moved.identity_sha256 !== fileStat.identity_sha256) throw new Error('machine fs move identity mismatch');
115
+ const deleted = remember('machine_fs_delete', structured(await client.callTool({
116
+ name:'machine_fs_delete', arguments:{ root_id:'core', path:'case/b.txt', expected_source_identity:moved.identity_sha256 }
117
+ }), 'machine_fs_delete'));
118
+ if (!/^[0-9a-f]{64}$/.test(deleted.recovery_key ?? '')) throw new Error('machine fs delete recovery key malformed');
119
+ for (const item of receipts) {
120
+ const verified = await verifyMachineFsReceiptFile({ policy, verifyKeyPath:keys.publicKeyPath, receiptId:item.receipt_id });
121
+ if (!verified.ok || verified.signature_valid !== true || verified.operation !== item.operation) throw new Error(`machine fs receipt verify failed for ${item.operation}`);
122
+ }
123
+ console.log(JSON.stringify({ status:'passed', protocol_revision:'2026-07-28', tool_count:names.length,
124
+ root_id:'core', mutation_receipts:receipts.length, delete_recovery_key:deleted.recovery_key,
125
+ policy_sha256:policy.policy_sha256, strict_output_schemas:true, signature_valid:true }, null, 2));
126
+ } catch (error) {
127
+ const stderr = Buffer.concat(stderrChunks).toString('utf8').trim();
128
+ if (stderr) console.error(`server stderr:\n${stderr}`);
129
+ console.error(error instanceof Error ? error.stack : String(error));
130
+ process.exitCode = 1;
131
+ } finally {
132
+ await client.close().catch(() => {});
133
+ await rm(scratch, { recursive:true, force:true }).catch(() => {});
134
+ }
@@ -0,0 +1,475 @@
1
+ import { createHash, randomBytes, sign as cryptoSign, verify as cryptoVerify } from 'node:crypto';
2
+ import { createReadStream } from 'node:fs';
3
+ import { lstat, mkdir as fsMkdir, open, readFile, readdir, realpath, rename, rm, rmdir } from 'node:fs/promises';
4
+ import path from 'node:path';
5
+ import { canonicalJson } from './canonical-json.mjs';
6
+ import { assertCodingArmed } from './coding-plane.mjs';
7
+ import { isInside, validatePortableRelativePath } from './path-policy.mjs';
8
+ import { decodeUtf8Strict } from './text-policy.mjs';
9
+ import { loadPrivateSigningKey, loadPublicVerifyKey } from './trust.mjs';
10
+
11
+ export const MACHINE_FS_RECEIPT_SCHEMA = 'deadbyte.machine-fs-receipt.v1';
12
+ const RECEIPT_DOMAIN = Buffer.from('DEADBYTE-MACHINE-FS-RECEIPT-V1\0', 'utf8');
13
+ const SHA256_RE = /^[0-9a-f]{64}$/;
14
+ const RECEIPT_ID_RE = /^[0-9a-f]{24}$/;
15
+ const MAX_LIST_LIMIT = 1000;
16
+ const MAX_DIRECTORY_IDENTITY_ENTRIES = 4096;
17
+
18
+ const sha256Bytes = bytes => createHash('sha256').update(bytes).digest('hex');
19
+ const sha256Object = value => sha256Bytes(Buffer.from(canonicalJson(value), 'utf8'));
20
+ const nowUtc = () => new Date().toISOString();
21
+ async function sha256File(file) {
22
+ const hash = createHash('sha256');
23
+ await new Promise((resolve, reject) => {
24
+ const stream = createReadStream(file);
25
+ stream.on('data', chunk => hash.update(chunk));
26
+ stream.once('error', reject);
27
+ stream.once('end', resolve);
28
+ });
29
+ return hash.digest('hex');
30
+ }
31
+
32
+ function getRoot(policy, rootId, permission) {
33
+ const root = policy.roots[rootId];
34
+ if (!root) throw new Error(`machine fs root '${rootId}' is not allowed`);
35
+ if (root[permission] !== true) throw new Error(`machine fs root '${rootId}' does not allow ${permission}`);
36
+ return root;
37
+ }
38
+
39
+ function normalizeRelative(relativePath, allowDot = false) {
40
+ if (allowDot && relativePath === '.') return '.';
41
+ validatePortableRelativePath(relativePath);
42
+ return relativePath.replaceAll('\\', '/');
43
+ }
44
+
45
+ function assertNotDenied(root, relativePath) {
46
+ const normalized = relativePath.replaceAll('\\', '/').replace(/^\.\//, '');
47
+ for (const deniedRaw of root.deny_paths ?? []) {
48
+ const denied = deniedRaw.replaceAll('\\', '/').replace(/^\.\//, '').replace(/\/$/, '');
49
+ if (normalized === denied || normalized.startsWith(`${denied}/`)) throw new Error(`machine fs path '${relativePath}' is denied by policy`);
50
+ }
51
+ }
52
+ async function assertNoReparse(rootPath, target, allowMissingLeaf = false) {
53
+ const relative = path.relative(rootPath, target);
54
+ if (relative === '') return;
55
+ if (relative.startsWith('..') || path.isAbsolute(relative)) throw new Error('machine fs path escapes allowed root');
56
+ const parts = relative.split(path.sep).filter(Boolean);
57
+ let cursor = rootPath;
58
+ for (let i = 0; i < parts.length; i += 1) {
59
+ cursor = path.join(cursor, parts[i]);
60
+ try {
61
+ const info = await lstat(cursor);
62
+ if (info.isSymbolicLink()) throw new Error(`machine fs reparse point denied at '${parts.slice(0, i + 1).join('/')}'`);
63
+ } catch (error) {
64
+ if (allowMissingLeaf && i === parts.length - 1 && error?.code === 'ENOENT') return;
65
+ throw error;
66
+ }
67
+ }
68
+ }
69
+
70
+ async function resolveExisting(policy, grant, rootId, relativePath, permission, allowDot = false) {
71
+ const normalized = normalizeRelative(relativePath, allowDot);
72
+ if (!grant.root_ids.includes(rootId)) throw new Error(`machine fs root '${rootId}' is outside active grant`);
73
+ const root = getRoot(policy, rootId, permission);
74
+ if (normalized !== '.') assertNotDenied(root, normalized);
75
+ const lexical = normalized === '.' ? root.real_path : path.resolve(root.real_path, normalized);
76
+ if (!isInside(root.real_path, lexical) && lexical !== root.real_path) throw new Error('machine fs path escapes allowed root');
77
+ await assertNoReparse(root.real_path, lexical, false);
78
+ const resolved = await realpath(lexical);
79
+ if (!isInside(root.real_path, resolved) && resolved !== root.real_path) throw new Error('machine fs path resolves outside allowed root');
80
+ return { root, lexical, resolved, relative: normalized };
81
+ }
82
+ async function resolveTarget(policy, grant, rootId, relativePath, permission) {
83
+ const normalized = normalizeRelative(relativePath, false);
84
+ if (!grant.root_ids.includes(rootId)) throw new Error(`machine fs root '${rootId}' is outside active grant`);
85
+ const root = getRoot(policy, rootId, permission);
86
+ assertNotDenied(root, normalized);
87
+ const lexical = path.resolve(root.real_path, normalized);
88
+ if (!isInside(root.real_path, lexical)) throw new Error('machine fs target escapes allowed root');
89
+ const parent = path.dirname(lexical);
90
+ await assertNoReparse(root.real_path, parent, false);
91
+ const realParent = await realpath(parent);
92
+ if (!isInside(root.real_path, realParent) && realParent !== root.real_path) throw new Error('machine fs parent resolves outside allowed root');
93
+ const parentInfo = await lstat(realParent);
94
+ if (!parentInfo.isDirectory()) throw new Error('machine fs parent must be a directory');
95
+ await assertNoReparse(root.real_path, lexical, true);
96
+ return { root, lexical, relative: normalized };
97
+ }
98
+
99
+ function kindOf(info) {
100
+ if (info.isFile()) return 'file';
101
+ if (info.isDirectory()) return 'directory';
102
+ if (info.isSymbolicLink()) return 'reparse';
103
+ return 'other';
104
+ }
105
+
106
+ async function regularState(file) {
107
+ try {
108
+ const info = await lstat(file);
109
+ if (info.isSymbolicLink() || !info.isFile()) throw new Error('machine fs write target must be a regular file');
110
+ return { exists: true, sha256: await sha256File(file), bytes: info.size };
111
+ } catch (error) {
112
+ if (error?.code === 'ENOENT') return { exists: false, sha256: null, bytes: 0 };
113
+ throw error;
114
+ }
115
+ }
116
+ function checkExpectedFile(state, expected) {
117
+ if (expected === 'absent') {
118
+ if (state.exists) throw new Error(`machine fs precondition mismatch: expected absent, found ${state.sha256}`);
119
+ return;
120
+ }
121
+ if (typeof expected !== 'string' || !SHA256_RE.test(expected)) throw new Error('expected_sha256 must be absent or lowercase SHA-256');
122
+ if (!state.exists) throw new Error('machine fs precondition mismatch: expected existing file, found absent');
123
+ if (state.sha256 !== expected) throw new Error(`machine fs precondition mismatch: expected ${expected}, found ${state.sha256}`);
124
+ }
125
+
126
+ function decodeContent(content, encoding) {
127
+ if (typeof content !== 'string') throw new Error('content must be a string');
128
+ if (encoding === 'utf8') return Buffer.from(content, 'utf8');
129
+ if (encoding === 'base64') {
130
+ if (!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(content)) throw new Error('invalid base64 content');
131
+ return Buffer.from(content, 'base64');
132
+ }
133
+ throw new Error('encoding must be utf8 or base64');
134
+ }
135
+
136
+ async function objectIdentity(target, budget = { remaining: MAX_DIRECTORY_IDENTITY_ENTRIES }) {
137
+ if (budget.remaining <= 0) throw new Error('machine fs object identity entry limit exceeded');
138
+ budget.remaining -= 1;
139
+ const info = await lstat(target);
140
+ if (info.isSymbolicLink()) throw new Error('machine fs reparse target denied');
141
+ const kind = kindOf(info);
142
+ if (!['file', 'directory'].includes(kind)) throw new Error(`machine fs unsupported object kind '${kind}'`);
143
+ if (kind === 'file') {
144
+ const core = { kind, bytes: info.size, content_sha256: await sha256File(target) };
145
+ return { ...core, identity_sha256: sha256Object(core) };
146
+ }
147
+ const children = await readdir(target, { withFileTypes: true });
148
+ children.sort((a, b) => a.name.localeCompare(b.name));
149
+ const entries = [];
150
+ for (const child of children) {
151
+ if (child.isSymbolicLink()) throw new Error(`machine fs reparse point denied in identity: '${child.name}'`);
152
+ const childIdentity = await objectIdentity(path.join(target, child.name), budget);
153
+ entries.push({ name: child.name, kind: childIdentity.kind, identity_sha256: childIdentity.identity_sha256 });
154
+ }
155
+ const core = { kind, entries };
156
+ return { ...core, identity_sha256: sha256Object(core) };
157
+ }
158
+
159
+ function decodeCursor(cursor) {
160
+ if (cursor === null || cursor === undefined) return null;
161
+ if (typeof cursor !== 'string' || cursor.length < 1 || cursor.length > 2048) throw new Error('machine fs cursor invalid');
162
+ let decoded;
163
+ try { decoded = Buffer.from(cursor, 'base64url').toString('utf8'); }
164
+ catch { throw new Error('machine fs cursor invalid'); }
165
+ if (!decoded || Buffer.from(decoded, 'utf8').toString('base64url') !== cursor) throw new Error('machine fs cursor invalid');
166
+ return decoded;
167
+ }
168
+
169
+ function encodeCursor(name) { return Buffer.from(name, 'utf8').toString('base64url'); }
170
+
171
+ async function signReceipt(policy, signingKeyPath, grant, operation, requestSha256, body) {
172
+ await fsMkdir(path.join(policy.evidence_dir, 'machine-fs'), { recursive: true });
173
+ const receiptId = randomBytes(12).toString('hex');
174
+ const core = {
175
+ schema: MACHINE_FS_RECEIPT_SCHEMA, receipt_id: receiptId,
176
+ policy_sha256: policy.policy_sha256, grant_instance_nonce: grant.instance_nonce,
177
+ operation, request_sha256: requestSha256, ...body
178
+ };
179
+ const receiptSha256 = sha256Object(core);
180
+ const signedBody = { ...core, receipt_sha256: receiptSha256 };
181
+ const signing = await loadPrivateSigningKey(signingKeyPath);
182
+ const bytes = Buffer.from(canonicalJson(signedBody), 'utf8');
183
+ const signature = cryptoSign(null, Buffer.concat([RECEIPT_DOMAIN, bytes]), signing.privateKey).toString('base64');
184
+ const receipt = {
185
+ ...signedBody,
186
+ attestation: { algorithm: 'ed25519', key_id: signing.keyId, signature_base64: signature }
187
+ };
188
+ const target = path.join(policy.evidence_dir, 'machine-fs', `${receiptId}.json`);
189
+ const handle = await open(target, 'wx', 0o600);
190
+ try { await handle.writeFile(`${canonicalJson(receipt)}\n`); await handle.sync(); }
191
+ finally { await handle.close(); }
192
+ return { receipt, receipt_path: target };
193
+ }
194
+
195
+ export async function verifyMachineFsReceiptFile({ policy, verifyKeyPath, receiptId }) {
196
+ if (!RECEIPT_ID_RE.test(receiptId ?? '')) return { ok: false, reason: 'invalid receipt_id' };
197
+ const file = path.join(policy.evidence_dir, 'machine-fs', `${receiptId}.json`);
198
+ let receipt;
199
+ try { receipt = JSON.parse(decodeUtf8Strict(await readFile(file))); }
200
+ catch { return { ok: false, reason: 'receipt missing or unreadable' }; }
201
+ if (receipt?.schema !== MACHINE_FS_RECEIPT_SCHEMA || receipt.receipt_id !== receiptId || receipt.policy_sha256 !== policy.policy_sha256) {
202
+ return { ok: false, reason: 'machine fs receipt identity mismatch' };
203
+ }
204
+ const { attestation, receipt_sha256: claimed, ...body } = receipt;
205
+ if (!SHA256_RE.test(claimed ?? '') || sha256Object(body) !== claimed) return { ok: false, reason: 'machine fs receipt hash mismatch' };
206
+ const verifyKey = await loadPublicVerifyKey(verifyKeyPath);
207
+ if (attestation?.algorithm !== 'ed25519' || attestation?.key_id !== verifyKey.keyId || typeof attestation?.signature_base64 !== 'string') {
208
+ return { ok: false, reason: 'machine fs receipt attestation mismatch' };
209
+ }
210
+ const signature = Buffer.from(attestation.signature_base64, 'base64');
211
+ const signedBytes = Buffer.from(canonicalJson({ ...body, receipt_sha256: claimed }), 'utf8');
212
+ const valid = signature.length === 64 && cryptoVerify(null, Buffer.concat([RECEIPT_DOMAIN, signedBytes]), verifyKey.publicKey, signature);
213
+ if (!valid) return { ok: false, reason: 'machine fs receipt signature mismatch' };
214
+ return { ok: true, signature_valid: true, receipt_sha256: claimed, operation: receipt.operation, request_sha256: receipt.request_sha256 };
215
+ }
216
+
217
+ function requestSha(operation, args) {
218
+ return sha256Object({ schema: 'deadbyte.machine-fs-request.v1', operation, args });
219
+ }
220
+
221
+ async function atomicWrite(target, bytes, expectedSha256) {
222
+ const before = await regularState(target);
223
+ checkExpectedFile(before, expectedSha256);
224
+ const temp = path.join(path.dirname(target), `.${path.basename(target)}.deadbyte-machine-fs-${process.pid}-${randomBytes(8).toString('hex')}.tmp`);
225
+ let handle;
226
+ try {
227
+ handle = await open(temp, 'wx', 0o600);
228
+ await handle.writeFile(bytes);
229
+ await handle.sync();
230
+ await handle.close();
231
+ handle = null;
232
+ checkExpectedFile(await regularState(target), expectedSha256);
233
+ await rename(temp, target);
234
+ } catch (error) {
235
+ if (handle) await handle.close().catch(() => {});
236
+ await rm(temp, { force: true }).catch(() => {});
237
+ throw error;
238
+ }
239
+ const after = await regularState(target);
240
+ const expectedAfter = sha256Bytes(bytes);
241
+ if (!after.exists || after.sha256 !== expectedAfter) throw new Error('machine fs post-commit hash mismatch');
242
+ return { before, after };
243
+ }
244
+
245
+ export function createMachineFsRuntime({ policy, signingKeyPath, verifyKeyPath }) {
246
+ if (!policy) throw new Error('machine fs runtime requires coding policy');
247
+ if (!signingKeyPath || !verifyKeyPath) throw new Error('machine fs runtime requires trust key paths');
248
+
249
+ async function statPath({ rootId, relativePath = '.', hash = false }) {
250
+ const grant = await assertCodingArmed(policy, rootId);
251
+ const found = await resolveExisting(policy, grant, rootId, relativePath, 'read', true);
252
+ const info = await lstat(found.resolved);
253
+ const kind = kindOf(info);
254
+ if (kind === 'reparse') throw new Error('machine fs reparse target denied');
255
+ const identity = await objectIdentity(found.resolved);
256
+ return {
257
+ status: 'ok', root_id: rootId, path: found.relative, kind,
258
+ bytes: kind === 'file' ? info.size : 0,
259
+ mtime_utc: info.mtime.toISOString(), ctime_utc: info.ctime.toISOString(),
260
+ birthtime_utc: info.birthtime.toISOString(),
261
+ sha256: hash && kind === 'file' ? identity.content_sha256 : null,
262
+ identity_sha256: identity.identity_sha256
263
+ };
264
+ }
265
+ async function listPage({ rootId, relativePath = '.', cursor = null, limit = 100, hashFiles = false }) {
266
+ if (!Number.isInteger(limit) || limit < 1 || limit > MAX_LIST_LIMIT) throw new Error(`machine fs list limit must be in [1, ${MAX_LIST_LIMIT}]`);
267
+ const grant = await assertCodingArmed(policy, rootId);
268
+ const found = await resolveExisting(policy, grant, rootId, relativePath, 'read', true);
269
+ const info = await lstat(found.resolved);
270
+ if (!info.isDirectory()) throw new Error('machine fs list path must be a directory');
271
+ const afterName = decodeCursor(cursor);
272
+ const children = await readdir(found.resolved, { withFileTypes: true });
273
+ children.sort((a, b) => a.name.localeCompare(b.name));
274
+ const filtered = children.filter(child => afterName === null || child.name.localeCompare(afterName) > 0);
275
+ const selected = filtered.slice(0, limit);
276
+ const entries = [];
277
+ for (const child of selected) {
278
+ const rel = found.relative === '.' ? child.name : `${found.relative}/${child.name}`;
279
+ if (child.isSymbolicLink()) {
280
+ entries.push({ path: rel, kind: 'reparse', bytes: 0, mtime_utc: null, sha256: null });
281
+ continue;
282
+ }
283
+ const childPath = path.join(found.resolved, child.name);
284
+ const childInfo = await lstat(childPath);
285
+ const kind = kindOf(childInfo);
286
+ const digest = hashFiles && kind === 'file' ? await sha256File(childPath) : null;
287
+ entries.push({ path: rel, kind, bytes: kind === 'file' ? childInfo.size : 0, mtime_utc: childInfo.mtime.toISOString(), sha256: digest });
288
+ }
289
+ const nextCursor = filtered.length > selected.length && selected.length ? encodeCursor(selected.at(-1).name) : null;
290
+ return { status: 'ok', root_id: rootId, path: found.relative, entries, next_cursor: nextCursor };
291
+ }
292
+ async function readRange({ rootId, relativePath, offset = 0, maxBytes = 65536, hashFile = false }) {
293
+ if (!Number.isInteger(offset) || offset < 0) throw new Error('machine fs read offset must be nonnegative integer');
294
+ if (!Number.isInteger(maxBytes) || maxBytes < 1 || maxBytes > policy.max_read_bytes) throw new Error(`machine fs max_bytes must be in [1, ${policy.max_read_bytes}]`);
295
+ const grant = await assertCodingArmed(policy, rootId);
296
+ const found = await resolveExisting(policy, grant, rootId, relativePath, 'read', false);
297
+ const info = await lstat(found.resolved);
298
+ if (!info.isFile()) throw new Error('machine fs read target must be a regular file');
299
+ if (offset > info.size) throw new Error('machine fs read offset exceeds file size');
300
+ const handle = await open(found.resolved, 'r');
301
+ const length = Math.min(maxBytes, info.size - offset);
302
+ const buffer = Buffer.alloc(length);
303
+ try { if (length) await handle.read(buffer, 0, length, offset); }
304
+ finally { await handle.close(); }
305
+ const fileSha = hashFile ? await sha256File(found.resolved) : null;
306
+ return {
307
+ status: 'ok', root_id: rootId, path: found.relative,
308
+ offset, next_offset: offset + length, file_size: info.size,
309
+ eof: offset + length >= info.size, data_base64: buffer.toString('base64'),
310
+ data_sha256: sha256Bytes(buffer), file_sha256: fileSha
311
+ };
312
+ }
313
+
314
+ async function writePath({ rootId, relativePath, content, encoding = 'utf8', expectedSha256 }) {
315
+ const grant = await assertCodingArmed(policy, rootId);
316
+ const target = await resolveTarget(policy, grant, rootId, relativePath, 'write');
317
+ const bytes = decodeContent(content, encoding);
318
+ if (bytes.length > policy.max_write_bytes) throw new Error(`machine fs write exceeds ${policy.max_write_bytes} byte limit`);
319
+ const request = requestSha('machine_fs_write', {
320
+ root_id: rootId, path: target.relative, encoding, expected_sha256: expectedSha256,
321
+ content_sha256: sha256Bytes(bytes)
322
+ });
323
+ const started = nowUtc();
324
+ const { before, after } = await atomicWrite(target.lexical, bytes, expectedSha256);
325
+ const signed = await signReceipt(policy, signingKeyPath, grant, 'machine_fs_write', request, {
326
+ root_id: rootId, path: target.relative, started_at_utc: started, completed_at_utc: nowUtc(),
327
+ before_sha256: before.sha256, after_sha256: after.sha256, bytes: after.bytes
328
+ });
329
+ return {
330
+ status: 'committed', root_id: rootId, path: target.relative,
331
+ previous_sha256: before.sha256, sha256: after.sha256, bytes: after.bytes,
332
+ created: !before.exists, receipt_id: signed.receipt.receipt_id,
333
+ receipt_sha256: signed.receipt.receipt_sha256, request_sha256: request
334
+ };
335
+ }
336
+
337
+ async function editExact({ rootId, relativePath, expectedSha256, oldString, newString, expectedReplacements = 1 }) {
338
+ if (!SHA256_RE.test(expectedSha256 ?? '')) throw new Error('machine fs edit expected_sha256 must be lowercase SHA-256');
339
+ if (typeof oldString !== 'string' || oldString.length < 1 || oldString.length > 262144) throw new Error('machine fs old_string invalid');
340
+ if (typeof newString !== 'string' || newString.length > 524288) throw new Error('machine fs new_string invalid');
341
+ if (!Number.isInteger(expectedReplacements) || expectedReplacements < 1 || expectedReplacements > 64) throw new Error('machine fs expected_replacements must be in [1, 64]');
342
+ const grant = await assertCodingArmed(policy, rootId);
343
+ const found = await resolveExisting(policy, grant, rootId, relativePath, 'write', false);
344
+ const beforeBytes = await readFile(found.resolved);
345
+ if (beforeBytes.length > policy.max_write_bytes) throw new Error(`machine fs edit exceeds ${policy.max_write_bytes} byte limit`);
346
+ const beforeSha = sha256Bytes(beforeBytes);
347
+ if (beforeSha !== expectedSha256) throw new Error(`machine fs precondition mismatch: expected ${expectedSha256}, found ${beforeSha}`);
348
+ const text = decodeUtf8Strict(beforeBytes);
349
+ const count = text.split(oldString).length - 1;
350
+ if (count !== expectedReplacements) throw new Error(`machine fs replace count mismatch: expected ${expectedReplacements}, found ${count}`);
351
+ const next = text.split(oldString).join(newString);
352
+ const nextBytes = Buffer.from(next, 'utf8');
353
+ if (nextBytes.length > policy.max_write_bytes) throw new Error(`machine fs edit output exceeds ${policy.max_write_bytes} byte limit`);
354
+ const request = requestSha('machine_fs_edit_exact', {
355
+ root_id: rootId, path: found.relative, expected_sha256: expectedSha256,
356
+ expected_replacements: expectedReplacements,
357
+ old_sha256: sha256Bytes(Buffer.from(oldString, 'utf8')), new_sha256: sha256Bytes(Buffer.from(newString, 'utf8'))
358
+ });
359
+ const started = nowUtc();
360
+ const { after } = await atomicWrite(found.lexical, nextBytes, expectedSha256);
361
+ const signed = await signReceipt(policy, signingKeyPath, grant, 'machine_fs_edit_exact', request, {
362
+ root_id: rootId, path: found.relative, started_at_utc: started, completed_at_utc: nowUtc(),
363
+ before_sha256: beforeSha, after_sha256: after.sha256, replacements: count, bytes: after.bytes
364
+ });
365
+ return {
366
+ status: 'committed', root_id: rootId, path: found.relative, previous_sha256: beforeSha,
367
+ sha256: after.sha256, bytes: after.bytes, replacements: count,
368
+ receipt_id: signed.receipt.receipt_id, receipt_sha256: signed.receipt.receipt_sha256, request_sha256: request
369
+ };
370
+ }
371
+ async function mkdirPath({ rootId, relativePath }) {
372
+ const grant = await assertCodingArmed(policy, rootId);
373
+ const target = await resolveTarget(policy, grant, rootId, relativePath, 'write');
374
+ try { await lstat(target.lexical); throw new Error('machine fs mkdir precondition mismatch: expected absent'); }
375
+ catch (error) { if (error?.code !== 'ENOENT') throw error; }
376
+ const request = requestSha('machine_fs_mkdir', { root_id: rootId, path: target.relative, expected: 'absent' });
377
+ const started = nowUtc();
378
+ await fsMkdir(target.lexical, { recursive: false });
379
+ try {
380
+ const identity = await objectIdentity(target.lexical);
381
+ if (identity.kind !== 'directory') throw new Error('machine fs mkdir post-commit type mismatch');
382
+ const signed = await signReceipt(policy, signingKeyPath, grant, 'machine_fs_mkdir', request, {
383
+ root_id: rootId, path: target.relative, started_at_utc: started, completed_at_utc: nowUtc(),
384
+ before_identity_sha256: null, after_identity_sha256: identity.identity_sha256
385
+ });
386
+ return {
387
+ status: 'committed', root_id: rootId, path: target.relative, identity_sha256: identity.identity_sha256,
388
+ receipt_id: signed.receipt.receipt_id, receipt_sha256: signed.receipt.receipt_sha256, request_sha256: request
389
+ };
390
+ } catch (error) {
391
+ await rmdir(target.lexical).catch(() => {});
392
+ throw error;
393
+ }
394
+ }
395
+ async function movePath({ rootId, sourcePath, destinationPath, expectedSourceIdentity }) {
396
+ if (!SHA256_RE.test(expectedSourceIdentity ?? '')) throw new Error('machine fs expected_source_identity must be lowercase SHA-256');
397
+ const grant = await assertCodingArmed(policy, rootId);
398
+ const source = await resolveExisting(policy, grant, rootId, sourcePath, 'write', false);
399
+ const destination = await resolveTarget(policy, grant, rootId, destinationPath, 'write');
400
+ try { await lstat(destination.lexical); throw new Error('machine fs move destination precondition mismatch: expected absent'); }
401
+ catch (error) { if (error?.code !== 'ENOENT') throw error; }
402
+ const before = await objectIdentity(source.resolved);
403
+ if (before.identity_sha256 !== expectedSourceIdentity) throw new Error(`machine fs source identity mismatch: expected ${expectedSourceIdentity}, found ${before.identity_sha256}`);
404
+ const request = requestSha('machine_fs_move', {
405
+ root_id: rootId, source_path: source.relative, destination_path: destination.relative,
406
+ expected_source_identity: expectedSourceIdentity, destination_expected: 'absent'
407
+ });
408
+ const started = nowUtc();
409
+ const race = await objectIdentity(source.resolved);
410
+ if (race.identity_sha256 !== expectedSourceIdentity) throw new Error(`machine fs source identity mismatch before commit: expected ${expectedSourceIdentity}, found ${race.identity_sha256}`);
411
+ await rename(source.lexical, destination.lexical);
412
+ try {
413
+ const after = await objectIdentity(destination.lexical);
414
+ if (after.identity_sha256 !== expectedSourceIdentity) throw new Error('machine fs move post-commit identity mismatch');
415
+ const signed = await signReceipt(policy, signingKeyPath, grant, 'machine_fs_move', request, {
416
+ root_id: rootId, source_path: source.relative, destination_path: destination.relative,
417
+ started_at_utc: started, completed_at_utc: nowUtc(), source_identity_sha256: expectedSourceIdentity
418
+ });
419
+ return {
420
+ status: 'committed', root_id: rootId, source_path: source.relative, destination_path: destination.relative,
421
+ identity_sha256: expectedSourceIdentity, receipt_id: signed.receipt.receipt_id,
422
+ receipt_sha256: signed.receipt.receipt_sha256, request_sha256: request
423
+ };
424
+ } catch (error) {
425
+ try { await rename(destination.lexical, source.lexical); }
426
+ catch (restoreError) { throw new Error(`machine fs move rollback failed: ${String(error)}; restore=${String(restoreError)}`); }
427
+ throw error;
428
+ }
429
+ }
430
+
431
+ async function deletePath({ rootId, relativePath, expectedSourceIdentity }) {
432
+ if (!SHA256_RE.test(expectedSourceIdentity ?? '')) throw new Error('machine fs expected_source_identity must be lowercase SHA-256');
433
+ const grant = await assertCodingArmed(policy, rootId);
434
+ const source = await resolveExisting(policy, grant, rootId, relativePath, 'write', false);
435
+ const before = await objectIdentity(source.resolved);
436
+ if (before.identity_sha256 !== expectedSourceIdentity) throw new Error(`machine fs source identity mismatch: expected ${expectedSourceIdentity}, found ${before.identity_sha256}`);
437
+ const recoveryRoot = path.join(source.root.real_path, '.deadbyte-machine-fs-recovery');
438
+ await fsMkdir(recoveryRoot, { recursive: true });
439
+ const recoveryKey = sha256Object({ source_path: source.relative, identity_sha256: expectedSourceIdentity });
440
+ const recoveryTarget = path.join(recoveryRoot, recoveryKey);
441
+ try { await lstat(recoveryTarget); throw new Error('machine fs recovery collision'); }
442
+ catch (error) { if (error?.code !== 'ENOENT') throw error; }
443
+ const request = requestSha('machine_fs_delete', { root_id: rootId, path: source.relative, expected_source_identity: expectedSourceIdentity });
444
+ const started = nowUtc();
445
+ await rename(source.lexical, recoveryTarget);
446
+ try {
447
+ const recovered = await objectIdentity(recoveryTarget);
448
+ if (recovered.identity_sha256 !== expectedSourceIdentity) throw new Error('machine fs delete recovery identity mismatch');
449
+ const signed = await signReceipt(policy, signingKeyPath, grant, 'machine_fs_delete', request, {
450
+ root_id: rootId, path: source.relative, started_at_utc: started, completed_at_utc: nowUtc(),
451
+ source_identity_sha256: expectedSourceIdentity, recovery_key: recoveryKey
452
+ });
453
+ return { status: 'committed', root_id: rootId, path: source.relative, identity_sha256: expectedSourceIdentity,
454
+ recovery_key: recoveryKey, receipt_id: signed.receipt.receipt_id,
455
+ receipt_sha256: signed.receipt.receipt_sha256, request_sha256: request };
456
+ } catch (error) {
457
+ try { await rename(recoveryTarget, source.lexical); }
458
+ catch (restoreError) { throw new Error(`machine fs delete rollback failed: ${String(error)}; restore=${String(restoreError)}`); }
459
+ throw error;
460
+ }
461
+ }
462
+
463
+ return Object.freeze({
464
+ policy,
465
+ stat: statPath,
466
+ list: listPage,
467
+ read: readRange,
468
+ write: writePath,
469
+ editExact,
470
+ move: movePath,
471
+ mkdir: mkdirPath,
472
+ delete: deletePath,
473
+ verifyReceipt: receiptId => verifyMachineFsReceiptFile({ policy, verifyKeyPath, receiptId })
474
+ });
475
+ }