deadbyte-mcp 0.15.72 → 0.15.75

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 (144) hide show
  1. package/MANIFEST.SHA256 +143 -35
  2. package/PROVENANCE.json +47 -21
  3. package/README.txt +29 -18
  4. package/RELEASE.json +85 -18
  5. package/SBOM.cdx.json +14 -2
  6. package/TEST-MATRIX.json +50 -2
  7. package/bin/deadbyte-desktop-uia-r199-fixed.exe +0 -0
  8. package/bin/deadbyte-desktop-uia-r199-fixed.obj +0 -0
  9. package/bin/deadbyte-desktop-uia-r199.exe +0 -0
  10. package/bin/deadbyte-desktop-uia-r199.obj +0 -0
  11. package/bin/deadbyte-fs-read-r197-fixed.exe +0 -0
  12. package/bin/deadbyte-fs-read-r198.exe +0 -0
  13. package/bin/deadbyte-fs-read-r198.obj +0 -0
  14. package/bin/deadbyte-owner-token-r193.exe +0 -0
  15. package/bin/deadbyte-root-relative-probe-r197.exe +0 -0
  16. package/bridge/package.json +1 -1
  17. package/controller/deadbyte-process-policy.json +4 -4
  18. package/docs/R184-package-lock.json +2 -8
  19. package/native/deadbyte-desktop-uia-r199.cpp +345 -0
  20. package/native/deadbyte-fs-read-r197.cpp +174 -0
  21. package/native/deadbyte-fs-read-r198.cpp +181 -0
  22. package/native/deadbyte-owner-token-r193.cpp +156 -0
  23. package/native/deadbyte-root-relative-probe-r197.cpp +97 -0
  24. package/package.json +4 -2
  25. package/scripts/build-native-desktop-uia-r199-fixed.ps1 +28 -0
  26. package/scripts/build-native-desktop-uia-r199.ps1 +28 -0
  27. package/scripts/build-native-fs-read-r197-fixed.ps1 +28 -0
  28. package/scripts/build-native-fs-read-r197.ps1 +28 -0
  29. package/scripts/build-native-fs-read-r198.ps1 +28 -0
  30. package/scripts/build-native-root-probe-r197.ps1 +28 -0
  31. package/scripts/gate-windows-r193.ps1 +108 -0
  32. package/scripts/gate-windows-r194.ps1 +112 -0
  33. package/scripts/gate-windows-r195.ps1 +114 -0
  34. package/scripts/gate-windows-r206.ps1 +116 -0
  35. package/scripts/init-desktop-policy-r199.ps1 +85 -0
  36. package/scripts/npm-interactive-r194.mjs +13 -0
  37. package/scripts/npm-publication-r65.mjs +64 -4
  38. package/scripts/npm-release-r48.mjs +75 -11
  39. package/scripts/npm-release-readiness-r193.mjs +80 -0
  40. package/scripts/npm-release-readiness-r194.mjs +80 -0
  41. package/scripts/npm-release-readiness-r195.mjs +72 -0
  42. package/scripts/npm-release-readiness-r206.mjs +76 -0
  43. package/scripts/r188-owner-uac-review.ps1 +91 -0
  44. package/scripts/r188-uac-review-preview.mjs +65 -0
  45. package/scripts/r193-compile-token.ps1 +22 -0
  46. package/scripts/r193-evidence-relocate.ps1 +12 -0
  47. package/scripts/r193-focused-gate.mjs +20 -0
  48. package/scripts/r193-import-r188-scripts.ps1 +14 -0
  49. package/scripts/r193-limited-subject-probe.ps1 +25 -0
  50. package/scripts/r193-migrate-runtime-limited.ps1 +103 -0
  51. package/scripts/r193-owner-keygen.mjs +43 -0
  52. package/scripts/r193-owner-request-live.mjs +49 -0
  53. package/scripts/r193-owner-uac-approve.ps1 +42 -0
  54. package/scripts/r193-owner-uac-broker.mjs +139 -0
  55. package/scripts/r193-owner-uac-enroll-and-approve.ps1 +62 -0
  56. package/scripts/r193-test-limited-token.ps1 +49 -0
  57. package/scripts/r193-toolchain-inventory.ps1 +7 -0
  58. package/scripts/r193-uac-bridge-focused.mjs +21 -0
  59. package/scripts/r205-candidate-selection.mjs +22 -0
  60. package/src/candidate-selection-evidence-r206.mjs +71 -0
  61. package/src/candidate-selection-r205.mjs +96 -0
  62. package/src/desktop-postcondition-r196.mjs +30 -0
  63. package/src/desktop-runtime-r40.mjs +44 -7
  64. package/src/desktop-uia-identity-r199.mjs +51 -0
  65. package/src/desktop-uia-r40.mjs +9 -1
  66. package/src/machine-fs-handle-read-r196.mjs +43 -0
  67. package/src/machine-fs-native-read-r197.mjs +73 -0
  68. package/src/machine-fs-native-read-r198.mjs +76 -0
  69. package/src/machine-fs-read-worker.mjs +5 -25
  70. package/src/machine-fs.mjs +31 -16
  71. package/src/r188-owner-uac.mjs +105 -0
  72. package/src/r188-uac-boundary.mjs +21 -0
  73. package/src/r193-live-owner-subject.mjs +110 -0
  74. package/src/r193-owner-secret-acl.mjs +67 -0
  75. package/src/r193-owner-uac-broker.mjs +85 -0
  76. package/src/r193-uac-r70-bridge.mjs +54 -0
  77. package/src/r195-canonical-owner-observation.mjs +15 -0
  78. package/src/remote-destination-journal-r202.mjs +120 -0
  79. package/src/remote-device-r44.mjs +89 -14
  80. package/src/remote-payload-boundary-r201.mjs +71 -0
  81. package/src/remote-terminal-evidence-r200.mjs +60 -0
  82. package/src/version.mjs +1 -1
  83. package/test/desktop-runtime-r40.test.mjs +111 -0
  84. package/test/desktop-uia-r40.test.mjs +15 -0
  85. package/test/fixtures/r197-junction-swap-worker.mjs +21 -0
  86. package/test/fixtures/r203-journal-writer.mjs +6 -0
  87. package/test/process-policy-refresh.test.mjs +4 -4
  88. package/test/r130-release-security-contract.test.mjs +8 -8
  89. package/test/r132-release-identity.test.mjs +7 -7
  90. package/test/r153-prepublish-identity.test.mjs +1 -1
  91. package/test/r160-release-contract.test.mjs +3 -3
  92. package/test/r165-live-cli-skew.test.mjs +1 -1
  93. package/test/r167-release-contract.test.mjs +11 -11
  94. package/test/r168-release-contract.test.mjs +4 -4
  95. package/test/r172-release-contract.test.mjs +6 -6
  96. package/test/r173-release-contract.test.mjs +16 -16
  97. package/test/r179-release-contract.test.mjs +12 -12
  98. package/test/r188-owner-uac.test.mjs +48 -0
  99. package/test/r188-uac-boundary.test.mjs +42 -0
  100. package/test/r190-release-contract.test.mjs +10 -10
  101. package/test/r191-release-contract.test.mjs +12 -12
  102. package/test/r192-release-identity.test.mjs +10 -10
  103. package/test/r193-limited-migration-contract.test.mjs +26 -0
  104. package/test/r193-live-owner-subject.test.mjs +61 -0
  105. package/test/r193-native-process-observer.test.mjs +36 -0
  106. package/test/r193-native-token.test.mjs +43 -0
  107. package/test/r193-owner-enrollment-entrypoint.test.mjs +38 -0
  108. package/test/r193-owner-secret-acl.test.mjs +23 -0
  109. package/test/r193-owner-uac-broker.test.mjs +82 -0
  110. package/test/r193-owner-uac-entrypoint.test.mjs +36 -0
  111. package/test/r193-release-identity.test.mjs +58 -0
  112. package/test/r193-release-readiness.test.mjs +87 -0
  113. package/test/r193-uac-r70-bridge.test.mjs +88 -0
  114. package/test/r193-windows-gate.test.mjs +30 -0
  115. package/test/r194-npm-auth-recovery.test.mjs +77 -0
  116. package/test/r194-npm-preauth.test.mjs +57 -0
  117. package/test/r194-release-identity.test.mjs +47 -0
  118. package/test/r194-release-readiness.test.mjs +87 -0
  119. package/test/r194-windows-gate.test.mjs +22 -0
  120. package/test/r195-canonical-owner-observation.test.mjs +32 -0
  121. package/test/r195-release-readiness.test.mjs +22 -0
  122. package/test/r196-desktop-postcondition.test.mjs +53 -0
  123. package/test/r196-handle-bound-read.test.mjs +99 -0
  124. package/test/r196-remote-outcome.test.mjs +94 -0
  125. package/test/r197-namespace-race.test.mjs +41 -0
  126. package/test/r197-native-dispatch-race.test.mjs +49 -0
  127. package/test/r197-native-file-read.test.mjs +60 -0
  128. package/test/r197-native-root-open.test.mjs +61 -0
  129. package/test/r198-root-identity.test.mjs +88 -0
  130. package/test/r199-native-uia-worker.test.mjs +28 -0
  131. package/test/r199-uia-identity.test.mjs +43 -0
  132. package/test/r200-remote-reconcile.test.mjs +106 -0
  133. package/test/r201-payload-boundary.test.mjs +78 -0
  134. package/test/r201-payload-fuzz.test.mjs +37 -0
  135. package/test/r201-tool-boundary-fuzz.test.mjs +120 -0
  136. package/test/r202-destination-journal.test.mjs +92 -0
  137. package/test/r203-atomic-journal.test.mjs +86 -0
  138. package/test/r205-candidate-selection-cli.test.mjs +31 -0
  139. package/test/r205-candidate-selection.test.mjs +83 -0
  140. package/test/r206-candidate-evidence.test.mjs +64 -0
  141. package/test/r206-release-contract.test.mjs +42 -0
  142. package/test/r206-release-readiness.test.mjs +23 -0
  143. package/test/r59-tool-surface-compat.test.mjs +1 -1
  144. package/test/r64-machine-fs-large-read.test.mjs +26 -12
