deadbyte-mcp 0.15.70 → 0.15.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/MANIFEST.SHA256 +46 -27
  2. package/PROVENANCE.json +43 -6
  3. package/README.txt +19 -11
  4. package/RELEASE.json +53 -9
  5. package/SBOM.cdx.json +2 -2
  6. package/TEST-MATRIX.json +44 -2
  7. package/bridge/package.json +1 -1
  8. package/controller/deadbyte-process-policy.json +4 -4
  9. package/docs/R184-package-lock.json +109 -16
  10. package/package.json +1 -1
  11. package/scripts/deploy-r48.mjs +17 -4
  12. package/scripts/r191-acceptance-readonly.mjs +7 -0
  13. package/scripts/r191-existing-regression.mjs +5 -0
  14. package/scripts/r191-existing-stage-audit.mjs +21 -0
  15. package/scripts/r191-extended-security-gate.mjs +14 -0
  16. package/scripts/r191-focused-tests.mjs +3 -0
  17. package/scripts/r191-full-runner.mjs +18 -0
  18. package/scripts/r191-historical-release-regression.mjs +9 -0
  19. package/scripts/r191-live-claim-inspect.mjs +15 -0
  20. package/scripts/r191-npm-registry-readonly.mjs +14 -0
  21. package/scripts/r191-old-version-audit.mjs +12 -0
  22. package/scripts/r191-privilege-readonly.mjs +6 -0
  23. package/scripts/r191-process-policy-focused.mjs +1 -0
  24. package/scripts/r191-protected-failure-gate.mjs +3 -0
  25. package/scripts/r191-release-contract-runner.mjs +1 -0
  26. package/scripts/r191-unreached-focused.mjs +29 -0
  27. package/src/activation-lock-r65.mjs +9 -1
  28. package/src/deadbyte-cli.mjs +2 -1
  29. package/src/runtime-update.mjs +2 -2
  30. package/src/trusted-epoch-bootstrap-r158.mjs +8 -0
  31. package/src/version.mjs +1 -1
  32. package/test/process-policy-refresh.test.mjs +11 -1
  33. package/test/r130-release-security-contract.test.mjs +7 -7
  34. package/test/r132-release-identity.test.mjs +6 -6
  35. package/test/r153-prepublish-identity.test.mjs +1 -1
  36. package/test/r165-live-cli-skew.test.mjs +1 -1
  37. package/test/r167-release-contract.test.mjs +8 -8
  38. package/test/r172-release-contract.test.mjs +5 -5
  39. package/test/r173-release-contract.test.mjs +14 -14
  40. package/test/r179-release-contract.test.mjs +7 -7
  41. package/test/r190-foreground-cli.test.mjs +14 -4
  42. package/test/r190-release-contract.test.mjs +8 -8
  43. package/test/r191-epoch-root-selection.test.mjs +24 -0
  44. package/test/r191-epoch-source-claim.test.mjs +88 -0
  45. package/test/r191-inherited-epoch-preflight.test.mjs +65 -0
  46. package/test/r191-release-contract.test.mjs +31 -0
  47. package/test/r59-tool-surface-compat.test.mjs +1 -1
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "deadbyte-mcp",
3
- "version": "0.15.70",
3
+ "version": "0.15.71",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "deadbyte-mcp",
9
- "version": "0.15.70",
9
+ "version": "0.15.71",
10
10
  "bundleDependencies": [
11
11
  "@modelcontextprotocol/server",
12
12
  "@modelcontextprotocol/client",
@@ -76,22 +76,115 @@
76
76
  "version": "7.0.6",
77
77
  "inBundle": true,
78
78
  "license": "MIT",
79
- "dependencies": {"path-key":"^3.1.0","shebang-command":"^2.0.0","which":"^2.0.1"},
80
- "engines": {"node":">= 8"}
79
+ "dependencies": {
80
+ "path-key": "^3.1.0",
81
+ "shebang-command": "^2.0.0",
82
+ "which": "^2.0.1"
83
+ },
84
+ "engines": {
85
+ "node": ">= 8"
86
+ }
81
87
  },
82
88
  "node_modules/eventsource": {
83
- "version":"3.0.7","inBundle":true,"license":"MIT",
84
- "dependencies":{"eventsource-parser":"^3.0.1"},"engines":{"node":">=18.0.0"}
89
+ "version": "3.0.7",
90
+ "inBundle": true,
91
+ "license": "MIT",
92
+ "dependencies": {
93
+ "eventsource-parser": "^3.0.1"
94
+ },
95
+ "engines": {
96
+ "node": ">=18.0.0"
97
+ }
98
+ },
99
+ "node_modules/eventsource-parser": {
100
+ "version": "3.1.1",
101
+ "inBundle": true,
102
+ "license": "MIT",
103
+ "engines": {
104
+ "node": ">=18.0.0"
105
+ }
106
+ },
107
+ "node_modules/isexe": {
108
+ "version": "2.0.0",
109
+ "inBundle": true,
110
+ "license": "ISC"
111
+ },
112
+ "node_modules/jose": {
113
+ "version": "6.2.10",
114
+ "inBundle": true,
115
+ "license": "MIT",
116
+ "funding": {
117
+ "url": "https://github.com/sponsors/panva"
118
+ }
119
+ },
120
+ "node_modules/path-key": {
121
+ "version": "3.1.1",
122
+ "inBundle": true,
123
+ "license": "MIT",
124
+ "engines": {
125
+ "node": ">=8"
126
+ }
127
+ },
128
+ "node_modules/pkce-challenge": {
129
+ "version": "5.0.1",
130
+ "inBundle": true,
131
+ "license": "MIT",
132
+ "engines": {
133
+ "node": ">=16.20.0"
134
+ }
85
135
  },
