deadbyte-mcp 0.15.71 → 0.15.74

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 (82) hide show
  1. package/MANIFEST.SHA256 +81 -28
  2. package/PROVENANCE.json +56 -16
  3. package/README.txt +24 -18
  4. package/RELEASE.json +67 -18
  5. package/SBOM.cdx.json +14 -2
  6. package/TEST-MATRIX.json +44 -2
  7. package/bin/deadbyte-owner-token-r193.exe +0 -0
  8. package/bridge/package.json +1 -1
  9. package/controller/deadbyte-process-policy.json +4 -4
  10. package/docs/R184-package-lock.json +2 -2
  11. package/docs/R192-LIVE-LOG-HARDENING.txt +39 -0
  12. package/native/deadbyte-owner-token-r193.cpp +156 -0
  13. package/package.json +2 -2
  14. package/scripts/gate-windows-r193.ps1 +108 -0
  15. package/scripts/gate-windows-r194.ps1 +112 -0
  16. package/scripts/npm-interactive-r194.mjs +13 -0
  17. package/scripts/npm-publication-r65.mjs +64 -4
  18. package/scripts/npm-release-r48.mjs +58 -11
  19. package/scripts/npm-release-readiness-r193.mjs +80 -0
  20. package/scripts/npm-release-readiness-r194.mjs +80 -0
  21. package/scripts/r188-owner-uac-review.ps1 +91 -0
  22. package/scripts/r188-uac-review-preview.mjs +65 -0
  23. package/scripts/r192-focused.mjs +10 -0
  24. package/scripts/r192-release-tests.mjs +8 -0
  25. package/scripts/r193-compile-token.ps1 +22 -0
  26. package/scripts/r193-evidence-relocate.ps1 +12 -0
  27. package/scripts/r193-focused-gate.mjs +20 -0
  28. package/scripts/r193-import-r188-scripts.ps1 +14 -0
  29. package/scripts/r193-limited-subject-probe.ps1 +25 -0
  30. package/scripts/r193-migrate-runtime-limited.ps1 +103 -0
  31. package/scripts/r193-owner-keygen.mjs +43 -0
  32. package/scripts/r193-owner-request-live.mjs +50 -0
  33. package/scripts/r193-owner-uac-approve.ps1 +42 -0
  34. package/scripts/r193-owner-uac-broker.mjs +139 -0
  35. package/scripts/r193-owner-uac-enroll-and-approve.ps1 +62 -0
  36. package/scripts/r193-test-limited-token.ps1 +49 -0
  37. package/scripts/r193-toolchain-inventory.ps1 +7 -0
  38. package/scripts/r193-uac-bridge-focused.mjs +21 -0
  39. package/src/deadbyte-cli.mjs +2 -1
  40. package/src/r188-owner-uac.mjs +105 -0
  41. package/src/r188-uac-boundary.mjs +21 -0
  42. package/src/r193-live-owner-subject.mjs +110 -0
  43. package/src/r193-owner-secret-acl.mjs +67 -0
  44. package/src/r193-owner-uac-broker.mjs +85 -0
  45. package/src/r193-uac-r70-bridge.mjs +54 -0
  46. package/src/remote-live-log.mjs +22 -1
  47. package/src/version.mjs +1 -1
  48. package/test/process-policy-refresh.test.mjs +1 -1
  49. package/test/r130-release-security-contract.test.mjs +8 -8
  50. package/test/r132-release-identity.test.mjs +7 -7
  51. package/test/r153-prepublish-identity.test.mjs +1 -1
  52. package/test/r160-release-contract.test.mjs +3 -3
  53. package/test/r165-live-cli-skew.test.mjs +1 -1
  54. package/test/r167-release-contract.test.mjs +11 -11
  55. package/test/r168-release-contract.test.mjs +4 -2
  56. package/test/r172-release-contract.test.mjs +6 -6
  57. package/test/r173-release-contract.test.mjs +16 -16
  58. package/test/r179-release-contract.test.mjs +11 -11
  59. package/test/r188-owner-uac.test.mjs +48 -0
  60. package/test/r188-uac-boundary.test.mjs +42 -0
  61. package/test/r190-release-contract.test.mjs +10 -10
  62. package/test/r191-release-contract.test.mjs +12 -12
  63. package/test/r192-live-log-hardening.test.mjs +50 -0
  64. package/test/r192-release-identity.test.mjs +40 -0
  65. package/test/r193-limited-migration-contract.test.mjs +26 -0
  66. package/test/r193-live-owner-subject.test.mjs +61 -0
  67. package/test/r193-native-process-observer.test.mjs +36 -0
  68. package/test/r193-native-token.test.mjs +43 -0
  69. package/test/r193-owner-enrollment-entrypoint.test.mjs +38 -0
  70. package/test/r193-owner-secret-acl.test.mjs +23 -0
  71. package/test/r193-owner-uac-broker.test.mjs +82 -0
  72. package/test/r193-owner-uac-entrypoint.test.mjs +36 -0
  73. package/test/r193-release-identity.test.mjs +56 -0
  74. package/test/r193-release-readiness.test.mjs +87 -0
  75. package/test/r193-uac-r70-bridge.test.mjs +88 -0
  76. package/test/r193-windows-gate.test.mjs +30 -0
  77. package/test/r194-npm-auth-recovery.test.mjs +77 -0
  78. package/test/r194-npm-preauth.test.mjs +57 -0
  79. package/test/r194-release-identity.test.mjs +43 -0
  80. package/test/r194-release-readiness.test.mjs +87 -0
  81. package/test/r194-windows-gate.test.mjs +21 -0
  82. package/test/r59-tool-surface-compat.test.mjs +1 -1