@@ -14,14 +14,14 @@ 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.72');
18
- assert.equal(release.train,'R192');
19
- assert.equal(matrix.train,'R192');
20
- assert.equal(release.source_predecessor.version,'0.15.71');
21
- assert.equal(release.source_predecessor.train,'R191');
22
- assert.match(release.source_predecessor.source_path,/deadbyte-mcp-0\.15\.71\.tgz/i);
23
- assert.equal(release.source_predecessor.manifest_status,'PUBLISHED_EXACT_MANIFEST_VERIFIED_ACTIVE_PRODUCTION');
24
- assert.equal(release.runtime_predecessor.version,'0.15.71');
17
+ assert.equal(actual,'0.15.75');
18
+ assert.equal(release.train,'R206');
19
+ assert.equal(matrix.train,'R206');
20
+ assert.equal(release.source_predecessor.version,'0.15.75');
21
+ assert.equal(release.source_predecessor.train,'R205');
22
+ assert.match(release.source_predecessor.source_path,/r205-evidence-selection-dev/i);
23
+ assert.equal(release.source_predecessor.manifest_status,'R205_MANIFEST_VERIFIED');
24
+ assert.equal(release.runtime_predecessor.version,'0.15.74');
25
25
  assert.equal(provenance.r160.source_predecessor_manifest_status,'STALE_REJECTED');
26
26
  assert.equal(pkg.dependencies['@modelcontextprotocol/client'],'2.3.1');
27
27
  assert.equal(pkg.dependencies['@modelcontextprotocol/server'],'2.3.1');
@@ -16,17 +16,17 @@ 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,'R192');
20
- assert.equal(matrix.train,'R192');
21
- assert.equal(release.source_predecessor.version,'0.15.71');
22
- assert.equal(release.source_predecessor.train,'R191');
23
- assert.match(release.source_predecessor.source_path,/deadbyte-mcp-0\.15\.71\.tgz/i);
19
+ assert.equal(release.train,'R206');
20
+ assert.equal(matrix.train,'R206');
21
+ assert.equal(release.source_predecessor.version,'0.15.75');
22
+ assert.equal(release.source_predecessor.train,'R205');
23
+ assert.match(release.source_predecessor.source_path,/r205-evidence-selection-dev/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,'20ed3b20e72b4e4226736a1e432b05b851e9fa265e9bc2966b74f266477b7e27');
27
+ assert.equal(release.source_predecessor.tarball_sha256,null);
28
28
  assert.notEqual(release.r179.source_predecessor_tarball_sha256,release.source_predecessor.tarball_sha256);
29
- assert.equal(release.runtime_predecessor.version,'0.15.71');
29
+ assert.equal(release.runtime_predecessor.version,'0.15.74');
30
30
  assert.equal(prov.runtime_predecessor.release_id,release.runtime_predecessor.release_id);
31
31
  assert.equal(prov.runtime_predecessor.manifest_sha256,release.runtime_predecessor.manifest_sha256);
32
32
  assert.equal(prov.runtime_predecessor.generation_manifest_sha256,release.runtime_predecessor.generation_manifest_sha256);
@@ -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.72');
29
+ assert.equal(state.pkg.version,'0.15.75');
30
30
  assert.throws(()=>verifyR153Lineage(state),/package version/);
31
31
  await assert.rejects(verifyR153IdentityTree(root),/package version/);
