@cat-factory/contracts 0.241.0 → 0.242.0

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.
@@ -0,0 +1,291 @@
1
+ /**
2
+ * The run's verification report: the engine's bundle of captured facts, byte-for-byte what it
3
+ * maintains on the pull request, composed on read from the run's persisted state.
4
+ *
5
+ * A consumer that scraped the fenced JSON block out of a PR body can read it here instead, and
6
+ * gets it for the runs that never opened a pull request at all.
7
+ */
8
+ export declare const getPublicRunReportContract: {
9
+ readonly method: "get";
10
+ readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
11
+ runId: import("valibot").StringSchema<undefined>;
12
+ }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
13
+ readonly pathResolver: ({ runId }: {
14
+ runId: string;
15
+ }) => string;
16
+ readonly responsesByStatusCode: {
17
+ readonly '4xx': import("valibot").ObjectSchema<{
18
+ readonly error: import("valibot").ObjectSchema<{
19
+ readonly code: import("valibot").StringSchema<undefined>;
20
+ readonly message: import("valibot").StringSchema<undefined>;
21
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
22
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
23
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
24
+ readonly message: import("valibot").StringSchema<undefined>;
25
+ }, undefined>, undefined>, undefined>;
26
+ }, undefined>;
27
+ }, undefined>;
28
+ readonly '5xx': import("valibot").ObjectSchema<{
29
+ readonly error: import("valibot").ObjectSchema<{
30
+ readonly code: import("valibot").StringSchema<undefined>;
31
+ readonly message: import("valibot").StringSchema<undefined>;
32
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
33
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
34
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
35
+ readonly message: import("valibot").StringSchema<undefined>;
36
+ }, undefined>, undefined>, undefined>;
37
+ }, undefined>;
38
+ }, undefined>;
39
+ readonly 200: import("valibot").ObjectSchema<{
40
+ readonly version: import("valibot").NumberSchema<undefined>;
41
+ readonly generatedAt: import("valibot").NumberSchema<undefined>;
42
+ readonly run: import("valibot").ObjectSchema<{
43
+ readonly executionId: import("valibot").StringSchema<undefined>;
44
+ readonly blockId: import("valibot").StringSchema<undefined>;
45
+ readonly blockTitle: import("valibot").StringSchema<undefined>;
46
+ readonly pipelineId: import("valibot").StringSchema<undefined>;
47
+ readonly pipelineName: import("valibot").StringSchema<undefined>;
48
+ readonly repo: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
49
+ readonly provider: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").PicklistSchema<["github", "gitlab"], undefined>, undefined>, undefined>;
50
+ readonly startedAt: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>, undefined>;
51
+ readonly steps: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
52
+ readonly index: import("valibot").NumberSchema<undefined>;
53
+ readonly agentKind: import("valibot").StringSchema<undefined>;
54
+ readonly state: import("valibot").StringSchema<undefined>;
55
+ readonly model: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
56
+ }, undefined>, undefined>;
57
+ readonly issues: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
58
+ readonly source: import("valibot").StringSchema<undefined>;
59
+ readonly externalId: import("valibot").StringSchema<undefined>;
60
+ readonly title: import("valibot").StringSchema<undefined>;
61
+ readonly url: import("valibot").StringSchema<undefined>;
62
+ }, undefined>, undefined>;
63
+ }, undefined>;
64
+ readonly ci: import("valibot").ObjectSchema<{
65
+ readonly status: import("valibot").PicklistSchema<["reported", "absent"], undefined>;
66
+ readonly note: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
67
+ readonly verdict: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").PicklistSchema<["pass", "pending", "fail"], undefined>, undefined>, undefined>;
68
+ readonly headSha: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
69
+ readonly failingChecks: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
70
+ readonly name: import("valibot").StringSchema<undefined>;
71
+ readonly conclusion: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
72
+ readonly url: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
73
+ readonly repo: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
74
+ }, undefined>, undefined>;
75
+ readonly fixerAttempts: import("valibot").NumberSchema<undefined>;
76
+ readonly maxFixerAttempts: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>, undefined>;
77
+ }, undefined>;
78
+ readonly validation: import("valibot").ObjectSchema<{
79
+ readonly status: import("valibot").PicklistSchema<["reported", "absent"], undefined>;
80
+ readonly note: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
81
+ readonly passed: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").BooleanSchema<undefined>, undefined>, undefined>;
82
+ readonly stepKind: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
83
+ readonly attempts: import("valibot").NumberSchema<undefined>;
84
+ readonly maxAttempts: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>, undefined>;
85
+ readonly at: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>, undefined>;
86
+ readonly commands: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
87
+ readonly label: import("valibot").StringSchema<undefined>;
88
+ readonly command: import("valibot").StringSchema<undefined>;
89
+ readonly exitCode: import("valibot").NumberSchema<undefined>;
90
+ readonly passed: import("valibot").BooleanSchema<undefined>;
91
+ readonly timedOut: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").BooleanSchema<undefined>, undefined>, undefined>;
92
+ readonly durationMs: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>, undefined>;
93
+ readonly outputTail: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
94
+ }, undefined>, undefined>;
95
+ }, undefined>;
96
+ readonly reproduction: import("valibot").ObjectSchema<{
97
+ readonly status: import("valibot").PicklistSchema<["reported", "absent"], undefined>;
98
+ readonly note: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
99
+ readonly verdict: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").PicklistSchema<["reproduced", "inconclusive", "declared_infeasible"], undefined>, undefined>, undefined>;
100
+ readonly command: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
101
+ readonly testPaths: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
102
+ readonly omittedTestPaths: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>, undefined>;
103
+ readonly base: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").ObjectSchema<{
104
+ readonly exitCode: import("valibot").NumberSchema<undefined>;
105
+ readonly passed: import("valibot").BooleanSchema<undefined>;
106
+ readonly durationMs: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>, undefined>;
107
+ readonly timedOut: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").BooleanSchema<undefined>, undefined>, undefined>;
108
+ readonly setupFailed: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").BooleanSchema<undefined>, undefined>, undefined>;
109
+ readonly outputTail: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
110
+ }, undefined>, undefined>, undefined>;
111
+ readonly final: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").ObjectSchema<{
112
+ readonly exitCode: import("valibot").NumberSchema<undefined>;
113
+ readonly passed: import("valibot").BooleanSchema<undefined>;
114
+ readonly durationMs: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>, undefined>;
115
+ readonly timedOut: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").BooleanSchema<undefined>, undefined>, undefined>;
116
+ readonly setupFailed: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").BooleanSchema<undefined>, undefined>, undefined>;
117
+ readonly outputTail: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
118
+ }, undefined>, undefined>, undefined>;
119
+ readonly attempts: import("valibot").NumberSchema<undefined>;
120
+ readonly maxAttempts: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>, undefined>;
121
+ readonly reason: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
122
+ readonly alternativeVerification: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
123
+ readonly observation: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
124
+ readonly at: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>, undefined>;
125
+ }, undefined>;
126
+ readonly tests: import("valibot").ObjectSchema<{
127
+ readonly status: import("valibot").PicklistSchema<["reported", "absent"], undefined>;
128
+ readonly note: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
129
+ readonly greenlight: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").BooleanSchema<undefined>, undefined>, undefined>;
130
+ readonly summary: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
131
+ readonly environment: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
132
+ readonly tested: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
133
+ readonly outcomes: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
134
+ readonly name: import("valibot").StringSchema<undefined>;
135
+ readonly status: import("valibot").StringSchema<undefined>;
136
+ readonly detail: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
137
+ }, undefined>, undefined>;
138
+ readonly concerns: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
139
+ readonly title: import("valibot").StringSchema<undefined>;
140
+ readonly severity: import("valibot").StringSchema<undefined>;
141
+ }, undefined>, undefined>;
142
+ readonly fixerAttempts: import("valibot").NumberSchema<undefined>;
143
+ readonly maxFixerAttempts: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>, undefined>;
144
+ }, undefined>;
145
+ readonly requirements: import("valibot").ObjectSchema<{
146
+ readonly status: import("valibot").PicklistSchema<["reported", "absent"], undefined>;
147
+ readonly note: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
148
+ readonly entries: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
149
+ readonly id: import("valibot").StringSchema<undefined>;
150
+ readonly title: import("valibot").StringSchema<undefined>;
151
+ readonly module: import("valibot").StringSchema<undefined>;
152
+ readonly group: import("valibot").StringSchema<undefined>;
153
+ readonly priority: import("valibot").PicklistSchema<["must", "should", "could"], undefined>;
154
+ readonly state: import("valibot").PicklistSchema<["aspirational", "established"], undefined>;
155
+ readonly verdict: import("valibot").PicklistSchema<["met", "not_met", "not_covered"], undefined>;
156
+ readonly detail: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
157
+ readonly criteriaCount: import("valibot").NumberSchema<undefined>;
158
+ }, undefined>, undefined>;
159
+ readonly met: import("valibot").NumberSchema<undefined>;
160
+ readonly notMet: import("valibot").NumberSchema<undefined>;
161
+ readonly notCovered: import("valibot").NumberSchema<undefined>;
162
+ readonly regressions: import("valibot").NumberSchema<undefined>;
163
+ readonly total: import("valibot").NumberSchema<undefined>;
164
+ }, undefined>;
165
+ readonly environments: import("valibot").ObjectSchema<{
166
+ readonly status: import("valibot").PicklistSchema<["reported", "absent"], undefined>;
167
+ readonly note: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
168
+ readonly entries: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
169
+ readonly frameId: import("valibot").StringSchema<undefined>;
170
+ readonly status: import("valibot").PicklistSchema<["ready", "failed", "skipped"], undefined>;
171
+ readonly url: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
172
+ readonly error: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
173
+ }, undefined>, undefined>;
174
+ readonly teardown: import("valibot").PicklistSchema<["confirmed", "unconfirmed", "pending", "failed", "not_applicable"], undefined>;
175
+ readonly timeline: import("valibot").ObjectSchema<{
176
+ readonly gap: import("valibot").NullableSchema<import("valibot").PicklistSchema<["unwired", "unreadable", "truncated", "not_provisioned"], undefined>, undefined>;
177
+ readonly note: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
178
+ readonly provisionedAt: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
179
+ readonly tornDownAt: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
180
+ readonly provisionFailures: import("valibot").NumberSchema<undefined>;
181
+ readonly teardownFailures: import("valibot").NumberSchema<undefined>;
182
+ readonly teardownsUnconfirmed: import("valibot").NumberSchema<undefined>;
183
+ }, undefined>;
184
+ readonly evidence: import("valibot").ObjectSchema<{
185
+ readonly status: import("valibot").PicklistSchema<["captured", "local", "undeclared", "absent"], undefined>;
186
+ readonly note: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
187
+ readonly ranAgainst: import("valibot").NullableSchema<import("valibot").PicklistSchema<["local", "ephemeral"], undefined>, undefined>;
188
+ readonly capturedAt: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
189
+ readonly outcomes: import("valibot").NumberSchema<undefined>;
190
+ readonly requirementVerdicts: import("valibot").NumberSchema<undefined>;
191
+ readonly screenshots: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
192
+ readonly view: import("valibot").StringSchema<undefined>;
193
+ readonly artifactId: import("valibot").StringSchema<undefined>;
194
+ readonly hasReference: import("valibot").BooleanSchema<undefined>;
195
+ readonly url: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
196
+ }, undefined>, undefined>;
197
+ readonly url: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
198
+ }, undefined>;
199
+ readonly proof: import("valibot").PicklistSchema<["complete", "incomplete", "not_applicable"], undefined>;
200
+ readonly gaps: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
201
+ }, undefined>;
202
+ readonly merge: import("valibot").ObjectSchema<{
203
+ readonly status: import("valibot").PicklistSchema<["reported", "absent"], undefined>;
204
+ readonly note: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
205
+ readonly assessment: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").ObjectSchema<{
206
+ readonly complexity: import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").MinValueAction<number, 0, undefined>, import("valibot").MaxValueAction<number, 1, undefined>]>;
207
+ readonly risk: import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").MinValueAction<number, 0, undefined>, import("valibot").MaxValueAction<number, 1, undefined>]>;
208
+ readonly impact: import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").MinValueAction<number, 0, undefined>, import("valibot").MaxValueAction<number, 1, undefined>]>;
209
+ readonly rationale: import("valibot").StringSchema<undefined>;
210
+ }, undefined>, undefined>, undefined>;
211
+ readonly outcome: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
212
+ readonly reason: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
213
+ readonly presetName: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
214
+ }, undefined>;
215
+ readonly judges: import("valibot").ObjectSchema<{
216
+ readonly status: import("valibot").PicklistSchema<["reported", "absent"], undefined>;
217
+ readonly note: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
218
+ readonly verdicts: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
219
+ readonly stepKind: import("valibot").StringSchema<undefined>;
220
+ readonly rubricName: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
221
+ readonly rubricOverridden: import("valibot").BooleanSchema<undefined>;
222
+ readonly score: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
223
+ readonly threshold: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
224
+ readonly disposition: import("valibot").NullableSchema<import("valibot").PicklistSchema<["pass", "park", "bounce", "fail"], undefined>, undefined>;
225
+ readonly summary: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
226
+ readonly findings: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
227
+ readonly title: import("valibot").SchemaWithFallback<import("valibot").StringSchema<undefined>, "Untitled finding">;
228
+ readonly detail: import("valibot").SchemaWithFallback<import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
229
+ readonly severity: import("valibot").SchemaWithFallback<import("valibot").PicklistSchema<["low", "medium", "high", "critical"], undefined>, "medium">;
230
+ readonly where: import("valibot").SchemaWithFallback<import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
231
+ }, undefined>, undefined>;
232
+ readonly bounces: import("valibot").NumberSchema<undefined>;
233
+ readonly maxBounces: import("valibot").NumberSchema<undefined>;
234
+ readonly model: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
235
+ }, undefined>, undefined>;
236
+ }, undefined>;
237
+ readonly observability: import("valibot").ObjectSchema<{
238
+ readonly runUrl: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
239
+ readonly trajectoryUrl: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
240
+ readonly reportUrl: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
241
+ }, undefined>;
242
+ readonly truncations: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
243
+ }, undefined>;
244
+ };
245
+ };
246
+ /** The binary artifacts the run captured (metadata; the bytes are a second, per-artifact fetch). */
247
+ export declare const listPublicRunArtifactsContract: {
248
+ readonly method: "get";
249
+ readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
250
+ runId: import("valibot").StringSchema<undefined>;
251
+ }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
252
+ readonly pathResolver: ({ runId }: {
253
+ runId: string;
254
+ }) => string;
255
+ readonly responsesByStatusCode: {
256
+ readonly '4xx': import("valibot").ObjectSchema<{
257
+ readonly error: import("valibot").ObjectSchema<{
258
+ readonly code: import("valibot").StringSchema<undefined>;
259
+ readonly message: import("valibot").StringSchema<undefined>;
260
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
261
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
262
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
263
+ readonly message: import("valibot").StringSchema<undefined>;
264
+ }, undefined>, undefined>, undefined>;
265
+ }, undefined>;
266
+ }, undefined>;
267
+ readonly '5xx': import("valibot").ObjectSchema<{
268
+ readonly error: import("valibot").ObjectSchema<{
269
+ readonly code: import("valibot").StringSchema<undefined>;
270
+ readonly message: import("valibot").StringSchema<undefined>;
271
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
272
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
273
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
274
+ readonly message: import("valibot").StringSchema<undefined>;
275
+ }, undefined>, undefined>, undefined>;
276
+ }, undefined>;
277
+ }, undefined>;
278
+ readonly 200: import("valibot").ObjectSchema<{
279
+ readonly artifacts: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
280
+ readonly artifactId: import("valibot").StringSchema<undefined>;
281
+ readonly kind: import("valibot").PicklistSchema<["screenshot", "reference"], undefined>;
282
+ readonly view: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
283
+ readonly contentType: import("valibot").StringSchema<undefined>;
284
+ readonly byteSize: import("valibot").NumberSchema<undefined>;
285
+ readonly hash: import("valibot").StringSchema<undefined>;
286
+ readonly createdAt: import("valibot").NumberSchema<undefined>;
287
+ }, undefined>, undefined>;
288
+ }, undefined>;
289
+ };
290
+ };
291
+ //# sourceMappingURL=public-evidence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-evidence.d.ts","sourceRoot":"","sources":["../../src/routes/public-evidence.ts"],"names":[],"mappings":"AAwBA;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKrC,CAAA;AAEF,oGAAoG;AACpG,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKzC,CAAA"}
@@ -0,0 +1,42 @@
1
+ import { defineApiContract } from '@toad-contracts/valibot';
2
+ import { prVerificationReportSchema } from '../pr-report.js';
3
+ import { publicRunArtifactListSchema } from '../public-evidence.js';
4
+ import { errorResponses, singleStringParam } from './_shared.js';
5
+ // ---------------------------------------------------------------------------
6
+ // Route contracts for the public run-EVIDENCE surface: absolute `/api/v1` paths,
7
+ // authenticated in-controller by a public-API key at `read` scope. The wire shapes and the
8
+ // reasoning behind them live in `../public-evidence.ts`.
9
+ //
10
+ // The two reads here are addressed under `/api/v1/runs/:runId/*`, beside the parked-decision
11
+ // routes rather than under `/api/v1/debug/*`, and that is a statement about what they are: a
12
+ // run's evidence is the thing a consumer ACTS on (accept the change, score the run), where the
13
+ // debug surface is what someone reads when a run went wrong. They are workspace-scoped like the
14
+ // debug reads, though. See `PublicEvidenceController` for why the narrower decision scope
15
+ // would be the wrong reach for a consumer whose job is auditing a board.
16
+ //
17
+ // The BYTES (`GET /api/v1/artifacts/:artifactId/blob`) are deliberately not a contract: the
18
+ // response is an image, not JSON, so it is a hand-mounted Hono route documented by hand in
19
+ // `scripts/generate-openapi.mjs`, the same treatment the two SSE endpoints get.
20
+ // ---------------------------------------------------------------------------
21
+ const runIdParams = singleStringParam('runId');
22
+ /**
23
+ * The run's verification report: the engine's bundle of captured facts, byte-for-byte what it
24
+ * maintains on the pull request, composed on read from the run's persisted state.
25
+ *
26
+ * A consumer that scraped the fenced JSON block out of a PR body can read it here instead, and
27
+ * gets it for the runs that never opened a pull request at all.
28
+ */
29
+ export const getPublicRunReportContract = defineApiContract({
30
+ method: 'get',
31
+ requestPathParamsSchema: runIdParams,
32
+ pathResolver: ({ runId }) => `/api/v1/runs/${runId}/report`,
33
+ responsesByStatusCode: { 200: prVerificationReportSchema, ...errorResponses },
34
+ });
35
+ /** The binary artifacts the run captured (metadata; the bytes are a second, per-artifact fetch). */
36
+ export const listPublicRunArtifactsContract = defineApiContract({
37
+ method: 'get',
38
+ requestPathParamsSchema: runIdParams,
39
+ pathResolver: ({ runId }) => `/api/v1/runs/${runId}/artifacts`,
40
+ responsesByStatusCode: { 200: publicRunArtifactListSchema, ...errorResponses },
41
+ });
42
+ //# sourceMappingURL=public-evidence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-evidence.js","sourceRoot":"","sources":["../../src/routes/public-evidence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAA;AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEhE,8EAA8E;AAC9E,iFAAiF;AACjF,2FAA2F;AAC3F,yDAAyD;AACzD,EAAE;AACF,6FAA6F;AAC7F,6FAA6F;AAC7F,+FAA+F;AAC/F,gGAAgG;AAChG,0FAA0F;AAC1F,yEAAyE;AACzE,EAAE;AACF,4FAA4F;AAC5F,2FAA2F;AAC3F,gFAAgF;AAChF,8EAA8E;AAE9E,MAAM,WAAW,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAA;AAE9C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,iBAAiB,CAAC;IAC1D,MAAM,EAAE,KAAK;IACb,uBAAuB,EAAE,WAAW;IACpC,YAAY,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,gBAAgB,KAAK,SAAS;IAC3D,qBAAqB,EAAE,EAAE,GAAG,EAAE,0BAA0B,EAAE,GAAG,cAAc,EAAE;CAC9E,CAAC,CAAA;AAEF,oGAAoG;AACpG,MAAM,CAAC,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;IAC9D,MAAM,EAAE,KAAK;IACb,uBAAuB,EAAE,WAAW;IACpC,YAAY,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,gBAAgB,KAAK,YAAY;IAC9D,qBAAqB,EAAE,EAAE,GAAG,EAAE,2BAA2B,EAAE,GAAG,cAAc,EAAE;CAC/E,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/contracts",
3
- "version": "0.241.0",
3
+ "version": "0.242.0",
4
4
  "description": "Valibot wire contract shared between the Agent Architecture Board frontend and backend.",
5
5
  "repository": {
6
6
  "type": "git",