@cat-factory/contracts 0.162.0 → 0.163.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.
Files changed (51) hide show
  1. package/dist/execution.d.ts +20 -0
  2. package/dist/execution.d.ts.map +1 -1
  3. package/dist/execution.js +19 -0
  4. package/dist/execution.js.map +1 -1
  5. package/dist/index.d.ts +2 -0
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +2 -0
  8. package/dist/index.js.map +1 -1
  9. package/dist/notification-webhooks.d.ts +115 -0
  10. package/dist/notification-webhooks.d.ts.map +1 -0
  11. package/dist/notification-webhooks.js +86 -0
  12. package/dist/notification-webhooks.js.map +1 -0
  13. package/dist/public-api-keys.d.ts +31 -13
  14. package/dist/public-api-keys.d.ts.map +1 -1
  15. package/dist/public-api-keys.js +26 -8
  16. package/dist/public-api-keys.js.map +1 -1
  17. package/dist/public-decisions.d.ts +254 -0
  18. package/dist/public-decisions.d.ts.map +1 -0
  19. package/dist/public-decisions.js +150 -0
  20. package/dist/public-decisions.js.map +1 -0
  21. package/dist/routes/agent-runs.d.ts +2 -0
  22. package/dist/routes/agent-runs.d.ts.map +1 -1
  23. package/dist/routes/execution.d.ts +8 -0
  24. package/dist/routes/execution.d.ts.map +1 -1
  25. package/dist/routes/human-review.d.ts +1 -0
  26. package/dist/routes/human-review.d.ts.map +1 -1
  27. package/dist/routes/human-test.d.ts +5 -0
  28. package/dist/routes/human-test.d.ts.map +1 -1
  29. package/dist/routes/index.d.ts +2 -0
  30. package/dist/routes/index.d.ts.map +1 -1
  31. package/dist/routes/index.js +2 -0
  32. package/dist/routes/index.js.map +1 -1
  33. package/dist/routes/notification-webhooks.d.ts +111 -0
  34. package/dist/routes/notification-webhooks.d.ts.map +1 -0
  35. package/dist/routes/notification-webhooks.js +33 -0
  36. package/dist/routes/notification-webhooks.js.map +1 -0
  37. package/dist/routes/public-api.d.ts +59 -3
  38. package/dist/routes/public-api.d.ts.map +1 -1
  39. package/dist/routes/public-api.js +15 -0
  40. package/dist/routes/public-api.js.map +1 -1
  41. package/dist/routes/public-decisions.d.ts +602 -0
  42. package/dist/routes/public-decisions.d.ts.map +1 -0
  43. package/dist/routes/public-decisions.js +90 -0
  44. package/dist/routes/public-decisions.js.map +1 -0
  45. package/dist/routes/visual-confirm.d.ts +3 -0
  46. package/dist/routes/visual-confirm.d.ts.map +1 -1
  47. package/dist/routes/workspaces.d.ts +2 -0
  48. package/dist/routes/workspaces.d.ts.map +1 -1
  49. package/dist/snapshot.d.ts +1 -0
  50. package/dist/snapshot.d.ts.map +1 -1
  51. package/package.json +1 -1