32
32
  });
@@ -8,9 +8,9 @@ const read=async rel=>JSON.parse(await readFile(path.join(root,rel),'utf8'));
8
8
 
9
9
  test('R160 historical contract remains distinct from the current package identity',async()=>{
10
10
  const [release,provenance]=await Promise.all([read('RELEASE.json'),read('PROVENANCE.json')]);
11
- assert.equal(release.runtime_predecessor.version,'0.15.71');
12
- assert.equal(release.runtime_predecessor.release_id,'v0.15.71-1818abc327478a96');
13
- assert.equal(release.runtime_predecessor.manifest_sha256,'1818abc327478a96d935c200e25aad8515f15edc1842845b73bd0de57606da8c');
11
+ assert.equal(release.runtime_predecessor.version,'0.15.74');
12
+ assert.equal(release.runtime_predecessor.release_id,'v0.15.74-e84bf4eed16e9443');
13
+ assert.equal(release.runtime_predecessor.manifest_sha256,'e84bf4eed16e9443fbd0bf9f0f562e26b01db778647aefcc8b12fd7f48636b47');
14
14
  assert.equal(release.r160.runtime_predecessor_version,'0.15.61');
15
15
  assert.equal(release.r160.source_predecessor_train,'R159');
16
16
  assert.equal(release.r160.public_tool_delta,0);
@@ -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.72');
20
+ assert.equal(JSON.parse(await readFile(path.join(envRoot,'package.json'),'utf8')).version,'0.15.75');
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.72';
11
+ const VERSION='0.15.75';
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,'R192');
24
- assert.equal(matrix.train,'R192');
25
- assert.equal(bom.serialNumber,'urn:cdx:deadbyte-mcp:r192:0.15.72');
23
+ assert.equal(release.train,'R206');
24
+ assert.equal(matrix.train,'R206');
25
+ assert.equal(bom.serialNumber,'urn:cdx:deadbyte-mcp:r206:0.15.75');
26
26
  assert.deepEqual(release.runtime_predecessor,{
27
- version:'0.15.71',release_id:'v0.15.71-1818abc327478a96',
28
- manifest_sha256:'1818abc327478a96d935c200e25aad8515f15edc1842845b73bd0de57606da8c',
29
- generation_manifest_sha256:'aef437280102171a9b68da754fca16a03202104db7d5c420751624580ad6fadc'
27
+ version:'0.15.74',release_id:'v0.15.74-e84bf4eed16e9443',
28
+ manifest_sha256:'e84bf4eed16e9443fbd0bf9f0f562e26b01db778647aefcc8b12fd7f48636b47',
29
+ generation_manifest_sha256:'598f896be9ce65e6b0c618e8c8f6eaa2a9d91617a76a146bf3deb385a56d19e7'
30
30
  });
31
- assert.equal(release.source_predecessor.version,'0.15.71');
32
- assert.equal(release.source_predecessor.train,'R191');
33
- assert.equal(release.source_predecessor.tarball_sha256,'20ed3b20e72b4e4226736a1e432b05b851e9fa265e9bc2966b74f266477b7e27');
31
+ assert.equal(release.source_predecessor.version,'0.15.75');
32
+ assert.equal(release.source_predecessor.train,'R205');
33
+ assert.equal(release.source_predecessor.tarball_sha256,null);
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,'1818abc327478a96d935c200e25aad8515f15edc1842845b73bd0de57606da8c');
36
+ assert.equal(provenance.source_predecessor_manifest_file_sha256,'166eebde18d53a9ec46f738383c289733f9cd37918b3572b7515d1ab9b122c92');
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');
@@ -13,10 +13,10 @@ const predecessorTarball='fc3ae5b1505e316bc9dfedf8d063cb00641754c8f5f1306a31f8cc
13
13
 
14
14
  test('R172 preserves the immutable R168 publication lineage separately from current identity',async()=>{
15
15
  const release=await read('RELEASE.json');
16
- assert.equal(release.runtime_predecessor.version,'0.15.71');
17
- assert.equal(release.parent.version,'0.15.71');
18
- assert.equal(release.runtime_predecessor.release_id,'v0.15.71-1818abc327478a96');
19
- assert.equal(release.parent.release_id,'v0.15.71-1818abc327478a96');
16
+ assert.equal(release.runtime_predecessor.version,'0.15.74');
17
+ assert.equal(release.parent.version,'0.15.74');
18
+ assert.equal(release.runtime_predecessor.release_id,'v0.15.74-e84bf4eed16e9443');
19
+ assert.equal(release.parent.release_id,'v0.15.74-e84bf4eed16e9443');
20
20
  assert.notEqual(release.runtime_predecessor.release_id,parent);
21
21
  assert.notEqual(release.parent.release_id,parent);
22
22
  assert.equal(release.r168.scope,'REMOTE_VERSION_SKEW_FAIL_CLOSED_AND_READONLY_RECONCILIATION');
@@ -16,12 +16,12 @@ 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.72');
20
- assert.equal(release.train,'R192'); assert.equal(matrix.train,'R192');
21
- assert.equal(release.source_predecessor.version,'0.15.71');
22
- assert.equal(release.source_predecessor.manifest_sha256,'1818abc327478a96d935c200e25aad8515f15edc1842845b73bd0de57606da8c');
23
- assert.equal(release.source_predecessor.tarball_sha256,'20ed3b20e72b4e4226736a1e432b05b851e9fa265e9bc2966b74f266477b7e27');
24
- assert.equal(release.runtime_predecessor.release_id,'v0.15.71-1818abc327478a96');
19
+ for(const value of versions)assert.equal(value,'0.15.75');
20
+ assert.equal(release.train,'R206'); assert.equal(matrix.train,'R206');
21
+ assert.equal(release.source_predecessor.version,'0.15.75');
22
+ assert.equal(release.source_predecessor.manifest_sha256,'166eebde18d53a9ec46f738383c289733f9cd37918b3572b7515d1ab9b122c92');
23
+ assert.equal(release.source_predecessor.tarball_sha256,null);
24
+ assert.equal(release.runtime_predecessor.release_id,'v0.15.74-e84bf4eed16e9443');
25
25
  assert.equal(release.r173.public_tool_delta,0); assert.equal(release.r173.authority_scope_delta,0);
26
26
  });
27
27
 
@@ -13,21 +13,21 @@ test('R190 package identity binds the exact published R179 source and live runti
13
13
  json('package.json'),readReleaseLock(root),json('bridge/package.json'),json('RELEASE.json'),
14
14
  json('PROVENANCE.json'),json('TEST-MATRIX.json'),json('SBOM.cdx.json')
15
15
  ]);
