deadbyte-mcp 0.15.1 → 0.15.3
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 +95 -64
- package/PROVENANCE.json +6 -5
- package/README.txt +36 -20
- package/RELEASE.json +24 -8
- package/SBOM.cdx.json +3 -3
- package/controller/README.TXT +2 -2
- package/controller/deadbyte-controller.ps1 +50 -2
- package/controller/deadbyte-process-policy.json +63 -1
- package/docs/ARCHITECTURE.md +3 -4
- package/package.json +88 -86
- package/scripts/autonomous-build.ps1 +1 -0
- package/scripts/autonomous-tests.ps1 +1 -0
- package/scripts/check-agent-backend-r46.mjs +77 -0
- package/scripts/check-atomic-resource-r46.mjs +84 -0
- package/scripts/check-autonomous-race-r46.mjs +160 -0
- package/scripts/check-coding-task-deadline-r46.mjs +59 -0
- package/scripts/check-deadline-cancellation-r46.mjs +49 -0
- package/scripts/check-process-deadline-r46.mjs +52 -0
- package/scripts/check-r46-background.mjs +5 -0
- package/scripts/deferred-slot-operation-r46.mjs +126 -0
- package/scripts/extract-r46-failures.mjs +5 -0
- package/scripts/final-closure-r46.mjs +98 -0
- package/scripts/final-closure-verify-r46.mjs +119 -0
- package/scripts/full-regression-r46.mjs +28 -0
- package/scripts/gate-windows-r46.ps1 +58 -0
- package/scripts/inspect-r46-active.mjs +2 -0
- package/scripts/r47-core-failures.mjs +1 -0
- package/scripts/refresh-process-policy.mjs +64 -7
- package/scripts/release-manifest.mjs +1 -1
- package/scripts/release-parity-r46.mjs +187 -0
- package/scripts/run-r46-full-regression-background.mjs +7 -0
- package/scripts/run-r46-windows-gate-background.mjs +6 -0
- package/scripts/run-r46-windows-gate-background.ps1 +10 -0
- package/scripts/windows-gate-evidence-r46.mjs +111 -0
- package/scripts/workload-contract-regression-r47.mjs +14 -0
- package/scripts/workload-stream-regression.mjs +16 -0
- package/scripts/workload-substrate-r47-regression.mjs +12 -0
- package/src/agent-backend-r44.mjs +75 -10
- package/src/atomic-mutation.mjs +55 -0
- package/src/autonomous-mcp-tools.mjs +4 -3
- package/src/autonomous-output-contracts.mjs +16 -3
- package/src/autonomous-runtime.mjs +83 -30
- package/src/capability-ledger.mjs +1 -0
- package/src/coding-mcp-tools.mjs +2 -2
- package/src/coding-output-contracts.mjs +18 -4
- package/src/coding-plane.mjs +3 -24
- package/src/coding-search.mjs +11 -2
- package/src/coding-task-runtime.mjs +41 -6
- package/src/compact-gateway-mcp-tools.mjs +7 -5
- package/src/deadbyte-cli.mjs +7 -3
- package/src/deadline-cancellation.mjs +83 -0
- package/src/machine-fs-mcp-tools.mjs +3 -3
- package/src/machine-fs-output-contracts.mjs +1 -1
- package/src/machine-fs-read-worker.mjs +46 -0
- package/src/machine-fs-smoke-client.mjs +1 -1
- package/src/machine-fs.mjs +66 -33
- package/src/mcp-server.mjs +10 -0
- package/src/mcp-smoke-client.mjs +4 -1
- package/src/observation-runtime.mjs +25 -4
- package/src/observation-smoke-client.mjs +1 -1
- package/src/process-mcp-tools.mjs +29 -8
- package/src/process-output-contracts.mjs +43 -3
- package/src/process-policy.mjs +3 -1
- package/src/process-runtime.mjs +152 -23
- package/src/process-smoke-client.mjs +67 -22
- package/src/release-generation.mjs +22 -3
- package/src/remote-device-r44.mjs +53 -15
- package/src/remote-mcp-smoke-client.mjs +1 -1
- package/src/resource-identity.mjs +59 -0
- package/src/runtime-update.mjs +526 -162
- package/src/stdio-console-guard.mjs +24 -0
- package/src/version.mjs +1 -1
- package/src/workload-substrate.mjs +87 -0
- package/test/cli-entrypoint.test.mjs +3 -3
- package/test/coding-runtime.test.mjs +12 -0
- package/test/coding-search-r36.test.mjs +7 -0
- package/test/compact-gateway-r36.test.mjs +28 -0
- package/test/core.test.mjs +1 -1
- package/test/full-max-catalog-r46.test.mjs +92 -0
- package/test/helpers/autonomous-r34-fixture.mjs +10 -1
- package/test/machine-fs-mcp-tools.test.mjs +4 -1
- package/test/machine-fs-runtime.test.mjs +18 -2
- package/test/observation-runtime.test.mjs +29 -2
- package/test/process-mcp-tools.test.mjs +27 -6
- package/test/process-policy-refresh.test.mjs +87 -10
- package/test/process-runtime.test.mjs +129 -2
- package/test/process-supervision.test.mjs +4 -2
- package/test/production-docs.test.mjs +3 -3
- package/test/r33-finalization.test.mjs +3 -3
- package/test/r45-finalization.test.mjs +1 -1
- package/test/release-generation.test.mjs +25 -11
- package/test/release-version.test.mjs +99 -44
- package/test/remote-device-r44.test.mjs +75 -0
- package/test/remote-r24-catalog.test.mjs +2 -2
- package/test/runtime-self-update.test.mjs +118 -1
- package/test/workload-substrate.test.mjs +22 -0
package/RELEASE.json
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "deadbyte.release.v1",
|
|
3
3
|
"name": "deadbyte-mcp",
|
|
4
|
-
"version": "0.15.
|
|
5
|
-
"train": "
|
|
6
|
-
"label": "
|
|
4
|
+
"version": "0.15.2",
|
|
5
|
+
"train": "R46",
|
|
6
|
+
"label": "FILELESS POWERSHELL PRODUCT BASELINE",
|
|
7
7
|
"protocol_revision": "2026-07-28",
|
|
8
8
|
"parent": {
|
|
9
|
-
"release_id": "v0.15.
|
|
10
|
-
"manifest_sha256": "
|
|
11
|
-
"generation_manifest_sha256": "
|
|
12
|
-
"final_closure_sha256": "533b7e0ff9ded04086dd90ed34e3b87bc427acc3c55c25bb9f4ec66cb448e667"
|
|
9
|
+
"release_id": "v0.15.1-d55f00b5144dc31a",
|
|
10
|
+
"manifest_sha256": "d55f00b5144dc31a7fe39e4dc60d640a94780da6aaeca0918e87636b816d7854",
|
|
11
|
+
"generation_manifest_sha256": "00cde7bf540cc2804d679a39040d5b07193c5f8a0d49cac3b882402f8f4e6ad8"
|
|
13
12
|
},
|
|
14
13
|
"platform": {
|
|
15
14
|
"primary": "win32",
|
|
@@ -32,6 +31,23 @@
|
|
|
32
31
|
"pci"
|
|
33
32
|
],
|
|
34
33
|
"compact_tool_count": 43,
|
|
35
|
-
"full_tool_count":
|
|
34
|
+
"full_tool_count": 83,
|
|
35
|
+
"process_profiles": [
|
|
36
|
+
"ping_hold",
|
|
37
|
+
"powershell",
|
|
38
|
+
"powershell_repl"
|
|
39
|
+
],
|
|
40
|
+
"powershell_fileless": true,
|
|
41
|
+
"powershell_source_max_arg_bytes": 8192,
|
|
42
|
+
"powershell_persistent_repl": true,
|
|
43
|
+
"process_raw_input_profile_opt_in": true,
|
|
44
|
+
"process_tail_reads": true,
|
|
45
|
+
"process_wait_reads": true,
|
|
46
|
+
"process_chunked_output_ring": true,
|
|
47
|
+
"remote_reachability_ttl": true,
|
|
48
|
+
"remote_probe_timeout_retry": true,
|
|
49
|
+
"remote_dispatch_timeout_no_retry": true,
|
|
50
|
+
"observation_search_session_ttl": true,
|
|
51
|
+
"observation_search_session_cap": 128
|
|
36
52
|
}
|
|
37
53
|
}
|
package/SBOM.cdx.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bomFormat": "CycloneDX",
|
|
3
3
|
"specVersion": "1.6",
|
|
4
|
-
"serialNumber": "urn:uuid:deadbyte-mcp-
|
|
4
|
+
"serialNumber": "urn:uuid:deadbyte-mcp-r46-0-15-2",
|
|
5
5
|
"version": 1,
|
|
6
6
|
"metadata": {
|
|
7
7
|
"component": {
|
|
8
8
|
"type": "application",
|
|
9
9
|
"name": "deadbyte-mcp",
|
|
10
|
-
"version": "0.15.
|
|
10
|
+
"version": "0.15.2"
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"components": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
{
|
|
35
35
|
"type": "file",
|
|
36
36
|
"name": "deadbyte-hardware-observer-r45.exe",
|
|
37
|
-
"version": "0.15.
|
|
37
|
+
"version": "0.15.2",
|
|
38
38
|
"hashes": [
|
|
39
39
|
{
|
|
40
40
|
"alg": "SHA-256",
|
package/controller/README.TXT
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
DEADBYTE MCP V0.15.
|
|
1
|
+
DEADBYTE MCP V0.15.2 / R46 CONTROLLER
|
|
2
2
|
====================================
|
|
3
3
|
|
|
4
4
|
ENTRY POINT
|
|
5
5
|
-----------
|
|
6
6
|
Primary operator entry point:
|
|
7
7
|
|
|
8
|
-
npx -y deadbyte-mcp@0.15.
|
|
8
|
+
npx -y deadbyte-mcp@0.15.2 remote
|
|
9
9
|
|
|
10
10
|
Bare `remote` is a foreground device session. It starts the verified runtime, arms process,
|
|
11
11
|
coding, and autonomous authority, verifies those three planes are ARMED, and requires Desktop and Host
|
|
@@ -16,6 +16,40 @@ $LogDir = Join-Path $RuntimeDir 'logs'
|
|
|
16
16
|
$ConfigPath = if ($env:DEADBYTE_CONTROLLER_CONFIG) { $env:DEADBYTE_CONTROLLER_CONFIG } else { Join-Path $Root 'deadbyte-controller.config.psd1' }
|
|
17
17
|
|
|
18
18
|
function Fail([string]$Message) { throw "DEADBYTE controller: $Message" }
|
|
19
|
+
|
|
20
|
+
function Get-ControllerMutationMutexName {
|
|
21
|
+
$normalized = ([System.IO.Path]::GetFullPath($RuntimeDir)).TrimEnd('\\').ToLowerInvariant()
|
|
22
|
+
$sha = [System.Security.Cryptography.SHA256]::Create()
|
|
23
|
+
try {
|
|
24
|
+
$bytes = [System.Text.Encoding]::UTF8.GetBytes($normalized)
|
|
25
|
+
$digest = $sha.ComputeHash($bytes)
|
|
26
|
+
} finally {
|
|
27
|
+
$sha.Dispose()
|
|
28
|
+
}
|
|
29
|
+
$hex = ([System.BitConverter]::ToString($digest)).Replace('-', '').ToLowerInvariant().Substring(0, 24)
|
|
30
|
+
return "Local\DEADBYTE-MCP-Controller-$hex"
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function Invoke-WithControllerMutationLock([string]$Name, [scriptblock]$Body) {
|
|
34
|
+
$mutexName = Get-ControllerMutationMutexName
|
|
35
|
+
$mutex = New-Object System.Threading.Mutex($false, $mutexName)
|
|
36
|
+
$held = $false
|
|
37
|
+
try {
|
|
38
|
+
try {
|
|
39
|
+
$held = $mutex.WaitOne([TimeSpan]::FromSeconds(180))
|
|
40
|
+
} catch [System.Threading.AbandonedMutexException] {
|
|
41
|
+
$held = $true
|
|
42
|
+
}
|
|
43
|
+
if (-not $held) { Fail "controller mutation lock timeout for '$Name'" }
|
|
44
|
+
& $Body
|
|
45
|
+
} finally {
|
|
46
|
+
if ($held) {
|
|
47
|
+
try { $mutex.ReleaseMutex() } catch {}
|
|
48
|
+
}
|
|
49
|
+
$mutex.Dispose()
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
19
53
|
function Ensure-Directory([string]$Path) { if (-not (Test-Path -LiteralPath $Path -PathType Container)) { New-Item -ItemType Directory -Path $Path -Force | Out-Null } }
|
|
20
54
|
function Ledger-Path([string]$Name) { Join-Path $RuntimeDir ("{0}.instance.json" -f $Name.ToLowerInvariant()) }
|
|
21
55
|
function Log-Path([string]$Name, [string]$Kind) { Join-Path $LogDir ("{0}.{1}.log" -f $Name.ToLowerInvariant(), $Kind) }
|
|
@@ -1275,7 +1309,7 @@ function Clean-Stale {
|
|
|
1275
1309
|
}
|
|
1276
1310
|
}
|
|
1277
1311
|
|
|
1278
|
-
function Run-
|
|
1312
|
+
function Run-CommandCore([string]$Name) {
|
|
1279
1313
|
$cfg = Get-Config
|
|
1280
1314
|
Assert-ControllerRootBound $cfg
|
|
1281
1315
|
Ensure-Directory $RuntimeDir; Ensure-Directory $LogDir
|
|
@@ -1318,6 +1352,20 @@ function Run-Command([string]$Name) {
|
|
|
1318
1352
|
}
|
|
1319
1353
|
}
|
|
1320
1354
|
|
|
1355
|
+
function Run-Command([string]$Name) {
|
|
1356
|
+
$mutating = $Name -in @(
|
|
1357
|
+
'start','resume','park','stop','restart','toggle','clean',
|
|
1358
|
+
'armhost','disarmhost','armprocess','disarmprocess','armcoding','disarmcoding',
|
|
1359
|
+
'armautonomous','disarmautonomous','armdesktop','disarmdesktop',
|
|
1360
|
+
'supervisorstart','supervisorstop','supervisorrecover'
|
|
1361
|
+
)
|
|
1362
|
+
if (-not $mutating) {
|
|
1363
|
+
Run-CommandCore $Name
|
|
1364
|
+
return
|
|
1365
|
+
}
|
|
1366
|
+
Invoke-WithControllerMutationLock $Name { Run-CommandCore $Name }
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1321
1369
|
if ($Command -ne 'menu') {
|
|
1322
1370
|
$recordsStartFailure = $Command -in @('start','resume','restart')
|
|
1323
1371
|
if ($recordsStartFailure) { Remove-Item -LiteralPath (Controller-StartFailurePath) -Force -ErrorAction SilentlyContinue }
|
|
@@ -1336,7 +1384,7 @@ while ($true) {
|
|
|
1336
1384
|
Clear-Host
|
|
1337
1385
|
$cfg = Get-Config
|
|
1338
1386
|
Assert-ControllerRootBound $cfg
|
|
1339
|
-
Write-Host 'DEADBYTE MCP ON-DEMAND CONTROLLER V0.15.
|
|
1387
|
+
Write-Host 'DEADBYTE MCP ON-DEMAND CONTROLLER V0.15.2 / R46'
|
|
1340
1388
|
Write-Host '======================================'
|
|
1341
1389
|
Show-State $cfg | Out-Null
|
|
1342
1390
|
Write-Host ''
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"profiles": {
|
|
21
21
|
"ping_hold": {
|
|
22
|
-
"executable": "C:\\
|
|
22
|
+
"executable": "C:\\WINDOWS\\System32\\cmd.exe",
|
|
23
23
|
"executable_sha256": "97ac98b1a92c286054cce55239cfccdfc23a5517bd07fe693072c9ca96c7dabb",
|
|
24
24
|
"root_ids": [
|
|
25
25
|
"core"
|
|
@@ -42,6 +42,68 @@
|
|
|
42
42
|
"input_actions": {
|
|
43
43
|
"ping": "echo DEADBYTE_ACTION_PING\r\n"
|
|
44
44
|
}
|
|
45
|
+
},
|
|
46
|
+
"powershell": {
|
|
47
|
+
"executable": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
|
|
48
|
+
"executable_sha256": "8bb6fa8c283b4d92120b1ef249a9b311b0f804d4cabbe9981159976c8be76a5e",
|
|
49
|
+
"root_ids": [
|
|
50
|
+
"core"
|
|
51
|
+
],
|
|
52
|
+
"prefix_args": [
|
|
53
|
+
"-NoLogo",
|
|
54
|
+
"-NoProfile",
|
|
55
|
+
"-NonInteractive",
|
|
56
|
+
"-Command"
|
|
57
|
+
],
|
|
58
|
+
"transport": "pipe",
|
|
59
|
+
"max_args": 1,
|
|
60
|
+
"max_arg_bytes": 8192,
|
|
61
|
+
"max_sessions": 4,
|
|
62
|
+
"max_input_bytes": 65536,
|
|
63
|
+
"max_retained_output_bytes": 1048576,
|
|
64
|
+
"env_allow": [
|
|
65
|
+
"PATH",
|
|
66
|
+
"TEMP",
|
|
67
|
+
"TMP",
|
|
68
|
+
"SystemRoot",
|
|
69
|
+
"WINDIR",
|
|
70
|
+
"USERPROFILE",
|
|
71
|
+
"PSModulePath",
|
|
72
|
+
"COMSPEC",
|
|
73
|
+
"PATHEXT"
|
|
74
|
+
],
|
|
75
|
+
"input_actions": {}
|
|
76
|
+
},
|
|
77
|
+
"powershell_repl": {
|
|
78
|
+
"executable": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
|
|
79
|
+
"executable_sha256": "8bb6fa8c283b4d92120b1ef249a9b311b0f804d4cabbe9981159976c8be76a5e",
|
|
80
|
+
"root_ids": [
|
|
81
|
+
"core"
|
|
82
|
+
],
|
|
83
|
+
"prefix_args": [
|
|
84
|
+
"-NoLogo",
|
|
85
|
+
"-NoProfile",
|
|
86
|
+
"-NonInteractive"
|
|
87
|
+
],
|
|
88
|
+
"transport": "pipe",
|
|
89
|
+
"allow_raw_input": true,
|
|
90
|
+
"max_args": 0,
|
|
91
|
+
"max_arg_bytes": 256,
|
|
92
|
+
"max_sessions": 2,
|
|
93
|
+
"max_input_bytes": 65536,
|
|
94
|
+
"max_retained_output_bytes": 4194304,
|
|
95
|
+
"env_allow": [
|
|
96
|
+
"PATH",
|
|
97
|
+
"TEMP",
|
|
98
|
+
"TMP",
|
|
99
|
+
"SystemRoot",
|
|
100
|
+
"WINDIR",
|
|
101
|
+
"USERPROFILE",
|
|
102
|
+
"PSModulePath",
|
|
103
|
+
"COMSPEC",
|
|
104
|
+
"PATHEXT"
|
|
105
|
+
],
|
|
106
|
+
"input_actions": {}
|
|
45
107
|
}
|
|
46
108
|
}
|
|
47
109
|
}
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# DEADBYTE MCP V0.15.
|
|
1
|
+
# DEADBYTE MCP V0.15.2 / R46 ARCHITECTURE
|
|
2
2
|
|
|
3
3
|
```mermaid
|
|
4
4
|
flowchart TD
|
|
@@ -9,7 +9,7 @@ flowchart TD
|
|
|
9
9
|
D --> MI[Optional Machine 4 Tools]
|
|
10
10
|
D --> F[Optional Host 3 Tools]
|
|
11
11
|
D --> G[Optional Agent 7 Tools]
|
|
12
|
-
D --> PR[Optional Process
|
|
12
|
+
D --> PR[Optional Process 7 Tools]
|
|
13
13
|
D --> V[Optional Coding 22 Tools]
|
|
14
14
|
D --> MF[Optional Machine FS 8 Tools]
|
|
15
15
|
D --> OB[Optional Observation 6 Tools]
|
|
@@ -59,8 +59,7 @@ invocation may recover a stale owner only when no live guardian remains.
|
|
|
59
59
|
## Exact capability catalogs
|
|
60
60
|
|
|
61
61
|
Only complete combinations of base plus optional machine, host, agent, process, coding,
|
|
62
|
-
machine-filesystem, observation, and autonomous surfaces are valid at the HTTP bridge.
|
|
63
|
-
enabled R34 runtime exposes exactly 73 tools. Process authority is independently granted;
|
|
62
|
+
machine-filesystem, observation, and autonomous surfaces are valid at the HTTP bridge. The current fully enabled R46 runtime exposes exactly 83 full tools and 43 compact tools. Process authority is independently granted;
|
|
64
63
|
machine-filesystem and observation reuse coding-policy roots; autonomous requires the complete
|
|
65
64
|
coding surface. Partial, dependency-invalid, unknown, or extra catalogs fail closed.
|
|
66
65
|
|
package/package.json
CHANGED
|
@@ -1,86 +1,88 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "deadbyte-mcp",
|
|
3
|
+
"version": "0.15.3",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
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.",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": "\u003e=22"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "node --test test/*.test.mjs",
|
|
12
|
+
"manifest:write": "node scripts/release-manifest.mjs write",
|
|
13
|
+
"manifest:verify": "node scripts/release-manifest.mjs verify",
|
|
14
|
+
"r41:parent:verify": "node scripts/verify-r41-parent.mjs",
|
|
15
|
+
"r41:memory:verify": "node scripts/verify-memory-r41.mjs",
|
|
16
|
+
"r42:parent:verify": "node scripts/verify-r42-parent.mjs",
|
|
17
|
+
"r42:eval": "node scripts/agent-eval-r42.mjs",
|
|
18
|
+
"self-update:runtime": "node scripts/runtime-self-update.mjs",
|
|
19
|
+
"self-update:deferred": "node scripts/deferred-slot-operation-r46.mjs",
|
|
20
|
+
"release:parity": "node scripts/release-parity-r46.mjs",
|
|
21
|
+
"release:final:write": "node scripts/final-closure-r46.mjs",
|
|
22
|
+
"release:final:verify": "node scripts/final-closure-verify-r46.mjs",
|
|
23
|
+
"proof": "node src/proof-cli.mjs workspaces/demo input.txt",
|
|
24
|
+
"verify": "node src/verifier-cli.mjs workspaces/demo evidence/latest.json",
|
|
25
|
+
"trust:init": "node src/trust-init.mjs",
|
|
26
|
+
"mcp": "node src/mcp-server.mjs",
|
|
27
|
+
"mcp:smoke": "node src/mcp-smoke-client.mjs",
|
|
28
|
+
"mcp:agent:smoke": "node --test test/agent-runtime.test.mjs test/agent-runtime-adversarial.test.mjs test/agent-runtime-crash.test.mjs test/agent-task-receipt.test.mjs",
|
|
29
|
+
"mcp:coding:smoke": "node --test test/coding-plane.test.mjs test/coding-plane-adversarial.test.mjs test/coding-runtime.test.mjs test/coding-crash.test.mjs",
|
|
30
|
+
"mcp:machine-fs:smoke": "node src/machine-fs-smoke-client.mjs",
|
|
31
|
+
"mcp:observation:smoke": "node src/observation-smoke-client.mjs",
|
|
32
|
+
"mcp:process:smoke": "node src/process-smoke-client.mjs",
|
|
33
|
+
"process:policy:refresh": "node scripts/refresh-process-policy.mjs",
|
|
34
|
+
"mcp:autonomous:smoke": "node --test test/autonomous-runtime.test.mjs test/autonomous-loop.test.mjs test/autonomous-adversarial.test.mjs test/autonomous-supervisor-integration.test.mjs test/native-diff.test.mjs",
|
|
35
|
+
"containment:build": "powershell -NoProfile -ExecutionPolicy Bypass -File scripts/build-containment.ps1",
|
|
36
|
+
"containment:smoke": "node src/containment-smoke.mjs appcontainer",
|
|
37
|
+
"containment:bootstrap": "node src/containment-bootstrap.mjs",
|
|
38
|
+
"containment:smoke:lpac": "node src/containment-smoke.mjs lpac",
|
|
39
|
+
"containment:smoke:appcontainer": "node src/containment-smoke.mjs appcontainer",
|
|
40
|
+
"containment:construction": "node src/containment-construction.mjs",
|
|
41
|
+
"containment:child-control": "node src/containment-child-control.mjs",
|
|
42
|
+
"contained:run": "node src/contained-cli.mjs workspaces/demo input.txt",
|
|
43
|
+
"contained:smoke": "node src/contained-smoke.mjs",
|
|
44
|
+
"mcp:contained:smoke": "node src/mcp-contained-smoke-client.mjs",
|
|
45
|
+
"gate:windows": "powershell -NoProfile -ExecutionPolicy Bypass -File scripts/gate-windows-r46.ps1",
|
|
46
|
+
"authority:smoke": "node src/authority-smoke.mjs",
|
|
47
|
+
"mcp:remote:smoke": "node src/remote-mcp-smoke-client.mjs",
|
|
48
|
+
"mcp:host:smoke": "node src/mcp-host-smoke-client.mjs",
|
|
49
|
+
"host:policy:init": "powershell -NoProfile -ExecutionPolicy Bypass -File scripts/init-host-policy.ps1",
|
|
50
|
+
"mcp:remote:host:smoke": "node src/remote-mcp-host-smoke-client.mjs",
|
|
51
|
+
"mcp:remote:autonomous:smoke": "node src/remote-mcp-autonomous-smoke-client.mjs",
|
|
52
|
+
"mcp:tunnel-compat:smoke": "node src/tunnel-stdio-compat-smoke.mjs",
|
|
53
|
+
"audit:verify": "node src/deadbyte-cli.mjs audit verify",
|
|
54
|
+
"audit:status": "node src/deadbyte-cli.mjs audit status",
|
|
55
|
+
"desktop:build": "powershell -NoProfile -ExecutionPolicy Bypass -File scripts/build-desktop-r40.ps1",
|
|
56
|
+
"desktop:policy:refresh": "powershell -NoProfile -ExecutionPolicy Bypass -File scripts/init-desktop-policy-r40.ps1",
|
|
57
|
+
"r43:parent:verify": "node scripts/verify-r43-parent.mjs",
|
|
58
|
+
"r43:full:test": "node scripts/full-regression-r43.mjs",
|
|
59
|
+
"r44:parent:verify": "node scripts/verify-r44-parent.mjs",
|
|
60
|
+
"r44:full:test": "node scripts/full-regression-r44.mjs",
|
|
61
|
+
"finalize:r44": "node scripts/finalize-r44.mjs",
|
|
62
|
+
"hardware:build": "powershell -NoProfile -ExecutionPolicy Bypass -File scripts/build-hardware-r45.ps1",
|
|
63
|
+
"doctor": "node src/deadbyte-cli.mjs doctor",
|
|
64
|
+
"r45:parent:verify": "node scripts/verify-r45-parent.mjs",
|
|
65
|
+
"r45:full:test": "node scripts/full-regression-r45.mjs",
|
|
66
|
+
"finalize:r45": "node scripts/finalize-r45.mjs",
|
|
67
|
+
"r46:fileless:test": "node --test --test-concurrency=1 test/process-policy.test.mjs test/process-policy-refresh.test.mjs test/release-generation.test.mjs test/process-runtime.test.mjs test/process-mcp-tools.test.mjs test/compact-gateway-r36.test.mjs test/capability-ledger-r36.test.mjs test/remote-device-r44.test.mjs test/observation-runtime.test.mjs test/observation-mcp-tools.test.mjs",
|
|
68
|
+
"r46:full:test": "node scripts/full-regression-r46.mjs"
|
|
69
|
+
},
|
|
70
|
+
"bundleDependencies": [
|
|
71
|
+
"@modelcontextprotocol/server",
|
|
72
|
+
"@modelcontextprotocol/client",
|
|
73
|
+
"typescript",
|
|
74
|
+
"zod"
|
|
75
|
+
],
|
|
76
|
+
"dependencies": {
|
|
77
|
+
"@modelcontextprotocol/client": "2.0.0",
|
|
78
|
+
"@modelcontextprotocol/server": "2.0.0",
|
|
79
|
+
"typescript": "5.9.3",
|
|
80
|
+
"zod": "4.4.3"
|
|
81
|
+
},
|
|
82
|
+
"bin": {
|
|
83
|
+
"deadbyte-mcp": "src/deadbyte-cli.mjs"
|
|
84
|
+
},
|
|
85
|
+
"publishConfig": {
|
|
86
|
+
"access": "public"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -3,6 +3,7 @@ Set-StrictMode -Version 2.0
|
|
|
3
3
|
$root = Split-Path -Parent $PSScriptRoot
|
|
4
4
|
Push-Location $root
|
|
5
5
|
try {
|
|
6
|
+
$LASTEXITCODE = 0
|
|
6
7
|
& node.exe --test test/autonomous-live-fixture.test.mjs
|
|
7
8
|
if ($LASTEXITCODE -ne 0) { throw "autonomous fixture test failed with exit code $LASTEXITCODE" }
|
|
8
9
|
Write-Output 'R24 QUICK TEST PASS'
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { EventEmitter } from 'node:events';
|
|
2
|
+
import { mkdtemp, readFile, rm } from 'node:fs/promises';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { createAgentBackendR44 } from '../src/agent-backend-r44.mjs';
|
|
6
|
+
|
|
7
|
+
const sleep=ms=>new Promise(resolve=>setTimeout(resolve,ms));
|
|
8
|
+
const assert=(ok,message)=>{if(!ok)throw new Error(message);};
|
|
9
|
+
|
|
10
|
+
class FakeTransport extends EventEmitter {
|
|
11
|
+
constructor(){super();this.sent=[];this.stopped=false;}
|
|
12
|
+
async start(){this.started=true;}
|
|
13
|
+
async send(message){
|
|
14
|
+
this.sent.push(message);
|
|
15
|
+
if(message.method==='slow.deadline'){
|
|
16
|
+
setTimeout(()=>this.emit('message',{id:message.id,result:{late:true}}),180);
|
|
17
|
+
}
|
|
18
|
+
if(message.method==='slow.cancel'){
|
|
19
|
+
setTimeout(()=>this.emit('message',{id:message.id,result:{late:true}}),180);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
async stop(){this.stopped=true;this.emit('exit',{code:0,signal:null});}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const dir=await mkdtemp(path.join(os.tmpdir(),'deadbyte-agent-r46-'));
|
|
26
|
+
let transport;
|
|
27
|
+
const backend=await createAgentBackendR44({
|
|
28
|
+
backendId:'r46-agent-test',
|
|
29
|
+
stateDir:dir,
|
|
30
|
+
transportFactory:async()=>{transport=new FakeTransport();return transport;}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
await backend.start();
|
|
34
|
+
|
|
35
|
+
let deadlineError=null;
|
|
36
|
+
try{await backend.request({method:'slow.deadline',params:{x:1},timeoutMs:100});}
|
|
37
|
+
catch(error){deadlineError=error;}
|
|
38
|
+
assert(deadlineError?.message==='agent backend request deadline exceeded','deadline did not produce deadline-specific error');
|
|
39
|
+
await sleep(120);
|
|
40
|
+
const afterDeadline=await backend.status();
|
|
41
|
+
const deadlineRecord=Object.values(afterDeadline.requests).find(x=>x.method==='slow.deadline');
|
|
42
|
+
assert(deadlineRecord?.state==='failed','deadline request state changed unexpectedly');
|
|
43
|
+
assert(deadlineRecord?.termination?.deadline_exceeded===true,'deadline flag missing');
|
|
44
|
+
assert(deadlineRecord?.termination?.physical_termination===false,'deadline was incorrectly treated as physical termination');
|
|
45
|
+
assert(deadlineRecord?.termination?.verified===false,'deadline was incorrectly treated as verified termination');
|
|
46
|
+
|
|
47
|
+
const cancelPromise=backend.request({method:'slow.cancel',params:{x:2},timeoutMs:500});
|
|
48
|
+
await sleep(20);
|
|
49
|
+
const pendingBeforeCancel=await backend.status();
|
|
50
|
+
const cancelId=Object.entries(pendingBeforeCancel.requests).find(([,x])=>x.method==='slow.cancel')?.[0];
|
|
51
|
+
assert(cancelId,'cancel request was not persisted as pending');
|
|
52
|
+
const cancelResult=await backend.cancelRequest(cancelId,{reason:'test_cancel'});
|
|
53
|
+
assert(cancelResult.status==='requested','cancel request was not accepted');
|
|
54
|
+
let cancelError=null;
|
|
55
|
+
try{await cancelPromise;}catch(error){cancelError=error;}
|
|
56
|
+
assert(cancelError?.message==='agent backend request cancelled','cancellation did not produce cancellation-specific error');
|
|
57
|
+
await sleep(220);
|
|
58
|
+
const afterCancel=await backend.status();
|
|
59
|
+
const cancelRecord=afterCancel.requests[cancelId];
|
|
60
|
+
assert(cancelRecord?.state==='failed','cancelled request state changed unexpectedly');
|
|
61
|
+
assert(cancelRecord?.termination?.cancellation_requested===true,'cancellation flag missing');
|
|
62
|
+
assert(cancelRecord?.termination?.deadline_exceeded===false,'cancellation was misclassified as deadline');
|
|
63
|
+
assert(cancelRecord?.termination?.physical_termination===false,'cancellation was incorrectly treated as physical termination');
|
|
64
|
+
|
|
65
|
+
await backend.close();
|
|
66
|
+
const state=JSON.parse(await readFile(backend.state_file,'utf8'));
|
|
67
|
+
assert(state.requests[Object.keys(state.requests).find(id=>state.requests[id].method==='slow.deadline')].termination.physical_termination===false,'deadline termination invariant not persisted');
|
|
68
|
+
|
|
69
|
+
await rm(dir,{recursive:true,force:true});
|
|
70
|
+
console.log(JSON.stringify({
|
|
71
|
+
status:'passed',
|
|
72
|
+
invariant_timeout_not_termination:deadlineRecord.termination.physical_termination===false,
|
|
73
|
+
invariant_cancellation_not_termination:cancelRecord.termination.physical_termination===false,
|
|
74
|
+
invariant_late_response_ignored:true,
|
|
75
|
+
deadline_state:deadlineRecord.state,
|
|
76
|
+
cancellation_state:cancelRecord.state
|
|
77
|
+
}));
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { mkdtemp, readFile, rm, writeFile } from 'node:fs/promises';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { atomicMutation } from '../src/atomic-mutation.mjs';
|
|
6
|
+
import { createResourceIdentity } from '../src/resource-identity.mjs';
|
|
7
|
+
import '../src/coding-plane.mjs';
|
|
8
|
+
import '../src/machine-fs.mjs';
|
|
9
|
+
|
|
10
|
+
const dir = await mkdtemp(path.join(os.tmpdir(), 'deadbyte-r46-atomic-'));
|
|
11
|
+
try {
|
|
12
|
+
const target = path.join(dir, 'sample.txt');
|
|
13
|
+
await writeFile(target, 'before', 'utf8');
|
|
14
|
+
const beforeHash = '3a6eb0790f39ac87c94f3856b2dd2c5d1102f4d6a0b8c3f0f0e8d7a1c5d0c4f5';
|
|
15
|
+
const actualBefore = (await readFile(target)).toString('utf8');
|
|
16
|
+
assert.equal(actualBefore, 'before');
|
|
17
|
+
|
|
18
|
+
const hash = async file => {
|
|
19
|
+
const { createHash } = await import('node:crypto');
|
|
20
|
+
return createHash('sha256').update(await readFile(file)).digest('hex');
|
|
21
|
+
};
|
|
22
|
+
const expected = await hash(target);
|
|
23
|
+
const state = async file => ({ exists: true, sha256: await hash(file), bytes: (await readFile(file)).length });
|
|
24
|
+
const check = (value, wanted) => {
|
|
25
|
+
if (value.sha256 !== wanted) throw new Error('precondition mismatch');
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const result = await atomicMutation({
|
|
29
|
+
target,
|
|
30
|
+
bytes: Buffer.from('after', 'utf8'),
|
|
31
|
+
expected,
|
|
32
|
+
readState: state,
|
|
33
|
+
assertExpected: check,
|
|
34
|
+
tempTag: 'r46-check'
|
|
35
|
+
});
|
|
36
|
+
assert.equal(result.before.sha256, expected);
|
|
37
|
+
assert.equal(result.after.sha256, await hash(target));
|
|
38
|
+
assert.equal(await readFile(target, 'utf8'), 'after');
|
|
39
|
+
|
|
40
|
+
const a = createResourceIdentity({
|
|
41
|
+
rootId: 'root-a',
|
|
42
|
+
relativePath: 'x/file.txt',
|
|
43
|
+
canonicalPath: 'C:/root-a/x/file.txt',
|
|
44
|
+
kind: 'file',
|
|
45
|
+
exists: true,
|
|
46
|
+
size: 5,
|
|
47
|
+
contentSha256: result.after.sha256
|
|
48
|
+
});
|
|
49
|
+
const b = createResourceIdentity({
|
|
50
|
+
rootId: 'root-b',
|
|
51
|
+
relativePath: 'x/file.txt',
|
|
52
|
+
canonicalPath: 'C:/root-b/x/file.txt',
|
|
53
|
+
kind: 'file',
|
|
54
|
+
exists: true,
|
|
55
|
+
size: 5,
|
|
56
|
+
contentSha256: result.after.sha256
|
|
57
|
+
});
|
|
58
|
+
assert.notEqual(a.resource_identity_sha256, b.resource_identity_sha256);
|
|
59
|
+
assert.equal(a.content_sha256, b.content_sha256);
|
|
60
|
+
|
|
61
|
+
let rejected = false;
|
|
62
|
+
try {
|
|
63
|
+
await atomicMutation({
|
|
64
|
+
target,
|
|
65
|
+
bytes: Buffer.from('third', 'utf8'),
|
|
66
|
+
expected: expected,
|
|
67
|
+
readState: state,
|
|
68
|
+
assertExpected: check,
|
|
69
|
+
tempTag: 'r46-stale-check'
|
|
70
|
+
});
|
|
71
|
+
} catch {
|
|
72
|
+
rejected = true;
|
|
73
|
+
}
|
|
74
|
+
assert.equal(rejected, true);
|
|
75
|
+
assert.equal(await readFile(target, 'utf8'), 'after');
|
|
76
|
+
console.log(JSON.stringify({
|
|
77
|
+
status: 'passed',
|
|
78
|
+
atomic_mutation: 'shared-primitive',
|
|
79
|
+
stale_precondition: 'rejected',
|
|
80
|
+
resource_identity: 'location-distinct-content-equal'
|
|
81
|
+
}));
|
|
82
|
+
} finally {
|
|
83
|
+
await rm(dir, { recursive: true, force: true });
|
|
84
|
+
}
|