deadbyte-mcp 0.14.0 → 0.15.1
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/AGENTS.md +11 -18
- package/CONTEXT.md +3 -3
- package/MANIFEST.SHA256 +156 -70
- package/PROVENANCE.json +10 -0
- package/R43-PARENT.json +20 -0
- package/R44-DONORS.json +99 -0
- package/R44-PARENT.json +18 -0
- package/R45-PARENT.json +18 -0
- package/README.txt +19 -14
- package/RELEASE.json +37 -0
- package/SBOM.cdx.json +46 -0
- package/TEST-MATRIX.json +31 -0
- package/bin/deadbyte-hardware-observer-r45.exe +0 -0
- package/bin/deadbyte-hardware-observer-r45.obj +0 -0
- package/controller/README.TXT +5 -6
- package/controller/deadbyte-controller.ps1 +2 -2
- package/docs/ARCHITECTURE.md +8 -1
- package/docs/R44-ARCHITECTURE.md +37 -0
- package/native/deadbyte-hardware-observer.cpp +308 -0
- package/package.json +18 -8
- package/scripts/autonomous-tests.ps1 +2 -2
- package/scripts/build-hardware-r45.ps1 +71 -0
- package/scripts/deferred-slot-operation-r43.mjs +126 -0
- package/scripts/deferred-slot-operation-r44.mjs +126 -0
- package/scripts/deferred-slot-operation-r45.mjs +126 -0
- package/scripts/derive-r45-parent.mjs +24 -0
- package/scripts/derive-r45-release.mjs +72 -0
- package/scripts/derive-r45-tests.mjs +20 -0
- package/scripts/final-closure-r43.mjs +115 -0
- package/scripts/final-closure-r44.mjs +121 -0
- package/scripts/final-closure-r45.mjs +121 -0
- package/scripts/final-closure-verify-r43.mjs +213 -0
- package/scripts/final-closure-verify-r44.mjs +220 -0
- package/scripts/final-closure-verify-r45.mjs +220 -0
- package/scripts/finalize-r43.mjs +217 -0
- package/scripts/finalize-r44.mjs +217 -0
- package/scripts/finalize-r45.mjs +219 -0
- package/scripts/full-regression-r43.mjs +20 -0
- package/scripts/full-regression-r44.mjs +20 -0
- package/scripts/full-regression-r45.mjs +20 -0
- package/scripts/full-regression-summary-r45.mjs +14 -0
- package/scripts/gate-windows-r43.ps1 +36 -0
- package/scripts/gate-windows-r44.ps1 +36 -0
- package/scripts/gate-windows-r45.ps1 +44 -0
- package/scripts/init-host-policy.ps1 +39 -1
- package/scripts/inspect-active-release-r45.mjs +20 -0
- package/scripts/release-manifest.mjs +3 -1
- package/scripts/release-parity-r43.mjs +218 -0
- package/scripts/release-parity-r44.mjs +242 -0
- package/scripts/release-parity-r45.mjs +253 -0
- package/scripts/release-parity-tests-r43.ps1 +8 -0
- package/scripts/release-parity-tests-r44.ps1 +8 -0
- package/scripts/release-parity-tests-r45.ps1 +8 -0
- package/scripts/verify-r43-parent.mjs +126 -0
- package/scripts/verify-r44-parent.mjs +142 -0
- package/scripts/verify-r45-parent.mjs +142 -0
- package/scripts/windows-gate-evidence-r43.mjs +55 -0
- package/scripts/windows-gate-evidence-r44.mjs +55 -0
- package/scripts/windows-gate-evidence-r45.mjs +60 -0
- package/src/agent-backend-r44.mjs +254 -0
- package/src/autonomous-output-contracts.mjs +1 -1
- package/src/autonomous-policy.mjs +41 -4
- package/src/autonomous-runtime.mjs +37 -19
- package/src/autonomous-supervisor-host.mjs +12 -2
- package/src/capability-ledger.mjs +3 -1
- package/src/codex-app-server-r44.mjs +154 -0
- package/src/coding-plane.mjs +66 -19
- package/src/compact-gateway-mcp-tools.mjs +4 -2
- package/src/deadbyte-cli.mjs +17 -9
- package/src/doctor-r45.mjs +65 -0
- package/src/durable-job-r44.mjs +145 -0
- package/src/external-job-provider-r44.mjs +126 -0
- package/src/host-plane.mjs +156 -87
- package/src/job-supervisor-host-r44.mjs +112 -0
- package/src/machine-fs-smoke-client.mjs +1 -1
- package/src/machine-fs.mjs +21 -10
- package/src/mcp-host-smoke-client.mjs +1 -1
- package/src/mcp-server.mjs +84 -26
- package/src/mcp-smoke-client.mjs +1 -1
- package/src/native-diff-v2.mjs +12 -7
- package/src/native-diff.mjs +32 -9
- package/src/observation-mcp-tools.mjs +5 -1
- package/src/observation-output-contracts.mjs +8 -0
- package/src/observation-runtime.mjs +33 -2
- package/src/observation-smoke-client.mjs +7 -3
- package/src/operator-surface.mjs +2 -2
- package/src/output-contracts.mjs +27 -11
- package/src/process-policy.mjs +19 -0
- package/src/process-runtime.mjs +5 -2
- package/src/process-smoke-client.mjs +2 -2
- package/src/provider-circuit.mjs +8 -2
- package/src/r44-compact-disarmed-probe.mjs +74 -0
- package/src/r44-full-surface-probe.mjs +34 -0
- package/src/r45-compact-disarmed-probe.mjs +74 -0
- package/src/r45-full-surface-probe.mjs +34 -0
- package/src/release-generation.mjs +1 -0
- package/src/remote-device-r44.mjs +205 -0
- package/src/remote-mcp-autonomous-smoke-client.mjs +4 -4
- package/src/remote-mcp-r44-parity-client.mjs +203 -0
- package/src/remote-mcp-r45-parity-client.mjs +206 -0
- package/src/remote-mcp-smoke-client.mjs +7 -4
- package/src/runtime-update.mjs +100 -39
- package/src/skill-mcp-tools-r44.mjs +37 -0
- package/src/skill-plane-r44.mjs +203 -0
- package/src/tunnel-stdio-compat-smoke.mjs +1 -1
- package/src/version.mjs +1 -1
- package/test/agent-backend-r44.test.mjs +115 -0
- package/test/agent-runtime.test.mjs +4 -3
- package/test/autonomous-loop.test.mjs +121 -11
- package/test/autonomous-runtime.test.mjs +3 -2
- package/test/capability-ledger-r36.test.mjs +3 -3
- package/test/cli-entrypoint.test.mjs +4 -4
- package/test/codex-app-server-r44.test.mjs +115 -0
- package/test/codex-autonomous-r44.test.mjs +87 -0
- package/test/coding-plane.test.mjs +3 -2
- package/test/coding-runtime.test.mjs +36 -1
- package/test/compact-catalog-r36.test.mjs +3 -3
- package/test/compact-max-catalog-r40.test.mjs +4 -2
- package/test/compact-max-catalog-r44.test.mjs +97 -0
- package/test/compact-max-catalog-r45.test.mjs +99 -0
- package/test/contained.test.mjs +23 -11
- package/test/controller.test.mjs +5 -1
- package/test/core.test.mjs +1 -1
- package/test/durable-job-r44.test.mjs +75 -0
- package/test/external-job-provider-r44.test.mjs +46 -0
- package/test/full-max-catalog-r40.test.mjs +5 -3
- package/test/full-max-catalog-r44.test.mjs +91 -0
- package/test/full-max-catalog-r45.test.mjs +91 -0
- package/test/hardware-observation-r45.test.mjs +44 -0
- package/test/host-inline-r45.test.mjs +67 -0
- package/test/host-plane.test.mjs +15 -1
- package/test/machine-mcp-integration.test.mjs +1 -0
- package/test/native-diff.test.mjs +28 -0
- package/test/observation-mcp-tools.test.mjs +4 -3
- package/test/output-schema.test.mjs +3 -2
- package/test/package-boundary.test.mjs +1 -1
- package/test/process-policy.test.mjs +22 -1
- package/test/production-docs.test.mjs +3 -3
- package/test/prompts-resources.test.mjs +1 -1
- package/test/r33-closeout-regression.test.mjs +20 -36
- package/test/r33-finalization.test.mjs +7 -7
- package/test/r43-finalization.test.mjs +31 -0
- package/test/r43-finalizer.test.mjs +34 -0
- package/test/r43-parent.test.mjs +29 -0
- package/test/r44-finalization.test.mjs +58 -0
- package/test/r44-finalizer.test.mjs +48 -0
- package/test/r44-parent.test.mjs +25 -0
- package/test/r45-autonomous-quick-test.test.mjs +10 -0
- package/test/r45-finalization.test.mjs +84 -0
- package/test/release-generation.test.mjs +1 -0
- package/test/release-version.test.mjs +65 -20
- package/test/remote-device-r44.test.mjs +104 -0
- package/test/runtime-host-bootstrap-r45.test.mjs +46 -0
- package/test/runtime-self-update.test.mjs +42 -0
- package/test/skill-mcp-r44.test.mjs +38 -0
- package/test/skill-plane-r44.test.mjs +93 -0
- package/test/standing-grants.test.mjs +5 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { createHash, createPrivateKey, sign as cryptoSign } from 'node:crypto';
|
|
4
|
+
import { mkdtemp, mkdir, readFile, rm, writeFile } from 'node:fs/promises';
|
|
5
|
+
import os from 'node:os';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
import { generateTrustKeypair } from '../src/trust.mjs';
|
|
8
|
+
import { createSkillPlane } from '../src/skill-plane-r44.mjs';
|
|
9
|
+
|
|
10
|
+
const DOMAIN=Buffer.from('DEADBYTE-SKILL-MANIFEST-V1\0','utf8');
|
|
11
|
+
const sha=bytes=>createHash('sha256').update(bytes).digest('hex');
|
|
12
|
+
const canonical=value=>Array.isArray(value)?value.map(canonical):value&&typeof value==='object'
|
|
13
|
+
?Object.fromEntries(Object.keys(value).sort().map(key=>[key,canonical(value[key])])):value;
|
|
14
|
+
const canonicalJson=value=>JSON.stringify(canonical(value));
|
|
15
|
+
|
|
16
|
+
async function fixture(){
|
|
17
|
+
const root=await mkdtemp(path.join(os.tmpdir(),'deadbyte-r44-skill-'));
|
|
18
|
+
const registry=path.join(root,'skills');
|
|
19
|
+
const trust=path.join(root,'trust');
|
|
20
|
+
await mkdir(registry,{recursive:true});await mkdir(trust,{recursive:true});
|
|
21
|
+
const keys=await generateTrustKeypair({privateKeyPath:path.join(trust,'private.pem'),publicKeyPath:path.join(trust,'public.pem')});
|
|
22
|
+
return {root,registry,keys};
|
|
23
|
+
}
|
|
24
|
+
async function installSkill(f,{name='repo-audit',authorityPlanes=['coding'],requiredCapabilities=['coding.search'],extraBody={}}={}){
|
|
25
|
+
const dir=path.join(f.registry,name);await mkdir(path.join(dir,'references'),{recursive:true});
|
|
26
|
+
const skill=`---\nname: ${name}\ndescription: Audit one repository with bounded evidence\nversion: 1.0.0\naudience: agent\n---\n\n# Repo Audit\n\nInspect before mutation.\n`;
|
|
27
|
+
const ref='Use bounded search and cite exact observed files.\n';
|
|
28
|
+
await writeFile(path.join(dir,'SKILL.md'),skill,'utf8');
|
|
29
|
+
await writeFile(path.join(dir,'references','guide.md'),ref,'utf8');
|
|
30
|
+
const body={
|
|
31
|
+
schema:'deadbyte.skill-manifest.v1',name,version:'1.0.0',description:'Audit one repository with bounded evidence',audience:'agent',
|
|
32
|
+
skill_md_sha256:sha(Buffer.from(skill)),resources:[{path:'references/guide.md',sha256:sha(Buffer.from(ref)),kind:'reference'}],
|
|
33
|
+
required_capabilities:requiredCapabilities,authority_planes:authorityPlanes,
|
|
34
|
+
provenance:{source:'test-fixture',origin_url:null,source_revision:null},...extraBody
|
|
35
|
+
};
|
|
36
|
+
const bodyBytes=Buffer.from(canonicalJson(body),'utf8');
|
|
37
|
+
const privateKey=createPrivateKey(await readFile(f.keys.privateKeyPath));
|
|
38
|
+
const envelope={body,body_sha256:sha(bodyBytes),attestation:{algorithm:'ed25519',domain:'DEADBYTE-SKILL-MANIFEST-V1',
|
|
39
|
+
key_id:f.keys.keyId,signature_base64:cryptoSign(null,Buffer.concat([DOMAIN,bodyBytes]),privateKey).toString('base64')}};
|
|
40
|
+
envelope.manifest_sha256=sha(Buffer.from(canonicalJson(envelope),'utf8'));
|
|
41
|
+
await writeFile(path.join(dir,'skill.json'),`${JSON.stringify(envelope,null,2)}\n`,'utf8');
|
|
42
|
+
return {dir,skill,ref,envelope};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
test('R44 skill catalog is metadata-only and load is signature/content bound',async()=>{
|
|
46
|
+
const f=await fixture();
|
|
47
|
+
try{
|
|
48
|
+
await installSkill(f,{});
|
|
49
|
+
const plane=await createSkillPlane({root:f.registry,verifyKeyPath:f.keys.publicKeyPath});
|
|
50
|
+
const listed=await plane.list();
|
|
51
|
+
assert.equal(listed.status,'ok');assert.equal(listed.skills.length,1);
|
|
52
|
+
assert.equal(listed.skills[0].name,'repo-audit');assert.equal(listed.skills[0].authority_planes[0],'coding');
|
|
53
|
+
assert.equal('content' in listed.skills[0],false,'catalog must not leak instructions');
|
|
54
|
+
const loaded=await plane.load({name:'repo-audit'});
|
|
55
|
+
assert.equal(loaded.status,'ok');assert.match(loaded.content,/Inspect before mutation/);
|
|
56
|
+
assert.equal(loaded.verified,true);assert.match(loaded.manifest_sha256,/^[0-9a-f]{64}$/);
|
|
57
|
+
const resource=await plane.readResource({name:'repo-audit',resourcePath:'references/guide.md'});
|
|
58
|
+
assert.equal(resource.content,'Use bounded search and cite exact observed files.\n');
|
|
59
|
+
assert.equal(typeof plane.arm,'undefined');assert.equal(typeof plane.renew,'undefined');
|
|
60
|
+
}finally{await rm(f.root,{recursive:true,force:true});}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
test('R44 skill plane fails closed on SKILL.md and resource tampering',async()=>{
|
|
64
|
+
const f=await fixture();
|
|
65
|
+
try{
|
|
66
|
+
const installed=await installSkill(f,{});
|
|
67
|
+
const plane=await createSkillPlane({root:f.registry,verifyKeyPath:f.keys.publicKeyPath});
|
|
68
|
+
await writeFile(path.join(installed.dir,'SKILL.md'),'tampered\n','utf8');
|
|
69
|
+
await assert.rejects(plane.load({name:'repo-audit'}),/SKILL\.md hash mismatch/);
|
|
70
|
+
await installSkill(f,{});
|
|
71
|
+
await writeFile(path.join(installed.dir,'references','guide.md'),'tampered\n','utf8');
|
|
72
|
+
await assert.rejects(plane.readResource({name:'repo-audit',resourcePath:'references/guide.md'}),/resource hash mismatch/);
|
|
73
|
+
}finally{await rm(f.root,{recursive:true,force:true});}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
test('R44 skill plane rejects undeclared payloads, unknown authority and signature drift',async()=>{
|
|
77
|
+
const f=await fixture();
|
|
78
|
+
try{
|
|
79
|
+
const installed=await installSkill(f,{});
|
|
80
|
+
let plane=await createSkillPlane({root:f.registry,verifyKeyPath:f.keys.publicKeyPath});
|
|
81
|
+
await writeFile(path.join(installed.dir,'hidden.ps1'),'Write-Host pwn\n','utf8');
|
|
82
|
+
await assert.rejects(plane.load({name:'repo-audit'}),/undeclared skill file/);
|
|
83
|
+
await rm(path.join(installed.dir,'hidden.ps1'));
|
|
84
|
+
await installSkill(f,{authorityPlanes:['root']});
|
|
85
|
+
await assert.rejects(plane.load({name:'repo-audit'}),/unknown authority plane/);
|
|
86
|
+
await installSkill(f,{});
|
|
87
|
+
const env=JSON.parse(await readFile(path.join(installed.dir,'skill.json'),'utf8'));
|
|
88
|
+
env.body.description='signature drift';
|
|
89
|
+
await writeFile(path.join(installed.dir,'skill.json'),JSON.stringify(env,null,2)+'\n');
|
|
90
|
+
plane=await createSkillPlane({root:f.registry,verifyKeyPath:f.keys.publicKeyPath});
|
|
91
|
+
await assert.rejects(plane.load({name:'repo-audit'}),/body hash mismatch/);
|
|
92
|
+
}finally{await rm(f.root,{recursive:true,force:true});}
|
|
93
|
+
});
|
|
@@ -4,7 +4,7 @@ import { mkdtemp, mkdir, writeFile } from 'node:fs/promises';
|
|
|
4
4
|
import os from 'node:os';
|
|
5
5
|
import path from 'node:path';
|
|
6
6
|
import { loadCodingPolicy, codingSessionStatus } from '../src/coding-plane.mjs';
|
|
7
|
-
import { loadAutonomousPolicy, autonomousSessionStatus } from '../src/autonomous-policy.mjs';
|
|
7
|
+
import { assertAutonomousArmed, loadAutonomousPolicy, autonomousSessionStatus, recheckAutonomousAuthority } from '../src/autonomous-policy.mjs';
|
|
8
8
|
import { loadHostPolicy, assertHostArmed } from '../src/host-plane.mjs';
|
|
9
9
|
import { createHash } from 'node:crypto';
|
|
10
10
|
|
|
@@ -48,6 +48,10 @@ test('autonomous standing grant remains armed until explicit revocation', async
|
|
|
48
48
|
assert.equal(status.armed, true);
|
|
49
49
|
assert.equal(status.reason, 'standing-grant');
|
|
50
50
|
assert.equal(status.expires_at_utc, null);
|
|
51
|
+
const initial = await assertAutonomousArmed(policy, 'project', farFuture);
|
|
52
|
+
const grant = JSON.parse(await import('node:fs/promises').then(fs => fs.readFile(policy.lease_file, 'utf8')));
|
|
53
|
+
await writeFile(policy.lease_file, JSON.stringify({ ...grant, instance_nonce:'d'.repeat(64) }));
|
|
54
|
+
await assert.rejects(() => recheckAutonomousAuthority(policy, initial, 'project', farFuture), /autonomous authority changed during operation/);
|
|
51
55
|
});
|
|
52
56
|
test('host standing grant remains armed until explicit revocation', async () => {
|
|
53
57
|
const root = await mkdtemp(path.join(os.tmpdir(), 'deadbyte-host-standing-'));
|