16
- assert.equal(pkg.version,'0.15.72');
17
- assert.equal(lock.version,'0.15.72');
18
- assert.equal(lock.packages[''].version,'0.15.72');
19
- assert.equal(bridge.version,'0.15.72');
20
- assert.equal(release.version,'0.15.72');
21
- assert.equal(release.train,'R192');
22
- assert.equal(matrix.version,'0.15.72');
23
- assert.equal(matrix.train,'R192');
24
- assert.equal(sbom.metadata.component.version,'0.15.72');
25
- assert.equal(release.source_predecessor.version,'0.15.71');
26
- assert.equal(release.source_predecessor.train,'R191');
27
- assert.equal(release.source_predecessor.manifest_sha256,'1818abc327478a96d935c200e25aad8515f15edc1842845b73bd0de57606da8c');
28
- assert.equal(release.source_predecessor.tarball_sha256,'20ed3b20e72b4e4226736a1e432b05b851e9fa265e9bc2966b74f266477b7e27');
29
- assert.equal(release.runtime_predecessor.version,'0.15.71');
30
- assert.equal(provenance.version,'0.15.72');
31
- assert.equal(provenance.parent_tarball_sha256,release.source_predecessor.tarball_sha256);
16
+ assert.equal(pkg.version,'0.15.75');
17
+ assert.equal(lock.version,'0.15.75');
18
+ assert.equal(lock.packages[''].version,'0.15.75');
19
+ assert.equal(bridge.version,'0.15.75');
20
+ assert.equal(release.version,'0.15.75');
21
+ assert.equal(release.train,'R206');
22
+ assert.equal(matrix.version,'0.15.75');
23
+ assert.equal(matrix.train,'R206');
24
+ assert.equal(sbom.metadata.component.version,'0.15.75');
25
+ assert.equal(release.source_predecessor.version,'0.15.75');
26
+ assert.equal(release.source_predecessor.train,'R205');
27
+ assert.equal(release.source_predecessor.manifest_sha256,'166eebde18d53a9ec46f738383c289733f9cd37918b3572b7515d1ab9b122c92');
28
+ assert.equal(release.source_predecessor.tarball_sha256,null);
29
+ assert.equal(release.runtime_predecessor.version,'0.15.74');
30
+ assert.equal(provenance.version,'0.15.75');
31
+ assert.equal(provenance.parent_tarball_sha256,'5da436a3f8068107e74caf6da58ff1e211d4a62f94266853136b601762f36f0c');
32
32
  assert.equal(provenance.source_predecessor_manifest_file_sha256,release.source_predecessor.manifest_sha256);
33
33
  });
@@ -7,27 +7,27 @@ import {DEADBYTE_VERSION} from '../src/version.mjs';
7
7
  import {readReleaseLock} from './helpers/release-lock.mjs';
8
8
  const root=path.resolve(fileURLToPath(new URL('..',import.meta.url)));
9
9
  const read=async file=>JSON.parse(await readFile(path.join(root,file),'utf8'));
10
- const parent='v0.15.71-1818abc327478a96';
11
- const manifest='1818abc327478a96d935c200e25aad8515f15edc1842845b73bd0de57606da8c';
12
- const generation='aef437280102171a9b68da754fca16a03202104db7d5c420751624580ad6fadc';
10
+ const parent='v0.15.74-e84bf4eed16e9443';
11
+ const manifest='e84bf4eed16e9443fbd0bf9f0f562e26b01db778647aefcc8b12fd7f48636b47';
12
+ const generation='598f896be9ce65e6b0c618e8c8f6eaa2a9d91617a76a146bf3deb385a56d19e7';
13
13
  const tarball='1a7f1fe05a06178b8d772a140be6e0470790b743cef690c3f8f8165cc61075bf';
14
14
  test('R190 version, lock snapshot, bridge, matrix, SBOM and provenance identify exact 0.15.70 successor',async()=>{
15
15
  const [pkg,lock,bridge,release,provenance,matrix,sbom]=await Promise.all([
16
16
  read('package.json'),readReleaseLock(root),read('bridge/package.json'),read('RELEASE.json'),
17
17
  read('PROVENANCE.json'),read('TEST-MATRIX.json'),read('SBOM.cdx.json')]);
18
18
  for(const version of [pkg.version,lock.version,lock.packages[''].version,bridge.version,release.version,provenance.version,
19
- matrix.version,sbom.metadata.component.version,DEADBYTE_VERSION])assert.equal(version,'0.15.72');
20
- assert.equal(release.train,'R192');assert.equal(matrix.train,'R192');
21
- assert.equal(sbom.serialNumber,'urn:cdx:deadbyte-mcp:r192:0.15.72');
19
+ matrix.version,sbom.metadata.component.version,DEADBYTE_VERSION])assert.equal(version,'0.15.75');
20
+ assert.equal(release.train,'R206');assert.equal(matrix.train,'R206');
21
+ assert.equal(sbom.serialNumber,'urn:cdx:deadbyte-mcp:r206:0.15.75');
22
22
  assert.equal(release.parent.release_id,parent);assert.equal(release.parent.manifest_sha256,manifest);
23
23
  assert.equal(release.parent.generation_manifest_sha256,generation);
24
- assert.equal(release.source_predecessor.version,'0.15.71');
25
- assert.equal(release.source_predecessor.manifest_sha256,'1818abc327478a96d935c200e25aad8515f15edc1842845b73bd0de57606da8c');
26
- assert.equal(release.source_predecessor.tarball_sha256,'20ed3b20e72b4e4226736a1e432b05b851e9fa265e9bc2966b74f266477b7e27');
24
+ assert.equal(release.source_predecessor.version,'0.15.75');
25
+ assert.equal(release.source_predecessor.manifest_sha256,'166eebde18d53a9ec46f738383c289733f9cd37918b3572b7515d1ab9b122c92');
26
+ assert.equal(release.source_predecessor.tarball_sha256,null);
27
27
  assert.equal(release.runtime_predecessor.release_id,parent);
28
28
  assert.equal(provenance.runtime_predecessor.release_id,parent);
29
- assert.equal(provenance.parent_tarball_sha256,release.source_predecessor.tarball_sha256);
30
- assert.equal(provenance.source_predecessor_tarball_sha256,release.source_predecessor.tarball_sha256);
29
+ assert.equal(provenance.parent_tarball_sha256,'5da436a3f8068107e74caf6da58ff1e211d4a62f94266853136b601762f36f0c');
30
+ assert.equal(provenance.source_predecessor_tarball_sha256,null);
31
31
  });
