deadbyte-mcp 0.8.10 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTEXT.md +41 -0
- package/MANIFEST.SHA256 +386 -94
- package/R34-BASELINE.json +9 -0
- package/README.txt +141 -10
- package/bench/fixtures/corpus.json +36 -0
- package/bench/fixtures/r36/case-map.json +8 -0
- package/bin/WORKER-REGISTRY.txt +3 -3
- 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/controller/README.TXT +12 -4
- package/controller/deadbyte-controller.config.psd1.example +14 -0
- package/controller/deadbyte-controller.ps1 +191 -20
- package/controller/deadbyte-process-policy.json +5 -5
- package/controller/deadbyte-semantic-lsp-config.json +95 -0
- package/docs/ADR-0001-PRODUCTION-BASELINE-SEAMS.md +29 -0
- package/docs/ARCHITECTURE.md +6 -5
- package/docs/R36-CAPABILITY-EVIDENCE.md +43 -0
- package/docs/superpowers/plans/2026-09-16-deadbyte-loop-engine.md +846 -0
- package/docs/superpowers/plans/2026-09-17-r35-production-successor.md +408 -0
- package/docs/superpowers/plans/2026-09-18-r36-zero-loss-autonomy.md +739 -0
- package/docs/superpowers/specs/2026-09-16-deadbyte-loop-engine-design.md +435 -0
- package/docs/superpowers/specs/2026-09-17-r35-production-successor-design.md +220 -0
- package/docs/superpowers/specs/2026-09-18-r36-zero-loss-autonomy-design.md +640 -0
- package/node_modules/typescript/LICENSE.txt +55 -0
- package/node_modules/typescript/README.md +50 -0
- package/node_modules/typescript/SECURITY.md +41 -0
- package/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
- package/node_modules/typescript/bin/tsc +2 -0
- package/node_modules/typescript/bin/tsserver +2 -0
- package/node_modules/typescript/lib/_tsc.js +133818 -0
- package/node_modules/typescript/lib/_tsserver.js +659 -0
- package/node_modules/typescript/lib/_typingsInstaller.js +222 -0
- package/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/lib.d.ts +22 -0
- package/node_modules/typescript/lib/lib.decorators.d.ts +384 -0
- package/node_modules/typescript/lib/lib.decorators.legacy.d.ts +22 -0
- package/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +41 -0
- package/node_modules/typescript/lib/lib.dom.d.ts +39429 -0
- package/node_modules/typescript/lib/lib.dom.iterable.d.ts +571 -0
- package/node_modules/typescript/lib/lib.es2015.collection.d.ts +147 -0
- package/node_modules/typescript/lib/lib.es2015.core.d.ts +597 -0
- package/node_modules/typescript/lib/lib.es2015.d.ts +28 -0
- package/node_modules/typescript/lib/lib.es2015.generator.d.ts +77 -0
- package/node_modules/typescript/lib/lib.es2015.iterable.d.ts +605 -0
- package/node_modules/typescript/lib/lib.es2015.promise.d.ts +81 -0
- package/node_modules/typescript/lib/lib.es2015.proxy.d.ts +128 -0
- package/node_modules/typescript/lib/lib.es2015.reflect.d.ts +144 -0
- package/node_modules/typescript/lib/lib.es2015.symbol.d.ts +46 -0
- package/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
- package/node_modules/typescript/lib/lib.es2016.array.include.d.ts +116 -0
- package/node_modules/typescript/lib/lib.es2016.d.ts +21 -0
- package/node_modules/typescript/lib/lib.es2016.full.d.ts +23 -0
- package/node_modules/typescript/lib/lib.es2016.intl.d.ts +31 -0
- package/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +21 -0
- package/node_modules/typescript/lib/lib.es2017.d.ts +26 -0
- package/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
- package/node_modules/typescript/lib/lib.es2017.full.d.ts +23 -0
- package/node_modules/typescript/lib/lib.es2017.intl.d.ts +44 -0
- package/node_modules/typescript/lib/lib.es2017.object.d.ts +49 -0
- package/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
- package/node_modules/typescript/lib/lib.es2017.string.d.ts +45 -0
- package/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
- package/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
- package/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +53 -0
- package/node_modules/typescript/lib/lib.es2018.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2018.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2018.intl.d.ts +83 -0
- package/node_modules/typescript/lib/lib.es2018.promise.d.ts +30 -0
- package/node_modules/typescript/lib/lib.es2018.regexp.d.ts +37 -0
- package/node_modules/typescript/lib/lib.es2019.array.d.ts +79 -0
- package/node_modules/typescript/lib/lib.es2019.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2019.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2019.intl.d.ts +23 -0
- package/node_modules/typescript/lib/lib.es2019.object.d.ts +33 -0
- package/node_modules/typescript/lib/lib.es2019.string.d.ts +37 -0
- package/node_modules/typescript/lib/lib.es2019.symbol.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2020.bigint.d.ts +765 -0
- package/node_modules/typescript/lib/lib.es2020.d.ts +27 -0
- package/node_modules/typescript/lib/lib.es2020.date.d.ts +42 -0
- package/node_modules/typescript/lib/lib.es2020.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2020.intl.d.ts +474 -0
- package/node_modules/typescript/lib/lib.es2020.number.d.ts +28 -0
- package/node_modules/typescript/lib/lib.es2020.promise.d.ts +47 -0
- package/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +99 -0
- package/node_modules/typescript/lib/lib.es2020.string.d.ts +44 -0
- package/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
- package/node_modules/typescript/lib/lib.es2021.d.ts +23 -0
- package/node_modules/typescript/lib/lib.es2021.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2021.intl.d.ts +166 -0
- package/node_modules/typescript/lib/lib.es2021.promise.d.ts +48 -0
- package/node_modules/typescript/lib/lib.es2021.string.d.ts +33 -0
- package/node_modules/typescript/lib/lib.es2021.weakref.d.ts +78 -0
- package/node_modules/typescript/lib/lib.es2022.array.d.ts +121 -0
- package/node_modules/typescript/lib/lib.es2022.d.ts +25 -0
- package/node_modules/typescript/lib/lib.es2022.error.d.ts +75 -0
- package/node_modules/typescript/lib/lib.es2022.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2022.intl.d.ts +145 -0
- package/node_modules/typescript/lib/lib.es2022.object.d.ts +26 -0
- package/node_modules/typescript/lib/lib.es2022.regexp.d.ts +39 -0
- package/node_modules/typescript/lib/lib.es2022.string.d.ts +25 -0
- package/node_modules/typescript/lib/lib.es2023.array.d.ts +924 -0
- package/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
- package/node_modules/typescript/lib/lib.es2023.d.ts +22 -0
- package/node_modules/typescript/lib/lib.es2023.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2023.intl.d.ts +56 -0
- package/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +65 -0
- package/node_modules/typescript/lib/lib.es2024.collection.d.ts +29 -0
- package/node_modules/typescript/lib/lib.es2024.d.ts +26 -0
- package/node_modules/typescript/lib/lib.es2024.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2024.object.d.ts +29 -0
- package/node_modules/typescript/lib/lib.es2024.promise.d.ts +35 -0
- package/node_modules/typescript/lib/lib.es2024.regexp.d.ts +25 -0
- package/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +68 -0
- package/node_modules/typescript/lib/lib.es2024.string.d.ts +29 -0
- package/node_modules/typescript/lib/lib.es5.d.ts +4601 -0
- package/node_modules/typescript/lib/lib.es6.d.ts +23 -0
- package/node_modules/typescript/lib/lib.esnext.array.d.ts +35 -0
- package/node_modules/typescript/lib/lib.esnext.collection.d.ts +96 -0
- package/node_modules/typescript/lib/lib.esnext.d.ts +29 -0
- package/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
- package/node_modules/typescript/lib/lib.esnext.disposable.d.ts +193 -0
- package/node_modules/typescript/lib/lib.esnext.error.d.ts +24 -0
- package/node_modules/typescript/lib/lib.esnext.float16.d.ts +445 -0
- package/node_modules/typescript/lib/lib.esnext.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.esnext.intl.d.ts +21 -0
- package/node_modules/typescript/lib/lib.esnext.iterator.d.ts +148 -0
- package/node_modules/typescript/lib/lib.esnext.promise.d.ts +34 -0
- package/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +25 -0
- package/node_modules/typescript/lib/lib.scripthost.d.ts +322 -0
- package/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +41 -0
- package/node_modules/typescript/lib/lib.webworker.d.ts +13150 -0
- package/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
- package/node_modules/typescript/lib/lib.webworker.iterable.d.ts +340 -0
- package/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/tsc.js +8 -0
- package/node_modules/typescript/lib/tsserver.js +8 -0
- package/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
- package/node_modules/typescript/lib/tsserverlibrary.js +21 -0
- package/node_modules/typescript/lib/typesMap.json +497 -0
- package/node_modules/typescript/lib/typescript.d.ts +11437 -0
- package/node_modules/typescript/lib/typescript.js +200276 -0
- package/node_modules/typescript/lib/typingsInstaller.js +8 -0
- package/node_modules/typescript/lib/watchGuard.js +53 -0
- package/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2122 -0
- package/node_modules/typescript/package.json +120 -0
- package/package.json +5 -3
- package/proof/CONTAINMENT-BUILD.txt +6 -6
- package/proof/R34-TASK8-SUPERVISOR-CHECKPOINT.json +29 -0
- package/proof/R34-TASK9-MCP-SURFACE-CHECKPOINT.json +28 -0
- package/scripts/capability-benchmark.mjs +27 -0
- package/scripts/deferred-slot-operation.mjs +56 -16
- package/scripts/final-closure-verify.mjs +88 -39
- package/scripts/final-closure.mjs +63 -56
- package/scripts/gate-windows.ps1 +3 -3
- package/scripts/release-parity-tests.ps1 +9 -0
- package/scripts/release-parity.mjs +149 -139
- package/scripts/semantic-preflight.ps1 +73 -0
- package/scripts/tool-surface-snapshot.mjs +73 -0
- package/scripts/windows-gate-evidence.mjs +5 -5
- package/src/audit-verify.mjs +6 -2
- package/src/autonomous-action-reconcile.mjs +142 -0
- package/src/autonomous-context-engine.mjs +256 -0
- package/src/autonomous-live-state.mjs +17 -0
- package/src/autonomous-local-supervisor.mjs +249 -0
- package/src/autonomous-loop-state.mjs +304 -0
- package/src/autonomous-mcp-tools.mjs +5 -1
- package/src/autonomous-output-contracts.mjs +26 -7
- package/src/autonomous-plan.mjs +181 -0
- package/src/autonomous-planner-contracts.mjs +79 -0
- package/src/autonomous-planner.mjs +113 -6
- package/src/autonomous-policy.mjs +15 -2
- package/src/autonomous-progress.mjs +127 -0
- package/src/autonomous-runtime.mjs +785 -62
- package/src/autonomous-supervisor-host.mjs +70 -0
- package/src/autonomous-supervisor.mjs +31 -8
- package/src/capability-benchmark-runner.mjs +193 -0
- package/src/capability-benchmark.mjs +95 -0
- package/src/capability-ledger.mjs +158 -0
- package/src/coding-mcp-tools.mjs +65 -8
- package/src/coding-output-contracts.mjs +91 -8
- package/src/coding-plane.mjs +45 -9
- package/src/coding-search.mjs +130 -47
- package/src/compact-gateway-mcp-tools.mjs +128 -0
- package/src/compact-gateway-output-contracts.mjs +16 -0
- package/src/context-provenance.mjs +86 -0
- package/src/deadbyte-cli.mjs +145 -30
- package/src/document-adapter.mjs +43 -0
- package/src/lsp-stdio-client.mjs +112 -0
- package/src/machine-fs-smoke-client.mjs +2 -1
- package/src/machine-fs.mjs +51 -8
- package/src/mcp-server.mjs +46 -9
- package/src/native-diff-v2.mjs +337 -0
- package/src/native-diff.mjs +50 -2
- package/src/observation-smoke-client.mjs +3 -2
- package/src/operator-surface.mjs +43 -0
- package/src/process-runtime.mjs +98 -11
- package/src/process-smoke-client.mjs +11 -3
- package/src/provider-circuit.mjs +125 -0
- package/src/r36-compact-disarmed-probe.mjs +50 -0
- package/src/r36-full-surface-probe.mjs +56 -0
- package/src/release-generation.mjs +44 -5
- package/src/remote-live-log.mjs +76 -0
- package/src/remote-mcp-autonomous-smoke-client.mjs +58 -15
- package/src/remote-mcp-coding-smoke-client.mjs +5 -4
- package/src/remote-mcp-r24-disarmed-smoke-client.mjs +4 -2
- package/src/remote-mcp-r34-parity-client.mjs +177 -0
- package/src/remote-mcp-r36-parity-client.mjs +175 -0
- package/src/remote-mcp-smoke-client.mjs +113 -56
- package/src/remote-result-journal.mjs +114 -0
- package/src/runtime-update.mjs +109 -9
- package/src/search-cursor.mjs +45 -0
- package/src/semantic-backend-registry.mjs +39 -0
- package/src/semantic-code.mjs +246 -0
- package/src/semantic-lsp-backend.mjs +219 -0
- package/src/semantic-lsp-config.mjs +112 -0
- package/src/tool-surface-ledger.mjs +92 -0
- package/src/version.mjs +1 -1
- package/test/audit-verify.test.mjs +1 -1
- package/test/autonomous-action-reconcile.test.mjs +106 -0
- package/test/autonomous-adversarial.test.mjs +149 -6
- package/test/autonomous-capability-r36.test.mjs +151 -0
- package/test/autonomous-context-engine.test.mjs +181 -0
- package/test/autonomous-live-state.test.mjs +27 -0
- package/test/autonomous-local-supervisor.test.mjs +403 -0
- package/test/autonomous-loop-state.test.mjs +126 -0
- package/test/autonomous-loop-v2.test.mjs +105 -0
- package/test/autonomous-loop.test.mjs +79 -1
- package/test/autonomous-output-contract.test.mjs +54 -0
- package/test/autonomous-plan.test.mjs +101 -0
- package/test/autonomous-progress.test.mjs +106 -0
- package/test/autonomous-r34-e2e.test.mjs +338 -0
- package/test/autonomous-runtime.test.mjs +3 -3
- package/test/autonomous-supervisor-integration.test.mjs +48 -3
- package/test/capability-benchmark-r36.test.mjs +107 -0
- package/test/capability-benchmark-runner.test.mjs +49 -0
- package/test/capability-benchmark-semantic-r36.test.mjs +52 -0
- package/test/capability-benchmark.test.mjs +47 -0
- package/test/capability-claims-r36.test.mjs +23 -0
- package/test/capability-ledger-r36.test.mjs +102 -0
- package/test/cli-entrypoint.test.mjs +12 -0
- package/test/coding-catalog-consistency.test.mjs +24 -0
- package/test/coding-plane.test.mjs +3 -3
- package/test/coding-runtime.test.mjs +16 -0
- package/test/coding-search-r36.test.mjs +90 -0
- package/test/compact-catalog-r36.test.mjs +37 -0
- package/test/compact-gateway-r36.test.mjs +66 -0
- package/test/contained.test.mjs +1 -1
- package/test/context-provenance.test.mjs +61 -0
- package/test/controller-r27.test.mjs +4 -3
- package/test/controller.test.mjs +52 -0
- package/test/core.test.mjs +1 -1
- package/test/deferred-slot-operation-behavior.test.mjs +5 -1
- package/test/deferred-slot-operation.test.mjs +11 -1
- package/test/document-adapter.test.mjs +23 -0
- package/test/fixtures/lsp-framed-server.mjs +35 -0
- package/test/fixtures/semantic/cpp/compile_commands.json +4 -0
- package/test/fixtures/semantic/cpp/lib.cpp +2 -0
- package/test/fixtures/semantic/cpp/lib.hpp +2 -0
- package/test/fixtures/semantic/cpp/main.cpp +2 -0
- package/test/fixtures/semantic/python/lib.py +2 -0
- package/test/fixtures/semantic/python/main.py +2 -0
- package/test/fixtures/semantic/rust/Cargo.lock +7 -0
- package/test/fixtures/semantic/rust/Cargo.toml +8 -0
- package/test/fixtures/semantic/rust/src/lib.rs +3 -0
- package/test/fixtures/semantic/rust/src/main.rs +5 -0
- package/test/fixtures/semantic/rust/src/math.rs +3 -0
- package/test/fixtures/semantic/rust/target/.rustc_info.json +1 -0
- package/test/fixtures/semantic/rust/target/CACHEDIR.TAG +3 -0
- package/test/fixtures/semantic/rust/target/debug/.cargo-lock +0 -0
- package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-4c168fa33c79d09c/dep-test-lib-semantic_rust +0 -0
- package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-4c168fa33c79d09c/invoked.timestamp +1 -0
- package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-4c168fa33c79d09c/test-lib-semantic_rust +1 -0
- package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-4c168fa33c79d09c/test-lib-semantic_rust.json +1 -0
- package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-5dcd474439c54a26/dep-test-bin-semantic_rust_bin +0 -0
- package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-5dcd474439c54a26/invoked.timestamp +1 -0
- package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-5dcd474439c54a26/test-bin-semantic_rust_bin +1 -0
- package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-5dcd474439c54a26/test-bin-semantic_rust_bin.json +1 -0
- package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-6212ccd976aa3808/dep-lib-semantic_rust +0 -0
- package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-6212ccd976aa3808/invoked.timestamp +1 -0
- package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-6212ccd976aa3808/lib-semantic_rust +1 -0
- package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-6212ccd976aa3808/lib-semantic_rust.json +1 -0
- package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-d741378dccdef61c/bin-semantic_rust_bin +1 -0
- package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-d741378dccdef61c/bin-semantic_rust_bin.json +1 -0
- package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-d741378dccdef61c/dep-bin-semantic_rust_bin +0 -0
- package/test/fixtures/semantic/rust/target/debug/.fingerprint/semantic_rust-d741378dccdef61c/invoked.timestamp +1 -0
- package/test/fixtures/semantic/rust/target/debug/deps/libsemantic_rust-4c168fa33c79d09c.rmeta +0 -0
- package/test/fixtures/semantic/rust/target/debug/deps/libsemantic_rust-6212ccd976aa3808.rmeta +0 -0
- package/test/fixtures/semantic/rust/target/debug/deps/libsemantic_rust_bin-5dcd474439c54a26.rmeta +0 -0
- package/test/fixtures/semantic/rust/target/debug/deps/libsemantic_rust_bin-d741378dccdef61c.rmeta +0 -0
- package/test/fixtures/semantic/rust/target/debug/deps/semantic_rust-4c168fa33c79d09c.d +5 -0
- package/test/fixtures/semantic/rust/target/debug/deps/semantic_rust-6212ccd976aa3808.d +5 -0
- package/test/fixtures/semantic/rust/target/debug/deps/semantic_rust_bin-5dcd474439c54a26.d +6 -0
- package/test/fixtures/semantic/rust/target/debug/deps/semantic_rust_bin-d741378dccdef61c.d +6 -0
- package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-1nzlugxi6lq16/s-hmdgo8b6hg-1n6glhc-1qb77z00k06rqw4jdkj92spax/dep-graph.bin +0 -0
- package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-1nzlugxi6lq16/s-hmdgo8b6hg-1n6glhc-1qb77z00k06rqw4jdkj92spax/query-cache.bin +0 -0
- package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-1nzlugxi6lq16/s-hmdgo8b6hg-1n6glhc-1qb77z00k06rqw4jdkj92spax/work-products.bin +0 -0
- package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-1nzlugxi6lq16/s-hmdgo8b6hg-1n6glhc.lock +0 -0
- package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-3s436v7g6f5xm/s-hmdgo8b58k-1ekj4lq-9twkpivsqnjon278x20bddozq/dep-graph.bin +0 -0
- package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-3s436v7g6f5xm/s-hmdgo8b58k-1ekj4lq-9twkpivsqnjon278x20bddozq/metadata.rmeta +0 -0
- package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-3s436v7g6f5xm/s-hmdgo8b58k-1ekj4lq-9twkpivsqnjon278x20bddozq/query-cache.bin +0 -0
- package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-3s436v7g6f5xm/s-hmdgo8b58k-1ekj4lq-9twkpivsqnjon278x20bddozq/work-products.bin +0 -0
- package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust-3s436v7g6f5xm/s-hmdgo8b58k-1ekj4lq.lock +0 -0
- package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-1jxcbdeehal7q/s-hmdgo8bxlf-1qr24o3-cmu3jai030no72y8u9eurrnjj/dep-graph.bin +0 -0
- package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-1jxcbdeehal7q/s-hmdgo8bxlf-1qr24o3-cmu3jai030no72y8u9eurrnjj/query-cache.bin +0 -0
- package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-1jxcbdeehal7q/s-hmdgo8bxlf-1qr24o3-cmu3jai030no72y8u9eurrnjj/work-products.bin +0 -0
- package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-1jxcbdeehal7q/s-hmdgo8bxlf-1qr24o3.lock +0 -0
- package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-2ocx55p60ni6b/s-hmdgo8bxj8-0ir41qt-diy9mqvc2eoiblmhjs3stcgi3/dep-graph.bin +0 -0
- package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-2ocx55p60ni6b/s-hmdgo8bxj8-0ir41qt-diy9mqvc2eoiblmhjs3stcgi3/query-cache.bin +0 -0
- package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-2ocx55p60ni6b/s-hmdgo8bxj8-0ir41qt-diy9mqvc2eoiblmhjs3stcgi3/work-products.bin +0 -0
- package/test/fixtures/semantic/rust/target/debug/incremental/semantic_rust_bin-2ocx55p60ni6b/s-hmdgo8bxj8-0ir41qt.lock +0 -0
- package/test/fixtures/semantic/rust/target/flycheck0/stderr +1 -0
- package/test/fixtures/semantic/rust/target/flycheck0/stdout +5 -0
- package/test/fixtures/semantic/typescript/lib.ts +3 -0
- package/test/fixtures/semantic/typescript/main.ts +2 -0
- package/test/fixtures/tool-surface-stdio-server.mjs +14 -0
- package/test/helpers/autonomous-r34-fixture.mjs +122 -0
- package/test/lsp-stdio-client.test.mjs +72 -0
- package/test/multi-file-read.test.mjs +44 -0
- package/test/native-diff-topology-r36.test.mjs +105 -0
- package/test/observation-integration.test.mjs +3 -3
- package/test/package-boundary.test.mjs +6 -0
- package/test/process-longrun-r36.test.mjs +82 -0
- package/test/process-release-gate.test.mjs +9 -0
- package/test/production-docs.test.mjs +48 -0
- package/test/prompts-resources.test.mjs +41 -0
- package/test/provider-circuit.test.mjs +93 -0
- package/test/public-autonomous-ingress-budget.test.mjs +28 -0
- package/test/r33-closeout-regression.test.mjs +4 -3
- package/test/r33-finalization.test.mjs +26 -18
- package/test/r36-finalization.test.mjs +104 -0
- package/test/r36-release-identity.test.mjs +52 -0
- package/test/release-generation.test.mjs +23 -2
- package/test/release-version.test.mjs +27 -17
- package/test/remote-live-log-r36.test.mjs +37 -0
- package/test/remote-live-log-recovery-r36.test.mjs +41 -0
- package/test/remote-r24-catalog.test.mjs +18 -4
- package/test/remote-result-journal.test.mjs +58 -0
- package/test/remote-session-cli.test.mjs +135 -30
- package/test/runtime-self-update.test.mjs +121 -1
- package/test/semantic-backend-registry.test.mjs +29 -0
- package/test/semantic-code.test.mjs +66 -0
- package/test/semantic-lsp-backend.test.mjs +108 -0
- package/test/semantic-lsp-config.test.mjs +81 -0
- package/test/semantic-lsp-readiness.test.mjs +34 -0
- package/test/semantic-lsp-transient-empty.test.mjs +32 -0
- package/test/semantic-lsp-transient-null.test.mjs +31 -0
- package/test/semantic-multilang.test.mjs +72 -0
- package/test/semantic-r36-rename.test.mjs +82 -0
- package/test/semantic-runtime-routing.test.mjs +32 -0
- package/test/semantic-server-config-integration.test.mjs +66 -0
- package/test/tool-surface-ledger.test.mjs +59 -0
- package/test/tool-surface-snapshot.test.mjs +17 -0
- package/test/tracer-bullet.test.mjs +77 -0
- package/deadbyte-mcp-0.8.9.tgz +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import {
|
|
4
|
+
CAPABILITY_BENCHMARK_SCHEMA,
|
|
5
|
+
normalizeBenchmarkCase,
|
|
6
|
+
buildCapabilityBenchmark
|
|
7
|
+
} from '../src/capability-benchmark.mjs';
|
|
8
|
+
|
|
9
|
+
const H=c=>c.repeat(64);
|
|
10
|
+
const base={case_id:'filesystem_bounded_read',fixture_sha256:H('a'),correct:true,round_trips:2,bytes_returned:128,
|
|
11
|
+
elapsed_ms:12.5,stale_rejected:false,recovery_success:true,duplicate_side_effects:0,evidence_sha256:H('b')};
|
|
12
|
+
|
|
13
|
+
test('R35 benchmark schema is exact and preserves separate measurable dimensions',()=>{
|
|
14
|
+
assert.equal(CAPABILITY_BENCHMARK_SCHEMA,'deadbyte.r35-capability-benchmark.v1');
|
|
15
|
+
const value=normalizeBenchmarkCase(base);
|
|
16
|
+
assert.deepEqual(Object.keys(value).sort(),[
|
|
17
|
+
'bytes_returned','case_id','correct','duplicate_side_effects','elapsed_ms','evidence_sha256','fixture_sha256',
|
|
18
|
+
'recovery_success','round_trips','stale_rejected'
|
|
19
|
+
].sort());
|
|
20
|
+
assert.equal(value.correct,true);assert.equal(value.round_trips,2);assert.equal(value.duplicate_side_effects,0);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
test('benchmark rejects missing evidence and invalid measurements instead of manufacturing a score',()=>{
|
|
24
|
+
assert.throws(()=>normalizeBenchmarkCase({...base,evidence_sha256:undefined}),/evidence/i);
|
|
25
|
+
assert.throws(()=>normalizeBenchmarkCase({...base,elapsed_ms:-1}),/elapsed/i);
|
|
26
|
+
assert.throws(()=>normalizeBenchmarkCase({...base,round_trips:0}),/round.?trips/i);
|
|
27
|
+
assert.throws(()=>normalizeBenchmarkCase({...base,duplicate_side_effects:-1}),/duplicate/i);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
test('aggregate identity is deterministic across timing changes while fixture/correctness verdicts remain inspectable',()=>{
|
|
31
|
+
const cases=[base,{...base,case_id:'remote_replay_dedupe',fixture_sha256:H('c'),evidence_sha256:H('d'),elapsed_ms:22}];
|
|
32
|
+
const first=buildCapabilityBenchmark({suite_id:'r35-offline-v1',cases});
|
|
33
|
+
const second=buildCapabilityBenchmark({suite_id:'r35-offline-v1',cases:cases.map(item=>({...item,elapsed_ms:item.elapsed_ms+100}))});
|
|
34
|
+
assert.equal(first.schema,CAPABILITY_BENCHMARK_SCHEMA);
|
|
35
|
+
assert.equal(first.fixture_identity_sha256,second.fixture_identity_sha256);
|
|
36
|
+
assert.deepEqual(first.cases.map(item=>[item.case_id,item.correct,item.fixture_sha256]),
|
|
37
|
+
second.cases.map(item=>[item.case_id,item.correct,item.fixture_sha256]));
|
|
38
|
+
assert.notEqual(first.observation_sha256,second.observation_sha256,'observed timings remain evidence, not hidden');
|
|
39
|
+
assert.equal(first.overall_correct,true);
|
|
40
|
+
assert.equal('score' in first,false);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
test('aggregate fails closed on duplicate case ids or any incorrect case',()=>{
|
|
44
|
+
assert.throws(()=>buildCapabilityBenchmark({suite_id:'r35-offline-v1',cases:[base,base]}),/duplicate case/i);
|
|
45
|
+
const result=buildCapabilityBenchmark({suite_id:'r35-offline-v1',cases:[base,{...base,case_id:'broken',correct:false,evidence_sha256:H('e')} ]});
|
|
46
|
+
assert.equal(result.overall_correct,false);
|
|
47
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { readFile } from 'node:fs/promises';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
const root=path.resolve(fileURLToPath(new URL('../',import.meta.url)));
|
|
7
|
+
|
|
8
|
+
test('R36 capability evidence distinguishes documented competitor claims from direct observation and avoids blanket superiority',async()=>{
|
|
9
|
+
const file=await readFile(path.join(root,'docs','R36-CAPABILITY-EVIDENCE.md'),'utf8');
|
|
10
|
+
assert.match(file,/https:\/\/github\.com\/wonderwhy-er\/DesktopCommanderMCP/i);
|
|
11
|
+
assert.match(file,/https:\/\/github\.com\/desktop-commander\/remote-desktop-commander/i);
|
|
12
|
+
assert.match(file,/https:\/\/github\.com\/oraios\/serena/i);
|
|
13
|
+
assert.match(file,/documented/i);
|
|
14
|
+
assert.match(file,/direct_observation/i);
|
|
15
|
+
assert.match(file,/3a1d668fcc0c3c38362d0c642c5247357ed7ec6063d89b544c7a1c090521c66e/);
|
|
16
|
+
assert.doesNotMatch(file,/\b(?:best|superior|beats? all|winner|dominates?)\b/i);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
test('R36 README points to reproducible capability evidence instead of a tool-count victory claim',async()=>{
|
|
20
|
+
const file=await readFile(path.join(root,'README.txt'),'utf8');
|
|
21
|
+
assert.match(file,/R36-CAPABILITY-EVIDENCE\.md/);
|
|
22
|
+
assert.doesNotMatch(file,/\b(?:most tools|tool-count victory|beats? all|best MCP)\b/i);
|
|
23
|
+
});
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import {
|
|
4
|
+
CAPABILITY_LEDGER_SCHEMA,
|
|
5
|
+
capabilityProfileFromEnv,
|
|
6
|
+
createCapabilityLedger,
|
|
7
|
+
assertCapabilityClosure
|
|
8
|
+
} from '../src/capability-ledger.mjs';
|
|
9
|
+
|
|
10
|
+
const entry = overrides => ({
|
|
11
|
+
id:'coding.search',
|
|
12
|
+
full_tool:'coding_search',
|
|
13
|
+
compact_tool:'coding_inspect',
|
|
14
|
+
compact_op:'search',
|
|
15
|
+
runtime_flag:'DEADBYTE_CODING_RUNTIME',
|
|
16
|
+
authority:'coding',
|
|
17
|
+
mutating:false,
|
|
18
|
+
receipt_class:'observation',
|
|
19
|
+
production:true,
|
|
20
|
+
host_only:false,
|
|
21
|
+
...overrides
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const snapshot = names => ({
|
|
25
|
+
schema:'deadbyte.tool-surface.v1',
|
|
26
|
+
tools:names.map(name=>({name,input_sha256:'0'.repeat(64),output_sha256:'1'.repeat(64)})),
|
|
27
|
+
surface_sha256:'2'.repeat(64)
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
test('R36 capability ledger rejects duplicate ids', () => {
|
|
31
|
+
assert.throws(() => createCapabilityLedger([
|
|
32
|
+
entry({}),
|
|
33
|
+
entry({full_tool:'other_tool'})
|
|
34
|
+
]), /duplicate capability id/i);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
test('R36 capability ledger validates authority and canonicalizes identity', () => {
|
|
38
|
+
assert.throws(() => createCapabilityLedger([entry({authority:'root'})]), /authority/i);
|
|
39
|
+
const a=createCapabilityLedger([
|
|
40
|
+
entry({id:'process.read',full_tool:'process_session_read',compact_tool:'process_session',compact_op:'read',runtime_flag:'DEADBYTE_PROCESS_RUNTIME',authority:'process'}),
|
|
41
|
+
entry({})
|
|
42
|
+
]);
|
|
43
|
+
const b=createCapabilityLedger([
|
|
44
|
+
entry({}),
|
|
45
|
+
entry({id:'process.read',full_tool:'process_session_read',compact_tool:'process_session',compact_op:'read',runtime_flag:'DEADBYTE_PROCESS_RUNTIME',authority:'process'})
|
|
46
|
+
]);
|
|
47
|
+
assert.equal(a.schema,CAPABILITY_LEDGER_SCHEMA);
|
|
48
|
+
assert.equal(a.ledger_sha256,b.ledger_sha256);
|
|
49
|
+
assert.deepEqual(a.entries.map(x=>x.id),['coding.search','process.read']);
|
|
50
|
+
assert.ok(Object.isFrozen(a));
|
|
51
|
+
assert.ok(Object.isFrozen(a.entries));
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
test('R36 surface profile defaults full and accepts only full or compact', () => {
|
|
55
|
+
assert.equal(capabilityProfileFromEnv({}),'full');
|
|
56
|
+
assert.equal(capabilityProfileFromEnv({DEADBYTE_CAPABILITY_PROFILE:'full'}),'full');
|
|
57
|
+
assert.equal(capabilityProfileFromEnv({DEADBYTE_CAPABILITY_PROFILE:'compact'}),'compact');
|
|
58
|
+
assert.throws(() => capabilityProfileFromEnv({DEADBYTE_CAPABILITY_PROFILE:'wide'}), /full or compact/i);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
test('R36 compact closure covers every production non-host capability', () => {
|
|
62
|
+
const ledger=createCapabilityLedger([
|
|
63
|
+
entry({}),
|
|
64
|
+
entry({id:'host.exec',full_tool:'host_exec',compact_tool:null,compact_op:null,runtime_flag:'DEADBYTE_PRIVILEGED_POLICY',authority:'host',mutating:true,receipt_class:'host',production:false,host_only:true})
|
|
65
|
+
]);
|
|
66
|
+
assert.equal(assertCapabilityClosure({
|
|
67
|
+
ledger,
|
|
68
|
+
fullToolSnapshot:snapshot(['coding_search','host_exec']),
|
|
69
|
+
compactToolSnapshot:snapshot(['coding_inspect'])
|
|
70
|
+
}),true);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
test('R36 closure fails when a production route is lost or advertised tool is absent', () => {
|
|
74
|
+
const missingCompact=createCapabilityLedger([entry({compact_tool:null,compact_op:null})]);
|
|
75
|
+
assert.throws(() => assertCapabilityClosure({
|
|
76
|
+
ledger:missingCompact,
|
|
77
|
+
fullToolSnapshot:snapshot(['coding_search']),
|
|
78
|
+
compactToolSnapshot:snapshot([])
|
|
79
|
+
}), /compact route/i);
|
|
80
|
+
|
|
81
|
+
const ledger=createCapabilityLedger([entry({})]);
|
|
82
|
+
assert.throws(() => assertCapabilityClosure({
|
|
83
|
+
ledger,
|
|
84
|
+
fullToolSnapshot:snapshot([]),
|
|
85
|
+
compactToolSnapshot:snapshot(['coding_inspect'])
|
|
86
|
+
}), /full tool/i);
|
|
87
|
+
assert.throws(() => assertCapabilityClosure({
|
|
88
|
+
ledger,
|
|
89
|
+
fullToolSnapshot:snapshot(['coding_search']),
|
|
90
|
+
compactToolSnapshot:snapshot([])
|
|
91
|
+
}), /compact tool/i);
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
test('R36 compact surface hard-fails above the observed 42-tool ceiling', () => {
|
|
95
|
+
const ledger=createCapabilityLedger([entry({})]);
|
|
96
|
+
const tooMany=Array.from({length:43},(_,i)=>i===0?'coding_inspect':`extra_${i}`);
|
|
97
|
+
assert.throws(() => assertCapabilityClosure({
|
|
98
|
+
ledger,
|
|
99
|
+
fullToolSnapshot:snapshot(['coding_search']),
|
|
100
|
+
compactToolSnapshot:snapshot(tooMany)
|
|
101
|
+
}), /42/i);
|
|
102
|
+
});
|
|
@@ -27,6 +27,18 @@ test('npx CLI remote path invokes stable PS1 directly and never routes through C
|
|
|
27
27
|
assert.match(source,/verifyAuditChain/);
|
|
28
28
|
});
|
|
29
29
|
|
|
30
|
+
test('npx CLI exposes local supervisor lifecycle without any supervisor arm command',async()=>{
|
|
31
|
+
const source=await readFile(cliPath,'utf8');
|
|
32
|
+
assert.match(source,/SUPERVISOR_COMMANDS/);
|
|
33
|
+
assert.match(source,/supervisorstart/);
|
|
34
|
+
assert.match(source,/supervisorstop/);
|
|
35
|
+
assert.match(source,/supervisorstatus/);
|
|
36
|
+
assert.match(source,/supervisorrecover/);
|
|
37
|
+
const mapping=source.match(/const SUPERVISOR_COMMANDS=.*?;\n/s)?.[0]??'';
|
|
38
|
+
assert.doesNotMatch(mapping,/arm(?:coding|autonomous|process|host)/i);
|
|
39
|
+
assert.match(source,/npx deadbyte-mcp@latest supervisor status/);
|
|
40
|
+
});
|
|
41
|
+
|
|
30
42
|
test('README makes npx the primary operator UX',async()=>{
|
|
31
43
|
const readme=await readFile(path.join(root,'README.txt'),'utf8');
|
|
32
44
|
assert.match(readme,/npx deadbyte-mcp@latest remote/);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { readFile } from 'node:fs/promises';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
|
|
7
|
+
const root=path.resolve(fileURLToPath(new URL('..',import.meta.url)));
|
|
8
|
+
const expected=[
|
|
9
|
+
'coding_benchmark_run','coding_command_run','coding_file_read','coding_file_write','coding_files_read',
|
|
10
|
+
'coding_receipt_verify','coding_search','coding_session_status','coding_stat','coding_symbol_definition',
|
|
11
|
+
'coding_symbol_diagnostics','coding_symbol_implementations','coding_symbol_outline','coding_symbol_references','coding_symbol_rename_preview','coding_symbol_replace','coding_task_approve','coding_task_cancel',
|
|
12
|
+
'coding_task_events','coding_task_run','coding_task_status','coding_task_submit','coding_task_verify','coding_text_replace','coding_tree'
|
|
13
|
+
].sort();
|
|
14
|
+
function extract(source){
|
|
15
|
+
const m=source.match(/const (?:codingTools|coding)\s*=\s*\[([\s\S]*?)\];/);
|
|
16
|
+
assert.ok(m,'coding catalog array missing');
|
|
17
|
+
return [...m[1].matchAll(/'([^']+)'/g)].map(x=>x[1]).sort();
|
|
18
|
+
}
|
|
19
|
+
for(const rel of ['src/machine-fs-smoke-client.mjs','src/observation-smoke-client.mjs','src/remote-mcp-coding-smoke-client.mjs','src/remote-mcp-smoke-client.mjs']){
|
|
20
|
+
test(`${rel} uses the exact R36 25-tool coding catalog`,async()=>{
|
|
21
|
+
const source=await readFile(path.join(root,...rel.split('/')),'utf8');
|
|
22
|
+
assert.deepEqual(extract(source),expected);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
@@ -14,8 +14,8 @@ const repoRoot = path.resolve(here, '..');
|
|
|
14
14
|
const serverPath = path.join(repoRoot, 'src', 'mcp-server.mjs');
|
|
15
15
|
const workspaceRoot = path.join(repoRoot, 'workspaces');
|
|
16
16
|
const codingTools = [
|
|
17
|
-
'coding_benchmark_run', 'coding_command_run', 'coding_file_read', 'coding_file_write',
|
|
18
|
-
'coding_receipt_verify', 'coding_search', 'coding_session_status', 'coding_stat', 'coding_task_approve', 'coding_task_cancel',
|
|
17
|
+
'coding_benchmark_run', 'coding_command_run', 'coding_file_read', 'coding_file_write', 'coding_files_read',
|
|
18
|
+
'coding_receipt_verify', 'coding_search', 'coding_session_status', 'coding_stat', 'coding_symbol_definition', 'coding_symbol_diagnostics', 'coding_symbol_implementations', 'coding_symbol_outline', 'coding_symbol_references', 'coding_symbol_rename_preview', 'coding_symbol_replace', 'coding_task_approve', 'coding_task_cancel',
|
|
19
19
|
'coding_task_events', 'coding_task_run', 'coding_task_status', 'coding_task_submit',
|
|
20
20
|
'coding_task_verify', 'coding_text_replace', 'coding_tree'
|
|
21
21
|
];
|
|
@@ -69,7 +69,7 @@ async function fixture() {
|
|
|
69
69
|
return { root, client, transport };
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
test('
|
|
72
|
+
test('R36 hermetic coding fixture exposes the exact 37-tool no-host catalog', async () => {
|
|
73
73
|
const f = await fixture();
|
|
74
74
|
try {
|
|
75
75
|
await f.client.connect(f.transport);
|
|
@@ -56,6 +56,22 @@ test('coding plane edits files under lease and verifies signed action receipts',
|
|
|
56
56
|
} finally { await rm(f.root, { recursive: true, force: true }); }
|
|
57
57
|
});
|
|
58
58
|
|
|
59
|
+
test('R36 coding stat exposes mutation-relevant observation identity', async () => {
|
|
60
|
+
const f = await fixture();
|
|
61
|
+
try {
|
|
62
|
+
await writeFile(path.join(f.project,'stat.txt'),'stat-body\n');
|
|
63
|
+
const value=await f.runtime.stat({rootId:'project',relativePath:'stat.txt',hash:true});
|
|
64
|
+
assert.equal(value.status,'ok');
|
|
65
|
+
assert.equal(value.normalized_path,'stat.txt');
|
|
66
|
+
assert.equal(value.type,'file');
|
|
67
|
+
assert.equal(value.reparse_state,'none');
|
|
68
|
+
assert.match(value.sha256,/^[0-9a-f]{64}$/);
|
|
69
|
+
assert.match(value.object_identity_sha256,/^[0-9a-f]{64}$/);
|
|
70
|
+
assert.match(value.observation_sha256,/^[0-9a-f]{64}$/);
|
|
71
|
+
assert.equal(value.policy_root_id,'project');
|
|
72
|
+
} finally { await rm(f.root, { recursive: true, force: true }); }
|
|
73
|
+
});
|
|
74
|
+
|
|
59
75
|
test('coding plane rejects mutation when lease is absent or precondition is stale', async () => {
|
|
60
76
|
const f = await fixture({ armed: false });
|
|
61
77
|
try {
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { mkdtemp, rm } from 'node:fs/promises';
|
|
4
|
+
import os from 'node:os';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import { generateTrustKeypair } from '../src/trust.mjs';
|
|
7
|
+
import { createSearchCursorCodec } from '../src/search-cursor.mjs';
|
|
8
|
+
import { createCodingSearch } from '../src/coding-search.mjs';
|
|
9
|
+
|
|
10
|
+
async function fixture(){
|
|
11
|
+
const temp=await mkdtemp(path.join(os.tmpdir(),'deadbyte-r36-search-'));
|
|
12
|
+
const keys=await generateTrustKeypair({privateKeyPath:path.join(temp,'private.pem'),publicKeyPath:path.join(temp,'public.pem')});
|
|
13
|
+
const state=new Map([
|
|
14
|
+
['src/a.txt',Buffer.from('foo1 foo2\nbar foo3\n','utf8')],
|
|
15
|
+
['src/b.txt',Buffer.from('other FOO4 and foo5\n','utf8')],
|
|
16
|
+
['src/foo-file.js',Buffer.from('nothing here\n','utf8')],
|
|
17
|
+
['src/binary.bin',Buffer.from([0xff,0xfe,0x00,0x61])]
|
|
18
|
+
]);
|
|
19
|
+
let reads=0;
|
|
20
|
+
const tree=async()=>({status:'ok',root_id:'core',path:'.',truncated:false,entries:[...state].map(([p,b])=>({path:p,type:'file',bytes:b.length}))});
|
|
21
|
+
const fileRead=async({relativePath,encoding})=>{
|
|
22
|
+
reads+=1;
|
|
23
|
+
const bytes=state.get(relativePath);
|
|
24
|
+
if(!bytes) throw new Error('missing');
|
|
25
|
+
return {status:'ok',root_id:'core',path:relativePath,encoding,bytes:bytes.length,sha256:(await import('node:crypto')).createHash('sha256').update(bytes).digest('hex'),content:encoding==='base64'?bytes.toString('base64'):bytes.toString('utf8')};
|
|
26
|
+
};
|
|
27
|
+
const cursorCodec=createSearchCursorCodec({signingKeyPath:keys.privateKeyPath,verifyKeyPath:keys.publicKeyPath});
|
|
28
|
+
const search=createCodingSearch({tree,fileRead,cursorCodec});
|
|
29
|
+
return {temp,state,search,get reads(){return reads;},cleanup:()=>rm(temp,{recursive:true,force:true})};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
test('R36 regex search returns multiple matches per file with deterministic signed paging',async()=>{
|
|
33
|
+
const f=await fixture();
|
|
34
|
+
try{
|
|
35
|
+
const first=await f.search({rootId:'core',path:'.',target:'content',mode:'regex',pattern:'foo\\d',caseSensitive:false,pageSize:2,maxResults:20});
|
|
36
|
+
assert.equal(first.matches.length,2);
|
|
37
|
+
assert.deepEqual(first.matches.map(x=>[x.path,x.line,x.column]),[['src/a.txt',1,1],['src/a.txt',1,6]]);
|
|
38
|
+
assert.match(first.query_sha256,/^[0-9a-f]{64}$/);
|
|
39
|
+
assert.match(first.snapshot_sha256,/^[0-9a-f]{64}$/);
|
|
40
|
+
assert.match(first.page_sha256,/^[0-9a-f]{64}$/);
|
|
41
|
+
assert.ok(first.next_cursor);
|
|
42
|
+
const second=await f.search({rootId:'core',path:'.',target:'content',mode:'regex',pattern:'foo\\d',caseSensitive:false,pageSize:2,maxResults:20,cursor:first.next_cursor});
|
|
43
|
+
assert.equal(second.matches.length,2);
|
|
44
|
+
assert.deepEqual(second.matches.map(x=>x.path),['src/a.txt','src/b.txt']);
|
|
45
|
+
assert.notEqual(second.page_sha256,first.page_sha256);
|
|
46
|
+
} finally {await f.cleanup();}
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
test('R36 path search does not decode file content and is deterministic',async()=>{
|
|
50
|
+
const f=await fixture();
|
|
51
|
+
try{
|
|
52
|
+
const result=await f.search({rootId:'core',target:'path',mode:'literal',pattern:'foo-file',pageSize:10,maxResults:20});
|
|
53
|
+
assert.equal(result.matches.length,1);
|
|
54
|
+
assert.equal(result.matches[0].path,'src/foo-file.js');
|
|
55
|
+
assert.equal(result.matches[0].line,null);
|
|
56
|
+
assert.equal(result.bytes_scanned,0);
|
|
57
|
+
assert.equal(f.reads,0);
|
|
58
|
+
} finally {await f.cleanup();}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
test('R36 search cursor is query-bound and stale snapshot fails closed',async()=>{
|
|
62
|
+
const f=await fixture();
|
|
63
|
+
try{
|
|
64
|
+
const first=await f.search({rootId:'core',target:'content',mode:'literal',pattern:'foo',pageSize:1,maxResults:20});
|
|
65
|
+
await assert.rejects(()=>f.search({rootId:'core',target:'content',mode:'literal',pattern:'bar',pageSize:1,maxResults:20,cursor:first.next_cursor}),/cursor.*query/i);
|
|
66
|
+
f.state.set('src/a.txt',Buffer.from('foo1 changed same workflow\n','utf8'));
|
|
67
|
+
await assert.rejects(()=>f.search({rootId:'core',target:'content',mode:'literal',pattern:'foo',pageSize:1,maxResults:20,cursor:first.next_cursor}),/cursor.*stale|snapshot/i);
|
|
68
|
+
} finally {await f.cleanup();}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
test('R36 invalid regex fails before repository file reads and binary is classified',async()=>{
|
|
72
|
+
const f=await fixture();
|
|
73
|
+
try{
|
|
74
|
+
await assert.rejects(()=>f.search({rootId:'core',target:'content',mode:'regex',pattern:'[unterminated'}),/regex/i);
|
|
75
|
+
assert.equal(f.reads,0);
|
|
76
|
+
const result=await f.search({rootId:'core',target:'content',mode:'literal',pattern:'foo',pageSize:20,maxResults:20});
|
|
77
|
+
assert.equal(result.binary_files_skipped,1);
|
|
78
|
+
assert.ok(result.matches.length>=5);
|
|
79
|
+
} finally {await f.cleanup();}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
test('R36 scan-byte bound truncates deterministically',async()=>{
|
|
83
|
+
const f=await fixture();
|
|
84
|
+
try{
|
|
85
|
+
const result=await f.search({rootId:'core',target:'content',mode:'literal',pattern:'foo',maxScanBytes:10,pageSize:20,maxResults:20});
|
|
86
|
+
assert.equal(result.truncated,true);
|
|
87
|
+
assert.equal(result.truncation_reason,'scan_byte_limit');
|
|
88
|
+
assert.ok(result.bytes_scanned<=10);
|
|
89
|
+
} finally {await f.cleanup();}
|
|
90
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { Client } from '@modelcontextprotocol/client';
|
|
4
|
+
import { StdioClientTransport, getDefaultEnvironment } from '@modelcontextprotocol/client/stdio';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
|
|
8
|
+
const here=path.dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
const repoRoot=path.resolve(here,'..');
|
|
10
|
+
const serverPath=path.join(repoRoot,'src','mcp-server.mjs');
|
|
11
|
+
const gatewayNames=['capability_manifest','coding_inspect','machine_fs','machine_observe','process_session'];
|
|
12
|
+
|
|
13
|
+
test('R36 real compact stdio catalog stays <=42 and exposes all gateways',async()=>{
|
|
14
|
+
const client=new Client({name:'deadbyte-r36-compact-test',version:'0.10.0-dev'},{versionNegotiation:{mode:{pin:'2026-07-28'}}});
|
|
15
|
+
const env={
|
|
16
|
+
...getDefaultEnvironment(),
|
|
17
|
+
DEADBYTE_CAPABILITY_PROFILE:'compact',
|
|
18
|
+
DEADBYTE_AUDIT_RUNTIME:'0',DEADBYTE_MACHINE_RUNTIME:'0',DEADBYTE_AGENT_RUNTIME:'0',
|
|
19
|
+
DEADBYTE_PROCESS_RUNTIME:'0',DEADBYTE_CODING_RUNTIME:'0',DEADBYTE_MACHINE_FS_RUNTIME:'0',
|
|
20
|
+
DEADBYTE_OBSERVATION_RUNTIME:'0',DEADBYTE_AUTONOMOUS_RUNTIME:'0'
|
|
21
|
+
};
|
|
22
|
+
const transport=new StdioClientTransport({command:process.execPath,args:[serverPath],cwd:repoRoot,env,stderr:'pipe'});
|
|
23
|
+
try{
|
|
24
|
+
await client.connect(transport);
|
|
25
|
+
const listed=await client.listTools();
|
|
26
|
+
const names=listed.tools.map(tool=>tool.name).sort();
|
|
27
|
+
assert.ok(names.length<=42,`compact tool count ${names.length} exceeds 42`);
|
|
28
|
+
for(const name of gatewayNames) assert.ok(names.includes(name),`missing ${name}`);
|
|
29
|
+
for(const legacy of ['workspace_open','file_read','proof_execute','contained_transform']) assert.equal(names.includes(legacy),false,`legacy full-only tool leaked: ${legacy}`);
|
|
30
|
+
const manifest=await client.callTool({name:'capability_manifest',arguments:{}});
|
|
31
|
+
assert.equal(manifest.isError,false);
|
|
32
|
+
assert.equal(manifest.structuredContent.status,'ok');
|
|
33
|
+
assert.equal(manifest.structuredContent.result.profile,'compact');
|
|
34
|
+
assert.match(manifest.structuredContent.result.ledger_sha256,/^[0-9a-f]{64}$/);
|
|
35
|
+
assert.ok(manifest.structuredContent.result.capabilities.length>40);
|
|
36
|
+
} finally {await client.close().catch(()=>{});}
|
|
37
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import {
|
|
4
|
+
codingInspectInputSchema,
|
|
5
|
+
machineFsGatewayInputSchema,
|
|
6
|
+
processSessionGatewayInputSchema,
|
|
7
|
+
machineObserveInputSchema,
|
|
8
|
+
registerCompactGatewayTools
|
|
9
|
+
} from '../src/compact-gateway-mcp-tools.mjs';
|
|
10
|
+
|
|
11
|
+
const fakeServer=()=>{
|
|
12
|
+
const tools=new Map();
|
|
13
|
+
return {
|
|
14
|
+
tools,
|
|
15
|
+
registerTool(name,definition,handler){
|
|
16
|
+
if(tools.has(name)) throw new Error(`duplicate ${name}`);
|
|
17
|
+
tools.set(name,{definition,handler});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
test('R36 compact gateway schemas reject generic arbitrary dispatch',()=>{
|
|
23
|
+
assert.equal(codingInspectInputSchema.safeParse({op:'call',tool_name:'host_exec',args:{}}).success,false);
|
|
24
|
+
assert.equal(machineFsGatewayInputSchema.safeParse({op:'exec',command:'whoami'}).success,false);
|
|
25
|
+
assert.equal(processSessionGatewayInputSchema.safeParse({op:'stdin',session_id:'0'.repeat(64),input:'raw'}).success,false);
|
|
26
|
+
assert.equal(machineObserveInputSchema.safeParse({op:'revoke',reason:'no'}).success,false);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
test('R36 compact schemas preserve representative preconditions',()=>{
|
|
30
|
+
assert.equal(machineFsGatewayInputSchema.safeParse({
|
|
31
|
+
op:'move',root_id:'core',source_path:'a.txt',destination_path:'b.txt',expected_source_identity:'a'.repeat(64)
|
|
32
|
+
}).success,true);
|
|
33
|
+
assert.equal(machineFsGatewayInputSchema.safeParse({
|
|
34
|
+
op:'move',root_id:'core',source_path:'a.txt',destination_path:'b.txt'
|
|
35
|
+
}).success,false);
|
|
36
|
+
assert.equal(processSessionGatewayInputSchema.safeParse({op:'action',session_id:'b'.repeat(64),action_id:'ping'}).success,true);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
test('R36 registers exactly five compact gateway names',()=>{
|
|
40
|
+
const server=fakeServer();
|
|
41
|
+
registerCompactGatewayTools(server,{
|
|
42
|
+
profile:'compact',ledger:{schema:'deadbyte.capability-ledger.v1',entries:[],ledger_sha256:'0'.repeat(64)},
|
|
43
|
+
codingRuntime:null,semanticRuntime:null,machineFsRuntime:null,processRuntime:null,observationRuntime:null,machineRuntime:null
|
|
44
|
+
});
|
|
45
|
+
assert.deepEqual([...server.tools.keys()].sort(),[
|
|
46
|
+
'capability_manifest','coding_inspect','machine_fs','machine_observe','process_session'
|
|
47
|
+
]);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
test('R36 coding_inspect gateway calls runtime directly and never MCP-recurses',async()=>{
|
|
51
|
+
const calls=[];
|
|
52
|
+
const codingRuntime={
|
|
53
|
+
stat:async args=>{calls.push(['stat',args]);return {status:'ok',root_id:args.rootId,path:args.relativePath,type:'file'};}
|
|
54
|
+
};
|
|
55
|
+
const server=fakeServer();
|
|
56
|
+
registerCompactGatewayTools(server,{
|
|
57
|
+
profile:'compact',ledger:{schema:'deadbyte.capability-ledger.v1',entries:[],ledger_sha256:'0'.repeat(64)},
|
|
58
|
+
codingRuntime,semanticRuntime:null,machineFsRuntime:null,processRuntime:null,observationRuntime:null,machineRuntime:null
|
|
59
|
+
});
|
|
60
|
+
const tool=server.tools.get('coding_inspect');
|
|
61
|
+
const result=await tool.handler({op:'stat',root_id:'core',path:'src/a.mjs',hash:false});
|
|
62
|
+
assert.deepEqual(calls,[['stat',{rootId:'core',relativePath:'src/a.mjs',hash:false}]]);
|
|
63
|
+
assert.equal(result.structuredContent.status,'ok');
|
|
64
|
+
assert.equal(result.structuredContent.op,'stat');
|
|
65
|
+
assert.equal(result.structuredContent.result.path,'src/a.mjs');
|
|
66
|
+
});
|
package/test/contained.test.mjs
CHANGED
|
@@ -364,7 +364,7 @@ test('contained execution source has a compile-time worker registry and no user
|
|
|
364
364
|
assert.match(server, /z\.enum\(CONTAINED_TRANSFORM_OPERATIONS\)/);
|
|
365
365
|
assert.doesNotMatch(server, /executable:\s*z\./);
|
|
366
366
|
assert.doesNotMatch(executor, /--worker/);
|
|
367
|
-
assert.doesNotMatch(server, /command_run|shell_execute|powershell_run/);
|
|
367
|
+
assert.doesNotMatch(server, /registerTool\(\s*['"](?:command_run|shell_execute|powershell_run)['"]/);
|
|
368
368
|
});
|
|
369
369
|
|
|
370
370
|
test('contained launcher imports by stdin/profile copy and never mounts a host workspace', async () => {
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { createHash } from 'node:crypto';
|
|
4
|
+
import { canonicalJson } from '../src/canonical-json.mjs';
|
|
5
|
+
import { provenanceFor, dedupeEvidence } from '../src/context-provenance.mjs';
|
|
6
|
+
|
|
7
|
+
const sha256=value=>createHash('sha256').update(value).digest('hex');
|
|
8
|
+
|
|
9
|
+
function provenance(overrides={}){
|
|
10
|
+
return provenanceFor({
|
|
11
|
+
sourceKind:'file',sourceId:'src/main.ts',bytes:'export const x = 1;\n',
|
|
12
|
+
observedAtUtc:'2026-09-17T09:00:00.000Z',trustClass:'workspace',relevanceEpoch:4,
|
|
13
|
+
...overrides
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
test('R35 provenance identity is deterministic and observation time is not part of stable identity',()=>{
|
|
18
|
+
const a=provenance();
|
|
19
|
+
const b=provenance({observedAtUtc:'2026-09-17T09:00:05.000Z'});
|
|
20
|
+
assert.equal(a.schema,'deadbyte.context-provenance.v1');
|
|
21
|
+
assert.equal(a.source_kind,'file');
|
|
22
|
+
assert.equal(a.source_id,'src/main.ts');
|
|
23
|
+
assert.equal(a.byte_count,Buffer.byteLength('export const x = 1;\n','utf8'));
|
|
24
|
+
assert.equal(a.source_sha256,sha256(Buffer.from('export const x = 1;\n','utf8')));
|
|
25
|
+
assert.match(a.provenance_id,/^[0-9a-f]{64}$/);
|
|
26
|
+
assert.equal(a.provenance_id,b.provenance_id);
|
|
27
|
+
assert.notEqual(a.observed_at_utc,b.observed_at_utc);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
test('R35 structured secret evidence never exposes a secret-derived digest oracle',()=>{
|
|
31
|
+
const a=provenance({sourceKind:'provider_response',sourceId:'planner',bytes:{status:'failed',api_token:'alpha-secret'}});
|
|
32
|
+
const b=provenance({sourceKind:'provider_response',sourceId:'planner',bytes:{status:'failed',api_token:'different-secret'}});
|
|
33
|
+
assert.equal(a.source_sha256,undefined);
|
|
34
|
+
assert.equal(b.source_sha256,undefined);
|
|
35
|
+
assert.equal(a.digest_withheld,'secret');
|
|
36
|
+
assert.equal(b.digest_withheld,'secret');
|
|
37
|
+
assert.equal(a.provenance_id,b.provenance_id,'stable identity must not become a secret oracle');
|
|
38
|
+
assert.equal(a.byte_count,Buffer.byteLength(canonicalJson({status:'failed',api_token:'alpha-secret'}),'utf8'));
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
test('R35 dedupeEvidence keeps the newest item for identical provenance while preserving stable identity order',()=>{
|
|
42
|
+
const p1=provenance({sourceId:'a.ts',observedAtUtc:'2026-09-17T09:00:00.000Z'});
|
|
43
|
+
const p1New=provenance({sourceId:'a.ts',observedAtUtc:'2026-09-17T09:01:00.000Z'});
|
|
44
|
+
const p2=provenance({sourceId:'b.ts',observedAtUtc:'2026-09-17T09:00:30.000Z'});
|
|
45
|
+
const out=dedupeEvidence([
|
|
46
|
+
{provenance:p1,content:'old'},
|
|
47
|
+
{provenance:p2,content:'other'},
|
|
48
|
+
{provenance:p1New,content:'new'}
|
|
49
|
+
]);
|
|
50
|
+
assert.equal(out.length,2);
|
|
51
|
+
assert.equal(out[0].content,'new');
|
|
52
|
+
assert.equal(out[0].provenance.provenance_id,p1.provenance_id);
|
|
53
|
+
assert.equal(out[1].content,'other');
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
test('R35 provenance validates bounded identity, trust and relevance inputs',()=>{
|
|
57
|
+
assert.throws(()=>provenanceFor({sourceKind:'',sourceId:'x',bytes:'x',observedAtUtc:'2026-09-17T09:00:00.000Z',trustClass:'workspace',relevanceEpoch:0}),/sourceKind/i);
|
|
58
|
+
assert.throws(()=>provenanceFor({sourceKind:'file',sourceId:'x',bytes:'x',observedAtUtc:'not-time',trustClass:'workspace',relevanceEpoch:0}),/observedAtUtc/i);
|
|
59
|
+
assert.throws(()=>provenanceFor({sourceKind:'file',sourceId:'x',bytes:'x',observedAtUtc:'2026-09-17T09:00:00.000Z',trustClass:'',relevanceEpoch:0}),/trustClass/i);
|
|
60
|
+
assert.throws(()=>provenanceFor({sourceKind:'file',sourceId:'x',bytes:'x',observedAtUtc:'2026-09-17T09:00:00.000Z',trustClass:'workspace',relevanceEpoch:-1}),/relevanceEpoch/i);
|
|
61
|
+
});
|
|
@@ -31,9 +31,10 @@ test('R27 controller supports a trusted stable WorkspaceRoot independent of rele
|
|
|
31
31
|
|
|
32
32
|
test('R27 controller pins external Bridge script bytes into owned runtime identity', async () => {
|
|
33
33
|
const text = await source();
|
|
34
|
-
assert.match(text
|
|
35
|
-
assert.match(text,/
|
|
36
|
-
assert.match(text,/
|
|
34
|
+
assert.match(text,/\$name -in @\('Bridge','Supervisor'\)/);
|
|
35
|
+
assert.match(text,/Fail "\$name ScriptPath missing"/);
|
|
36
|
+
assert.match(text,/Fail "\$name ScriptSha256 invalid"/);
|
|
37
|
+
assert.match(text,/Fail "\$name script hash mismatch:/);
|
|
37
38
|
assert.match(text,/\$body\['script_path'\] = \[string\]\$Spec\.ScriptPath/);
|
|
38
39
|
assert.match(text,/\$body\['script_sha256'\] = \[string\]\$Spec\.ScriptSha256/);
|
|
39
40
|
assert.match(text,/script-hash-mismatch/);
|
package/test/controller.test.mjs
CHANGED
|
@@ -134,6 +134,22 @@ test('controller feature-gates coding runtime and policy only into the Bridge ch
|
|
|
134
134
|
assert.match(example, /CodingRuntimeEnabled = \$false/);
|
|
135
135
|
});
|
|
136
136
|
|
|
137
|
+
test('R35 controller binds semantic LSP config path and SHA only into the Bridge child environment', async () => {
|
|
138
|
+
const source = await readFile(controller, 'utf8');
|
|
139
|
+
const example = await readFile(fileURLToPath(new URL('../controller/deadbyte-controller.config.psd1.example', import.meta.url)), 'utf8');
|
|
140
|
+
assert.match(source, /SemanticLspConfigFile/);
|
|
141
|
+
assert.match(source, /SemanticLspConfigSha256/);
|
|
142
|
+
assert.match(source, /DEADBYTE_SEMANTIC_LSP_CONFIG/);
|
|
143
|
+
assert.match(source, /DEADBYTE_SEMANTIC_LSP_CONFIG_SHA256/);
|
|
144
|
+
assert.match(source, /semantic LSP config SHA-256 mismatch/i);
|
|
145
|
+
assert.match(source, /Remove-Item Env:DEADBYTE_SEMANTIC_LSP_CONFIG/);
|
|
146
|
+
assert.match(source, /Remove-Item Env:DEADBYTE_SEMANTIC_LSP_CONFIG_SHA256/);
|
|
147
|
+
assert.match(source, /\$env:DEADBYTE_SEMANTIC_LSP_CONFIG = \$previousSemanticLspConfigEnv/);
|
|
148
|
+
assert.match(source, /\$env:DEADBYTE_SEMANTIC_LSP_CONFIG_SHA256 = \$previousSemanticLspConfigShaEnv/);
|
|
149
|
+
assert.match(example, /SemanticLspConfigFile = ''/);
|
|
150
|
+
assert.match(example, /SemanticLspConfigSha256 = ''/);
|
|
151
|
+
});
|
|
152
|
+
|
|
137
153
|
test('R31 controller feature-gates machine filesystem only into the Bridge child and requires coding runtime', async () => {
|
|
138
154
|
const source = await readFile(controller, 'utf8');
|
|
139
155
|
const example = await readFile(fileURLToPath(new URL('../controller/deadbyte-controller.config.psd1.example', import.meta.url)), 'utf8');
|
|
@@ -163,3 +179,39 @@ test('R29 controller exposes a non-mutating public machine identity live gate',
|
|
|
163
179
|
assert.match(source, /remote-mcp-machine-smoke-client\.mjs/);
|
|
164
180
|
assert.match(source, /MACHINE IDENTITY LIVE GATE PASS/);
|
|
165
181
|
});
|
|
182
|
+
|
|
183
|
+
test('R34 controller owns a separate local autonomous supervisor lifecycle with pinned host identity', async () => {
|
|
184
|
+
const source=await readFile(controller,'utf8');
|
|
185
|
+
const example=await readFile(fileURLToPath(new URL('../controller/deadbyte-controller.config.psd1.example', import.meta.url)),'utf8');
|
|
186
|
+
for(const command of ['supervisorstart','supervisorstop','supervisorstatus','supervisorrecover']) assert.match(source,new RegExp(command));
|
|
187
|
+
assert.match(source,/AutonomousSupervisorEnabled/);
|
|
188
|
+
assert.match(source,/Start-OwnedComponent 'Supervisor'/);
|
|
189
|
+
assert.match(source,/Stop-OwnedComponent 'Supervisor'/);
|
|
190
|
+
assert.match(source,/Test-OwnedInstance 'Supervisor'/);
|
|
191
|
+
assert.match(source,/autonomous-supervisor-host\.mjs/);
|
|
192
|
+
assert.match(source,/ScriptSha256/);
|
|
193
|
+
assert.match(example,/AutonomousSupervisorEnabled = \$false/);
|
|
194
|
+
assert.match(example,/Supervisor\s*=\s*@\{/);
|
|
195
|
+
assert.match(example,/autonomous-supervisor-host\.mjs/);
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
test('R34 controller assigns external supervisor ownership to Bridge when local supervisor is enabled', async () => {
|
|
199
|
+
const source=await readFile(controller,'utf8');
|
|
200
|
+
assert.match(source,/DEADBYTE_AUTONOMOUS_SUPERVISOR_MODE/);
|
|
201
|
+
assert.match(source,/AutonomousSupervisorEnabled\) \{ 'external' \} else \{ 'in_process' \}/);
|
|
202
|
+
assert.match(source,/Remove-Item Env:DEADBYTE_AUTONOMOUS_SUPERVISOR_MODE/);
|
|
203
|
+
assert.match(source,/\$env:DEADBYTE_AUTONOMOUS_SUPERVISOR_MODE = \$previousAutonomousSupervisorModeEnv/);
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
test('R34 supervisor lifecycle never arms privileged planes', async () => {
|
|
207
|
+
const source=await readFile(controller,'utf8');
|
|
208
|
+
const start=source.indexOf('function Start-AutonomousSupervisor');
|
|
209
|
+
const end=source.indexOf('function Show-State',start);
|
|
210
|
+
assert.ok(start>=0&&end>start,'supervisor lifecycle block missing');
|
|
211
|
+
const block=source.slice(start,end);
|
|
212
|
+
assert.doesNotMatch(block,/Arm-(?:Process|Coding|Autonomous|Host)/);
|
|
213
|
+
assert.match(block,/Disarm-Autonomous/);
|
|
214
|
+
assert.match(block,/Disarm-Coding/);
|
|
215
|
+
assert.match(block,/Disarm-Process/);
|
|
216
|
+
assert.match(block,/Disarm-Host/);
|
|
217
|
+
});
|
package/test/core.test.mjs
CHANGED
|
@@ -105,7 +105,7 @@ test('proof execution creates deterministic output and signed verifiable receipt
|
|
|
105
105
|
assert.equal(result.receipt.request.schema, 'deadbyte.request.v1');
|
|
106
106
|
assert.match(result.receipt.request.nonce, /^[0-9a-f]{64}$/);
|
|
107
107
|
assert.match(result.receipt.request.sha256, /^[0-9a-f]{64}$/);
|
|
108
|
-
assert.equal(result.receipt.runtime.package_version, '0.
|
|
108
|
+
assert.equal(result.receipt.runtime.package_version, '0.10.0');
|
|
109
109
|
assert.match(result.receipt.runtime.mcp_ingress_adapter, /^(?:none|tunnel-stdio-probe-compat-v1)$/);
|
|
110
110
|
assert.match(result.receipt.runtime.mcp_ingress_adapter_sha256, /^[0-9a-f]{64}$/);
|
|
111
111
|
assert.match(result.receipt.runtime.mcp_ingress_mode_source_sha256, /^[0-9a-f]{64}$/);
|
|
@@ -22,7 +22,11 @@ test('R33 deferred worker survives scheduler exit and stays bound to explicit st
|
|
|
22
22
|
assert.equal(scheduled.status,'scheduled');
|
|
23
23
|
assert.ok(path.resolve(scheduled.state_path).startsWith(path.resolve(state)+path.sep));
|
|
24
24
|
let record;
|
|
25
|
-
for(let i=0;i<
|
|
25
|
+
for(let i=0;i<30;i++){
|
|
26
|
+
await sleep(300);
|
|
27
|
+
record=JSON.parse(await readFile(scheduled.state_path,'utf8'));
|
|
28
|
+
if(record.state==='failed'||record.state==='passed') break;
|
|
29
|
+
}
|
|
26
30
|
assert.equal(record?.state,'failed');
|
|
27
31
|
assert.match(record.error,/trust|ENOENT|ed25519/i);
|
|
28
32
|
} finally { await rm(state,{recursive:true,force:true}); }
|