@agentproto/corpus-cli 0.10.0 → 0.10.2

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.
Files changed (36) hide show
  1. package/dist/specs/resources/aip-14/draft/TOOL.schema.json +1 -1
  2. package/dist/specs/resources/aip-15/draft/WORKFLOW.schema.json +59 -47
  3. package/dist/specs/resources/aip-16/draft/IO.schema.json +4 -0
  4. package/dist/specs/resources/aip-18/draft/COLLECTION.schema.json +128 -7
  5. package/dist/specs/resources/aip-36/draft/SANDBOX.schema.json +13 -0
  6. package/dist/specs/resources/aip-41/draft/ROUTINE.schema.json +21 -2
  7. package/dist/specs/resources/aip-42/draft/AGENT.schema.json +1 -1
  8. package/dist/specs/resources/aip-44/draft/ACP.schema.json +3 -1
  9. package/dist/specs/resources/aip-47/draft/ROLE.schema.json +1 -1
  10. package/dist/specs/resources/aip-49/draft/ASSET.schema.json +232 -0
  11. package/dist/specs/resources/aip-50/draft/AUTH.schema.json +114 -0
  12. package/dist/specs/resources/aip-53/draft/APP.schema.json +211 -0
  13. package/dist/specs/resources/aip-54/draft/REF.schema.json +1 -1
  14. package/dist/specs/resources/aip-54/draft/WS-REF.schema.json +46 -0
  15. package/dist/specs/resources/aip-55/draft/PRODUCT.schema.json +172 -38
  16. package/dist/specs/resources/aip-58/draft/event.schema.json +55 -0
  17. package/dist/specs/resources/aip-58/draft/journal-entry.schema.json +47 -0
  18. package/dist/specs/resources/aip-58/draft/run.schema.json +164 -0
  19. package/dist/specs/resources/aip-58/draft/vectors/README.md +18 -0
  20. package/dist/specs/resources/aip-58/draft/vectors/v1-invalid-input.json +31 -0
  21. package/dist/specs/resources/aip-58/draft/vectors/v2-suspended-input-required.json +51 -0
  22. package/dist/specs/resources/aip-58/draft/vectors/v3-missing-artifact.json +39 -0
  23. package/dist/specs/resources/aip-58/draft/vectors/v4-host-restart.json +36 -0
  24. package/dist/specs/resources/aip-58/draft/vectors/v5-disjoint-workspaces.json +60 -0
  25. package/dist/specs/resources/aip-58/draft/vectors/v6-orphaned.json +29 -0
  26. package/dist/specs/resources/aip-58/draft/vectors/v7-replay.json +46 -0
  27. package/dist/specs/resources/aip-58/draft/vectors/v8-heuristic-not-suspend.json +47 -0
  28. package/dist/specs/resources/aip-62/draft/ATTESTATION.schema.json +184 -0
  29. package/dist/specs/resources/aip-62/draft/REVIEW-PACK.schema.json +70 -0
  30. package/dist/specs/resources/aip-62/draft/REVIEW.schema.json +180 -0
  31. package/dist/specs/resources/aip-7/draft/GOVERNANCE.schema.json +147 -1
  32. package/dist/specs/resources/{aip-52/draft → pending/harness}/HARNESS.schema.json +1 -1
  33. package/package.json +4 -4
  34. package/dist/specs/resources/aip-52/draft/ADAPTER.md +0 -193
  35. package/dist/specs/resources/aip-54/draft/REF.md +0 -89
  36. package/dist/specs/resources/aip-55/draft/PRODUCT.md +0 -143