@@ -0,0 +1,602 @@
1
+ import { ContractNoBody } from '@toad-contracts/valibot';
2
+ import * as v from 'valibot';
3
+ /** List a run's currently-parked decisions (findings, fork options) — `read`. */
4
+ export declare const listPublicRunDecisionsContract: {
5
+ readonly method: "get";
6
+ readonly requestPathParamsSchema: v.ObjectSchema<{
7
+ runId: v.StringSchema<undefined>;
8
+ }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
9
+ readonly pathResolver: ({ runId }: {
10
+ runId: string;
11
+ }) => string;
12
+ readonly responsesByStatusCode: {
13
+ readonly '4xx': v.ObjectSchema<{
14
+ readonly error: v.ObjectSchema<{
15
+ readonly code: v.StringSchema<undefined>;
16
+ readonly message: v.StringSchema<undefined>;
17
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
18
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
19
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
20
+ readonly message: v.StringSchema<undefined>;
21
+ }, undefined>, undefined>, undefined>;
22
+ }, undefined>;
23
+ }, undefined>;
24
+ readonly '5xx': v.ObjectSchema<{
25
+ readonly error: v.ObjectSchema<{
26
+ readonly code: v.StringSchema<undefined>;
27
+ readonly message: v.StringSchema<undefined>;
28
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
29
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
30
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
31
+ readonly message: v.StringSchema<undefined>;
32
+ }, undefined>, undefined>, undefined>;
33
+ }, undefined>;
34
+ }, undefined>;
35
+ readonly 200: v.ObjectSchema<{
36
+ readonly runId: v.StringSchema<undefined>;
37
+ readonly taskId: v.StringSchema<undefined>;
38
+ readonly status: v.PicklistSchema<["running", "blocked", "paused", "done", "failed"], undefined>;
39
+ readonly parked: v.BooleanSchema<undefined>;
40
+ readonly decisions: v.ArraySchema<v.VariantSchema<"kind", [v.ObjectSchema<{
41
+ readonly kind: v.LiteralSchema<"requirements-review", undefined>;
42
+ readonly reviewId: v.StringSchema<undefined>;
43
+ readonly taskId: v.StringSchema<undefined>;
44
+ readonly status: v.PicklistSchema<["ready", "incorporating", "reviewing", "merged", "exceeded", "incorporated"], undefined>;
45
+ readonly iteration: v.NumberSchema<undefined>;
46
+ readonly maxIterations: v.NumberSchema<undefined>;
47
+ readonly findings: v.ArraySchema<v.ObjectSchema<{
48
+ readonly itemId: v.StringSchema<undefined>;
49
+ readonly category: v.PicklistSchema<["gap", "clarification", "assumption", "risk", "question"], undefined>;
50
+ readonly severity: v.PicklistSchema<["low", "medium", "high"], undefined>;
51
+ readonly title: v.StringSchema<undefined>;
52
+ readonly detail: v.StringSchema<undefined>;
53
+ readonly status: v.PicklistSchema<["open", "answered", "resolved", "dismissed", "recommend_requested"], undefined>;
54
+ readonly reply: v.NullableSchema<v.StringSchema<undefined>, undefined>;
55
+ }, undefined>, undefined>;
56
+ readonly incorporatedRequirements: v.NullableSchema<v.StringSchema<undefined>, undefined>;
57
+ }, undefined>, v.ObjectSchema<{
58
+ readonly kind: v.LiteralSchema<"fork", undefined>;
59
+ readonly status: v.PicklistSchema<["proposing", "awaiting_choice", "answering", "chosen", "single_path", "skipped"], undefined>;
60
+ readonly seamSummary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
61
+ readonly forks: v.ArraySchema<v.ObjectSchema<{
62
+ readonly id: v.StringSchema<undefined>;
63
+ readonly title: v.StringSchema<undefined>;
64
+ readonly summary: v.StringSchema<undefined>;
65
+ readonly approach: v.StringSchema<undefined>;
66
+ readonly tradeoffs: v.ArraySchema<v.StringSchema<undefined>, undefined>;
67
+ readonly riskNotes: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
68
+ readonly recommended: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
69
+ }, undefined>, undefined>;
70
+ }, undefined>], undefined>, undefined>;
71
+ }, undefined>;
72
+ };
73
+ };
74
+ /** Answer one reviewer finding. */
75
+ export declare const replyPublicRunFindingContract: {
76
+ readonly method: "post";
77
+ readonly requestPathParamsSchema: v.ObjectSchema<{
78
+ readonly runId: v.StringSchema<undefined>;
79
+ readonly itemId: v.StringSchema<undefined>;
80
+ }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
81
+ readonly pathResolver: ({ runId, itemId }: {
82
+ runId: string;
83
+ itemId: string;
84
+ }) => string;
85
+ readonly requestBodySchema: v.ObjectSchema<{
86
+ readonly reply: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 4000, undefined>]>;
87
+ }, undefined>;
88
+ readonly responsesByStatusCode: {
89
+ readonly '4xx': v.ObjectSchema<{
90
+ readonly error: v.ObjectSchema<{
91
+ readonly code: v.StringSchema<undefined>;
92
+ readonly message: v.StringSchema<undefined>;
93
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
94
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
95
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
96
+ readonly message: v.StringSchema<undefined>;
97
+ }, undefined>, undefined>, undefined>;
98
+ }, undefined>;
99
+ }, undefined>;
100
+ readonly '5xx': v.ObjectSchema<{
101
+ readonly error: v.ObjectSchema<{
102
+ readonly code: v.StringSchema<undefined>;
103
+ readonly message: v.StringSchema<undefined>;
104
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
105
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
106
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
107
+ readonly message: v.StringSchema<undefined>;
108
+ }, undefined>, undefined>, undefined>;
109
+ }, undefined>;
110
+ }, undefined>;
111
+ readonly 200: v.ObjectSchema<{
112
+ readonly runId: v.StringSchema<undefined>;
113
+ readonly taskId: v.StringSchema<undefined>;
114
+ readonly status: v.PicklistSchema<["running", "blocked", "paused", "done", "failed"], undefined>;
115
+ readonly parked: v.BooleanSchema<undefined>;
116
+ readonly decisions: v.ArraySchema<v.VariantSchema<"kind", [v.ObjectSchema<{
117
+ readonly kind: v.LiteralSchema<"requirements-review", undefined>;
118
+ readonly reviewId: v.StringSchema<undefined>;
119
+ readonly taskId: v.StringSchema<undefined>;
120
+ readonly status: v.PicklistSchema<["ready", "incorporating", "reviewing", "merged", "exceeded", "incorporated"], undefined>;
121
+ readonly iteration: v.NumberSchema<undefined>;
122
+ readonly maxIterations: v.NumberSchema<undefined>;
123
+ readonly findings: v.ArraySchema<v.ObjectSchema<{
124
+ readonly itemId: v.StringSchema<undefined>;
125
+ readonly category: v.PicklistSchema<["gap", "clarification", "assumption", "risk", "question"], undefined>;
126
+ readonly severity: v.PicklistSchema<["low", "medium", "high"], undefined>;
127
+ readonly title: v.StringSchema<undefined>;
128
+ readonly detail: v.StringSchema<undefined>;
129
+ readonly status: v.PicklistSchema<["open", "answered", "resolved", "dismissed", "recommend_requested"], undefined>;
130
+ readonly reply: v.NullableSchema<v.StringSchema<undefined>, undefined>;
131
+ }, undefined>, undefined>;
132
+ readonly incorporatedRequirements: v.NullableSchema<v.StringSchema<undefined>, undefined>;
133
+ }, undefined>, v.ObjectSchema<{
134
+ readonly kind: v.LiteralSchema<"fork", undefined>;
135
+ readonly status: v.PicklistSchema<["proposing", "awaiting_choice", "answering", "chosen", "single_path", "skipped"], undefined>;
136
+ readonly seamSummary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
137
+ readonly forks: v.ArraySchema<v.ObjectSchema<{
138
+ readonly id: v.StringSchema<undefined>;
139
+ readonly title: v.StringSchema<undefined>;
140
+ readonly summary: v.StringSchema<undefined>;
141
+ readonly approach: v.StringSchema<undefined>;
142
+ readonly tradeoffs: v.ArraySchema<v.StringSchema<undefined>, undefined>;
143
+ readonly riskNotes: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
144
+ readonly recommended: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
145
+ }, undefined>, undefined>;
146
+ }, undefined>], undefined>, undefined>;
147
+ }, undefined>;
148
+ };
149
+ };
150
+ /** Dismiss a finding as not applicable, or reopen one dismissed by mistake. */
151
+ export declare const setPublicRunFindingStatusContract: {
152
+ readonly method: "patch";
153
+ readonly requestPathParamsSchema: v.ObjectSchema<{
154
+ readonly runId: v.StringSchema<undefined>;
155
+ readonly itemId: v.StringSchema<undefined>;
156
+ }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
157
+ readonly pathResolver: ({ runId, itemId }: {
158
+ runId: string;
159
+ itemId: string;
160
+ }) => string;
161
+ readonly requestBodySchema: v.ObjectSchema<{
162
+ readonly status: v.PicklistSchema<["dismissed", "open"], undefined>;
163
+ }, undefined>;
164
+ readonly responsesByStatusCode: {
165
+ readonly '4xx': v.ObjectSchema<{
166
+ readonly error: v.ObjectSchema<{
167
+ readonly code: v.StringSchema<undefined>;
168
+ readonly message: v.StringSchema<undefined>;
169
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
170
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
171
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
172
+ readonly message: v.StringSchema<undefined>;
173
+ }, undefined>, undefined>, undefined>;
174
+ }, undefined>;
175
+ }, undefined>;
176
+ readonly '5xx': v.ObjectSchema<{
177
+ readonly error: v.ObjectSchema<{
178
+ readonly code: v.StringSchema<undefined>;
179
+ readonly message: v.StringSchema<undefined>;
180
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
181
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
182
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
183
+ readonly message: v.StringSchema<undefined>;
184
+ }, undefined>, undefined>, undefined>;
185
+ }, undefined>;
186
+ }, undefined>;
187
+ readonly 200: v.ObjectSchema<{
188
+ readonly runId: v.StringSchema<undefined>;
189
+ readonly taskId: v.StringSchema<undefined>;
190
+ readonly status: v.PicklistSchema<["running", "blocked", "paused", "done", "failed"], undefined>;
191
+ readonly parked: v.BooleanSchema<undefined>;
192
+ readonly decisions: v.ArraySchema<v.VariantSchema<"kind", [v.ObjectSchema<{
193
+ readonly kind: v.LiteralSchema<"requirements-review", undefined>;
194
+ readonly reviewId: v.StringSchema<undefined>;
195
+ readonly taskId: v.StringSchema<undefined>;
196
+ readonly status: v.PicklistSchema<["ready", "incorporating", "reviewing", "merged", "exceeded", "incorporated"], undefined>;
197
+ readonly iteration: v.NumberSchema<undefined>;
198
+ readonly maxIterations: v.NumberSchema<undefined>;
199
+ readonly findings: v.ArraySchema<v.ObjectSchema<{
200
+ readonly itemId: v.StringSchema<undefined>;
201
+ readonly category: v.PicklistSchema<["gap", "clarification", "assumption", "risk", "question"], undefined>;
202
+ readonly severity: v.PicklistSchema<["low", "medium", "high"], undefined>;
203
+ readonly title: v.StringSchema<undefined>;
204
+ readonly detail: v.StringSchema<undefined>;
205
+ readonly status: v.PicklistSchema<["open", "answered", "resolved", "dismissed", "recommend_requested"], undefined>;
206
+ readonly reply: v.NullableSchema<v.StringSchema<undefined>, undefined>;
207
+ }, undefined>, undefined>;
208
+ readonly incorporatedRequirements: v.NullableSchema<v.StringSchema<undefined>, undefined>;
209
+ }, undefined>, v.ObjectSchema<{
210
+ readonly kind: v.LiteralSchema<"fork", undefined>;
211
+ readonly status: v.PicklistSchema<["proposing", "awaiting_choice", "answering", "chosen", "single_path", "skipped"], undefined>;
212
+ readonly seamSummary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
213
+ readonly forks: v.ArraySchema<v.ObjectSchema<{
214
+ readonly id: v.StringSchema<undefined>;
215
+ readonly title: v.StringSchema<undefined>;
216
+ readonly summary: v.StringSchema<undefined>;
217
+ readonly approach: v.StringSchema<undefined>;
218
+ readonly tradeoffs: v.ArraySchema<v.StringSchema<undefined>, undefined>;
219
+ readonly riskNotes: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
220
+ readonly recommended: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
221
+ }, undefined>, undefined>;
222
+ }, undefined>], undefined>, undefined>;
223
+ }, undefined>;
224
+ };
225
+ };
226
+ /**
227
+ * Fold the recorded answers into the standardized requirements document. ASYNCHRONOUS — the
228
+ * durable driver folds and re-reviews in the background, so the response shows the review
229
+ * `incorporating`; poll (or watch the SSE stream) for the next round or convergence.
230
+ */
231
+ export declare const incorporatePublicRunRequirementsContract: {
232
+ readonly method: "post";
233
+ readonly requestPathParamsSchema: v.ObjectSchema<{
234
+ runId: v.StringSchema<undefined>;
235
+ }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
236
+ readonly pathResolver: ({ runId }: {
237
+ runId: string;
238
+ }) => string;
239
+ readonly requestBodySchema: v.ObjectSchema<{
240
+ readonly feedback: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 4000, undefined>]>, undefined>;
241
+ }, undefined>;
242
+ readonly responsesByStatusCode: {
243
+ readonly '4xx': v.ObjectSchema<{
244
+ readonly error: v.ObjectSchema<{
245
+ readonly code: v.StringSchema<undefined>;
246
+ readonly message: v.StringSchema<undefined>;
247
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
248
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
249
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
250
+ readonly message: v.StringSchema<undefined>;
251
+ }, undefined>, undefined>, undefined>;
252
+ }, undefined>;
253
+ }, undefined>;
254
+ readonly '5xx': v.ObjectSchema<{
255
+ readonly error: v.ObjectSchema<{
256
+ readonly code: v.StringSchema<undefined>;
257
+ readonly message: v.StringSchema<undefined>;
258
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
259
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
260
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
261
+ readonly message: v.StringSchema<undefined>;
262
+ }, undefined>, undefined>, undefined>;
263
+ }, undefined>;
264
+ }, undefined>;
265
+ readonly 200: v.ObjectSchema<{
266
+ readonly runId: v.StringSchema<undefined>;
267
+ readonly taskId: v.StringSchema<undefined>;
268
+ readonly status: v.PicklistSchema<["running", "blocked", "paused", "done", "failed"], undefined>;
269
+ readonly parked: v.BooleanSchema<undefined>;
270
+ readonly decisions: v.ArraySchema<v.VariantSchema<"kind", [v.ObjectSchema<{
271
+ readonly kind: v.LiteralSchema<"requirements-review", undefined>;
272
+ readonly reviewId: v.StringSchema<undefined>;
273
+ readonly taskId: v.StringSchema<undefined>;
274
+ readonly status: v.PicklistSchema<["ready", "incorporating", "reviewing", "merged", "exceeded", "incorporated"], undefined>;
275
+ readonly iteration: v.NumberSchema<undefined>;
276
+ readonly maxIterations: v.NumberSchema<undefined>;
277
+ readonly findings: v.ArraySchema<v.ObjectSchema<{
278
+ readonly itemId: v.StringSchema<undefined>;
279
+ readonly category: v.PicklistSchema<["gap", "clarification", "assumption", "risk", "question"], undefined>;
280
+ readonly severity: v.PicklistSchema<["low", "medium", "high"], undefined>;
281
+ readonly title: v.StringSchema<undefined>;
282
+ readonly detail: v.StringSchema<undefined>;
283
+ readonly status: v.PicklistSchema<["open", "answered", "resolved", "dismissed", "recommend_requested"], undefined>;
284
+ readonly reply: v.NullableSchema<v.StringSchema<undefined>, undefined>;
285
+ }, undefined>, undefined>;
286
+ readonly incorporatedRequirements: v.NullableSchema<v.StringSchema<undefined>, undefined>;
287
+ }, undefined>, v.ObjectSchema<{
288
+ readonly kind: v.LiteralSchema<"fork", undefined>;
289
+ readonly status: v.PicklistSchema<["proposing", "awaiting_choice", "answering", "chosen", "single_path", "skipped"], undefined>;
290
+ readonly seamSummary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
291
+ readonly forks: v.ArraySchema<v.ObjectSchema<{
292
+ readonly id: v.StringSchema<undefined>;
293
+ readonly title: v.StringSchema<undefined>;
294
+ readonly summary: v.StringSchema<undefined>;
295
+ readonly approach: v.StringSchema<undefined>;
296
+ readonly tradeoffs: v.ArraySchema<v.StringSchema<undefined>, undefined>;
297
+ readonly riskNotes: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
298
+ readonly recommended: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
299
+ }, undefined>, undefined>;
300
+ }, undefined>], undefined>, undefined>;
301
+ }, undefined>;
302
+ };
303
+ };
304
+ /** Run one more reviewer pass over the incorporated document. */
305
+ export declare const reReviewPublicRunRequirementsContract: {
306
+ readonly method: "post";
307
+ readonly requestPathParamsSchema: v.ObjectSchema<{
308
+ runId: v.StringSchema<undefined>;
309
+ }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
310
+ readonly pathResolver: ({ runId }: {
311
+ runId: string;
312
+ }) => string;
313
+ readonly requestBodySchema: typeof ContractNoBody;
314
+ readonly responsesByStatusCode: {
315
+ readonly '4xx': v.ObjectSchema<{
316
+ readonly error: v.ObjectSchema<{
317
+ readonly code: v.StringSchema<undefined>;
318
+ readonly message: v.StringSchema<undefined>;
319
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
320
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
321
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
322
+ readonly message: v.StringSchema<undefined>;
323
+ }, undefined>, undefined>, undefined>;
324
+ }, undefined>;
325
+ }, undefined>;
326
+ readonly '5xx': v.ObjectSchema<{
327
+ readonly error: v.ObjectSchema<{
328
+ readonly code: v.StringSchema<undefined>;
329
+ readonly message: v.StringSchema<undefined>;
330
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
331
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
332
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
333
+ readonly message: v.StringSchema<undefined>;
334
+ }, undefined>, undefined>, undefined>;
335
+ }, undefined>;
336
+ }, undefined>;
337
+ readonly 200: v.ObjectSchema<{
338
+ readonly runId: v.StringSchema<undefined>;
339
+ readonly taskId: v.StringSchema<undefined>;
340
+ readonly status: v.PicklistSchema<["running", "blocked", "paused", "done", "failed"], undefined>;
341
+ readonly parked: v.BooleanSchema<undefined>;
342
+ readonly decisions: v.ArraySchema<v.VariantSchema<"kind", [v.ObjectSchema<{
343
+ readonly kind: v.LiteralSchema<"requirements-review", undefined>;
344
+ readonly reviewId: v.StringSchema<undefined>;
345
+ readonly taskId: v.StringSchema<undefined>;
346
+ readonly status: v.PicklistSchema<["ready", "incorporating", "reviewing", "merged", "exceeded", "incorporated"], undefined>;
347
+ readonly iteration: v.NumberSchema<undefined>;
348
+ readonly maxIterations: v.NumberSchema<undefined>;
349
+ readonly findings: v.ArraySchema<v.ObjectSchema<{
350
+ readonly itemId: v.StringSchema<undefined>;
351
+ readonly category: v.PicklistSchema<["gap", "clarification", "assumption", "risk", "question"], undefined>;
352
+ readonly severity: v.PicklistSchema<["low", "medium", "high"], undefined>;
353
+ readonly title: v.StringSchema<undefined>;
354
+ readonly detail: v.StringSchema<undefined>;
355
+ readonly status: v.PicklistSchema<["open", "answered", "resolved", "dismissed", "recommend_requested"], undefined>;
356
+ readonly reply: v.NullableSchema<v.StringSchema<undefined>, undefined>;
357
+ }, undefined>, undefined>;
358
+ readonly incorporatedRequirements: v.NullableSchema<v.StringSchema<undefined>, undefined>;
359
+ }, undefined>, v.ObjectSchema<{
360
+ readonly kind: v.LiteralSchema<"fork", undefined>;
361
+ readonly status: v.PicklistSchema<["proposing", "awaiting_choice", "answering", "chosen", "single_path", "skipped"], undefined>;
362
+ readonly seamSummary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
363
+ readonly forks: v.ArraySchema<v.ObjectSchema<{
364
+ readonly id: v.StringSchema<undefined>;
365
+ readonly title: v.StringSchema<undefined>;
366
+ readonly summary: v.StringSchema<undefined>;
367
+ readonly approach: v.StringSchema<undefined>;
368
+ readonly tradeoffs: v.ArraySchema<v.StringSchema<undefined>, undefined>;
369
+ readonly riskNotes: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
370
+ readonly recommended: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
371
+ }, undefined>, undefined>;
372
+ }, undefined>], undefined>, undefined>;
373
+ }, undefined>;
374
+ };
375
+ };
376
+ /** Settle the requirements phase and advance the parked run (used when nothing is outstanding). */
377
+ export declare const proceedPublicRunRequirementsContract: {
378
+ readonly method: "post";
379
+ readonly requestPathParamsSchema: v.ObjectSchema<{
380
+ runId: v.StringSchema<undefined>;
381
+ }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
382
+ readonly pathResolver: ({ runId }: {
383
+ runId: string;
384
+ }) => string;
385
+ readonly requestBodySchema: typeof ContractNoBody;
386
+ readonly responsesByStatusCode: {
387
+ readonly '4xx': v.ObjectSchema<{
388
+ readonly error: v.ObjectSchema<{
389
+ readonly code: v.StringSchema<undefined>;
390
+ readonly message: v.StringSchema<undefined>;
391
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
392
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
393
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
394
+ readonly message: v.StringSchema<undefined>;
395
+ }, undefined>, undefined>, undefined>;
396
+ }, undefined>;
397
+ }, undefined>;
398
+ readonly '5xx': v.ObjectSchema<{
399
+ readonly error: v.ObjectSchema<{
400
+ readonly code: v.StringSchema<undefined>;
401
+ readonly message: v.StringSchema<undefined>;
402
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
403
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
404
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
405
+ readonly message: v.StringSchema<undefined>;
406
+ }, undefined>, undefined>, undefined>;
407
+ }, undefined>;
408
+ }, undefined>;
409
+ readonly 200: v.ObjectSchema<{
410
+ readonly runId: v.StringSchema<undefined>;
411
+ readonly taskId: v.StringSchema<undefined>;
412
+ readonly status: v.PicklistSchema<["running", "blocked", "paused", "done", "failed"], undefined>;
413
+ readonly parked: v.BooleanSchema<undefined>;
414
+ readonly decisions: v.ArraySchema<v.VariantSchema<"kind", [v.ObjectSchema<{
415
+ readonly kind: v.LiteralSchema<"requirements-review", undefined>;
416
+ readonly reviewId: v.StringSchema<undefined>;
417
+ readonly taskId: v.StringSchema<undefined>;
418
+ readonly status: v.PicklistSchema<["ready", "incorporating", "reviewing", "merged", "exceeded", "incorporated"], undefined>;
419
+ readonly iteration: v.NumberSchema<undefined>;
420
+ readonly maxIterations: v.NumberSchema<undefined>;
421
+ readonly findings: v.ArraySchema<v.ObjectSchema<{
422
+ readonly itemId: v.StringSchema<undefined>;
423
+ readonly category: v.PicklistSchema<["gap", "clarification", "assumption", "risk", "question"], undefined>;
424
+ readonly severity: v.PicklistSchema<["low", "medium", "high"], undefined>;
425
+ readonly title: v.StringSchema<undefined>;
426
+ readonly detail: v.StringSchema<undefined>;
427
+ readonly status: v.PicklistSchema<["open", "answered", "resolved", "dismissed", "recommend_requested"], undefined>;
428
+ readonly reply: v.NullableSchema<v.StringSchema<undefined>, undefined>;
429
+ }, undefined>, undefined>;
430
+ readonly incorporatedRequirements: v.NullableSchema<v.StringSchema<undefined>, undefined>;
431
+ }, undefined>, v.ObjectSchema<{
432
+ readonly kind: v.LiteralSchema<"fork", undefined>;
433
+ readonly status: v.PicklistSchema<["proposing", "awaiting_choice", "answering", "chosen", "single_path", "skipped"], undefined>;
434
+ readonly seamSummary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
435
+ readonly forks: v.ArraySchema<v.ObjectSchema<{
436
+ readonly id: v.StringSchema<undefined>;
437
+ readonly title: v.StringSchema<undefined>;
438
+ readonly summary: v.StringSchema<undefined>;
439
+ readonly approach: v.StringSchema<undefined>;
440
+ readonly tradeoffs: v.ArraySchema<v.StringSchema<undefined>, undefined>;
441
+ readonly riskNotes: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
442
+ readonly recommended: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
443
+ }, undefined>, undefined>;
444
+ }, undefined>], undefined>, undefined>;
445
+ }, undefined>;
446
+ };
447
+ };
448
+ /** Resolve a review that hit its iteration cap (extra round / proceed / stop and reset). */
449
+ export declare const resolvePublicRunRequirementsExceededContract: {
450
+ readonly method: "post";
451
+ readonly requestPathParamsSchema: v.ObjectSchema<{
452
+ runId: v.StringSchema<undefined>;
453
+ }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
454
+ readonly pathResolver: ({ runId }: {
455
+ runId: string;
456
+ }) => string;
457
+ readonly requestBodySchema: v.ObjectSchema<{
458
+ readonly choice: v.PicklistSchema<["extra-round", "proceed", "stop-reset"], undefined>;
459
+ }, undefined>;
460
+ readonly responsesByStatusCode: {
461
+ readonly '4xx': v.ObjectSchema<{
462
+ readonly error: v.ObjectSchema<{
463
+ readonly code: v.StringSchema<undefined>;
464
+ readonly message: v.StringSchema<undefined>;
465
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
466
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
467
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
468
+ readonly message: v.StringSchema<undefined>;
469
+ }, undefined>, undefined>, undefined>;
470
+ }, undefined>;
471
+ }, undefined>;
472
+ readonly '5xx': v.ObjectSchema<{
473
+ readonly error: v.ObjectSchema<{
474
+ readonly code: v.StringSchema<undefined>;
475
+ readonly message: v.StringSchema<undefined>;
476
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
477
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
478
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
479
+ readonly message: v.StringSchema<undefined>;
480
+ }, undefined>, undefined>, undefined>;
481
+ }, undefined>;
482
+ }, undefined>;
483
+ readonly 200: v.ObjectSchema<{
484
+ readonly runId: v.StringSchema<undefined>;
485
+ readonly taskId: v.StringSchema<undefined>;
486
+ readonly status: v.PicklistSchema<["running", "blocked", "paused", "done", "failed"], undefined>;
487
+ readonly parked: v.BooleanSchema<undefined>;
488
+ readonly decisions: v.ArraySchema<v.VariantSchema<"kind", [v.ObjectSchema<{
489
+ readonly kind: v.LiteralSchema<"requirements-review", undefined>;
490
+ readonly reviewId: v.StringSchema<undefined>;
491
+ readonly taskId: v.StringSchema<undefined>;
492
+ readonly status: v.PicklistSchema<["ready", "incorporating", "reviewing", "merged", "exceeded", "incorporated"], undefined>;
493
+ readonly iteration: v.NumberSchema<undefined>;
494
+ readonly maxIterations: v.NumberSchema<undefined>;
495
+ readonly findings: v.ArraySchema<v.ObjectSchema<{
496
+ readonly itemId: v.StringSchema<undefined>;
497
+ readonly category: v.PicklistSchema<["gap", "clarification", "assumption", "risk", "question"], undefined>;
498
+ readonly severity: v.PicklistSchema<["low", "medium", "high"], undefined>;
499
+ readonly title: v.StringSchema<undefined>;
500
+ readonly detail: v.StringSchema<undefined>;
501
+ readonly status: v.PicklistSchema<["open", "answered", "resolved", "dismissed", "recommend_requested"], undefined>;
502
+ readonly reply: v.NullableSchema<v.StringSchema<undefined>, undefined>;
503
+ }, undefined>, undefined>;
504
+ readonly incorporatedRequirements: v.NullableSchema<v.StringSchema<undefined>, undefined>;
505
+ }, undefined>, v.ObjectSchema<{
506
+ readonly kind: v.LiteralSchema<"fork", undefined>;
507
+ readonly status: v.PicklistSchema<["proposing", "awaiting_choice", "answering", "chosen", "single_path", "skipped"], undefined>;
508
+ readonly seamSummary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
509
+ readonly forks: v.ArraySchema<v.ObjectSchema<{
510
+ readonly id: v.StringSchema<undefined>;
511
+ readonly title: v.StringSchema<undefined>;
512
+ readonly summary: v.StringSchema<undefined>;
513
+ readonly approach: v.StringSchema<undefined>;
514
+ readonly tradeoffs: v.ArraySchema<v.StringSchema<undefined>, undefined>;
515
+ readonly riskNotes: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
516
+ readonly recommended: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
517
+ }, undefined>, undefined>;
518
+ }, undefined>], undefined>, undefined>;
519
+ }, undefined>;
520
+ };
521
+ };
522
+ /** Choose an implementation approach (a proposed fork id or a custom approach). */
523
+ export declare const choosePublicRunForkContract: {
524
+ readonly method: "post";
525
+ readonly requestPathParamsSchema: v.ObjectSchema<{
526
+ runId: v.StringSchema<undefined>;
527
+ }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
528
+ readonly pathResolver: ({ runId }: {
529
+ runId: string;
530
+ }) => string;
531
+ readonly requestBodySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
532
+ readonly forkId: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
533
+ readonly custom: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 8000, undefined>]>, undefined>, undefined>;
534
+ readonly note: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 4000, undefined>]>, undefined>, undefined>;
535
+ }, undefined>, v.CheckAction<{
536
+ forkId?: string | null | undefined;
537
+ custom?: string | null | undefined;
538
+ note?: string | null | undefined;
539
+ }, "Provide exactly one of forkId or custom.">]>;
540
+ readonly responsesByStatusCode: {
541
+ readonly '4xx': v.ObjectSchema<{
542
+ readonly error: v.ObjectSchema<{
543
+ readonly code: v.StringSchema<undefined>;
544
+ readonly message: v.StringSchema<undefined>;
545
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
546
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
547
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
548
+ readonly message: v.StringSchema<undefined>;
549
+ }, undefined>, undefined>, undefined>;
550
+ }, undefined>;
551
+ }, undefined>;
552
+ readonly '5xx': v.ObjectSchema<{
553
+ readonly error: v.ObjectSchema<{
554
+ readonly code: v.StringSchema<undefined>;
555
+ readonly message: v.StringSchema<undefined>;
556
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
557
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
558
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
559
+ readonly message: v.StringSchema<undefined>;
560
+ }, undefined>, undefined>, undefined>;
561
+ }, undefined>;
562
+ }, undefined>;
563
+ readonly 200: v.ObjectSchema<{
564
+ readonly runId: v.StringSchema<undefined>;
565
+ readonly taskId: v.StringSchema<undefined>;
566
+ readonly status: v.PicklistSchema<["running", "blocked", "paused", "done", "failed"], undefined>;
567
+ readonly parked: v.BooleanSchema<undefined>;
568
+ readonly decisions: v.ArraySchema<v.VariantSchema<"kind", [v.ObjectSchema<{
569
+ readonly kind: v.LiteralSchema<"requirements-review", undefined>;
570
+ readonly reviewId: v.StringSchema<undefined>;
571
+ readonly taskId: v.StringSchema<undefined>;
572
+ readonly status: v.PicklistSchema<["ready", "incorporating", "reviewing", "merged", "exceeded", "incorporated"], undefined>;
573
+ readonly iteration: v.NumberSchema<undefined>;
574
+ readonly maxIterations: v.NumberSchema<undefined>;
575
+ readonly findings: v.ArraySchema<v.ObjectSchema<{
576
+ readonly itemId: v.StringSchema<undefined>;
577
+ readonly category: v.PicklistSchema<["gap", "clarification", "assumption", "risk", "question"], undefined>;
578
+ readonly severity: v.PicklistSchema<["low", "medium", "high"], undefined>;
579
+ readonly title: v.StringSchema<undefined>;
580
+ readonly detail: v.StringSchema<undefined>;
581
+ readonly status: v.PicklistSchema<["open", "answered", "resolved", "dismissed", "recommend_requested"], undefined>;
582
+ readonly reply: v.NullableSchema<v.StringSchema<undefined>, undefined>;
583
+ }, undefined>, undefined>;
584
+ readonly incorporatedRequirements: v.NullableSchema<v.StringSchema<undefined>, undefined>;
585
+ }, undefined>, v.ObjectSchema<{
586
+ readonly kind: v.LiteralSchema<"fork", undefined>;
587
+ readonly status: v.PicklistSchema<["proposing", "awaiting_choice", "answering", "chosen", "single_path", "skipped"], undefined>;
588
+ readonly seamSummary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
589
+ readonly forks: v.ArraySchema<v.ObjectSchema<{
590
+ readonly id: v.StringSchema<undefined>;
591
+ readonly title: v.StringSchema<undefined>;
592
+ readonly summary: v.StringSchema<undefined>;
593
+ readonly approach: v.StringSchema<undefined>;
594
+ readonly tradeoffs: v.ArraySchema<v.StringSchema<undefined>, undefined>;
595
+ readonly riskNotes: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
596
+ readonly recommended: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
597
+ }, undefined>, undefined>;
598
+ }, undefined>], undefined>, undefined>;
599
+ }, undefined>;
600
+ };
601
+ };
602
+ //# sourceMappingURL=public-decisions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-decisions.d.ts","sourceRoot":"","sources":["../../src/routes/public-decisions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAqC,MAAM,yBAAyB,CAAA;AAC3F,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AA6B5B,iFAAiF;AACjF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKzC,CAAA;AAIF,mCAAmC;AACnC,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOxC,CAAA;AAEF,+EAA+E;AAC/E,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAO5C,CAAA;AAEF;;;;GAIG;AACH,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMnD,CAAA;AAEF,iEAAiE;AACjE,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMhD,CAAA;AAEF,mGAAmG;AACnG,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAM/C,CAAA;AAEF,4FAA4F;AAC5F,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMvD,CAAA;AAIF,mFAAmF;AACnF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMtC,CAAA"}