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.
- package/DEADBYTE-MCP-R27-FINAL/R27-ADMIN-CLOSURE.json +22 -0
- package/DEADBYTE-MCP-R27-FINAL/R27-CLEANUP-FINAL-RECEIPT.json +24 -0
- package/DEADBYTE-MCP-R27-FINAL/R27-FINAL-CLOSURE.json +188 -0
- package/DEADBYTE-MCP-R27-FINAL/R27-SLOT-UPDATE-RECEIPT.json +109 -0
- package/DEADBYTE-MCP.cmd +4 -0
- package/MANIFEST.SHA256 +1389 -0
- package/README.txt +260 -0
- package/bin/WORKER-REGISTRY.txt +12 -0
- package/bin/appcontainer-stage.exe +0 -0
- package/bin/appcontainer-stage.obj +0 -0
- package/bin/bootstrap-advapi32.exe +0 -0
- package/bin/bootstrap-advapi32.obj +0 -0
- package/bin/bootstrap-exitcode.exe +0 -0
- package/bin/bootstrap-exitcode.obj +0 -0
- package/bin/bootstrap-kernel32.exe +0 -0
- package/bin/bootstrap-kernel32.obj +0 -0
- package/bin/child-control-probe.exe +0 -0
- package/bin/child-control-probe.obj +0 -0
- package/bin/child-control-stage.exe +0 -0
- package/bin/child-control-stage.obj +0 -0
- package/bin/contained-reverse-worker.exe +0 -0
- package/bin/contained-reverse-worker.obj +0 -0
- package/bin/contained-transform-worker.exe +0 -0
- package/bin/contained-transform-worker.obj +0 -0
- package/bin/containment-probe.exe +0 -0
- package/bin/containment-probe.obj +0 -0
- package/bin/deadbyte-contain.exe +0 -0
- package/bin/deadbyte-contain.obj +0 -0
- package/bin/deadbyte-exec.exe +0 -0
- package/bin/deadbyte-exec.obj +0 -0
- package/bin/deadbyte-process-host.exe +0 -0
- package/bin/deadbyte-process-host.obj +0 -0
- package/bin/deadbyte-tunnel-host.exe +0 -0
- package/bin/deadbyte-tunnel-host.obj +0 -0
- package/conpty-input-observer.obj +0 -0
- package/controller/DEADBYTE-MCP.cmd +5 -0
- package/controller/README.TXT +127 -0
- package/controller/deadbyte-controller.config.psd1.example +60 -0
- package/controller/deadbyte-controller.ps1 +1090 -0
- package/controller/deadbyte-host-policy.json.example +33 -0
- package/controller/deadbyte-process-policy.json +47 -0
- package/docs/ARCHITECTURE.md +168 -0
- package/docs/AUTHORITY.md +56 -0
- package/docs/CHILD-CONTROL.md +31 -0
- package/docs/CONSTRUCTION-LADDER.md +84 -0
- package/docs/CONTAINMENT.md +92 -0
- package/docs/EXECUTION.md +330 -0
- package/docs/NETWORK.md +64 -0
- package/docs/R221-STRICT-OUTPUT-CONTRACT.md +24 -0
- package/docs/REFERENCES.txt +117 -0
- package/docs/TRUST.md +46 -0
- package/docs/V070-HARDENING.md +48 -0
- package/docs/V071-HOST-PLANE.md +113 -0
- package/docs/V073-TUNNEL-STDIO-COMPAT.md +37 -0
- package/docs/V080-AGENT-RUNTIME.md +101 -0
- package/docs/V080-R23-CODING-AGENT.md +50 -0
- package/docs/V080-R24-AUTONOMOUS-PRODUCTION.md +74 -0
- package/docs/V081-R25-MANUS-CONTROL-SEMANTICS.md +145 -0
- package/docs/V082-R26-RUNTIME-SELF-UPDATE.md +86 -0
- package/docs/V083-R27-IMMUTABLE-RELEASE-SLOTS.md +55 -0
- package/docs/V084-R28-PERSISTENT-NAMED-TUNNEL.md +57 -0
- package/docs/V085-R29-MACHINE-IDENTITY.md +99 -0
- package/docs/superpowers/plans/2026-09-14-r30-process-plane.md +178 -0
- package/docs/superpowers/plans/2026-09-14-r31-process-prerequisite.md +132 -0
- package/docs/superpowers/plans/2026-09-15-r33-audit-chain-npx.md +132 -0
- package/docs/superpowers/specs/2026-09-14-r30-r33-machine-control-design.md +214 -0
- package/docs/superpowers/specs/2026-09-14-r31-r33-final-baseline-successor-design.md +133 -0
- package/docs/superpowers/specs/2026-09-15-r33-audit-chain-npx-design.md +145 -0
- package/mcp-server.mjs +1 -0
- package/miniconpty.obj +0 -0
- package/native/appcontainer-stage.cpp +353 -0
- package/native/bootstrap-advapi32.cpp +70 -0
- package/native/bootstrap-exitcode.cpp +6 -0
- package/native/bootstrap-kernel32.cpp +47 -0
- package/native/child-control-probe.cpp +67 -0
- package/native/child-control-stage.cpp +347 -0
- package/native/contained-network-proof.h +118 -0
- package/native/contained-reverse-worker.cpp +299 -0
- package/native/contained-transform-worker.cpp +312 -0
- package/native/containment-probe.cpp +269 -0
- package/native/deadbyte-contain.cpp +625 -0
- package/native/deadbyte-exec.cpp +966 -0
- package/native/deadbyte-process-host.cpp +340 -0
- package/native/deadbyte-tunnel-host.cpp +109 -0
- package/node_modules/@modelcontextprotocol/client/LICENSE +216 -0
- package/node_modules/@modelcontextprotocol/client/README.md +26 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-1b6pVpkg.cjs +7531 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-1b6pVpkg.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-97rDpkRx.mjs +7514 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-97rDpkRx.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-FOQRM7up.d.cts +1071 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-FOQRM7up.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-INpkxUi1.d.mts +1071 -0
- package/node_modules/@modelcontextprotocol/client/dist/ajvProvider-INpkxUi1.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-B3ZJEoRM.d.mts +74 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-B3ZJEoRM.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-B3dvjU3F.cjs +986 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-B3dvjU3F.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-BylNJ1R5.mjs +981 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-BylNJ1R5.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-doTkZbTr.d.cts +74 -0
- package/node_modules/@modelcontextprotocol/client/dist/cfWorkerProvider-doTkZbTr.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/chunk-Bnu9O96Y.cjs +60 -0
- package/node_modules/@modelcontextprotocol/client/dist/chunk-Br0eD_fh.mjs +42 -0
- package/node_modules/@modelcontextprotocol/client/dist/dialects-BGO_ZrYF.cjs +46 -0
- package/node_modules/@modelcontextprotocol/client/dist/dialects-BGO_ZrYF.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/dialects-BOhdv1Fc.mjs +34 -0
- package/node_modules/@modelcontextprotocol/client/dist/dialects-BOhdv1Fc.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index-CHhhk6PQ.d.cts +2526 -0
- package/node_modules/@modelcontextprotocol/client/dist/index-CHhhk6PQ.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index-D4xIIEF6.d.mts +2523 -0
- package/node_modules/@modelcontextprotocol/client/dist/index-D4xIIEF6.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.cjs +5690 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.d.cts +3252 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.d.mts +3252 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.mjs +5481 -0
- package/node_modules/@modelcontextprotocol/client/dist/index.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.cjs +14 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.cts +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.mts +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.mjs +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsBrowser.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.cjs +14 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.cts +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.mts +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.mjs +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsNode.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs +21 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.cts +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.mts +13 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs +20 -0
- package/node_modules/@modelcontextprotocol/client/dist/shimsWorkerd.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/src-D_zzAWoS.mjs +7063 -0
- package/node_modules/@modelcontextprotocol/client/dist/src-D_zzAWoS.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/src-NAgB4Mp8.cjs +7431 -0
- package/node_modules/@modelcontextprotocol/client/dist/src-NAgB4Mp8.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs +217 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.cts +96 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.mts +96 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs +212 -0
- package/node_modules/@modelcontextprotocol/client/dist/stdio.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/types-DsbMXNFL.d.cts +1099 -0
- package/node_modules/@modelcontextprotocol/client/dist/types-DsbMXNFL.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/types-mS0yxCL0.d.mts +1099 -0
- package/node_modules/@modelcontextprotocol/client/dist/types-mS0yxCL0.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.cjs +5 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.d.cts +2 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.d.mts +2 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/ajv.mjs +3 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.cjs +3 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.d.cts +2 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.d.mts +2 -0
- package/node_modules/@modelcontextprotocol/client/dist/validators/cfWorker.mjs +3 -0
- package/node_modules/@modelcontextprotocol/client/package.json +166 -0
- package/node_modules/@modelcontextprotocol/core/LICENSE +216 -0
- package/node_modules/@modelcontextprotocol/core/README.md +40 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-BWdKR39I.d.mts +8501 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-BWdKR39I.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-CUe6YdwF.mjs +1678 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-CUe6YdwF.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-CfDMXiII.cjs +2899 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-CfDMXiII.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-hYtaIUZm.d.cts +8501 -0
- package/node_modules/@modelcontextprotocol/core/dist/auth-hYtaIUZm.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/index.cjs +175 -0
- package/node_modules/@modelcontextprotocol/core/dist/index.d.cts +2 -0
- package/node_modules/@modelcontextprotocol/core/dist/index.d.mts +2 -0
- package/node_modules/@modelcontextprotocol/core/dist/index.mjs +3 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.cjs +201 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts +99 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts +99 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/core/dist/internal.mjs +3 -0
- package/node_modules/@modelcontextprotocol/core/package.json +85 -0
- package/node_modules/@modelcontextprotocol/server/LICENSE +216 -0
- package/node_modules/@modelcontextprotocol/server/README.md +30 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CEoC__sr.mjs +7514 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CEoC__sr.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CgI-5L6O.d.mts +1071 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CgI-5L6O.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-FOQRM7up.d.cts +1071 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-FOQRM7up.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-ZaoO9afR.cjs +7531 -0
- package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-ZaoO9afR.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BwbPzsdI.cjs +986 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BwbPzsdI.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-C03CSigr.d.mts +74 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-C03CSigr.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-doTkZbTr.d.cts +74 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-doTkZbTr.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-p3WaZPqB.mjs +981 -0
- package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-p3WaZPqB.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/chunk-Bnu9O96Y.cjs +60 -0
- package/node_modules/@modelcontextprotocol/server/dist/chunk-Br0eD_fh.mjs +42 -0
- package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-CLhGwQTn.d.mts +4043 -0
- package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-CLhGwQTn.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-dBHMsxwf.d.cts +4045 -0
- package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-dBHMsxwf.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/dialects-D8eXzoGv.cjs +46 -0
- package/node_modules/@modelcontextprotocol/server/dist/dialects-D8eXzoGv.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs +34 -0
- package/node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.cjs +2055 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.d.cts +739 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.d.mts +739 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.mjs +1870 -0
- package/node_modules/@modelcontextprotocol/server/dist/index.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/mcp-D7GmuPnv.cjs +2022 -0
- package/node_modules/@modelcontextprotocol/server/dist/mcp-D7GmuPnv.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs +1931 -0
- package/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs +23 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts +11 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts +11 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs +22 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsNode.cjs +12 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.cts +3 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.mts +3 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsNode.mjs +4 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs +30 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts +10 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts +10 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs +29 -0
- package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/src-CX2iR2pK.mjs +7606 -0
- package/node_modules/@modelcontextprotocol/server/dist/src-CX2iR2pK.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/src-STyD_Vvf.cjs +8104 -0
- package/node_modules/@modelcontextprotocol/server/dist/src-STyD_Vvf.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.cjs +564 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.cjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts +107 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts +107 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.mjs +562 -0
- package/node_modules/@modelcontextprotocol/server/dist/stdio.mjs.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/types-DUs7mGBv.d.mts +1099 -0
- package/node_modules/@modelcontextprotocol/server/dist/types-DUs7mGBv.d.mts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/types-DsbMXNFL.d.cts +1099 -0
- package/node_modules/@modelcontextprotocol/server/dist/types-DsbMXNFL.d.cts.map +1 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.cjs +5 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.cts +2 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.mts +2 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.mjs +3 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.cjs +3 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.cts +2 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.mts +2 -0
- package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.mjs +3 -0
- package/node_modules/@modelcontextprotocol/server/package.json +160 -0
- package/node_modules/cross-spawn/LICENSE +21 -0
- package/node_modules/cross-spawn/README.md +89 -0
- package/node_modules/cross-spawn/index.js +39 -0
- package/node_modules/cross-spawn/lib/enoent.js +59 -0
- package/node_modules/cross-spawn/lib/parse.js +91 -0
- package/node_modules/cross-spawn/lib/util/escape.js +47 -0
- package/node_modules/cross-spawn/lib/util/readShebang.js +23 -0
- package/node_modules/cross-spawn/lib/util/resolveCommand.js +52 -0
- package/node_modules/cross-spawn/package.json +73 -0
- package/node_modules/eventsource/LICENSE +22 -0
- package/node_modules/eventsource/README.md +167 -0
- package/node_modules/eventsource/dist/index.cjs +273 -0
- package/node_modules/eventsource/dist/index.cjs.map +1 -0
- package/node_modules/eventsource/dist/index.d.cts +332 -0
- package/node_modules/eventsource/dist/index.d.ts +332 -0
- package/node_modules/eventsource/dist/index.js +273 -0
- package/node_modules/eventsource/dist/index.js.map +1 -0
- package/node_modules/eventsource/package.json +130 -0
- package/node_modules/eventsource/src/EventSource.ts +596 -0
- package/node_modules/eventsource/src/errors.ts +141 -0
- package/node_modules/eventsource/src/index.ts +3 -0
- package/node_modules/eventsource/src/types.ts +152 -0
- package/node_modules/eventsource-parser/LICENSE +21 -0
- package/node_modules/eventsource-parser/README.md +157 -0
- package/node_modules/eventsource-parser/dist/index.cjs +177 -0
- package/node_modules/eventsource-parser/dist/index.cjs.map +1 -0
- package/node_modules/eventsource-parser/dist/index.d.cts +169 -0
- package/node_modules/eventsource-parser/dist/index.d.ts +169 -0
- package/node_modules/eventsource-parser/dist/index.js +177 -0
- package/node_modules/eventsource-parser/dist/index.js.map +1 -0
- package/node_modules/eventsource-parser/dist/stream.cjs +29 -0
- package/node_modules/eventsource-parser/dist/stream.cjs.map +1 -0
- package/node_modules/eventsource-parser/dist/stream.d.cts +134 -0
- package/node_modules/eventsource-parser/dist/stream.d.ts +134 -0
- package/node_modules/eventsource-parser/dist/stream.js +30 -0
- package/node_modules/eventsource-parser/dist/stream.js.map +1 -0
- package/node_modules/eventsource-parser/package.json +92 -0
- package/node_modules/eventsource-parser/src/errors.ts +44 -0
- package/node_modules/eventsource-parser/src/index.ts +8 -0
- package/node_modules/eventsource-parser/src/parse.ts +439 -0
- package/node_modules/eventsource-parser/src/stream.ts +107 -0
- package/node_modules/eventsource-parser/src/types.ts +122 -0
- package/node_modules/eventsource-parser/stream.js +2 -0
- package/node_modules/isexe/.npmignore +2 -0
- package/node_modules/isexe/LICENSE +15 -0
- package/node_modules/isexe/README.md +51 -0
- package/node_modules/isexe/index.js +57 -0
- package/node_modules/isexe/mode.js +41 -0
- package/node_modules/isexe/package.json +31 -0
- package/node_modules/isexe/test/basic.js +221 -0
- package/node_modules/isexe/windows.js +42 -0
- package/node_modules/jose/LICENSE.md +21 -0
- package/node_modules/jose/README.md +150 -0
- package/node_modules/jose/dist/types/index.d.ts +56 -0
- package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +37 -0
- package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +54 -0
- package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +37 -0
- package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +72 -0
- package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +43 -0
- package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +74 -0
- package/node_modules/jose/dist/types/jwk/embedded.d.ts +13 -0
- package/node_modules/jose/dist/types/jwk/thumbprint.d.ts +17 -0
- package/node_modules/jose/dist/types/jwks/local.d.ts +20 -0
- package/node_modules/jose/dist/types/jwks/remote.d.ts +106 -0
- package/node_modules/jose/dist/types/jws/compact/sign.d.ts +25 -0
- package/node_modules/jose/dist/types/jws/compact/verify.d.ts +37 -0
- package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +31 -0
- package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +37 -0
- package/node_modules/jose/dist/types/jws/general/sign.d.ts +52 -0
- package/node_modules/jose/dist/types/jws/general/verify.d.ts +44 -0
- package/node_modules/jose/dist/types/jwt/decrypt.d.ts +41 -0
- package/node_modules/jose/dist/types/jwt/encrypt.d.ts +62 -0
- package/node_modules/jose/dist/types/jwt/sign.d.ts +26 -0
- package/node_modules/jose/dist/types/jwt/unsecured.d.ts +28 -0
- package/node_modules/jose/dist/types/jwt/verify.d.ts +38 -0
- package/node_modules/jose/dist/types/key/export.d.ts +19 -0
- package/node_modules/jose/dist/types/key/generate_key_pair.d.ts +40 -0
- package/node_modules/jose/dist/types/key/generate_secret.d.ts +37 -0
- package/node_modules/jose/dist/types/key/import.d.ts +73 -0
- package/node_modules/jose/dist/types/types.d.ts +871 -0
- package/node_modules/jose/dist/types/util/base64url.d.ts +16 -0
- package/node_modules/jose/dist/types/util/decode_jwt.d.ts +10 -0
- package/node_modules/jose/dist/types/util/decode_protected_header.d.ts +9 -0
- package/node_modules/jose/dist/types/util/errors.d.ts +220 -0
- package/node_modules/jose/dist/webapi/index.js +32 -0
- package/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +9 -0
- package/node_modules/jose/dist/webapi/jwe/compact/encrypt.js +49 -0
- package/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +15 -0
- package/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +65 -0
- package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +51 -0
- package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +177 -0
- package/node_modules/jose/dist/webapi/jwk/embedded.js +33 -0
- package/node_modules/jose/dist/webapi/jwk/thumbprint.js +74 -0
- package/node_modules/jose/dist/webapi/jwks/local.js +70 -0
- package/node_modules/jose/dist/webapi/jwks/remote.js +149 -0
- package/node_modules/jose/dist/webapi/jws/compact/sign.js +22 -0
- package/node_modules/jose/dist/webapi/jws/compact/verify.js +9 -0
- package/node_modules/jose/dist/webapi/jws/flattened/sign.js +32 -0
- package/node_modules/jose/dist/webapi/jws/flattened/verify.js +25 -0
- package/node_modules/jose/dist/webapi/jws/general/sign.js +76 -0
- package/node_modules/jose/dist/webapi/jws/general/verify.js +74 -0
- package/node_modules/jose/dist/webapi/jwt/decrypt.js +21 -0
- package/node_modules/jose/dist/webapi/jwt/encrypt.js +72 -0
- package/node_modules/jose/dist/webapi/jwt/sign.js +18 -0
- package/node_modules/jose/dist/webapi/jwt/unsecured.js +43 -0
- package/node_modules/jose/dist/webapi/jwt/verify.js +15 -0
- package/node_modules/jose/dist/webapi/key/export.js +44 -0
- package/node_modules/jose/dist/webapi/key/generate_key_pair.js +52 -0
- package/node_modules/jose/dist/webapi/key/generate_secret.js +41 -0
- package/node_modules/jose/dist/webapi/key/import.js +61 -0
- package/node_modules/jose/dist/webapi/lib/asn1.js +179 -0
- package/node_modules/jose/dist/webapi/lib/base64.js +22 -0
- package/node_modules/jose/dist/webapi/lib/buffer_utils.js +44 -0
- package/node_modules/jose/dist/webapi/lib/content_encryption.js +134 -0
- package/node_modules/jose/dist/webapi/lib/crypto_key.js +28 -0
- package/node_modules/jose/dist/webapi/lib/deflate.js +52 -0
- package/node_modules/jose/dist/webapi/lib/helpers.js +42 -0
- package/node_modules/jose/dist/webapi/lib/invalid_key_input.js +26 -0
- package/node_modules/jose/dist/webapi/lib/is_key_like.js +17 -0
- package/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +107 -0
- package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +243 -0
- package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +142 -0
- package/node_modules/jose/dist/webapi/lib/jwk_metadata.js +20 -0
- package/node_modules/jose/dist/webapi/lib/jwk_to_key.js +17 -0
- package/node_modules/jose/dist/webapi/lib/jws_algorithms.js +73 -0
- package/node_modules/jose/dist/webapi/lib/jws_sign.js +85 -0
- package/node_modules/jose/dist/webapi/lib/jws_verify.js +139 -0
- package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +232 -0
- package/node_modules/jose/dist/webapi/lib/key.js +147 -0
- package/node_modules/jose/dist/webapi/lib/key_algorithm.js +10 -0
- package/node_modules/jose/dist/webapi/lib/key_descriptor.js +7 -0
- package/node_modules/jose/dist/webapi/lib/key_management.js +262 -0
- package/node_modules/jose/dist/webapi/lib/key_options.js +6 -0
- package/node_modules/jose/dist/webapi/lib/options.js +74 -0
- package/node_modules/jose/dist/webapi/lib/signing.js +26 -0
- package/node_modules/jose/dist/webapi/lib/type_checks.js +33 -0
- package/node_modules/jose/dist/webapi/util/base64url.js +39 -0
- package/node_modules/jose/dist/webapi/util/decode_jwt.js +32 -0
- package/node_modules/jose/dist/webapi/util/decode_protected_header.js +24 -0
- package/node_modules/jose/dist/webapi/util/errors.js +99 -0
- package/node_modules/jose/package.json +198 -0
- package/node_modules/path-key/index.d.ts +40 -0
- package/node_modules/path-key/index.js +16 -0
- package/node_modules/path-key/license +9 -0
- package/node_modules/path-key/package.json +39 -0
- package/node_modules/path-key/readme.md +61 -0
- package/node_modules/pkce-challenge/CHANGELOG.md +114 -0
- package/node_modules/pkce-challenge/LICENSE +21 -0
- package/node_modules/pkce-challenge/README.md +55 -0
- package/node_modules/pkce-challenge/dist/index.browser.d.ts +19 -0
- package/node_modules/pkce-challenge/dist/index.browser.js +75 -0
- package/node_modules/pkce-challenge/dist/index.node.cjs +83 -0
- package/node_modules/pkce-challenge/dist/index.node.d.cts +19 -0
- package/node_modules/pkce-challenge/dist/index.node.d.ts +19 -0
- package/node_modules/pkce-challenge/dist/index.node.js +78 -0
- package/node_modules/pkce-challenge/package.json +59 -0
- package/node_modules/shebang-command/index.js +19 -0
- package/node_modules/shebang-command/license +9 -0
- package/node_modules/shebang-command/package.json +34 -0
- package/node_modules/shebang-command/readme.md +34 -0
- package/node_modules/shebang-regex/index.d.ts +22 -0
- package/node_modules/shebang-regex/index.js +2 -0
- package/node_modules/shebang-regex/license +9 -0
- package/node_modules/shebang-regex/package.json +35 -0
- package/node_modules/shebang-regex/readme.md +33 -0
- package/node_modules/which/LICENSE +15 -0
- package/node_modules/which/README.md +54 -0
- package/node_modules/which/bin/node-which +52 -0
- package/node_modules/which/package.json +43 -0
- package/node_modules/which/which.js +125 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +191 -0
- package/node_modules/zod/index.cjs +33 -0
- package/node_modules/zod/index.d.cts +4 -0
- package/node_modules/zod/index.d.ts +4 -0
- package/node_modules/zod/index.js +4 -0
- package/node_modules/zod/locales/index.cjs +17 -0
- package/node_modules/zod/locales/index.d.cts +1 -0
- package/node_modules/zod/locales/index.d.ts +1 -0
- package/node_modules/zod/locales/index.js +1 -0
- package/node_modules/zod/locales/package.json +7 -0
- package/node_modules/zod/mini/index.cjs +32 -0
- package/node_modules/zod/mini/index.d.cts +3 -0
- package/node_modules/zod/mini/index.d.ts +3 -0
- package/node_modules/zod/mini/index.js +3 -0
- package/node_modules/zod/mini/package.json +7 -0
- package/node_modules/zod/package.json +135 -0
- package/node_modules/zod/src/index.ts +4 -0
- package/node_modules/zod/src/locales/index.ts +1 -0
- package/node_modules/zod/src/mini/index.ts +3 -0
- package/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5138 -0
- package/node_modules/zod/src/v4/classic/checks.ts +32 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +70 -0
- package/node_modules/zod/src/v4/classic/errors.ts +82 -0
- package/node_modules/zod/src/v4/classic/external.ts +52 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +659 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/zod/src/v4/classic/parse.ts +82 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2672 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +216 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +326 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +703 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +409 -0
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +197 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +694 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +807 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +895 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +46 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +325 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +717 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +333 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +450 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +717 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +631 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +633 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +1224 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +3125 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +496 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +273 -0
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1823 -0
- package/node_modules/zod/src/v4/core/checks.ts +1293 -0
- package/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/zod/src/v4/core/core.ts +153 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +455 -0
- package/node_modules/zod/src/v4/core/index.ts +16 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +666 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +147 -0
- package/node_modules/zod/src/v4/core/parse.ts +195 -0
- package/node_modules/zod/src/v4/core/regexes.ts +190 -0
- package/node_modules/zod/src/v4/core/registries.ts +105 -0
- package/node_modules/zod/src/v4/core/schemas.ts +4730 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +215 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +622 -0
- package/node_modules/zod/src/v4/core/util.ts +983 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +115 -0
- package/node_modules/zod/src/v4/locales/az.ts +111 -0
- package/node_modules/zod/src/v4/locales/be.ts +176 -0
- package/node_modules/zod/src/v4/locales/bg.ts +128 -0
- package/node_modules/zod/src/v4/locales/ca.ts +116 -0
- package/node_modules/zod/src/v4/locales/cs.ts +118 -0
- package/node_modules/zod/src/v4/locales/da.ts +123 -0
- package/node_modules/zod/src/v4/locales/de.ts +116 -0
- package/node_modules/zod/src/v4/locales/el.ts +121 -0
- package/node_modules/zod/src/v4/locales/en.ts +123 -0
- package/node_modules/zod/src/v4/locales/eo.ts +118 -0
- package/node_modules/zod/src/v4/locales/es.ts +141 -0
- package/node_modules/zod/src/v4/locales/fa.ts +126 -0
- package/node_modules/zod/src/v4/locales/fi.ts +121 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
- package/node_modules/zod/src/v4/locales/fr.ts +132 -0
- package/node_modules/zod/src/v4/locales/he.ts +246 -0
- package/node_modules/zod/src/v4/locales/hr.ts +131 -0
- package/node_modules/zod/src/v4/locales/hu.ts +117 -0
- package/node_modules/zod/src/v4/locales/hy.ts +164 -0
- package/node_modules/zod/src/v4/locales/id.ts +115 -0
- package/node_modules/zod/src/v4/locales/index.ts +52 -0
- package/node_modules/zod/src/v4/locales/is.ts +119 -0
- package/node_modules/zod/src/v4/locales/it.ts +116 -0
- package/node_modules/zod/src/v4/locales/ja.ts +114 -0
- package/node_modules/zod/src/v4/locales/ka.ts +123 -0
- package/node_modules/zod/src/v4/locales/kh.ts +7 -0
- package/node_modules/zod/src/v4/locales/km.ts +119 -0
- package/node_modules/zod/src/v4/locales/ko.ts +121 -0
- package/node_modules/zod/src/v4/locales/lt.ts +239 -0
- package/node_modules/zod/src/v4/locales/mk.ts +118 -0
- package/node_modules/zod/src/v4/locales/ms.ts +115 -0
- package/node_modules/zod/src/v4/locales/nl.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +116 -0
- package/node_modules/zod/src/v4/locales/ota.ts +117 -0
- package/node_modules/zod/src/v4/locales/pl.ts +118 -0
- package/node_modules/zod/src/v4/locales/ps.ts +126 -0
- package/node_modules/zod/src/v4/locales/pt.ts +116 -0
- package/node_modules/zod/src/v4/locales/ro.ts +129 -0
- package/node_modules/zod/src/v4/locales/ru.ts +176 -0
- package/node_modules/zod/src/v4/locales/sl.ts +118 -0
- package/node_modules/zod/src/v4/locales/sv.ts +119 -0
- package/node_modules/zod/src/v4/locales/ta.ts +118 -0
- package/node_modules/zod/src/v4/locales/th.ts +119 -0
- package/node_modules/zod/src/v4/locales/tr.ts +111 -0
- package/node_modules/zod/src/v4/locales/ua.ts +7 -0
- package/node_modules/zod/src/v4/locales/uk.ts +117 -0
- package/node_modules/zod/src/v4/locales/ur.ts +119 -0
- package/node_modules/zod/src/v4/locales/uz.ts +117 -0
- package/node_modules/zod/src/v4/locales/vi.ts +117 -0
- package/node_modules/zod/src/v4/locales/yo.ts +124 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
- package/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
- package/node_modules/zod/src/v4/mini/external.ts +41 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +66 -0
- package/node_modules/zod/src/v4/mini/parse.ts +14 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +1947 -0
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +548 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +993 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +325 -0
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +352 -0
- package/node_modules/zod/src/v4-mini/index.ts +3 -0
- package/node_modules/zod/v3/ZodError.cjs +138 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +133 -0
- package/node_modules/zod/v3/errors.cjs +17 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +22 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +33 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +112 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/package.json +7 -0
- package/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3777 -0
- package/node_modules/zod/v3/types.d.cts +1034 -0
- package/node_modules/zod/v3/types.d.ts +1034 -0
- package/node_modules/zod/v3/types.js +3695 -0
- package/node_modules/zod/v4/classic/checks.cjs +33 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +61 -0
- package/node_modules/zod/v4/classic/compat.d.cts +50 -0
- package/node_modules/zod/v4/classic/compat.d.ts +50 -0
- package/node_modules/zod/v4/classic/compat.js +31 -0
- package/node_modules/zod/v4/classic/errors.cjs +74 -0
- package/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/zod/v4/classic/errors.js +48 -0
- package/node_modules/zod/v4/classic/external.cjs +73 -0
- package/node_modules/zod/v4/classic/external.d.cts +16 -0
- package/node_modules/zod/v4/classic/external.d.ts +16 -0
- package/node_modules/zod/v4/classic/external.js +20 -0
- package/node_modules/zod/v4/classic/from-json-schema.cjs +625 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.js +599 -0
- package/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/zod/v4/classic/package.json +7 -0
- package/node_modules/zod/v4/classic/parse.cjs +41 -0
- package/node_modules/zod/v4/classic/parse.d.cts +31 -0
- package/node_modules/zod/v4/classic/parse.d.ts +31 -0
- package/node_modules/zod/v4/classic/parse.js +15 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1511 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +767 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +767 -0
- package/node_modules/zod/v4/classic/schemas.js +1395 -0
- package/node_modules/zod/v4/core/api.cjs +1227 -0
- package/node_modules/zod/v4/core/api.d.cts +325 -0
- package/node_modules/zod/v4/core/api.d.ts +325 -0
- package/node_modules/zod/v4/core/api.js +1087 -0
- package/node_modules/zod/v4/core/checks.cjs +601 -0
- package/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/zod/v4/core/checks.js +575 -0
- package/node_modules/zod/v4/core/core.cjs +85 -0
- package/node_modules/zod/v4/core/core.d.cts +70 -0
- package/node_modules/zod/v4/core/core.d.ts +70 -0
- package/node_modules/zod/v4/core/core.js +78 -0
- package/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/zod/v4/core/errors.cjs +216 -0
- package/node_modules/zod/v4/core/errors.d.cts +221 -0
- package/node_modules/zod/v4/core/errors.d.ts +221 -0
- package/node_modules/zod/v4/core/errors.js +185 -0
- package/node_modules/zod/v4/core/index.cjs +47 -0
- package/node_modules/zod/v4/core/index.d.cts +16 -0
- package/node_modules/zod/v4/core/index.d.ts +16 -0
- package/node_modules/zod/v4/core/index.js +16 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +644 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +601 -0
- package/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +88 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +88 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/package.json +7 -0
- package/node_modules/zod/v4/core/parse.cjs +131 -0
- package/node_modules/zod/v4/core/parse.d.cts +49 -0
- package/node_modules/zod/v4/core/parse.d.ts +49 -0
- package/node_modules/zod/v4/core/parse.js +93 -0
- package/node_modules/zod/v4/core/regexes.cjs +172 -0
- package/node_modules/zod/v4/core/regexes.d.cts +85 -0
- package/node_modules/zod/v4/core/regexes.d.ts +85 -0
- package/node_modules/zod/v4/core/regexes.js +139 -0
- package/node_modules/zod/v4/core/registries.cjs +56 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +2270 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1184 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1184 -0
- package/node_modules/zod/v4/core/schemas.js +2239 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +457 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
- package/node_modules/zod/v4/core/to-json-schema.js +448 -0
- package/node_modules/zod/v4/core/util.cjs +734 -0
- package/node_modules/zod/v4/core/util.d.cts +200 -0
- package/node_modules/zod/v4/core/util.d.ts +200 -0
- package/node_modules/zod/v4/core/util.js +674 -0
- package/node_modules/zod/v4/core/versions.cjs +8 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/index.cjs +22 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +3 -0
- package/node_modules/zod/v4/locales/ar.cjs +133 -0
- package/node_modules/zod/v4/locales/ar.d.cts +5 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +106 -0
- package/node_modules/zod/v4/locales/az.cjs +132 -0
- package/node_modules/zod/v4/locales/az.d.cts +5 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +105 -0
- package/node_modules/zod/v4/locales/be.cjs +183 -0
- package/node_modules/zod/v4/locales/be.d.cts +5 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +156 -0
- package/node_modules/zod/v4/locales/bg.cjs +147 -0
- package/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/node_modules/zod/v4/locales/bg.js +120 -0
- package/node_modules/zod/v4/locales/ca.cjs +134 -0
- package/node_modules/zod/v4/locales/ca.d.cts +5 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +107 -0
- package/node_modules/zod/v4/locales/cs.cjs +138 -0
- package/node_modules/zod/v4/locales/cs.d.cts +5 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +111 -0
- package/node_modules/zod/v4/locales/da.cjs +142 -0
- package/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/node_modules/zod/v4/locales/da.js +115 -0
- package/node_modules/zod/v4/locales/de.cjs +135 -0
- package/node_modules/zod/v4/locales/de.d.cts +5 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +108 -0
- package/node_modules/zod/v4/locales/el.cjs +136 -0
- package/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/node_modules/zod/v4/locales/el.d.ts +4 -0
- package/node_modules/zod/v4/locales/el.js +109 -0
- package/node_modules/zod/v4/locales/en.cjs +140 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +4 -0
- package/node_modules/zod/v4/locales/en.js +113 -0
- package/node_modules/zod/v4/locales/eo.cjs +136 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +4 -0
- package/node_modules/zod/v4/locales/eo.js +109 -0
- package/node_modules/zod/v4/locales/es.cjs +159 -0
- package/node_modules/zod/v4/locales/es.d.cts +5 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +132 -0
- package/node_modules/zod/v4/locales/fa.cjs +141 -0
- package/node_modules/zod/v4/locales/fa.d.cts +5 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +114 -0
- package/node_modules/zod/v4/locales/fi.cjs +139 -0
- package/node_modules/zod/v4/locales/fi.d.cts +5 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +112 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +107 -0
- package/node_modules/zod/v4/locales/fr.cjs +152 -0
- package/node_modules/zod/v4/locales/fr.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +125 -0
- package/node_modules/zod/v4/locales/he.cjs +241 -0
- package/node_modules/zod/v4/locales/he.d.cts +5 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +214 -0
- package/node_modules/zod/v4/locales/hr.cjs +149 -0
- package/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/node_modules/zod/v4/locales/hr.d.ts +4 -0
- package/node_modules/zod/v4/locales/hr.js +122 -0
- package/node_modules/zod/v4/locales/hu.cjs +135 -0
- package/node_modules/zod/v4/locales/hu.d.cts +5 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +108 -0
- package/node_modules/zod/v4/locales/hy.cjs +174 -0
- package/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/node_modules/zod/v4/locales/hy.js +147 -0
- package/node_modules/zod/v4/locales/id.cjs +133 -0
- package/node_modules/zod/v4/locales/id.d.cts +5 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +106 -0
- package/node_modules/zod/v4/locales/index.cjs +111 -0
- package/node_modules/zod/v4/locales/index.d.cts +52 -0
- package/node_modules/zod/v4/locales/index.d.ts +52 -0
- package/node_modules/zod/v4/locales/index.js +52 -0
- package/node_modules/zod/v4/locales/is.cjs +136 -0
- package/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/node_modules/zod/v4/locales/is.js +109 -0
- package/node_modules/zod/v4/locales/it.cjs +135 -0
- package/node_modules/zod/v4/locales/it.d.cts +5 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +108 -0
- package/node_modules/zod/v4/locales/ja.cjs +134 -0
- package/node_modules/zod/v4/locales/ja.d.cts +5 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +107 -0
- package/node_modules/zod/v4/locales/ka.cjs +139 -0
- package/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/node_modules/zod/v4/locales/ka.js +112 -0
- package/node_modules/zod/v4/locales/kh.cjs +12 -0
- package/node_modules/zod/v4/locales/kh.d.cts +5 -0
- package/node_modules/zod/v4/locales/kh.d.ts +5 -0
- package/node_modules/zod/v4/locales/kh.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +137 -0
- package/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/node_modules/zod/v4/locales/km.js +110 -0
- package/node_modules/zod/v4/locales/ko.cjs +138 -0
- package/node_modules/zod/v4/locales/ko.d.cts +5 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +111 -0
- package/node_modules/zod/v4/locales/lt.cjs +230 -0
- package/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/node_modules/zod/v4/locales/lt.js +203 -0
- package/node_modules/zod/v4/locales/mk.cjs +136 -0
- package/node_modules/zod/v4/locales/mk.d.cts +5 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +109 -0
- package/node_modules/zod/v4/locales/ms.cjs +134 -0
- package/node_modules/zod/v4/locales/ms.d.cts +5 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +107 -0
- package/node_modules/zod/v4/locales/nl.cjs +137 -0
- package/node_modules/zod/v4/locales/nl.d.cts +5 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +110 -0
- package/node_modules/zod/v4/locales/no.cjs +135 -0
- package/node_modules/zod/v4/locales/no.d.cts +5 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +108 -0
- package/node_modules/zod/v4/locales/ota.cjs +136 -0
- package/node_modules/zod/v4/locales/ota.d.cts +5 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +109 -0
- package/node_modules/zod/v4/locales/package.json +7 -0
- package/node_modules/zod/v4/locales/pl.cjs +136 -0
- package/node_modules/zod/v4/locales/pl.d.cts +5 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +109 -0
- package/node_modules/zod/v4/locales/ps.cjs +141 -0
- package/node_modules/zod/v4/locales/ps.d.cts +5 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +114 -0
- package/node_modules/zod/v4/locales/pt.cjs +135 -0
- package/node_modules/zod/v4/locales/pt.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +108 -0
- package/node_modules/zod/v4/locales/ro.cjs +146 -0
- package/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/node_modules/zod/v4/locales/ro.d.ts +4 -0
- package/node_modules/zod/v4/locales/ro.js +119 -0
- package/node_modules/zod/v4/locales/ru.cjs +183 -0
- package/node_modules/zod/v4/locales/ru.d.cts +5 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +156 -0
- package/node_modules/zod/v4/locales/sl.cjs +136 -0
- package/node_modules/zod/v4/locales/sl.d.cts +5 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +109 -0
- package/node_modules/zod/v4/locales/sv.cjs +137 -0
- package/node_modules/zod/v4/locales/sv.d.cts +5 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +110 -0
- package/node_modules/zod/v4/locales/ta.cjs +137 -0
- package/node_modules/zod/v4/locales/ta.d.cts +5 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +110 -0
- package/node_modules/zod/v4/locales/th.cjs +137 -0
- package/node_modules/zod/v4/locales/th.d.cts +5 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +110 -0
- package/node_modules/zod/v4/locales/tr.cjs +132 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +4 -0
- package/node_modules/zod/v4/locales/tr.js +105 -0
- package/node_modules/zod/v4/locales/ua.cjs +12 -0
- package/node_modules/zod/v4/locales/ua.d.cts +5 -0
- package/node_modules/zod/v4/locales/ua.d.ts +5 -0
- package/node_modules/zod/v4/locales/ua.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +135 -0
- package/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/node_modules/zod/v4/locales/uk.js +108 -0
- package/node_modules/zod/v4/locales/ur.cjs +137 -0
- package/node_modules/zod/v4/locales/ur.d.cts +5 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +110 -0
- package/node_modules/zod/v4/locales/uz.cjs +137 -0
- package/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/node_modules/zod/v4/locales/uz.js +110 -0
- package/node_modules/zod/v4/locales/vi.cjs +135 -0
- package/node_modules/zod/v4/locales/vi.d.cts +5 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +108 -0
- package/node_modules/zod/v4/locales/yo.cjs +134 -0
- package/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/node_modules/zod/v4/locales/yo.js +107 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +109 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +107 -0
- package/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +52 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +22 -0
- package/node_modules/zod/v4/mini/external.cjs +63 -0
- package/node_modules/zod/v4/mini/external.d.cts +13 -0
- package/node_modules/zod/v4/mini/external.d.ts +13 -0
- package/node_modules/zod/v4/mini/external.js +14 -0
- package/node_modules/zod/v4/mini/index.cjs +32 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +64 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +34 -0
- package/node_modules/zod/v4/mini/package.json +7 -0
- package/node_modules/zod/v4/mini/parse.cjs +16 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +1083 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +445 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +445 -0
- package/node_modules/zod/v4/mini/schemas.js +961 -0
- package/node_modules/zod/v4/package.json +7 -0
- package/node_modules/zod/v4-mini/index.cjs +32 -0
- package/node_modules/zod/v4-mini/index.d.cts +3 -0
- package/node_modules/zod/v4-mini/index.d.ts +3 -0
- package/node_modules/zod/v4-mini/index.js +3 -0
- package/node_modules/zod/v4-mini/package.json +7 -0
- package/package.json +68 -0
- package/proof/CONTAINMENT-BUILD.txt +163 -0
- package/proof/MCP-SMOKE-STATUS.txt +9 -0
- package/proof/NODE-SYNTAX.txt +4 -0
- package/proof/PROOF.txt +6 -0
- package/proof/SECRET-SCAN.txt +4 -0
- package/proof/SOURCE-GATES.txt +16 -0
- package/proof/STATUS.txt +11 -0
- package/proof/TARGET-V0313-CONTAINMENT-PASS.sha256 +1 -0
- package/proof/TARGET-V0313-CONTAINMENT-PASS.txt +215 -0
- package/proof/TARGET-V040-CONTAINED-IPC-FAIL.sha256 +1 -0
- package/proof/TARGET-V040-CONTAINED-IPC-FAIL.txt +299 -0
- package/proof/TARGET-V041-CONTAINED-CREATEPROCESS-203.sha256 +1 -0
- package/proof/TARGET-V041-CONTAINED-CREATEPROCESS-203.txt +311 -0
- package/proof/TARGET-V042-CONTAINED-CREATEPROCESS-203.sha256 +1 -0
- package/proof/TARGET-V042-CONTAINED-CREATEPROCESS-203.txt +313 -0
- package/proof/TARGET-V043-CONTAINED-CREATEPROCESS-203.sha256 +1 -0
- package/proof/TARGET-V043-CONTAINED-CREATEPROCESS-203.txt +308 -0
- package/proof/TARGET-V044-CONTAINED-PASS.sha256 +1 -0
- package/proof/TARGET-V044-CONTAINED-PASS.txt +432 -0
- package/proof/TARGET-V045-DUAL-OPERATION-PASS.sha256 +1 -0
- package/proof/TARGET-V045-DUAL-OPERATION-PASS.txt +481 -0
- package/proof/TARGET-V046-FIXED-EXECUTABLE-REGISTRY-PASS.sha256 +1 -0
- package/proof/TARGET-V046-FIXED-EXECUTABLE-REGISTRY-PASS.txt +610 -0
- package/proof/TARGET-V047-RUNTIME-MANIFEST-PASS.sha256 +1 -0
- package/proof/TARGET-V047-RUNTIME-MANIFEST-PASS.txt +642 -0
- package/proof/TARGET-V050-BATCH-GATE-PASS.sha256 +1 -0
- package/proof/TARGET-V050-BATCH-GATE-PASS.txt +713 -0
- package/proof/TESTS.txt +686 -0
- package/proof/TRUST-EPHEMERAL.txt +4 -0
- package/proof/V03-FREEZE.txt +27 -0
- package/proof/V041-IPC-HOTFIX.txt +16 -0
- package/proof/V042-ENV-HOTFIX.txt +15 -0
- package/proof/V043-DRIVE-CWD-HOTFIX.txt +14 -0
- package/proof/V044-LOCALAPPDATA-HOTFIX.txt +18 -0
- package/proof/V045-OPERATION-REGISTRY.txt +7 -0
- package/proof/V046-WORKER-REGISTRY.txt +12 -0
- package/proof/V047-WORKER-MANIFEST.txt +18 -0
- package/proof/V050-BATCH-TRUST-CLOSURE.txt +21 -0
- package/proof/V060-ACTIVE-NETWORK-AUTHORITY.txt +29 -0
- package/proof/V070-NODE-SYNTAX.txt +36 -0
- package/proof/V070-NODE-TESTS.txt +752 -0
- package/proof/V070-PACK-DRY-RUN.txt +126 -0
- package/proof/V070-SOURCE-GATE.txt +30 -0
- package/proof/V070-STATIC-SCAN.txt +4 -0
- package/proof/V070-WINDOWS-GATE-PENDING.txt +25 -0
- package/proof/V071-NODE-SYNTAX.txt +1 -0
- package/proof/V071-NODE-TESTS.txt +796 -0
- package/proof/V071-PACK-DRY-RUN.json +656 -0
- package/proof/V071-SOURCE-GATE.txt +16 -0
- package/proof/V071-WINDOWS-GATE-PENDING.txt +24 -0
- package/proof/V073-NODE-SYNTAX.txt +4 -0
- package/proof/V073-SOURCE-GATE.txt +21 -0
- package/proof/V073-STATIC-SCAN.txt +10 -0
- package/proof/V073-WINDOWS-GATE-PENDING.txt +5 -0
- package/proof/VERIFY.txt +7 -0
- package/proof/WINDOWS-CONTAINED-STATUS.txt +5 -0
- package/proof/WINDOWS-CONTAINMENT-STATUS.txt +3 -0
- package/scripts/autonomous-benchmark.mjs +12 -0
- package/scripts/autonomous-build.ps1 +20 -0
- package/scripts/autonomous-tests.ps1 +9 -0
- package/scripts/build-containment.ps1 +279 -0
- package/scripts/coding-live-smoke.mjs +5 -0
- package/scripts/deferred-slot-operation.mjs +84 -0
- package/scripts/final-closure-verify.mjs +159 -0
- package/scripts/final-closure.mjs +106 -0
- package/scripts/gate-windows.ps1 +42 -0
- package/scripts/init-host-policy.ps1 +121 -0
- package/scripts/refresh-process-policy.mjs +68 -0
- package/scripts/release-manifest.mjs +187 -0
- package/scripts/release-parity.mjs +190 -0
- package/scripts/runtime-self-update.mjs +15 -0
- package/scripts/windows-gate-evidence.mjs +52 -0
- package/src/agent-mcp-tools.mjs +158 -0
- package/src/agent-runtime.mjs +874 -0
- package/src/audit-context.mjs +73 -0
- package/src/audit-verify.mjs +93 -0
- package/src/authority-smoke.mjs +117 -0
- package/src/autonomous-mcp-tools.mjs +118 -0
- package/src/autonomous-output-contracts.mjs +125 -0
- package/src/autonomous-planner-contracts.mjs +73 -0
- package/src/autonomous-planner.mjs +290 -0
- package/src/autonomous-policy.mjs +146 -0
- package/src/autonomous-runtime.mjs +993 -0
- package/src/autonomous-supervisor.mjs +86 -0
- package/src/canonical-json.mjs +17 -0
- package/src/coding-mcp-tools.mjs +143 -0
- package/src/coding-output-contracts.mjs +189 -0
- package/src/coding-plane.mjs +657 -0
- package/src/coding-search.mjs +55 -0
- package/src/coding-task-runtime.mjs +725 -0
- package/src/contained-cli.mjs +30 -0
- package/src/contained-executor.mjs +276 -0
- package/src/contained-result.mjs +149 -0
- package/src/contained-smoke.mjs +101 -0
- package/src/containment-bootstrap.mjs +94 -0
- package/src/containment-child-control.mjs +109 -0
- package/src/containment-construction.mjs +107 -0
- package/src/containment-result.mjs +87 -0
- package/src/containment-smoke.mjs +71 -0
- package/src/deadbyte-cli.mjs +55 -0
- package/src/executor.mjs +158 -0
- package/src/hash.mjs +17 -0
- package/src/host-plane.mjs +423 -0
- package/src/ingress-mode.mjs +22 -0
- package/src/invocation.mjs +34 -0
- package/src/machine-fs-mcp-tools.mjs +80 -0
- package/src/machine-fs-output-contracts.mjs +67 -0
- package/src/machine-fs-smoke-client.mjs +134 -0
- package/src/machine-fs.mjs +475 -0
- package/src/machine-identity.mjs +275 -0
- package/src/machine-mcp-tools.mjs +43 -0
- package/src/machine-output-contracts.mjs +58 -0
- package/src/mcp-contained-smoke-client.mjs +139 -0
- package/src/mcp-host-smoke-client.mjs +136 -0
- package/src/mcp-server.mjs +419 -0
- package/src/mcp-smoke-client.mjs +136 -0
- package/src/native-diff.mjs +403 -0
- package/src/observation-mcp-tools.mjs +44 -0
- package/src/observation-output-contracts.mjs +50 -0
- package/src/observation-runtime.mjs +257 -0
- package/src/observation-smoke-client.mjs +97 -0
- package/src/operation-policy.mjs +19 -0
- package/src/output-contracts.mjs +252 -0
- package/src/path-policy.mjs +91 -0
- package/src/process-mcp-tools.mjs +72 -0
- package/src/process-output-contracts.mjs +79 -0
- package/src/process-policy.mjs +150 -0
- package/src/process-runtime.mjs +297 -0
- package/src/process-smoke-client.mjs +124 -0
- package/src/proof-cli.mjs +23 -0
- package/src/proof-worker.mjs +11 -0
- package/src/receipt.mjs +111 -0
- package/src/release-generation.mjs +233 -0
- package/src/release-slot.mjs +293 -0
- package/src/remote-mcp-autonomous-smoke-client.mjs +138 -0
- package/src/remote-mcp-coding-smoke-client.mjs +111 -0
- package/src/remote-mcp-host-smoke-client.mjs +84 -0
- package/src/remote-mcp-machine-smoke-client.mjs +66 -0
- package/src/remote-mcp-r24-disarmed-smoke-client.mjs +38 -0
- package/src/remote-mcp-r33-parity-client.mjs +177 -0
- package/src/remote-mcp-smoke-client.mjs +162 -0
- package/src/request-identity.mjs +63 -0
- package/src/runtime-identity.mjs +33 -0
- package/src/runtime-update.mjs +961 -0
- package/src/text-policy.mjs +9 -0
- package/src/tool-audit.mjs +261 -0
- package/src/trust-init.mjs +21 -0
- package/src/trust.mjs +82 -0
- package/src/tunnel-stdio-compat-smoke.mjs +142 -0
- package/src/tunnel-stdio-compat.mjs +126 -0
- package/src/verifier-cli.mjs +13 -0
- package/src/verifier.mjs +333 -0
- package/src/version.mjs +6 -0
- package/src/worker-registry.mjs +108 -0
- package/test/DEADBYTE-MCP-WRITE-PROBE.txt +5 -0
- package/test/agent-crash-child.mjs +25 -0
- package/test/agent-crash-worker.mjs +19 -0
- package/test/agent-runtime-adversarial.test.mjs +228 -0
- package/test/agent-runtime-crash.test.mjs +76 -0
- package/test/agent-runtime.test.mjs +124 -0
- package/test/agent-task-receipt.test.mjs +73 -0
- package/test/audit-context.test.mjs +50 -0
- package/test/audit-server-integration.test.mjs +30 -0
- package/test/audit-verify.test.mjs +32 -0
- package/test/autonomous-adversarial.test.mjs +329 -0
- package/test/autonomous-live-fixture.test.mjs +10 -0
- package/test/autonomous-loop.test.mjs +188 -0
- package/test/autonomous-output-contract.test.mjs +24 -0
- package/test/autonomous-runtime.test.mjs +93 -0
- package/test/autonomous-supervisor-integration.test.mjs +106 -0
- package/test/cli-entrypoint.test.mjs +34 -0
- package/test/coding-crash.test.mjs +74 -0
- package/test/coding-observation.test.mjs +62 -0
- package/test/coding-plane-adversarial.test.mjs +130 -0
- package/test/coding-plane.test.mjs +93 -0
- package/test/coding-runtime.test.mjs +165 -0
- package/test/contained.test.mjs +931 -0
- package/test/containment.test.mjs +557 -0
- package/test/controller-r21.test.mjs +28 -0
- package/test/controller-r211.test.mjs +21 -0
- package/test/controller-r212.test.mjs +31 -0
- package/test/controller-r24-dns.test.mjs +14 -0
- package/test/controller-r24.test.mjs +32 -0
- package/test/controller-r27.test.mjs +56 -0
- package/test/controller-r29.test.mjs +25 -0
- package/test/controller-r30.test.mjs +30 -0
- package/test/controller.test.mjs +165 -0
- package/test/core.test.mjs +305 -0
- package/test/deferred-slot-operation-behavior.test.mjs +29 -0
- package/test/deferred-slot-operation.test.mjs +18 -0
- package/test/helpers/coding-crash-child.mjs +22 -0
- package/test/host-plane.test.mjs +129 -0
- package/test/machine-fs-mcp-tools.test.mjs +46 -0
- package/test/machine-fs-runtime.test.mjs +105 -0
- package/test/machine-identity.test.mjs +131 -0
- package/test/machine-mcp-integration.test.mjs +88 -0
- package/test/machine-mcp-tools.test.mjs +77 -0
- package/test/mcp-contained-smoke-isolation.test.mjs +14 -0
- package/test/named-tunnel-host.test.mjs +27 -0
- package/test/native-diff.test.mjs +102 -0
- package/test/observation-integration.test.mjs +56 -0
- package/test/observation-mcp-tools.test.mjs +40 -0
- package/test/observation-runtime.test.mjs +123 -0
- package/test/output-schema.test.mjs +86 -0
- package/test/package-boundary.test.mjs +38 -0
- package/test/process-mcp-tools.test.mjs +71 -0
- package/test/process-native.test.mjs +78 -0
- package/test/process-policy-refresh.test.mjs +64 -0
- package/test/process-policy.test.mjs +118 -0
- package/test/process-release-gate.test.mjs +41 -0
- package/test/process-runtime.test.mjs +184 -0
- package/test/process-supervision.test.mjs +24 -0
- package/test/r33-closeout-regression.test.mjs +109 -0
- package/test/r33-finalization.test.mjs +67 -0
- package/test/release-generation.test.mjs +116 -0
- package/test/release-manifest-windows.test.mjs +89 -0
- package/test/release-slot.test.mjs +122 -0
- package/test/release-smoke-isolation.test.mjs +22 -0
- package/test/release-version.test.mjs +35 -0
- package/test/remote-r24-catalog.test.mjs +75 -0
- package/test/runtime-self-update.test.mjs +280 -0
- package/test/standing-grants.test.mjs +77 -0
- package/test/tool-audit.test.mjs +134 -0
- package/test/tunnel-stdio-compat.test.mjs +163 -0
- package/workspaces/autonomous-live/fixture.txt +1 -0
- package/workspaces/demo/input.txt +1 -0
|
@@ -0,0 +1,874 @@
|
|
|
1
|
+
import { randomBytes, sign as cryptoSign, verify as cryptoVerify } from 'node:crypto';
|
|
2
|
+
import { access, mkdir, open, readFile, readdir, rename, rm, writeFile } from 'node:fs/promises';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { canonicalJson } from './canonical-json.mjs';
|
|
6
|
+
import { executeContainedTransform, CONTAINED_TRANSFORM_OPERATIONS } from './contained-executor.mjs';
|
|
7
|
+
import { executeProof } from './executor.mjs';
|
|
8
|
+
import { sha256Bytes, sha256File } from './hash.mjs';
|
|
9
|
+
import { resolveExistingInside, resolveWorkspace, validatePortableRelativePath } from './path-policy.mjs';
|
|
10
|
+
import { runtimeIdentity } from './runtime-identity.mjs';
|
|
11
|
+
import { loadPrivateSigningKey, loadPublicVerifyKey, signReceiptBytes, verifyReceiptBytes } from './trust.mjs';
|
|
12
|
+
import { verifyReceipt } from './verifier.mjs';
|
|
13
|
+
import { DEADBYTE_VERSION, MCP_PROTOCOL_VERSION } from './version.mjs';
|
|
14
|
+
|
|
15
|
+
export const AGENT_PLAN_SCHEMA = 'deadbyte.agent-plan.v1';
|
|
16
|
+
export const AGENT_EVENT_SCHEMA = 'deadbyte.agent-event.v1';
|
|
17
|
+
export const AGENT_TASK_RECEIPT_SCHEMA = 'deadbyte.agent-task-receipt.v1';
|
|
18
|
+
const AGENT_CANCEL_SCHEMA = 'deadbyte.agent-cancel.v1';
|
|
19
|
+
export const AGENT_TASK_ID_RE = /^[0-9a-f]{64}$/;
|
|
20
|
+
export const AGENT_STEP_ID_RE = /^[A-Za-z0-9._-]{1,48}$/;
|
|
21
|
+
const SUBMISSION_ID_RE = /^[A-Za-z0-9._-]{1,64}$/;
|
|
22
|
+
const ZERO_HASH = '0'.repeat(64);
|
|
23
|
+
const MAX_STEPS = 32;
|
|
24
|
+
const MAX_EVENTS = 512;
|
|
25
|
+
const MAX_ERROR_CHARS = 2048;
|
|
26
|
+
const EVENT_FILE_RE = /^(\d{6})\.json$/;
|
|
27
|
+
const containedOperationSet = new Set(CONTAINED_TRANSFORM_OPERATIONS);
|
|
28
|
+
const agentRuntimePath = fileURLToPath(import.meta.url);
|
|
29
|
+
const AGENT_PLAN_SIGNATURE_DOMAIN = Buffer.from('DEADBYTE-AGENT-PLAN-V1\0', 'utf8');
|
|
30
|
+
const AGENT_EVENT_SIGNATURE_DOMAIN = Buffer.from('DEADBYTE-AGENT-EVENT-V1\0', 'utf8');
|
|
31
|
+
const AGENT_CANCEL_SIGNATURE_DOMAIN = Buffer.from('DEADBYTE-AGENT-CANCEL-V1\0', 'utf8');
|
|
32
|
+
|
|
33
|
+
function sha256Object(value) {
|
|
34
|
+
return sha256Bytes(Buffer.from(canonicalJson(value), 'utf8'));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function signAgentEnvelope(signingKey, domain, body) {
|
|
38
|
+
const bytes = Buffer.from(canonicalJson(body), 'utf8');
|
|
39
|
+
const signature = cryptoSign(null, Buffer.concat([domain, bytes]), signingKey.privateKey);
|
|
40
|
+
return {
|
|
41
|
+
...body,
|
|
42
|
+
attestation: {
|
|
43
|
+
algorithm: 'ed25519',
|
|
44
|
+
key_id: signingKey.keyId,
|
|
45
|
+
signature_base64: signature.toString('base64')
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function verifyAgentEnvelope(verifyKey, domain, envelope, label) {
|
|
51
|
+
const { attestation, ...body } = envelope ?? {};
|
|
52
|
+
if (attestation?.algorithm !== 'ed25519' || attestation?.key_id !== verifyKey.keyId || typeof attestation?.signature_base64 !== 'string') {
|
|
53
|
+
throw new Error(`${label} signature metadata mismatch`);
|
|
54
|
+
}
|
|
55
|
+
const signature = Buffer.from(attestation.signature_base64, 'base64');
|
|
56
|
+
if (signature.length !== 64 || signature.toString('base64') !== attestation.signature_base64) {
|
|
57
|
+
throw new Error(`${label} signature encoding mismatch`);
|
|
58
|
+
}
|
|
59
|
+
const bytes = Buffer.from(canonicalJson(body), 'utf8');
|
|
60
|
+
if (!cryptoVerify(null, Buffer.concat([domain, bytes]), verifyKey.publicKey, signature)) {
|
|
61
|
+
throw new Error(`${label} signature verification failed`);
|
|
62
|
+
}
|
|
63
|
+
return body;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function taskIdFor(workspaceId, submissionId) {
|
|
67
|
+
return sha256Object({ schema: 'deadbyte.agent-submission.v1', workspace_id: workspaceId, submission_id: submissionId });
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function receiptIdFor(taskId, stepId, attempt, planSha256) {
|
|
71
|
+
return sha256Object({ schema: 'deadbyte.agent-step-receipt-id.v1', task_id: taskId, step_id: stepId, attempt, plan_sha256: planSha256 }).slice(0, 24);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function truncateError(error) {
|
|
75
|
+
const text = error instanceof Error ? error.message : String(error);
|
|
76
|
+
return text.length <= MAX_ERROR_CHARS ? text : `${text.slice(0, MAX_ERROR_CHARS)}…`;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function exists(file) {
|
|
80
|
+
return access(file).then(() => true, () => false);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function taskRelative(taskId, suffix = '') {
|
|
84
|
+
return `.deadbyte-agent/tasks/${taskId}${suffix ? `/${suffix}` : ''}`;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function eventName(seq) {
|
|
88
|
+
return `${String(seq).padStart(6, '0')}.json`;
|
|
89
|
+
}
|
|
90
|
+
function normalizeInput(input, seenSteps) {
|
|
91
|
+
if (!input || typeof input !== 'object' || Array.isArray(input)) throw new Error('step input must be an object');
|
|
92
|
+
if (input.kind === 'workspace') {
|
|
93
|
+
validatePortableRelativePath(input.path);
|
|
94
|
+
return { kind: 'workspace', path: input.path };
|
|
95
|
+
}
|
|
96
|
+
if (input.kind === 'step_output') {
|
|
97
|
+
if (!AGENT_STEP_ID_RE.test(input.step_id ?? '') || !seenSteps.has(input.step_id)) {
|
|
98
|
+
throw new Error(`step input references unknown or future step '${String(input.step_id)}'`);
|
|
99
|
+
}
|
|
100
|
+
return { kind: 'step_output', step_id: input.step_id };
|
|
101
|
+
}
|
|
102
|
+
throw new Error('step input kind must be workspace or step_output');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function retryLimit(value) {
|
|
106
|
+
const n = value ?? 0;
|
|
107
|
+
if (!Number.isInteger(n) || n < 0 || n > 2) throw new Error('retry_limit must be an integer in [0, 2]');
|
|
108
|
+
return n;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function normalizeAgentPlan({ workspaceId, submissionId, title = '', steps }) {
|
|
112
|
+
if (!/^[A-Za-z0-9._-]{1,64}$/.test(workspaceId ?? '')) throw new Error('invalid workspace_id');
|
|
113
|
+
if (!SUBMISSION_ID_RE.test(submissionId ?? '')) throw new Error('invalid submission_id');
|
|
114
|
+
if (typeof title !== 'string' || title.length > 120) throw new Error('title must be <=120 characters');
|
|
115
|
+
if (!Array.isArray(steps) || steps.length < 1 || steps.length > MAX_STEPS) throw new Error(`steps must contain 1-${MAX_STEPS} items`);
|
|
116
|
+
|
|
117
|
+
const seen = new Set();
|
|
118
|
+
const normalizedSteps = [];
|
|
119
|
+
for (const raw of steps) {
|
|
120
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw)) throw new Error('step must be an object');
|
|
121
|
+
if (!AGENT_STEP_ID_RE.test(raw.step_id ?? '')) throw new Error(`invalid step_id '${String(raw.step_id)}'`);
|
|
122
|
+
if (seen.has(raw.step_id)) throw new Error(`duplicate step_id '${raw.step_id}'`);
|
|
123
|
+
|
|
124
|
+
if (raw.kind === 'checkpoint') {
|
|
125
|
+
if (typeof raw.message !== 'string' || raw.message.length < 1 || raw.message.length > 512) {
|
|
126
|
+
throw new Error('checkpoint message must be 1-512 characters');
|
|
127
|
+
}
|
|
128
|
+
normalizedSteps.push({ step_id: raw.step_id, kind: 'checkpoint', message: raw.message, retry_limit: 0 });
|
|
129
|
+
} else if (raw.kind === 'proof_execute') {
|
|
130
|
+
normalizedSteps.push({
|
|
131
|
+
step_id: raw.step_id,
|
|
132
|
+
kind: 'proof_execute',
|
|
133
|
+
input: normalizeInput(raw.input, seen),
|
|
134
|
+
retry_limit: retryLimit(raw.retry_limit)
|
|
135
|
+
});
|
|
136
|
+
} else if (raw.kind === 'contained_transform') {
|
|
137
|
+
if (!containedOperationSet.has(raw.operation)) throw new Error(`unsupported contained operation '${String(raw.operation)}'`);
|
|
138
|
+
normalizedSteps.push({
|
|
139
|
+
step_id: raw.step_id,
|
|
140
|
+
kind: 'contained_transform',
|
|
141
|
+
operation: raw.operation,
|
|
142
|
+
input: normalizeInput(raw.input, seen),
|
|
143
|
+
retry_limit: retryLimit(raw.retry_limit)
|
|
144
|
+
});
|
|
145
|
+
} else {
|
|
146
|
+
throw new Error(`unsupported agent step kind '${String(raw.kind)}'`);
|
|
147
|
+
}
|
|
148
|
+
seen.add(raw.step_id);
|
|
149
|
+
}
|
|
150
|
+
const body = {
|
|
151
|
+
schema: AGENT_PLAN_SCHEMA,
|
|
152
|
+
workspace_id: workspaceId,
|
|
153
|
+
submission_id: submissionId,
|
|
154
|
+
title,
|
|
155
|
+
steps: normalizedSteps
|
|
156
|
+
};
|
|
157
|
+
return Object.freeze({ ...body, plan_sha256: sha256Object(body) });
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
async function workspaceContext(workspacePath, taskId = null, auth = {}) {
|
|
161
|
+
const rootReal = await resolveWorkspace(workspacePath);
|
|
162
|
+
const agentRoot = path.join(rootReal, '.deadbyte-agent');
|
|
163
|
+
const tasksRoot = path.join(agentRoot, 'tasks');
|
|
164
|
+
const common = {
|
|
165
|
+
rootReal,
|
|
166
|
+
agentRoot,
|
|
167
|
+
tasksRoot,
|
|
168
|
+
signingKeyPath: auth.signingKeyPath ?? null,
|
|
169
|
+
verifyKeyPath: auth.verifyKeyPath ?? null
|
|
170
|
+
};
|
|
171
|
+
await mkdir(tasksRoot, { recursive: true });
|
|
172
|
+
if (!taskId) return common;
|
|
173
|
+
if (!AGENT_TASK_ID_RE.test(taskId)) throw new Error('invalid task_id');
|
|
174
|
+
const taskDir = path.join(tasksRoot, taskId);
|
|
175
|
+
return {
|
|
176
|
+
...common,
|
|
177
|
+
taskDir,
|
|
178
|
+
planPath: path.join(taskDir, 'plan.json'),
|
|
179
|
+
eventsDir: path.join(taskDir, 'events'),
|
|
180
|
+
outputsDir: path.join(taskDir, 'outputs'),
|
|
181
|
+
lockPath: path.join(taskDir, 'run.lock.json'),
|
|
182
|
+
cancelPath: path.join(taskDir, 'cancel.request.json'),
|
|
183
|
+
taskReceiptPath: path.join(taskDir, 'task-receipt.json')
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
async function loadPlan(ctx) {
|
|
187
|
+
let parsed;
|
|
188
|
+
try {
|
|
189
|
+
parsed = JSON.parse(await readFile(ctx.planPath, 'utf8'));
|
|
190
|
+
} catch (error) {
|
|
191
|
+
throw new Error(`agent task plan unavailable: ${error?.code ?? truncateError(error)}`);
|
|
192
|
+
}
|
|
193
|
+
if (!parsed || parsed.schema !== AGENT_PLAN_SCHEMA || !AGENT_TASK_ID_RE.test(parsed.task_id ?? '')) {
|
|
194
|
+
throw new Error('agent task plan schema mismatch');
|
|
195
|
+
}
|
|
196
|
+
const verifyKey = await loadPublicVerifyKey(ctx.verifyKeyPath);
|
|
197
|
+
const signed = verifyAgentEnvelope(verifyKey, AGENT_PLAN_SIGNATURE_DOMAIN, parsed, 'agent plan');
|
|
198
|
+
const { task_id: taskId, plan_sha256: claimed, ...body } = signed;
|
|
199
|
+
if (taskId !== path.basename(ctx.taskDir)) throw new Error('agent task id/path mismatch');
|
|
200
|
+
if (!/^[0-9a-f]{64}$/.test(claimed ?? '') || sha256Object(body) !== claimed) throw new Error('agent task plan hash mismatch');
|
|
201
|
+
return parsed;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
async function readEvents(ctx) {
|
|
205
|
+
let names;
|
|
206
|
+
try { names = await readdir(ctx.eventsDir); } catch (error) { throw new Error(`agent event directory unavailable: ${error?.code ?? truncateError(error)}`); }
|
|
207
|
+
const numbered = names.filter(name => EVENT_FILE_RE.test(name)).sort();
|
|
208
|
+
if (numbered.length > MAX_EVENTS) throw new Error(`agent event journal exceeds ${MAX_EVENTS} events`);
|
|
209
|
+
const events = [];
|
|
210
|
+
const verifyKey = await loadPublicVerifyKey(ctx.verifyKeyPath);
|
|
211
|
+
let previous = ZERO_HASH;
|
|
212
|
+
for (let i = 0; i < numbered.length; i += 1) {
|
|
213
|
+
const expectedName = eventName(i + 1);
|
|
214
|
+
if (numbered[i] !== expectedName) throw new Error(`agent event sequence gap at ${expectedName}`);
|
|
215
|
+
const event = JSON.parse(await readFile(path.join(ctx.eventsDir, numbered[i]), 'utf8'));
|
|
216
|
+
const signed = verifyAgentEnvelope(verifyKey, AGENT_EVENT_SIGNATURE_DOMAIN, event, 'agent event');
|
|
217
|
+
if (signed.schema !== AGENT_EVENT_SCHEMA || signed.seq !== i + 1 || signed.task_id !== path.basename(ctx.taskDir)) throw new Error(`agent event ${expectedName} identity mismatch`);
|
|
218
|
+
const { event_sha256: claimed, ...body } = signed;
|
|
219
|
+
if (!/^[0-9a-f]{64}$/.test(claimed ?? '') || body.prev_sha256 !== previous || sha256Object(body) !== claimed) throw new Error(`agent event ${expectedName} hash-chain mismatch`);
|
|
220
|
+
events.push(event);
|
|
221
|
+
previous = claimed;
|
|
222
|
+
}
|
|
223
|
+
return events;
|
|
224
|
+
}
|
|
225
|
+
async function appendEvent(ctx, events, type, { stepId = undefined, payload = {} } = {}) {
|
|
226
|
+
if (events.length >= MAX_EVENTS) throw new Error(`agent event journal exceeds ${MAX_EVENTS} events`);
|
|
227
|
+
const seq = events.length + 1;
|
|
228
|
+
const body = {
|
|
229
|
+
schema: AGENT_EVENT_SCHEMA,
|
|
230
|
+
seq,
|
|
231
|
+
task_id: path.basename(ctx.taskDir),
|
|
232
|
+
created_at_utc: new Date().toISOString(),
|
|
233
|
+
prev_sha256: events.at(-1)?.event_sha256 ?? ZERO_HASH,
|
|
234
|
+
type,
|
|
235
|
+
...(stepId === undefined ? {} : { step_id: stepId }),
|
|
236
|
+
payload
|
|
237
|
+
};
|
|
238
|
+
const signedBody = { ...body, event_sha256: sha256Object(body) };
|
|
239
|
+
const signingKey = await loadPrivateSigningKey(ctx.signingKeyPath);
|
|
240
|
+
const event = signAgentEnvelope(signingKey, AGENT_EVENT_SIGNATURE_DOMAIN, signedBody);
|
|
241
|
+
const finalPath = path.join(ctx.eventsDir, eventName(seq));
|
|
242
|
+
const tempPath = `${finalPath}.${process.pid}.${randomBytes(6).toString('hex')}.tmp`;
|
|
243
|
+
await writeFile(tempPath, `${canonicalJson(event)}\n`, { flag: 'wx' });
|
|
244
|
+
await rename(tempPath, finalPath);
|
|
245
|
+
events.push(event);
|
|
246
|
+
return event;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
function deriveTaskState(plan, events) {
|
|
250
|
+
const steps = new Map(plan.steps.map(step => [step.step_id, {
|
|
251
|
+
step_id: step.step_id,
|
|
252
|
+
kind: step.kind,
|
|
253
|
+
state: 'pending',
|
|
254
|
+
attempts: 0,
|
|
255
|
+
result: null,
|
|
256
|
+
error: null
|
|
257
|
+
}]));
|
|
258
|
+
let state = 'pending';
|
|
259
|
+
let reason = null;
|
|
260
|
+
let activeStepId = null;
|
|
261
|
+
for (const event of events) {
|
|
262
|
+
const step = event.step_id ? steps.get(event.step_id) : null;
|
|
263
|
+
if (event.type === 'run_started' && !['succeeded', 'failed', 'cancelled'].includes(state)) state = 'running';
|
|
264
|
+
if (event.type === 'step_started' && step) {
|
|
265
|
+
step.state = 'running';
|
|
266
|
+
step.attempts = Math.max(step.attempts, Number(event.payload?.attempt ?? 0));
|
|
267
|
+
step.output_path = event.payload?.output_path ?? null;
|
|
268
|
+
step.receipt_path = event.payload?.receipt_path ?? null;
|
|
269
|
+
step.error = null;
|
|
270
|
+
activeStepId = step.step_id;
|
|
271
|
+
state = 'running';
|
|
272
|
+
}
|
|
273
|
+
if (['step_failed', 'step_interrupted_no_effect'].includes(event.type) && step) {
|
|
274
|
+
step.state = 'pending';
|
|
275
|
+
step.error = event.payload?.error ?? event.type;
|
|
276
|
+
activeStepId = null;
|
|
277
|
+
state = 'running';
|
|
278
|
+
}
|
|
279
|
+
if (event.type === 'step_succeeded' && step) {
|
|
280
|
+
step.state = 'succeeded';
|
|
281
|
+
step.result = event.payload ?? {};
|
|
282
|
+
step.error = null;
|
|
283
|
+
activeStepId = null;
|
|
284
|
+
if (!['failed', 'cancelled'].includes(state)) state = 'running';
|
|
285
|
+
}
|
|
286
|
+
if (event.type === 'checkpoint_waiting' && step) {
|
|
287
|
+
step.state = 'waiting_approval';
|
|
288
|
+
activeStepId = step.step_id;
|
|
289
|
+
state = 'paused';
|
|
290
|
+
reason = 'checkpoint';
|
|
291
|
+
}
|
|
292
|
+
if (event.type === 'checkpoint_approved' && step) {
|
|
293
|
+
step.state = 'succeeded';
|
|
294
|
+
step.result = { decision: event.payload?.decision ?? 'approve' };
|
|
295
|
+
activeStepId = null;
|
|
296
|
+
state = 'running';
|
|
297
|
+
reason = null;
|
|
298
|
+
}
|
|
299
|
+
if (event.type === 'task_paused') {
|
|
300
|
+
state = 'paused';
|
|
301
|
+
reason = event.payload?.reason ?? 'paused';
|
|
302
|
+
}
|
|
303
|
+
if (event.type === 'task_failed') {
|
|
304
|
+
state = 'failed';
|
|
305
|
+
reason = event.payload?.reason ?? 'step_failed';
|
|
306
|
+
activeStepId = null;
|
|
307
|
+
}
|
|
308
|
+
if (event.type === 'task_cancelled') {
|
|
309
|
+
state = 'cancelled';
|
|
310
|
+
reason = event.payload?.reason ?? 'cancelled';
|
|
311
|
+
activeStepId = null;
|
|
312
|
+
}
|
|
313
|
+
if (event.type === 'task_completed') {
|
|
314
|
+
state = 'succeeded';
|
|
315
|
+
reason = null;
|
|
316
|
+
activeStepId = null;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
if (events.length === 1 && events[0]?.type === 'task_created') state = 'pending';
|
|
320
|
+
const list = plan.steps.map(step => ({ ...steps.get(step.step_id) }));
|
|
321
|
+
return {
|
|
322
|
+
state,
|
|
323
|
+
reason,
|
|
324
|
+
active_step_id: activeStepId,
|
|
325
|
+
steps: list,
|
|
326
|
+
completed_steps: list.filter(step => step.state === 'succeeded').length,
|
|
327
|
+
journal_head_sha256: events.at(-1)?.event_sha256 ?? ZERO_HASH
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
async function readCancelRequest(ctx) {
|
|
332
|
+
if (!await exists(ctx.cancelPath)) return null;
|
|
333
|
+
let parsed;
|
|
334
|
+
try {
|
|
335
|
+
parsed = JSON.parse(await readFile(ctx.cancelPath, 'utf8'));
|
|
336
|
+
} catch {
|
|
337
|
+
throw new Error('agent cancel request malformed');
|
|
338
|
+
}
|
|
339
|
+
const verifyKey = await loadPublicVerifyKey(ctx.verifyKeyPath);
|
|
340
|
+
const signed = verifyAgentEnvelope(verifyKey, AGENT_CANCEL_SIGNATURE_DOMAIN, parsed, 'agent cancel request');
|
|
341
|
+
if (signed.schema !== AGENT_CANCEL_SCHEMA || signed.task_id !== path.basename(ctx.taskDir)) {
|
|
342
|
+
throw new Error('agent cancel request identity mismatch');
|
|
343
|
+
}
|
|
344
|
+
if (typeof signed.reason !== 'string' || signed.reason.length < 1 || signed.reason.length > 256) {
|
|
345
|
+
throw new Error('agent cancel request reason invalid');
|
|
346
|
+
}
|
|
347
|
+
return signed;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
async function consumeCancelRequest(ctx, events) {
|
|
351
|
+
const request = await readCancelRequest(ctx);
|
|
352
|
+
if (!request) return null;
|
|
353
|
+
await appendEvent(ctx, events, 'task_cancelled', {
|
|
354
|
+
payload: { reason: request.reason, requested_at_utc: request.requested_at_utc }
|
|
355
|
+
});
|
|
356
|
+
await rm(ctx.cancelPath, { force: true }).catch(() => {});
|
|
357
|
+
return request;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
async function processExists(pid) {
|
|
361
|
+
if (!Number.isInteger(pid) || pid <= 0) return false;
|
|
362
|
+
try { process.kill(pid, 0); return true; } catch { return false; }
|
|
363
|
+
}
|
|
364
|
+
async function acquireTaskLock(ctx) {
|
|
365
|
+
const runtime = await runtimeIdentity();
|
|
366
|
+
for (let pass = 0; pass < 2; pass += 1) {
|
|
367
|
+
let handle;
|
|
368
|
+
try {
|
|
369
|
+
handle = await open(ctx.lockPath, 'wx', 0o600);
|
|
370
|
+
const lock = {
|
|
371
|
+
schema: 'deadbyte.agent-lock.v1',
|
|
372
|
+
task_id: path.basename(ctx.taskDir),
|
|
373
|
+
pid: process.pid,
|
|
374
|
+
runtime_instance_nonce: runtime.instance_nonce,
|
|
375
|
+
created_at_utc: new Date().toISOString()
|
|
376
|
+
};
|
|
377
|
+
await handle.writeFile(`${canonicalJson(lock)}\n`);
|
|
378
|
+
await handle.close();
|
|
379
|
+
return lock;
|
|
380
|
+
} catch (error) {
|
|
381
|
+
if (handle) await handle.close().catch(() => {});
|
|
382
|
+
if (error?.code !== 'EEXIST') throw error;
|
|
383
|
+
let existing;
|
|
384
|
+
try { existing = JSON.parse(await readFile(ctx.lockPath, 'utf8')); } catch { throw new Error('agent task lock is malformed; refusing mutation'); }
|
|
385
|
+
if (await processExists(existing?.pid)) throw new Error(`agent task is busy under pid ${existing.pid}`);
|
|
386
|
+
await rm(ctx.lockPath, { force: true });
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
throw new Error('agent task lock acquisition failed');
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
async function releaseTaskLock(ctx) {
|
|
393
|
+
await rm(ctx.lockPath, { force: true });
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
async function resolveStepInput(rootReal, step, derived) {
|
|
397
|
+
if (step.input.kind === 'workspace') {
|
|
398
|
+
await resolveExistingInside(rootReal, step.input.path);
|
|
399
|
+
return step.input.path;
|
|
400
|
+
}
|
|
401
|
+
const source = derived.steps.find(candidate => candidate.step_id === step.input.step_id);
|
|
402
|
+
if (!source || source.state !== 'succeeded' || typeof source.result?.output_path !== 'string') {
|
|
403
|
+
throw new Error(`step '${step.step_id}' input dependency '${step.input.step_id}' has no successful output`);
|
|
404
|
+
}
|
|
405
|
+
await resolveExistingInside(rootReal, source.result.output_path);
|
|
406
|
+
return source.result.output_path;
|
|
407
|
+
}
|
|
408
|
+
async function verifiedStepResult(ctx, step, attempt, outputPath, receiptPath, verifyKeyPath, verifyReceiptFn) {
|
|
409
|
+
const outputAbs = path.join(ctx.rootReal, ...outputPath.split('/'));
|
|
410
|
+
const receiptAbs = path.join(ctx.rootReal, ...receiptPath.split('/'));
|
|
411
|
+
const outputExists = await exists(outputAbs);
|
|
412
|
+
const receiptExists = await exists(receiptAbs);
|
|
413
|
+
if (!outputExists && !receiptExists) return { kind: 'none' };
|
|
414
|
+
if (!receiptExists) return { kind: 'orphan_output', reason: 'output exists without signed receipt' };
|
|
415
|
+
|
|
416
|
+
const checked = await verifyReceiptFn({ workspacePath: ctx.rootReal, receiptPath, verifyKeyPath });
|
|
417
|
+
if (checked?.ok !== true) return { kind: 'invalid_receipt', reason: checked?.reason ?? 'receipt verification failed' };
|
|
418
|
+
let receipt;
|
|
419
|
+
try { receipt = JSON.parse(await readFile(receiptAbs, 'utf8')); } catch { return { kind: 'invalid_receipt', reason: 'receipt JSON unreadable' }; }
|
|
420
|
+
const expectedOperation = step.kind === 'proof_execute' ? 'proof_execute' : 'contained_transform';
|
|
421
|
+
if (receipt.operation !== expectedOperation || receipt.output?.path !== outputPath) {
|
|
422
|
+
return { kind: 'invalid_receipt', reason: 'receipt operation/output binding mismatch' };
|
|
423
|
+
}
|
|
424
|
+
if (step.kind === 'contained_transform' && receipt.execution?.operation !== step.operation) {
|
|
425
|
+
return { kind: 'invalid_receipt', reason: 'receipt contained operation mismatch' };
|
|
426
|
+
}
|
|
427
|
+
return {
|
|
428
|
+
kind: 'verified',
|
|
429
|
+
payload: {
|
|
430
|
+
attempt,
|
|
431
|
+
kind: step.kind,
|
|
432
|
+
...(step.operation ? { operation: step.operation } : {}),
|
|
433
|
+
output_path: outputPath,
|
|
434
|
+
output_sha256: checked.output_sha256,
|
|
435
|
+
receipt_path: receiptPath,
|
|
436
|
+
receipt_sha256: checked.receipt_sha256,
|
|
437
|
+
request_sha256: checked.request_sha256,
|
|
438
|
+
recovered: true
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
}
|
|
442
|
+
async function createTaskReceipt(ctx, plan, events, derived, signingKeyPath) {
|
|
443
|
+
if (await exists(ctx.taskReceiptPath)) throw new Error('task receipt already exists');
|
|
444
|
+
const signingKey = await loadPrivateSigningKey(signingKeyPath);
|
|
445
|
+
const stepReceipts = derived.steps
|
|
446
|
+
.filter(step => step.kind !== 'checkpoint' && step.state === 'succeeded')
|
|
447
|
+
.map(step => ({
|
|
448
|
+
step_id: step.step_id,
|
|
449
|
+
kind: step.kind,
|
|
450
|
+
...(step.result?.operation ? { operation: step.result.operation } : {}),
|
|
451
|
+
output_path: step.result?.output_path,
|
|
452
|
+
output_sha256: step.result?.output_sha256,
|
|
453
|
+
receipt_path: step.result?.receipt_path,
|
|
454
|
+
receipt_sha256: step.result?.receipt_sha256,
|
|
455
|
+
request_sha256: step.result?.request_sha256
|
|
456
|
+
}));
|
|
457
|
+
const checkpoints = derived.steps
|
|
458
|
+
.filter(step => step.kind === 'checkpoint' && step.state === 'succeeded')
|
|
459
|
+
.map(step => ({ step_id: step.step_id, decision: step.result?.decision ?? 'approve' }));
|
|
460
|
+
const body = {
|
|
461
|
+
schema: AGENT_TASK_RECEIPT_SCHEMA,
|
|
462
|
+
task_id: plan.task_id,
|
|
463
|
+
plan_sha256: plan.plan_sha256,
|
|
464
|
+
event_head_sha256: derived.journal_head_sha256,
|
|
465
|
+
created_at_utc: events[0]?.created_at_utc,
|
|
466
|
+
completed_at_utc: new Date().toISOString(),
|
|
467
|
+
package_version: DEADBYTE_VERSION,
|
|
468
|
+
mcp_protocol_version: MCP_PROTOCOL_VERSION,
|
|
469
|
+
agent_runtime_sha256: await sha256File(agentRuntimePath),
|
|
470
|
+
runtime: await runtimeIdentity(),
|
|
471
|
+
step_receipts: stepReceipts,
|
|
472
|
+
checkpoints
|
|
473
|
+
};
|
|
474
|
+
const receiptSha256 = sha256Object(body);
|
|
475
|
+
const signedBody = { ...body, receipt_sha256: receiptSha256 };
|
|
476
|
+
const signature = signReceiptBytes(signingKey.privateKey, Buffer.from(canonicalJson(signedBody), 'utf8'));
|
|
477
|
+
const receipt = {
|
|
478
|
+
...signedBody,
|
|
479
|
+
attestation: {
|
|
480
|
+
algorithm: 'ed25519',
|
|
481
|
+
key_id: signingKey.keyId,
|
|
482
|
+
signature_base64: signature.toString('base64')
|
|
483
|
+
}
|
|
484
|
+
};
|
|
485
|
+
await writeFile(ctx.taskReceiptPath, `${canonicalJson(receipt)}\n`, { flag: 'wx' });
|
|
486
|
+
return receipt;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
async function verifyTaskReceiptEnvelope(receipt, plan, derived, verifyKeyPath) {
|
|
490
|
+
if (receipt.schema !== AGENT_TASK_RECEIPT_SCHEMA || receipt.task_id !== plan.task_id || receipt.plan_sha256 !== plan.plan_sha256) {
|
|
491
|
+
return { ok: false, reason: 'task receipt identity mismatch' };
|
|
492
|
+
}
|
|
493
|
+
if (receipt.event_head_sha256 !== derived.journal_head_sha256) return { ok: false, reason: 'task receipt event-head mismatch' };
|
|
494
|
+
if (receipt.package_version !== DEADBYTE_VERSION || receipt.mcp_protocol_version !== MCP_PROTOCOL_VERSION) {
|
|
495
|
+
return { ok: false, reason: 'task receipt runtime version mismatch' };
|
|
496
|
+
}
|
|
497
|
+
if (receipt.agent_runtime_sha256 !== await sha256File(agentRuntimePath)) return { ok: false, reason: 'task receipt agent runtime hash mismatch' };
|
|
498
|
+
const currentRuntime = await runtimeIdentity();
|
|
499
|
+
if (receipt.runtime?.mcp_server_sha256 !== currentRuntime.mcp_server_sha256 ||
|
|
500
|
+
receipt.runtime?.mcp_protocol_version !== MCP_PROTOCOL_VERSION || receipt.runtime?.package_version !== DEADBYTE_VERSION) {
|
|
501
|
+
return { ok: false, reason: 'task receipt runtime identity mismatch' };
|
|
502
|
+
}
|
|
503
|
+
const verifyKey = await loadPublicVerifyKey(verifyKeyPath);
|
|
504
|
+
if (receipt.attestation?.algorithm !== 'ed25519' || receipt.attestation?.key_id !== verifyKey.keyId) {
|
|
505
|
+
return { ok: false, reason: 'task receipt attestation mismatch' };
|
|
506
|
+
} const { attestation, receipt_sha256: claimed, ...body } = receipt;
|
|
507
|
+
if (!/^[0-9a-f]{64}$/.test(claimed ?? '') || sha256Object(body) !== claimed) return { ok: false, reason: 'task receipt hash mismatch' };
|
|
508
|
+
const signature = Buffer.from(attestation.signature_base64 ?? '', 'base64');
|
|
509
|
+
if (!verifyReceiptBytes(verifyKey.publicKey, Buffer.from(canonicalJson({ ...body, receipt_sha256: claimed }), 'utf8'), signature)) {
|
|
510
|
+
return { ok: false, reason: 'task receipt signature mismatch' };
|
|
511
|
+
}
|
|
512
|
+
const expectedSteps = derived.steps.filter(step => step.kind !== 'checkpoint' && step.state === 'succeeded');
|
|
513
|
+
if (!Array.isArray(receipt.step_receipts) || receipt.step_receipts.length !== expectedSteps.length) return { ok: false, reason: 'task receipt step count mismatch' };
|
|
514
|
+
for (const step of expectedSteps) {
|
|
515
|
+
const bound = receipt.step_receipts.find(item => item.step_id === step.step_id);
|
|
516
|
+
if (!bound || bound.kind !== step.kind || bound.receipt_path !== step.result?.receipt_path ||
|
|
517
|
+
bound.receipt_sha256 !== step.result?.receipt_sha256 || bound.request_sha256 !== step.result?.request_sha256 ||
|
|
518
|
+
bound.output_sha256 !== step.result?.output_sha256 || bound.output_path !== step.result?.output_path ||
|
|
519
|
+
(step.result?.operation ?? null) !== (bound.operation ?? null)) {
|
|
520
|
+
return { ok: false, reason: `task receipt step binding mismatch for '${step.step_id}'` };
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
const expectedCheckpoints = derived.steps.filter(step => step.kind === 'checkpoint' && step.state === 'succeeded')
|
|
524
|
+
.map(step => ({ step_id: step.step_id, decision: step.result?.decision ?? 'approve' }));
|
|
525
|
+
if (canonicalJson(receipt.checkpoints ?? []) !== canonicalJson(expectedCheckpoints)) return { ok: false, reason: 'task receipt checkpoint binding mismatch' };
|
|
526
|
+
return { ok: true, receipt_sha256: claimed };
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
async function verifyTaskReceipt(ctx, plan, events, verifyKeyPath, verifyReceiptFn) {
|
|
530
|
+
if (events.at(-1)?.type !== 'task_completed') return { ok: false, reason: 'task is not completed' };
|
|
531
|
+
let receipt;
|
|
532
|
+
try { receipt = JSON.parse(await readFile(ctx.taskReceiptPath, 'utf8')); } catch { return { ok: false, reason: 'task receipt missing or unreadable' }; }
|
|
533
|
+
const completion = events.at(-1);
|
|
534
|
+
const derived = deriveTaskState(plan, events.slice(0, -1));
|
|
535
|
+
const envelope = await verifyTaskReceiptEnvelope(receipt, plan, derived, verifyKeyPath);
|
|
536
|
+
if (!envelope.ok) return envelope;
|
|
537
|
+
if (receipt.event_head_sha256 !== completion.prev_sha256 || completion.payload?.task_receipt_sha256 !== envelope.receipt_sha256) {
|
|
538
|
+
return { ok: false, reason: 'task receipt/event-head binding mismatch' };
|
|
539
|
+
} let verifiedCount = 0;
|
|
540
|
+
for (const step of derived.steps.filter(item => item.kind !== 'checkpoint' && item.state === 'succeeded')) {
|
|
541
|
+
const bound = receipt.step_receipts.find(item => item.step_id === step.step_id);
|
|
542
|
+
const checked = await verifyReceiptFn({ workspacePath: ctx.rootReal, receiptPath: bound.receipt_path, verifyKeyPath });
|
|
543
|
+
if (checked?.ok !== true || checked.receipt_sha256 !== bound.receipt_sha256 || checked.output_sha256 !== bound.output_sha256 ||
|
|
544
|
+
checked.request_sha256 !== bound.request_sha256) {
|
|
545
|
+
return { ok: false, reason: `underlying step receipt verification failed for '${step.step_id}'` };
|
|
546
|
+
}
|
|
547
|
+
verifiedCount += 1;
|
|
548
|
+
}
|
|
549
|
+
return {
|
|
550
|
+
ok: true,
|
|
551
|
+
task_id: plan.task_id,
|
|
552
|
+
plan_sha256: plan.plan_sha256,
|
|
553
|
+
task_receipt_sha256: envelope.receipt_sha256,
|
|
554
|
+
signature_valid: true,
|
|
555
|
+
journal_head_sha256: completion.event_sha256,
|
|
556
|
+
step_receipts_verified: verifiedCount
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
async function reconcileInterrupted(ctx, plan, events, derived, verifyKeyPath, verifyReceiptFn) {
|
|
560
|
+
if (!derived.active_step_id) return derived;
|
|
561
|
+
const planStep = plan.steps.find(step => step.step_id === derived.active_step_id);
|
|
562
|
+
const stateStep = derived.steps.find(step => step.step_id === derived.active_step_id);
|
|
563
|
+
if (!planStep || !stateStep || stateStep.state !== 'running') return derived;
|
|
564
|
+
const verdict = await verifiedStepResult(
|
|
565
|
+
ctx,
|
|
566
|
+
planStep,
|
|
567
|
+
stateStep.attempts,
|
|
568
|
+
stateStep.output_path,
|
|
569
|
+
stateStep.receipt_path,
|
|
570
|
+
verifyKeyPath,
|
|
571
|
+
verifyReceiptFn
|
|
572
|
+
);
|
|
573
|
+
if (verdict.kind === 'verified') {
|
|
574
|
+
await appendEvent(ctx, events, 'step_succeeded', { stepId: planStep.step_id, payload: verdict.payload });
|
|
575
|
+
} else if (verdict.kind === 'none') {
|
|
576
|
+
await appendEvent(ctx, events, 'step_interrupted_no_effect', {
|
|
577
|
+
stepId: planStep.step_id,
|
|
578
|
+
payload: { attempt: stateStep.attempts, error: 'previous runtime ended before observable side effect' }
|
|
579
|
+
});
|
|
580
|
+
} else {
|
|
581
|
+
await appendEvent(ctx, events, 'task_paused', {
|
|
582
|
+
stepId: planStep.step_id,
|
|
583
|
+
payload: { reason: `interrupted_${verdict.kind}`, detail: verdict.reason }
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
return deriveTaskState(plan, events);
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
async function completeTask(ctx, plan, events, derived, signingKeyPath, verifyKeyPath) {
|
|
590
|
+
if (derived.completed_steps !== plan.steps.length) return derived;
|
|
591
|
+
let receipt;
|
|
592
|
+
if (await exists(ctx.taskReceiptPath)) {
|
|
593
|
+
try { receipt = JSON.parse(await readFile(ctx.taskReceiptPath, 'utf8')); }
|
|
594
|
+
catch {
|
|
595
|
+
await appendEvent(ctx, events, 'task_paused', { payload: { reason: 'existing_task_receipt_unreadable' } });
|
|
596
|
+
return deriveTaskState(plan, events);
|
|
597
|
+
}
|
|
598
|
+
} else {
|
|
599
|
+
receipt = await createTaskReceipt(ctx, plan, events, derived, signingKeyPath);
|
|
600
|
+
}
|
|
601
|
+
const envelope = await verifyTaskReceiptEnvelope(receipt, plan, derived, verifyKeyPath);
|
|
602
|
+
if (!envelope.ok) {
|
|
603
|
+
await appendEvent(ctx, events, 'task_paused', { payload: { reason: `existing_task_receipt_${envelope.reason}` } });
|
|
604
|
+
return deriveTaskState(plan, events);
|
|
605
|
+
}
|
|
606
|
+
await appendEvent(ctx, events, 'task_completed', { payload: { task_receipt_sha256: envelope.receipt_sha256 } });
|
|
607
|
+
return deriveTaskState(plan, events);
|
|
608
|
+
}
|
|
609
|
+
export function createAgentRuntime({
|
|
610
|
+
signingKeyPath,
|
|
611
|
+
verifyKeyPath,
|
|
612
|
+
executeProofFn = executeProof,
|
|
613
|
+
executeContainedTransformFn = executeContainedTransform,
|
|
614
|
+
verifyReceiptFn = verifyReceipt
|
|
615
|
+
}) {
|
|
616
|
+
if (!signingKeyPath) throw new Error('agent runtime requires signing key path');
|
|
617
|
+
if (!verifyKeyPath) throw new Error('agent runtime requires verify key path');
|
|
618
|
+
const auth = Object.freeze({ signingKeyPath, verifyKeyPath });
|
|
619
|
+
|
|
620
|
+
async function submit({ workspacePath, workspaceId, submissionId, title = '', steps }) {
|
|
621
|
+
const base = await workspaceContext(workspacePath, null, auth);
|
|
622
|
+
const normalized = normalizeAgentPlan({ workspaceId, submissionId, title, steps });
|
|
623
|
+
const taskId = taskIdFor(workspaceId, submissionId);
|
|
624
|
+
const ctx = await workspaceContext(base.rootReal, taskId, auth);
|
|
625
|
+
const signingKey = await loadPrivateSigningKey(signingKeyPath);
|
|
626
|
+
const storedPlan = signAgentEnvelope(signingKey, AGENT_PLAN_SIGNATURE_DOMAIN, { ...normalized, task_id: taskId });
|
|
627
|
+
|
|
628
|
+
if (await exists(ctx.taskDir)) {
|
|
629
|
+
const existing = await loadPlan(ctx);
|
|
630
|
+
if (existing.plan_sha256 !== normalized.plan_sha256) throw new Error('submission_id already exists with a different plan');
|
|
631
|
+
return { status: 'existing', task_id: taskId, plan_sha256: existing.plan_sha256, state: deriveTaskState(existing, await readEvents(ctx)).state };
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
await mkdir(ctx.taskDir);
|
|
635
|
+
await mkdir(ctx.eventsDir);
|
|
636
|
+
await mkdir(ctx.outputsDir);
|
|
637
|
+
await writeFile(ctx.planPath, `${canonicalJson(storedPlan)}\n`, { flag: 'wx' });
|
|
638
|
+
const events = [];
|
|
639
|
+
await appendEvent(ctx, events, 'task_created', {
|
|
640
|
+
payload: { plan_sha256: normalized.plan_sha256, submission_id: submissionId, title, step_count: normalized.steps.length }
|
|
641
|
+
});
|
|
642
|
+
return { status: 'accepted', task_id: taskId, plan_sha256: normalized.plan_sha256, state: 'pending' };
|
|
643
|
+
}
|
|
644
|
+
async function status({ workspacePath, taskId }) {
|
|
645
|
+
const ctx = await workspaceContext(workspacePath, taskId, auth);
|
|
646
|
+
const plan = await loadPlan(ctx);
|
|
647
|
+
const events = await readEvents(ctx);
|
|
648
|
+
const derived = deriveTaskState(plan, events);
|
|
649
|
+
return {
|
|
650
|
+
status: 'ok',
|
|
651
|
+
task_id: taskId,
|
|
652
|
+
plan_sha256: plan.plan_sha256,
|
|
653
|
+
...derived,
|
|
654
|
+
journal_verified: true
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
async function events({ workspacePath, taskId, fromSeq = 1, limit = 100 }) {
|
|
659
|
+
if (!Number.isInteger(fromSeq) || fromSeq < 1) throw new Error('from_seq must be an integer >=1');
|
|
660
|
+
if (!Number.isInteger(limit) || limit < 1 || limit > 200) throw new Error('limit must be an integer in [1, 200]');
|
|
661
|
+
const ctx = await workspaceContext(workspacePath, taskId, auth);
|
|
662
|
+
const plan = await loadPlan(ctx);
|
|
663
|
+
const all = await readEvents(ctx);
|
|
664
|
+
return {
|
|
665
|
+
status: 'ok', task_id: taskId, plan_sha256: plan.plan_sha256,
|
|
666
|
+
journal_verified: true, journal_head_sha256: all.at(-1)?.event_sha256 ?? ZERO_HASH,
|
|
667
|
+
events: all.slice(fromSeq - 1, fromSeq - 1 + limit)
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
async function cancel({ workspacePath, taskId, reason = 'operator_request' }) {
|
|
671
|
+
if (typeof reason !== 'string' || reason.length < 1 || reason.length > 256) throw new Error('cancel reason must be 1-256 characters');
|
|
672
|
+
const ctx = await workspaceContext(workspacePath, taskId, auth);
|
|
673
|
+
const plan = await loadPlan(ctx);
|
|
674
|
+
const current = deriveTaskState(plan, await readEvents(ctx));
|
|
675
|
+
if (['succeeded', 'failed', 'cancelled'].includes(current.state)) {
|
|
676
|
+
return { status: 'terminal', task_id: taskId, state: current.state };
|
|
677
|
+
}
|
|
678
|
+
const signingKey = await loadPrivateSigningKey(signingKeyPath);
|
|
679
|
+
const request = signAgentEnvelope(signingKey, AGENT_CANCEL_SIGNATURE_DOMAIN, {
|
|
680
|
+
schema: AGENT_CANCEL_SCHEMA, task_id: taskId,
|
|
681
|
+
requested_at_utc: new Date().toISOString(), reason
|
|
682
|
+
});
|
|
683
|
+
try {
|
|
684
|
+
await writeFile(ctx.cancelPath, `${canonicalJson(request)}\n`, { flag: 'wx' });
|
|
685
|
+
return { status: 'requested', task_id: taskId, state: current.state };
|
|
686
|
+
} catch (error) {
|
|
687
|
+
if (error?.code !== 'EEXIST') throw error;
|
|
688
|
+
return { status: 'existing', task_id: taskId, state: current.state };
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
async function approve({ workspacePath, taskId, stepId, decision = 'approve' }) {
|
|
693
|
+
if (!AGENT_STEP_ID_RE.test(stepId ?? '')) throw new Error('invalid step_id');
|
|
694
|
+
if (!['approve', 'reject'].includes(decision)) throw new Error('decision must be approve or reject');
|
|
695
|
+
const ctx = await workspaceContext(workspacePath, taskId, auth);
|
|
696
|
+
await acquireTaskLock(ctx);
|
|
697
|
+
try {
|
|
698
|
+
const plan = await loadPlan(ctx);
|
|
699
|
+
const journal = await readEvents(ctx);
|
|
700
|
+
const derived = deriveTaskState(plan, journal);
|
|
701
|
+
const step = derived.steps.find(item => item.step_id === stepId);
|
|
702
|
+
if (!step || step.kind !== 'checkpoint') throw new Error(`checkpoint '${stepId}' not found`);
|
|
703
|
+
if (step.state === 'succeeded') return { status: 'existing', task_id: taskId, step_id: stepId, state: derived.state };
|
|
704
|
+
if (step.state !== 'waiting_approval') throw new Error(`checkpoint '${stepId}' is not waiting for approval`);
|
|
705
|
+
if (decision === 'reject') {
|
|
706
|
+
await appendEvent(ctx, journal, 'checkpoint_rejected', { stepId, payload: { decision } });
|
|
707
|
+
await appendEvent(ctx, journal, 'task_cancelled', { stepId, payload: { reason: 'checkpoint_rejected' } });
|
|
708
|
+
} else {
|
|
709
|
+
await appendEvent(ctx, journal, 'checkpoint_approved', { stepId, payload: { decision } });
|
|
710
|
+
}
|
|
711
|
+
const after = deriveTaskState(plan, journal);
|
|
712
|
+
return { status: decision === 'approve' ? 'approved' : 'rejected', task_id: taskId, step_id: stepId, ...after };
|
|
713
|
+
} finally {
|
|
714
|
+
await releaseTaskLock(ctx);
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
async function verify({ workspacePath, taskId }) {
|
|
719
|
+
const ctx = await workspaceContext(workspacePath, taskId, auth);
|
|
720
|
+
const plan = await loadPlan(ctx);
|
|
721
|
+
const journal = await readEvents(ctx);
|
|
722
|
+
return verifyTaskReceipt(ctx, plan, journal, verifyKeyPath, verifyReceiptFn);
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
function stepAttemptPaths(plan, step, attempt) {
|
|
726
|
+
const receiptId = receiptIdFor(plan.task_id, step.step_id, attempt, plan.plan_sha256);
|
|
727
|
+
return {
|
|
728
|
+
receipt_id: receiptId,
|
|
729
|
+
receipt_path: `evidence/${receiptId}.json`,
|
|
730
|
+
output_path: taskRelative(plan.task_id, `outputs/${step.step_id}.attempt-${attempt}.bin`)
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
async function executeStep(ctx, plan, step, stateStep, inputPath, paths) {
|
|
735
|
+
const common = {
|
|
736
|
+
workspacePath: ctx.rootReal,
|
|
737
|
+
input: inputPath,
|
|
738
|
+
output: paths.output_path,
|
|
739
|
+
signingKeyPath,
|
|
740
|
+
receiptId: paths.receipt_id
|
|
741
|
+
};
|
|
742
|
+
if (step.kind === 'proof_execute') return executeProofFn(common);
|
|
743
|
+
if (step.kind === 'contained_transform') {
|
|
744
|
+
return executeContainedTransformFn({ ...common, operation: step.operation });
|
|
745
|
+
}
|
|
746
|
+
throw new Error(`step '${step.step_id}' is not executable`);
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
async function run({ workspacePath, taskId, maxSteps = 8 }) {
|
|
750
|
+
if (!Number.isInteger(maxSteps) || maxSteps < 1 || maxSteps > MAX_STEPS) throw new Error(`max_steps must be an integer in [1, ${MAX_STEPS}]`);
|
|
751
|
+
const ctx = await workspaceContext(workspacePath, taskId, auth);
|
|
752
|
+
await acquireTaskLock(ctx);
|
|
753
|
+
try {
|
|
754
|
+
const plan = await loadPlan(ctx);
|
|
755
|
+
const journal = await readEvents(ctx);
|
|
756
|
+
let derived = deriveTaskState(plan, journal);
|
|
757
|
+
if (['succeeded', 'failed', 'cancelled'].includes(derived.state)) {
|
|
758
|
+
return { status: 'terminal', task_id: taskId, ...derived };
|
|
759
|
+
}
|
|
760
|
+
derived = await reconcileInterrupted(ctx, plan, journal, derived, verifyKeyPath, verifyReceiptFn);
|
|
761
|
+
if (derived.state === 'paused' && derived.reason !== 'checkpoint') {
|
|
762
|
+
return { status: 'paused', task_id: taskId, ...derived };
|
|
763
|
+
}
|
|
764
|
+
if (derived.completed_steps === plan.steps.length) {
|
|
765
|
+
derived = await completeTask(ctx, plan, journal, derived, signingKeyPath, verifyKeyPath);
|
|
766
|
+
return { status: derived.state === 'succeeded' ? 'completed' : derived.state, task_id: taskId, ...derived };
|
|
767
|
+
}
|
|
768
|
+
if (await consumeCancelRequest(ctx, journal)) {
|
|
769
|
+
derived = deriveTaskState(plan, journal);
|
|
770
|
+
return { status: 'cancelled', task_id: taskId, ...derived };
|
|
771
|
+
}
|
|
772
|
+
await appendEvent(ctx, journal, 'run_started', { payload: { max_steps: maxSteps } });
|
|
773
|
+
derived = deriveTaskState(plan, journal);
|
|
774
|
+
|
|
775
|
+
let consumed = 0;
|
|
776
|
+
while (consumed < maxSteps) {
|
|
777
|
+
if (await consumeCancelRequest(ctx, journal)) {
|
|
778
|
+
derived = deriveTaskState(plan, journal);
|
|
779
|
+
return { status: 'cancelled', task_id: taskId, ...derived };
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
const next = plan.steps.find(step => derived.steps.find(item => item.step_id === step.step_id)?.state !== 'succeeded');
|
|
783
|
+
if (!next) {
|
|
784
|
+
derived = await completeTask(ctx, plan, journal, derived, signingKeyPath, verifyKeyPath);
|
|
785
|
+
return { status: derived.state === 'succeeded' ? 'completed' : derived.state, task_id: taskId, ...derived };
|
|
786
|
+
}
|
|
787
|
+
const stateStep = derived.steps.find(item => item.step_id === next.step_id);
|
|
788
|
+
if (next.kind === 'checkpoint') {
|
|
789
|
+
if (stateStep.state === 'waiting_approval') {
|
|
790
|
+
return { status: 'paused', task_id: taskId, ...derived };
|
|
791
|
+
}
|
|
792
|
+
await appendEvent(ctx, journal, 'checkpoint_waiting', {
|
|
793
|
+
stepId: next.step_id,
|
|
794
|
+
payload: { message: next.message }
|
|
795
|
+
});
|
|
796
|
+
derived = deriveTaskState(plan, journal);
|
|
797
|
+
return { status: 'paused', task_id: taskId, ...derived };
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
const attempt = stateStep.attempts + 1;
|
|
801
|
+
const paths = stepAttemptPaths(plan, next, attempt);
|
|
802
|
+
const inputPath = await resolveStepInput(ctx.rootReal, next, derived);
|
|
803
|
+
await appendEvent(ctx, journal, 'step_started', {
|
|
804
|
+
stepId: next.step_id,
|
|
805
|
+
payload: {
|
|
806
|
+
attempt,
|
|
807
|
+
input_path: inputPath,
|
|
808
|
+
output_path: paths.output_path,
|
|
809
|
+
receipt_path: paths.receipt_path
|
|
810
|
+
}
|
|
811
|
+
});
|
|
812
|
+
derived = deriveTaskState(plan, journal);
|
|
813
|
+
consumed += 1;
|
|
814
|
+
|
|
815
|
+
try {
|
|
816
|
+
await executeStep(ctx, plan, next, stateStep, inputPath, paths);
|
|
817
|
+
const verdict = await verifiedStepResult(
|
|
818
|
+
ctx, next, attempt, paths.output_path, paths.receipt_path,
|
|
819
|
+
verifyKeyPath, verifyReceiptFn
|
|
820
|
+
);
|
|
821
|
+
if (verdict.kind !== 'verified') {
|
|
822
|
+
await appendEvent(ctx, journal, 'task_paused', {
|
|
823
|
+
stepId: next.step_id,
|
|
824
|
+
payload: { reason: `post_execute_${verdict.kind}`, detail: verdict.reason ?? 'missing evidence' }
|
|
825
|
+
});
|
|
826
|
+
derived = deriveTaskState(plan, journal);
|
|
827
|
+
return { status: 'paused', task_id: taskId, ...derived };
|
|
828
|
+
}
|
|
829
|
+
await appendEvent(ctx, journal, 'step_succeeded', {
|
|
830
|
+
stepId: next.step_id,
|
|
831
|
+
payload: { ...verdict.payload, recovered: false }
|
|
832
|
+
});
|
|
833
|
+
derived = deriveTaskState(plan, journal);
|
|
834
|
+
} catch (error) {
|
|
835
|
+
const verdict = await verifiedStepResult(
|
|
836
|
+
ctx, next, attempt, paths.output_path, paths.receipt_path,
|
|
837
|
+
verifyKeyPath, verifyReceiptFn
|
|
838
|
+
);
|
|
839
|
+
if (verdict.kind === 'verified') {
|
|
840
|
+
await appendEvent(ctx, journal, 'step_succeeded', { stepId: next.step_id, payload: verdict.payload });
|
|
841
|
+
derived = deriveTaskState(plan, journal);
|
|
842
|
+
continue;
|
|
843
|
+
}
|
|
844
|
+
if (verdict.kind !== 'none') {
|
|
845
|
+
await appendEvent(ctx, journal, 'task_paused', {
|
|
846
|
+
stepId: next.step_id,
|
|
847
|
+
payload: { reason: `execution_${verdict.kind}`, detail: verdict.reason ?? truncateError(error) }
|
|
848
|
+
});
|
|
849
|
+
derived = deriveTaskState(plan, journal);
|
|
850
|
+
return { status: 'paused', task_id: taskId, ...derived };
|
|
851
|
+
}
|
|
852
|
+
await appendEvent(ctx, journal, 'step_failed', {
|
|
853
|
+
stepId: next.step_id,
|
|
854
|
+
payload: { attempt, error: truncateError(error) }
|
|
855
|
+
});
|
|
856
|
+
derived = deriveTaskState(plan, journal);
|
|
857
|
+
if (attempt > next.retry_limit) {
|
|
858
|
+
await appendEvent(ctx, journal, 'task_failed', {
|
|
859
|
+
stepId: next.step_id,
|
|
860
|
+
payload: { reason: 'retry_exhausted', attempts: attempt, error: truncateError(error) }
|
|
861
|
+
});
|
|
862
|
+
derived = deriveTaskState(plan, journal);
|
|
863
|
+
return { status: 'failed', task_id: taskId, ...derived };
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
return { status: 'yielded', task_id: taskId, ...derived };
|
|
868
|
+
} finally {
|
|
869
|
+
await releaseTaskLock(ctx);
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
return Object.freeze({ submit, run, status, events, cancel, approve, verify });
|
|
874
|
+
}
|