@@ -0,0 +1,39 @@
1
+ {
2
+ "id": "V3",
3
+ "title": "Agent turn ends, required artifact absent -> failed missing-artifact",
4
+ "rule": "specs/aip-58.mdx section 3 Outcome rule + section 4 Run workspace",
5
+ "manifestExcerpt": {
6
+ "kind": "workflow",
7
+ "id": "pricing-brief",
8
+ "outputsFiles": {
9
+ "brief": { "path": "./briefs/<runId>.md", "required": true }
10
+ },
11
+ "steps": [
12
+ { "id": "draft", "kind": "agent", "prompt": "Write the brief and save it to the declared output path." }
13
+ ]
14
+ },
15
+ "runCreate": {
16
+ "kind": "workflow",
17
+ "ref": { "id": "pricing-brief", "version": "1.0.0" },
18
+ "input": { "productUrl": "https://example.com/pricing" }
19
+ },
20
+ "agentTurnResult": {
21
+ "finalMessage": "Done -- I've drafted the brief in my response above.",
22
+ "outputsFilesProduced": []
23
+ },
24
+ "expected": {
25
+ "terminalState": "failed",
26
+ "error": { "code": "missing-artifact", "stepId": "draft" },
27
+ "events": [
28
+ "run.created",
29
+ "run.started",
30
+ "step.started",
31
+ "step.failed",
32
+ "run.failed"
33
+ ],
34
+ "notes": [
35
+ "The agent's turn ended with a plausible-sounding final message, but the declared-required 'brief' outputsFiles key never materialized under scratch/ -- the outcome rule fails the step regardless of how the turn read.",
36
+ "This is the vector for AIP-16's outputsFiles.<key>.required amendment: with required absent or false, the same scenario would be a warning and the step would still be evaluated on structured output alone."
37
+ ]
38
+ }
39
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "id": "V4",
3
+ "title": "Host restart mid-step -> failed host-interrupted; a durably suspended run survives",
4
+ "rule": "specs/aip-58.mdx section 2 State machine -- host restart",
5
+ "scenarios": [
6
+ {
7
+ "label": "A -- plain running run, no suspend record",
8
+ "before": { "status": "running", "steps": [{ "stepId": "parse", "status": "running" }] },
9
+ "hostEvent": "process restart / reload",
10
+ "expected": {
11
+ "terminalState": "failed",
12
+ "error": { "code": "host-interrupted" },
13
+ "events": ["run.failed"],
14
+ "notes": ["No prior suspend record existed for this run, so it is not eligible for the durable-suspend carve-out -- it is marked failed on reload."]
15
+ }
16
+ },
17
+ {
18
+ "label": "B -- durably suspended run",
19
+ "before": {
20
+ "status": "suspended",
21
+ "steps": [{ "stepId": "draft", "status": "suspended" }],
22
+ "suspendRecord": { "stepId": "draft", "reason": "input-required", "since": "2026-09-25T10:00:14Z" }
23
+ },
24
+ "hostEvent": "process restart / reload",
25
+ "expected": {
26
+ "terminalState": null,
27
+ "statusAfterReload": "suspended",
28
+ "events": [],
29
+ "notes": [
30
+ "The run's durable suspend record survives the restart untouched -- no run.failed event is emitted, and the run stays exactly as it was.",
31
+ "A subsequent run.resume against the re-registered pending entry still resolves. This MUST hold regardless of which step kind (kind: \"approval\" or kind: \"suspend\") produced the suspension -- AIP-15 rule 7, as amended 2026-09-25, requires durable persistence for both identically; the reference runner already persists and re-registers both (awaitingApproval / awaitingSuspend)."
32
+ ]
33
+ }
34
+ }
35
+ ]
36
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "id": "V5",
3
+ "title": "Two concurrent runs of the same workflow -> disjoint workspaces, no shared-path write before publish",
4
+ "rule": "specs/aip-58.mdx section 4 Run workspace -- \"Two runs MUST NEVER share a workspace\" + the deferred-publish model",
5
+ "manifestExcerpt": {
6
+ "kind": "workflow",
7
+ "id": "pricing-brief",
8
+ "outputsFiles": {
9
+ "brief": { "path": "./briefs/latest.md", "required": true }
10
+ }
11
+ },
12
+ "runCreate": [
13
+ {
14
+ "kind": "workflow",
15
+ "ref": { "id": "pricing-brief", "version": "1.0.0" },
16
+ "input": { "productUrl": "https://example.com/pricing-a" }
17
+ },
18
+ {
19
+ "kind": "workflow",
20
+ "ref": { "id": "pricing-brief", "version": "1.0.0" },
21
+ "input": { "productUrl": "https://example.com/pricing-b" }
22
+ }
23
+ ],
24
+ "note_on_manifest": "outputsFiles.brief.path is deliberately a FIXED path with no <runId>/<isoDate> interpolation -- './briefs/latest.md' -- the exact shape that raced under plain AIP-16. This is the case the deferred-publish model exists for; V5 under interpolated paths would not exercise the bug at all.",
25
+ "expected": {
26
+ "runIds": ["run_A", "run_B"],
27
+ "workspaces": {
28
+ "run_A": "<runsRoot>/run_A/",
29
+ "run_B": "<runsRoot>/run_B/"
30
+ },
31
+ "duringExecution": {
32
+ "sharedPathWritten": false,
33
+ "notes": [
34
+ "At no point while either run is 'running' does the file at the shared workspace path './briefs/latest.md' get created, truncated, or modified by either run -- outputsFiles.brief syncs ONLY to each run's own <runsRoot>/<runId>/artifacts/brief per section 4's sync-target override.",
35
+ "Reading './briefs/latest.md' at any timestamp strictly between both runs' startedAt and both runs' endedAt MUST show either its pre-existing content or absence -- never partial or run-attributable content from run_A or run_B."
36
+ ]
37
+ },
38
+ "artifactsAfterBothSucceed": {
39
+ "run_A.artifacts": [
40
+ { "key": "brief", "path": "artifacts/brief", "stepId": "save" }
41
+ ],
42
+ "run_B.artifacts": [
43
+ { "key": "brief", "path": "artifacts/brief", "stepId": "save" }
44
+ ],
45
+ "invariant": "run_A.artifacts[0]'s absolute location (<runsRoot>/run_A/artifacts/brief) and run_B.artifacts[0]'s (<runsRoot>/run_B/artifacts/brief) are disjoint paths, even though both entries carry the identical relative key/path/stepId -- disjointness is a property of the run-scoped root, not of the ArtifactEntry fields themselves."
46
+ },
47
+ "terminalStates": { "run_A": "succeeded", "run_B": "succeeded" },
48
+ "afterExplicitPublish": {
49
+ "scenario": "run.publish { runId: run_B, artifactKey: 'brief' } called after run_B succeeds, no explicit 'to' given",
50
+ "result": "./briefs/latest.md now holds run_B's brief content; a run.published event appears in run_B's event log naming { artifactKey: 'brief', to: './briefs/latest.md' }",
51
+ "notes": [
52
+ "run_A's own artifacts/brief is untouched by run_B's publish -- publish only ever writes to the shared destination, never to another run's workspace.",
53
+ "Had run_A also published to the same default destination (before or after run_B), the shared path reflects whichever publish happened last -- last-publish-wins is an explicit, observable act attributable to a specific run.publish call, never an accidental race between two runs finishing."
54
+ ]
55
+ },
56
+ "notes": [
57
+ "This is the exact failure the Motivation cites: two runs overwriting each other's files. Before this vector's extension, a naive reading of AIP-16 alone could still let both runs' outputsFiles.brief sync to './briefs/latest.md' unconditionally at run end, racing on whichever finished last -- the deferred-publish model (section 4) is what actually closes it, not merely giving each run its own <runId>."
58
+ ]
59
+ }
60
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "id": "V6",
3
+ "title": "Run whose owner died -> failed orphaned",
4
+ "rule": "specs/aip-58.mdx section 2 State machine -- \"A running run MUST have a live owner\"",
5
+ "manifestExcerpt": {
6
+ "kind": "app",
7
+ "id": "youtube-transcriber"
8
+ },
9
+ "runCreate": {
10
+ "kind": "app",
11
+ "ref": { "id": "youtube-transcriber", "version": "0.1.0" },
12
+ "input": { "videoUrl": "https://example.com/watch?v=abc123" }
13
+ },
14
+ "timeline": [
15
+ { "t": "T0", "event": "run.create", "status": "running", "leaseHeldBy": "worker-7", "leaseExpiresAt": "T0+30s" },
16
+ { "t": "T0+5s", "event": "worker-7 process killed (no clean shutdown, no host restart)" },
17
+ { "t": "T0+30s", "event": "lease expires, no renewal observed" },
18
+ { "t": "T0+31s", "event": "host liveness check detects expired lease with no live owner" }
19
+ ],
20
+ "expected": {
21
+ "terminalState": "failed",
22
+ "error": { "code": "orphaned" },
23
+ "events": ["run.failed"],
24
+ "notes": [
25
+ "No host restart occurred in this scenario -- only worker-7 died. A host that only marks running runs failed on its OWN restart (the reference implementation's current behaviour) does not catch this case; the lease/heartbeat check is what does.",
26
+ "This is the vector for the '~25 app runs stuck running for weeks, several with 0 sessions' evidence in the Motivation."
27
+ ]
28
+ }
29
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "id": "V7",
3
+ "title": "Replay from step 3 -> new run, steps 1-2 reused from journal",
4
+ "rule": "specs/aip-58.mdx section 6 Journal -- run.replay",
5
+ "originalRun": {
6
+ "runId": "run_orig",
7
+ "status": "succeeded",
8
+ "steps": [
9
+ { "stepId": "fetch", "status": "succeeded" },
10
+ { "stepId": "parse", "status": "succeeded" },
11
+ { "stepId": "draft", "status": "succeeded" },
12
+ { "stepId": "save", "status": "succeeded" }
13
+ ],
14
+ "journal": [
15
+ { "stepId": "fetch", "attempt": 1, "inputHash": "h1", "status": "succeeded" },
16
+ { "stepId": "parse", "attempt": 1, "inputHash": "h2", "status": "succeeded" },
17
+ { "stepId": "draft", "attempt": 1, "inputHash": "h3", "status": "succeeded" },
18
+ { "stepId": "save", "attempt": 1, "inputHash": "h4", "status": "succeeded" }
19
+ ]
20
+ },
21
+ "runReplay": { "of": "run_orig", "fromStep": "draft" },
22
+ "expected": {
23
+ "newRunId": "run_replay (!= run_orig)",
24
+ "rootRunId": "run_replay",
25
+ "parentRunId": null,
26
+ "steps": [
27
+ { "stepId": "fetch", "status": "succeeded", "sourcedFrom": "journal:run_orig attempt 1", "reExecuted": false },
28
+ { "stepId": "parse", "status": "succeeded", "sourcedFrom": "journal:run_orig attempt 1", "reExecuted": false },
29
+ { "stepId": "draft", "status": "pending", "reExecuted": true },
30
+ { "stepId": "save", "status": "pending", "reExecuted": true }
31
+ ],
32
+ "events": [
33
+ "run.created",
34
+ "run.started",
35
+ "step.succeeded",
36
+ "step.succeeded",
37
+ "step.started",
38
+ "..."
39
+ ],
40
+ "notes": [
41
+ "run_orig is untouched -- still 'succeeded', still immutable. run_replay is a new, independent run whose run.created event's data names { replayOf: { runId: 'run_orig', fromStep: 'draft' } } -- there is no 'replayOf' field on the Run resource itself.",
42
+ "'fetch' and 'parse' report status succeeded with no corresponding step.started/step.output pair re-executed in run_replay's own event log for those two steps -- their journaled output from run_orig is copied forward instead.",
43
+ "'draft' onward re-executes fresh against the new run's own workspace."
44
+ ]
45
+ }
46
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "id": "V8",
3
+ "title": "Turn ends with a question in plain text, no explicit signal -> failed missing-output, hinted",
4
+ "rule": "specs/aip-58.mdx section 3 Outcome rule -- a heuristic MAY only annotate a hint, never produce suspended",
5
+ "manifestExcerpt": {
6
+ "kind": "workflow",
7
+ "id": "pricing-brief",
8
+ "steps": [
9
+ {
10
+ "id": "draft",
11
+ "kind": "agent",
12
+ "prompt": "Write a one-page pricing brief for these tiers: $steps.parse.tiers",
13
+ "outputSchema": { "type": "object", "properties": { "brief": { "type": "string" } }, "required": ["brief"] }
14
+ }
15
+ ]
16
+ },
17
+ "runCreate": {
18
+ "kind": "workflow",
19
+ "ref": { "id": "pricing-brief", "version": "1.0.0" },
20
+ "input": { "productUrl": "https://example.com/pricing" }
21
+ },
22
+ "agentTurn": {
23
+ "finalMessage": "What tone should the brief use -- formal or casual?",
24
+ "toolCall": null,
25
+ "protocolAwaitingInputEvent": false
26
+ },
27
+ "expected": {
28
+ "terminalState": "failed",
29
+ "stepId": "draft",
30
+ "stepStatus": "failed",
31
+ "error": { "code": "missing-output", "stepId": "draft" },
32
+ "hint": "possible-input-request",
33
+ "events": [
34
+ "run.created",
35
+ "run.started",
36
+ "step.started",
37
+ "step.failed",
38
+ "run.failed"
39
+ ],
40
+ "notes": [
41
+ "The final message is textually identical to V2's -- a question about tone. The outcome differs because V2's step made an explicit run.requestInput call and this one didn't; a host is NOT permitted to read the two turns identically just because their prose matches.",
42
+ "A host MAY set StepRecord.hint = 'possible-input-request' after pattern-matching the trailing question mark, purely as a triage aid for a human reading the failed run. The hint MUST NOT change stepStatus/terminalState -- a conformance check that flips this vector's expected terminalState to 'suspended' on the basis of the hint is testing a non-conforming host.",
43
+ "No step.suspended or run.suspended event may appear anywhere in this run's event log.",
44
+ "manifestExcerpt.steps[0] declares an outputSchema (added 2026-09-25, alongside section 3's vacuous-contract amendment) so this vector actually exercises missing-output -- a step declaring no contract at all has a vacuous contract (section 3) and always succeeds on turn end, which would make this vector inapplicable as written."
45
+ ]
46
+ }
47
+ }
@@ -0,0 +1,184 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentproto.sh/schemas/aip-62/ATTESTATION.schema.json",
4
+ "title": "agentproto.review.attestation/v1",
5
+ "description": "A review verdict bound to a manifest and a frozen git range. The `verdict` MUST equal the fold of `lanes` (AIP-62 verdict fold); a verifier recomputes it. `attestor.signature`, when present, covers the canonical JSON of the attestation with `attestor.signature` removed. Mutable annotations (PR status) live outside this document and are never signed.",
6
+ "type": "object",
7
+ "required": [
8
+ "schema",
9
+ "runId",
10
+ "reviewId",
11
+ "manifestSha",
12
+ "binding",
13
+ "target",
14
+ "rangeSha",
15
+ "lanes",
16
+ "verdict",
17
+ "attestor",
18
+ "rubrics",
19
+ "createdAt"
20
+ ],
21
+ "properties": {
22
+ "schema": { "const": "agentproto.review.attestation/v1" },
23
+ "runId": { "type": "string", "pattern": "^review-.+$" },
24
+ "reviewId": { "type": "string", "description": "The REVIEW.md id." },
25
+ "manifestSha": { "$ref": "#/$defs/sha256", "description": "sha256 of the REVIEW.md source bytes." },
26
+ "binding": { "type": "string", "minLength": 1 },
27
+ "target": {
28
+ "type": "object",
29
+ "additionalProperties": false,
30
+ "required": ["repoRemote", "baseSha", "headSha"],
31
+ "properties": {
32
+ "repoRemote": {
33
+ "type": "string",
34
+ "minLength": 1,
35
+ "description": "Normalized origin URL (scheme and credentials stripped, scp form converted to host/path, .git and trailing slashes stripped), or `local:<absolute root>` when the repo has no origin."
36
+ },
37
+ "baseSha": { "type": "string", "minLength": 1 },
38
+ "headSha": { "type": "string", "minLength": 1 }
39
+ }
40
+ },
41
+ "rangeSha": {
42
+ "$ref": "#/$defs/sha256",
43
+ "description": "sha256 of the UTF-8 string `<baseSha>..<headSha>`."
44
+ },
45
+ "lanes": { "type": "array", "items": { "$ref": "#/$defs/lane" } },
46
+ "verdict": { "enum": ["pass", "block", "incomplete"] },
47
+ "attestor": {
48
+ "type": "object",
49
+ "additionalProperties": false,
50
+ "required": ["daemon", "presets"],
51
+ "properties": {
52
+ "daemon": { "type": "string" },
53
+ "presets": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
54
+ "signature": { "$ref": "#/$defs/signature" }
55
+ }
56
+ },
57
+ "rubrics": {
58
+ "type": "array",
59
+ "items": {
60
+ "type": "object",
61
+ "additionalProperties": false,
62
+ "required": ["check", "path", "sha256"],
63
+ "properties": {
64
+ "check": { "type": "string" },
65
+ "path": { "type": "string" },
66
+ "sha256": { "$ref": "#/$defs/sha256" }
67
+ }
68
+ }
69
+ },
70
+ "packs": {
71
+ "type": "array",
72
+ "minItems": 1,
73
+ "items": {
74
+ "type": "object",
75
+ "additionalProperties": false,
76
+ "required": ["ref", "id", "version", "alg", "sha256"],
77
+ "properties": {
78
+ "ref": { "type": "string", "description": "The uses[].pack string as written." },
79
+ "id": { "type": "string" },
80
+ "version": { "type": "string" },
81
+ "alg": {
82
+ "const": "agentproto-pack-digest/v1",
83
+ "description": "The digest recipe tag. A verifier that does not recognize it MUST refuse to compare."
84
+ },
85
+ "sha256": { "$ref": "#/$defs/sha256" }
86
+ }
87
+ }
88
+ },
89
+ "dirty": {
90
+ "const": true,
91
+ "description": "Present (as true) only when tracked files had uncommitted changes at freeze time."
92
+ },
93
+ "requester": {
94
+ "type": "object",
95
+ "additionalProperties": false,
96
+ "minProperties": 1,
97
+ "description": "Informational provenance. Names the requester; does not authenticate them.",
98
+ "properties": {
99
+ "sessionId": { "type": "string" },
100
+ "gitAuthor": {
101
+ "type": "object",
102
+ "additionalProperties": false,
103
+ "required": ["name", "email"],
104
+ "properties": {
105
+ "name": { "type": "string" },
106
+ "email": { "type": "string" }
107
+ }
108
+ }
109
+ }
110
+ },
111
+ "pr": {
112
+ "type": "object",
113
+ "additionalProperties": false,
114
+ "required": ["provider", "repo", "number", "url"],
115
+ "properties": {
116
+ "provider": { "const": "github" },
117
+ "repo": { "type": "string", "pattern": "^[^/]+/[^/]+$" },
118
+ "number": { "type": "integer", "minimum": 1 },
119
+ "url": { "type": "string" }
120
+ }
121
+ },
122
+ "createdAt": { "type": "string", "format": "date-time" }
123
+ },
124
+ "$defs": {
125
+ "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
126
+ "finding": {
127
+ "type": "object",
128
+ "additionalProperties": false,
129
+ "required": ["severity", "title", "detail"],
130
+ "properties": {
131
+ "severity": { "enum": ["high", "medium", "low"] },
132
+ "title": { "type": "string" },
133
+ "detail": { "type": "string" },
134
+ "file": { "type": "string", "description": "Repo-relative." },
135
+ "line": { "type": "integer", "minimum": 1 }
136
+ }
137
+ },
138
+ "lane": {
139
+ "type": "object",
140
+ "additionalProperties": false,
141
+ "required": ["id", "kind", "status", "blocking", "findings", "durationMs"],
142
+ "properties": {
143
+ "id": { "type": "string" },
144
+ "kind": { "enum": ["command", "agent"] },
145
+ "status": { "enum": ["pass", "fail", "skipped", "timeout"] },
146
+ "blocking": { "type": "boolean" },
147
+ "findings": { "type": "array", "items": { "$ref": "#/$defs/finding" } },
148
+ "durationMs": { "type": "number", "minimum": 0 },
149
+ "error": { "type": "string" },
150
+ "sessionId": { "type": "string" },
151
+ "preset": { "type": "string" },
152
+ "summary": { "type": "string" },
153
+ "exitCode": { "type": "integer" },
154
+ "model": { "type": "string" },
155
+ "composedFrom": {
156
+ "type": "object",
157
+ "additionalProperties": false,
158
+ "required": ["rangeSha", "headSha", "attestationSha256"],
159
+ "description": "Agent lanes only. The prior passing attestation this lane built on; the lane itself reviewed only headSha..<this attestation's head>.",
160
+ "properties": {
161
+ "rangeSha": { "$ref": "#/$defs/sha256" },
162
+ "headSha": { "type": "string", "minLength": 1 },
163
+ "attestationSha256": { "$ref": "#/$defs/sha256" }
164
+ }
165
+ }
166
+ }
167
+ },
168
+ "signature": {
169
+ "type": "object",
170
+ "additionalProperties": false,
171
+ "required": ["alg", "keyFingerprint", "principal", "signedAt", "sig"],
172
+ "properties": {
173
+ "alg": { "const": "ssh-ed25519" },
174
+ "keyFingerprint": { "type": "string", "pattern": "^SHA256:.+$" },
175
+ "principal": {
176
+ "type": "string",
177
+ "description": "A claim, matched against an allowed_signers principal at verify time. Not authenticated by the signature on its own."
178
+ },
179
+ "signedAt": { "type": "string", "format": "date-time" },
180
+ "sig": { "type": "string", "description": "Armored SSHSIG produced by `ssh-keygen -Y sign -n agentproto-review`." }
181
+ }
182
+ }
183
+ }
184
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentproto.sh/schemas/aip-62/REVIEW-PACK.schema.json",
4
+ "title": "REVIEW.md frontmatter (kind: review-pack)",
5
+ "description": "The YAML frontmatter of a review pack: a reusable set of checks a REVIEW.md imports through uses[]. A pack has no target, bindings, or prepare phase, and none of its checks may have effects. Check ids MUST be unique within the pack (parser-enforced). Rubric paths are relative to the pack root and confined to it. Unknown keys are errors.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["kind", "id", "version", "checks"],
9
+ "properties": {
10
+ "kind": { "const": "review-pack" },
11
+ "id": { "$ref": "#/$defs/id" },
12
+ "version": {
13
+ "type": "string",
14
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$"
15
+ },
16
+ "description": { "type": "string" },
17
+ "checks": {
18
+ "type": "array",
19
+ "minItems": 1,
20
+ "items": {
21
+ "oneOf": [
22
+ { "$ref": "#/$defs/commandCheck" },
23
+ { "$ref": "#/$defs/agentCheck" }
24
+ ]
25
+ }
26
+ }
27
+ },
28
+ "$defs": {
29
+ "id": {
30
+ "type": "string",
31
+ "pattern": "^[a-z][a-z0-9-]*$",
32
+ "maxLength": 64
33
+ },
34
+ "commandCheck": {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "required": ["id", "kind", "run"],
38
+ "properties": {
39
+ "id": { "$ref": "#/$defs/id" },
40
+ "kind": { "const": "command" },
41
+ "description": { "type": "string" },
42
+ "run": { "type": "string", "minLength": 1 },
43
+ "cwd": { "type": "string" },
44
+ "blocking": { "type": "boolean", "default": true },
45
+ "timeoutMs": { "type": "integer", "exclusiveMinimum": 0, "default": 600000 },
46
+ "effects": { "const": false }
47
+ }
48
+ },
49
+ "agentCheck": {
50
+ "type": "object",
51
+ "additionalProperties": false,
52
+ "required": ["id", "kind", "rubric"],
53
+ "properties": {
54
+ "id": { "$ref": "#/$defs/id" },
55
+ "kind": { "const": "agent" },
56
+ "description": { "type": "string" },
57
+ "preset": {
58
+ "type": "string",
59
+ "minLength": 1,
60
+ "description": "Optional in a pack. The consumer MUST supply one (override.preset, uses.preset, or this default) or resolution fails."
61
+ },
62
+ "rubric": { "type": "string", "minLength": 1 },
63
+ "blockOn": { "enum": ["high", "medium", "low"], "default": "high" },
64
+ "blocking": { "type": "boolean", "default": true },
65
+ "timeoutMs": { "type": "integer", "exclusiveMinimum": 0, "default": 900000 },
66
+ "effects": { "const": false }
67
+ }
68
+ }
69
+ }
70
+ }