86
- "node_modules/eventsource-parser": {"version":"3.1.1","inBundle":true,"license":"MIT","engines":{"node":">=18.0.0"}},
87
- "node_modules/isexe": {"version":"2.0.0","inBundle":true,"license":"ISC"},
88
- "node_modules/jose": {"version":"6.2.10","inBundle":true,"license":"MIT","funding":{"url":"https://github.com/sponsors/panva"}},
89
- "node_modules/path-key": {"version":"3.1.1","inBundle":true,"license":"MIT","engines":{"node":">=8"}},
90
- "node_modules/pkce-challenge": {"version":"5.0.1","inBundle":true,"license":"MIT","engines":{"node":">=16.20.0"}},
91
- "node_modules/shebang-command": {"version":"2.0.0","inBundle":true,"license":"MIT","dependencies":{"shebang-regex":"^3.0.0"},"engines":{"node":">=8"}},
92
- "node_modules/shebang-regex": {"version":"3.0.0","inBundle":true,"license":"MIT","engines":{"node":">=8"}},
93
- "node_modules/typescript": {"version":"5.9.3","inBundle":true,"license":"Apache-2.0","bin":{"tsc":"bin/tsc","tsserver":"bin/tsserver"},"engines":{"node":">=14.17"}},
94
- "node_modules/which": {"version":"2.0.2","inBundle":true,"license":"ISC","dependencies":{"isexe":"^2.0.0"},"bin":{"node-which":"bin/node-which"},"engines":{"node":">= 8"}},
95
- "node_modules/zod": {"version":"4.4.3","inBundle":true,"license":"MIT","funding":{"url":"https://github.com/sponsors/colinhacks"}}
136
+ "node_modules/shebang-command": {
137
+ "version": "2.0.0",
138
+ "inBundle": true,
139
+ "license": "MIT",
140
+ "dependencies": {
141
+ "shebang-regex": "^3.0.0"
142
+ },
143
+ "engines": {
144
+ "node": ">=8"
145
+ }
146
+ },
147
+ "node_modules/shebang-regex": {
148
+ "version": "3.0.0",
149
+ "inBundle": true,
150
+ "license": "MIT",
151
+ "engines": {
152
+ "node": ">=8"
153
+ }
154
+ },
155
+ "node_modules/typescript": {
156
+ "version": "5.9.3",
157
+ "inBundle": true,
158
+ "license": "Apache-2.0",
159
+ "bin": {
160
+ "tsc": "bin/tsc",
161
+ "tsserver": "bin/tsserver"
162
+ },
163
+ "engines": {
164
+ "node": ">=14.17"
165
+ }
166
+ },
167
+ "node_modules/which": {
168
+ "version": "2.0.2",
169
+ "inBundle": true,
170
+ "license": "ISC",
171
+ "dependencies": {
172
+ "isexe": "^2.0.0"
173
+ },
174
+ "bin": {
175
+ "node-which": "bin/node-which"
176
+ },
177
+ "engines": {
178
+ "node": ">= 8"
179
+ }
180
+ },
181
+ "node_modules/zod": {
182
+ "version": "4.4.3",
183
+ "inBundle": true,
184
+ "license": "MIT",
185
+ "funding": {
186
+ "url": "https://github.com/sponsors/colinhacks"
187
+ }
188
+ }
96
189
  }
97
190
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deadbyte-mcp",
3
- "version": "0.15.70",
3
+ "version": "0.15.71",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Authenticated MCP agentic runtime with signed skills, persistent model backends, identity-bound remote devices, durable job supervision, immutable release slots, and separately revocable machine authority.",
@@ -14,7 +14,7 @@ import {observeAuthorityEvidence} from '../src/activation-authority-proof-r75.mj
14
14
  import {proveLegacyOfflineScopeRepair} from '../src/legacy-offline-policy-proof-r146.mjs';
15
15
  import {claimWithOneTimeMigration,verifyNarrowedPolicyGeneration} from '../src/clean-activation-recovery-r153.mjs';
16
16
  import {verifyUacApproval,uacPointerSha256,protectedUacReceiptPath,requireTrustedUacInstallation} from '../src/uac-approval-contract-r153.mjs';
17
- import {inspectTrustedInstallation} from '../src/privileged-install-trust-r89.mjs';
17
+ import {inspectTrustedInstallation,privilegedEpochInstallFiles} from '../src/privileged-install-trust-r89.mjs';
18
18
  import {normalizeHostCommandPins,hostCommandPinArgs} from '../src/host-command-pins-r154.mjs';
19
19
  import {parseActivationPathFlags,assertTrustedActivationEntrypoint,appendActivationPathArgs} from '../src/activation-path-r167.mjs';
20
20
 
@@ -310,7 +310,7 @@ if(deployArgs.uacLegacyMigration){
310
310
  expiresAt:deployArgs.migrationExpiresAt
311
311
  });
312
312
  }