@@ -0,0 +1,87 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import {createHash} from 'node:crypto';
4
+ import {spawnSync} from 'node:child_process';
5
+ import {mkdtemp,mkdir,readFile,rm,writeFile} from 'node:fs/promises';
6
+ import os from 'node:os';
7
+ import path from 'node:path';
8
+ import {fileURLToPath} from 'node:url';
9
+ import {assertR194NpmPublishReady,assertR194PackedIdentity} from '../scripts/npm-release-readiness-r194.mjs';
10
+
11
+ const sha256=value=>createHash('sha256').update(value).digest('hex');
12
+ const parent={
13
+ version:'0.15.72',train:'R192',release_id:'v0.15.72-0a5d9436e06e2d9e',
14
+ manifest_sha256:'0a5d9436e06e2d9e7cf9179417465955d8ca5ba88655b13dd019190243c1cc90',
15
+ generation_manifest_sha256:'aec7b998306a3bbbcc59088648e7bc46ca7e203d749d4550b5b5f372032f92b0'
16
+ };
17
+ const release={
18
+ version:'0.15.74',train:'R194',parent,
19
+ r194:{scope:'NPM_AUTH_RECOVERY_AND_OWNER_AUTHORIZATION',public_tool_delta:0,authority_scope_delta:0}
20
+ };
21
+
22
+ async function fixture(){
23
+ const base=await mkdtemp(path.join(os.tmpdir(),'deadbyte-r194-readiness-'));
24
+ const root=path.join(base,'development','candidate');
25
+ const evidence=path.join(base,'testing','r194-final-closure');
26
+ await mkdir(root,{recursive:true});await mkdir(evidence,{recursive:true});
27
+ const manifest=Buffer.from(`${'a'.repeat(64)} package.json\n`);
28
+ await writeFile(path.join(root,'MANIFEST.SHA256'),manifest);
29
+ const files={
30
+ 'protected-install-receipt.json':JSON.stringify({status:'PASS',package_version:'0.15.74',source_manifest_sha256:sha256(manifest),protected_manifest_sha256:sha256(manifest)}),
31
+ 'windows-focused.stdout.log':'# tests 61\n# suites 0\n# pass 60\n# fail 0\n# cancelled 0\n# skipped 1\nR194_STAGE_PASS=focused\n',
32
+ 'windows-full.stdout.log':'# tests 2187\n# suites 0\n# pass 2136\n# fail 0\n# cancelled 0\n# skipped 51\nR194_STAGE_PASS=full\n',
33
+ 'npm-verify.stdout.log':'Artifact isolation gate PASS\nVERIFIED_TARBALL {"filename":"deadbyte-mcp-0.15.74.tgz","bytes":123,"sha256":"'+ 'b'.repeat(64) +'","integrity":"sha512-test","shasum":"'+ 'c'.repeat(40) +'"}\nVERIFY-ONLY PIPELINE PASS\n'
34
+ };
35
+ for(const [name,content] of Object.entries(files))await writeFile(path.join(evidence,name),content);
36
+ const closure={schema:'deadbyte.r194-release-closure.v1',status:'RELEASE_READY',version:'0.15.74',train:'R194',
37
+ production_release_id:parent.release_id,production_manifest_sha256:parent.manifest_sha256,
38
+ production_generation_manifest_sha256:parent.generation_manifest_sha256,
39
+ manifest_sha256:sha256(manifest),compact_tools:43,full_tools:117,
40
+ owner_enrollment:'NOT_RUN',limited_runtime_migration:'NOT_RUN',production_activation:'NOT_RUN',
41
+ protected_receipt_sha256:sha256(files['protected-install-receipt.json']),
42
+ focused_stdout_sha256:sha256(files['windows-focused.stdout.log']),
43
+ full_stdout_sha256:sha256(files['windows-full.stdout.log']),
44
+ verify_stdout_sha256:sha256(files['npm-verify.stdout.log']),
45
+ tarball_sha256:'b'.repeat(64),tarball_integrity:'sha512-test',tarball_shasum:'c'.repeat(40)};
46
+ await writeFile(path.join(evidence,'closure.json'),JSON.stringify(closure));
47
+ return {base,root,evidence,closure,manifest};
48
+ }
49
+
50
+ test('R194 publication refuses absent external exact-byte closure',async()=>{
51
+ const f=await fixture();try{
52
+ await assert.rejects(assertR194NpmPublishReady(release,{root:f.root}),/PUBLISH_BLOCKED R194.*closure root absent/);
53
+ }finally{await rm(f.base,{recursive:true,force:true});}
54
+ });
55
+
56
+ test('R194 publication binds final manifest, protected gates, catalogs, and exact tarball',async()=>{
57
+ const f=await fixture();try{
58
+ const result=await assertR194NpmPublishReady(release,{root:f.root,closureRoot:f.evidence});
59
+ assert.equal(result.status,'R194_RELEASE_READY_EVIDENCE_BOUND');
60
+ assert.equal(result.tests,2187);assert.equal(result.passes,2136);assert.equal(result.skips,51);
61
+ assert.equal(result.tarball_sha256,'b'.repeat(64));
62
+ }finally{await rm(f.base,{recursive:true,force:true});}
63
+ });
64
+
65
+ test('R194 publication rejects final manifest drift and tampered gate evidence',async()=>{
66
+ const f=await fixture();try{
67
+ await writeFile(path.join(f.root,'MANIFEST.SHA256'),'changed');
68
+ await assert.rejects(assertR194NpmPublishReady(release,{root:f.root,closureRoot:f.evidence}),/PUBLISH_BLOCKED R194.*manifest drift/);
69
+ await writeFile(path.join(f.root,'MANIFEST.SHA256'),f.manifest);
70
+ await writeFile(path.join(f.evidence,'windows-full.stdout.log'),'tampered');
71
+ await assert.rejects(assertR194NpmPublishReady(release,{root:f.root,closureRoot:f.evidence}),/PUBLISH_BLOCKED R194.*evidence digest differs/);
72
+ }finally{await rm(f.base,{recursive:true,force:true});}
73
+ });
74
+
75
+ test('R194 publisher refuses a repacked artifact that differs from closure bytes',()=>{
76
+ assert.throws(()=>assertR194PackedIdentity({tarball_sha256:'a'.repeat(64),tarball_integrity:'sha512-expected',tarball_shasum:'b'.repeat(40),
77
+ observedSha256:'c'.repeat(64),observedIntegrity:'sha512-other',observedShasum:'d'.repeat(40)}),/PUBLISH_BLOCKED R194.*repacked tarball/);
78
+ });
79
+
80
+ test('canonical npm release entrypoint enforces R194 closure before registry or pack work',async()=>{
81
+ const root=fileURLToPath(new URL('..',import.meta.url));
82
+ const env={...process.env};delete env.DEADBYTE_R194_CLOSURE_ROOT;
83
+ const result=spawnSync(process.execPath,[path.join(root,'scripts','npm-release-r48.mjs'),'--publish-only'],{cwd:root,env,encoding:'utf8',windowsHide:true});
84
+ assert.notEqual(result.status,0);
85
+ assert.match(`${result.stdout}\n${result.stderr}`,/PUBLISH_BLOCKED R194.*closure root absent/);
86
+ assert.doesNotMatch(`${result.stdout}\n${result.stderr}`,/npm publish|Packing artifact/);
87
+ });
@@ -0,0 +1,21 @@
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=fileURLToPath(new URL('..',import.meta.url));
7
+ test('R194 prepublication Windows gate keeps parent pinned and current R194 identity',async()=>{
8
+ const [pkg,gate]=await Promise.all([
9
+ readFile(path.join(root,'package.json'),'utf8').then(JSON.parse),
10
+ readFile(path.join(root,'scripts/gate-windows-r194.ps1'),'utf8')]);
11
+ assert.equal(pkg.scripts['gate:windows'],
12
+ 'powershell -NoProfile -ExecutionPolicy Bypass -File scripts/gate-windows-r194.ps1 -Stage all');
13
+ assert.match(gate,/0\.15\.74/);assert.match(gate,/R194/);
14
+ assert.match(gate,/v0\.15\.72-0a5d9436e06e2d9e/);
15
+ assert.match(gate,/aec7b998306a3bbbcc59088648e7bc46ca7e203d749d4550b5b5f372032f92b0/);
16
+ assert.match(gate,/test\/r194-release-identity\.test\.mjs/);
17
+ assert.match(gate,/test\/r194-npm-auth-recovery\.test\.mjs/);
18
+ assert.match(gate,/test\/r193-owner-uac-broker\.test\.mjs/);
19
+ assert.doesNotMatch(gate,/arm(process|coding|autonomous|desktop|host)/i);
20
+ assert.doesNotMatch(gate,/deploy|activate|npm publish/i);
21
+ });
@@ -83,7 +83,7 @@ test('R72 compact baseline permits only R64 read offset and authorized coding-on
83
83
  assert.deepEqual(diff.added,[]);
84
84
  assert.deepEqual(diff.removed,[]);
85
85
  const packageVersion=JSON.parse(await readFile(path.join(repoRoot,'package.json'),'utf8')).version;
86
- if(['0.15.41','0.15.42','0.15.43','0.15.44','0.15.45','0.15.46','0.15.47','0.15.48','0.15.49','0.15.50','0.15.51','0.15.52','0.15.53','0.15.54','0.15.55','0.15.56','0.15.57','0.15.58','0.15.59','0.15.60','0.15.61','0.15.62','0.15.63','0.15.64','0.15.65','0.15.66','0.15.67','0.15.68','0.15.69','0.15.70','0.15.71'].includes(packageVersion)){
86
+ if(['0.15.41','0.15.42','0.15.43','0.15.44','0.15.45','0.15.46','0.15.47','0.15.48','0.15.49','0.15.50','0.15.51','0.15.52','0.15.53','0.15.54','0.15.55','0.15.56','0.15.57','0.15.58','0.15.59','0.15.60','0.15.61','0.15.62','0.15.63','0.15.64','0.15.65','0.15.66','0.15.67','0.15.68','0.15.69','0.15.70','0.15.71','0.15.72','0.15.73','0.15.74'].includes(packageVersion)){
87
87
  assert.deepEqual([...diff.schema_changed].sort(),['machine_fs','native_diff_preview']);
88
88
  assert.equal(diff.unchanged.length,41);
89
89
  const prior=baseline.tools.find(tool=>tool.name==='machine_fs');