agentcert 0.5.2 → 0.5.4
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/README.md +3 -3
- package/dist/bundle.js +19 -0
- package/dist/cli.js +42 -4
- package/dist/corpus-governance.js +126 -0
- package/dist/corpus-store.js +4 -6
- package/dist/credentials.js +1 -1
- package/dist/normalizers.js +47 -0
- package/dist/report.js +19 -2
- package/dist/runner.js +2 -1
- package/dist/schema-validator.js +162 -2
- package/dist/vendor/onegent-runtime/sdk.d.ts +1 -1
- package/dist/vendor/onegent-runtime/sdk.d.ts.map +1 -1
- package/dist/vendor/onegent-runtime/sdk.js +1 -1
- package/dist/vendor/onegent-runtime/service.d.ts +3 -3
- package/dist/vendor/onegent-runtime/service.d.ts.map +1 -1
- package/dist/vendor/onegent-runtime/service.js +6 -4
- package/dist/vendor/onegent-runtime/trust-types.d.ts +163 -0
- package/dist/vendor/onegent-runtime/trust-types.d.ts.map +1 -0
- package/dist/vendor/onegent-runtime/trust-types.js +7 -0
- package/dist/vendor/onegent-runtime/types.d.ts +4 -1
- package/dist/vendor/onegent-runtime/types.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,8 +6,8 @@ AgentCert checks what an agent may do, whether it passed pre-release evidence,
|
|
|
6
6
|
whether a high-risk runtime action may proceed, and who can verify the observed
|
|
7
7
|
outcome. It writes portable reports and accumulates a local failure corpus.
|
|
8
8
|
|
|
9
|
-
[Public
|
|
10
|
-
[Private workspace](https://agentcert
|
|
9
|
+
[Public evidence](https://agentcert.app/evidence) |
|
|
10
|
+
[Private workspace](https://agentcert.app/app) |
|
|
11
11
|
[GitHub source](https://github.com/Kakarottoooo/agentcert)
|
|
12
12
|
|
|
13
13
|
## 5-minute local path
|
|
@@ -53,7 +53,7 @@ Default outputs:
|
|
|
53
53
|
Push the validated evidence bundle into a hosted AgentCert project:
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
|
-
npx agentcert connect --server https://agentcert
|
|
56
|
+
npx agentcert connect --server https://agentcert.app --project your-project-id
|
|
57
57
|
npx agentcert push --evidence .agentcert/latest/agentcert-evidence.json
|
|
58
58
|
```
|
|
59
59
|
|
package/dist/bundle.js
CHANGED
|
@@ -36,6 +36,7 @@ export function buildEvidenceBundle(results, subjectName, subjectType = "agent")
|
|
|
36
36
|
results,
|
|
37
37
|
evidence,
|
|
38
38
|
artifacts,
|
|
39
|
+
evidenceStrength: evidenceStrengthFor(results),
|
|
39
40
|
standards: [
|
|
40
41
|
{
|
|
41
42
|
id: "aiuc-1",
|
|
@@ -58,6 +59,24 @@ export function buildEvidenceBundle(results, subjectName, subjectType = "agent")
|
|
|
58
59
|
],
|
|
59
60
|
};
|
|
60
61
|
}
|
|
62
|
+
const STRENGTH_ORDER = ["reported", "recorded", "enforced", "outcome_verified", "independently_reviewed"];
|
|
63
|
+
function evidenceStrengthFor(results) {
|
|
64
|
+
const values = results.map((result) => result.evidenceStrength ?? {
|
|
65
|
+
schemaVersion: "agentcert.evidence_strength.v0.1",
|
|
66
|
+
level: "reported",
|
|
67
|
+
claims: ["A producer supplied a result for this run."],
|
|
68
|
+
limitations: ["The result does not contain a source-signed action record."],
|
|
69
|
+
});
|
|
70
|
+
const weakest = values.length
|
|
71
|
+
? values.reduce((left, right) => STRENGTH_ORDER.indexOf(left.level) <= STRENGTH_ORDER.indexOf(right.level) ? left : right)
|
|
72
|
+
: { schemaVersion: "agentcert.evidence_strength.v0.1", level: "reported", claims: [], limitations: ["The bundle contains no results."] };
|
|
73
|
+
return {
|
|
74
|
+
schemaVersion: "agentcert.evidence_strength.v0.1",
|
|
75
|
+
level: weakest.level,
|
|
76
|
+
claims: [...new Set(values.flatMap((value) => value.claims))],
|
|
77
|
+
limitations: [...new Set(values.flatMap((value) => value.limitations))],
|
|
78
|
+
};
|
|
79
|
+
}
|
|
61
80
|
function levelForScore(score, passed) {
|
|
62
81
|
if (!passed) {
|
|
63
82
|
return "Not certified";
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import { appendFile, mkdir, readFile, writeFile } from "node:fs/promises";
|
|
3
3
|
import { basename, dirname, join, resolve } from "node:path";
|
|
4
4
|
import { createInterface } from "node:readline/promises";
|
|
5
5
|
import { validateEvidenceArtifacts } from "./artifact-validation.js";
|
|
@@ -8,6 +8,7 @@ import { buildEvidenceBundle } from "./bundle.js";
|
|
|
8
8
|
import { collectCompanionArtifacts, MAX_REPORTED_COMPANION_ARTIFACT_SKIPS } from "./companion-artifacts.js";
|
|
9
9
|
import { recordsFromAgentCertResult, evaluateFailureClassifier, renderCorpusSummary, summarizeCorpus, writeReviewedFailureDataset, } from "./corpus.js";
|
|
10
10
|
import { openCorpusStore, parseCorpusStoreKind } from "./corpus-store.js";
|
|
11
|
+
import { deleteCorpusRecords, exportGovernedCorpus, governCorpusRecords, parseCorpusConsent } from "./corpus-governance.js";
|
|
11
12
|
import { pushEvidenceToControlPlane, verifyControlPlaneConnection } from "./control-plane.js";
|
|
12
13
|
import { runEvidenceConformance } from "./conformance.js";
|
|
13
14
|
import { DEFAULT_AGENTCERT_SERVER, resolveConnection, saveConnection } from "./credentials.js";
|
|
@@ -62,7 +63,7 @@ else if (command === "init") {
|
|
|
62
63
|
else if (command === "connect") {
|
|
63
64
|
if (readBoolFlag("--help")) {
|
|
64
65
|
process.stdout.write(`Usage:
|
|
65
|
-
agentcert connect --server https://agentcert
|
|
66
|
+
agentcert connect --server https://agentcert.app --project <project-id>
|
|
66
67
|
agentcert connect --name staging --server https://staging.example.com --project <project-id>
|
|
67
68
|
|
|
68
69
|
The API key is read from AGENTCERT_API_KEY or requested with hidden input.
|
|
@@ -124,7 +125,7 @@ else if (command === "corpus") {
|
|
|
124
125
|
throw new Error("No input artifacts were provided. Use --mcpbench, --tripwire, --onegent, or --config.");
|
|
125
126
|
}
|
|
126
127
|
const reviews = await readFailureReviews(readReviewsPath());
|
|
127
|
-
const records = applyFailureReviews(loaded.flatMap(({ result, path, raw }) => recordsFromAgentCertResult(result, path, subject, raw)), reviews);
|
|
128
|
+
const records = governCorpusRecords(applyFailureReviews(loaded.flatMap(({ result, path, raw }) => recordsFromAgentCertResult(result, path, subject, raw)), reviews), { consent: parseCorpusConsent(readFlag("--consent")), consentSource: readFlag("--consent-source") ?? "local-default" });
|
|
128
129
|
const store = await openCorpusStore(storeOptions);
|
|
129
130
|
try {
|
|
130
131
|
await store.append(records, { replace });
|
|
@@ -169,6 +170,38 @@ else if (command === "corpus") {
|
|
|
169
170
|
await store.close();
|
|
170
171
|
}
|
|
171
172
|
}
|
|
173
|
+
else if (action === "export") {
|
|
174
|
+
const outPath = readFlag("--out") ?? ".agentcert/latest/governed-corpus.jsonl";
|
|
175
|
+
const allowed = (readFlag("--consent") ?? "public,anonymous").split(",").map((item) => parseCorpusConsent(item.trim()));
|
|
176
|
+
const store = await openCorpusStore(readCorpusStoreOptions(".agentcert/corpus/corpus.jsonl"));
|
|
177
|
+
try {
|
|
178
|
+
const records = exportGovernedCorpus(await store.readAll(), allowed);
|
|
179
|
+
await mkdir(dirname(resolve(outPath)), { recursive: true });
|
|
180
|
+
await writeFile(outPath, records.map((record) => JSON.stringify(record)).join("\n") + (records.length ? "\n" : ""));
|
|
181
|
+
process.stdout.write(`Exported ${records.length} consented corpus records to ${resolve(outPath)}\n`);
|
|
182
|
+
}
|
|
183
|
+
finally {
|
|
184
|
+
await store.close();
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
else if (action === "delete") {
|
|
188
|
+
const ids = requiredFlag("--record-id").split(",").map((item) => item.trim()).filter(Boolean);
|
|
189
|
+
const reason = requiredFlag("--reason");
|
|
190
|
+
const journalPath = readFlag("--journal") ?? ".agentcert/corpus/deletion-journal.jsonl";
|
|
191
|
+
const store = await openCorpusStore(readCorpusStoreOptions(".agentcert/corpus/corpus.jsonl"));
|
|
192
|
+
try {
|
|
193
|
+
const result = deleteCorpusRecords(await store.readAll(), ids, reason);
|
|
194
|
+
if (!result.tombstones.length)
|
|
195
|
+
throw new Error("No corpus records matched --record-id; nothing was deleted.");
|
|
196
|
+
await store.append(result.retained, { replace: true });
|
|
197
|
+
await mkdir(dirname(resolve(journalPath)), { recursive: true });
|
|
198
|
+
await appendFile(journalPath, result.tombstones.map((item) => JSON.stringify(item)).join("\n") + "\n");
|
|
199
|
+
process.stdout.write(`Deleted ${result.tombstones.length} corpus records and wrote non-identifying tombstones to ${resolve(journalPath)}\n`);
|
|
200
|
+
}
|
|
201
|
+
finally {
|
|
202
|
+
await store.close();
|
|
203
|
+
}
|
|
204
|
+
}
|
|
172
205
|
else if (action === "classifier-eval") {
|
|
173
206
|
const outPath = readFlag("--out");
|
|
174
207
|
const store = await openCorpusStore(readCorpusStoreOptions(".agentcert/corpus/corpus.jsonl"));
|
|
@@ -231,9 +264,12 @@ else if (command === "corpus") {
|
|
|
231
264
|
process.stdout.write(`Usage:
|
|
232
265
|
agentcert corpus ingest --tripwire .tripwire/latest/tripwire-result.json --out .agentcert/corpus/corpus.jsonl --subject my-agent
|
|
233
266
|
agentcert corpus ingest --store sqlite --sqlite .agentcert/corpus/agentcert.sqlite --tripwire .tripwire/latest/tripwire-result.json --subject my-agent
|
|
267
|
+
agentcert corpus ingest --tripwire result.json --consent anonymous --consent-source "pilot agreement 2026-07"
|
|
234
268
|
agentcert corpus review --corpus .agentcert/corpus/corpus.jsonl --reviews .agentcert/corpus/failure-reviews.jsonl --pattern-key tripwire:ui_drift:modal-overlay:url_contains --type ui_drift --status confirmed --reviewer you@example.com --confidence 0.8 --why "Visible evidence supports the ui_drift label."
|
|
235
269
|
agentcert corpus metrics --corpus .agentcert/corpus/corpus.jsonl
|
|
236
270
|
agentcert corpus export-reviewed --corpus .agentcert/corpus/corpus.jsonl --out .agentcert/latest/reviewed-failure-dataset.jsonl
|
|
271
|
+
agentcert corpus export --corpus .agentcert/corpus/corpus.jsonl --consent public,anonymous --out .agentcert/latest/governed-corpus.jsonl
|
|
272
|
+
agentcert corpus delete --corpus .agentcert/corpus/corpus.jsonl --record-id <id> --reason "participant withdrawal"
|
|
237
273
|
agentcert corpus classifier-eval --corpus .agentcert/corpus/corpus.jsonl --out .agentcert/latest/failure-classifier-evaluation.json
|
|
238
274
|
agentcert corpus summary --corpus .agentcert/corpus/corpus.jsonl
|
|
239
275
|
agentcert corpus summary --store postgres --database-url "$DATABASE_URL"
|
|
@@ -452,6 +488,8 @@ else if (command === "schema") {
|
|
|
452
488
|
agentcert schema validate --schema corpus-record --file examples/agentcert/corpus-record.example.json
|
|
453
489
|
agentcert schema validate --schema classifier-eval --file examples/agentcert/classifier-eval.example.json
|
|
454
490
|
agentcert schema validate --schema release-gate --file .agentcert/latest/agentcert-release-gate.json
|
|
491
|
+
agentcert schema validate --schema assurance-report --file assurance-report.json
|
|
492
|
+
agentcert schema validate --schema assurance-delivery --file assurance-delivery.json
|
|
455
493
|
agentcert schema validate --schema evidence-signature --file .agentcert/latest/agentcert-evidence.json.sig.json
|
|
456
494
|
`);
|
|
457
495
|
}
|
|
@@ -515,7 +553,7 @@ else if (command === "conformance") {
|
|
|
515
553
|
else {
|
|
516
554
|
process.stdout.write(`Usage:
|
|
517
555
|
agentcert init --subject my-browser-agent
|
|
518
|
-
agentcert connect --server https://agentcert
|
|
556
|
+
agentcert connect --server https://agentcert.app --project <project-id>
|
|
519
557
|
agentcert sandbox init
|
|
520
558
|
agentcert sandbox certify --adapter ./agentcert.sandbox.mjs
|
|
521
559
|
agentcert sandbox push --adapter ./agentcert.sandbox.mjs
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { basename } from "node:path";
|
|
3
|
+
const SECRET_PATTERNS = [
|
|
4
|
+
/\bsk-(?:proj-|live_|test_)?[A-Za-z0-9_-]{16,}\b/g,
|
|
5
|
+
/\brk_(?:live|test)_[A-Za-z0-9]{12,}\b/g,
|
|
6
|
+
/\bnpm_[A-Za-z0-9]{16,}\b/g,
|
|
7
|
+
/\bac_(?:live|test)_[A-Za-z0-9_-]{12,}\b/g,
|
|
8
|
+
/\bBearer\s+[A-Za-z0-9._~+/=-]{12,}\b/gi,
|
|
9
|
+
];
|
|
10
|
+
const EMAIL_PATTERN = /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi;
|
|
11
|
+
export function governCorpusRecords(records, input) {
|
|
12
|
+
if (input.consent === "denied")
|
|
13
|
+
throw new Error("Corpus consent is denied; no record was retained.");
|
|
14
|
+
if (!input.consentSource.trim())
|
|
15
|
+
throw new Error("Corpus consent source is required.");
|
|
16
|
+
const recordedAt = input.recordedAt ?? new Date().toISOString();
|
|
17
|
+
return records.map((record) => {
|
|
18
|
+
const [redacted, replacements] = redactValue(structuredClone(record), input.consent === "anonymous");
|
|
19
|
+
const governed = redacted;
|
|
20
|
+
if (input.consent === "anonymous") {
|
|
21
|
+
const identity = pseudonym(record.subject);
|
|
22
|
+
governed.subject = `anonymous-${identity}`;
|
|
23
|
+
governed.agentName = `anonymous-agent-${identity}`;
|
|
24
|
+
governed.sourcePath = basename(record.sourcePath.replaceAll("\\", "/"));
|
|
25
|
+
governed.artifacts = Object.fromEntries(Object.entries(governed.artifacts).map(([key, value]) => [key, basename(value.replaceAll("\\", "/"))]));
|
|
26
|
+
}
|
|
27
|
+
governed.governance = {
|
|
28
|
+
schemaVersion: "agentcert.corpus_governance.v0.1",
|
|
29
|
+
consent: input.consent,
|
|
30
|
+
consentSource: redactText(input.consentSource, input.consent === "anonymous")[0],
|
|
31
|
+
consentRecordedAt: recordedAt,
|
|
32
|
+
provenance: {
|
|
33
|
+
sourcePath: input.consent === "anonymous" ? basename(record.sourcePath.replaceAll("\\", "/")) : record.sourcePath,
|
|
34
|
+
sourceRecordSha256: createHash("sha256").update(JSON.stringify(record)).digest("hex"),
|
|
35
|
+
collectedAt: record.ingestedAt,
|
|
36
|
+
},
|
|
37
|
+
redaction: { policyVersion: "agentcert.redaction.v0.1", replacements, secretScanPassed: !containsSecret(JSON.stringify(governed)) },
|
|
38
|
+
};
|
|
39
|
+
if (!governed.governance.redaction.secretScanPassed)
|
|
40
|
+
throw new Error(`Corpus record ${record.id} still contains a recognized secret after redaction.`);
|
|
41
|
+
return governed;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
export function exportGovernedCorpus(records, allowed = ["public", "anonymous"]) {
|
|
45
|
+
const allow = new Set(allowed);
|
|
46
|
+
return records
|
|
47
|
+
.filter((record) => record.governance && allow.has(record.governance.consent))
|
|
48
|
+
.map((record) => {
|
|
49
|
+
const [redacted, replacements] = redactValue(structuredClone(record), record.governance.consent === "anonymous");
|
|
50
|
+
const exported = redacted;
|
|
51
|
+
if (record.governance.consent === "anonymous") {
|
|
52
|
+
const identity = record.subject.startsWith("anonymous-") ? record.subject.slice("anonymous-".length) : pseudonym(record.subject);
|
|
53
|
+
exported.subject = `anonymous-${identity}`;
|
|
54
|
+
exported.agentName = `anonymous-agent-${identity}`;
|
|
55
|
+
exported.sourcePath = basename(record.sourcePath.replaceAll("\\", "/"));
|
|
56
|
+
exported.artifacts = Object.fromEntries(Object.entries(exported.artifacts).map(([key, value]) => [key, basename(value.replaceAll("\\", "/"))]));
|
|
57
|
+
}
|
|
58
|
+
exported.governance = {
|
|
59
|
+
...record.governance,
|
|
60
|
+
redaction: {
|
|
61
|
+
...record.governance.redaction,
|
|
62
|
+
replacements: record.governance.redaction.replacements + replacements,
|
|
63
|
+
secretScanPassed: !containsSecret(JSON.stringify(exported)),
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
if (!exported.governance.redaction.secretScanPassed)
|
|
67
|
+
throw new Error(`Corpus record ${record.id} failed the export secret scan.`);
|
|
68
|
+
return exported;
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
export function deleteCorpusRecords(records, ids, reason, deletedAt = new Date().toISOString()) {
|
|
72
|
+
if (!reason.trim())
|
|
73
|
+
throw new Error("Corpus deletion requires a reason.");
|
|
74
|
+
const requested = new Set(ids);
|
|
75
|
+
const deleted = records.filter((record) => requested.has(record.id));
|
|
76
|
+
return {
|
|
77
|
+
retained: records.filter((record) => !requested.has(record.id)),
|
|
78
|
+
tombstones: deleted.map((record) => ({
|
|
79
|
+
schemaVersion: "agentcert.corpus_deletion.v0.1",
|
|
80
|
+
recordIdSha256: createHash("sha256").update(record.id).digest("hex"),
|
|
81
|
+
reason: redactText(reason, true)[0],
|
|
82
|
+
deletedAt,
|
|
83
|
+
})),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export function parseCorpusConsent(value) {
|
|
87
|
+
const consent = value ?? "private";
|
|
88
|
+
if (consent === "private" || consent === "anonymous" || consent === "public" || consent === "denied")
|
|
89
|
+
return consent;
|
|
90
|
+
throw new Error(`Unsupported corpus consent "${consent}". Use private, anonymous, public, or denied.`);
|
|
91
|
+
}
|
|
92
|
+
function redactValue(value, anonymous) {
|
|
93
|
+
if (typeof value === "string")
|
|
94
|
+
return redactText(value, anonymous);
|
|
95
|
+
if (Array.isArray(value)) {
|
|
96
|
+
let replacements = 0;
|
|
97
|
+
const output = value.map((item) => { const [next, count] = redactValue(item, anonymous); replacements += count; return next; });
|
|
98
|
+
return [output, replacements];
|
|
99
|
+
}
|
|
100
|
+
if (value && typeof value === "object") {
|
|
101
|
+
let replacements = 0;
|
|
102
|
+
const output = {};
|
|
103
|
+
for (const [key, item] of Object.entries(value)) {
|
|
104
|
+
const [next, count] = redactValue(item, anonymous);
|
|
105
|
+
output[key] = next;
|
|
106
|
+
replacements += count;
|
|
107
|
+
}
|
|
108
|
+
return [output, replacements];
|
|
109
|
+
}
|
|
110
|
+
return [value, 0];
|
|
111
|
+
}
|
|
112
|
+
function redactText(value, anonymous) {
|
|
113
|
+
let output = value;
|
|
114
|
+
let replacements = 0;
|
|
115
|
+
for (const pattern of SECRET_PATTERNS)
|
|
116
|
+
output = output.replace(pattern, () => { replacements += 1; return "[REDACTED_SECRET]"; });
|
|
117
|
+
if (anonymous)
|
|
118
|
+
output = output.replace(EMAIL_PATTERN, () => { replacements += 1; return "[REDACTED_EMAIL]"; });
|
|
119
|
+
return [output, replacements];
|
|
120
|
+
}
|
|
121
|
+
function containsSecret(value) {
|
|
122
|
+
return SECRET_PATTERNS.some((pattern) => { pattern.lastIndex = 0; return pattern.test(value); });
|
|
123
|
+
}
|
|
124
|
+
function pseudonym(value) {
|
|
125
|
+
return createHash("sha256").update(value).digest("hex").slice(0, 12);
|
|
126
|
+
}
|
package/dist/corpus-store.js
CHANGED
|
@@ -62,11 +62,10 @@ async function createSqliteCorpusStore(path, tableNameInput) {
|
|
|
62
62
|
kind: "sqlite",
|
|
63
63
|
description: `SQLite corpus at ${outPath}`,
|
|
64
64
|
append: async (records, options) => {
|
|
65
|
-
if (options?.replace) {
|
|
66
|
-
db.exec(`DELETE FROM ${table}`);
|
|
67
|
-
}
|
|
68
65
|
db.exec("BEGIN");
|
|
69
66
|
try {
|
|
67
|
+
if (options?.replace)
|
|
68
|
+
db.exec(`DELETE FROM ${table}`);
|
|
70
69
|
for (const record of records) {
|
|
71
70
|
insert.run(...recordSqlValues(record, "sqlite"), JSON.stringify(record));
|
|
72
71
|
}
|
|
@@ -97,11 +96,10 @@ async function createPostgresCorpusStore(databaseUrl, tableNameInput) {
|
|
|
97
96
|
kind: "postgres",
|
|
98
97
|
description: `Postgres corpus table ${tableName}`,
|
|
99
98
|
append: async (records, options) => {
|
|
100
|
-
if (options?.replace) {
|
|
101
|
-
await client.query(`DELETE FROM ${table}`);
|
|
102
|
-
}
|
|
103
99
|
await client.query("BEGIN");
|
|
104
100
|
try {
|
|
101
|
+
if (options?.replace)
|
|
102
|
+
await client.query(`DELETE FROM ${table}`);
|
|
105
103
|
for (const record of records) {
|
|
106
104
|
await client.query(insertSql(table, "$"), [...recordSqlValues(record, "postgres"), JSON.stringify(record)]);
|
|
107
105
|
}
|
package/dist/credentials.js
CHANGED
|
@@ -2,7 +2,7 @@ import { chmod, mkdir, readFile, rename, writeFile } from "node:fs/promises";
|
|
|
2
2
|
import { homedir } from "node:os";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
|
-
export const DEFAULT_AGENTCERT_SERVER = "https://agentcert
|
|
5
|
+
export const DEFAULT_AGENTCERT_SERVER = "https://agentcert.app";
|
|
6
6
|
export async function saveConnection(name, input, options = {}) {
|
|
7
7
|
const connectionName = validateConnectionName(name);
|
|
8
8
|
const connection = validateConnection(input);
|
package/dist/normalizers.js
CHANGED
|
@@ -42,6 +42,7 @@ export function normalizeMcpBenchResult(input, artifactPath) {
|
|
|
42
42
|
passed,
|
|
43
43
|
certLevel: stringValue(value.cert_level),
|
|
44
44
|
summary: passed ? "MCPBench completed without blocking violations." : "MCPBench found blocking evidence.",
|
|
45
|
+
evidenceStrength: reportedStrength("MCPBench result was imported without a source-signed action journal."),
|
|
45
46
|
artifacts: recordOfStrings(value.artifact_paths, { results: artifactPath }),
|
|
46
47
|
evidence,
|
|
47
48
|
};
|
|
@@ -85,6 +86,7 @@ export function normalizeTripwireResult(input, artifactPath) {
|
|
|
85
86
|
score: overallScore,
|
|
86
87
|
passed,
|
|
87
88
|
summary: passed ? "Tripwire CI gate passed." : "Tripwire CI gate failed.",
|
|
89
|
+
evidenceStrength: reportedStrength("Tripwire result was imported without a source-signed action journal."),
|
|
88
90
|
artifacts: { result: artifactPath, outDir: stringValue(value.outDir) ?? "" },
|
|
89
91
|
evidence,
|
|
90
92
|
};
|
|
@@ -98,6 +100,10 @@ export function normalizeOnegentAuditPacket(input, artifactPath) {
|
|
|
98
100
|
const authorization = asRecord(value.authorizationDecision);
|
|
99
101
|
const verification = asRecord(value.verificationResult);
|
|
100
102
|
const auditEvents = Array.isArray(value.auditEvents) ? value.auditEvents : [];
|
|
103
|
+
const trusted = asRecord(value.trustedActionEvidence);
|
|
104
|
+
const trustedStrength = evidenceStrengthValue(trusted.evidenceStrength);
|
|
105
|
+
const mandate = asRecord(trusted.mandate);
|
|
106
|
+
const receipt = asRecord(trusted.runReceipt);
|
|
101
107
|
const verificationSuccess = verification.success === true;
|
|
102
108
|
const approved = approval.status === "APPROVED" || approval.status === undefined;
|
|
103
109
|
const passed = verificationSuccess && approved;
|
|
@@ -158,6 +164,25 @@ export function normalizeOnegentAuditPacket(input, artifactPath) {
|
|
|
158
164
|
artifactPath,
|
|
159
165
|
metadata: verification,
|
|
160
166
|
});
|
|
167
|
+
if (trustedStrength) {
|
|
168
|
+
evidence.push({
|
|
169
|
+
id: "onegent_action_mandate",
|
|
170
|
+
kind: "action_mandate",
|
|
171
|
+
severity: "info",
|
|
172
|
+
message: `High-risk action was bound to mandate ${stringValue(mandate.mandateId) ?? "UNKNOWN"}.`,
|
|
173
|
+
source: "onegent-runtime",
|
|
174
|
+
artifactPath,
|
|
175
|
+
metadata: { mandateId: mandate.mandateId, mandateDigestSha256: mandate.digestSha256 },
|
|
176
|
+
}, {
|
|
177
|
+
id: "onegent_trusted_journal",
|
|
178
|
+
kind: "trusted_action_journal",
|
|
179
|
+
severity: asRecord(receipt.journal).valid === true ? "info" : "critical",
|
|
180
|
+
message: `Source-signed action journal strength: ${trustedStrength.level}.`,
|
|
181
|
+
source: "onegent-runtime",
|
|
182
|
+
artifactPath,
|
|
183
|
+
metadata: { receiptSha256: receipt.receiptSha256, collector: receipt.collector, journal: receipt.journal },
|
|
184
|
+
});
|
|
185
|
+
}
|
|
161
186
|
for (const event of auditEvents) {
|
|
162
187
|
const record = asRecord(event);
|
|
163
188
|
evidence.push({
|
|
@@ -181,10 +206,32 @@ export function normalizeOnegentAuditPacket(input, artifactPath) {
|
|
|
181
206
|
summary: passed
|
|
182
207
|
? "Runtime action was approved, mock-executed, verified, and audited."
|
|
183
208
|
: "Runtime action did not complete the approval and verification gate.",
|
|
209
|
+
evidenceStrength: trustedStrength ?? reportedStrength("Onegent audit packet does not include a trusted action receipt."),
|
|
184
210
|
artifacts: { auditPacket: artifactPath },
|
|
185
211
|
evidence,
|
|
186
212
|
};
|
|
187
213
|
}
|
|
214
|
+
function reportedStrength(limitation) {
|
|
215
|
+
return {
|
|
216
|
+
schemaVersion: "agentcert.evidence_strength.v0.1",
|
|
217
|
+
level: "reported",
|
|
218
|
+
claims: ["A producer supplied a result for this run."],
|
|
219
|
+
limitations: [limitation],
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
function evidenceStrengthValue(input) {
|
|
223
|
+
const value = asRecord(input);
|
|
224
|
+
const level = value.level;
|
|
225
|
+
if (value.schemaVersion !== "agentcert.evidence_strength.v0.1"
|
|
226
|
+
|| !["reported", "recorded", "enforced", "outcome_verified", "independently_reviewed"].includes(String(level)))
|
|
227
|
+
return undefined;
|
|
228
|
+
return {
|
|
229
|
+
schemaVersion: "agentcert.evidence_strength.v0.1",
|
|
230
|
+
level: level,
|
|
231
|
+
claims: Array.isArray(value.claims) ? value.claims.filter((item) => typeof item === "string") : [],
|
|
232
|
+
limitations: Array.isArray(value.limitations) ? value.limitations.filter((item) => typeof item === "string") : [],
|
|
233
|
+
};
|
|
234
|
+
}
|
|
188
235
|
function normalizeScore(value) {
|
|
189
236
|
return value <= 1 ? Math.round(value * 100) : Math.round(value);
|
|
190
237
|
}
|
package/dist/report.js
CHANGED
|
@@ -6,7 +6,12 @@ export function renderMarkdownReport(bundle) {
|
|
|
6
6
|
`Generated: ${bundle.generatedAt}`,
|
|
7
7
|
`Verdict: ${bundle.verdict.passed ? "PASS" : "FAIL"}`,
|
|
8
8
|
`Score: ${bundle.verdict.score}`,
|
|
9
|
-
`
|
|
9
|
+
`Evidence strength: ${bundle.evidenceStrength?.level ?? "reported"}`,
|
|
10
|
+
"",
|
|
11
|
+
"## Evidence Strength",
|
|
12
|
+
"",
|
|
13
|
+
...(bundle.evidenceStrength?.claims ?? ["A producer supplied a result for this run."]).map((claim) => `- Claim: ${claim}`),
|
|
14
|
+
...(bundle.evidenceStrength?.limitations ?? ["This legacy bundle does not declare stronger source controls."]).map((limitation) => `- Limitation: ${limitation}`),
|
|
10
15
|
"",
|
|
11
16
|
"## Results",
|
|
12
17
|
"",
|
|
@@ -34,6 +39,11 @@ export function renderMarkdownReport(bundle) {
|
|
|
34
39
|
return `${lines.join("\n")}\n`;
|
|
35
40
|
}
|
|
36
41
|
export function renderHtmlReport(bundle) {
|
|
42
|
+
const strength = bundle.evidenceStrength ?? {
|
|
43
|
+
level: "reported",
|
|
44
|
+
claims: ["A producer supplied a result for this run."],
|
|
45
|
+
limitations: ["This legacy bundle does not declare stronger source controls."],
|
|
46
|
+
};
|
|
37
47
|
const resultCards = bundle.results
|
|
38
48
|
.map((result) => `<article class="card ${result.passed ? "pass" : "fail"}">
|
|
39
49
|
<span>${escapeHtml(result.phase)}</span>
|
|
@@ -108,10 +118,17 @@ export function renderHtmlReport(bundle) {
|
|
|
108
118
|
<div class="summary">
|
|
109
119
|
<div class="metric"><span>Verdict</span><strong class="${bundle.verdict.passed ? "verdict-pass" : "verdict-fail"}">${bundle.verdict.passed ? "PASS" : "FAIL"}</strong></div>
|
|
110
120
|
<div class="metric"><span>Score</span><strong>${bundle.verdict.score}/100</strong></div>
|
|
111
|
-
<div class="metric"><span>
|
|
121
|
+
<div class="metric"><span>Evidence strength</span><strong>${escapeHtml(bundle.evidenceStrength?.level ?? "reported")}</strong></div>
|
|
112
122
|
<div class="metric"><span>Evidence</span><strong>${bundle.summary.totalEvidence}</strong></div>
|
|
113
123
|
</div>
|
|
114
124
|
<div class="cards">${resultCards}</div>
|
|
125
|
+
<section>
|
|
126
|
+
<h2>Evidence strength: ${escapeHtml(strength.level)}</h2>
|
|
127
|
+
<h3>Supported claims</h3>
|
|
128
|
+
<ul>${strength.claims.map((claim) => `<li>${escapeHtml(claim)}</li>`).join("")}</ul>
|
|
129
|
+
<h3>Limitations</h3>
|
|
130
|
+
<ul>${strength.limitations.map((limitation) => `<li>${escapeHtml(limitation)}</li>`).join("")}</ul>
|
|
131
|
+
</section>
|
|
115
132
|
<section>
|
|
116
133
|
<h2>Evidence</h2>
|
|
117
134
|
<table>
|
package/dist/runner.js
CHANGED
|
@@ -7,6 +7,7 @@ import { buildEvidenceBundle } from "./bundle.js";
|
|
|
7
7
|
import { recordsFromAgentCertResult, renderCorpusSummary, summarizeCorpus, writeReviewedFailureDataset, } from "./corpus.js";
|
|
8
8
|
import { openCorpusStore, parseCorpusStoreKind } from "./corpus-store.js";
|
|
9
9
|
import { applyFailureReviews, readFailureReviews } from "./failure-review.js";
|
|
10
|
+
import { governCorpusRecords } from "./corpus-governance.js";
|
|
10
11
|
import { buildMonitorSnapshot, writeMonitorSnapshot } from "./monitor.js";
|
|
11
12
|
import { normalizeMcpBenchResult, normalizeOnegentAuditPacket, normalizeTripwireResult } from "./normalizers.js";
|
|
12
13
|
import { renderHtmlReport, renderMarkdownReport } from "./report.js";
|
|
@@ -168,7 +169,7 @@ export async function runAgentCertProfile(profileInput, options = {}) {
|
|
|
168
169
|
const bundle = buildEvidenceBundle(loaded.map((artifact) => artifact.result), profile.subject.name, profile.subject.type);
|
|
169
170
|
const reviewsPath = profile.run?.corpus?.reviewsPath;
|
|
170
171
|
const reviews = await readFailureReviews(reviewsPath ? resolve(cwd, reviewsPath) : undefined);
|
|
171
|
-
const records = applyFailureReviews(loaded.flatMap(({ result, path, raw }) => recordsFromAgentCertResult(result, path, profile.subject.name, raw)), reviews);
|
|
172
|
+
const records = governCorpusRecords(applyFailureReviews(loaded.flatMap(({ result, path, raw }) => recordsFromAgentCertResult(result, path, profile.subject.name, raw)), reviews), { consent: "private", consentSource: "agentcert-runner-default" });
|
|
172
173
|
const outputs = { monitor: [], reviewedDataset: [] };
|
|
173
174
|
const reportEnabled = profile.run?.report?.enabled ?? true;
|
|
174
175
|
const reportDir = profile.run?.report?.outDir ?? profile.outputDir;
|
package/dist/schema-validator.js
CHANGED
|
@@ -11,10 +11,16 @@ export function parseSchemaId(input) {
|
|
|
11
11
|
value === "monitor-snapshot" ||
|
|
12
12
|
value === "robustness-lab" ||
|
|
13
13
|
value === "release-gate" ||
|
|
14
|
-
value === "
|
|
14
|
+
value === "assurance-report" ||
|
|
15
|
+
value === "assurance-delivery" ||
|
|
16
|
+
value === "evidence-signature" ||
|
|
17
|
+
value === "evidence-strength" ||
|
|
18
|
+
value === "action-mandate" ||
|
|
19
|
+
value === "trusted-action-record" ||
|
|
20
|
+
value === "trusted-run-receipt") {
|
|
15
21
|
return value;
|
|
16
22
|
}
|
|
17
|
-
throw new Error(`Unsupported schema "${value}". Use evidence-bundle, result, corpus-record, failure-review, classifier-eval, monitor-snapshot, robustness-lab, release-gate,
|
|
23
|
+
throw new Error(`Unsupported schema "${value}". Use evidence-bundle, result, corpus-record, failure-review, classifier-eval, monitor-snapshot, robustness-lab, release-gate, assurance-report, assurance-delivery, evidence-signature, evidence-strength, action-mandate, trusted-action-record, or trusted-run-receipt.`);
|
|
18
24
|
}
|
|
19
25
|
export function validateAgentCertSchema(schema, input) {
|
|
20
26
|
const errors = [];
|
|
@@ -42,6 +48,18 @@ export function validateAgentCertSchema(schema, input) {
|
|
|
42
48
|
validateMonitorSnapshot(value, errors);
|
|
43
49
|
if (schema === "robustness-lab")
|
|
44
50
|
validateRobustnessLab(value, errors);
|
|
51
|
+
if (schema === "assurance-report")
|
|
52
|
+
validateAssuranceReport(value, errors);
|
|
53
|
+
if (schema === "assurance-delivery")
|
|
54
|
+
validateAssuranceDelivery(value, errors);
|
|
55
|
+
if (schema === "evidence-strength")
|
|
56
|
+
validateEvidenceStrength(value, errors);
|
|
57
|
+
if (schema === "action-mandate")
|
|
58
|
+
validateActionMandate(value, errors);
|
|
59
|
+
if (schema === "trusted-action-record")
|
|
60
|
+
validateTrustedActionRecord(value, errors);
|
|
61
|
+
if (schema === "trusted-run-receipt")
|
|
62
|
+
validateTrustedRunReceipt(value, errors);
|
|
45
63
|
}
|
|
46
64
|
return { schema, valid: errors.length === 0, errors };
|
|
47
65
|
}
|
|
@@ -59,6 +77,13 @@ function validateEvidenceBundle(value, errors) {
|
|
|
59
77
|
requiredArray(value, "evidence", errors);
|
|
60
78
|
requiredObject(value, "artifacts", errors);
|
|
61
79
|
requiredArray(value, "standards", errors);
|
|
80
|
+
if (value.evidenceStrength !== undefined) {
|
|
81
|
+
const strength = recordValue(value.evidenceStrength);
|
|
82
|
+
if (!strength)
|
|
83
|
+
errors.push("evidenceStrength must be an object.");
|
|
84
|
+
else
|
|
85
|
+
validateEvidenceStrength(strength, errors, "evidenceStrength.");
|
|
86
|
+
}
|
|
62
87
|
const subject = recordValue(value.subject);
|
|
63
88
|
if (subject) {
|
|
64
89
|
requiredStringAt(subject, "name", "subject.name", errors);
|
|
@@ -83,6 +108,88 @@ function validateEvidenceBundle(value, errors) {
|
|
|
83
108
|
validateEvidenceArray(value.evidence, "evidence", errors);
|
|
84
109
|
validateStandards(value.standards, errors);
|
|
85
110
|
}
|
|
111
|
+
const EVIDENCE_LEVELS = ["reported", "recorded", "enforced", "outcome_verified", "independently_reviewed"];
|
|
112
|
+
const ACTION_TYPES = ["SUBMIT", "PAY", "SEND", "UPDATE"];
|
|
113
|
+
function validateEvidenceStrength(value, errors, prefix = "") {
|
|
114
|
+
requiredConst(value, "schemaVersion", "agentcert.evidence_strength.v0.1", errors);
|
|
115
|
+
requiredEnumAt(value, "level", EVIDENCE_LEVELS, `${prefix}level`, errors);
|
|
116
|
+
requiredArray(value, "claims", errors);
|
|
117
|
+
requiredArray(value, "limitations", errors);
|
|
118
|
+
stringArray(value.claims, `${prefix}claims`, errors);
|
|
119
|
+
stringArray(value.limitations, `${prefix}limitations`, errors);
|
|
120
|
+
}
|
|
121
|
+
function validateActionMandate(value, errors) {
|
|
122
|
+
requiredConst(value, "schemaVersion", "agentcert.action_mandate.v0.1", errors);
|
|
123
|
+
for (const field of ["mandateId", "policySha256", "validFrom", "expiresAt", "issuedAt", "digestSha256"])
|
|
124
|
+
requiredString(value, field, errors);
|
|
125
|
+
requiredObject(value, "issuer", errors);
|
|
126
|
+
requiredObject(value, "subject", errors);
|
|
127
|
+
requiredObject(value, "scope", errors);
|
|
128
|
+
requiredObject(value, "sourceSignature", errors);
|
|
129
|
+
sha256Field(value, "policySha256", errors);
|
|
130
|
+
sha256Field(value, "digestSha256", errors);
|
|
131
|
+
for (const field of ["validFrom", "expiresAt", "issuedAt"])
|
|
132
|
+
validateTimestamp(value[field], field, errors);
|
|
133
|
+
const scope = recordValue(value.scope);
|
|
134
|
+
if (scope) {
|
|
135
|
+
requiredArray(scope, "actionTypes", errors);
|
|
136
|
+
requiredArray(scope, "targetSystems", errors);
|
|
137
|
+
requiredArray(scope, "permissions", errors);
|
|
138
|
+
if (Array.isArray(scope.actionTypes))
|
|
139
|
+
scope.actionTypes.forEach((item, index) => {
|
|
140
|
+
if (!ACTION_TYPES.includes(String(item)))
|
|
141
|
+
errors.push(`scope.actionTypes[${index}] is not supported.`);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
validateSourceSignature(value.sourceSignature, "sourceSignature", errors);
|
|
145
|
+
}
|
|
146
|
+
function validateTrustedActionRecord(value, errors) {
|
|
147
|
+
requiredConst(value, "schemaVersion", "agentcert.trusted_action_record.v0.1", errors);
|
|
148
|
+
for (const field of ["recordId", "runId", "occurredAt", "type", "payloadSha256", "eventHash"])
|
|
149
|
+
requiredString(value, field, errors);
|
|
150
|
+
requiredNonNegativeInteger(value, "sequence", "sequence", errors);
|
|
151
|
+
requiredObject(value, "collector", errors);
|
|
152
|
+
requiredObject(value, "payload", errors);
|
|
153
|
+
requiredObject(value, "sourceSignature", errors);
|
|
154
|
+
sha256Field(value, "payloadSha256", errors);
|
|
155
|
+
sha256Field(value, "eventHash", errors);
|
|
156
|
+
if (value.previousEventHash !== undefined)
|
|
157
|
+
sha256Field(value, "previousEventHash", errors);
|
|
158
|
+
validateTimestamp(value.occurredAt, "occurredAt", errors);
|
|
159
|
+
validateSourceSignature(value.sourceSignature, "sourceSignature", errors);
|
|
160
|
+
}
|
|
161
|
+
function validateTrustedRunReceipt(value, errors) {
|
|
162
|
+
requiredConst(value, "schemaVersion", "agentcert.trusted_run_receipt.v0.1", errors);
|
|
163
|
+
for (const field of ["runId", "startedAt", "completedAt", "firstEventHash", "lastEventHash", "sourcePublicKeyPem", "receiptSha256"])
|
|
164
|
+
requiredString(value, field, errors);
|
|
165
|
+
for (const field of ["eventCount", "droppedEventCount"])
|
|
166
|
+
requiredNonNegativeInteger(value, field, field, errors);
|
|
167
|
+
requiredObject(value, "collector", errors);
|
|
168
|
+
requiredArray(value, "mandateDigests", errors);
|
|
169
|
+
requiredArray(value, "actionIds", errors);
|
|
170
|
+
requiredObject(value, "journal", errors);
|
|
171
|
+
requiredObject(value, "evidenceStrength", errors);
|
|
172
|
+
requiredObject(value, "sourceSignature", errors);
|
|
173
|
+
for (const field of ["firstEventHash", "lastEventHash", "receiptSha256"])
|
|
174
|
+
sha256Field(value, field, errors);
|
|
175
|
+
const strength = recordValue(value.evidenceStrength);
|
|
176
|
+
if (strength)
|
|
177
|
+
validateEvidenceStrength(strength, errors, "evidenceStrength.");
|
|
178
|
+
validateSourceSignature(value.sourceSignature, "sourceSignature", errors);
|
|
179
|
+
}
|
|
180
|
+
function sha256Field(value, field, errors) {
|
|
181
|
+
if (typeof value[field] === "string" && !/^[0-9a-f]{64}$/.test(value[field]))
|
|
182
|
+
errors.push(`${field} must be a lowercase SHA-256 digest.`);
|
|
183
|
+
}
|
|
184
|
+
function validateSourceSignature(value, path, errors) {
|
|
185
|
+
const signature = recordValue(value);
|
|
186
|
+
if (!signature)
|
|
187
|
+
return;
|
|
188
|
+
if (signature.algorithm !== "Ed25519")
|
|
189
|
+
errors.push(`${path}.algorithm must equal Ed25519.`);
|
|
190
|
+
requiredStringAt(signature, "keyId", `${path}.keyId`, errors);
|
|
191
|
+
requiredStringAt(signature, "signature", `${path}.signature`, errors);
|
|
192
|
+
}
|
|
86
193
|
function validateResult(value, errors) {
|
|
87
194
|
requiredConst(value, "schemaVersion", "1", errors);
|
|
88
195
|
requiredString(value, "product", errors);
|
|
@@ -160,6 +267,59 @@ function validateCorpusRecord(value, errors) {
|
|
|
160
267
|
requiredString(value, "runId", errors);
|
|
161
268
|
requiredBoolean(value, "passed", errors);
|
|
162
269
|
requiredArray(value, "failurePatterns", errors);
|
|
270
|
+
if (value.governance !== undefined) {
|
|
271
|
+
const governance = recordValue(value.governance);
|
|
272
|
+
if (!governance)
|
|
273
|
+
errors.push("governance must be an object.");
|
|
274
|
+
else {
|
|
275
|
+
requiredConst(governance, "schemaVersion", "agentcert.corpus_governance.v0.1", errors);
|
|
276
|
+
requiredEnum(governance, "consent", ["private", "anonymous", "public", "denied"], errors);
|
|
277
|
+
requiredString(governance, "consentSource", errors);
|
|
278
|
+
requiredString(governance, "consentRecordedAt", errors);
|
|
279
|
+
requiredObject(governance, "provenance", errors);
|
|
280
|
+
requiredObject(governance, "redaction", errors);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
function validateAssuranceReport(value, errors) {
|
|
285
|
+
requiredConst(value, "schemaVersion", "agentcert.assurance_report.v0.1", errors);
|
|
286
|
+
for (const key of ["assuranceCaseId", "projectId", "policyPackVersion", "evaluationPlanSha256", "reviewerId", "issuedAt", "expiresAt", "statement"])
|
|
287
|
+
requiredString(value, key, errors);
|
|
288
|
+
requiredObject(value, "subject", errors);
|
|
289
|
+
requiredArray(value, "evidence", errors);
|
|
290
|
+
requiredConst(value, "decision", "issued", errors);
|
|
291
|
+
requiredArray(value, "limitations", errors);
|
|
292
|
+
if (!/^[0-9a-f]{64}$/.test(String(value.evaluationPlanSha256 ?? "")))
|
|
293
|
+
errors.push("evaluationPlanSha256 must be a lowercase SHA-256 digest.");
|
|
294
|
+
validateTimestamp(value.issuedAt, "issuedAt", errors);
|
|
295
|
+
validateTimestamp(value.expiresAt, "expiresAt", errors);
|
|
296
|
+
}
|
|
297
|
+
function validateAssuranceDelivery(value, errors) {
|
|
298
|
+
requiredConst(value, "schemaVersion", "agentcert.assurance_delivery.v0.1", errors);
|
|
299
|
+
for (const key of ["engagementId", "projectId", "assuranceCaseId", "dueAt", "deliveredAt", "evaluationPlanSha256", "statement"])
|
|
300
|
+
requiredString(value, key, errors);
|
|
301
|
+
for (const key of ["customer", "subject", "sandbox", "workflow", "terms", "decision", "integration", "evidenceStrength", "attestation"])
|
|
302
|
+
requiredObject(value, key, errors);
|
|
303
|
+
for (const key of ["baselineEvidence", "remediationItems", "retestEvidence"])
|
|
304
|
+
requiredArray(value, key, errors);
|
|
305
|
+
if (!/^[0-9a-f]{64}$/.test(String(value.evaluationPlanSha256 ?? "")))
|
|
306
|
+
errors.push("evaluationPlanSha256 must be a lowercase SHA-256 digest.");
|
|
307
|
+
validateTimestamp(value.dueAt, "dueAt", errors);
|
|
308
|
+
validateTimestamp(value.deliveredAt, "deliveredAt", errors);
|
|
309
|
+
const terms = recordValue(value.terms);
|
|
310
|
+
if (terms) {
|
|
311
|
+
if (terms.priceUsd !== 5000)
|
|
312
|
+
errors.push("terms.priceUsd must equal 5000.");
|
|
313
|
+
if (terms.workflowCount !== 1)
|
|
314
|
+
errors.push("terms.workflowCount must equal 1.");
|
|
315
|
+
if (terms.includedRetests !== 1)
|
|
316
|
+
errors.push("terms.includedRetests must equal 1.");
|
|
317
|
+
if (terms.privacy !== "private_by_default")
|
|
318
|
+
errors.push("terms.privacy must equal private_by_default.");
|
|
319
|
+
}
|
|
320
|
+
const decision = recordValue(value.decision);
|
|
321
|
+
if (decision)
|
|
322
|
+
requiredEnum(decision, "verdict", ["RELEASE", "RELEASE_WITH_CONTROLS", "BLOCK"], errors);
|
|
163
323
|
}
|
|
164
324
|
function validateFailureReview(value, errors) {
|
|
165
325
|
requiredConst(value, "schemaVersion", "1", errors);
|
|
@@ -17,7 +17,7 @@ export interface OnegentRuntime {
|
|
|
17
17
|
executeAfterApproval(action: ActionIntent | string, adapter?: LocalActionAdapter): Promise<ActionExecutionSummary>;
|
|
18
18
|
rollbackAfterExecution(action: ActionIntent | string, adapter: LocalActionAdapter, reason: string): Promise<ActionExecutionReceipt>;
|
|
19
19
|
getExecutionReceipt(action: ActionIntent | string): Promise<ActionExecutionReceipt | undefined>;
|
|
20
|
-
verifyOutcome(action: ActionIntent | string, observedState?: ActionExecutionSummary | Record<string, unknown
|
|
20
|
+
verifyOutcome(action: ActionIntent | string, observedState?: ActionExecutionSummary | Record<string, unknown>, method?: import("./types.js").VerificationMethod): VerificationResult;
|
|
21
21
|
writeAuditPacket(action: ActionIntent | string): Promise<ActionAuditPacket>;
|
|
22
22
|
getActionReview(action: ActionIntent | string): ActionReview;
|
|
23
23
|
listActionReviews(): ActionReview[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../../onegent-runtime/src/sdk.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,eAAe,EACf,UAAU,EACV,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,qBAAqB;IACpC,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,MAAM,WAAW,cAAc;IAC7B,aAAa,CAAC,KAAK,EAAE,uBAAuB,GAAG,YAAY,CAAC;IAC5D,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,cAAc,CAAC;IACjD,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,gBAAgB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CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,EAAE,aAAa,CAAC,EAAE,sBAAsB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,EAAE,OAAO,YAAY,EAAE,kBAAkB,GAAG,kBAAkB,CAAC;IACrL,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC5E,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,GAAG,YAAY,CAAC;IAC7D,iBAAiB,IAAI,YAAY,EAAE,CAAC;CACrC;AAED,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,qBAA0B,GAAG,cAAc,CA2GxF;AAED,wBAAgB,4BAA4B,CAAC,IAAI,SAA8B,GAAG,cAAc,GAAG;IACjG,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;CAC/C,CAQA"}
|
|
@@ -105,7 +105,7 @@ export function createOnegentRuntime(options = {}) {
|
|
|
105
105
|
return next;
|
|
106
106
|
},
|
|
107
107
|
getExecutionReceipt: async (actionInput) => executionStore.get(getActionReview(actionId(actionInput)).action.idempotencyKey),
|
|
108
|
-
verifyOutcome: (action, observedState) => verifyActionOutcome(actionId(action), observedStateForVerification(observedState)),
|
|
108
|
+
verifyOutcome: (action, observedState, method) => verifyActionOutcome(actionId(action), observedStateForVerification(observedState), method),
|
|
109
109
|
writeAuditPacket: async (action) => {
|
|
110
110
|
const packet = generateAuditPacket(actionId(action));
|
|
111
111
|
await options.auditStore?.writeAuditPacket(packet);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ActionAuditPacket, ActionExecutionSummary, ActionRollbackResult, ActionReview, AuthorizationPolicy, ApprovalRequest, CreateActionIntentInput, LocalActionAdapter, PolicyEngine, PolicyRule, VerificationResult } from "./types.js";
|
|
1
|
+
import type { ActionAuditPacket, ActionExecutionSummary, ActionRollbackResult, ActionReview, AuthorizationPolicy, ApprovalRequest, CreateActionIntentInput, LocalActionAdapter, PolicyEngine, PolicyRule, VerificationMethod, VerificationResult } from "./types.js";
|
|
2
2
|
export interface ActionGatewayOptions {
|
|
3
3
|
policyRules?: PolicyRule[];
|
|
4
4
|
policyEngine?: PolicyEngine;
|
|
@@ -18,8 +18,8 @@ export declare function executeAfterApprovalWithAdapter(actionId: string, adapte
|
|
|
18
18
|
}): Promise<ActionExecutionSummary>;
|
|
19
19
|
export declare function recordRollback(actionId: string, adapterName: string, reason: string, result: ActionRollbackResult): ActionReview;
|
|
20
20
|
export declare function executeMockAction(actionId: string): ActionExecutionSummary;
|
|
21
|
-
export declare function verifyOutcome(actionId: string, observedState?: Record<string, unknown
|
|
22
|
-
export declare function verifyAction(actionId: string, observedState?: Record<string, unknown
|
|
21
|
+
export declare function verifyOutcome(actionId: string, observedState?: Record<string, unknown>, method?: VerificationMethod): VerificationResult;
|
|
22
|
+
export declare function verifyAction(actionId: string, observedState?: Record<string, unknown>, methodOverride?: VerificationMethod): VerificationResult;
|
|
23
23
|
export declare function getActionReview(actionId: string): ActionReview;
|
|
24
24
|
export declare function listActionReviews(): ActionReview[];
|
|
25
25
|
export declare function writeAuditPacket(actionId: string): ActionAuditPacket;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../onegent-runtime/src/service.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EAEpB,YAAY,EAEZ,mBAAmB,EACnB,eAAe,EAGf,uBAAuB,EACvB,kBAAkB,EAClB,YAAY,EACZ,UAAU,
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../onegent-runtime/src/service.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EAEpB,YAAY,EAEZ,mBAAmB,EACnB,eAAe,EAGf,uBAAuB,EAC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E;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,EAAE,kBAAkB,GAAG,kBAAkB,CAExI;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,CAAC,EAAE,kBAAkB,GAAG,kBAAkB,CAoC/I;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,CAuB9D;AAED,wBAAgB,iBAAiB,IAAI,YAAY,EAAE,CAElD;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAEpE;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CA+BvE"}
|
|
@@ -15,6 +15,7 @@ export function captureActionIntent(input, options = {}) {
|
|
|
15
15
|
sourceAgentRunId: input.sourceAgentRunId,
|
|
16
16
|
principal: input.principal ?? { id: input.sourceAgentName, type: "agent" },
|
|
17
17
|
requestedPermissions: input.requestedPermissions ?? [`${input.targetSystem}:${input.actionType}`],
|
|
18
|
+
mandateId: input.mandateId,
|
|
18
19
|
actionType: input.actionType,
|
|
19
20
|
targetSystem: input.targetSystem,
|
|
20
21
|
targetUrl: input.targetUrl,
|
|
@@ -246,10 +247,10 @@ export function executeMockAction(actionId) {
|
|
|
246
247
|
observedState,
|
|
247
248
|
};
|
|
248
249
|
}
|
|
249
|
-
export function verifyOutcome(actionId, observedState) {
|
|
250
|
-
return verifyAction(actionId, observedState);
|
|
250
|
+
export function verifyOutcome(actionId, observedState, method) {
|
|
251
|
+
return verifyAction(actionId, observedState, method);
|
|
251
252
|
}
|
|
252
|
-
export function verifyAction(actionId, observedState) {
|
|
253
|
+
export function verifyAction(actionId, observedState, methodOverride) {
|
|
253
254
|
const action = requireAction(actionId);
|
|
254
255
|
if (action.status !== "EXECUTED" && action.status !== "VERIFIED" && action.status !== "FAILED_VERIFICATION") {
|
|
255
256
|
throw new Error(`Action ${actionId} must be mock-executed before verification.`);
|
|
@@ -257,7 +258,8 @@ export function verifyAction(actionId, observedState) {
|
|
|
257
258
|
const effectiveObservedState = observedState ?? observeActionState(action);
|
|
258
259
|
const differences = diffState(action.proposedAfterState, effectiveObservedState);
|
|
259
260
|
const success = differences.length === 0;
|
|
260
|
-
const method =
|
|
261
|
+
const method = methodOverride ??
|
|
262
|
+
(action.businessObjectType === "purchase_order" && action.targetSystem === "MockERP" ? "LOCAL_MOCK_ERP" : "MOCK");
|
|
261
263
|
const result = {
|
|
262
264
|
id: nextId("verify"),
|
|
263
265
|
actionIntentId: action.id,
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import type { ActionExecutionSummary, ActionIntent, ActionType, CreateActionIntentInput, LocalActionAdapter, VerificationResult } from "./types.js";
|
|
2
|
+
export declare const EVIDENCE_STRENGTH_LEVELS: readonly ["reported", "recorded", "enforced", "outcome_verified", "independently_reviewed"];
|
|
3
|
+
export type EvidenceStrengthLevel = (typeof EVIDENCE_STRENGTH_LEVELS)[number];
|
|
4
|
+
export interface EvidenceStrengthAssessment {
|
|
5
|
+
schemaVersion: "agentcert.evidence_strength.v0.1";
|
|
6
|
+
level: EvidenceStrengthLevel;
|
|
7
|
+
claims: string[];
|
|
8
|
+
limitations: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface CollectorIdentity {
|
|
11
|
+
id: string;
|
|
12
|
+
version: string;
|
|
13
|
+
keyId: string;
|
|
14
|
+
publicKeySha256: string;
|
|
15
|
+
environment: string;
|
|
16
|
+
}
|
|
17
|
+
export interface SourceSigner {
|
|
18
|
+
keyId: string;
|
|
19
|
+
privateKeyPem: string;
|
|
20
|
+
publicKeyPem?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface SourceSignature {
|
|
23
|
+
algorithm: "Ed25519";
|
|
24
|
+
keyId: string;
|
|
25
|
+
signature: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ActionMandateScope {
|
|
28
|
+
actionTypes: ActionType[];
|
|
29
|
+
targetSystems: string[];
|
|
30
|
+
permissions: string[];
|
|
31
|
+
businessObjectIds?: string[];
|
|
32
|
+
recipients?: string[];
|
|
33
|
+
currencies?: string[];
|
|
34
|
+
maxAmount?: number;
|
|
35
|
+
}
|
|
36
|
+
export interface ActionMandatePayload {
|
|
37
|
+
schemaVersion: "agentcert.action_mandate.v0.1";
|
|
38
|
+
mandateId: string;
|
|
39
|
+
issuer: {
|
|
40
|
+
id: string;
|
|
41
|
+
type: "human" | "organization" | "service";
|
|
42
|
+
};
|
|
43
|
+
subject: {
|
|
44
|
+
principalId: string;
|
|
45
|
+
agentVersion?: string;
|
|
46
|
+
};
|
|
47
|
+
scope: ActionMandateScope;
|
|
48
|
+
expectedOutcome?: Record<string, unknown>;
|
|
49
|
+
policySha256: string;
|
|
50
|
+
validFrom: string;
|
|
51
|
+
expiresAt: string;
|
|
52
|
+
issuedAt: string;
|
|
53
|
+
}
|
|
54
|
+
export interface ActionMandate extends ActionMandatePayload {
|
|
55
|
+
digestSha256: string;
|
|
56
|
+
sourceSignature: SourceSignature;
|
|
57
|
+
}
|
|
58
|
+
export interface CreateActionMandateInput extends Omit<ActionMandatePayload, "schemaVersion" | "issuedAt"> {
|
|
59
|
+
issuedAt?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface MandateVerification {
|
|
62
|
+
valid: boolean;
|
|
63
|
+
digestMatches: boolean;
|
|
64
|
+
signatureMatches: boolean;
|
|
65
|
+
active: boolean;
|
|
66
|
+
errors: string[];
|
|
67
|
+
}
|
|
68
|
+
export interface MandateStore {
|
|
69
|
+
readonly name: string;
|
|
70
|
+
get(mandateId: string): Promise<ActionMandate | undefined>;
|
|
71
|
+
put(mandate: ActionMandate): Promise<ActionMandate>;
|
|
72
|
+
list(): Promise<ActionMandate[]>;
|
|
73
|
+
}
|
|
74
|
+
export type TrustedRecordType = "RUN_STARTED" | "JOURNAL_RECOVERED" | "EVENTS_DROPPED" | "MANDATE_BOUND" | "ACTION_CAPTURED" | "APPROVAL_REQUESTED" | "ACTION_APPROVED" | "ACTION_REJECTED" | "EXECUTION_STARTED" | "EXECUTION_COMPLETED" | "OUTCOME_OBSERVED" | "VERIFICATION_PASSED" | "VERIFICATION_FAILED" | "RUN_COMPLETED";
|
|
75
|
+
export interface TrustedActionRecord {
|
|
76
|
+
schemaVersion: "agentcert.trusted_action_record.v0.1";
|
|
77
|
+
recordId: string;
|
|
78
|
+
runId: string;
|
|
79
|
+
sequence: number;
|
|
80
|
+
occurredAt: string;
|
|
81
|
+
type: TrustedRecordType;
|
|
82
|
+
collector: CollectorIdentity;
|
|
83
|
+
previousEventHash?: string;
|
|
84
|
+
payload: Record<string, unknown>;
|
|
85
|
+
payloadSha256: string;
|
|
86
|
+
eventHash: string;
|
|
87
|
+
sourceSignature: SourceSignature;
|
|
88
|
+
}
|
|
89
|
+
export interface JournalGap {
|
|
90
|
+
afterSequence: number;
|
|
91
|
+
beforeSequence: number;
|
|
92
|
+
missing: number;
|
|
93
|
+
declared: boolean;
|
|
94
|
+
}
|
|
95
|
+
export interface JournalValidation {
|
|
96
|
+
valid: boolean;
|
|
97
|
+
complete: boolean;
|
|
98
|
+
sourceSigned: boolean;
|
|
99
|
+
gaps: JournalGap[];
|
|
100
|
+
duplicateSequences: number[];
|
|
101
|
+
duplicateRecordIds: string[];
|
|
102
|
+
hashMismatches: number[];
|
|
103
|
+
signatureFailures: number[];
|
|
104
|
+
droppedEventCount: number;
|
|
105
|
+
recoveredTailBytes: number;
|
|
106
|
+
errors: string[];
|
|
107
|
+
}
|
|
108
|
+
export interface TrustedRunReceipt {
|
|
109
|
+
schemaVersion: "agentcert.trusted_run_receipt.v0.1";
|
|
110
|
+
runId: string;
|
|
111
|
+
collector: CollectorIdentity;
|
|
112
|
+
startedAt: string;
|
|
113
|
+
completedAt: string;
|
|
114
|
+
eventCount: number;
|
|
115
|
+
droppedEventCount: number;
|
|
116
|
+
firstEventHash: string;
|
|
117
|
+
lastEventHash: string;
|
|
118
|
+
mandateDigests: string[];
|
|
119
|
+
actionIds: string[];
|
|
120
|
+
journal: JournalValidation;
|
|
121
|
+
evidenceStrength: EvidenceStrengthAssessment;
|
|
122
|
+
sourcePublicKeyPem: string;
|
|
123
|
+
receiptSha256: string;
|
|
124
|
+
sourceSignature: SourceSignature;
|
|
125
|
+
}
|
|
126
|
+
export interface TrustedRecorderSink {
|
|
127
|
+
name: string;
|
|
128
|
+
write(record: TrustedActionRecord): Promise<void>;
|
|
129
|
+
}
|
|
130
|
+
export interface ControlledAdapterBoundary {
|
|
131
|
+
mode: "agentcert_gateway";
|
|
132
|
+
credentials: "gateway_managed";
|
|
133
|
+
bypassPrevention: "credentials_unavailable_to_agent";
|
|
134
|
+
allowedActionTypes: ActionType[];
|
|
135
|
+
allowedTargetSystems: string[];
|
|
136
|
+
}
|
|
137
|
+
export interface ControlledActionAdapter extends LocalActionAdapter {
|
|
138
|
+
control: ControlledAdapterBoundary;
|
|
139
|
+
}
|
|
140
|
+
export interface OutcomeObservation {
|
|
141
|
+
observationId: string;
|
|
142
|
+
observedAt: string;
|
|
143
|
+
observedState: Record<string, unknown>;
|
|
144
|
+
source: string;
|
|
145
|
+
}
|
|
146
|
+
export interface IndependentOutcomeProbe {
|
|
147
|
+
name: string;
|
|
148
|
+
independent: true;
|
|
149
|
+
observe(action: ActionIntent, execution: ActionExecutionSummary): Promise<OutcomeObservation>;
|
|
150
|
+
}
|
|
151
|
+
export interface TrustedActionEvidence {
|
|
152
|
+
schemaVersion: "agentcert.trusted_action_evidence.v0.1";
|
|
153
|
+
mandate: ActionMandate;
|
|
154
|
+
runReceipt: TrustedRunReceipt;
|
|
155
|
+
outcomeObservation?: OutcomeObservation;
|
|
156
|
+
verification?: VerificationResult;
|
|
157
|
+
evidenceStrength: EvidenceStrengthAssessment;
|
|
158
|
+
}
|
|
159
|
+
export interface TrustedCaptureInput {
|
|
160
|
+
action: CreateActionIntentInput;
|
|
161
|
+
mandateId: string;
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=trust-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trust-types.d.ts","sourceRoot":"","sources":["../../../../onegent-runtime/src/trust-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,YAAY,EACZ,UAAU,EACV,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,wBAAwB,6FAM3B,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9E,MAAM,WAAW,0BAA0B;IACzC,aAAa,EAAE,kCAAkC,CAAC;IAClD,KAAK,EAAE,qBAAqB,CAAC;IAC7B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,iBAAiB,CAAC,E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AM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,IAAI,CAAC;IAClB,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,sBAAsB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAC/F;AAED,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,wCAAwC,CAAC;IACxD,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,gBAAgB,EAAE,0BAA0B,CAAC;CAC9C;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,uBAAuB,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -4,7 +4,7 @@ export type ActionIntentStatus = "CAPTURED" | "NEEDS_REVIEW" | "APPROVED" | "REJ
|
|
|
4
4
|
export type RiskLevel = "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
|
|
5
5
|
export type PolicyEffect = "ALLOW" | "REQUIRE_APPROVAL" | "BLOCK";
|
|
6
6
|
export type ApprovalStatus = "PENDING" | "APPROVED" | "REJECTED" | "EXPIRED";
|
|
7
|
-
export type VerificationMethod = "MOCK" | "LOCAL_MOCK_ERP" | "LOCAL_ADAPTER";
|
|
7
|
+
export type VerificationMethod = "MOCK" | "LOCAL_MOCK_ERP" | "LOCAL_ADAPTER" | "INDEPENDENT_PROBE";
|
|
8
8
|
export interface ActionFieldChange {
|
|
9
9
|
field: string;
|
|
10
10
|
before?: unknown;
|
|
@@ -25,6 +25,7 @@ export interface ActionIntent {
|
|
|
25
25
|
sourceAgentRunId?: string;
|
|
26
26
|
principal: AgentPrincipal;
|
|
27
27
|
requestedPermissions: string[];
|
|
28
|
+
mandateId?: string;
|
|
28
29
|
actionType: ActionType;
|
|
29
30
|
targetSystem: string;
|
|
30
31
|
targetUrl?: string;
|
|
@@ -52,6 +53,7 @@ export interface CreateActionIntentInput {
|
|
|
52
53
|
sourceAgentRunId?: string;
|
|
53
54
|
principal?: AgentPrincipal;
|
|
54
55
|
requestedPermissions?: string[];
|
|
56
|
+
mandateId?: string;
|
|
55
57
|
actionType: ActionType;
|
|
56
58
|
targetSystem: string;
|
|
57
59
|
targetUrl?: string;
|
|
@@ -270,6 +272,7 @@ export interface ActionAuditPacket {
|
|
|
270
272
|
execution: ActionExecutionSummary;
|
|
271
273
|
verificationResult?: VerificationResult;
|
|
272
274
|
auditEvents: AuditEvent[];
|
|
275
|
+
trustedActionEvidence?: import("./trust-types.js").TrustedActionEvidence;
|
|
273
276
|
disclaimer: string;
|
|
274
277
|
}
|
|
275
278
|
export interface AuditStore {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../onegent-runtime/src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE9D,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,SAAS,GAAG,YAAY,CAAC;AAElE,MAAM,MAAM,kBAAkB,GAC1B,UAAU,GACV,cAAc,GACd,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,qBAAqB,GACrB,aAAa,GACb,iBAAiB,GACjB,WAAW,CAAC;AAEhB,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AAE/D,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,kBAAkB,GAAG,OAAO,CAAC;AAElE,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;AAE7E,MAAM,MAAM,kBAAkB,GAAG,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AAqB,CAAC;IACzE,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnE;AAED,MAAM,WAAW,2BAA2B;IAC1C,aAAa,EAAE,iBAAiB,CAAC;IACjC,MAAM,EAAE,YAAY,CAAC;IACrB,WAAW,CAAC,EAAE,iBAAiB,CAAC;CACjC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentcert",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "Assurance release gates, runtime evidence, and regression CI for AI agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
|
-
"homepage": "https://agentcert
|
|
7
|
+
"homepage": "https://agentcert.app/",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "git+https://github.com/Kakarottoooo/agentcert.git",
|