32
32
  test('R179 does not misrepresent owner Autonomous enrollment, protected regression or publication as finished',async()=>{
33
33
  const [release,prov,matrix]=await Promise.all(['RELEASE.json','PROVENANCE.json','TEST-MATRIX.json'].map(read));
@@ -48,7 +48,7 @@ test('R190 retains historical R179 and R173 source evidence without promoting it
48
48
  assert.equal(release.r173.source_predecessor_version,'0.15.67');
49
49
  assert.equal(release.r173.source_predecessor_manifest_sha256,'4fd7bfc76b1de6401c142b607cc84e847434b28c888bc99ceb09c9e8e5adc8f8');
50
50
  assert.equal(prov.r173.source_predecessor_version,'0.15.67');
51
- assert.equal(release.source_predecessor.version,'0.15.71');
51
+ assert.equal(release.source_predecessor.version,'0.15.75');
52
52
  assert.notEqual(release.source_predecessor.tarball_sha256,release.r173.source_predecessor_tarball_sha256);
53
53
  });
54
54
  test('R184 ships a semantic lock snapshot matching installed package identity and dependencies',async()=>{
@@ -0,0 +1,48 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import {createR188OwnerUacRequest,verifyR188OwnerUacRequest} from '../src/r188-owner-uac.mjs';
4
+ const h=c=>c.repeat(64);
5
+ const issued=new Date('2026-10-28T06:00:00.000Z');
6
+ const fixture={
7
+ machineEpoch:h('e'),releaseManifestSha256:h('a'),
8
+ codingPolicySha256:h('b'),autonomousPolicySha256:h('c'),
9
+ rootId:'core',projectRoot:'D:\\Projects\\deadbyte-mcp',
10
+ maxSeconds:600,now:issued,expiresInMs:120000
11
+ };
12
+ test('R188 no-Windows-Hello UAC review is project-scoped, short lived and not a grant',()=>{
13
+ const a=createR188OwnerUacRequest(fixture),b=createR188OwnerUacRequest(fixture);
14
+ assert.equal(a.schema,'deadbyte.r188-owner-uac-request.v1');
15
+ assert.equal(a.subject.root_id,'core');
16
+ assert.equal(a.subject.operation,'autonomous_goal_run');
17
+ assert.equal(a.subject.max_seconds,600);
18
+ assert.equal(a.subject.expires_at_utc,'2026-10-28T06:02:00.000Z');
19
+ assert.notEqual(a.challenge,b.challenge);
20
+ assert.equal(a.authority_granted,false);
21
+ assert.equal(a.owner_approved,false);
22
+ assert.equal(a.require_interactive_uac,true);
23
+ assert.match(a.review_phrase,/^APPROVE-[A-F0-9]{12}$/);
24
+ assert.match(a.request_sha256,/^[a-f0-9]{64}$/);
25
+ const r=verifyR188OwnerUacRequest({request:a,expected:fixture,now:new Date(issued.getTime()+1000)});
26
+ assert.equal(r.status,'VERIFIED_FOR_REVIEW_ONLY');
27
+ assert.equal(r.authority_granted,false);
28
+ assert.equal(r.request_sha256,a.request_sha256);
29
+ });
30
+ test('R188 disallows broad scopes and unsafe timestamps before preparing a review',()=>{
31
+ for(const change of [
32
+ {rootId:'all'}, {maxSeconds:3601}, {maxSeconds:0},
33
+ {machineEpoch:'a'}, {codingPolicySha256:h('g')},
34
+ {projectRoot:'D:\\'},{projectRoot:'relative'},
35
+ {expiresInMs:300001},{expiresInMs:-1}
36
+ ])assert.throws(()=>createR188OwnerUacRequest({...fixture,...change}),/R188/);
37
+ });
38
+ test('R188 rejects changed release, policy, epoch, path, signature-like receipt or expired request',()=>{
39
+ const request=createR188OwnerUacRequest(fixture);
40
+ for(const change of [
41
+ {releaseManifestSha256:h('f')},{codingPolicySha256:h('d')},
42
+ {autonomousPolicySha256:h('0')},{machineEpoch:h('1')},
43
+ {projectRoot:'D:\\Other'}
44
+ ])assert.throws(()=>verifyR188OwnerUacRequest({request,expected:{...fixture,...change},now:issued}),/R188/);
45
+ assert.throws(()=>verifyR188OwnerUacRequest({request:{...request,owner_approved:true},expected:fixture,now:issued}),/R188/);
46
+ assert.throws(()=>verifyR188OwnerUacRequest({request:{...request,challenge:'A'.repeat(43)},expected:fixture,now:issued}),/R188/);
47
+ assert.throws(()=>verifyR188OwnerUacRequest({request,expected:fixture,now:new Date(issued.getTime()+120000)}),/R188/);
48
+ });
@@ -0,0 +1,42 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import {readFile} from 'node:fs/promises';
4
+ import {spawnSync} from 'node:child_process';
5
+ import {fileURLToPath} from 'node:url';
6
+ import path from 'node:path';
7
+ import {inspectTrustedInstallation,privilegedEpochInstallFiles} from '../src/privileged-install-trust-r89.mjs';
8
+ const root=fileURLToPath(new URL('..',import.meta.url));
9
+ test('R188 owner review is explicitly manual, protected, with UAC secure desktop and expiry review',async()=>{
10
+ const script=await readFile(path.join(root,'scripts','r188-owner-uac-review.ps1'),'utf8');
11
+ assert.match(script,/#requires -RunAsAdministrator/);
12
+ assert.match(script,/EnableLUA/);
13
+ assert.match(script,/PromptOnSecureDesktop/);
14
+ assert.match(script,/ConsentPromptBehaviorAdmin/);
15
+ assert.match(script,/Read-Host/);
16
+ assert.match(script,/REVIEWED_NO_GRANT/);
17
+ assert.match(script,/authority_granted=\$false/);
18
+ assert.match(script,/grant_issued=\$false/);
19
+ assert.match(script,/FileMode\]::CreateNew/);
20
+ assert.doesNotMatch(script,/Start-Process\s+.*-Verb\s+RunAs/i);
21
+ assert.doesNotMatch(script,/Arm-Autonomous|transaction_revoke|autonomous-grant\.json/);
22
+ });
23
+ test('R188 UAC preflight fails closed at the applicable trust or request boundary',async()=>{
24
+ let trusted=false;
25
+ try{
26
+ trusted=(await inspectTrustedInstallation(privilegedEpochInstallFiles(root,process.execPath))).trusted===true;
27
+ }catch{}
28
+ const script=path.join(root,'scripts','r188-uac-review-preview.mjs');
29
+ const r=spawnSync(process.execPath,[script,'D:\\bad-request.json'],{
30
+ encoding:'utf8',cwd:root,windowsHide:true,timeout:12000,maxBuffer:512*1024});
31
+ assert.equal(r.status,2);
32
+ if(trusted)assert.match(r.stderr,/ENOENT.*bad-request\.json/i);
33
+ else assert.match(r.stderr,/R188_UAC_REVIEW_BLOCKED|R89_PROTECTED_INSTALLATION_REQUIRED|R89 privileged installation not protected: UNTRUSTED_WRITE_ACE/);
34
+ assert.doesNotMatch(r.stdout,/authority_granted":true/);
35
+ });
36
+ test('R188 broker cannot pretend owner-reviewed data is a current epoch or signed grant',async()=>{
37
+ const script=await readFile(path.join(root,'scripts','r188-uac-review-preview.mjs'),'utf8');
38
+ assert.match(script,/live_epoch_verified:false/);
39
+ assert.match(script,/live_policies_verified:false/);
40
+ assert.match(script,/authority_granted:false/);
41
+ assert.match(script,/R89_PROTECTED_INSTALLATION_REQUIRED/);
42
+ });
@@ -8,17 +8,17 @@ test('R190 candidate identity separates published source 0.15.69 from active run
8
8
  json('package.json'),json('bridge/package.json'),json('RELEASE.json'),json('PROVENANCE.json'),
9
9
  json('TEST-MATRIX.json'),json('SBOM.cdx.json'),readFile(new URL('../src/version.mjs',import.meta.url),'utf8')]);
10
10
  for(const value of [pkg.version,bridge.version,release.version,provenance.version,matrix.version,
11
- sbom.metadata.component.version])assert.equal(value,'0.15.72');
12
- assert.match(versionSource,/DEADBYTE_VERSION = '0\.15\.72'/);
13
- assert.equal(release.train,'R192');assert.equal(matrix.train,'R192');
14
- assert.equal(release.source_predecessor.version,'0.15.71');
15
- assert.equal(release.source_predecessor.tarball_sha256,'20ed3b20e72b4e4226736a1e432b05b851e9fa265e9bc2966b74f266477b7e27');
16
- assert.equal(release.source_predecessor.manifest_sha256,'1818abc327478a96d935c200e25aad8515f15edc1842845b73bd0de57606da8c');
17
- assert.equal(release.runtime_predecessor.version,'0.15.71');
18
- assert.equal(release.runtime_predecessor.release_id,'v0.15.71-1818abc327478a96');
19
- assert.equal(provenance.source_predecessor_version,'0.15.71');
11
+ sbom.metadata.component.version])assert.equal(value,'0.15.75');
12
+ assert.match(versionSource,/DEADBYTE_VERSION = '0\.15\.75'/);
13
+ assert.equal(release.train,'R206');assert.equal(matrix.train,'R206');
14
+ assert.equal(release.source_predecessor.version,'0.15.75');
15
+ assert.equal(release.source_predecessor.tarball_sha256,null);
16
+ assert.equal(release.source_predecessor.manifest_sha256,'166eebde18d53a9ec46f738383c289733f9cd37918b3572b7515d1ab9b122c92');
17
+ assert.equal(release.runtime_predecessor.version,'0.15.74');
18
+ assert.equal(release.runtime_predecessor.release_id,'v0.15.74-e84bf4eed16e9443');
19
+ assert.equal(provenance.source_predecessor_version,'0.15.75');
20
20
  assert.equal(provenance.source_predecessor_tarball_sha256,release.source_predecessor.tarball_sha256);
21
- assert.match(sbom.serialNumber,/r192:0\.15\.72$/);
21
+ assert.match(sbom.serialNumber,/r206:0\.15\.75$/);
22
22
  });
