deadbyte-mcp 0.15.70 → 0.15.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MANIFEST.SHA256 +54 -30
- package/PROVENANCE.json +64 -15
- package/README.txt +19 -11
- package/RELEASE.json +76 -17
- package/SBOM.cdx.json +2 -2
- package/TEST-MATRIX.json +58 -2
- package/bridge/package.json +1 -1
- package/controller/deadbyte-process-policy.json +4 -4
- package/docs/R184-package-lock.json +109 -16
- package/docs/R192-LIVE-LOG-HARDENING.txt +39 -0
- package/package.json +1 -1
- package/scripts/deploy-r48.mjs +17 -4
- package/scripts/r191-acceptance-readonly.mjs +7 -0
- package/scripts/r191-existing-regression.mjs +5 -0
- package/scripts/r191-existing-stage-audit.mjs +21 -0
- package/scripts/r191-extended-security-gate.mjs +14 -0
- package/scripts/r191-focused-tests.mjs +3 -0
- package/scripts/r191-full-runner.mjs +18 -0
- package/scripts/r191-historical-release-regression.mjs +9 -0
- package/scripts/r191-live-claim-inspect.mjs +15 -0
- package/scripts/r191-npm-registry-readonly.mjs +14 -0
- package/scripts/r191-old-version-audit.mjs +12 -0
- package/scripts/r191-privilege-readonly.mjs +6 -0
- package/scripts/r191-process-policy-focused.mjs +1 -0
- package/scripts/r191-protected-failure-gate.mjs +3 -0
- package/scripts/r191-release-contract-runner.mjs +1 -0
- package/scripts/r191-unreached-focused.mjs +29 -0
- package/scripts/r192-focused.mjs +10 -0
- package/scripts/r192-release-tests.mjs +8 -0
- package/src/activation-lock-r65.mjs +9 -1
- package/src/deadbyte-cli.mjs +4 -2
- package/src/remote-live-log.mjs +22 -1
- package/src/runtime-update.mjs +2 -2
- package/src/trusted-epoch-bootstrap-r158.mjs +8 -0
- package/src/version.mjs +1 -1
- package/test/process-policy-refresh.test.mjs +11 -1
- package/test/r130-release-security-contract.test.mjs +8 -8
- package/test/r132-release-identity.test.mjs +7 -7
- package/test/r153-prepublish-identity.test.mjs +1 -1
- package/test/r160-release-contract.test.mjs +3 -3
- package/test/r165-live-cli-skew.test.mjs +1 -1
- package/test/r167-release-contract.test.mjs +11 -11
- package/test/r168-release-contract.test.mjs +4 -2
- package/test/r172-release-contract.test.mjs +6 -6
- package/test/r173-release-contract.test.mjs +15 -15
- package/test/r179-release-contract.test.mjs +10 -10
- package/test/r190-foreground-cli.test.mjs +14 -4
- package/test/r190-release-contract.test.mjs +10 -10
- package/test/r191-epoch-root-selection.test.mjs +24 -0
- package/test/r191-epoch-source-claim.test.mjs +88 -0
- package/test/r191-inherited-epoch-preflight.test.mjs +65 -0
- package/test/r191-release-contract.test.mjs +31 -0
- package/test/r192-live-log-hardening.test.mjs +50 -0
- package/test/r192-release-identity.test.mjs +40 -0
- package/test/r59-tool-surface-compat.test.mjs +1 -1
package/TEST-MATRIX.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "deadbyte.test-matrix.v1",
|
|
3
|
-
"version": "0.15.
|
|
4
|
-
"train": "
|
|
3
|
+
"version": "0.15.72",
|
|
4
|
+
"train": "R192",
|
|
5
5
|
"primary_platform": "win32-x64",
|
|
6
6
|
"reference": {
|
|
7
7
|
"package": "@wonderwhy-er/desktop-commander",
|
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
"schemas_sha256": "f342345e34e48769dabaefe1b932f09d41e2e207b422f7794a15ee50ffa8f140"
|
|
11
11
|
},
|
|
12
12
|
"required": [
|
|
13
|
+
{
|
|
14
|
+
"id": "r191-trusted-successor-epoch-root",
|
|
15
|
+
"command": "run R191 protected 0.15.71 ACL and full Windows regression",
|
|
16
|
+
"expected": "R89 ACL verifies successor exact manifest and native epoch tests pass; no dev-root bypass"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "r191-signed-initial-precondition-reconciliation",
|
|
20
|
+
"command": "node --test test/r191-epoch-source-claim.test.mjs test/r153-r65-signed-precondition-recovery.test.mjs",
|
|
21
|
+
"expected": "R65 claim reconciles only with signed initial R27 rejection, correct predecessor and untampered receipt"
|
|
22
|
+
},
|
|
13
23
|
{
|
|
14
24
|
"id": "r190-explicit-foreground-recovery",
|
|
15
25
|
"command": "node --test --test-concurrency=1 test/r190-foreground-owner-recovery.test.mjs test/r190-foreground-cli.test.mjs",
|
|
@@ -144,6 +154,11 @@
|
|
|
144
154
|
"id": "r179-live-log-and-foreground",
|
|
145
155
|
"command": "Run Ctrl+C, restart, crash and concurrent sessions with pre-existing standing grants and confirm no implicit revocation",
|
|
146
156
|
"expected": "Owner standing grants unchanged; observation-only marker CAS; signed audit remains verifiable"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"id": "r192-live-log-hardening",
|
|
160
|
+
"gate": "R192 regression preserves clean default live logs, sanitization and bounded log rotation",
|
|
161
|
+
"status": "PASS_FOCUSED_31_0"
|
|
147
162
|
}
|
|
148
163
|
],
|
|
149
164
|
"observed_pre_release_evidence": {
|
|
@@ -687,5 +702,46 @@
|
|
|
687
702
|
"authority_after_test": "ALL_FIVE_PLANES_DISARMED",
|
|
688
703
|
"publication": "NOT_RUN",
|
|
689
704
|
"production_activation": "NOT_RUN"
|
|
705
|
+
},
|
|
706
|
+
"r191": {
|
|
707
|
+
"release_version": "0.15.71",
|
|
708
|
+
"protected_full": "NOT_VERIFIED",
|
|
709
|
+
"production_activation": "NOT_RUN",
|
|
710
|
+
"npm_publish": "NOT_RUN",
|
|
711
|
+
"test_status": "SOURCE_FOCUSED_PASS_FULL_PENDING",
|
|
712
|
+
"focused_security": "PASS_47_FAIL_0_SKIP_0",
|
|
713
|
+
"historical_release_regression": "PASS_25_FAIL_0_SKIP_1",
|
|
714
|
+
"r191_claim_inspect": "RECONCILABLE_SIGNED_READ_ONLY",
|
|
715
|
+
"protected_first_attempt": "FAIL_263_PASS_2_FAIL_3_SKIP_IN_BATCH_1_OF_8",
|
|
716
|
+
"protected_first_log_sha256": "a417aa51f82d93463e69df4d8b90ec8498817fa5ac84e2b7d7fe6b30c7118b30",
|
|
717
|
+
"corrective_focused_tests": "PASS_10_FAIL_0_SKIP_0",
|
|
718
|
+
"corrective_security_regression": "PASS_47_FAIL_0_SKIP_0",
|
|
719
|
+
"protected_retest": "PENDING_FRESH_EXACT_BYTES_TEST_B",
|
|
720
|
+
"protected_second_attempt": "FAIL_BATCH_2_273_PASS_1_FAIL_7_SKIP_AFTER_BATCH_1_266_PASS_0_FAIL_3_SKIP",
|
|
721
|
+
"protected_second_log_sha256": "eb32db586a6a1e09d2404eb5088b7783a0f9261d991583be097f13fda8ef8db3",
|
|
722
|
+
"process_policy_source_rebound": "R191_EXACT_DEV_ROOT",
|
|
723
|
+
"process_policy_contract": "PASS_5_FAIL_0",
|
|
724
|
+
"protected_third_attempt": "FAIL_BATCH_3_255_PASS_7_FAIL_5_SKIP_AFTER_1_263_PASS_0_FAIL_3_SKIP_AND_2_266_PASS_0_FAIL_7_SKIP",
|
|
725
|
+
"protected_third_log_sha256": "b29bf870512b99c26cbee07f17cb5896bfaa09369fea33510a40ca6c8530062c",
|
|
726
|
+
"protected_unreached_batch4": "249_PASS_1_FAIL_6_SKIP",
|
|
727
|
+
"protected_unreached_batch5": "284_PASS_1_FAIL_4_SKIP",
|
|
728
|
+
"protected_unreached_batch6": "234_PASS_0_FAIL_4_SKIP",
|
|
729
|
+
"protected_unreached_batch7": "274_PASS_2_FAIL_10_SKIP",
|
|
730
|
+
"protected_unreached_batch8": "264_PASS_0_FAIL_9_SKIP",
|
|
731
|
+
"corrected_fixture_suite": "15_PASS_0_FAIL",
|
|
732
|
+
"r67_cross_volume_protected_c": "6_PASS_0_FAIL_WITH_EXPLICIT_D_SCRATCH",
|
|
733
|
+
"r43_historical_signed_public_key": "2_PASS_0_FAIL_READ_ONLY",
|
|
734
|
+
"preflight_acl_behavior": "ASSERT_TRUSTED_AND_UNTRUSTED_PATHS_BY_ACTUAL_R89",
|
|
735
|
+
"release_contract_changes": "R132_R59_README_EXACT_01571",
|
|
736
|
+
"full_protected_regression": "PENDING_FRESH_PROTECTED_CANDIDATE_D"
|
|
737
|
+
},
|
|
738
|
+
"r192": {
|
|
739
|
+
"focused": "PASS_31_FAIL_0",
|
|
740
|
+
"integration": "PENDING_FULL_REGRESSION",
|
|
741
|
+
"protected_full": "NOT_RUN",
|
|
742
|
+
"npm_pack": "PENDING",
|
|
743
|
+
"npm_publish": "NOT_RUN",
|
|
744
|
+
"public_tool_delta": 0,
|
|
745
|
+
"authority_policy_delta": 0
|
|
690
746
|
}
|
|
691
747
|
}
|
package/bridge/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "deadbyte.process-policy.v1",
|
|
3
3
|
"enabled": true,
|
|
4
|
-
"grant_file": "D:\\Projects\\deadbyte-mcp\\development\\deadbyte-mcp-
|
|
5
|
-
"state_dir": "D:\\Projects\\deadbyte-mcp\\development\\deadbyte-mcp-
|
|
4
|
+
"grant_file": "D:\\Projects\\deadbyte-mcp\\development\\deadbyte-mcp-r192-live-log-hardening-dev\\controller\\runtime\\process-grant.json",
|
|
5
|
+
"state_dir": "D:\\Projects\\deadbyte-mcp\\development\\deadbyte-mcp-r192-live-log-hardening-dev\\controller\\runtime\\process-state",
|
|
6
6
|
"native_host": {
|
|
7
|
-
"path": "D:\\Projects\\deadbyte-mcp\\development\\deadbyte-mcp-
|
|
7
|
+
"path": "D:\\Projects\\deadbyte-mcp\\development\\deadbyte-mcp-r192-live-log-hardening-dev\\bin\\deadbyte-process-host.exe",
|
|
8
8
|
"sha256": "daf9cfb371bee88cafbf5597eaa507fec504dbe0b0ddd40d0c3c2e02817f49e4"
|
|
9
9
|
},
|
|
10
10
|
"roots": {
|
|
11
11
|
"core": {
|
|
12
|
-
"path": "D:\\Projects\\deadbyte-mcp\\development\\deadbyte-mcp-
|
|
12
|
+
"path": "D:\\Projects\\deadbyte-mcp\\development\\deadbyte-mcp-r192-live-log-hardening-dev",
|
|
13
13
|
"deny_paths": [
|
|
14
14
|
"node_modules",
|
|
15
15
|
"controller/runtime",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deadbyte-mcp",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.72",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "deadbyte-mcp",
|
|
9
|
-
"version": "0.15.
|
|
9
|
+
"version": "0.15.72",
|
|
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": {
|
|
80
|
-
|
|
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",
|
|
84
|
-
"
|
|
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/
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
R192 live log hardening
|
|
2
|
+
target 0.15.72
|
|
3
|
+
|
|
4
|
+
the default npx remote console stays compact
|
|
5
|
+
signed tool audit is the authority for execution results
|
|
6
|
+
console output never grants or restores machine authority
|
|
7
|
+
|
|
8
|
+
changes
|
|
9
|
+
- extra screening and byte bounds for verbose runtime diagnostics
|
|
10
|
+
- keep tool name status and duration while reducing noisy reason text
|
|
11
|
+
- remove old log cursors and partial-line fragments after discovery drops files
|
|
12
|
+
- preserve independent START and terminal result lines for mutations
|
|
13
|
+
- keep heartbeat folding timeline filters and trace formatting
|
|
14
|
+
- no change to the public MCP tool catalog or authority policy
|
|
15
|
+
|
|
16
|
+
integration
|
|
17
|
+
src/deadbyte-cli.mjs reads and tracks foreground streams
|
|
18
|
+
src/remote-live-log.mjs formats audit-safe progress and prunes old readers
|
|
19
|
+
src/remote-log-decode-r60.mjs handles bounded append and file identity
|
|
20
|
+
src/tool-audit.mjs remains the signed and sanitized audit source
|
|
21
|
+
|
|
22
|
+
reference study
|
|
23
|
+
D:\Projects\deadbyte-mcp\references
|
|
24
|
+
read-only comparison of remote MCP/Commander implementations
|
|
25
|
+
no donor code imported or copied into R192
|
|
26
|
+
|
|
27
|
+
verification
|
|
28
|
+
R192 focused 31 pass 0 fail
|
|
29
|
+
R192 extended release identity 60 pass 0 fail
|
|
30
|
+
full workspace regression not yet verified
|
|
31
|
+
protected Windows package test not yet verified
|
|
32
|
+
npm publication not yet verified
|
|
33
|
+
production activation not run
|
|
34
|
+
|
|
35
|
+
release constraints
|
|
36
|
+
0.15.71 remains the active rollback predecessor
|
|
37
|
+
no writes to installed production files or owner authority
|
|
38
|
+
do not publish before exact package verification
|
|
39
|
+
do not use npm success messages as proof of registry bytes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deadbyte-mcp",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.72",
|
|
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.",
|
package/scripts/deploy-r48.mjs
CHANGED
|
@@ -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
|
-
|
|
337
|
-
|
|
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,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,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 @@
|
|
|
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;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {spawnSync} from 'node:child_process';
|
|
2
|
+
import {fileURLToPath} from 'node:url';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
const root=path.resolve(fileURLToPath(new URL('..',import.meta.url)));
|
|
5
|
+
const files=['test/r192-live-log-hardening.test.mjs',
|
|
6
|
+
'test/remote-live-log-r37.test.mjs','test/r51-live-log-polling.test.mjs',
|
|
7
|
+
'test/remote-log-decode-r60.test.mjs'];
|
|
8
|
+
const r=spawnSync(process.execPath,['--test','--test-concurrency=1',...files],{cwd:root,encoding:'utf8',windowsHide:true,shell:false,timeout:130000,maxBuffer:700000});
|
|
9
|
+
console.log(JSON.stringify({state:r.status===0?'PASS':'FAIL',exit:r.status,error:r.error?.message??null,stdout:r.stdout?.slice(-16000),stderr:r.stderr?.slice(-4000)}));
|
|
10
|
+
if(r.error||r.status!==0)process.exitCode=1;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import {spawnSync} from 'node:child_process';import path from 'node:path';import {fileURLToPath} from 'node:url';
|
|
2
|
+
const root=path.resolve(fileURLToPath(new URL('..',import.meta.url)));
|
|
3
|
+
const tests=['r192-release-identity','r192-live-log-hardening','r130-release-security-contract','r132-release-identity','r153-prepublish-identity','r167-release-contract','r172-release-contract','r173-release-contract','r179-release-contract','r190-release-contract','r191-release-contract','process-policy-refresh','remote-live-log-r37','r51-live-log-polling'];
|
|
4
|
+
const r=spawnSync(process.execPath,['--test','--test-concurrency=1',...tests.map(t=>'test/'+t+'.test.mjs')],{
|
|
5
|
+
cwd:root,encoding:'utf8',windowsHide:true,shell:false,timeout:220000,maxBuffer:1400000});
|
|
6
|
+
console.log(JSON.stringify({status:r.status===0?'PASS':'FAIL',exit:r.status,error:r.error?.message??null,
|
|
7
|
+
stdout:r.stdout?.slice(-18000),stderr:r.stderr?.slice(-2200)}));
|
|
8
|
+
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
|
|
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});
|
package/src/deadbyte-cli.mjs
CHANGED
|
@@ -16,7 +16,7 @@ import { exportOfflineDiagnostics } from './r67-diagnostic-export.mjs';
|
|
|
16
16
|
import { verifyOfflineDiagnosticsZip } from './r67-diagnostics-verify.mjs';
|
|
17
17
|
import { parseActivePointer } from './release-slot.mjs';
|
|
18
18
|
import { printDoctor } from './doctor-r45.mjs';
|
|
19
|
-
import { classifyRemoteAuditOutcome, createLiveTimelineFilter, createLiveTimelineTracker, createLiveTimelineWriter, defaultForegroundTimelineOptions, formatRemoteLogResetNotice, formatCompactAuditEvent, formatRemoteLifecycle, formatRemoteToolCall, formatRuntimeDiagnosticLine, selectLiveLogNames } from './remote-live-log.mjs';
|
|
19
|
+
import { classifyRemoteAuditOutcome, createLiveTimelineFilter, createLiveTimelineTracker, createLiveTimelineWriter, defaultForegroundTimelineOptions, formatRemoteLogResetNotice, formatCompactAuditEvent, formatRemoteLifecycle, formatRemoteToolCall, formatRuntimeDiagnosticLine, selectLiveLogNames, pruneLiveLogReaders } from './remote-live-log.mjs';
|
|
20
20
|
import { prepareRemoteConsole, remoteDisplayText } from './remote-console.mjs';
|
|
21
21
|
import { ensureRuntimeCoherence } from './runtime-coherence.mjs';
|
|
22
22
|
import {selectR168OneShotRemotePath} from './remote-one-shot-coherence-r168.mjs';
|
|
@@ -414,6 +414,7 @@ async function tailRemoteLogs(root,signal,{journal=null,offsets=null,activityTra
|
|
|
414
414
|
const now=Date.now();
|
|
415
415
|
if(now>=nextDiscoveryAt){
|
|
416
416
|
liveFiles=await listLogFiles(root);
|
|
417
|
+
pruneLiveLogReaders(activeOffsets,partialLines,liveFiles);
|
|
417
418
|
nextDiscoveryAt=now+LIVE_LOG_DISCOVERY_INTERVAL_MS;
|
|
418
419
|
}
|
|
419
420
|
for(const file of liveFiles){
|
|
@@ -946,7 +947,7 @@ async function readR190Evidence(file){
|
|
|
946
947
|
}catch(error){if(error?.code==='ENOENT')return null;throw error;}
|
|
947
948
|
}
|
|
948
949
|
async function runRemoteForegroundRecovery(expectedMarkerSha256){
|
|
949
|
-
|
|
950
|
+
// Reject writable/untrusted CLI bytes before reading controller state.
|
|
950
951
|
const thisFile=fileURLToPath(import.meta.url);
|
|
951
952
|
const protectedFiles=[process.execPath,thisFile,path.join(CURRENT_PACKAGE_ROOT,'MANIFEST.SHA256'),
|
|
952
953
|
path.join(CURRENT_PACKAGE_ROOT,'src','foreground-owner-recovery-r190.mjs'),
|
|
@@ -961,6 +962,7 @@ async function runRemoteForegroundRecovery(expectedMarkerSha256){
|
|
|
961
962
|
catch(error){throw new Error(`R190_PROTECTED_RECOVERY_REQUIRED: ${boundedSingleLine(error?.message||error,512)}`);}
|
|
962
963
|
if(!installation.trusted)throw new Error('R190_PROTECTED_RECOVERY_REQUIRED: package ACL is not R89-trusted');
|
|
963
964
|
await verifyPackageDecisionManifest({root:CURRENT_PACKAGE_ROOT,expectedVersion:DEADBYTE_VERSION});
|
|
965
|
+
const ctx=await remoteContext();
|
|
964
966
|
const evidenceDir=path.join(ctx.root,'evidence','foreground-recovery-r190');
|
|
965
967
|
const intentPath=path.join(evidenceDir,`${expectedMarkerSha256}.intent.json`);
|
|
966
968
|
const terminalPath=path.join(evidenceDir,`${expectedMarkerSha256}.terminal.json`);
|