@agentguard-run/burn 0.3.1 → 0.3.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/CHANGELOG.md +15 -0
- package/README.md +83 -8
- package/dist/src/bench-import.d.ts +74 -0
- package/dist/src/bench-import.js +232 -0
- package/dist/src/bench-panel.d.ts +42 -0
- package/dist/src/bench-panel.js +119 -0
- package/dist/src/cli.d.ts +1 -0
- package/dist/src/cli.js +65 -2
- package/dist/src/frames.d.ts +4 -0
- package/dist/src/frames.js +3 -0
- package/dist/src/gateway.js +5 -3
- package/dist/src/guard-candidates-ranker.d.ts +27 -0
- package/dist/src/guard-candidates-ranker.js +134 -0
- package/dist/src/guard-candidates.d.ts +34 -0
- package/dist/src/guard-candidates.js +226 -0
- package/dist/src/hook/pre-tool-use.js +2 -1
- package/dist/src/ledger-panel.d.ts +40 -0
- package/dist/src/ledger-panel.js +174 -0
- package/dist/src/live-panel.d.ts +12 -0
- package/dist/src/live-panel.js +27 -107
- package/dist/src/record-ledger.d.ts +30 -0
- package/dist/src/record-ledger.js +165 -0
- package/dist/src/recording.js +8 -2
- package/dist/src/state/spawn-window.d.ts +13 -1
- package/dist/src/state/spawn-window.js +18 -3
- package/docs/LIVE_PANEL_2026_09.md +52 -28
- package/docs/assets/burn-bench-fixture.evidence.json +18 -0
- package/docs/assets/burn-bench-fixture.gif +0 -0
- package/docs/assets/burn-bench-fixture.mp4 +0 -0
- package/docs/assets/burn-bench-fixture.mp4.provenance.json +70 -0
- package/docs/assets/burn-bench-fixture.png +0 -0
- package/docs/assets/burn-bench-fixture.recording.jsonl +8 -0
- package/docs/assets/burn-real-stop-sep20-stop-1920.png +0 -0
- package/docs/assets/burn-real-stop-sep20-stop-390.png +0 -0
- package/docs/assets/burn-real-stop-sep20.evidence.json +67 -0
- package/docs/assets/burn-real-stop-sep20.gif +0 -0
- package/docs/assets/burn-real-stop-sep20.jsonl +39 -0
- package/docs/assets/burn-real-stop-sep20.mp4 +0 -0
- package/docs/assets/{burn-live-sep19.mp4.provenance.json → burn-real-stop-sep20.mp4.provenance.json} +45 -81
- package/docs/assets/burn-real-stop-sep20.policy.json +47 -0
- package/docs/assets/burn-real-stop-sep20.receipts.ndjson +18 -0
- package/docs/burn-render.md +12 -2
- package/fixtures/bench-panel-104x35.txt +35 -0
- package/fixtures/bench-panel-80x24.txt +24 -0
- package/fixtures/bench-run/burn-postrun.json +1 -0
- package/fixtures/bench-run/fixture-note.txt +1 -0
- package/fixtures/bench-run/grader.json +1 -0
- package/fixtures/bench-run/ledger.ndjson +8 -0
- package/fixtures/bench-run/manifest.json +1 -0
- package/fixtures/bench-run/measurement-key.json +1 -0
- package/fixtures/bench-run/patch.diff +0 -0
- package/fixtures/bench-run/policy.json +1 -0
- package/fixtures/bench-run/pricing.json +1 -0
- package/fixtures/bench-run/run.json +1 -0
- package/fixtures/bench-run/sensitivity-policy.json +1 -0
- package/fixtures/guard-candidates-ledger.ndjson +11 -0
- package/fixtures/live-sep20-stop-104x35.txt +35 -0
- package/package.json +7 -4
- package/vendor/disciplinebench/LICENSE +202 -0
- package/vendor/disciplinebench/PROVENANCE.json +17 -0
- package/vendor/disciplinebench/harness/reducer.cjs +168 -0
- package/vendor/disciplinebench/harness/schema.cjs +14 -0
- package/vendor/disciplinebench/harness/util.cjs +23 -0
- package/vendor/disciplinebench/harness/verify.cjs +111 -0
- package/vendor/disciplinebench/schemas/aggregate.json +51 -0
- package/vendor/disciplinebench/schemas/event.json +62 -0
- package/vendor/disciplinebench/schemas/grader.json +38 -0
- package/vendor/disciplinebench/schemas/run.json +197 -0
- package/docs/assets/burn-live-sep19-stop-1920.png +0 -0
- package/docs/assets/burn-live-sep19-stop-390.png +0 -0
- package/docs/assets/burn-live-sep19.evidence.json +0 -288
- package/docs/assets/burn-live-sep19.gif +0 -0
- package/docs/assets/burn-live-sep19.jsonl +0 -45
- package/docs/assets/burn-live-sep19.mp4 +0 -0
- package/docs/assets/burn-live-sep19.observations.jsonl +0 -45
- package/docs/assets/burn-live-sep19.receipt.json +0 -38
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const crypto = require('node:crypto');
|
|
4
|
+
const fs = require('node:fs');
|
|
5
|
+
const path = require('node:path');
|
|
6
|
+
const { canonicalJson } = require('@agentguard-run/spend/decision-log');
|
|
7
|
+
|
|
8
|
+
const sha256 = value => crypto.createHash('sha256').update(value).digest('hex');
|
|
9
|
+
const digest = value => sha256(canonicalJson(value));
|
|
10
|
+
const readJson = file => JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
11
|
+
function writeJson(file, value) {
|
|
12
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
13
|
+
fs.writeFileSync(file, canonicalJson(value) + '\n');
|
|
14
|
+
}
|
|
15
|
+
function safePath(root, relative) {
|
|
16
|
+
if (typeof relative !== 'string' || path.isAbsolute(relative) || relative.split(/[\\/]/).includes('..')) throw new Error('Unsafe artifact path');
|
|
17
|
+
const candidate = path.resolve(root, relative);
|
|
18
|
+
if (!candidate.startsWith(path.resolve(root) + path.sep)) throw new Error('Artifact outside bundle');
|
|
19
|
+
const real = fs.realpathSync(candidate);
|
|
20
|
+
if (!real.startsWith(fs.realpathSync(root) + path.sep)) throw new Error('Artifact symlink outside bundle');
|
|
21
|
+
return candidate;
|
|
22
|
+
}
|
|
23
|
+
module.exports = { canonicalJson, sha256, digest, readJson, writeJson, safePath };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const crypto = require('node:crypto');
|
|
4
|
+
const fs = require('node:fs');
|
|
5
|
+
const path = require('node:path');
|
|
6
|
+
const sdk = require('@agentguard-run/spend/decision-log');
|
|
7
|
+
const { canonicalJson, digest, sha256, readJson, writeJson, safePath } = require('./util.cjs');
|
|
8
|
+
const { reduce } = require('./reducer.cjs');
|
|
9
|
+
|
|
10
|
+
function createKey() {
|
|
11
|
+
const { privateKey, publicKey } = crypto.generateKeyPairSync('ed25519');
|
|
12
|
+
const seed = privateKey.export({ format: 'der', type: 'pkcs8' }).subarray(-32);
|
|
13
|
+
const raw = publicKey.export({ format: 'der', type: 'spki' }).subarray(-32);
|
|
14
|
+
return { privateKey, publicKey, seed, raw, id: sdk.computeSignerFingerprint(raw) };
|
|
15
|
+
}
|
|
16
|
+
function publicObject(hex) {
|
|
17
|
+
if (!/^[0-9a-f]{64}$/.test(hex)) throw new Error('Invalid public key');
|
|
18
|
+
return crypto.createPublicKey({ key: Buffer.concat([Buffer.from('302a300506032b6570032100', 'hex'), Buffer.from(hex, 'hex')]), format: 'der', type: 'spki' });
|
|
19
|
+
}
|
|
20
|
+
async function signEvents(events, key) {
|
|
21
|
+
const entries = []; let previousHash = sdk.GENESIS_PREVIOUS_HASH;
|
|
22
|
+
for (const event of events) {
|
|
23
|
+
const identity = events[0].data.identity;
|
|
24
|
+
const decision = { decisionId: event.event_id, timestamp: event.timestamp, action: 'allow', triggeredCap: null,
|
|
25
|
+
triggeredScopeKey: null, projectedCents: 0, windowSpendBefore: 0, windowSpendAfter: 0,
|
|
26
|
+
provider: 'other', modelRequested: identity.requested_model, modelResolved: identity.reported_model,
|
|
27
|
+
policyId: identity.policy_hash, policyVersion: 1, enforcementMode: 'shadow', reasons: ['benchmark_telemetry_only'],
|
|
28
|
+
entryType: 'governance', governanceReceipt: event };
|
|
29
|
+
const entry = await sdk.signDecision({ sequence: entries.length, decision, previousHash, privateKey: key.seed, publicKey: key.raw });
|
|
30
|
+
entries.push(entry); previousHash = entry.entryHash;
|
|
31
|
+
}
|
|
32
|
+
return entries;
|
|
33
|
+
}
|
|
34
|
+
function signManifest(manifest, publisher) {
|
|
35
|
+
if (manifest.measurement_key_id === publisher.id) throw new Error('Publisher and measurement keys must differ');
|
|
36
|
+
const { signature: previousSignature, ...unsigned } = manifest;
|
|
37
|
+
const payload = { ...unsigned, publisher_key_id: publisher.id, publisher_public_key: publisher.raw.toString('hex') };
|
|
38
|
+
return { ...payload, signature: crypto.sign(null, Buffer.from(canonicalJson(payload)), publisher.privateKey).toString('hex') };
|
|
39
|
+
}
|
|
40
|
+
function verifyManifest(manifest) {
|
|
41
|
+
const { signature, ...payload } = manifest;
|
|
42
|
+
if (!/^[a-f0-9]{128}$/.test(signature || '')) throw new Error('Missing publisher signature');
|
|
43
|
+
const fingerprint = sdk.computeSignerFingerprint(Buffer.from(payload.publisher_public_key, 'hex'));
|
|
44
|
+
if (fingerprint !== payload.publisher_key_id || payload.publisher_key_id === payload.measurement_key_id) throw new Error('Publisher identity mismatch');
|
|
45
|
+
if (!crypto.verify(null, Buffer.from(canonicalJson(payload)), publicObject(payload.publisher_public_key), Buffer.from(signature, 'hex'))) throw new Error('Manifest signature invalid');
|
|
46
|
+
return payload;
|
|
47
|
+
}
|
|
48
|
+
async function writeBundle(directory, { events, grader, pricing, policy, highConfidencePolicy, measurement, publisher, patch = '', extraArtifacts = {}, roundId = 'fixture-smoke-v1' }) {
|
|
49
|
+
fs.mkdirSync(directory, { recursive: true });
|
|
50
|
+
const entries = await signEvents(events, measurement);
|
|
51
|
+
fs.writeFileSync(path.join(directory, 'ledger.ndjson'), entries.map(canonicalJson).join('\n') + '\n');
|
|
52
|
+
writeJson(path.join(directory, 'measurement-key.json'), { key_id: measurement.id, public_key: measurement.raw.toString('hex') });
|
|
53
|
+
writeJson(path.join(directory, 'grader.json'), grader);
|
|
54
|
+
writeJson(path.join(directory, 'pricing.json'), pricing);
|
|
55
|
+
writeJson(path.join(directory, 'policy.json'), policy);
|
|
56
|
+
writeJson(path.join(directory, 'sensitivity-policy.json'), highConfidencePolicy);
|
|
57
|
+
fs.writeFileSync(path.join(directory, 'patch.diff'), patch);
|
|
58
|
+
const run = reduce(events, grader, pricing, { highConfidencePolicy, policy });
|
|
59
|
+
if (digest(policy) !== run.identity.policy_hash) throw new Error('Policy content differs from run identity');
|
|
60
|
+
writeJson(path.join(directory, 'run.json'), run);
|
|
61
|
+
const burn = { status: 'unsupported_signed_benchmark_ledger', scoring_dependency: false,
|
|
62
|
+
reason: 'The installed Burn CLI prices native transcripts and cannot ingest this signed ledger. No unsupported flags were invoked.',
|
|
63
|
+
supported_interfaces: ['agentguard-burn pricing', 'agentguard-burn why TRANSCRIPT json', 'agentguard-burn render FRAMES --mp4 OUTPUT'] };
|
|
64
|
+
writeJson(path.join(directory, 'burn-postrun.json'), burn);
|
|
65
|
+
for (const [name, value] of Object.entries(extraArtifacts)) {
|
|
66
|
+
if (name.includes('/') || name.includes('..') || fs.existsSync(path.join(directory, name))) throw new Error('Invalid extra artifact name');
|
|
67
|
+
fs.writeFileSync(path.join(directory, name), typeof value === 'string' ? value : canonicalJson(value) + '\n');
|
|
68
|
+
}
|
|
69
|
+
const files = fs.readdirSync(directory).filter(file => file !== 'manifest.json').sort();
|
|
70
|
+
const artifacts = Object.fromEntries(files.map(file => [file, sha256(fs.readFileSync(path.join(directory, file)))]));
|
|
71
|
+
const manifest = signManifest({ schema_version: 1, round_id: roundId, run_id: run.run_id,
|
|
72
|
+
fixture: run.fixture, measurement_key_id: measurement.id, artifacts,
|
|
73
|
+
trust_note: 'Embedded keys prove integrity, not an external publisher identity. Pin the key id through a trusted channel.' }, publisher);
|
|
74
|
+
writeJson(path.join(directory, 'manifest.json'), manifest);
|
|
75
|
+
return { run, manifest };
|
|
76
|
+
}
|
|
77
|
+
async function verifyBundle(directory, { expectedPublisherKeyId } = {}) {
|
|
78
|
+
const manifest = readJson(path.join(directory, 'manifest.json'));
|
|
79
|
+
verifyManifest(manifest);
|
|
80
|
+
if (expectedPublisherKeyId && manifest.publisher_key_id !== expectedPublisherKeyId) throw new Error('Untrusted publisher key');
|
|
81
|
+
for (const [name, hash] of Object.entries(manifest.artifacts)) if (sha256(fs.readFileSync(safePath(directory, name))) !== hash) throw new Error(`Artifact hash mismatch: ${name}`);
|
|
82
|
+
const required = ['ledger.ndjson', 'measurement-key.json', 'grader.json', 'pricing.json', 'policy.json', 'sensitivity-policy.json', 'run.json', 'patch.diff', 'burn-postrun.json'];
|
|
83
|
+
if (required.some(name => !manifest.artifacts[name])) throw new Error('Manifest omits required artifact');
|
|
84
|
+
const key = readJson(path.join(directory, 'measurement-key.json'));
|
|
85
|
+
if (key.key_id !== manifest.measurement_key_id || sdk.computeSignerFingerprint(Buffer.from(key.public_key, 'hex')) !== key.key_id) throw new Error('Measurement key mismatch');
|
|
86
|
+
publicObject(key.public_key);
|
|
87
|
+
const entries = fs.readFileSync(path.join(directory, 'ledger.ndjson'), 'utf8').trim().split('\n').map(JSON.parse);
|
|
88
|
+
const chain = await sdk.verifyChain(entries, Buffer.from(key.public_key, 'hex'));
|
|
89
|
+
if (!chain.ok) throw new Error(`Ledger verification failed at ${chain.sequence}: ${chain.reason}`);
|
|
90
|
+
const events = entries.map(entry => entry.decision.governanceReceipt);
|
|
91
|
+
const policy = readJson(path.join(directory, 'policy.json'));
|
|
92
|
+
const run = reduce(events, readJson(path.join(directory, 'grader.json')), readJson(path.join(directory, 'pricing.json')),
|
|
93
|
+
{ highConfidencePolicy: readJson(path.join(directory, 'sensitivity-policy.json')), policy });
|
|
94
|
+
if (digest(policy) !== run.identity.policy_hash) throw new Error('Policy hash mismatch');
|
|
95
|
+
if (canonicalJson(run) + '\n' !== fs.readFileSync(path.join(directory, 'run.json'), 'utf8')) throw new Error('Recomputed run.json mismatch');
|
|
96
|
+
if (run.run_id !== manifest.run_id || run.fixture !== manifest.fixture) throw new Error('Run identity mismatch');
|
|
97
|
+
return { ok: true, run_id: run.run_id, ledger_sha256: manifest.artifacts['ledger.ndjson'],
|
|
98
|
+
run_sha256: manifest.artifacts['run.json'], publisher_key_id: manifest.publisher_key_id,
|
|
99
|
+
measurement_key_id: manifest.measurement_key_id, publisher_pinned: Boolean(expectedPublisherKeyId) };
|
|
100
|
+
}
|
|
101
|
+
function lockRound(round, files, publisher) {
|
|
102
|
+
return signManifest({ ...round, locked_files: Object.fromEntries(Object.entries(files).map(([name, bytes]) => [name, sha256(bytes)])) }, publisher);
|
|
103
|
+
}
|
|
104
|
+
function checkRoundLock(previous, current, root) {
|
|
105
|
+
verifyManifest(previous); verifyManifest(current);
|
|
106
|
+
if (previous.round_id !== current.round_id) return true;
|
|
107
|
+
if (canonicalJson(previous) !== canonicalJson(current)) throw new Error('Signed round changed without a new round id');
|
|
108
|
+
for (const [name, hash] of Object.entries(current.locked_files || {})) if (sha256(fs.readFileSync(safePath(root, name))) !== hash) throw new Error(`Locked round input changed: ${name}`);
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
module.exports = { createKey, signEvents, signManifest, verifyManifest, writeBundle, verifyBundle, lockRound, checkRoundLock };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"required": [
|
|
4
|
+
"schema_version",
|
|
5
|
+
"fixture",
|
|
6
|
+
"disclosure",
|
|
7
|
+
"systems",
|
|
8
|
+
"paired_differences",
|
|
9
|
+
"round_id"
|
|
10
|
+
],
|
|
11
|
+
"properties": {
|
|
12
|
+
"schema_version": {
|
|
13
|
+
"const": 1
|
|
14
|
+
},
|
|
15
|
+
"round_id": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"minLength": 1
|
|
18
|
+
},
|
|
19
|
+
"fixture": {
|
|
20
|
+
"type": "boolean"
|
|
21
|
+
},
|
|
22
|
+
"disclosure": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"required": [
|
|
25
|
+
"publisher",
|
|
26
|
+
"instrument_vendor",
|
|
27
|
+
"independent_rerun",
|
|
28
|
+
"reviewers"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"systems": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"required": [
|
|
36
|
+
"identity",
|
|
37
|
+
"run_ids",
|
|
38
|
+
"counts",
|
|
39
|
+
"headline",
|
|
40
|
+
"diagnostics",
|
|
41
|
+
"runs"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"paired_differences": {
|
|
46
|
+
"type": "array"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
51
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"required": [
|
|
4
|
+
"schema_version",
|
|
5
|
+
"event_id",
|
|
6
|
+
"type",
|
|
7
|
+
"timestamp",
|
|
8
|
+
"run_id",
|
|
9
|
+
"agent_id",
|
|
10
|
+
"parent_agent_id",
|
|
11
|
+
"spawn_depth",
|
|
12
|
+
"data"
|
|
13
|
+
],
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"properties": {
|
|
16
|
+
"schema_version": {
|
|
17
|
+
"const": 1
|
|
18
|
+
},
|
|
19
|
+
"event_id": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1
|
|
22
|
+
},
|
|
23
|
+
"type": {
|
|
24
|
+
"enum": [
|
|
25
|
+
"session_start",
|
|
26
|
+
"model_usage",
|
|
27
|
+
"tool_request",
|
|
28
|
+
"policy_decision",
|
|
29
|
+
"tool_result",
|
|
30
|
+
"subagent_spawn",
|
|
31
|
+
"subagent_end",
|
|
32
|
+
"session_end"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"timestamp": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T.*Z$"
|
|
38
|
+
},
|
|
39
|
+
"run_id": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"minLength": 1
|
|
42
|
+
},
|
|
43
|
+
"agent_id": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1
|
|
46
|
+
},
|
|
47
|
+
"parent_agent_id": {
|
|
48
|
+
"type": [
|
|
49
|
+
"string",
|
|
50
|
+
"null"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"spawn_depth": {
|
|
54
|
+
"type": "integer",
|
|
55
|
+
"minimum": 0
|
|
56
|
+
},
|
|
57
|
+
"data": {
|
|
58
|
+
"type": "object"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
62
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"required": [
|
|
4
|
+
"run_id",
|
|
5
|
+
"passed",
|
|
6
|
+
"exit_code",
|
|
7
|
+
"checks"
|
|
8
|
+
],
|
|
9
|
+
"properties": {
|
|
10
|
+
"run_id": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 1
|
|
13
|
+
},
|
|
14
|
+
"passed": {
|
|
15
|
+
"type": "boolean"
|
|
16
|
+
},
|
|
17
|
+
"exit_code": {
|
|
18
|
+
"type": [
|
|
19
|
+
"integer",
|
|
20
|
+
"null"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"checks": {
|
|
24
|
+
"type": "array"
|
|
25
|
+
},
|
|
26
|
+
"reason": {
|
|
27
|
+
"type": [
|
|
28
|
+
"string",
|
|
29
|
+
"null"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"environment": {
|
|
33
|
+
"type": "string"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
38
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"required": [
|
|
4
|
+
"schema_version",
|
|
5
|
+
"run_id",
|
|
6
|
+
"identity",
|
|
7
|
+
"system_key",
|
|
8
|
+
"task_id",
|
|
9
|
+
"replicate",
|
|
10
|
+
"fixture",
|
|
11
|
+
"status",
|
|
12
|
+
"valid",
|
|
13
|
+
"completion",
|
|
14
|
+
"metrics",
|
|
15
|
+
"coverage",
|
|
16
|
+
"spawn_tree",
|
|
17
|
+
"policy_decisions",
|
|
18
|
+
"usage_reconciliation",
|
|
19
|
+
"evidence",
|
|
20
|
+
"grader"
|
|
21
|
+
],
|
|
22
|
+
"properties": {
|
|
23
|
+
"schema_version": {
|
|
24
|
+
"const": 1
|
|
25
|
+
},
|
|
26
|
+
"run_id": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1
|
|
29
|
+
},
|
|
30
|
+
"identity": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"required": [
|
|
33
|
+
"suite_version",
|
|
34
|
+
"host",
|
|
35
|
+
"host_version",
|
|
36
|
+
"requested_model",
|
|
37
|
+
"reported_model",
|
|
38
|
+
"agentguard_version",
|
|
39
|
+
"policy_hash",
|
|
40
|
+
"run_window"
|
|
41
|
+
],
|
|
42
|
+
"properties": {
|
|
43
|
+
"suite_version": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1
|
|
46
|
+
},
|
|
47
|
+
"host": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"minLength": 1
|
|
50
|
+
},
|
|
51
|
+
"host_version": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"minLength": 1
|
|
54
|
+
},
|
|
55
|
+
"requested_model": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"minLength": 1
|
|
58
|
+
},
|
|
59
|
+
"reported_model": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"minLength": 1
|
|
62
|
+
},
|
|
63
|
+
"agentguard_version": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"minLength": 1
|
|
66
|
+
},
|
|
67
|
+
"policy_hash": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"minLength": 1
|
|
70
|
+
},
|
|
71
|
+
"run_window": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"minLength": 1
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"additionalProperties": false
|
|
77
|
+
},
|
|
78
|
+
"system_key": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"minLength": 1
|
|
81
|
+
},
|
|
82
|
+
"task_id": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"minLength": 1
|
|
85
|
+
},
|
|
86
|
+
"replicate": {
|
|
87
|
+
"type": "integer",
|
|
88
|
+
"minimum": 0
|
|
89
|
+
},
|
|
90
|
+
"fixture": {
|
|
91
|
+
"type": "boolean"
|
|
92
|
+
},
|
|
93
|
+
"status": {
|
|
94
|
+
"enum": [
|
|
95
|
+
"completed_pass",
|
|
96
|
+
"completed_fail",
|
|
97
|
+
"timeout",
|
|
98
|
+
"agent_error",
|
|
99
|
+
"provider_error",
|
|
100
|
+
"invalid_infra",
|
|
101
|
+
"harness_error"
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"valid": {
|
|
105
|
+
"type": "boolean"
|
|
106
|
+
},
|
|
107
|
+
"completion": {
|
|
108
|
+
"enum": [
|
|
109
|
+
0,
|
|
110
|
+
1
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"metrics": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"required": [
|
|
116
|
+
"spawn_count",
|
|
117
|
+
"max_spawn_depth",
|
|
118
|
+
"tokens",
|
|
119
|
+
"context_replay_share",
|
|
120
|
+
"dangerous_command_matches",
|
|
121
|
+
"would_stop",
|
|
122
|
+
"high_confidence_would_stop",
|
|
123
|
+
"active_minutes",
|
|
124
|
+
"wall_seconds",
|
|
125
|
+
"list_price_exposure"
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
"coverage": {
|
|
129
|
+
"type": "object"
|
|
130
|
+
},
|
|
131
|
+
"spawn_tree": {
|
|
132
|
+
"type": "array"
|
|
133
|
+
},
|
|
134
|
+
"policy_decisions": {
|
|
135
|
+
"type": "array"
|
|
136
|
+
},
|
|
137
|
+
"usage_reconciliation": {
|
|
138
|
+
"type": "array"
|
|
139
|
+
},
|
|
140
|
+
"evidence": {
|
|
141
|
+
"type": "object"
|
|
142
|
+
},
|
|
143
|
+
"grader": {
|
|
144
|
+
"type": "object",
|
|
145
|
+
"required": [
|
|
146
|
+
"run_id",
|
|
147
|
+
"passed",
|
|
148
|
+
"exit_code",
|
|
149
|
+
"checks"
|
|
150
|
+
],
|
|
151
|
+
"properties": {
|
|
152
|
+
"run_id": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"minLength": 1
|
|
155
|
+
},
|
|
156
|
+
"passed": {
|
|
157
|
+
"type": "boolean"
|
|
158
|
+
},
|
|
159
|
+
"exit_code": {
|
|
160
|
+
"type": [
|
|
161
|
+
"integer",
|
|
162
|
+
"null"
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
"checks": {
|
|
166
|
+
"type": "array"
|
|
167
|
+
},
|
|
168
|
+
"reason": {
|
|
169
|
+
"type": [
|
|
170
|
+
"string",
|
|
171
|
+
"null"
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
"environment": {
|
|
175
|
+
"type": "string"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"additionalProperties": false,
|
|
179
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
180
|
+
},
|
|
181
|
+
"bundle": {
|
|
182
|
+
"type": "object",
|
|
183
|
+
"required": [
|
|
184
|
+
"ledger_sha256"
|
|
185
|
+
],
|
|
186
|
+
"properties": {
|
|
187
|
+
"ledger_sha256": {
|
|
188
|
+
"type": "string",
|
|
189
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"additionalProperties": false
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"additionalProperties": false,
|
|
196
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
197
|
+
}
|
|
Binary file
|
|
Binary file
|