23
23
 
24
24
  test('R190 release metadata records verified recovery without claiming publication or activation',async()=>{
@@ -6,23 +6,23 @@ import path from 'node:path';
6
6
  import {DEADBYTE_VERSION} from '../src/version.mjs';
7
7
  const root=path.resolve(fileURLToPath(new URL('..',import.meta.url)));
8
8
  const json=async f=>JSON.parse(await readFile(path.join(root,f),'utf8'));
9
- const predecessor='v0.15.71-1818abc327478a96';
10
- const publishedManifest='1818abc327478a96d935c200e25aad8515f15edc1842845b73bd0de57606da8c';
11
- const publishedTarball='20ed3b20e72b4e4226736a1e432b05b851e9fa265e9bc2966b74f266477b7e27';
9
+ const predecessor='v0.15.74-e84bf4eed16e9443';
10
+ const publishedManifest='e84bf4eed16e9443fbd0bf9f0f562e26b01db778647aefcc8b12fd7f48636b47';
11
+ const publishedTarball='5da436a3f8068107e74caf6da58ff1e211d4a62f94266853136b601762f36f0c';
12
12
  test('R191 exact version identity includes bundled bridge, lock snapshot, SBOM, provenance and matrix',async()=>{
13
13
  const [pkg,bridge,lock,release,provenance,matrix,bom]=await Promise.all(['package.json','bridge/package.json','docs/R184-package-lock.json','RELEASE.json','PROVENANCE.json','TEST-MATRIX.json','SBOM.cdx.json'].map(json));
14
- for(const ver of [pkg.version,bridge.version,lock.version,lock.packages[''].version,release.version,provenance.version,matrix.version,bom.metadata.component.version,DEADBYTE_VERSION])assert.equal(ver,'0.15.72');
15
- for(const train of [release.train,matrix.train])assert.equal(train,'R192');
16
- assert.equal(bom.serialNumber,'urn:cdx:deadbyte-mcp:r192:0.15.72');
14
+ for(const ver of [pkg.version,bridge.version,lock.version,lock.packages[''].version,release.version,provenance.version,matrix.version,bom.metadata.component.version,DEADBYTE_VERSION])assert.equal(ver,'0.15.75');
15
+ for(const train of [release.train,matrix.train])assert.equal(train,'R206');
16
+ assert.equal(bom.serialNumber,'urn:cdx:deadbyte-mcp:r206:0.15.75');
17
17
  assert.equal(release.parent.release_id,predecessor);
18
18
  assert.equal(provenance.parent_release_id,predecessor);
19
- assert.equal(release.source_predecessor.version,'0.15.71');
20
- assert.equal(release.source_predecessor.manifest_sha256,publishedManifest);
21
- assert.equal(release.source_predecessor.tarball_sha256,publishedTarball);
22
- assert.equal(provenance.source_predecessor_version,'0.15.71');
19
+ assert.equal(release.source_predecessor.version,'0.15.75');
20
+ assert.equal(release.source_predecessor.manifest_sha256,'166eebde18d53a9ec46f738383c289733f9cd37918b3572b7515d1ab9b122c92');
21
+ assert.equal(release.source_predecessor.tarball_sha256,null);
22
+ assert.equal(provenance.source_predecessor_version,'0.15.75');
23
23
  assert.equal(provenance.parent_tarball_sha256,publishedTarball);
24
- assert.equal(provenance.source_predecessor_tarball_sha256,publishedTarball);
25
- assert.equal(provenance.source_predecessor_manifest_file_sha256,publishedManifest);
24
+ assert.equal(provenance.source_predecessor_tarball_sha256,null);
25
+ assert.equal(provenance.source_predecessor_manifest_file_sha256,'166eebde18d53a9ec46f738383c289733f9cd37918b3572b7515d1ab9b122c92');
26
26
  assert.equal(release.r191_activation_repair.npm_publish,'NOT_RUN');
27
27
  assert.equal(release.r191_activation_repair.production_activation,'NOT_RUN');
28
28
  assert.equal(release.r190_foreground_recovery.status,'PREPUBLISH_VERIFIED');
@@ -3,21 +3,21 @@ import {readFile} from 'node:fs/promises';import {createHash} from 'node:crypto'
3
3
  import {DEADBYTE_VERSION} from '../src/version.mjs';
4
4
  const root=path.resolve(fileURLToPath(new URL('..',import.meta.url)));
5
5
  const read=async name=>JSON.parse(await readFile(path.join(root,name),'utf8'));
6
- const prevHash='1818abc327478a96d935c200e25aad8515f15edc1842845b73bd0de57606da8c';
7
- const prevTar='20ed3b20e72b4e4226736a1e432b05b851e9fa265e9bc2966b74f266477b7e27';
8
- test('R192 exact package, bridge, lock, metadata and runtime version are 0.15.72',async()=>{
6
+ const prevHash='e84bf4eed16e9443fbd0bf9f0f562e26b01db778647aefcc8b12fd7f48636b47';
7
+ const prevTar='5da436a3f8068107e74caf6da58ff1e211d4a62f94266853136b601762f36f0c';
8
+ test('R193 current identity retains exact published R192 predecessor evidence',async()=>{
9
9
  const [pkg,bridge,lock,release,prov,matrix,bom]=await Promise.all([
10
10
  read('package.json'),read('bridge/package.json'),read('docs/R184-package-lock.json'),
11
11
  read('RELEASE.json'),read('PROVENANCE.json'),read('TEST-MATRIX.json'),read('SBOM.cdx.json')]);
12
12
  for(const actual of [pkg.version,bridge.version,lock.version,lock.packages[''].version,
13
13
  release.version,prov.version,matrix.version,bom.metadata.component.version,DEADBYTE_VERSION])
14
- assert.equal(actual,'0.15.72');
15
- assert.equal(release.train,'R192');assert.equal(matrix.train,'R192');
16
- assert.equal(bom.serialNumber,'urn:cdx:deadbyte-mcp:r192:0.15.72');
17
- assert.equal(release.parent.release_id,'v0.15.71-1818abc327478a96');
14
+ assert.equal(actual,'0.15.75');
15
+ assert.equal(release.train,'R206');assert.equal(matrix.train,'R206');
16
+ assert.equal(bom.serialNumber,'urn:cdx:deadbyte-mcp:r206:0.15.75');
17
+ assert.equal(release.parent.release_id,'v0.15.74-e84bf4eed16e9443');
18
18
  assert.equal(release.parent.manifest_sha256,prevHash);
19
- assert.equal(release.source_predecessor.tarball_sha256,prevTar);
20
- assert.equal(release.source_predecessor.manifest_sha256,prevHash);
19
+ assert.equal(release.source_predecessor.tarball_sha256,null);
20
+ assert.equal(release.source_predecessor.manifest_sha256,'166eebde18d53a9ec46f738383c289733f9cd37918b3572b7515d1ab9b122c92');
21
21
  assert.equal(prov.parent_tarball_sha256,prevTar);
22
22
  assert.equal(prov.parent_manifest_sha256,prevHash);
23
23
  assert.equal(release.r192.production_activation,'NOT_RUN');
@@ -33,7 +33,7 @@ test('R192 foreground reader enforces caller-safe telemetry rather than changing
33
33
  assert.match(log,/sanitizeAuditArgs\(compact\[6\]\)/);
34
34
  const [policy,release]=await Promise.all([
35
35
  read('controller/deadbyte-process-policy.json'),read('RELEASE.json')]);
36
- const approved=release.r192.development_policy_root;
36
+ const approved=release.r206.development_policy_root;
37
37
  assert.equal(typeof approved,'string');
38
38
  assert.ok(path.isAbsolute(approved));
39
39
  assert.equal(path.resolve(policy.roots.core.path),path.resolve(approved));
@@ -0,0 +1,26 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import {readFile} from 'node:fs/promises';
4
+ import {fileURLToPath} from 'node:url';
5
+ import path from 'node:path';
6
+ const root=fileURLToPath(new URL('..',import.meta.url));
7
+ test('R193 Limited migration uses supported lifecycle, Limited tasks and never silently rearms',async()=>{
8
+ const source=await readFile(path.join(root,'scripts','r193-migrate-runtime-limited.ps1'),'utf8');
9
+ assert.match(source,/#requires -RunAsAdministrator/);
10
+ assert.match(source,/Invoke-Controller supervisorstop/);
11
+ assert.match(source,/Invoke-Controller stop/);
12
+ assert.match(source,/DEADBYTE-MCP-Runtime-Logon/);
13
+ assert.match(source,/RunLevel Limited/);
14
+ assert.match(source,/desktop_reapproval_required=\$true/);
15
+ assert.doesNotMatch(source,/armdesktop|armprocess|armcoding|armhost|armautonomous/i);
16
+ assert.doesNotMatch(source,/Stop-Process|taskkill|TerminateProcess/i);
17
+ });
18
+ test('R193 owner request is generated only from fixed protected live state after migration',async()=>{
19
+ const source=await readFile(path.join(root,'scripts','r193-owner-request-live.mjs'),'utf8');
20
+ assert.match(source,/process\.argv\.length!==2/);
21
+ assert.match(source,/createR193LiveMachineEpoch/);
22
+ assert.match(source,/verifyManifestTreeExact/);
23
+ assert.match(source,/observation\.state!=='ONLINE'/);
24
+ assert.match(source,/authority_granted:false/);
25
+ assert.doesNotMatch(source,/createPrivateKey|issueR186AutonomousGrant|createAuthorityEpochStore|armautonomous/i);
26
+ });
@@ -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 {createR188OwnerUacRequest} from '../src/r188-owner-uac.mjs';
5
+ import {buildR193LiveOwnerBoundary,createR193LiveMachineEpoch} from '../src/r193-live-owner-subject.mjs';
6
+
7
+ const sha=b=>createHash('sha256').update(b).digest('hex');
8
+ const filetime=iso=>{
9
+ const m=/^(\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d)\.(\d{1,7})Z$/.exec(iso);
10
+ return (BigInt(Date.parse(m[1]+'.000Z')+11644473600000)*10000n+BigInt(m[2].padEnd(7,'0'))).toString(16).padStart(16,'0');
11
+ };
12
+ function fixture(){
13
+ const manifest=Buffer.from('manifest'),coding=Buffer.from('coding'),autonomous=Buffer.from('autonomous');
14
+ const pointer={release_id:'v0.15.72-test',version:'0.15.72',manifest_sha256:sha(manifest),
15
+ generation_manifest_sha256:'d'.repeat(64),release_root:'C:\\Program Files\\DEADBYTE-Test'};
16
+ const authority={process:{configured:true,armed:true,reason:'standing-grant',epoch_seq:1,epoch_sha256:'1'.repeat(64)},
17
+ coding:{configured:true,armed:true,reason:'standing-grant',epoch_seq:2,epoch_sha256:'2'.repeat(64)},
18
+ autonomous:{configured:true,armed:false,reason:'disarmed'},
19
+ desktop:{configured:true,armed:true,reason:'standing-grant',epoch_seq:3,epoch_sha256:'3'.repeat(64)},
20
+ host:{configured:true,armed:true,reason:'standing-grant',epoch_seq:4,epoch_sha256:'4'.repeat(64)}};
21
+ const times={bridge:'2026-10-29T08:00:00.1234567Z',core:'2026-10-29T08:00:01.0000000Z',
22
+ cloud:'2026-10-29T08:00:02.7654321Z',supervisor:'2026-10-29T08:00:03.1000000Z'};
23
+ const observation={schema:'deadbyte.controller-observation.v1',core_root:pointer.release_root,
24
+ bridge:{alive:true,pid:101,creation_time_utc:times.bridge},core:{alive:true,pid:102,creation_time_utc:times.core},
25
+ cloud:{alive:true,pid:103,creation_time_utc:times.cloud},supervisor:{running:true},authority};
26
+ const supervisor={pid:104,creation_time_utc:times.supervisor};
27
+ const reports=Object.fromEntries(['bridge','core','cloud','supervisor'].map((component,index)=>[component,{
28
+ schema:'deadbyte.r193-native-process-token.v1',pid:101+index,creation_filetime_hex:filetime(times[component]),
29
+ alive:true,identity_verified:true,elevated:false,admin_enabled:false,integrity_rid:8192,token_type:'primary'}]));
30
+ const machineEpoch=createR193LiveMachineEpoch({activePointer:pointer,controllerObservation:observation});
31
+ const now=new Date('2026-10-29T08:01:00.000Z');
32
+ const request=createR188OwnerUacRequest({machineEpoch,releaseManifestSha256:sha(manifest),
33
+ codingPolicySha256:sha(coding),autonomousPolicySha256:sha(autonomous),rootId:'core',
34
+ projectRoot:'D:\\Projects\\deadbyte-mcp',maxSeconds:600,now,expiresInMs:120000});
35
+ return {manifest,coding,autonomous,pointer,observation,supervisor,reports,request,now};
36
+ }
37
+ const build=(f,changes={})=>buildR193LiveOwnerBoundary({request:f.request,activePointer:f.pointer,
38
+ installedManifestBytes:f.manifest,codingPolicyBytes:f.coding,autonomousPolicyBytes:f.autonomous,
39
+ controllerObservation:f.observation,supervisorLedger:f.supervisor,processReports:f.reports,
40
+ brokerR89Trusted:true,keyAclTrusted:true,uac:{enable_uac:true,secure_desktop:true,prompt_mode:'explicit_secure_desktop'},
41
+ ownerGesture:'approved',now:new Date(f.now.getTime()+1000),...changes});
42
+
43
+ test('R193 derives exact owner boundary from live release, policies, epoch and kernel process identities',()=>{
44
+ const f=fixture(),out=build(f);
45
+ assert.equal(out.expected.machineEpoch,f.request.subject.machine_epoch);
46
+ assert.equal(out.boundary.agent_processes.length,4);
47
+ assert.equal(out.boundary.agent_processes.every(x=>x.identity_verified&&!x.elevated),true);
48
+ });
49
+
50
+ test('R193 live subject rejects release, policy, authority and process identity drift',()=>{
51
+ const f=fixture();
52
+ for(const changes of [
53
+ {installedManifestBytes:Buffer.from('changed')},
54
+ {codingPolicyBytes:Buffer.from('changed')},
55
+ {autonomousPolicyBytes:Buffer.from('changed')},
56
+ {activePointer:{...f.pointer,generation_manifest_sha256:'e'.repeat(64)}},
57
+ {processReports:{...f.reports,core:{...f.reports.core,pid:999}}},
58
+ {processReports:{...f.reports,cloud:{...f.reports.cloud,creation_filetime_hex:'0'.repeat(16)}}},
59
+ {controllerObservation:{...f.observation,authority:{...f.observation.authority,host:{...f.observation.authority.host,epoch_seq:5}}}}
60
+ ])assert.throws(()=>build(f,changes),/R193|R188/);
61
+ });
@@ -0,0 +1,36 @@
1
+ import test from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import {spawnSync} from 'node:child_process';
4
+ import {fileURLToPath} from 'node:url';
5
+ import path from 'node:path';
6
+
7
+ const root=fileURLToPath(new URL('..',import.meta.url));
8
+ const binary=path.join(root,'bin','deadbyte-owner-token-r193.exe');
9
+
10
+ test('R193 native observer reports target process token and kernel creation identity',()=>{
11
+ const result=spawnSync(binary,['--inspect-pid',String(process.pid)],{
12
+ cwd:root,encoding:'utf8',windowsHide:true,timeout:10000,maxBuffer:256*1024});
13
+ assert.equal(result.status,0,result.stderr);
14
+ const report=JSON.parse(result.stdout);
15
+ assert.equal(report.schema,'deadbyte.r193-native-process-token.v1');
16
+ assert.equal(report.pid,process.pid);
17
+ assert.equal(report.alive,true);
18
+ assert.equal(report.identity_verified,true);
19
+ assert.match(report.creation_filetime_hex,/^[0-9a-f]{16}$/);
20
+ assert.equal(typeof report.elevated,'boolean');
21
+ assert.equal(typeof report.admin_enabled,'boolean');
22
+ assert.ok(Number.isSafeInteger(report.integrity_rid));
23
+ assert.equal(report.token_type,'primary');
24
+ assert.equal(report.owner_approved,false);
25
+ assert.equal(report.authority_granted,false);
26
+ });
27
+
28
+ test('R193 native observer rejects missing, malformed and nonexistent target PIDs',()=>{
29
+ for(const args of [['--inspect-pid'],['--inspect-pid','0'],['--inspect-pid','x'],
30
+ ['--inspect-pid','2147483647']]){
31
+ const result=spawnSync(binary,args,{cwd:root,encoding:'utf8',windowsHide:true,
32
+ timeout:10000,maxBuffer:256*1024});
33
+ assert.notEqual(result.status,0);
34
+ assert.doesNotMatch(result.stdout,/"identity_verified":true/);
35
+ }
36
+ });