deadbyte-mcp 0.15.39 → 0.15.42
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.cmd +8 -4
- package/MANIFEST.SHA256 +99 -45
- package/PROVENANCE.json +90 -20
- package/README.txt +39 -18
- package/RELEASE.json +85 -20
- package/SBOM.cdx.json +2 -2
- package/TEST-MATRIX.json +134 -34
- package/bridge/package.json +1 -1
- package/controller/deadbyte-controller.ps1 +132 -12
- package/controller/deadbyte-process-policy.json +4 -4
- package/docs/R64-EVIDENCE.json +95 -0
- package/docs/R64-REFERENCE-GAP-MATRIX.json +98 -0
- package/docs/R64-SCOPE.json +41 -0
- package/docs/R65-AUTHORITY-CONTINUITY-DESIGN.json +27 -0
- package/docs/R65-REFERENCE-GAP-MATRIX.json +22 -0
- package/package.json +7 -4
- package/scripts/deploy-r48.mjs +123 -7
- package/scripts/gate-windows-r63-prepublish.ps1 +45 -0
- package/scripts/gate-windows-r64-prepublish.ps1 +68 -0
- package/scripts/gate-windows-r65-prepublish.ps1 +65 -0
- package/scripts/npm-publication-r65.mjs +139 -0
- package/scripts/npm-release-r48.mjs +62 -37
- package/scripts/r64-predecessor-reproducer.mjs +32 -0
- package/scripts/r64-read-benchmark.mjs +84 -0
- package/scripts/r65-canonical-full.mjs +45 -0
- package/scripts/r65-focused.mjs +37 -0
- package/scripts/verify-r65-parent-source.mjs +75 -0
- package/src/activation-continuity-engine-r65.mjs +225 -0
- package/src/activation-lock-r65.mjs +155 -0
- package/src/activation-preflight-r65.mjs +197 -0
- package/src/authority-continuity-r65.mjs +541 -0
- package/src/authority-epoch-cli-r65.mjs +10 -0
- package/src/autonomous-policy.mjs +7 -3
- package/src/coding-plane.mjs +12 -3
- package/src/compact-gateway-mcp-tools.mjs +1 -1
- package/src/deadbyte-cli.mjs +16 -2
- package/src/desktop-policy-r40.mjs +6 -3
- package/src/doctor-transactions-r58.mjs +1 -1
- package/src/host-plane.mjs +9 -3
- package/src/machine-fs-mcp-tools.mjs +1 -1
- package/src/machine-fs.mjs +7 -4
- package/src/process-policy.mjs +7 -4
- package/src/remote-authority.mjs +20 -1
- package/src/runtime-update.mjs +15 -5
- package/src/version.mjs +1 -1
- package/test/audit-context.test.mjs +15 -4
- package/test/autonomous-local-supervisor.test.mjs +7 -6
- package/test/autonomous-supervisor-integration.test.mjs +8 -7
- package/test/capability-resolver.test.mjs +11 -5
- package/test/codex-autonomous-r44.test.mjs +7 -6
- package/test/coding-observation.test.mjs +4 -3
- package/test/commander-real-parity-r47.test.mjs +5 -4
- package/test/commander-torture-r47.test.mjs +5 -4
- package/test/desktop-policy-r40.test.mjs +6 -4
- package/test/desktop-runtime-r40.test.mjs +8 -3
- package/test/host-inline-r45.test.mjs +4 -3
- package/test/machine-fs-runtime.test.mjs +4 -3
- package/test/process-longrun-r36.test.mjs +3 -2
- package/test/process-policy.test.mjs +10 -6
- package/test/process-runtime.test.mjs +9 -6
- package/test/r52-host-revocation.test.mjs +1 -0
- package/test/r59-tool-surface-compat.test.mjs +14 -4
- package/test/r62-release-contract.test.mjs +2 -1
- package/test/r63-one-shot-coherence.test.mjs +38 -0
- package/test/r63-release-contract.test.mjs +59 -0
- package/test/r64-machine-fs-large-read.test.mjs +136 -0
- package/test/r64-release-contract.test.mjs +52 -0
- package/test/r65-activation-lock-recovery.test.mjs +72 -0
- package/test/r65-activation-lock.test.mjs +59 -0
- package/test/r65-activation-orchestration.test.mjs +179 -0
- package/test/r65-activation-preflight.test.mjs +35 -0
- package/test/r65-authority-continuity-decision.test.mjs +58 -0
- package/test/r65-authority-durable-policy-binding.test.mjs +34 -0
- package/test/r65-authority-epoch-cli.test.mjs +125 -0
- package/test/r65-authority-epoch-races.test.mjs +87 -0
- package/test/r65-authority-epoch-recovery.test.mjs +82 -0
- package/test/r65-authority-epoch-store.test.mjs +94 -0
- package/test/r65-authority-fixture.mjs +41 -0
- package/test/r65-authority-grant-capture.test.mjs +37 -0
- package/test/r65-authority-observation-epoch.test.mjs +25 -0
- package/test/r65-authority-policy-envelope.test.mjs +46 -0
- package/test/r65-authority-restored-safe.test.mjs +75 -0
- package/test/r65-authority-runtime-epoch.test.mjs +115 -0
- package/test/r65-authority-runtime-policy-binding.test.mjs +29 -0
- package/test/r65-authority-test-trust.mjs +20 -0
- package/test/r65-cli-invocation.test.mjs +38 -0
- package/test/r65-controller-authority-epoch-live.test.mjs +100 -0
- package/test/r65-controller-authority-epoch.test.mjs +37 -0
- package/test/r65-deploy-preflight.test.mjs +55 -0
- package/test/r65-epoch-native-activation-integration.test.mjs +141 -0
- package/test/r65-epoch-native-continuity-engine.test.mjs +112 -0
- package/test/r65-epoch-native-cross-plane.test.mjs +95 -0
- package/test/r65-legacy-authority-migration.test.mjs +63 -0
- package/test/r65-legacy-auto-restore-rejection.test.mjs +17 -0
- package/test/r65-npm-publication.test.mjs +114 -0
- package/test/r65-parent-source-verifier.test.mjs +63 -0
- package/test/r65-release-contract.test.mjs +74 -0
- package/test/r65-transaction-precondition.test.mjs +36 -0
- package/test/remote-session-cli.test.mjs +13 -11
- package/test/standing-grants.test.mjs +20 -4
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import test from 'node:test';
|
|
2
2
|
import assert from 'node:assert/strict';
|
|
3
|
+
import { createHash } from 'node:crypto';
|
|
3
4
|
import { mkdtemp, mkdir, readFile, rm, writeFile } from 'node:fs/promises';
|
|
4
5
|
import os from 'node:os';
|
|
5
6
|
import path from 'node:path';
|
|
@@ -181,7 +182,7 @@ winTest('remote refuses READY when public signed MCP execution probe fails',asyn
|
|
|
181
182
|
try{
|
|
182
183
|
child=spawn(process.execPath,[cliPath,'remote'],{env:fx.env,stdio:['pipe','pipe','pipe'],windowsHide:true});
|
|
183
184
|
const output=await collect(child);
|
|
184
|
-
const ended=await Promise.race([output.closed,sleep(
|
|
185
|
+
const ended=await Promise.race([output.closed,sleep(12000).then(()=>({timeout:true}))]);
|
|
185
186
|
assert.equal(ended.timeout,undefined,'remote did not fail closed after execution probe failure');
|
|
186
187
|
assert.notEqual(ended.code,0);
|
|
187
188
|
assert.doesNotMatch(output.stdout,/\[READY\]|\[OK\] ONLINE/);
|
|
@@ -200,8 +201,8 @@ winTest('remote refuses READY when controller snapshot lies about Host enforceme
|
|
|
200
201
|
try{
|
|
201
202
|
child=spawn(process.execPath,[cliPath,'remote'],{env:fx.env,stdio:['pipe','pipe','pipe'],windowsHide:true});
|
|
202
203
|
const output=await collect(child);
|
|
203
|
-
const ended=await Promise.race([output.closed,sleep(
|
|
204
|
-
assert.equal(ended.timeout,undefined
|
|
204
|
+
const ended=await Promise.race([output.closed,sleep(12000).then(()=>({timeout:true}))]);
|
|
205
|
+
assert.equal(ended.timeout,undefined,`remote did not reject split authority truth; stdout=${output.stdout.slice(-1200)} stderr=${output.stderr.slice(-1200)} trace=${(await traceCommands(fx.trace)).join(',')}`);
|
|
205
206
|
assert.notEqual(ended.code,0);
|
|
206
207
|
assert.doesNotMatch(output.stdout,/\[READY\]|\[OK\] ONLINE/);
|
|
207
208
|
assert.match(output.stderr,/machinetest|enforcement/i);
|
|
@@ -393,7 +394,7 @@ winTest('remote --resume replays sanitized tool-call and terminal result events
|
|
|
393
394
|
const liveIndex=secondOutput.stdout.indexOf('[LOG] Human live timeline');
|
|
394
395
|
assert.ok(callReplayIndex>=0&&resultReplayIndex>callReplayIndex&&liveIndex>resultReplayIndex,'resume ordering must be call -> result -> live tail');
|
|
395
396
|
second.stdin.end();
|
|
396
|
-
const secondEnded=await Promise.race([secondOutput.closed,sleep(
|
|
397
|
+
const secondEnded=await Promise.race([secondOutput.closed,sleep(12000).then(()=>({timeout:true}))]);
|
|
397
398
|
assert.equal(secondEnded.timeout,undefined);
|
|
398
399
|
assert.equal(secondEnded.code,0,secondOutput.stderr);
|
|
399
400
|
}finally{
|
|
@@ -501,8 +502,8 @@ winTest('bare remote rolls back authority and parks if one plane fails to arm',a
|
|
|
501
502
|
try{
|
|
502
503
|
const child=spawn(process.execPath,[cliPath,'remote'],{env:fx.env,stdio:['ignore','pipe','pipe'],windowsHide:true});
|
|
503
504
|
const output=await collect(child);
|
|
504
|
-
const ended=await Promise.race([output.closed,sleep(
|
|
505
|
-
assert.equal(ended.timeout,undefined
|
|
505
|
+
const ended=await Promise.race([output.closed,sleep(12000).then(()=>({timeout:true}))]);
|
|
506
|
+
assert.equal(ended.timeout,undefined,`failed startup did not terminate; stdout=${output.stdout.slice(-1200)} stderr=${output.stderr.slice(-1200)} trace=${(await traceCommands(fx.trace)).join(',')}`);
|
|
506
507
|
assert.notEqual(ended.code,0);
|
|
507
508
|
const commands=await traceCommands(fx.trace);
|
|
508
509
|
assert.deepEqual(commands.slice(0,6),['status','start','status','status','armprocess','armcoding']);
|
|
@@ -645,13 +646,14 @@ winTest('explicit remote status remains a one-shot controller command',async()=>
|
|
|
645
646
|
}finally{await rm(fx.dir,{recursive:true,force:true});}
|
|
646
647
|
});
|
|
647
648
|
|
|
648
|
-
winTest('explicit remote status
|
|
649
|
+
winTest('explicit remote status keeps the coherent runtime one-shot and silent',async()=>{
|
|
649
650
|
const fx=await fixture({statusOnline:true});
|
|
650
651
|
try{
|
|
651
|
-
const manifest='
|
|
652
|
+
const manifest=createHash('sha256').update(await readFile(path.join(root,'MANIFEST.SHA256'))).digest('hex');
|
|
653
|
+
const generation='2'.repeat(64),launcher='3'.repeat(64);
|
|
652
654
|
await writeFile(path.join(fx.state,'active-release.json'),JSON.stringify({
|
|
653
|
-
schema:'deadbyte.active-release.v1',release_id:`
|
|
654
|
-
release_root:'C:/deadbyte/releases/
|
|
655
|
+
schema:'deadbyte.active-release.v1',release_id:`v${DEADBYTE_VERSION}-${manifest.slice(0,16)}`,version:DEADBYTE_VERSION,manifest_sha256:manifest,
|
|
656
|
+
release_root:'C:/deadbyte/releases/current',generation_root:'C:/deadbyte/generations/current',generation_manifest_sha256:generation,
|
|
655
657
|
launcher_sha256:launcher,config_path:'C:/deadbyte/config.psd1'
|
|
656
658
|
}),'utf8');
|
|
657
659
|
const child=spawn(process.execPath,[cliPath,'remote','status'],{env:fx.env,stdio:['ignore','pipe','pipe'],windowsHide:true});
|
|
@@ -659,7 +661,7 @@ winTest('explicit remote status reports CLI package and active runtime VERSION S
|
|
|
659
661
|
const ended=await Promise.race([output.closed,sleep(6000).then(()=>({timeout:true}))]);
|
|
660
662
|
assert.equal(ended.timeout,undefined);
|
|
661
663
|
assert.equal(ended.code,0,output.stderr);
|
|
662
|
-
assert.
|
|
664
|
+
assert.doesNotMatch(output.stderr,/VERSION SKEW/);
|
|
663
665
|
assert.deepEqual(await traceCommands(fx.trace),['status']);
|
|
664
666
|
}finally{await rm(fx.dir,{recursive:true,force:true});}
|
|
665
667
|
});
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import test from 'node:test';
|
|
2
2
|
import assert from 'node:assert/strict';
|
|
3
|
-
import { mkdtemp, mkdir, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { mkdtemp, mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
4
4
|
import os from 'node:os';
|
|
5
5
|
import path from 'node:path';
|
|
6
6
|
import { loadCodingPolicy, codingSessionStatus } from '../src/coding-plane.mjs';
|
|
7
7
|
import { assertAutonomousArmed, loadAutonomousPolicy, autonomousSessionStatus, recheckAutonomousAuthority } from '../src/autonomous-policy.mjs';
|
|
8
8
|
import { loadHostPolicy, assertHostArmed } from '../src/host-plane.mjs';
|
|
9
9
|
import { createHash } from 'node:crypto';
|
|
10
|
+
import { createAuthorityEpochStore } from '../src/authority-continuity-r65.mjs';
|
|
11
|
+
import { prepareAuthorityTestTrust } from './r65-authority-test-trust.mjs';
|
|
10
12
|
|
|
11
13
|
const sha = bytes => createHash('sha256').update(bytes).digest('hex');
|
|
12
14
|
const farFuture = new Date('2099-01-01T00:00:00Z');
|
|
13
15
|
|
|
14
16
|
async function fixture() {
|
|
15
17
|
const root = await mkdtemp(path.join(os.tmpdir(), 'deadbyte-standing-'));
|
|
18
|
+
await prepareAuthorityTestTrust(root);
|
|
16
19
|
const project = path.join(root, 'project');
|
|
17
20
|
await mkdir(project);
|
|
18
21
|
const codingPath = path.join(root, 'coding.json');
|
|
19
22
|
await writeFile(codingPath, JSON.stringify({ schema:'deadbyte.coding-policy.v1', enabled:true,
|
|
20
|
-
lease_file:path.join(root,'coding-grant.json'), evidence_dir:path.join(root,'coding-evidence'),
|
|
23
|
+
lease_file:path.join(root,'runtime','coding-grant.json'), evidence_dir:path.join(root,'coding-evidence'),
|
|
21
24
|
roots:{ project:{ path:project, read:true, write:true, exec:false, deny_paths:[] } }, commands:{} }));
|
|
22
25
|
const coding = await loadCodingPolicy(codingPath);
|
|
23
26
|
return { root, project, coding, codingPath };
|
|
@@ -27,6 +30,10 @@ test('coding standing grant remains armed until explicit revocation', async () =
|
|
|
27
30
|
await writeFile(coding.lease_file, JSON.stringify({ schema:'deadbyte.coding-grant.v2',
|
|
28
31
|
policy_sha256:coding.policy_sha256, instance_nonce:'a'.repeat(64), root_ids:['project'],
|
|
29
32
|
granted_at_utc:'2026-09-04T00:00:00Z' }));
|
|
33
|
+
const codingBytes=await readFile(coding.lease_file);
|
|
34
|
+
await createAuthorityEpochStore({runtimeDir:path.dirname(coding.lease_file),policyBytes:await readFile(coding.policy_path)}).append({
|
|
35
|
+
plane:'coding',action:'grant',grantBytes:codingBytes,grantInstanceNonce:'a'.repeat(64),updateId:null
|
|
36
|
+
});
|
|
30
37
|
const status = await codingSessionStatus(coding, farFuture);
|
|
31
38
|
assert.equal(status.armed, true);
|
|
32
39
|
assert.equal(status.reason, 'standing-grant');
|
|
@@ -37,13 +44,17 @@ test('autonomous standing grant remains armed until explicit revocation', async
|
|
|
37
44
|
const { root, coding } = await fixture();
|
|
38
45
|
const policyPath = path.join(root, 'autonomous.json');
|
|
39
46
|
await writeFile(policyPath, JSON.stringify({ schema:'deadbyte.autonomous-policy.v1', enabled:true,
|
|
40
|
-
lease_file:path.join(root,'autonomous-grant.json'), evidence_dir:path.join(root,'autonomous-evidence'),
|
|
47
|
+
lease_file:path.join(root,'runtime','autonomous-grant.json'), evidence_dir:path.join(root,'autonomous-evidence'),
|
|
41
48
|
coding_policy_sha256:coding.policy_sha256, root_ids:['project'], planner:{backend:'client_sampling'},
|
|
42
49
|
limits:{max_iterations:4,max_mutations:4,max_wall_ms:null}, profiles:{} }));
|
|
43
50
|
const policy = await loadAutonomousPolicy(policyPath, coding);
|
|
44
51
|
await writeFile(policy.lease_file, JSON.stringify({ schema:'deadbyte.autonomous-grant.v2',
|
|
45
52
|
policy_sha256:policy.policy_sha256, coding_policy_sha256:coding.policy_sha256,
|
|
46
53
|
instance_nonce:'b'.repeat(64), root_ids:['project'], granted_at_utc:'2026-09-04T00:00:00Z' }));
|
|
54
|
+
const autonomousBytes=await readFile(policy.lease_file);
|
|
55
|
+
await createAuthorityEpochStore({runtimeDir:path.dirname(policy.lease_file),policyBytes:await readFile(policy.policy_path)}).append({
|
|
56
|
+
plane:'autonomous',action:'grant',grantBytes:autonomousBytes,grantInstanceNonce:'b'.repeat(64),updateId:null
|
|
57
|
+
});
|
|
47
58
|
const status = await autonomousSessionStatus(policy, farFuture);
|
|
48
59
|
assert.equal(status.armed, true);
|
|
49
60
|
assert.equal(status.reason, 'standing-grant');
|
|
@@ -55,15 +66,20 @@ test('autonomous standing grant remains armed until explicit revocation', async
|
|
|
55
66
|
});
|
|
56
67
|
test('host standing grant remains armed until explicit revocation', async () => {
|
|
57
68
|
const root = await mkdtemp(path.join(os.tmpdir(), 'deadbyte-host-standing-'));
|
|
69
|
+
await prepareAuthorityTestTrust(root);
|
|
58
70
|
const project = path.join(root, 'project');
|
|
59
71
|
await mkdir(project);
|
|
60
72
|
const policyPath = path.join(root, 'host.json');
|
|
61
73
|
await writeFile(policyPath, JSON.stringify({ schema:'deadbyte.host-policy.v1', enabled:true,
|
|
62
|
-
arm_file:path.join(root,'host-grant.json'), roots:{ project:{path:project,read:true,write:true,exec:false} },
|
|
74
|
+
arm_file:path.join(root,'runtime','host-grant.json'), roots:{ project:{path:project,read:true,write:true,exec:false} },
|
|
63
75
|
commands:{} }));
|
|
64
76
|
const policy = await loadHostPolicy(policyPath);
|
|
65
77
|
await writeFile(policy.arm_file, JSON.stringify({ schema:'deadbyte.host-grant.v2',
|
|
66
78
|
policy_sha256:policy.policy_sha256, instance_nonce:'c'.repeat(64), granted_at_utc:'2026-09-04T00:00:00Z' }));
|
|
79
|
+
const hostBytes=await readFile(policy.arm_file);
|
|
80
|
+
await createAuthorityEpochStore({runtimeDir:path.dirname(policy.arm_file),policyBytes:await readFile(policy.policy_path)}).append({
|
|
81
|
+
plane:'host',action:'grant',grantBytes:hostBytes,grantInstanceNonce:'c'.repeat(64),updateId:null
|
|
82
|
+
});
|
|
67
83
|
const status = await assertHostArmed(policy, farFuture);
|
|
68
84
|
assert.equal(status.standing, true);
|
|
69
85
|
assert.equal(status.remaining_ms, null);
|