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,1090 @@
|
|
|
1
|
+
#requires -Version 5.1
|
|
2
|
+
[CmdletBinding()]
|
|
3
|
+
param(
|
|
4
|
+
[Parameter(Position=0)]
|
|
5
|
+
[ValidateSet('menu','start','resume','park','stop','restart','status','url','test','fulltest','toggle','clean','machinetest','armprocess','disarmprocess','processstatus','armhost','disarmhost','hoststatus','hosttest','armcoding','disarmcoding','codingstatus','codingtest','armautonomous','disarmautonomous','autonomousstatus','autonomoustest')]
|
|
6
|
+
[string]$Command = 'menu'
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
Set-StrictMode -Version 3.0
|
|
10
|
+
$ErrorActionPreference = 'Stop'
|
|
11
|
+
|
|
12
|
+
$ControllerSchema = 'deadbyte.controller.v1'
|
|
13
|
+
$Root = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
14
|
+
$RuntimeDir = if ($env:DEADBYTE_CONTROLLER_RUNTIME_ROOT) { [System.IO.Path]::GetFullPath([string]$env:DEADBYTE_CONTROLLER_RUNTIME_ROOT) } else { Join-Path $Root 'runtime' }
|
|
15
|
+
$LogDir = Join-Path $RuntimeDir 'logs'
|
|
16
|
+
$ConfigPath = if ($env:DEADBYTE_CONTROLLER_CONFIG) { $env:DEADBYTE_CONTROLLER_CONFIG } else { Join-Path $Root 'deadbyte-controller.config.psd1' }
|
|
17
|
+
|
|
18
|
+
function Fail([string]$Message) { throw "DEADBYTE controller: $Message" }
|
|
19
|
+
function Ensure-Directory([string]$Path) { if (-not (Test-Path -LiteralPath $Path -PathType Container)) { New-Item -ItemType Directory -Path $Path -Force | Out-Null } }
|
|
20
|
+
function Ledger-Path([string]$Name) { Join-Path $RuntimeDir ("{0}.instance.json" -f $Name.ToLowerInvariant()) }
|
|
21
|
+
function Log-Path([string]$Name, [string]$Kind) { Join-Path $LogDir ("{0}.{1}.log" -f $Name.ToLowerInvariant(), $Kind) }
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
function Read-TextFileSafe([string]$Path) {
|
|
25
|
+
if (-not (Test-Path -LiteralPath $Path -PathType Leaf)) { return '' }
|
|
26
|
+
$text = Get-Content -LiteralPath $Path -Raw -Encoding UTF8
|
|
27
|
+
if ($null -eq $text) { return '' }
|
|
28
|
+
return [string]$text
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function Get-Config {
|
|
32
|
+
if (-not (Test-Path -LiteralPath $ConfigPath -PathType Leaf)) {
|
|
33
|
+
Fail "missing trusted config '$ConfigPath'; copy deadbyte-controller.config.psd1.example and set exact long-lived executable paths"
|
|
34
|
+
}
|
|
35
|
+
$cfg = Import-PowerShellDataFile -LiteralPath $ConfigPath
|
|
36
|
+
if ($cfg.Schema -ne $ControllerSchema) { Fail 'controller config schema mismatch' }
|
|
37
|
+
$coreRoot = if ($cfg.ContainsKey('CoreRoot') -and -not [string]::IsNullOrWhiteSpace([string]$cfg.CoreRoot)) { [string]$cfg.CoreRoot } else { Split-Path -Parent $Root }
|
|
38
|
+
$coreRoot = [System.IO.Path]::GetFullPath($coreRoot)
|
|
39
|
+
if (-not (Test-Path -LiteralPath (Join-Path $coreRoot 'package.json') -PathType Leaf) -or -not (Test-Path -LiteralPath (Join-Path $coreRoot 'src\mcp-server.mjs') -PathType Leaf)) {
|
|
40
|
+
Fail "CoreRoot is not a DEADBYTE MCP package: $coreRoot"
|
|
41
|
+
}
|
|
42
|
+
$cfg['CoreRoot'] = $coreRoot
|
|
43
|
+
$workspaceRoot = if ($cfg.ContainsKey('WorkspaceRoot') -and -not [string]::IsNullOrWhiteSpace([string]$cfg.WorkspaceRoot)) { [string]$cfg.WorkspaceRoot } else { Join-Path $coreRoot 'workspaces' }
|
|
44
|
+
$workspaceRoot = [System.IO.Path]::GetFullPath($workspaceRoot)
|
|
45
|
+
if (-not (Test-Path -LiteralPath $workspaceRoot -PathType Container)) { Fail "WorkspaceRoot missing: $workspaceRoot" }
|
|
46
|
+
$cfg['WorkspaceRoot'] = $workspaceRoot
|
|
47
|
+
foreach ($name in @('Bridge','Cloud')) {
|
|
48
|
+
$spec = $cfg[$name]
|
|
49
|
+
if (-not $spec -or -not $spec.ContainsKey('FilePath') -or [string]::IsNullOrWhiteSpace([string]$spec.FilePath)) { Fail "$name FilePath missing" }
|
|
50
|
+
if (-not $spec.ContainsKey('Arguments')) { Fail "$name Arguments field missing" }
|
|
51
|
+
if (-not $spec.ContainsKey('WorkingDirectory')) { Fail "$name WorkingDirectory field missing" }
|
|
52
|
+
if (-not (Test-Path -LiteralPath $spec.FilePath -PathType Leaf)) { Fail "$name executable missing: $($spec.FilePath)" }
|
|
53
|
+
if (-not $spec.ContainsKey('FileSha256') -or [string]$spec.FileSha256 -cnotmatch '^[0-9a-f]{64}$') { Fail "$name FileSha256 invalid" }
|
|
54
|
+
$componentExecutableHash = Get-ExecutableHash ([string]$spec.FilePath)
|
|
55
|
+
if ($componentExecutableHash -ne [string]$spec.FileSha256) { Fail "$name executable hash mismatch: expected $($spec.FileSha256), found $componentExecutableHash" }
|
|
56
|
+
if ([string]::IsNullOrWhiteSpace([string]$spec.WorkingDirectory) -or -not (Test-Path -LiteralPath $spec.WorkingDirectory -PathType Container)) {
|
|
57
|
+
Fail "$name WorkingDirectory missing: $($spec.WorkingDirectory)"
|
|
58
|
+
}
|
|
59
|
+
Normalize-ComponentDependencies $name $spec
|
|
60
|
+
if ($name -eq 'Cloud' -and $spec.ContainsKey('Transport')) {
|
|
61
|
+
$transport = [string]$spec.Transport
|
|
62
|
+
$dependencyCount = @($spec.Dependencies).Count
|
|
63
|
+
if ($transport -eq 'deadbyte.named-tunnel.v1') {
|
|
64
|
+
if ($dependencyCount -ne 3) { Fail 'deadbyte.named-tunnel.v1 requires exactly three pinned dependencies' }
|
|
65
|
+
} elseif ($transport -eq 'deadbyte.named-tunnel.v2') {
|
|
66
|
+
if ($dependencyCount -ne 2) { Fail 'deadbyte.named-tunnel.v2 requires exactly cloudflared plus token-file pins' }
|
|
67
|
+
} else { Fail 'Cloud Transport unsupported' }
|
|
68
|
+
}
|
|
69
|
+
if ($name -eq 'Bridge') {
|
|
70
|
+
if (-not $spec.ContainsKey('ScriptPath') -or [string]::IsNullOrWhiteSpace([string]$spec.ScriptPath)) { Fail 'Bridge ScriptPath missing' }
|
|
71
|
+
if (-not $spec.ContainsKey('ScriptSha256') -or [string]$spec.ScriptSha256 -cnotmatch '^[0-9a-f]{64}$') { Fail 'Bridge ScriptSha256 invalid' }
|
|
72
|
+
$scriptPath = [System.IO.Path]::GetFullPath([string]$spec.ScriptPath)
|
|
73
|
+
if (-not (Test-Path -LiteralPath $scriptPath -PathType Leaf)) { Fail "Bridge ScriptPath missing: $scriptPath" }
|
|
74
|
+
$scriptHash = Get-ExecutableHash $scriptPath
|
|
75
|
+
if ($scriptHash -ne [string]$spec.ScriptSha256) { Fail "bridge script hash mismatch: expected $($spec.ScriptSha256), found $scriptHash" }
|
|
76
|
+
$spec['ScriptPath'] = $scriptPath
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
$cloudTransport = if ($cfg.Cloud.ContainsKey('Transport')) { [string]$cfg.Cloud.Transport } else { '' }
|
|
80
|
+
if ($cloudTransport -eq 'deadbyte.named-tunnel.v2') {
|
|
81
|
+
if (-not $cfg.ContainsKey('McpUrlFile') -or [string]::IsNullOrWhiteSpace([string]$cfg.McpUrlFile)) { Fail 'deadbyte.named-tunnel.v2 requires McpUrlFile' }
|
|
82
|
+
if (-not $cfg.ContainsKey('McpUrlFileSha256') -or [string]$cfg.McpUrlFileSha256 -cnotmatch '^[0-9a-f]{64}$') { Fail 'deadbyte.named-tunnel.v2 requires McpUrlFileSha256' }
|
|
83
|
+
$mcpUrlFile = [System.IO.Path]::GetFullPath([string]$cfg.McpUrlFile)
|
|
84
|
+
if (-not (Test-Path -LiteralPath $mcpUrlFile -PathType Leaf)) { Fail "McpUrlFile missing: $mcpUrlFile" }
|
|
85
|
+
$mcpUrlItem = Get-Item -LiteralPath $mcpUrlFile -Force
|
|
86
|
+
if (($mcpUrlItem.Attributes -band [System.IO.FileAttributes]::ReparsePoint) -ne 0) { Fail 'McpUrlFile must not be a reparse point' }
|
|
87
|
+
$mcpUrlHash = Get-ExecutableHash $mcpUrlFile
|
|
88
|
+
if ($mcpUrlHash -ne [string]$cfg.McpUrlFileSha256) { Fail "McpUrlFile SHA-256 mismatch: expected $($cfg.McpUrlFileSha256), found $mcpUrlHash" }
|
|
89
|
+
$cfg['McpUrlFile'] = $mcpUrlFile
|
|
90
|
+
}
|
|
91
|
+
if ($cfg.ContainsKey('HostPolicyFile') -and -not [string]::IsNullOrWhiteSpace([string]$cfg.HostPolicyFile)) {
|
|
92
|
+
$hostPolicy = [System.IO.Path]::GetFullPath([string]$cfg.HostPolicyFile)
|
|
93
|
+
if (-not (Test-Path -LiteralPath $hostPolicy -PathType Leaf)) { Fail "HostPolicyFile missing: $hostPolicy" }
|
|
94
|
+
$cfg['HostPolicyFile'] = $hostPolicy
|
|
95
|
+
} else {
|
|
96
|
+
$cfg['HostPolicyFile'] = ''
|
|
97
|
+
}
|
|
98
|
+
if ($cfg.ContainsKey('MachineRuntimeEnabled')) {
|
|
99
|
+
if ($cfg.MachineRuntimeEnabled -isnot [bool]) { Fail 'MachineRuntimeEnabled must be boolean' }
|
|
100
|
+
} else {
|
|
101
|
+
$cfg['MachineRuntimeEnabled'] = $true
|
|
102
|
+
}
|
|
103
|
+
if ($cfg.ContainsKey('AgentRuntimeEnabled')) {
|
|
104
|
+
if ($cfg.AgentRuntimeEnabled -isnot [bool]) { Fail 'AgentRuntimeEnabled must be boolean' }
|
|
105
|
+
} else {
|
|
106
|
+
$cfg['AgentRuntimeEnabled'] = $false
|
|
107
|
+
}
|
|
108
|
+
if ($cfg.ContainsKey('ProcessRuntimeEnabled')) {
|
|
109
|
+
if ($cfg.ProcessRuntimeEnabled -isnot [bool]) { Fail 'ProcessRuntimeEnabled must be boolean' }
|
|
110
|
+
} else {
|
|
111
|
+
$cfg['ProcessRuntimeEnabled'] = $false
|
|
112
|
+
}
|
|
113
|
+
if ($cfg.ContainsKey('ProcessPolicyFile') -and -not [string]::IsNullOrWhiteSpace([string]$cfg.ProcessPolicyFile)) {
|
|
114
|
+
$processPolicy = [System.IO.Path]::GetFullPath([string]$cfg.ProcessPolicyFile)
|
|
115
|
+
if (-not (Test-Path -LiteralPath $processPolicy -PathType Leaf)) { Fail "ProcessPolicyFile missing: $processPolicy" }
|
|
116
|
+
$cfg['ProcessPolicyFile'] = $processPolicy
|
|
117
|
+
} else {
|
|
118
|
+
$cfg['ProcessPolicyFile'] = ''
|
|
119
|
+
}
|
|
120
|
+
if ([bool]$cfg.ProcessRuntimeEnabled -and [string]::IsNullOrWhiteSpace([string]$cfg.ProcessPolicyFile)) { Fail 'ProcessRuntimeEnabled requires ProcessPolicyFile' }
|
|
121
|
+
if ($cfg.ContainsKey('CodingRuntimeEnabled')) {
|
|
122
|
+
if ($cfg.CodingRuntimeEnabled -isnot [bool]) { Fail 'CodingRuntimeEnabled must be boolean' }
|
|
123
|
+
} else {
|
|
124
|
+
$cfg['CodingRuntimeEnabled'] = $false
|
|
125
|
+
}
|
|
126
|
+
if ($cfg.ContainsKey('CodingPolicyFile') -and -not [string]::IsNullOrWhiteSpace([string]$cfg.CodingPolicyFile)) {
|
|
127
|
+
$codingPolicy = [System.IO.Path]::GetFullPath([string]$cfg.CodingPolicyFile)
|
|
128
|
+
if (-not (Test-Path -LiteralPath $codingPolicy -PathType Leaf)) { Fail "CodingPolicyFile missing: $codingPolicy" }
|
|
129
|
+
$cfg['CodingPolicyFile'] = $codingPolicy
|
|
130
|
+
} else {
|
|
131
|
+
$cfg['CodingPolicyFile'] = ''
|
|
132
|
+
}
|
|
133
|
+
if ([bool]$cfg.CodingRuntimeEnabled -and [string]::IsNullOrWhiteSpace([string]$cfg.CodingPolicyFile)) { Fail 'CodingRuntimeEnabled requires CodingPolicyFile' }
|
|
134
|
+
if ($cfg.ContainsKey('MachineFsRuntimeEnabled')) {
|
|
135
|
+
if ($cfg.MachineFsRuntimeEnabled -isnot [bool]) { Fail 'MachineFsRuntimeEnabled must be boolean' }
|
|
136
|
+
} else {
|
|
137
|
+
$cfg['MachineFsRuntimeEnabled'] = $false
|
|
138
|
+
}
|
|
139
|
+
if ([bool]$cfg.MachineFsRuntimeEnabled -and -not [bool]$cfg.CodingRuntimeEnabled) { Fail 'MachineFsRuntimeEnabled requires CodingRuntimeEnabled' }
|
|
140
|
+
if ($cfg.ContainsKey('ObservationRuntimeEnabled')) {
|
|
141
|
+
if ($cfg.ObservationRuntimeEnabled -isnot [bool]) { Fail 'ObservationRuntimeEnabled must be boolean' }
|
|
142
|
+
} else {
|
|
143
|
+
$cfg['ObservationRuntimeEnabled'] = $false
|
|
144
|
+
}
|
|
145
|
+
if ([bool]$cfg.ObservationRuntimeEnabled -and -not [bool]$cfg.MachineRuntimeEnabled) { Fail 'ObservationRuntimeEnabled requires MachineRuntimeEnabled' }
|
|
146
|
+
if ([bool]$cfg.ObservationRuntimeEnabled -and -not [bool]$cfg.CodingRuntimeEnabled) { Fail 'ObservationRuntimeEnabled requires CodingRuntimeEnabled' }
|
|
147
|
+
if ($cfg.ContainsKey('AutonomousRuntimeEnabled')) {
|
|
148
|
+
if ($cfg.AutonomousRuntimeEnabled -isnot [bool]) { Fail 'AutonomousRuntimeEnabled must be boolean' }
|
|
149
|
+
} else {
|
|
150
|
+
$cfg['AutonomousRuntimeEnabled'] = $false
|
|
151
|
+
}
|
|
152
|
+
if ($cfg.ContainsKey('AutonomousPolicyFile') -and -not [string]::IsNullOrWhiteSpace([string]$cfg.AutonomousPolicyFile)) {
|
|
153
|
+
$autonomousPolicy = [System.IO.Path]::GetFullPath([string]$cfg.AutonomousPolicyFile)
|
|
154
|
+
if (-not (Test-Path -LiteralPath $autonomousPolicy -PathType Leaf)) { Fail "AutonomousPolicyFile missing: $autonomousPolicy" }
|
|
155
|
+
$cfg['AutonomousPolicyFile'] = $autonomousPolicy
|
|
156
|
+
} else {
|
|
157
|
+
$cfg['AutonomousPolicyFile'] = ''
|
|
158
|
+
}
|
|
159
|
+
if ([bool]$cfg.AutonomousRuntimeEnabled -and -not [bool]$cfg.CodingRuntimeEnabled) { Fail 'AutonomousRuntimeEnabled requires CodingRuntimeEnabled' }
|
|
160
|
+
if ([bool]$cfg.AutonomousRuntimeEnabled -and [string]::IsNullOrWhiteSpace([string]$cfg.AutonomousPolicyFile)) { Fail 'AutonomousRuntimeEnabled requires AutonomousPolicyFile' }
|
|
161
|
+
if ([int]$cfg.StartTimeoutSeconds -lt 1 -or [int]$cfg.StartTimeoutSeconds -gt 120) { Fail 'StartTimeoutSeconds out of range' }
|
|
162
|
+
if ([int]$cfg.ProbeTimeoutSeconds -lt 1 -or [int]$cfg.ProbeTimeoutSeconds -gt 15) { Fail 'ProbeTimeoutSeconds out of range' }
|
|
163
|
+
return $cfg
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function Assert-ControllerRootBound($Cfg) {
|
|
167
|
+
$expected = [System.IO.Path]::GetFullPath((Join-Path ([string]$Cfg.CoreRoot) 'controller')).TrimEnd('\')
|
|
168
|
+
$actual = [System.IO.Path]::GetFullPath($Root).TrimEnd('\')
|
|
169
|
+
if (-not [string]::Equals($actual, $expected, [System.StringComparison]::OrdinalIgnoreCase)) {
|
|
170
|
+
Fail "controller root mismatch: running '$actual', expected '$expected'; use canonical DEADBYTE-MCP.cmd"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function Get-ExecutableHash([string]$Path) {
|
|
175
|
+
(Get-FileHash -LiteralPath $Path -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function Normalize-ComponentDependencies([string]$Name, $Spec) {
|
|
179
|
+
if (-not $Spec.ContainsKey('Dependencies')) { $Spec['Dependencies'] = @(); return }
|
|
180
|
+
$dependencies = @($Spec.Dependencies)
|
|
181
|
+
if ($dependencies.Count -gt 16) { Fail "$Name dependency count exceeds 16" }
|
|
182
|
+
$normalized = @()
|
|
183
|
+
foreach ($dependency in $dependencies) {
|
|
184
|
+
$depPath = [System.IO.Path]::GetFullPath([string]$dependency.Path)
|
|
185
|
+
$depHash = ([string]$dependency.Sha256).ToLowerInvariant()
|
|
186
|
+
if ([string]::IsNullOrWhiteSpace($depPath) -or -not (Test-Path -LiteralPath $depPath -PathType Leaf)) { Fail "$Name dependency missing: $depPath" }
|
|
187
|
+
if ($depHash -cnotmatch '^[0-9a-f]{64}$') { Fail "$Name dependency SHA-256 invalid: $depPath" }
|
|
188
|
+
$item = Get-Item -LiteralPath $depPath -Force
|
|
189
|
+
if (($item.Attributes -band [System.IO.FileAttributes]::ReparsePoint) -ne 0) { Fail "$Name dependency must not be a reparse point: $depPath" }
|
|
190
|
+
$actual = Get-ExecutableHash $depPath
|
|
191
|
+
if ($actual -ne $depHash) { Fail "$Name dependency hash mismatch in trusted config: $depPath" }
|
|
192
|
+
$depName = if ([string]::IsNullOrWhiteSpace([string]$dependency.Name)) { [System.IO.Path]::GetFileName($depPath) } else { [string]$dependency.Name }
|
|
193
|
+
$normalized += [ordered]@{ Name=$depName; Path=$depPath; Sha256=$depHash }
|
|
194
|
+
}
|
|
195
|
+
$Spec['Dependencies'] = $normalized
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function Assert-ComponentDependencies([string]$Name, $Spec, [string]$Phase) {
|
|
199
|
+
foreach ($dependency in @($Spec.Dependencies)) {
|
|
200
|
+
$depPath = [string]$dependency.Path
|
|
201
|
+
$expected = [string]$dependency.Sha256
|
|
202
|
+
if (-not (Test-Path -LiteralPath $depPath -PathType Leaf)) { Fail "$Name dependency missing ${Phase}: $depPath" }
|
|
203
|
+
$actual = Get-ExecutableHash $depPath
|
|
204
|
+
if ($actual -ne $expected) { Fail "$Name dependency hash mismatch ${Phase}: $depPath expected $expected found $actual" }
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
function Get-LimitedProcessImagePath([int]$ProcessId) {
|
|
209
|
+
if (-not ('DeadbyteProcessQuery' -as [type])) {
|
|
210
|
+
$source = @'
|
|
211
|
+
using System;
|
|
212
|
+
using System.Text;
|
|
213
|
+
using System.Runtime.InteropServices;
|
|
214
|
+
public static class DeadbyteProcessQuery {
|
|
215
|
+
[DllImport("kernel32.dll", SetLastError=true)] static extern IntPtr OpenProcess(uint access, bool inheritHandle, int processId);
|
|
216
|
+
[DllImport("kernel32.dll", CharSet=CharSet.Unicode, SetLastError=true)] static extern bool QueryFullProcessImageName(IntPtr process, uint flags, StringBuilder path, ref int size);
|
|
217
|
+
[DllImport("kernel32.dll")] static extern bool CloseHandle(IntPtr handle);
|
|
218
|
+
public static string GetImagePath(int processId) { const uint PROCESS_QUERY_LIMITED_INFORMATION=0x1000; IntPtr h=OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION,false,processId); if(h==IntPtr.Zero)return null; try { var b=new StringBuilder(32768); int n=b.Capacity; return QueryFullProcessImageName(h,0,b,ref n)?b.ToString():null; } finally { CloseHandle(h); } }
|
|
219
|
+
}
|
|
220
|
+
'@
|
|
221
|
+
Add-Type -TypeDefinition $source -Language CSharp -ErrorAction Stop
|
|
222
|
+
}
|
|
223
|
+
try { $path=[DeadbyteProcessQuery]::GetImagePath($ProcessId); if ($null -eq $path) { return '' }; return [string]$path } catch { return '' }
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
function Get-ProcessObservation([int]$ProcessId) {
|
|
227
|
+
try { $p = Get-Process -Id $ProcessId -ErrorAction Stop } catch { return $null }
|
|
228
|
+
$image = ''
|
|
229
|
+
try {
|
|
230
|
+
$cim = Get-CimInstance Win32_Process -Filter ("ProcessId={0}" -f $ProcessId) -ErrorAction Stop
|
|
231
|
+
if ($cim -and -not [string]::IsNullOrWhiteSpace([string]$cim.ExecutablePath)) {
|
|
232
|
+
$image = [string]$cim.ExecutablePath
|
|
233
|
+
}
|
|
234
|
+
} catch {}
|
|
235
|
+
if ([string]::IsNullOrWhiteSpace($image)) {
|
|
236
|
+
try { $image = [string]$p.Path } catch {}
|
|
237
|
+
}
|
|
238
|
+
if ([string]::IsNullOrWhiteSpace($image)) {
|
|
239
|
+
try { $image = Get-LimitedProcessImagePath $ProcessId } catch {}
|
|
240
|
+
}
|
|
241
|
+
if ([string]::IsNullOrWhiteSpace($image)) {
|
|
242
|
+
try { $image = [string]$p.MainModule.FileName } catch {}
|
|
243
|
+
}
|
|
244
|
+
if ([string]::IsNullOrWhiteSpace($image)) { return $null }
|
|
245
|
+
try { $image = [System.IO.Path]::GetFullPath($image) } catch { return $null }
|
|
246
|
+
if (-not (Test-Path -LiteralPath $image -PathType Leaf)) { return $null }
|
|
247
|
+
try { $imageHash = Get-ExecutableHash $image } catch { return $null }
|
|
248
|
+
[pscustomobject]@{
|
|
249
|
+
pid = [int]$p.Id
|
|
250
|
+
creation_time_utc = $p.StartTime.ToUniversalTime().ToString('o')
|
|
251
|
+
image_path = $image
|
|
252
|
+
image_sha256 = $imageHash
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
function Read-Ledger([string]$Name) {
|
|
257
|
+
$path = Ledger-Path $Name
|
|
258
|
+
if (-not (Test-Path -LiteralPath $path -PathType Leaf)) { return $null }
|
|
259
|
+
try { return (Get-Content -LiteralPath $path -Raw -Encoding UTF8 | ConvertFrom-Json) } catch { return [pscustomobject]@{ corrupt = $true; path = $path } }
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
function Test-OwnedInstance([string]$Name) {
|
|
263
|
+
$ledger = Read-Ledger $Name
|
|
264
|
+
if (-not $ledger) { return [pscustomobject]@{ Name=$Name; Alive=$false; Reason='no-ledger'; Ledger=$null; Observation=$null } }
|
|
265
|
+
if ($ledger.PSObject.Properties.Name -contains 'corrupt' -and $ledger.corrupt -eq $true) { return [pscustomobject]@{ Name=$Name; Alive=$false; Reason='corrupt-ledger'; Ledger=$ledger; Observation=$null } }
|
|
266
|
+
if ($ledger.schema -ne $ControllerSchema -or -not $ledger.instance_nonce) { return [pscustomobject]@{ Name=$Name; Alive=$false; Reason='ledger-schema'; Ledger=$ledger; Observation=$null } }
|
|
267
|
+
if ($Name -eq 'Bridge') {
|
|
268
|
+
if (-not ($ledger.PSObject.Properties.Name -contains 'script_path') -or -not ($ledger.PSObject.Properties.Name -contains 'script_sha256')) {
|
|
269
|
+
return [pscustomobject]@{ Name=$Name; Alive=$false; Reason='ledger-schema'; Ledger=$ledger; Observation=$null }
|
|
270
|
+
}
|
|
271
|
+
$scriptPath = [string]$ledger.script_path
|
|
272
|
+
$scriptHash = [string]$ledger.script_sha256
|
|
273
|
+
if ([string]::IsNullOrWhiteSpace($scriptPath) -or $scriptHash -cnotmatch '^[0-9a-f]{64}$' -or -not (Test-Path -LiteralPath $scriptPath -PathType Leaf)) {
|
|
274
|
+
return [pscustomobject]@{ Name=$Name; Alive=$false; Reason='script-hash-mismatch'; Ledger=$ledger; Observation=$null }
|
|
275
|
+
}
|
|
276
|
+
try { $observedScriptHash = Get-ExecutableHash $scriptPath } catch { $observedScriptHash = '' }
|
|
277
|
+
if ($observedScriptHash -ne $scriptHash) { return [pscustomobject]@{ Name=$Name; Alive=$false; Reason='script-hash-mismatch'; Ledger=$ledger; Observation=$null } }
|
|
278
|
+
}
|
|
279
|
+
if ($ledger.PSObject.Properties.Name -contains 'dependencies') {
|
|
280
|
+
foreach ($dependency in @($ledger.dependencies)) {
|
|
281
|
+
$depPath = [string]$dependency.path
|
|
282
|
+
$depHash = [string]$dependency.sha256
|
|
283
|
+
if ([string]::IsNullOrWhiteSpace($depPath) -or $depHash -cnotmatch '^[0-9a-f]{64}$' -or -not (Test-Path -LiteralPath $depPath -PathType Leaf)) {
|
|
284
|
+
return [pscustomobject]@{ Name=$Name; Alive=$false; Reason='dependency-hash-mismatch'; Ledger=$ledger; Observation=$null }
|
|
285
|
+
}
|
|
286
|
+
try { $observedDependencyHash = Get-ExecutableHash $depPath } catch { $observedDependencyHash = '' }
|
|
287
|
+
if ($observedDependencyHash -ne $depHash) { return [pscustomobject]@{ Name=$Name; Alive=$false; Reason='dependency-hash-mismatch'; Ledger=$ledger; Observation=$null } }
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
$obs = Get-ProcessObservation ([int]$ledger.pid)
|
|
291
|
+
if (-not $obs) { try { [void](Get-Process -Id ([int]$ledger.pid) -ErrorAction Stop); return [pscustomobject]@{ Name=$Name; Alive=$false; Reason='process-unobservable'; Ledger=$ledger; Observation=$null } } catch { return [pscustomobject]@{ Name=$Name; Alive=$false; Reason='process-missing'; Ledger=$ledger; Observation=$null } } }
|
|
292
|
+
if ($obs.creation_time_utc -ne [string]$ledger.creation_time_utc) { return [pscustomobject]@{ Name=$Name; Alive=$false; Reason='pid-reused'; Ledger=$ledger; Observation=$obs } }
|
|
293
|
+
if (-not [string]::Equals($obs.image_path, [string]$ledger.image_path, [System.StringComparison]::OrdinalIgnoreCase)) { return [pscustomobject]@{ Name=$Name; Alive=$false; Reason='image-path-mismatch'; Ledger=$ledger; Observation=$obs } }
|
|
294
|
+
if ($obs.image_sha256 -ne [string]$ledger.image_sha256) { return [pscustomobject]@{ Name=$Name; Alive=$false; Reason='image-hash-mismatch'; Ledger=$ledger; Observation=$obs } }
|
|
295
|
+
[pscustomobject]@{ Name=$Name; Alive=$true; Reason='verified'; Ledger=$ledger; Observation=$obs }
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
function Write-Ledger([string]$Name, $Observation, [string]$Nonce, $Spec = $null) {
|
|
299
|
+
Ensure-Directory $RuntimeDir
|
|
300
|
+
$body = [ordered]@{
|
|
301
|
+
schema = $ControllerSchema
|
|
302
|
+
component = $Name.ToLowerInvariant()
|
|
303
|
+
instance_nonce = $Nonce
|
|
304
|
+
pid = [int]$Observation.pid
|
|
305
|
+
creation_time_utc = [string]$Observation.creation_time_utc
|
|
306
|
+
image_path = [string]$Observation.image_path
|
|
307
|
+
image_sha256 = [string]$Observation.image_sha256
|
|
308
|
+
}
|
|
309
|
+
if ($Name -eq 'Bridge') {
|
|
310
|
+
if (-not $Spec) { Fail 'Bridge ledger requires launch specification' }
|
|
311
|
+
$body['script_path'] = [string]$Spec.ScriptPath
|
|
312
|
+
$body['script_sha256'] = [string]$Spec.ScriptSha256
|
|
313
|
+
}
|
|
314
|
+
if ($Spec -and @($Spec.Dependencies).Count -gt 0) {
|
|
315
|
+
$body['dependencies'] = @($Spec.Dependencies | ForEach-Object { [ordered]@{ name=[string]$_.Name; path=[string]$_.Path; sha256=[string]$_.Sha256 } })
|
|
316
|
+
}
|
|
317
|
+
$tmp = (Ledger-Path $Name) + '.tmp'
|
|
318
|
+
$body | ConvertTo-Json -Depth 6 | Set-Content -LiteralPath $tmp -Encoding UTF8
|
|
319
|
+
Move-Item -LiteralPath $tmp -Destination (Ledger-Path $Name) -Force
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
function Start-OwnedComponent([string]$Name, $Spec, $Cfg = $null) {
|
|
323
|
+
$current = Test-OwnedInstance $Name
|
|
324
|
+
if ($current.Alive) { return $current }
|
|
325
|
+
if ($current.Reason -in @('process-unobservable','pid-reused','image-path-mismatch','image-hash-mismatch','script-hash-mismatch','dependency-hash-mismatch','corrupt-ledger','ledger-schema')) {
|
|
326
|
+
Fail "$Name ownership conflict: $($current.Reason); refusing to attach or kill an unverified process"
|
|
327
|
+
}
|
|
328
|
+
Remove-Item -LiteralPath (Ledger-Path $Name) -Force -ErrorAction SilentlyContinue
|
|
329
|
+
if ($Name -eq 'Cloud') { Remove-Item -LiteralPath (Join-Path $RuntimeDir 'current-origin.txt') -Force -ErrorAction SilentlyContinue }
|
|
330
|
+
Ensure-Directory $LogDir
|
|
331
|
+
$stdout = Log-Path $Name 'stdout'
|
|
332
|
+
$stderr = Log-Path $Name 'stderr'
|
|
333
|
+
Remove-Item -LiteralPath $stdout,$stderr -Force -ErrorAction SilentlyContinue
|
|
334
|
+
$nonceBytes = New-Object byte[] 32
|
|
335
|
+
[System.Security.Cryptography.RandomNumberGenerator]::Create().GetBytes($nonceBytes)
|
|
336
|
+
$nonce = -join ($nonceBytes | ForEach-Object { $_.ToString('x2') })
|
|
337
|
+
$componentExecutableHash = Get-ExecutableHash ([string]$Spec.FilePath)
|
|
338
|
+
if ($componentExecutableHash -ne [string]$Spec.FileSha256) { Fail "$Name executable hash mismatch before start: expected $($Spec.FileSha256), found $componentExecutableHash" }
|
|
339
|
+
Assert-ComponentDependencies $Name $Spec 'before start'
|
|
340
|
+
if ($Name -eq 'Bridge') {
|
|
341
|
+
$bridgeScriptHash = Get-ExecutableHash ([string]$Spec.ScriptPath)
|
|
342
|
+
if ($bridgeScriptHash -ne [string]$Spec.ScriptSha256) { Fail "bridge script hash mismatch before start: expected $($Spec.ScriptSha256), found $bridgeScriptHash" }
|
|
343
|
+
}
|
|
344
|
+
$args = [string]$Spec.Arguments
|
|
345
|
+
$start = @{ FilePath=[string]$Spec.FilePath; WorkingDirectory=[string]$Spec.WorkingDirectory; PassThru=$true; WindowStyle='Hidden'; RedirectStandardOutput=$stdout; RedirectStandardError=$stderr }
|
|
346
|
+
if (-not [string]::IsNullOrWhiteSpace($args)) { $start.ArgumentList = $args }
|
|
347
|
+
$hadCoreRootEnv = Test-Path Env:DEADBYTE_CORE_ROOT
|
|
348
|
+
$previousCoreRootEnv = $env:DEADBYTE_CORE_ROOT
|
|
349
|
+
$hadHostPolicyEnv = Test-Path Env:DEADBYTE_PRIVILEGED_POLICY
|
|
350
|
+
$previousHostPolicyEnv = $env:DEADBYTE_PRIVILEGED_POLICY
|
|
351
|
+
$hadWorkspaceRootEnv = Test-Path Env:DEADBYTE_WORKSPACE_ROOT
|
|
352
|
+
$previousWorkspaceRootEnv = $env:DEADBYTE_WORKSPACE_ROOT
|
|
353
|
+
$hadAuditRuntimeEnv = Test-Path Env:DEADBYTE_AUDIT_RUNTIME
|
|
354
|
+
$previousAuditRuntimeEnv = $env:DEADBYTE_AUDIT_RUNTIME
|
|
355
|
+
$hadMachineRuntimeEnv = Test-Path Env:DEADBYTE_MACHINE_RUNTIME
|
|
356
|
+
$previousMachineRuntimeEnv = $env:DEADBYTE_MACHINE_RUNTIME
|
|
357
|
+
$hadAgentRuntimeEnv = Test-Path Env:DEADBYTE_AGENT_RUNTIME
|
|
358
|
+
$previousAgentRuntimeEnv = $env:DEADBYTE_AGENT_RUNTIME
|
|
359
|
+
$hadProcessRuntimeEnv = Test-Path Env:DEADBYTE_PROCESS_RUNTIME
|
|
360
|
+
$previousProcessRuntimeEnv = $env:DEADBYTE_PROCESS_RUNTIME
|
|
361
|
+
$hadProcessPolicyEnv = Test-Path Env:DEADBYTE_PROCESS_POLICY
|
|
362
|
+
$previousProcessPolicyEnv = $env:DEADBYTE_PROCESS_POLICY
|
|
363
|
+
$hadCodingRuntimeEnv = Test-Path Env:DEADBYTE_CODING_RUNTIME
|
|
364
|
+
$previousCodingRuntimeEnv = $env:DEADBYTE_CODING_RUNTIME
|
|
365
|
+
$hadMachineFsRuntimeEnv = Test-Path Env:DEADBYTE_MACHINE_FS_RUNTIME
|
|
366
|
+
$previousMachineFsRuntimeEnv = $env:DEADBYTE_MACHINE_FS_RUNTIME
|
|
367
|
+
$hadObservationRuntimeEnv = Test-Path Env:DEADBYTE_OBSERVATION_RUNTIME
|
|
368
|
+
$previousObservationRuntimeEnv = $env:DEADBYTE_OBSERVATION_RUNTIME
|
|
369
|
+
$hadCodingPolicyEnv = Test-Path Env:DEADBYTE_CODING_POLICY
|
|
370
|
+
$previousCodingPolicyEnv = $env:DEADBYTE_CODING_POLICY
|
|
371
|
+
$hadAutonomousRuntimeEnv = Test-Path Env:DEADBYTE_AUTONOMOUS_RUNTIME
|
|
372
|
+
$previousAutonomousRuntimeEnv = $env:DEADBYTE_AUTONOMOUS_RUNTIME
|
|
373
|
+
$hadAutonomousPolicyEnv = Test-Path Env:DEADBYTE_AUTONOMOUS_POLICY
|
|
374
|
+
$previousAutonomousPolicyEnv = $env:DEADBYTE_AUTONOMOUS_POLICY
|
|
375
|
+
try {
|
|
376
|
+
if ($Name -eq 'Bridge' -and $Cfg) {
|
|
377
|
+
$env:DEADBYTE_AUDIT_RUNTIME = '1'
|
|
378
|
+
$env:DEADBYTE_CORE_ROOT = [string]$Cfg.CoreRoot
|
|
379
|
+
$env:DEADBYTE_WORKSPACE_ROOT = [string]$Cfg.WorkspaceRoot
|
|
380
|
+
$env:DEADBYTE_MACHINE_RUNTIME = if ([bool]$Cfg.MachineRuntimeEnabled) { '1' } else { '0' }
|
|
381
|
+
$env:DEADBYTE_AGENT_RUNTIME = if ([bool]$Cfg.AgentRuntimeEnabled) { '1' } else { '0' }
|
|
382
|
+
$env:DEADBYTE_PROCESS_RUNTIME = if ([bool]$Cfg.ProcessRuntimeEnabled) { '1' } else { '0' }
|
|
383
|
+
if (-not [string]::IsNullOrWhiteSpace([string]$Cfg.ProcessPolicyFile)) {
|
|
384
|
+
$env:DEADBYTE_PROCESS_POLICY = [string]$Cfg.ProcessPolicyFile
|
|
385
|
+
}
|
|
386
|
+
$env:DEADBYTE_CODING_RUNTIME = if ([bool]$Cfg.CodingRuntimeEnabled) { '1' } else { '0' }
|
|
387
|
+
$env:DEADBYTE_MACHINE_FS_RUNTIME = if ([bool]$Cfg.MachineFsRuntimeEnabled) { '1' } else { '0' }
|
|
388
|
+
$env:DEADBYTE_OBSERVATION_RUNTIME = if ([bool]$Cfg.ObservationRuntimeEnabled) { '1' } else { '0' }
|
|
389
|
+
if (-not [string]::IsNullOrWhiteSpace([string]$Cfg.CodingPolicyFile)) {
|
|
390
|
+
$env:DEADBYTE_CODING_POLICY = [string]$Cfg.CodingPolicyFile
|
|
391
|
+
}
|
|
392
|
+
$env:DEADBYTE_AUTONOMOUS_RUNTIME = if ([bool]$Cfg.AutonomousRuntimeEnabled) { '1' } else { '0' }
|
|
393
|
+
if (-not [string]::IsNullOrWhiteSpace([string]$Cfg.AutonomousPolicyFile)) {
|
|
394
|
+
$env:DEADBYTE_AUTONOMOUS_POLICY = [string]$Cfg.AutonomousPolicyFile
|
|
395
|
+
}
|
|
396
|
+
if (-not [string]::IsNullOrWhiteSpace([string]$Cfg.HostPolicyFile)) {
|
|
397
|
+
$env:DEADBYTE_PRIVILEGED_POLICY = [string]$Cfg.HostPolicyFile
|
|
398
|
+
}
|
|
399
|
+
} else {
|
|
400
|
+
Remove-Item Env:DEADBYTE_AUDIT_RUNTIME -ErrorAction SilentlyContinue
|
|
401
|
+
}
|
|
402
|
+
$proc = Start-Process @start
|
|
403
|
+
} finally {
|
|
404
|
+
if ($hadCoreRootEnv) { $env:DEADBYTE_CORE_ROOT = $previousCoreRootEnv }
|
|
405
|
+
else { Remove-Item Env:DEADBYTE_CORE_ROOT -ErrorAction SilentlyContinue }
|
|
406
|
+
if ($hadHostPolicyEnv) { $env:DEADBYTE_PRIVILEGED_POLICY = $previousHostPolicyEnv }
|
|
407
|
+
else { Remove-Item Env:DEADBYTE_PRIVILEGED_POLICY -ErrorAction SilentlyContinue }
|
|
408
|
+
if ($hadWorkspaceRootEnv) { $env:DEADBYTE_WORKSPACE_ROOT = $previousWorkspaceRootEnv }
|
|
409
|
+
else { Remove-Item Env:DEADBYTE_WORKSPACE_ROOT -ErrorAction SilentlyContinue }
|
|
410
|
+
if ($hadAuditRuntimeEnv) { $env:DEADBYTE_AUDIT_RUNTIME = $previousAuditRuntimeEnv }
|
|
411
|
+
else { Remove-Item Env:DEADBYTE_AUDIT_RUNTIME -ErrorAction SilentlyContinue }
|
|
412
|
+
if ($hadMachineRuntimeEnv) { $env:DEADBYTE_MACHINE_RUNTIME = $previousMachineRuntimeEnv }
|
|
413
|
+
else { Remove-Item Env:DEADBYTE_MACHINE_RUNTIME -ErrorAction SilentlyContinue }
|
|
414
|
+
if ($hadAgentRuntimeEnv) { $env:DEADBYTE_AGENT_RUNTIME = $previousAgentRuntimeEnv }
|
|
415
|
+
else { Remove-Item Env:DEADBYTE_AGENT_RUNTIME -ErrorAction SilentlyContinue }
|
|
416
|
+
if ($hadProcessRuntimeEnv) { $env:DEADBYTE_PROCESS_RUNTIME = $previousProcessRuntimeEnv }
|
|
417
|
+
else { Remove-Item Env:DEADBYTE_PROCESS_RUNTIME -ErrorAction SilentlyContinue }
|
|
418
|
+
if ($hadProcessPolicyEnv) { $env:DEADBYTE_PROCESS_POLICY = $previousProcessPolicyEnv }
|
|
419
|
+
else { Remove-Item Env:DEADBYTE_PROCESS_POLICY -ErrorAction SilentlyContinue }
|
|
420
|
+
if ($hadCodingRuntimeEnv) { $env:DEADBYTE_CODING_RUNTIME = $previousCodingRuntimeEnv }
|
|
421
|
+
else { Remove-Item Env:DEADBYTE_CODING_RUNTIME -ErrorAction SilentlyContinue }
|
|
422
|
+
if ($hadMachineFsRuntimeEnv) { $env:DEADBYTE_MACHINE_FS_RUNTIME = $previousMachineFsRuntimeEnv }
|
|
423
|
+
else { Remove-Item Env:DEADBYTE_MACHINE_FS_RUNTIME -ErrorAction SilentlyContinue }
|
|
424
|
+
if ($hadObservationRuntimeEnv) { $env:DEADBYTE_OBSERVATION_RUNTIME = $previousObservationRuntimeEnv }
|
|
425
|
+
else { Remove-Item Env:DEADBYTE_OBSERVATION_RUNTIME -ErrorAction SilentlyContinue }
|
|
426
|
+
if ($hadCodingPolicyEnv) { $env:DEADBYTE_CODING_POLICY = $previousCodingPolicyEnv }
|
|
427
|
+
else { Remove-Item Env:DEADBYTE_CODING_POLICY -ErrorAction SilentlyContinue }
|
|
428
|
+
if ($hadAutonomousRuntimeEnv) { $env:DEADBYTE_AUTONOMOUS_RUNTIME = $previousAutonomousRuntimeEnv }
|
|
429
|
+
else { Remove-Item Env:DEADBYTE_AUTONOMOUS_RUNTIME -ErrorAction SilentlyContinue }
|
|
430
|
+
if ($hadAutonomousPolicyEnv) { $env:DEADBYTE_AUTONOMOUS_POLICY = $previousAutonomousPolicyEnv }
|
|
431
|
+
else { Remove-Item Env:DEADBYTE_AUTONOMOUS_POLICY -ErrorAction SilentlyContinue }
|
|
432
|
+
}
|
|
433
|
+
Start-Sleep -Milliseconds 150
|
|
434
|
+
$obs = Get-ProcessObservation ([int]$proc.Id)
|
|
435
|
+
if (-not $obs) { Fail "$Name exited before identity capture; see $stderr" }
|
|
436
|
+
$expected = [System.IO.Path]::GetFullPath([string]$Spec.FilePath)
|
|
437
|
+
if (-not [string]::Equals($obs.image_path, $expected, [System.StringComparison]::OrdinalIgnoreCase)) {
|
|
438
|
+
try { Stop-Process -Id $proc.Id -Force -ErrorAction SilentlyContinue } catch {}
|
|
439
|
+
Fail "$Name spawned a wrapper instead of the configured long-lived executable; observed '$($obs.image_path)'"
|
|
440
|
+
}
|
|
441
|
+
if ($obs.image_sha256 -ne (Get-ExecutableHash $expected)) {
|
|
442
|
+
try { Stop-Process -Id $proc.Id -Force -ErrorAction SilentlyContinue } catch {}
|
|
443
|
+
Fail "$Name executable changed during start"
|
|
444
|
+
}
|
|
445
|
+
Write-Ledger $Name $obs $nonce $Spec
|
|
446
|
+
return Test-OwnedInstance $Name
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
function Stop-OwnedComponent([string]$Name) {
|
|
450
|
+
$owned = Test-OwnedInstance $Name
|
|
451
|
+
if (-not $owned.Ledger) { return }
|
|
452
|
+
if (-not $owned.Alive) {
|
|
453
|
+
if ($owned.Reason -eq 'process-missing') { Remove-Item -LiteralPath (Ledger-Path $Name) -Force -ErrorAction SilentlyContinue; return }
|
|
454
|
+
Fail "$Name is not provably owned ($($owned.Reason)); refusing Stop-Process"
|
|
455
|
+
}
|
|
456
|
+
Stop-Process -Id ([int]$owned.Ledger.pid) -Force -ErrorAction Stop
|
|
457
|
+
try { Wait-Process -Id ([int]$owned.Ledger.pid) -Timeout 5 -ErrorAction SilentlyContinue } catch {}
|
|
458
|
+
Remove-Item -LiteralPath (Ledger-Path $Name) -Force -ErrorAction SilentlyContinue
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
function Test-LocalReady($Cfg) {
|
|
462
|
+
try {
|
|
463
|
+
$r = Invoke-WebRequest -UseBasicParsing -Uri ([string]$Cfg.LocalReadyUri) -TimeoutSec ([int]$Cfg.ProbeTimeoutSeconds)
|
|
464
|
+
return ($r.StatusCode -ge 200 -and $r.StatusCode -lt 300)
|
|
465
|
+
} catch { return $false }
|
|
466
|
+
}
|
|
467
|
+
function Get-LocalReadyListenerOwners($Cfg) {
|
|
468
|
+
try { $uri = [Uri]([string]$Cfg.LocalReadyUri) } catch { Fail 'LocalReadyUri is invalid' }
|
|
469
|
+
if (-not $uri.IsLoopback) { Fail 'LocalReadyUri must be loopback for owned readiness attribution' }
|
|
470
|
+
try {
|
|
471
|
+
$listeners = @(Get-NetTCPConnection -State Listen -ErrorAction Stop | Where-Object {
|
|
472
|
+
[int]$_.LocalPort -eq [int]$uri.Port -and (
|
|
473
|
+
[string]$_.LocalAddress -eq [string]$uri.Host -or
|
|
474
|
+
[string]$_.LocalAddress -eq '0.0.0.0' -or
|
|
475
|
+
[string]$_.LocalAddress -eq '::'
|
|
476
|
+
)
|
|
477
|
+
})
|
|
478
|
+
} catch { Fail "cannot inspect listener ownership for local readiness endpoint: $($_.Exception.Message)" }
|
|
479
|
+
return @($listeners | ForEach-Object { [int]$_.OwningProcess } | Sort-Object -Unique)
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
function Assert-LocalReadyPortAvailable($Cfg) {
|
|
483
|
+
$owners = @(Get-LocalReadyListenerOwners $Cfg)
|
|
484
|
+
if ($owners.Count -gt 0) {
|
|
485
|
+
Fail ("local readiness endpoint already has listener pid(s)={0}; refusing to start an unverified Bridge" -f ($owners -join ','))
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
function Test-LocalReadyOwned($Cfg, $Bridge) {
|
|
490
|
+
if (-not $Bridge -or -not $Bridge.Alive) { return $false }
|
|
491
|
+
$owners = @(Get-LocalReadyListenerOwners $Cfg)
|
|
492
|
+
if ($owners.Count -ne 1 -or $owners[0] -ne [int]$Bridge.Ledger.pid) { return $false }
|
|
493
|
+
return (Test-LocalReady $Cfg)
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
function Get-ObservedState($Cfg) {
|
|
497
|
+
$bridge = Test-OwnedInstance 'Bridge'
|
|
498
|
+
$cloud = Test-OwnedInstance 'Cloud'
|
|
499
|
+
$ready = if ($bridge.Alive) { try { Test-LocalReadyOwned $Cfg $bridge } catch { $false } } else { $false }
|
|
500
|
+
$state = if (-not $bridge.Alive -and -not $cloud.Alive) { 'OFFLINE' }
|
|
501
|
+
elseif (-not $bridge.Alive -and $cloud.Alive) { 'PARKED' }
|
|
502
|
+
elseif ($bridge.Alive -and $cloud.Alive -and $ready) { 'ONLINE' }
|
|
503
|
+
else { 'DEGRADED' }
|
|
504
|
+
[pscustomobject]@{ State=$state; Bridge=$bridge; Cloud=$cloud; LocalReady=$ready }
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
function Wait-LocalReady($Cfg) {
|
|
508
|
+
$deadline = [DateTime]::UtcNow.AddSeconds([int]$Cfg.StartTimeoutSeconds)
|
|
509
|
+
do {
|
|
510
|
+
$bridge = Test-OwnedInstance 'Bridge'
|
|
511
|
+
if (-not $bridge.Alive) { return $false }
|
|
512
|
+
if (Test-LocalReadyOwned $Cfg $bridge) { return $true }
|
|
513
|
+
Start-Sleep -Milliseconds 250
|
|
514
|
+
} while ([DateTime]::UtcNow -lt $deadline)
|
|
515
|
+
return $false
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
function Wait-PublicDnsReady($Cfg, [string]$Url) {
|
|
519
|
+
try { $uri = [Uri]$Url } catch { Fail 'public MCP URL is invalid' }
|
|
520
|
+
if ($uri.Scheme -ne 'https') { Fail 'public MCP URL must be HTTPS' }
|
|
521
|
+
$deadline = [DateTime]::UtcNow.AddSeconds([int]$Cfg.StartTimeoutSeconds)
|
|
522
|
+
$requiredConsecutive = 3
|
|
523
|
+
$consecutive = 0
|
|
524
|
+
do {
|
|
525
|
+
try {
|
|
526
|
+
$addresses = @([System.Net.Dns]::GetHostAddresses($uri.DnsSafeHost))
|
|
527
|
+
if ($addresses.Count -gt 0) { $consecutive += 1 } else { $consecutive = 0 }
|
|
528
|
+
} catch { $consecutive = 0 }
|
|
529
|
+
if ($consecutive -ge $requiredConsecutive) { return }
|
|
530
|
+
Start-Sleep -Milliseconds 750
|
|
531
|
+
} while ([DateTime]::UtcNow -lt $deadline)
|
|
532
|
+
Fail 'public endpoint DNS did not become stably resolvable before gate'
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
function Get-CurrentUrl($Cfg) {
|
|
536
|
+
if ($Cfg.ContainsKey('McpUrlFile') -and -not [string]::IsNullOrWhiteSpace([string]$Cfg.McpUrlFile)) {
|
|
537
|
+
$fullFile = [string]$Cfg.McpUrlFile
|
|
538
|
+
if (-not (Test-Path -LiteralPath $fullFile -PathType Leaf)) { Fail "McpUrlFile missing: $fullFile" }
|
|
539
|
+
$transport = if ($Cfg.Cloud.ContainsKey('Transport')) { [string]$Cfg.Cloud.Transport } else { '' }
|
|
540
|
+
if ($transport -eq 'deadbyte.named-tunnel.v2') {
|
|
541
|
+
if (-not $Cfg.ContainsKey('McpUrlFileSha256') -or [string]$Cfg.McpUrlFileSha256 -cnotmatch '^[0-9a-f]{64}$') { Fail 'deadbyte.named-tunnel.v2 requires McpUrlFileSha256' }
|
|
542
|
+
$fullHash = Get-ExecutableHash $fullFile
|
|
543
|
+
if ($fullHash -ne [string]$Cfg.McpUrlFileSha256) { Fail "McpUrlFile SHA-256 mismatch: expected $($Cfg.McpUrlFileSha256), found $fullHash" }
|
|
544
|
+
}
|
|
545
|
+
$full = (Read-TextFileSafe $fullFile).Trim()
|
|
546
|
+
if ($full -notmatch '^https://') { Fail 'McpUrlFile must contain one HTTPS MCP endpoint' }
|
|
547
|
+
if ($transport -eq 'deadbyte.named-tunnel.v2') {
|
|
548
|
+
try { $fullUri = [System.Uri]$full } catch { Fail 'McpUrlFile must contain one valid HTTPS MCP endpoint' }
|
|
549
|
+
if ($fullUri.DnsSafeHost.ToLowerInvariant().EndsWith('.trycloudflare.com')) { Fail 'trycloudflare endpoint forbidden for deadbyte.named-tunnel.v2' }
|
|
550
|
+
}
|
|
551
|
+
return $full
|
|
552
|
+
}
|
|
553
|
+
$cloud = Test-OwnedInstance 'Cloud'
|
|
554
|
+
if (-not $cloud.Alive) { return $null }
|
|
555
|
+
$originFile = Join-Path $RuntimeDir 'current-origin.txt'
|
|
556
|
+
$origin = (Read-TextFileSafe $originFile).Trim()
|
|
557
|
+
if (-not $origin) {
|
|
558
|
+
$pattern = [string]$Cfg.UrlRegex
|
|
559
|
+
foreach ($file in @((Log-Path 'Cloud' 'stdout'), (Log-Path 'Cloud' 'stderr'))) {
|
|
560
|
+
$text = Read-TextFileSafe $file
|
|
561
|
+
$m = [regex]::Matches($text, $pattern)
|
|
562
|
+
if ($m.Count -gt 0) { $origin = $m[$m.Count - 1].Value }
|
|
563
|
+
}
|
|
564
|
+
if (-not $origin) { return $null }
|
|
565
|
+
Set-Content -LiteralPath $originFile -Value $origin -Encoding ASCII
|
|
566
|
+
}
|
|
567
|
+
$suffix = ''
|
|
568
|
+
if ($Cfg.ContainsKey('McpPathFile') -and -not [string]::IsNullOrWhiteSpace([string]$Cfg.McpPathFile)) {
|
|
569
|
+
$pathFile = [string]$Cfg.McpPathFile
|
|
570
|
+
if (-not (Test-Path -LiteralPath $pathFile -PathType Leaf)) { Fail "McpPathFile missing: $pathFile" }
|
|
571
|
+
$suffix = (Read-TextFileSafe $pathFile).Trim()
|
|
572
|
+
if ($suffix -and -not $suffix.StartsWith('/')) { Fail 'MCP path file must contain an absolute URL path beginning with slash' }
|
|
573
|
+
if ($suffix -match '[\r\n]') { Fail 'MCP path file contains newline data' }
|
|
574
|
+
}
|
|
575
|
+
return $origin.TrimEnd('/') + $suffix
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
function Wait-CurrentUrl($Cfg) {
|
|
579
|
+
$deadline = [DateTime]::UtcNow.AddSeconds([int]$Cfg.StartTimeoutSeconds)
|
|
580
|
+
do {
|
|
581
|
+
$cloud = Test-OwnedInstance 'Cloud'
|
|
582
|
+
if (-not $cloud.Alive) { return $null }
|
|
583
|
+
$url = Get-CurrentUrl $Cfg
|
|
584
|
+
if ($url) { return $url }
|
|
585
|
+
Start-Sleep -Milliseconds 250
|
|
586
|
+
} while ([DateTime]::UtcNow -lt $deadline)
|
|
587
|
+
return $null
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
function Invoke-CoreGate($Cfg, [string]$ScriptName, [string[]]$ExtraArguments = @()) {
|
|
591
|
+
$coreRoot = [string]$Cfg.CoreRoot
|
|
592
|
+
$script = Join-Path (Join-Path $coreRoot 'src') $ScriptName
|
|
593
|
+
if (-not (Test-Path -LiteralPath $script -PathType Leaf)) { Fail "core gate script missing: $script" }
|
|
594
|
+
$node = (Get-Command node.exe -ErrorAction Stop).Source
|
|
595
|
+
$stdout = Log-Path 'CoreGate' 'stdout'
|
|
596
|
+
$stderr = Log-Path 'CoreGate' 'stderr'
|
|
597
|
+
Remove-Item -LiteralPath $stdout,$stderr -Force -ErrorAction SilentlyContinue
|
|
598
|
+
$argv = @(('"{0}"' -f $script))
|
|
599
|
+
foreach ($arg in $ExtraArguments) {
|
|
600
|
+
if ($arg -match '[\r\n"]') { Fail 'core gate argument contains forbidden quoting/newline data' }
|
|
601
|
+
$argv += ('"{0}"' -f $arg)
|
|
602
|
+
}
|
|
603
|
+
$proc = Start-Process -FilePath $node -ArgumentList $argv -WorkingDirectory $coreRoot -Wait -PassThru -WindowStyle Hidden -RedirectStandardOutput $stdout -RedirectStandardError $stderr
|
|
604
|
+
if ($proc.ExitCode -ne 0) {
|
|
605
|
+
$detail = if (Test-Path -LiteralPath $stderr) { (Get-Content -LiteralPath $stderr -Raw -Encoding UTF8).Trim() } else { '' }
|
|
606
|
+
Fail "core gate $ScriptName failed exit=$($proc.ExitCode): $detail"
|
|
607
|
+
}
|
|
608
|
+
Write-Host (Get-Content -LiteralPath $stdout -Raw -Encoding UTF8)
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
function Start-Deadbyte($Cfg) {
|
|
612
|
+
$state = Get-ObservedState $Cfg
|
|
613
|
+
if ($state.State -eq 'ONLINE') { return $state }
|
|
614
|
+
if ($state.State -eq 'DEGRADED') { Fail 'runtime is DEGRADED; use status and stop only if identities remain verified' }
|
|
615
|
+
$cloudWasAlive = [bool]$state.Cloud.Alive
|
|
616
|
+
Assert-LocalReadyPortAvailable $Cfg
|
|
617
|
+
try {
|
|
618
|
+
Start-OwnedComponent 'Bridge' $Cfg.Bridge $Cfg | Out-Null
|
|
619
|
+
if (-not (Wait-LocalReady $Cfg)) { Fail 'bridge started but owned local readiness gate failed' }
|
|
620
|
+
Start-OwnedComponent 'Cloud' $Cfg.Cloud $Cfg | Out-Null
|
|
621
|
+
if (-not (Wait-CurrentUrl $Cfg)) { Fail 'public endpoint metadata did not become available before timeout' }
|
|
622
|
+
$final = Get-ObservedState $Cfg
|
|
623
|
+
if ($final.State -ne 'ONLINE') { Fail "start gate failed: observed $($final.State)" }
|
|
624
|
+
return $final
|
|
625
|
+
} catch {
|
|
626
|
+
try { Stop-OwnedComponent 'Bridge' } catch {}
|
|
627
|
+
if (-not $cloudWasAlive) { try { Stop-OwnedComponent 'Cloud' } catch {} }
|
|
628
|
+
throw
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
function Park-Deadbyte($Cfg) {
|
|
633
|
+
Stop-OwnedComponent 'Bridge'
|
|
634
|
+
$s = Get-ObservedState $Cfg
|
|
635
|
+
if ($s.State -notin @('PARKED','OFFLINE')) { Fail "park gate failed: observed $($s.State)" }
|
|
636
|
+
return $s
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
function Stop-Deadbyte($Cfg) {
|
|
640
|
+
Stop-OwnedComponent 'Bridge'
|
|
641
|
+
Stop-OwnedComponent 'Cloud'
|
|
642
|
+
Remove-Item -LiteralPath (Join-Path $RuntimeDir 'current-origin.txt') -Force -ErrorAction SilentlyContinue
|
|
643
|
+
$s = Get-ObservedState $Cfg
|
|
644
|
+
if ($s.State -ne 'OFFLINE') { Fail "stop gate failed: observed $($s.State)" }
|
|
645
|
+
return $s
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
function Get-HostPolicyMetadata($Cfg) {
|
|
649
|
+
if ([string]::IsNullOrWhiteSpace([string]$Cfg.HostPolicyFile)) { Fail 'privileged host plane is not configured' }
|
|
650
|
+
$policyPath = [string]$Cfg.HostPolicyFile
|
|
651
|
+
try { $policy = Get-Content -LiteralPath $policyPath -Raw -Encoding UTF8 | ConvertFrom-Json } catch { Fail "invalid host policy JSON: $policyPath" }
|
|
652
|
+
if ($policy.schema -ne 'deadbyte.host-policy.v1' -or $policy.enabled -ne $true) { Fail 'host policy schema/enabled mismatch' }
|
|
653
|
+
if ([string]::IsNullOrWhiteSpace([string]$policy.arm_file)) { Fail 'host policy arm_file missing' }
|
|
654
|
+
$armFile = [System.IO.Path]::GetFullPath([string]$policy.arm_file)
|
|
655
|
+
$runtimeReal = [System.IO.Path]::GetFullPath($RuntimeDir).TrimEnd('\') + '\'
|
|
656
|
+
if (-not $armFile.StartsWith($runtimeReal, [System.StringComparison]::OrdinalIgnoreCase)) { Fail 'host policy arm_file must live under controller runtime directory' }
|
|
657
|
+
[pscustomobject]@{
|
|
658
|
+
Path = $policyPath
|
|
659
|
+
Sha256 = Get-ExecutableHash $policyPath
|
|
660
|
+
ArmFile = $armFile
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
function Get-HostArmStatus($Cfg) {
|
|
665
|
+
if ([string]::IsNullOrWhiteSpace([string]$Cfg.HostPolicyFile)) { return [pscustomobject]@{ Configured=$false; Armed=$false; Reason='no-policy' } }
|
|
666
|
+
try { $meta = Get-HostPolicyMetadata $Cfg } catch { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason=$_.Exception.Message } }
|
|
667
|
+
if (-not (Test-Path -LiteralPath $meta.ArmFile -PathType Leaf)) { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='disarmed' } }
|
|
668
|
+
try { $arm = Get-Content -LiteralPath $meta.ArmFile -Raw -Encoding UTF8 | ConvertFrom-Json } catch { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='invalid-grant' } }
|
|
669
|
+
if ($arm.schema -ne 'deadbyte.host-grant.v2') { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='grant-schema' } }
|
|
670
|
+
if ([string]$arm.policy_sha256 -ne [string]$meta.Sha256) { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='policy-digest' } }
|
|
671
|
+
return [pscustomobject]@{ Configured=$true; Armed=$true; Reason='standing-grant' }
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
function Arm-Host($Cfg) {
|
|
675
|
+
$meta = Get-HostPolicyMetadata $Cfg
|
|
676
|
+
Ensure-Directory $RuntimeDir
|
|
677
|
+
$nonceBytes = New-Object byte[] 32
|
|
678
|
+
$rng = [System.Security.Cryptography.RandomNumberGenerator]::Create()
|
|
679
|
+
try { $rng.GetBytes($nonceBytes) } finally { $rng.Dispose() }
|
|
680
|
+
$nonce = -join ($nonceBytes | ForEach-Object { $_.ToString('x2') })
|
|
681
|
+
$now = [DateTime]::UtcNow
|
|
682
|
+
$body = [ordered]@{
|
|
683
|
+
schema = 'deadbyte.host-grant.v2'
|
|
684
|
+
policy_sha256 = [string]$meta.Sha256
|
|
685
|
+
instance_nonce = $nonce
|
|
686
|
+
granted_at_utc = $now.ToString('o')
|
|
687
|
+
}
|
|
688
|
+
$tmp = $meta.ArmFile + '.tmp'
|
|
689
|
+
$body | ConvertTo-Json -Depth 6 | Set-Content -LiteralPath $tmp -Encoding UTF8
|
|
690
|
+
Move-Item -LiteralPath $tmp -Destination $meta.ArmFile -Force
|
|
691
|
+
Write-Host 'PRIVILEGED HOST PLANE ENABLED UNTIL EXPLICIT REVOKE'
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
function Disarm-Host($Cfg) {
|
|
695
|
+
$meta = Get-HostPolicyMetadata $Cfg
|
|
696
|
+
Remove-Item -LiteralPath $meta.ArmFile -Force -ErrorAction SilentlyContinue
|
|
697
|
+
Write-Host 'PRIVILEGED HOST PLANE DISARMED'
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
function Show-HostStatus($Cfg) {
|
|
701
|
+
$h = Get-HostArmStatus $Cfg
|
|
702
|
+
Write-Host ("Host plane : {0} [{1}]" -f $(if ($h.Armed) { 'ARMED' } elseif ($h.Configured) { 'DISARMED' } else { 'UNCONFIGURED' }), $h.Reason)
|
|
703
|
+
return $h
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
function Get-ProcessPolicyMetadata($Cfg) {
|
|
707
|
+
if ([string]::IsNullOrWhiteSpace([string]$Cfg.ProcessPolicyFile)) { Fail 'process plane is not configured' }
|
|
708
|
+
$policyPath = [string]$Cfg.ProcessPolicyFile
|
|
709
|
+
try { $policy = Get-Content -LiteralPath $policyPath -Raw -Encoding UTF8 | ConvertFrom-Json } catch { Fail "invalid process policy JSON: $policyPath" }
|
|
710
|
+
if ($policy.schema -ne 'deadbyte.process-policy.v1' -or $policy.enabled -ne $true) { Fail 'process policy schema/enabled mismatch' }
|
|
711
|
+
if ([string]::IsNullOrWhiteSpace([string]$policy.grant_file)) { Fail 'process policy grant_file missing' }
|
|
712
|
+
$grantFile = [System.IO.Path]::GetFullPath([string]$policy.grant_file)
|
|
713
|
+
$runtimeReal = [System.IO.Path]::GetFullPath($RuntimeDir).TrimEnd('\') + '\'
|
|
714
|
+
if (-not $grantFile.StartsWith($runtimeReal, [System.StringComparison]::OrdinalIgnoreCase)) { Fail 'process policy grant_file must live under controller runtime directory' }
|
|
715
|
+
$profileIds = @($policy.profiles.PSObject.Properties.Name)
|
|
716
|
+
$rootIds = @($policy.roots.PSObject.Properties.Name)
|
|
717
|
+
if ($profileIds.Count -lt 1 -or $rootIds.Count -lt 1) { Fail 'process policy requires profiles and roots' }
|
|
718
|
+
[pscustomobject]@{ Path=$policyPath; Sha256=Get-ExecutableHash $policyPath; GrantFile=$grantFile; ProfileIds=$profileIds; RootIds=$rootIds }
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
function Get-ProcessGrantStatus($Cfg) {
|
|
722
|
+
if ([string]::IsNullOrWhiteSpace([string]$Cfg.ProcessPolicyFile)) { return [pscustomobject]@{ Configured=$false; Armed=$false; Reason='no-policy' } }
|
|
723
|
+
try { $meta = Get-ProcessPolicyMetadata $Cfg } catch { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason=$_.Exception.Message } }
|
|
724
|
+
if (-not (Test-Path -LiteralPath $meta.GrantFile -PathType Leaf)) { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='disarmed' } }
|
|
725
|
+
try { $grant = Get-Content -LiteralPath $meta.GrantFile -Raw -Encoding UTF8 | ConvertFrom-Json } catch { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='invalid-grant' } }
|
|
726
|
+
if ($grant.schema -ne 'deadbyte.process-grant.v1') { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='grant-schema' } }
|
|
727
|
+
if ([string]$grant.policy_sha256 -ne [string]$meta.Sha256) { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='policy-digest' } }
|
|
728
|
+
$profiles = @($grant.profile_ids); $roots = @($grant.root_ids)
|
|
729
|
+
if ($profiles.Count -lt 1 -or @($profiles | Where-Object { $_ -notin $meta.ProfileIds }).Count -gt 0) { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='profiles-invalid' } }
|
|
730
|
+
if ($roots.Count -lt 1 -or @($roots | Where-Object { $_ -notin $meta.RootIds }).Count -gt 0) { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='roots-invalid' } }
|
|
731
|
+
return [pscustomobject]@{ Configured=$true; Armed=$true; Reason='standing-grant' }
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
function Arm-Process($Cfg) {
|
|
735
|
+
$meta = Get-ProcessPolicyMetadata $Cfg
|
|
736
|
+
Ensure-Directory $RuntimeDir
|
|
737
|
+
$nonceBytes = New-Object byte[] 32
|
|
738
|
+
$rng = [System.Security.Cryptography.RandomNumberGenerator]::Create()
|
|
739
|
+
try { $rng.GetBytes($nonceBytes) } finally { $rng.Dispose() }
|
|
740
|
+
$nonce = -join ($nonceBytes | ForEach-Object { $_.ToString('x2') })
|
|
741
|
+
$body = [ordered]@{
|
|
742
|
+
schema = 'deadbyte.process-grant.v1'
|
|
743
|
+
policy_sha256 = [string]$meta.Sha256
|
|
744
|
+
instance_nonce = $nonce
|
|
745
|
+
profile_ids = @($meta.ProfileIds)
|
|
746
|
+
root_ids = @($meta.RootIds)
|
|
747
|
+
granted_at_utc = [DateTime]::UtcNow.ToString('o')
|
|
748
|
+
}
|
|
749
|
+
$tmp = $meta.GrantFile + '.tmp'
|
|
750
|
+
$body | ConvertTo-Json -Depth 6 | Set-Content -LiteralPath $tmp -Encoding UTF8
|
|
751
|
+
Move-Item -LiteralPath $tmp -Destination $meta.GrantFile -Force
|
|
752
|
+
Write-Host 'PROCESS PLANE ENABLED UNTIL EXPLICIT REVOKE'
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
function Disarm-Process($Cfg) {
|
|
756
|
+
$meta = Get-ProcessPolicyMetadata $Cfg
|
|
757
|
+
Remove-Item -LiteralPath $meta.GrantFile -Force -ErrorAction SilentlyContinue
|
|
758
|
+
Write-Host 'PROCESS PLANE DISARMED'
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
function Show-ProcessStatus($Cfg) {
|
|
762
|
+
$p = Get-ProcessGrantStatus $Cfg
|
|
763
|
+
Write-Host ("Process plane : {0} [{1}]" -f $(if ($p.Armed) { 'ARMED' } elseif ($p.Configured) { 'DISARMED' } else { 'UNCONFIGURED' }), $p.Reason)
|
|
764
|
+
return $p
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
function Get-CodingPolicyMetadata($Cfg) {
|
|
768
|
+
if ([string]::IsNullOrWhiteSpace([string]$Cfg.CodingPolicyFile)) { Fail 'coding plane is not configured' }
|
|
769
|
+
$policyPath = [string]$Cfg.CodingPolicyFile
|
|
770
|
+
try { $policy = Get-Content -LiteralPath $policyPath -Raw -Encoding UTF8 | ConvertFrom-Json } catch { Fail "invalid coding policy JSON: $policyPath" }
|
|
771
|
+
if ($policy.schema -ne 'deadbyte.coding-policy.v1' -or $policy.enabled -ne $true) { Fail 'coding policy schema/enabled mismatch' }
|
|
772
|
+
if ([string]::IsNullOrWhiteSpace([string]$policy.lease_file)) { Fail 'coding policy lease_file missing' }
|
|
773
|
+
$leaseFile = [System.IO.Path]::GetFullPath([string]$policy.lease_file)
|
|
774
|
+
$runtimeReal = [System.IO.Path]::GetFullPath($RuntimeDir).TrimEnd('\') + '\'
|
|
775
|
+
if (-not $leaseFile.StartsWith($runtimeReal, [System.StringComparison]::OrdinalIgnoreCase)) { Fail 'coding policy lease_file must live under controller runtime directory' }
|
|
776
|
+
$rootIds = @($policy.roots.PSObject.Properties.Name)
|
|
777
|
+
if ($rootIds.Count -lt 1) { Fail 'coding policy requires at least one root' }
|
|
778
|
+
[pscustomobject]@{ Path=$policyPath; Sha256=Get-ExecutableHash $policyPath; LeaseFile=$leaseFile; RootIds=$rootIds }
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
function Get-CodingLeaseStatus($Cfg) {
|
|
782
|
+
if ([string]::IsNullOrWhiteSpace([string]$Cfg.CodingPolicyFile)) { return [pscustomobject]@{ Configured=$false; Armed=$false; Reason='no-policy' } }
|
|
783
|
+
try { $meta = Get-CodingPolicyMetadata $Cfg } catch { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason=$_.Exception.Message } }
|
|
784
|
+
if (-not (Test-Path -LiteralPath $meta.LeaseFile -PathType Leaf)) { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='disarmed' } }
|
|
785
|
+
try { $lease = Get-Content -LiteralPath $meta.LeaseFile -Raw -Encoding UTF8 | ConvertFrom-Json } catch { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='invalid-grant' } }
|
|
786
|
+
if ($lease.schema -ne 'deadbyte.coding-grant.v2') { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='grant-schema' } }
|
|
787
|
+
if ([string]$lease.policy_sha256 -ne [string]$meta.Sha256) { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='policy-digest' } }
|
|
788
|
+
$roots = @($lease.root_ids)
|
|
789
|
+
if ($roots.Count -lt 1 -or @($roots | Where-Object { $_ -notin $meta.RootIds }).Count -gt 0) { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='roots-invalid' } }
|
|
790
|
+
return [pscustomobject]@{ Configured=$true; Armed=$true; Reason='standing-grant' }
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
function Arm-Coding($Cfg) {
|
|
794
|
+
$meta = Get-CodingPolicyMetadata $Cfg
|
|
795
|
+
Ensure-Directory $RuntimeDir
|
|
796
|
+
$nonceBytes = New-Object byte[] 32
|
|
797
|
+
$rng = [System.Security.Cryptography.RandomNumberGenerator]::Create()
|
|
798
|
+
try { $rng.GetBytes($nonceBytes) } finally { $rng.Dispose() }
|
|
799
|
+
$nonce = -join ($nonceBytes | ForEach-Object { $_.ToString('x2') })
|
|
800
|
+
$now = [DateTime]::UtcNow
|
|
801
|
+
$body = [ordered]@{
|
|
802
|
+
schema = 'deadbyte.coding-grant.v2'
|
|
803
|
+
policy_sha256 = [string]$meta.Sha256
|
|
804
|
+
instance_nonce = $nonce
|
|
805
|
+
root_ids = @($meta.RootIds)
|
|
806
|
+
granted_at_utc = $now.ToString('o')
|
|
807
|
+
}
|
|
808
|
+
$tmp = $meta.LeaseFile + '.tmp'
|
|
809
|
+
$body | ConvertTo-Json -Depth 6 | Set-Content -LiteralPath $tmp -Encoding UTF8
|
|
810
|
+
Move-Item -LiteralPath $tmp -Destination $meta.LeaseFile -Force
|
|
811
|
+
Write-Host 'CODING PLANE ENABLED UNTIL EXPLICIT REVOKE'
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
function Disarm-Coding($Cfg) {
|
|
815
|
+
$meta = Get-CodingPolicyMetadata $Cfg
|
|
816
|
+
Remove-Item -LiteralPath $meta.LeaseFile -Force -ErrorAction SilentlyContinue
|
|
817
|
+
try { Disarm-Autonomous $Cfg -Quiet } catch { Write-Warning "autonomous lease cleanup failed after coding revocation: $($_.Exception.Message)" }
|
|
818
|
+
Write-Host 'CODING PLANE DISARMED; AUTONOMOUS AUTHORITY REVOKED'
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
function Show-CodingStatus($Cfg) {
|
|
822
|
+
$c = Get-CodingLeaseStatus $Cfg
|
|
823
|
+
Write-Host ("Coding plane : {0} [{1}]" -f $(if ($c.Armed) { 'ARMED' } elseif ($c.Configured) { 'DISARMED' } else { 'UNCONFIGURED' }), $c.Reason)
|
|
824
|
+
return $c
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
function Get-AutonomousPolicyMetadata($Cfg) {
|
|
828
|
+
if ([string]::IsNullOrWhiteSpace([string]$Cfg.AutonomousPolicyFile)) { Fail 'autonomous plane is not configured' }
|
|
829
|
+
$policyPath = [string]$Cfg.AutonomousPolicyFile
|
|
830
|
+
try { $policy = Get-Content -LiteralPath $policyPath -Raw -Encoding UTF8 | ConvertFrom-Json } catch { Fail "invalid autonomous policy JSON: $policyPath" }
|
|
831
|
+
if ($policy.schema -ne 'deadbyte.autonomous-policy.v1' -or $policy.enabled -ne $true) { Fail 'autonomous policy schema/enabled mismatch' }
|
|
832
|
+
if ([string]::IsNullOrWhiteSpace([string]$policy.lease_file)) { Fail 'autonomous policy lease_file missing' }
|
|
833
|
+
$leaseFile = [System.IO.Path]::GetFullPath([string]$policy.lease_file)
|
|
834
|
+
$runtimeReal = [System.IO.Path]::GetFullPath($RuntimeDir).TrimEnd('\') + '\'
|
|
835
|
+
if (-not $leaseFile.StartsWith($runtimeReal, [System.StringComparison]::OrdinalIgnoreCase)) { Fail 'autonomous policy lease_file must live under controller runtime directory' }
|
|
836
|
+
$codingMeta = Get-CodingPolicyMetadata $Cfg
|
|
837
|
+
if ([string]$policy.coding_policy_sha256 -ne [string]$codingMeta.Sha256) { Fail 'autonomous policy coding_policy_sha256 mismatch' }
|
|
838
|
+
$rootIds = @($policy.root_ids)
|
|
839
|
+
if ($rootIds.Count -lt 1) { Fail 'autonomous policy requires at least one root' }
|
|
840
|
+
[pscustomobject]@{ Path=$policyPath; Sha256=Get-ExecutableHash $policyPath; LeaseFile=$leaseFile; RootIds=$rootIds; CodingPolicySha256=$codingMeta.Sha256 }
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
function Get-AutonomousLeaseStatus($Cfg) {
|
|
844
|
+
if ([string]::IsNullOrWhiteSpace([string]$Cfg.AutonomousPolicyFile)) { return [pscustomobject]@{ Configured=$false; Armed=$false; Reason='no-policy' } }
|
|
845
|
+
try { $meta = Get-AutonomousPolicyMetadata $Cfg } catch { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason=$_.Exception.Message } }
|
|
846
|
+
$coding = Get-CodingLeaseStatus $Cfg
|
|
847
|
+
if (-not $coding.Armed) { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='coding-disarmed' } }
|
|
848
|
+
if (-not (Test-Path -LiteralPath $meta.LeaseFile -PathType Leaf)) { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='disarmed' } }
|
|
849
|
+
try { $lease = Get-Content -LiteralPath $meta.LeaseFile -Raw -Encoding UTF8 | ConvertFrom-Json } catch { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='invalid-grant' } }
|
|
850
|
+
if ($lease.schema -ne 'deadbyte.autonomous-grant.v2') { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='grant-schema' } }
|
|
851
|
+
if ([string]$lease.policy_sha256 -ne [string]$meta.Sha256) { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='policy-digest' } }
|
|
852
|
+
if ([string]$lease.coding_policy_sha256 -ne [string]$meta.CodingPolicySha256) { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='coding-policy-digest' } }
|
|
853
|
+
$roots = @($lease.root_ids)
|
|
854
|
+
if ($roots.Count -lt 1 -or @($roots | Where-Object { $_ -notin $meta.RootIds }).Count -gt 0) { return [pscustomobject]@{ Configured=$true; Armed=$false; Reason='roots-invalid' } }
|
|
855
|
+
return [pscustomobject]@{ Configured=$true; Armed=$true; Reason='standing-grant' }
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
function Arm-Autonomous($Cfg) {
|
|
859
|
+
$coding = Get-CodingLeaseStatus $Cfg
|
|
860
|
+
if (-not $coding.Armed) { Fail 'autonomous plane requires an active coding lease; run armcoding first' }
|
|
861
|
+
$meta = Get-AutonomousPolicyMetadata $Cfg
|
|
862
|
+
Ensure-Directory $RuntimeDir
|
|
863
|
+
$nonceBytes = New-Object byte[] 32
|
|
864
|
+
$rng = [System.Security.Cryptography.RandomNumberGenerator]::Create()
|
|
865
|
+
try { $rng.GetBytes($nonceBytes) } finally { $rng.Dispose() }
|
|
866
|
+
$nonce = -join ($nonceBytes | ForEach-Object { $_.ToString('x2') })
|
|
867
|
+
$now = [DateTime]::UtcNow
|
|
868
|
+
$body = [ordered]@{ schema='deadbyte.autonomous-grant.v2'; policy_sha256=[string]$meta.Sha256; coding_policy_sha256=[string]$meta.CodingPolicySha256; instance_nonce=$nonce; root_ids=@($meta.RootIds); granted_at_utc=$now.ToString('o') }
|
|
869
|
+
$tmp = $meta.LeaseFile + '.tmp'
|
|
870
|
+
$body | ConvertTo-Json -Depth 6 | Set-Content -LiteralPath $tmp -Encoding UTF8
|
|
871
|
+
Move-Item -LiteralPath $tmp -Destination $meta.LeaseFile -Force
|
|
872
|
+
Write-Host 'AUTONOMOUS PLANE ENABLED UNTIL EXPLICIT REVOKE'
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
function Disarm-Autonomous($Cfg, [switch]$Quiet) {
|
|
876
|
+
if ([string]::IsNullOrWhiteSpace([string]$Cfg.AutonomousPolicyFile)) { return }
|
|
877
|
+
$meta = Get-AutonomousPolicyMetadata $Cfg
|
|
878
|
+
Remove-Item -LiteralPath $meta.LeaseFile -Force -ErrorAction SilentlyContinue
|
|
879
|
+
if (-not $Quiet) { Write-Host 'AUTONOMOUS PLANE DISARMED' }
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
function Show-AutonomousStatus($Cfg) {
|
|
883
|
+
$a = Get-AutonomousLeaseStatus $Cfg
|
|
884
|
+
Write-Host ("Autonomous : {0} [{1}]" -f $(if ($a.Armed) { 'ARMED' } elseif ($a.Configured) { 'DISARMED' } else { 'UNCONFIGURED' }), $a.Reason)
|
|
885
|
+
return $a
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
function Show-State($Cfg) {
|
|
889
|
+
$s = Get-ObservedState $Cfg
|
|
890
|
+
$bp = if ($s.Bridge.Alive) { $s.Bridge.Ledger.pid } else { '-' }
|
|
891
|
+
$cp = if ($s.Cloud.Alive) { $s.Cloud.Ledger.pid } else { '-' }
|
|
892
|
+
$url = Get-CurrentUrl $Cfg
|
|
893
|
+
Write-Host ("DEADBYTE MCP = {0}" -f $s.State)
|
|
894
|
+
Write-Host ("Bridge PID : {0} [{1}]" -f $bp, $s.Bridge.Reason)
|
|
895
|
+
Write-Host ("Cloud PID : {0} [{1}]" -f $cp, $s.Cloud.Reason)
|
|
896
|
+
Write-Host ("Local ready : {0}" -f $s.LocalReady)
|
|
897
|
+
Write-Host ("URL : {0}" -f $(if ($url) { $url } else { '<unknown>' }))
|
|
898
|
+
Write-Host ("Machine runtime: {0}" -f $(if ([bool]$Cfg.MachineRuntimeEnabled) { 'ENABLED' } else { 'DISABLED' }))
|
|
899
|
+
Write-Host ("Agent runtime : {0}" -f $(if ([bool]$Cfg.AgentRuntimeEnabled) { 'ENABLED' } else { 'DISABLED' }))
|
|
900
|
+
Write-Host ("Process rt : {0}" -f $(if ([bool]$Cfg.ProcessRuntimeEnabled) { 'ENABLED' } else { 'DISABLED' }))
|
|
901
|
+
Write-Host ("Coding runtime: {0}" -f $(if ([bool]$Cfg.CodingRuntimeEnabled) { 'ENABLED' } else { 'DISABLED' }))
|
|
902
|
+
Write-Host ("Machine FS rt : {0}" -f $(if ([bool]$Cfg.MachineFsRuntimeEnabled) { 'ENABLED' } else { 'DISABLED' }))
|
|
903
|
+
Write-Host ("Observation rt: {0}" -f $(if ([bool]$Cfg.ObservationRuntimeEnabled) { 'ENABLED' } else { 'DISABLED' }))
|
|
904
|
+
Write-Host ("Autonomous rt : {0}" -f $(if ([bool]$Cfg.AutonomousRuntimeEnabled) { 'ENABLED' } else { 'DISABLED' }))
|
|
905
|
+
Show-ProcessStatus $Cfg | Out-Null
|
|
906
|
+
Show-CodingStatus $Cfg | Out-Null
|
|
907
|
+
Show-AutonomousStatus $Cfg | Out-Null
|
|
908
|
+
Show-HostStatus $Cfg | Out-Null
|
|
909
|
+
return $s
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
function Invoke-MachineSmoke($Cfg) {
|
|
913
|
+
if (-not [bool]$Cfg.MachineRuntimeEnabled) { Fail 'machinetest requires MachineRuntimeEnabled' }
|
|
914
|
+
$s = Get-ObservedState $Cfg
|
|
915
|
+
if ($s.State -ne 'ONLINE') { Fail "machinetest requires ONLINE; observed $($s.State)" }
|
|
916
|
+
$url = Get-CurrentUrl $Cfg
|
|
917
|
+
if (-not $url) { Fail 'public MCP URL unavailable' }
|
|
918
|
+
Wait-PublicDnsReady $Cfg $url
|
|
919
|
+
Invoke-CoreGate $Cfg 'remote-mcp-machine-smoke-client.mjs' @($url)
|
|
920
|
+
Write-Host 'MACHINE IDENTITY LIVE GATE PASS: public status/list + SPKI identity + signed Ed25519 ping verified.'
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
function Invoke-Smoke($Cfg, [bool]$Full) {
|
|
924
|
+
$s = Get-ObservedState $Cfg
|
|
925
|
+
if ($s.State -ne 'ONLINE') { Fail "MCP test requires ONLINE; observed $($s.State)" }
|
|
926
|
+
if (-not (Test-LocalReady $Cfg)) { Fail 'local readiness probe failed' }
|
|
927
|
+
$url = Get-CurrentUrl $Cfg
|
|
928
|
+
if (-not $url) { Fail 'public MCP URL unavailable; configure McpUrlFile or McpPathFile' }
|
|
929
|
+
Wait-PublicDnsReady $Cfg $url
|
|
930
|
+
Invoke-CoreGate $Cfg 'remote-mcp-smoke-client.mjs' @($url, $(if ($Full) { 'full' } else { 'smoke' }))
|
|
931
|
+
if ($Full) {
|
|
932
|
+
Invoke-CoreGate $Cfg 'mcp-contained-smoke-client.mjs'
|
|
933
|
+
Write-Host 'FULL GATE PASS: public modern MCP + proof + public contained proof + local canonical 3-operation AppContainer/replay/evidence gate.'
|
|
934
|
+
} else {
|
|
935
|
+
Write-Host 'MCP SMOKE PASS: public modern MCP + exact tool catalog + signed proof + independent verification.'
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
function Invoke-HostSmoke($Cfg) {
|
|
940
|
+
$h = Get-HostArmStatus $Cfg
|
|
941
|
+
if (-not $h.Armed) { Fail 'hosttest requires an active local arm lease; run armhost first' }
|
|
942
|
+
$s = Get-ObservedState $Cfg
|
|
943
|
+
if ($s.State -ne 'ONLINE') { Fail "hosttest requires ONLINE; observed $($s.State)" }
|
|
944
|
+
$url = Get-CurrentUrl $Cfg
|
|
945
|
+
if (-not $url) { Fail 'public MCP URL unavailable' }
|
|
946
|
+
Wait-PublicDnsReady $Cfg $url
|
|
947
|
+
Invoke-CoreGate $Cfg 'remote-mcp-host-smoke-client.mjs' @($url)
|
|
948
|
+
Write-Host 'HOST PLANE LIVE GATE PASS: public host write + hash readback + hash-pinned exec + cleanup.'
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
function Invoke-CodingSmoke($Cfg) {
|
|
952
|
+
$c = Get-CodingLeaseStatus $Cfg
|
|
953
|
+
if (-not $c.Armed) { Fail 'codingtest requires an active local coding lease; run armcoding first' }
|
|
954
|
+
$s = Get-ObservedState $Cfg
|
|
955
|
+
if ($s.State -ne 'ONLINE') { Fail "codingtest requires ONLINE; observed $($s.State)" }
|
|
956
|
+
$url = Get-CurrentUrl $Cfg
|
|
957
|
+
if (-not $url) { Fail 'public MCP URL unavailable' }
|
|
958
|
+
Wait-PublicDnsReady $Cfg $url
|
|
959
|
+
Invoke-CoreGate $Cfg 'remote-mcp-coding-smoke-client.mjs' @($url)
|
|
960
|
+
Write-Host 'CODING PLANE LIVE GATE PASS: public edit + command + benchmark + durable coding-task receipt verification.'
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
function Invoke-AutonomousSmoke($Cfg) {
|
|
964
|
+
$a = Get-AutonomousLeaseStatus $Cfg
|
|
965
|
+
if (-not $a.Armed) { Fail 'autonomoustest requires active coding + autonomous leases; run armcoding then armautonomous' }
|
|
966
|
+
$s = Get-ObservedState $Cfg
|
|
967
|
+
if ($s.State -ne 'ONLINE') { Fail "autonomoustest requires ONLINE; observed $($s.State)" }
|
|
968
|
+
$url = Get-CurrentUrl $Cfg
|
|
969
|
+
if (-not $url) { Fail 'public MCP URL unavailable' }
|
|
970
|
+
Wait-PublicDnsReady $Cfg $url
|
|
971
|
+
Invoke-CoreGate $Cfg 'remote-mcp-autonomous-smoke-client.mjs' @($url)
|
|
972
|
+
Write-Host 'AUTONOMOUS PRODUCTION LIVE GATE PASS: public sampling MRTR + native diff + fail/diagnose/replan + build/test/benchmark + signed release gate.'
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
function Clean-Stale {
|
|
976
|
+
Ensure-Directory $RuntimeDir
|
|
977
|
+
foreach ($name in @('Bridge','Cloud')) {
|
|
978
|
+
$o = Test-OwnedInstance $name
|
|
979
|
+
if ($o.Ledger -and -not $o.Alive -and $o.Reason -eq 'process-missing') {
|
|
980
|
+
Remove-Item -LiteralPath (Ledger-Path $name) -Force -ErrorAction SilentlyContinue
|
|
981
|
+
} elseif ($o.Ledger -and -not $o.Alive -and $o.Reason -ne 'no-ledger') {
|
|
982
|
+
Write-Warning "$name ledger retained: $($o.Reason). No unverified process was killed."
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
function Run-Command([string]$Name) {
|
|
988
|
+
$cfg = Get-Config
|
|
989
|
+
Assert-ControllerRootBound $cfg
|
|
990
|
+
Ensure-Directory $RuntimeDir; Ensure-Directory $LogDir
|
|
991
|
+
switch ($Name) {
|
|
992
|
+
'start' { Start-Deadbyte $cfg | Out-Null; Show-State $cfg | Out-Null }
|
|
993
|
+
'resume' { Start-Deadbyte $cfg | Out-Null; Show-State $cfg | Out-Null }
|
|
994
|
+
'park' { Park-Deadbyte $cfg | Out-Null; Show-State $cfg | Out-Null }
|
|
995
|
+
'stop' { Stop-Deadbyte $cfg | Out-Null; Show-State $cfg | Out-Null }
|
|
996
|
+
'restart' { Stop-Deadbyte $cfg | Out-Null; Start-Deadbyte $cfg | Out-Null; Show-State $cfg | Out-Null }
|
|
997
|
+
'status' { Show-State $cfg | Out-Null }
|
|
998
|
+
'url' { $u=Get-CurrentUrl $cfg; if (-not $u) { Fail 'URL unavailable' }; Write-Output $u }
|
|
999
|
+
'test' { Invoke-Smoke $cfg $false }
|
|
1000
|
+
'fulltest'{ Invoke-Smoke $cfg $true }
|
|
1001
|
+
'toggle' { $s=Get-ObservedState $cfg; if ($s.State -eq 'ONLINE') { Park-Deadbyte $cfg | Out-Null } elseif ($s.State -in @('PARKED','OFFLINE')) { Start-Deadbyte $cfg | Out-Null } else { Fail 'toggle refuses DEGRADED state' }; Show-State $cfg | Out-Null }
|
|
1002
|
+
'clean' { Clean-Stale; Show-State $cfg | Out-Null }
|
|
1003
|
+
'machinetest' { Invoke-MachineSmoke $cfg }
|
|
1004
|
+
'armhost' { Arm-Host $cfg; Show-HostStatus $cfg | Out-Null }
|
|
1005
|
+
'disarmhost' { Disarm-Host $cfg; Show-HostStatus $cfg | Out-Null }
|
|
1006
|
+
'hoststatus' { Show-HostStatus $cfg | Out-Null }
|
|
1007
|
+
'hosttest' { Invoke-HostSmoke $cfg }
|
|
1008
|
+
'armprocess' { Arm-Process $cfg; Show-ProcessStatus $cfg | Out-Null }
|
|
1009
|
+
'disarmprocess' { Disarm-Process $cfg; Show-ProcessStatus $cfg | Out-Null }
|
|
1010
|
+
'processstatus' { Show-ProcessStatus $cfg | Out-Null }
|
|
1011
|
+
'armcoding' { Arm-Coding $cfg; Show-CodingStatus $cfg | Out-Null }
|
|
1012
|
+
'disarmcoding' { Disarm-Coding $cfg; Show-CodingStatus $cfg | Out-Null; Show-AutonomousStatus $cfg | Out-Null }
|
|
1013
|
+
'codingstatus' { Show-CodingStatus $cfg | Out-Null }
|
|
1014
|
+
'codingtest' { Invoke-CodingSmoke $cfg }
|
|
1015
|
+
'armautonomous' { Arm-Autonomous $cfg; Show-AutonomousStatus $cfg | Out-Null }
|
|
1016
|
+
'disarmautonomous' { Disarm-Autonomous $cfg; Show-AutonomousStatus $cfg | Out-Null }
|
|
1017
|
+
'autonomousstatus' { Show-AutonomousStatus $cfg | Out-Null }
|
|
1018
|
+
'autonomoustest' { Invoke-AutonomousSmoke $cfg }
|
|
1019
|
+
default { Fail "unknown command '$Name'" }
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
if ($Command -ne 'menu') { Run-Command $Command; exit 0 }
|
|
1024
|
+
|
|
1025
|
+
while ($true) {
|
|
1026
|
+
Clear-Host
|
|
1027
|
+
$cfg = Get-Config
|
|
1028
|
+
Assert-ControllerRootBound $cfg
|
|
1029
|
+
Write-Host 'DEADBYTE MCP ON-DEMAND CONTROLLER V0.8.7 / R33'
|
|
1030
|
+
Write-Host '======================================'
|
|
1031
|
+
Show-State $cfg | Out-Null
|
|
1032
|
+
Write-Host ''
|
|
1033
|
+
Write-Host '[1] Start / Resume'
|
|
1034
|
+
Write-Host '[2] Park'
|
|
1035
|
+
Write-Host '[3] Full Stop'
|
|
1036
|
+
Write-Host '[4] Restart'
|
|
1037
|
+
Write-Host '[5] Transport smoke test'
|
|
1038
|
+
Write-Host '[6] Public transport gate'
|
|
1039
|
+
Write-Host '[7] Show current URL'
|
|
1040
|
+
Write-Host '[8] Clean stale ledgers'
|
|
1041
|
+
Write-Host '[9] Enable privileged host plane (standing grant)'
|
|
1042
|
+
Write-Host '[10] Revoke privileged host plane'
|
|
1043
|
+
Write-Host '[11] Host plane status'
|
|
1044
|
+
Write-Host '[12] Host plane LIVE gate (requires grant)'
|
|
1045
|
+
Write-Host '[13] Enable coding plane (standing grant)'
|
|
1046
|
+
Write-Host '[14] Revoke coding plane'
|
|
1047
|
+
Write-Host '[15] Coding plane status'
|
|
1048
|
+
Write-Host '[16] Coding plane LIVE gate (requires grant)'
|
|
1049
|
+
Write-Host '[17] Enable autonomous plane (standing grant)'
|
|
1050
|
+
Write-Host '[18] Revoke autonomous plane'
|
|
1051
|
+
Write-Host '[19] Autonomous plane status'
|
|
1052
|
+
Write-Host '[20] Autonomous production LIVE gate'
|
|
1053
|
+
Write-Host '[21] Machine identity LIVE gate (non-mutating)'
|
|
1054
|
+
Write-Host '[22] Enable process plane (standing grant)'
|
|
1055
|
+
Write-Host '[23] Revoke process plane'
|
|
1056
|
+
Write-Host '[24] Process plane status'
|
|
1057
|
+
Write-Host '[0] Exit controller (runtime stays as-is)'
|
|
1058
|
+
$choice = Read-Host 'Select'
|
|
1059
|
+
try {
|
|
1060
|
+
switch ($choice) {
|
|
1061
|
+
'1' { Run-Command 'start' }
|
|
1062
|
+
'2' { Run-Command 'park' }
|
|
1063
|
+
'3' { Run-Command 'stop' }
|
|
1064
|
+
'4' { Run-Command 'restart' }
|
|
1065
|
+
'5' { Run-Command 'test' }
|
|
1066
|
+
'6' { Run-Command 'fulltest' }
|
|
1067
|
+
'7' { Run-Command 'url' }
|
|
1068
|
+
'8' { Run-Command 'clean' }
|
|
1069
|
+
'9' { Run-Command 'armhost' }
|
|
1070
|
+
'10' { Run-Command 'disarmhost' }
|
|
1071
|
+
'11' { Run-Command 'hoststatus' }
|
|
1072
|
+
'12' { Run-Command 'hosttest' }
|
|
1073
|
+
'13' { Run-Command 'armcoding' }
|
|
1074
|
+
'14' { Run-Command 'disarmcoding' }
|
|
1075
|
+
'15' { Run-Command 'codingstatus' }
|
|
1076
|
+
'16' { Run-Command 'codingtest' }
|
|
1077
|
+
'17' { Run-Command 'armautonomous' }
|
|
1078
|
+
'18' { Run-Command 'disarmautonomous' }
|
|
1079
|
+
'19' { Run-Command 'autonomousstatus' }
|
|
1080
|
+
'20' { Run-Command 'autonomoustest' }
|
|
1081
|
+
'21' { Run-Command 'machinetest' }
|
|
1082
|
+
'22' { Run-Command 'armprocess' }
|
|
1083
|
+
'23' { Run-Command 'disarmprocess' }
|
|
1084
|
+
'24' { Run-Command 'processstatus' }
|
|
1085
|
+
'0' { exit 0 }
|
|
1086
|
+
default { Write-Warning 'invalid selection' }
|
|
1087
|
+
}
|
|
1088
|
+
} catch { Write-Host $_.Exception.Message -ForegroundColor Red }
|
|
1089
|
+
if ($choice -ne '0') { [void](Read-Host 'Press Enter') }
|
|
1090
|
+
}
|