313
- let activationPaths=null,activationPathError=null;
313
+ let activationPaths=null,activationPathError=null,stageEpochRebind=false;
314
314
  if(preflight.authority_continuity==='EPOCH_NATIVE'){
315
315
  try{
316
316
  // Validate exact path identity before the ACL probe so an unrelated protected
@@ -329,12 +329,25 @@ if(preflight.authority_continuity==='EPOCH_NATIVE'){
329
329
  activationPathError=new Error('--authority-epoch-root is valid only for EPOCH_NATIVE activation');
330
330
  }else{
331
331
  activationPaths={authorityEpochRoot:null,developmentRoot:deployArgs.developmentRoot??root};
332
+ if(preflight.authority_continuity==='NOT_APPLICABLE'){
333
+ try{
334
+ const installed=await loadPowerShellDataFile(pointer.config_path);
335
+ if(installed.AuthorityEpochRoot){
336
+ stageEpochRebind=true;
337
+ // The successor stage itself must be OS ACL-protected. An inherited
338
+ // predecessor epoch root cannot attest different successor bytes.
339
+ await inspectTrustedInstallation(privilegedEpochInstallFiles(root,process.execPath));
340
+ }
341
+ }catch(error){activationPathError=error;}
342
+ }
332
343
  }
333
344
 
334
345
  if(deployArgs.preflight){
346
+ const protectedEntrypoint=preflight.authority_continuity==='EPOCH_NATIVE'||stageEpochRebind;
335
347
  console.log(JSON.stringify({...preflight,
336
- activation_entrypoint_state:activationPathError?'REJECTED':preflight.authority_continuity==='EPOCH_NATIVE'?'TRUSTED_READY':'NOT_APPLICABLE',
337
- protected_activation_entrypoint:preflight.authority_continuity==='EPOCH_NATIVE'?!activationPathError:null,
348
+ safe_to_activate:preflight.safe_to_activate&&!activationPathError,
349
+ activation_entrypoint_state:activationPathError?'REJECTED':protectedEntrypoint?'TRUSTED_READY':'NOT_APPLICABLE',
350
+ protected_activation_entrypoint:protectedEntrypoint?!activationPathError:null,
338
351
  activation_entrypoint_reason:activationPathError?String(activationPathError?.message??activationPathError).slice(0,256):null}));
339
352
  process.exit(0);
340
353
  }
@@ -0,0 +1,7 @@
1
+ import '../test/r191-epoch-source-claim.test.mjs';
2
+ import '../test/r191-epoch-root-selection.test.mjs';
3
+ import '../test/r191-inherited-epoch-preflight.test.mjs';
4
+ import '../test/r65-activation-lock-recovery.test.mjs';
5
+ import '../test/r65-activation-orchestration.test.mjs';
6
+ import '../test/r158-epoch-bootstrap.test.mjs';
7
+ import '../test/r167-activation-path.test.mjs';
@@ -0,0 +1,5 @@
1
+ import '../test/r65-activation-lock-recovery.test.mjs';
2
+ import '../test/r65-activation-orchestration.test.mjs';
3
+ import '../test/r158-epoch-bootstrap.test.mjs';
4
+ import '../test/r167-activation-path.test.mjs';
5
+ import '../test/r172-activation-recovery.test.mjs';
@@ -0,0 +1,21 @@
1
+ import {readFile,lstat} from 'node:fs/promises';
2
+ import {createHash} from 'node:crypto';
3
+ import path from 'node:path';
4
+ import {inspectTrustedInstallation,privilegedEpochInstallFiles} from '../src/privileged-install-trust-r89.mjs';
5
+ const stage='C:\\Program Files\\DEADBYTE-01570-REGISTRY-df15db35c7dd';
6
+ const expected='df15db35c7ddddd769650f5c86557159d10d99e9eef4dd232cae67faeb8ad6e3';
7
+ const sha=b=>createHash('sha256').update(b).digest('hex');
8
+ const info=await lstat(stage);if(!info.isDirectory()||info.isSymbolicLink())throw new Error('STAGE_DIRECTORY_INVALID');
9
+ const manifest=sha(await readFile(path.join(stage,'MANIFEST.SHA256')));
10
+ if(manifest!==expected)throw new Error('STAGE_HASH_DRIFT '+manifest);
11
+ console.log('R191_EXISTING_EXACT_STAGE_MANIFEST='+manifest);
12
+ try{
13
+ const trust=await inspectTrustedInstallation([...privilegedEpochInstallFiles(stage,process.execPath),
14
+ path.join(stage,'MANIFEST.SHA256'),path.join(stage,'scripts','deploy-r48.mjs'),
15
+ path.join(stage,'src','runtime-update.mjs'),path.join(stage,'src','trusted-epoch-bootstrap-r158.mjs')]);
16
+ if(!trust.trusted)throw new Error('R89_ACL_UNTRUSTED');
17
+ console.log('R191_EXACT_STAGE_R89_ACL=PASS');
18
+ }catch(e){
19
+ console.error('R191_EXACT_STAGE_R89_ACL=BLOCKED '+e.message);
20
+ process.exitCode=3;
21
+ }
@@ -0,0 +1,14 @@
1
+ import '../test/r65-activation-lock-recovery.test.mjs';
2
+ import '../test/r65-activation-preflight.test.mjs';
3
+ import '../test/r65-activation-orchestration.test.mjs';
4
+ import '../test/r65-deploy-preflight.test.mjs';
5
+ import '../test/r65-transaction-precondition.test.mjs';
6
+ import '../test/r153-r65-signed-precondition-recovery.test.mjs';
7
+ import '../test/r153-staging-leaf-acl.test.mjs';
8
+ import '../test/r153-uac-installed-manifest-contract.test.mjs';
9
+ import '../test/r167-activation-path.test.mjs';
10
+ import '../test/r168-protected-entrypoint.test.mjs';
11
+ import '../test/r190-foreground-owner-recovery.test.mjs';
12
+ import '../test/r191-epoch-root-selection.test.mjs';
13
+ import '../test/r191-epoch-source-claim.test.mjs';
14
+ import '../test/r191-inherited-epoch-preflight.test.mjs';
@@ -0,0 +1,3 @@
1
+ import '../test/r191-epoch-source-claim.test.mjs';
2
+ import '../test/r191-epoch-root-selection.test.mjs';
3
+ import '../test/r191-inherited-epoch-preflight.test.mjs';
@@ -0,0 +1,18 @@
1
+ import {readdir,mkdir,writeFile} from 'node:fs/promises';
2
+ import {spawnSync} from 'node:child_process';
3
+ import path from 'node:path';
4
+ import {fileURLToPath} from 'node:url';
5
+ const root=path.resolve(fileURLToPath(new URL('..',import.meta.url)));
6
+ const list=(await readdir(path.join(root,'test'))).filter(x=>x.endsWith('.test.mjs')&&!new Set(['full-max-catalog-r44.test.mjs','full-max-catalog-r45.test.mjs','full-max-catalog-r46.test.mjs']).has(x));
7
+ const output='D:\\Projects\\deadbyte-mcp\\testing\\r191\\R191-SOURCE-FULL-REGRESSION.txt';
8
+ await mkdir(path.dirname(output),{recursive:true});
9
+ console.log('FULL_SOURCE_REGRESSION_FILES='+list.length);
10
+ const started=Date.now();
11
+ const p=spawnSync(process.execPath,['--test','--test-concurrency=4',...list.map(x=>'test/'+x)],{cwd:root,shell:false,encoding:'utf8',windowsHide:true,maxBuffer:20*1024*1024,timeout:300000});
12
+ const stdout=p.stdout||'',stderr=p.stderr||'';
13
+ await writeFile(output,stdout+'\n===== STDERR =====\n'+stderr,'utf8');
14
+ const summary=stdout.split(/\r?\n/).filter(x=>/^(?:ℹ (?:tests|pass|fail|skipped|duration_ms)|✖ |﹣ |✔ R191)/.test(x));
15
+ console.log('RESULT_EXIT='+p.status+' SIGNAL='+p.signal+' ELAPSED_MS='+(Date.now()-started)+' ERROR='+(p.error?.message||'none'));
16
+ console.log('SUMMARY='+JSON.stringify(summary.slice(-100)));
17
+ console.log('TRANSCRIPT='+output);
18
+ if(p.status!==0)process.exitCode=1;
@@ -0,0 +1,9 @@
1
+ import '../test/r130-release-security-contract.test.mjs';
2
+ import '../test/r153-prepublish-identity.test.mjs';
3
+ import '../test/r165-live-cli-skew.test.mjs';
4
+ import '../test/r167-release-contract.test.mjs';
5
+ import '../test/r172-release-contract.test.mjs';
6
+ import '../test/r173-release-contract.test.mjs';
7
+ import '../test/r179-release-contract.test.mjs';
8
+ import '../test/r190-release-contract.test.mjs';
9
+ import '../test/release-version.test.mjs';
@@ -0,0 +1,15 @@
1
+ import os from 'node:os';
2
+ import path from 'node:path';
3
+ import {readFile} from 'node:fs/promises';
4
+ import {createActivationClaimManager} from '../src/activation-lock-r65.mjs';
5
+ const state=path.join(os.homedir(),'.deadbyte-mcp');
6
+ const pointer=JSON.parse(await readFile(path.join(state,'active-release.json'),'utf8'));
7
+ const manager=createActivationClaimManager({stateRoot:state});
8
+ const result=await manager.inspect();
9
+ console.log(JSON.stringify({state:'READ_ONLY_INSPECTION',active_release_id:pointer.release_id,
10
+ manifest_sha256:pointer.manifest_sha256,
11
+ claim_status:result.status,claim_operation_id:result.operation_id??null,
12
+ subject_sha256:result.subject_sha256??null,matched:result.matched??null,
13
+ foreign:result.foreign??null,unknown:result.unknown??null}));
14
+ if(pointer.release_id!=='v0.15.68-ff29dbb2fbb89862')process.exitCode=5;
15
+ if(result.status!=='RECONCILABLE')process.exitCode=6;
@@ -0,0 +1,14 @@
1
+ import https from 'node:https';
2
+ const read=url=>new Promise((resolve,reject)=>{
3
+ const req=https.get(url,{timeout:10000,headers:{'User-Agent':'deadbyte-r191-readonly-version-check'}},res=>{
4
+ let s='';res.on('data',b=>{if(s.length<40000)s+=b;});res.on('end',()=>resolve({status:res.statusCode,body:s}));});
5
+ req.on('timeout',()=>req.destroy(new Error('timeout')));req.on('error',reject);
6
+ });
7
+ for(const suffix of ['0.15.71','dist-tags']){
8
+ try{
9
+ const r=await read('https://registry.npmjs.org/deadbyte-mcp/'+suffix);
10
+ let v={status:r.status};
11
+ if(r.status===200){const p=JSON.parse(r.body);v=suffix==='dist-tags'?p:{name:p.name,version:p.version,tarball:p.dist?.tarball,integrity_present:Boolean(p.dist?.integrity)};}
12
+ console.log(JSON.stringify({target:suffix,...v}));
13
+ }catch(e){console.log(JSON.stringify({target:suffix,status:'NETWORK_UNVERIFIED',error:e.message}));}
14
+ }
@@ -0,0 +1,12 @@
1
+ import {readdir,readFile} from 'node:fs/promises';
2
+ import path from 'node:path';
3
+ import {fileURLToPath} from 'node:url';
4
+ const root=path.resolve(fileURLToPath(new URL('..',import.meta.url)));
5
+ const paths=await readdir(path.join(root,'test'));
6
+ let hits=0;
7
+ for(const f of paths.filter(x=>x.endsWith('.test.mjs'))){
8
+ const s=await readFile(path.join(root,'test',f),'utf8');
9
+ const n=s.split('0.15.70').length-1;
10
+ if(n){hits++;const a=s.split(String.fromCharCode(10)).filter(l=>l.includes('0.15.70'));console.log(f+': '+n+' occurrences; '+a.slice(0,3).map(x=>x.trim().slice(0,150)).join(' | '));}
11
+ }
12
+ console.log('MATCHED_FILES='+hits);
@@ -0,0 +1,6 @@
1
+ import {access,constants,stat} from 'node:fs/promises';
2
+ import os from 'node:os';
3
+ const programFiles='C:\\Program Files';
4
+ try{await access(programFiles,constants.W_OK);console.log('PROGRAM_FILES_WRITE_PROBE=ACCESS_ALLOWED')}catch(e){console.log('PROGRAM_FILES_WRITE_PROBE='+e.code);}
5
+ console.log('HOME='+os.homedir());
6
+ console.log('PROCESS_PLATFORM='+process.platform);
@@ -0,0 +1 @@
1
+ import '../test/process-policy-refresh.test.mjs';
@@ -0,0 +1,3 @@
1
+ import '../test/r166-hotfix-contract.test.mjs';
2
+ import '../test/r190-foreground-cli.test.mjs';
3
+ import '../test/r191-epoch-source-claim.test.mjs';
@@ -0,0 +1 @@
1
+ import '../test/r191-release-contract.test.mjs';
@@ -0,0 +1,29 @@
1
+ import {spawnSync} from 'node:child_process';
2
+ import {mkdtemp,mkdir,readFile} from 'node:fs/promises';
3
+ import {createPublicKey} from 'node:crypto';
4
+ import {fileURLToPath} from 'node:url';
5
+ import path from 'node:path';
6
+ import os from 'node:os';
7
+ const root=path.resolve(fileURLToPath(new URL('..',import.meta.url)));
8
+ const parentPublicKey=path.join(os.homedir(),'.deadbyte-mcp','trust','ed25519-public.pem');
9
+ const pubKey=createPublicKey(await readFile(parentPublicKey));
10
+ if(pubKey.asymmetricKeyType!=='ed25519')throw new Error('R43_PARENT_PUBLIC_KEY_NOT_ED25519');
11
+ const isolated=await mkdtemp(path.join(os.tmpdir(),'deadbyte-r191-unreached-'));
12
+ const scratch='D:\\Projects\\deadbyte-mcp\\testing\\r191\\cross-volume-focused';
13
+ if(path.parse(scratch).root.toLowerCase()===path.parse(os.tmpdir()).root.toLowerCase())throw new Error('R67_CROSS_VOLUME_NOT_DISTINCT');
14
+ await mkdir(scratch,{recursive:true});
15
+ const tests=[
16
+ 'test/r132-release-identity.test.mjs',
17
+ 'test/r59-tool-surface-compat.test.mjs',
18
+ 'test/production-docs.test.mjs',
19
+ 'test/r191-inherited-epoch-preflight.test.mjs',
20
+ 'test/r67-npm-cross-volume.test.mjs',
21
+ 'test/r43-parent.test.mjs'
22
+ ];
23
+ const r=spawnSync(process.execPath,['--test','--test-concurrency=1',...tests],{
24
+ cwd:root,env:{...process.env,DEADBYTE_STATE_ROOT:isolated,DEADBYTE_PARENT_VERIFY_KEY:parentPublicKey,DEADBYTE_TEST_CROSS_VOLUME_ROOT:scratch},
25
+ windowsHide:true,shell:false,encoding:'utf8',timeout:160000,maxBuffer:2000000});
26
+ console.log('FOCUSED_EXIT='+r.status+' ERROR='+(r.error?.message??'none'));
27
+ console.log((r.stdout??'').slice(-19000));
28
+ if(r.stderr)console.error(r.stderr.slice(-1400));
29
+ if(r.error||r.status!==0)process.exitCode=1;
@@ -115,7 +115,7 @@ async function isSafeSignedPreconditionReject(outcome,lock,stateRoot){
115
115
  body.result!=='PRECONDITION_REJECTED'||body.phase!=='initial'||
116
116
  body.attempted_pointer!==null||body.rollback?.attempted!==false||
117
117
  !Array.isArray(body.rollback?.errors)||body.rollback.errors.length!==0||
118
- !(/^(?:host command 'powershell_script' executable pin drift detected;|windows release gate package script invalid$)/.test(String(body.error?.message??'')))||
118
+ !(/^(?:host command 'powershell_script' executable pin drift detected;.*$|windows release gate package script invalid$|authority epoch exact release source hash mismatch: manifest\.sha256$)/.test(String(body.error?.message??'')))||
119
119
  !Number.isFinite(failedTime)||failedTime<lockTime||failedTime>observedTime||
120
120
  !samePointerIdentity(body.prior_pointer,current))return false;
121
121
  return true;
@@ -162,6 +162,14 @@ export function createActivationClaimManager({stateRoot}={}){
162
162
  }
163
163
 
164
164
  return Object.freeze({
165
+ async inspect(){
166
+ const claim=await readLock(lockPath);
167
+ if(!claim)return Object.freeze({status:'NO_CLAIM'});
168
+ const evidence=await findTerminalOutcome(updatesDir,claim,state);
169
+ const safe=evidence.matched&&!evidence.foreign&&!evidence.unknown;
170
+ return Object.freeze({status:safe?'RECONCILABLE':'UNRESOLVED',operation_id:claim.operation_id,
171
+ subject_sha256:claim.subject_sha256,matched:evidence.matched,foreign:evidence.foreign,unknown:evidence.unknown});
172
+ },
165
173
  async claim(subjectSha256){
166
174
  if(!HEX64.test(String(subjectSha256??'')))throw new Error('activation claim subject invalid');
167
175
  await mkdir(updatesDir,{recursive:true});
@@ -946,7 +946,7 @@ async function readR190Evidence(file){
946
946
  }catch(error){if(error?.code==='ENOENT')return null;throw error;}
947
947
  }
948
948
  async function runRemoteForegroundRecovery(expectedMarkerSha256){
949
- const ctx=await remoteContext();
949
+ // Reject writable/untrusted CLI bytes before reading controller state.
950
950
  const thisFile=fileURLToPath(import.meta.url);
951
951
  const protectedFiles=[process.execPath,thisFile,path.join(CURRENT_PACKAGE_ROOT,'MANIFEST.SHA256'),
952
952
  path.join(CURRENT_PACKAGE_ROOT,'src','foreground-owner-recovery-r190.mjs'),
@@ -961,6 +961,7 @@ async function runRemoteForegroundRecovery(expectedMarkerSha256){
961
961
  catch(error){throw new Error(`R190_PROTECTED_RECOVERY_REQUIRED: ${boundedSingleLine(error?.message||error,512)}`);}
962
962
  if(!installation.trusted)throw new Error('R190_PROTECTED_RECOVERY_REQUIRED: package ACL is not R89-trusted');
963
963
  await verifyPackageDecisionManifest({root:CURRENT_PACKAGE_ROOT,expectedVersion:DEADBYTE_VERSION});
964
+ const ctx=await remoteContext();
964
965
  const evidenceDir=path.join(ctx.root,'evidence','foreground-recovery-r190');
965
966
  const intentPath=path.join(evidenceDir,`${expectedMarkerSha256}.intent.json`);
966
967
  const terminalPath=path.join(evidenceDir,`${expectedMarkerSha256}.terminal.json`);
@@ -23,7 +23,7 @@ import {assertStageOwnedPath,assertStagingBootstrapInputs,assertStagingControlCo
23
23
  import { verifyProjectOwnerApproval } from './r70-owner-approval.mjs';
24
24
  import {windowsPowerShellEnvironment} from './windows-powershell-environment.mjs';
25
25
  import {verifyNarrowedPolicyGeneration} from './clean-activation-recovery-r153.mjs';
26
- import {parseProtectedEpochRoot,verifyTrustedEpochRelease} from './trusted-epoch-bootstrap-r158.mjs';
26
+ import {parseProtectedEpochRoot,selectActivationEpochRoot,verifyTrustedEpochRelease} from './trusted-epoch-bootstrap-r158.mjs';
27
27
 
28
28
  export {windowsPowerShellEnvironment};
29
29
 
@@ -1913,7 +1913,7 @@ export async function performSlotUpdate({stage,developmentRoot,expectedVersion,e
1913
1913
  workspace=await workspacePlan(control.workspaceRoot,state);launchers=await launcherPlan(state);
1914
1914
  // A protected installation is an explicit owner-provisioned candidate.
1915
1915
  // No discovery/fallback to writable npm roots and no automatic grant.
1916
- const requestedEpochRoot=authorityEpochRoot??control.config.AuthorityEpochRoot;
1916
+ const requestedEpochRoot=selectActivationEpochRoot({stageRoot,configuredEpochRoot:control.config.AuthorityEpochRoot,explicitEpochRoot:authorityEpochRoot});
1917
1917
  if(requestedEpochRoot){
1918
1918
  const proof=await verifyTrustedEpochRelease({
1919
1919
  epochRoot:requestedEpochRoot,releaseRoot:slot.release_root,
@@ -13,6 +13,14 @@ export function parseProtectedEpochRoot(input){
13
13
  throw new Error('authority epoch root may not be a drive root');
14
14
  return root;
15
15
  }
16
+ // An inherited protected root belongs to the predecessor. Successor bytes
17
+ // must be verified against their own exact, independently ACL-trusted stage.
18
+ export function selectActivationEpochRoot({stageRoot,configuredEpochRoot=null,explicitEpochRoot=null}={}){
19
+ if(explicitEpochRoot!==null)return parseProtectedEpochRoot(explicitEpochRoot);
20
+ if(!configuredEpochRoot)return null;
21
+ parseProtectedEpochRoot(configuredEpochRoot);
22
+ return parseProtectedEpochRoot(stageRoot);
23
+ }
16
24
  // This is a read-only proof, not installation or an authority grant.
17
25
  // Windows ACL verification must run against OS Get-Acl, never a staged snapshot.
18
26
  export async function verifyTrustedEpochRelease({epochRoot,releaseRoot,nodeExecutable}){
package/src/version.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export const DEADBYTE_VERSION = '0.15.70';
1
+ export const DEADBYTE_VERSION = '0.15.71';
2
2
  export const MCP_PROTOCOL_VERSION = '2026-07-28';
3
3
  export const RECEIPT_SCHEMA_V1 = 'deadbyte.receipt.v1';
4
4
  export const RECEIPT_SCHEMA_V2 = 'deadbyte.receipt.v2';
@@ -67,7 +67,17 @@ async function fixture() {
67
67
 
68
68
  test('R167 process policy binds coherently to the explicit development root', async () => {
69
69
  const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
70
- const expectedRoot = path.resolve(process.env.DEADBYTE_EXPECTED_DEVELOPMENT_ROOT || repoRoot);
70
+ // The distributed policy is pinned to its explicit development provenance,
71
+ // not to the physical extraction path of the exact immutable npm tarball.
72
+ const release = JSON.parse(await readFile(path.join(repoRoot, 'RELEASE.json'), 'utf8'));
73
+ const approvedRoot = release.r191_activation_repair?.development_policy_root;
74
+ assert.equal(typeof approvedRoot, 'string', 'R191 development policy root must be explicit in release metadata');
75
+ assert.ok(path.isAbsolute(approvedRoot), 'R191 development policy root must be absolute');
76
+ const expectedRoot = path.resolve(approvedRoot);
77
+ if (process.env.DEADBYTE_EXPECTED_DEVELOPMENT_ROOT) {
78
+ assert.equal(path.resolve(process.env.DEADBYTE_EXPECTED_DEVELOPMENT_ROOT), expectedRoot,
79
+ 'caller-supplied development root cannot override R191 release provenance');
80
+ }
71
81
  const policyPath = path.join(repoRoot, 'controller', 'deadbyte-process-policy.json');
72
82
  const policy = JSON.parse(await readFile(policyPath, 'utf8'));
73
83
  assert.equal(path.resolve(policy.roots.core.path), expectedRoot);
@@ -14,13 +14,13 @@ test('current successor retains the R130 security baseline with truthful R190 id
14
14
  read('SBOM.cdx.json'),readReleaseLock(root),read('TEST-MATRIX.json')]);
15
15
  assert.equal(pkg.name,'deadbyte-mcp');
16
16
  for(const actual of [pkg.version,release.version,provenance.version,matrix.version,bom.metadata.component.version,lock.version,lock.packages[''].version,DEADBYTE_VERSION])
17
- assert.equal(actual,'0.15.70');
18
- assert.equal(release.train,'R190');
19
- assert.equal(matrix.train,'R190');
20
- assert.equal(release.source_predecessor.version,'0.15.69');
21
- assert.equal(release.source_predecessor.train,'R179');
22
- assert.match(release.source_predecessor.source_path,/deadbyte-mcp-0\.15\.69\.tgz/i);
23
- assert.equal(release.source_predecessor.manifest_status,'PUBLISHED_PREVIEW_MANIFEST_VERIFIED_NOT_ACTIVE');
17
+ assert.equal(actual,'0.15.71');
18
+ assert.equal(release.train,'R191');
19
+ assert.equal(matrix.train,'R191');
20
+ assert.equal(release.source_predecessor.version,'0.15.70');
21
+ assert.equal(release.source_predecessor.train,'R190');
22
+ assert.match(release.source_predecessor.source_path,/deadbyte-mcp-0\.15\.70\.tgz/i);
23
+ assert.equal(release.source_predecessor.manifest_status,'PUBLISHED_EXACT_MANIFEST_VERIFIED_NOT_ACTIVE');
24
24
  assert.equal(release.runtime_predecessor.version,'0.15.68');
25
25
  assert.equal(provenance.r160.source_predecessor_manifest_status,'STALE_REJECTED');
26
26
  assert.equal(pkg.dependencies['@modelcontextprotocol/client'],'2.3.1');
@@ -16,15 +16,15 @@ test('R190 package identity preserves R132 evidence and published R179 source pr
16
16
  for(const value of [pkg.version,lock.version,lock.packages[''].version,release.version,prov.version,bom.metadata.component.version,matrix.version,DEADBYTE_VERSION]){
17
17
  assert.equal(value,pkg.version);
18
18
  }
19
- assert.equal(release.train,'R190');
20
- assert.equal(matrix.train,'R190');
21
- assert.equal(release.source_predecessor.version,'0.15.69');
22
- assert.equal(release.source_predecessor.train,'R179');
23
- assert.match(release.source_predecessor.source_path,/deadbyte-mcp-0\.15\.69\.tgz/i);
19
+ assert.equal(release.train,'R191');
20
+ assert.equal(matrix.train,'R191');
21
+ assert.equal(release.source_predecessor.version,'0.15.70');
22
+ assert.equal(release.source_predecessor.train,'R190');
23
+ assert.match(release.source_predecessor.source_path,/deadbyte-mcp-0\.15\.70\.tgz/i);
24
24
  assert.equal(prov.r160.source_predecessor_manifest_status,'STALE_REJECTED');
25
25
  assert.equal(release.r165.published_source_manifest_sha256,'4adf7d94682fbb71c4a91eb3147ecc48076bbc5d79cb67fcb875cde6a1bb4805');
26
26
  assert.equal(release.r165.published_source_tarball_sha256,'812e97609b7c51353ed25f2202129737e43bb4fbe0778c3adec43ec065352641');
27
- assert.equal(release.source_predecessor.tarball_sha256,'578c1630608f9df816524c78abc9e1a55357fdc3cd25e142122f1a823e1d69e3');
27
+ assert.equal(release.source_predecessor.tarball_sha256,'1a5f5f30bf4781ed951d6d201b8a972d088b2091555d7f4cc2e2bb899ed5707e');
28
28
  assert.notEqual(release.r179.source_predecessor_tarball_sha256,release.source_predecessor.tarball_sha256);
29
29
  assert.equal(release.runtime_predecessor.version,'0.15.68');
30
30
  assert.equal(prov.runtime_predecessor.release_id,release.runtime_predecessor.release_id);
@@ -26,7 +26,7 @@ test('R153 historical verifier refuses current successor package identity',async
26
26
  const state={pkg:JSON.parse(await readFile(path.join(root,'package.json'),'utf8')),
27
27
  release:JSON.parse(await readFile(path.join(root,'RELEASE.json'),'utf8')),
28
28
  bridge:JSON.parse(await readFile(path.join(root,'bridge/package.json'),'utf8'))};
29
- assert.equal(state.pkg.version,'0.15.70');
29
+ assert.equal(state.pkg.version,'0.15.71');
30
30
  assert.throws(()=>verifyR153Lineage(state),/package version/);
31
31
  await assert.rejects(verifyR153IdentityTree(root),/package version/);
32
32
  });
@@ -17,7 +17,7 @@ const hashMarker=c=>c.repeat(64);
17
17
  async function fixture(t,kind){
18
18
  assert.equal(typeof envRoot,'string'); assert.ok(path.isAbsolute(envRoot));
19
19
  assert.match(sha(await readFile(path.join(envRoot,'MANIFEST.SHA256'))),/^[0-9a-f]{64}$/);
20
- assert.equal(JSON.parse(await readFile(path.join(envRoot,'package.json'),'utf8')).version,'0.15.70');
20
+ assert.equal(JSON.parse(await readFile(path.join(envRoot,'package.json'),'utf8')).version,'0.15.71');
21
21
  const dir=await mkdtemp(path.join(os.tmpdir(),'deadbyte-r164-skew-e2e-'));
22
22
  t.after(async()=>{await rm(dir,{recursive:true,force:true,maxRetries:10,retryDelay:150});});
23
23
  const state=path.join(dir,'state'),bin=path.join(state,'bin');
@@ -8,7 +8,7 @@ import {DEADBYTE_VERSION} from '../src/version.mjs';
8
8
  const root=path.resolve(fileURLToPath(new URL('..',import.meta.url)));
9
9
  const read=async rel=>JSON.parse(await readFile(path.join(root,rel),'utf8'));
10
10
  const readOptional=async rel=>{try{return await read(rel);}catch(error){if(error?.code==='ENOENT')return null;throw error;}};
11
- const VERSION='0.15.70';
11
+ const VERSION='0.15.71';
12
12
  const R166_MANIFEST='ad3c091fbbe2bac6d234548724008b67305fd483ad6542f92d5aeb1aa84f5849';
13
13
  const R166_TARBALL='3d22412c3cebabd66bfa92ca4dbaaf3ef49acba7f92436a16485d7e4cb18c653';
14
14
 
@@ -20,20 +20,20 @@ test('current package identity retains the immutable R167/R173 activation lineag
20
20
  provenance.version,matrix.version,bom.metadata.component.version,DEADBYTE_VERSION];
21
21
  if(lock)versions.push(lock.version,lock.packages[''].version);
22
22
  for(const version of versions)assert.equal(version,VERSION);
23
- assert.equal(release.train,'R190');
24
- assert.equal(matrix.train,'R190');
25
- assert.equal(bom.serialNumber,'urn:cdx:deadbyte-mcp:r190:0.15.70');
23
+ assert.equal(release.train,'R191');
24
+ assert.equal(matrix.train,'R191');
25
+ assert.equal(bom.serialNumber,'urn:cdx:deadbyte-mcp:r191:0.15.71');
26
26
  assert.deepEqual(release.runtime_predecessor,{
27
27
  version:'0.15.68',release_id:'v0.15.68-ff29dbb2fbb89862',
28
28
  manifest_sha256:'ff29dbb2fbb898625592afb47835a4a62ef289429f1e0a89a83242398cd98885',
29
29
  generation_manifest_sha256:'2887d4a8d54ea6fc6b28869072f72491c892dfe28178b3537936dce958147bd2'
30
30
  });
31
- assert.equal(release.source_predecessor.version,'0.15.69');
32
- assert.equal(release.source_predecessor.train,'R179');
33
- assert.equal(release.source_predecessor.tarball_sha256,'578c1630608f9df816524c78abc9e1a55357fdc3cd25e142122f1a823e1d69e3');
31
+ assert.equal(release.source_predecessor.version,'0.15.70');
32
+ assert.equal(release.source_predecessor.train,'R190');
33
+ assert.equal(release.source_predecessor.tarball_sha256,'1a5f5f30bf4781ed951d6d201b8a972d088b2091555d7f4cc2e2bb899ed5707e');
34
34
  assert.equal(release.r173.source_predecessor_version,'0.15.67');
35
35
  assert.equal(release.r167.source_predecessor_manifest_sha256,R166_MANIFEST);
36
- assert.equal(provenance.source_predecessor_manifest_file_sha256,'cfede112761da00e73b626cfbce23d17e1d4b6e3a325bb675415196d31142ba0');
36
+ assert.equal(provenance.source_predecessor_manifest_file_sha256,'df15db35c7ddddd769650f5c86557159d10d99e9eef4dd232cae67faeb8ad6e3');
37
37
  assert.equal(provenance.r173.source_predecessor_manifest_sha256,'4fd7bfc76b1de6401c142b607cc84e847434b28c888bc99ceb09c9e8e5adc8f8');
38
38
  assert.equal(release.r172.source_predecessor_manifest_sha256,'962e227dace247d59aa860211388fbde461c5f9c8a7e8a878e34a14a27d355f8');
39
39
  assert.equal(release.r172.source_predecessor_tarball_sha256,'31b194a4fbff7dbdb9f4f275b4ea49c5115f7b0bb2241c0c72d72ef690311a5d');
@@ -16,11 +16,11 @@ test('R190 binds the published source predecessor separately from the active run
16
16
  const versions=[pkg.version,bridge.version,release.version,provenance.version,matrix.version,
17
17
  bom.metadata.component.version,DEADBYTE_VERSION];
18
18
  if(lock)versions.push(lock.version,lock.packages[''].version);
19
- for(const value of versions)assert.equal(value,'0.15.70');
20
- assert.equal(release.train,'R190'); assert.equal(matrix.train,'R190');
21
- assert.equal(release.source_predecessor.version,'0.15.69');
22
- assert.equal(release.source_predecessor.manifest_sha256,'cfede112761da00e73b626cfbce23d17e1d4b6e3a325bb675415196d31142ba0');
23
- assert.equal(release.source_predecessor.tarball_sha256,'578c1630608f9df816524c78abc9e1a55357fdc3cd25e142122f1a823e1d69e3');
19
+ for(const value of versions)assert.equal(value,'0.15.71');
20
+ assert.equal(release.train,'R191'); assert.equal(matrix.train,'R191');
21
+ assert.equal(release.source_predecessor.version,'0.15.70');
22
+ assert.equal(release.source_predecessor.manifest_sha256,'df15db35c7ddddd769650f5c86557159d10d99e9eef4dd232cae67faeb8ad6e3');
23
+ assert.equal(release.source_predecessor.tarball_sha256,'1a5f5f30bf4781ed951d6d201b8a972d088b2091555d7f4cc2e2bb899ed5707e');
24
24
  assert.equal(release.runtime_predecessor.release_id,'v0.15.68-ff29dbb2fbb89862');
25
25
  assert.equal(release.r173.public_tool_delta,0); assert.equal(release.r173.authority_scope_delta,0);
26
26
  });