@osovv/vv-opencode 1.5.0 → 1.6.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 (91) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +39 -8
  3. package/dist/lib/agent-tool-catalog.d.ts +144 -0
  4. package/dist/lib/agent-tool-catalog.js +2551 -0
  5. package/dist/lib/agent-tool-catalog.js.map +1 -0
  6. package/dist/lib/agent-tool-contract.d.ts +200 -0
  7. package/dist/lib/agent-tool-contract.js +407 -0
  8. package/dist/lib/agent-tool-contract.js.map +1 -0
  9. package/dist/lib/workflow-contract.d.ts +12 -0
  10. package/dist/lib/workflow-contract.js +71 -18
  11. package/dist/lib/workflow-contract.js.map +1 -1
  12. package/dist/plugins/hashline-edit/index.js +102 -97
  13. package/dist/plugins/hashline-edit/index.js.map +1 -1
  14. package/dist/plugins/hashline-edit/normalize-edits.d.ts +2 -8
  15. package/dist/plugins/hashline-edit/normalize-edits.js +32 -17
  16. package/dist/plugins/hashline-edit/normalize-edits.js.map +1 -1
  17. package/dist/plugins/hashline-edit/schemas.d.ts +246 -0
  18. package/dist/plugins/hashline-edit/schemas.js +659 -0
  19. package/dist/plugins/hashline-edit/schemas.js.map +1 -0
  20. package/dist/plugins/hashline-edit/str-replace-editor.d.ts +6 -17
  21. package/dist/plugins/hashline-edit/str-replace-editor.js +19 -21
  22. package/dist/plugins/hashline-edit/str-replace-editor.js.map +1 -1
  23. package/dist/plugins/hashline-edit/tool-description.d.ts +1 -0
  24. package/dist/plugins/hashline-edit/tool-description.js +20 -4
  25. package/dist/plugins/hashline-edit/tool-description.js.map +1 -1
  26. package/dist/plugins/web-tools/fetch-service.d.ts +8 -5
  27. package/dist/plugins/web-tools/fetch-service.js +30 -45
  28. package/dist/plugins/web-tools/fetch-service.js.map +1 -1
  29. package/dist/plugins/web-tools/index.js +23 -5
  30. package/dist/plugins/web-tools/index.js.map +1 -1
  31. package/dist/plugins/web-tools/schemas.d.ts +469 -0
  32. package/dist/plugins/web-tools/schemas.js +523 -0
  33. package/dist/plugins/web-tools/schemas.js.map +1 -0
  34. package/dist/plugins/web-tools/search-service.d.ts +6 -3
  35. package/dist/plugins/web-tools/search-service.js +24 -29
  36. package/dist/plugins/web-tools/search-service.js.map +1 -1
  37. package/dist/plugins/workflow/authority.d.ts +6 -0
  38. package/dist/plugins/workflow/authority.js +45 -10
  39. package/dist/plugins/workflow/authority.js.map +1 -1
  40. package/dist/plugins/workflow/authorization.js +16 -8
  41. package/dist/plugins/workflow/authorization.js.map +1 -1
  42. package/dist/plugins/workflow/checkpoints.d.ts +41 -2
  43. package/dist/plugins/workflow/checkpoints.js +176 -47
  44. package/dist/plugins/workflow/checkpoints.js.map +1 -1
  45. package/dist/plugins/workflow/delegated.d.ts +15 -1
  46. package/dist/plugins/workflow/delegated.js +65 -35
  47. package/dist/plugins/workflow/delegated.js.map +1 -1
  48. package/dist/plugins/workflow/execution.d.ts +15 -30
  49. package/dist/plugins/workflow/execution.js +133 -33
  50. package/dist/plugins/workflow/execution.js.map +1 -1
  51. package/dist/plugins/workflow/index.js +177 -112
  52. package/dist/plugins/workflow/index.js.map +1 -1
  53. package/dist/plugins/workflow/input-validation.d.ts +48 -0
  54. package/dist/plugins/workflow/input-validation.js +536 -0
  55. package/dist/plugins/workflow/input-validation.js.map +1 -0
  56. package/dist/plugins/workflow/inspection.d.ts +60 -0
  57. package/dist/plugins/workflow/inspection.js +316 -0
  58. package/dist/plugins/workflow/inspection.js.map +1 -0
  59. package/dist/plugins/workflow/protocol.d.ts +2 -0
  60. package/dist/plugins/workflow/protocol.js +26 -4
  61. package/dist/plugins/workflow/protocol.js.map +1 -1
  62. package/dist/plugins/workflow/recovery.d.ts +2 -1
  63. package/dist/plugins/workflow/recovery.js +79 -12
  64. package/dist/plugins/workflow/recovery.js.map +1 -1
  65. package/dist/plugins/workflow/repair.d.ts +1 -1
  66. package/dist/plugins/workflow/repair.js +9 -10
  67. package/dist/plugins/workflow/repair.js.map +1 -1
  68. package/dist/plugins/workflow/results.d.ts +2566 -0
  69. package/dist/plugins/workflow/results.js +1111 -0
  70. package/dist/plugins/workflow/results.js.map +1 -0
  71. package/dist/plugins/workflow/schemas.d.ts +214 -24
  72. package/dist/plugins/workflow/schemas.js +350 -89
  73. package/dist/plugins/workflow/schemas.js.map +1 -1
  74. package/dist/plugins/workflow/state.d.ts +3 -2
  75. package/dist/plugins/workflow/state.js +15 -8
  76. package/dist/plugins/workflow/state.js.map +1 -1
  77. package/dist/plugins/workflow/system-instruction.md +17 -1
  78. package/dist/plugins/workflow/tooling.d.ts +2 -18
  79. package/dist/plugins/workflow/tooling.js +477 -460
  80. package/dist/plugins/workflow/tooling.js.map +1 -1
  81. package/dist/plugins/workflow/transactions.d.ts +13 -0
  82. package/dist/plugins/workflow/transactions.js +13 -3
  83. package/dist/plugins/workflow/transactions.js.map +1 -1
  84. package/package.json +6 -3
  85. package/schemas/vvoc/v3.json +1 -1
  86. package/templates/agents/vv-code-reviewer.md +13 -4
  87. package/templates/agents/vv-implementer.md +16 -9
  88. package/templates/agents/vv-spec-reviewer.md +13 -4
  89. package/templates/skills/vv-execute/SKILL.md +3 -3
  90. package/templates/skills/vv-execute/references/tool-contracts.md +1750 -0
  91. package/templates/skills/vv-review/SKILL.md +1 -1
@@ -0,0 +1,2566 @@
1
+ import type { z } from "zod";
2
+ import { type ContractIssue } from "../../lib/agent-tool-contract.js";
3
+ /**
4
+ * Documented finite bounds for failure diagnostics only. Success payloads,
5
+ * history, scope files, and batch arrays are never bounded here.
6
+ */
7
+ export declare const MAX_FAILURE_MESSAGE_CHARS: number;
8
+ export declare const MAX_FAILURE_FIELD_CHARS = 200;
9
+ /** Stable failure categories. Unrecognized owned codes classify as `state`. */
10
+ export declare const WORKFLOW_FAILURE_CATEGORIES: readonly ["input", "state", "authorization", "host_context", "persistence", "internal"];
11
+ export type WorkflowFailureCategory = (typeof WORKFLOW_FAILURE_CATEGORIES)[number];
12
+ /** Truthful post-side-effect outcome vocabulary; keep claims to what was observed. */
13
+ export declare const WORKFLOW_MUTATION_OUTCOMES: readonly ["committed", "not_applied", "rolled_back", "unknown"];
14
+ export type WorkflowMutationOutcome = (typeof WORKFLOW_MUTATION_OUTCOMES)[number];
15
+ /** Classify an existing workflow error code into a stable failure category. */
16
+ export declare function categoryForWorkflowErrorCode(errorCode: string): WorkflowFailureCategory;
17
+ interface WorkflowFailureGuidance {
18
+ readonly prerequisite?: string;
19
+ readonly nextAction?: string;
20
+ }
21
+ /** Bounded prerequisite/next-action guidance for a known failure family. */
22
+ export declare function failureGuidance(errorCode: string): WorkflowFailureGuidance | undefined;
23
+ /**
24
+ * Bound failure issues to the shared finite contract limits. Called by every
25
+ * failure constructor and by normalization so a caller cannot smuggle an
26
+ * unbounded issue list or oversized path/message into a public failure.
27
+ */
28
+ export declare function boundContractIssues(issues: readonly ContractIssue[]): readonly ContractIssue[];
29
+ /**
30
+ * Enumerated bounded public failure. `applied` is only asserted for known
31
+ * outcomes: omitted for `unknown` so an unknown outcome can never be read as
32
+ * "not applied".
33
+ */
34
+ export interface WorkflowFailure {
35
+ readonly ok: false;
36
+ readonly tool?: string;
37
+ readonly sessionId?: string;
38
+ readonly errorCode: string;
39
+ readonly category: WorkflowFailureCategory;
40
+ readonly message: string;
41
+ readonly issues?: readonly ContractIssue[];
42
+ readonly state?: string;
43
+ readonly attempt?: number;
44
+ readonly attemptStatus?: string;
45
+ readonly resultStatus?: string;
46
+ readonly attemptBudget?: number;
47
+ readonly remainingAttempts?: number;
48
+ readonly recoveryCount?: number;
49
+ readonly pendingReviewers?: readonly string[];
50
+ readonly prerequisite?: string;
51
+ readonly nextAction?: string;
52
+ readonly outcome?: WorkflowMutationOutcome;
53
+ readonly applied?: boolean;
54
+ readonly retrySafe?: boolean;
55
+ readonly existingWorkItemId?: string;
56
+ readonly runId?: string;
57
+ }
58
+ /**
59
+ * Record-compatible failure result for positions declared as
60
+ * `Record<string, unknown>`. The known fields are enumerated on
61
+ * `WorkflowFailure`; this alias only makes the bounded DTO storable in the
62
+ * generic result channel.
63
+ */
64
+ export type WorkflowFailureResult = WorkflowFailure & Record<string, unknown>;
65
+ /**
66
+ * Add a stable category and bounded guidance to one failure object without
67
+ * mutating it or parsing its message text. Existing errorCode and message are
68
+ * preserved; explicit caller-supplied category/guidance/context wins.
69
+ */
70
+ export declare function normalizeWorkflowFailure(failure: Record<string, unknown>): WorkflowFailureResult;
71
+ /**
72
+ * Normalize a public workflow result for output: failure envelopes (top-level
73
+ * and batch items) gain category/guidance, everything else is returned as-is.
74
+ * Input is never mutated. This is the producer-side representation step;
75
+ * `validateWorkflowToolResult` validates without repair.
76
+ */
77
+ export declare function normalizeWorkflowResult(value: unknown): unknown;
78
+ /** Producer-side finalization: typed identity wrapper around `normalizeWorkflowResult`. */
79
+ export declare function finalizeWorkflowResult<T>(value: T): T;
80
+ /** Bounded caller-input failure carrying the exact tokenized issues. */
81
+ export declare function workflowInputFailure(toolId: string, sessionId: string, issues: readonly ContractIssue[]): WorkflowFailureResult;
82
+ /**
83
+ * Trusted-host-context failure: a missing workspace root, plan loader, or
84
+ * authorization lookup is not a caller argument error.
85
+ */
86
+ export declare function workflowHostContextFailure(toolId: string, sessionId: string, message: string): WorkflowFailureResult;
87
+ /**
88
+ * Internal result-contract/serialization failure with the observed outcome.
89
+ * Never reported as caller input and never invites an unqualified replay. An
90
+ * `unknown` outcome omits `applied` entirely.
91
+ */
92
+ export declare function workflowInternalResultFailure(options: {
93
+ tool: string;
94
+ sessionId?: string;
95
+ message: string;
96
+ outcome: WorkflowMutationOutcome;
97
+ }): WorkflowFailureResult;
98
+ /**
99
+ * Thrown owned diagnostic carrying a stable code and category. The message is
100
+ * bounded for failure diagnostics while preserving its leading code/prefix.
101
+ */
102
+ export declare class WorkflowDiagnosticError extends Error {
103
+ readonly code: string;
104
+ readonly category: WorkflowFailureCategory;
105
+ readonly outcome?: WorkflowMutationOutcome;
106
+ constructor(code: string, category: WorkflowFailureCategory, message: string, outcome?: WorkflowMutationOutcome);
107
+ }
108
+ /** Generic failure schema; `tool` stays open so any owned tool can be validated. */
109
+ export declare const workflowFailureSchema: z.ZodObject<{
110
+ sessionId: z.ZodOptional<z.ZodString>;
111
+ ok: z.ZodLiteral<false>;
112
+ errorCode: z.ZodString;
113
+ category: z.ZodEnum<{
114
+ input: "input";
115
+ host_context: "host_context";
116
+ state: "state";
117
+ authorization: "authorization";
118
+ persistence: "persistence";
119
+ internal: "internal";
120
+ }>;
121
+ message: z.ZodString;
122
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
123
+ code: z.ZodEnum<{
124
+ unrecognized_keys: "unrecognized_keys";
125
+ invalid_value: "invalid_value";
126
+ invalid_type: "invalid_type";
127
+ invalid_format: "invalid_format";
128
+ too_small: "too_small";
129
+ too_big: "too_big";
130
+ missing_value: "missing_value";
131
+ invalid_union: "invalid_union";
132
+ custom: "custom";
133
+ }>;
134
+ path: z.ZodString;
135
+ message: z.ZodString;
136
+ expected: z.ZodOptional<z.ZodString>;
137
+ received: z.ZodOptional<z.ZodString>;
138
+ }, z.core.$strict>>>;
139
+ state: z.ZodOptional<z.ZodString>;
140
+ attempt: z.ZodOptional<z.ZodNumber>;
141
+ attemptStatus: z.ZodOptional<z.ZodString>;
142
+ resultStatus: z.ZodOptional<z.ZodString>;
143
+ attemptBudget: z.ZodOptional<z.ZodNumber>;
144
+ remainingAttempts: z.ZodOptional<z.ZodNumber>;
145
+ recoveryCount: z.ZodOptional<z.ZodNumber>;
146
+ pendingReviewers: z.ZodOptional<z.ZodArray<z.ZodString>>;
147
+ prerequisite: z.ZodOptional<z.ZodString>;
148
+ nextAction: z.ZodOptional<z.ZodString>;
149
+ outcome: z.ZodOptional<z.ZodEnum<{
150
+ unknown: "unknown";
151
+ committed: "committed";
152
+ not_applied: "not_applied";
153
+ rolled_back: "rolled_back";
154
+ }>>;
155
+ applied: z.ZodOptional<z.ZodBoolean>;
156
+ retrySafe: z.ZodOptional<z.ZodBoolean>;
157
+ existingWorkItemId: z.ZodOptional<z.ZodString>;
158
+ runId: z.ZodOptional<z.ZodString>;
159
+ tool: z.ZodString;
160
+ }, z.core.$strict>;
161
+ declare const workItemViewSchema: z.ZodObject<{
162
+ workItemId: z.ZodString;
163
+ header: z.ZodString;
164
+ key: z.ZodString;
165
+ title: z.ZodString;
166
+ mode: z.ZodEnum<{
167
+ delegated: "delegated";
168
+ implementation: "implementation";
169
+ review_only: "review_only";
170
+ }>;
171
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
172
+ spec: "spec";
173
+ code: "code";
174
+ }>>;
175
+ state: z.ZodEnum<{
176
+ open: "open";
177
+ awaiting_implementer: "awaiting_implementer";
178
+ awaiting_reviews: "awaiting_reviews";
179
+ awaiting_acceptance: "awaiting_acceptance";
180
+ needs_context: "needs_context";
181
+ blocked: "blocked";
182
+ ready_to_close: "ready_to_close";
183
+ closed: "closed";
184
+ }>;
185
+ specReviewCount: z.ZodNumber;
186
+ codeReviewCount: z.ZodNumber;
187
+ reviewRound: z.ZodNumber;
188
+ currentRound: z.ZodOptional<z.ZodObject<{
189
+ round: z.ZodNumber;
190
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
191
+ spec: "spec";
192
+ code: "code";
193
+ }>>;
194
+ pendingReviewers: z.ZodArray<z.ZodEnum<{
195
+ spec: "spec";
196
+ code: "code";
197
+ }>>;
198
+ inFlightReviewers: z.ZodArray<z.ZodEnum<{
199
+ spec: "spec";
200
+ code: "code";
201
+ }>>;
202
+ completedReviewers: z.ZodArray<z.ZodEnum<{
203
+ spec: "spec";
204
+ code: "code";
205
+ }>>;
206
+ results: z.ZodObject<{
207
+ spec: z.ZodOptional<z.ZodObject<{
208
+ reviewer: z.ZodEnum<{
209
+ spec: "spec";
210
+ code: "code";
211
+ }>;
212
+ agent: z.ZodEnum<{
213
+ "vv-spec-reviewer": "vv-spec-reviewer";
214
+ "vv-code-reviewer": "vv-code-reviewer";
215
+ }>;
216
+ status: z.ZodEnum<{
217
+ FAIL: "FAIL";
218
+ NEEDS_CONTEXT: "NEEDS_CONTEXT";
219
+ PASS: "PASS";
220
+ }>;
221
+ completedAt: z.ZodString;
222
+ resultExcerpt: z.ZodOptional<z.ZodObject<{
223
+ source: z.ZodEnum<{
224
+ parsed_body: "parsed_body";
225
+ normalized_output: "normalized_output";
226
+ }>;
227
+ text: z.ZodString;
228
+ truncated: z.ZodBoolean;
229
+ originalLength: z.ZodNumber;
230
+ maxLength: z.ZodNumber;
231
+ }, z.core.$strict>>;
232
+ }, z.core.$strict>>;
233
+ code: z.ZodOptional<z.ZodObject<{
234
+ reviewer: z.ZodEnum<{
235
+ spec: "spec";
236
+ code: "code";
237
+ }>;
238
+ agent: z.ZodEnum<{
239
+ "vv-spec-reviewer": "vv-spec-reviewer";
240
+ "vv-code-reviewer": "vv-code-reviewer";
241
+ }>;
242
+ status: z.ZodEnum<{
243
+ FAIL: "FAIL";
244
+ NEEDS_CONTEXT: "NEEDS_CONTEXT";
245
+ PASS: "PASS";
246
+ }>;
247
+ completedAt: z.ZodString;
248
+ resultExcerpt: z.ZodOptional<z.ZodObject<{
249
+ source: z.ZodEnum<{
250
+ parsed_body: "parsed_body";
251
+ normalized_output: "normalized_output";
252
+ }>;
253
+ text: z.ZodString;
254
+ truncated: z.ZodBoolean;
255
+ originalLength: z.ZodNumber;
256
+ maxLength: z.ZodNumber;
257
+ }, z.core.$strict>>;
258
+ }, z.core.$strict>>;
259
+ }, z.core.$strict>;
260
+ status: z.ZodEnum<{
261
+ active: "active";
262
+ completed: "completed";
263
+ }>;
264
+ createdAt: z.ZodString;
265
+ completedAt: z.ZodOptional<z.ZodString>;
266
+ }, z.core.$strict>>;
267
+ resultExcerpt: z.ZodOptional<z.ZodObject<{
268
+ source: z.ZodEnum<{
269
+ parsed_body: "parsed_body";
270
+ normalized_output: "normalized_output";
271
+ }>;
272
+ text: z.ZodString;
273
+ truncated: z.ZodBoolean;
274
+ originalLength: z.ZodNumber;
275
+ maxLength: z.ZodNumber;
276
+ }, z.core.$strict>>;
277
+ completedReviewRoundCount: z.ZodNumber;
278
+ createdAt: z.ZodString;
279
+ updatedAt: z.ZodString;
280
+ closedAt: z.ZodOptional<z.ZodString>;
281
+ delegated: z.ZodOptional<z.ZodObject<{
282
+ writeScope: z.ZodArray<z.ZodString>;
283
+ planRunId: z.ZodOptional<z.ZodString>;
284
+ planTaskId: z.ZodOptional<z.ZodString>;
285
+ attempts: z.ZodNumber;
286
+ inFlightAttempt: z.ZodBoolean;
287
+ decisions: z.ZodNumber;
288
+ accepted: z.ZodBoolean;
289
+ acceptedAttempt: z.ZodOptional<z.ZodNumber>;
290
+ reworkCount: z.ZodNumber;
291
+ attemptBudget: z.ZodNumber;
292
+ remainingAttempts: z.ZodNumber;
293
+ recoveryCount: z.ZodNumber;
294
+ autonomousGrantConsumed: z.ZodBoolean;
295
+ reportRejectionCount: z.ZodNumber;
296
+ nextAction: z.ZodEnum<{
297
+ closed: "closed";
298
+ launch_implementer: "launch_implementer";
299
+ await_result: "await_result";
300
+ decide: "decide";
301
+ recover: "recover";
302
+ recover_with_user_authorization: "recover_with_user_authorization";
303
+ launch_blocked: "launch_blocked";
304
+ close: "close";
305
+ }>;
306
+ latestAttempt: z.ZodOptional<z.ZodObject<{
307
+ attempt: z.ZodNumber;
308
+ status: z.ZodEnum<{
309
+ completed: "completed";
310
+ in_flight: "in_flight";
311
+ failed: "failed";
312
+ report_rejected: "report_rejected";
313
+ }>;
314
+ resultStatus: z.ZodOptional<z.ZodEnum<{
315
+ DONE: "DONE";
316
+ DONE_WITH_CONCERNS: "DONE_WITH_CONCERNS";
317
+ NEEDS_CONTEXT: "NEEDS_CONTEXT";
318
+ BLOCKED: "BLOCKED";
319
+ }>>;
320
+ completedAt: z.ZodOptional<z.ZodString>;
321
+ reportRejected: z.ZodBoolean;
322
+ }, z.core.$strict>>;
323
+ guidance: z.ZodOptional<z.ZodObject<{
324
+ nextAction: z.ZodEnum<{
325
+ closed: "closed";
326
+ launch_implementer: "launch_implementer";
327
+ await_result: "await_result";
328
+ decide: "decide";
329
+ recover: "recover";
330
+ recover_with_user_authorization: "recover_with_user_authorization";
331
+ launch_blocked: "launch_blocked";
332
+ close: "close";
333
+ }>;
334
+ launchEligible: z.ZodBoolean;
335
+ blockers: z.ZodArray<z.ZodString>;
336
+ prerequisites: z.ZodArray<z.ZodString>;
337
+ requiresConcernsDisposition: z.ZodBoolean;
338
+ }, z.core.$strict>>;
339
+ }, z.core.$strict>>;
340
+ }, z.core.$strict>;
341
+ declare const executionViewSchema: z.ZodObject<{
342
+ runId: z.ZodString;
343
+ sessionId: z.ZodString;
344
+ executionKey: z.ZodString;
345
+ sourceKind: z.ZodEnum<{
346
+ "native-package": "native-package";
347
+ "provided-plan": "provided-plan";
348
+ "conversation-scoped": "conversation-scoped";
349
+ }>;
350
+ goal: z.ZodString;
351
+ state: z.ZodEnum<{
352
+ preparing: "preparing";
353
+ active: "active";
354
+ sealed: "sealed";
355
+ }>;
356
+ revision: z.ZodNumber;
357
+ tasks: z.ZodArray<z.ZodObject<{
358
+ taskId: z.ZodString;
359
+ workItemId: z.ZodString;
360
+ status: z.ZodEnum<{
361
+ pending: "pending";
362
+ launched: "launched";
363
+ accepted: "accepted";
364
+ superseded: "superseded";
365
+ }>;
366
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
367
+ spec: "spec";
368
+ code: "code";
369
+ }>>;
370
+ dependsOn: z.ZodArray<z.ZodString>;
371
+ blockedBy: z.ZodArray<z.ZodString>;
372
+ latestAttempt: z.ZodOptional<z.ZodObject<{
373
+ attempt: z.ZodNumber;
374
+ status: z.ZodEnum<{
375
+ completed: "completed";
376
+ in_flight: "in_flight";
377
+ failed: "failed";
378
+ report_rejected: "report_rejected";
379
+ }>;
380
+ resultStatus: z.ZodOptional<z.ZodEnum<{
381
+ DONE: "DONE";
382
+ DONE_WITH_CONCERNS: "DONE_WITH_CONCERNS";
383
+ NEEDS_CONTEXT: "NEEDS_CONTEXT";
384
+ BLOCKED: "BLOCKED";
385
+ }>>;
386
+ completedAt: z.ZodOptional<z.ZodString>;
387
+ reportRejected: z.ZodBoolean;
388
+ }, z.core.$strict>>;
389
+ }, z.core.$strict>>;
390
+ checkpoints: z.ZodArray<z.ZodObject<{
391
+ checkpointId: z.ZodString;
392
+ kind: z.ZodEnum<{
393
+ milestone: "milestone";
394
+ final: "final";
395
+ }>;
396
+ covers: z.ZodArray<z.ZodString>;
397
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
398
+ spec: "spec";
399
+ code: "code";
400
+ }>>;
401
+ status: z.ZodOptional<z.ZodString>;
402
+ reviewWorkItemId: z.ZodOptional<z.ZodString>;
403
+ generation: z.ZodOptional<z.ZodNumber>;
404
+ recoveryCount: z.ZodOptional<z.ZodNumber>;
405
+ attempts: z.ZodOptional<z.ZodNumber>;
406
+ generationBudget: z.ZodOptional<z.ZodNumber>;
407
+ remainingGenerations: z.ZodOptional<z.ZodNumber>;
408
+ lastOutcome: z.ZodOptional<z.ZodEnum<{
409
+ failed: "failed";
410
+ passed: "passed";
411
+ stale: "stale";
412
+ stopped: "stopped";
413
+ incomplete: "incomplete";
414
+ }>>;
415
+ nextAction: z.ZodOptional<z.ZodEnum<{
416
+ start: "start";
417
+ blocked: "blocked";
418
+ recover: "recover";
419
+ recover_with_user_authorization: "recover_with_user_authorization";
420
+ passed: "passed";
421
+ collect_and_verify: "collect_and_verify";
422
+ start_next_generation: "start_next_generation";
423
+ }>>;
424
+ prerequisite: z.ZodOptional<z.ZodString>;
425
+ currentReview: z.ZodOptional<z.ZodObject<{
426
+ reviewWorkItemId: z.ZodString;
427
+ generation: z.ZodNumber;
428
+ coveredAttemptIds: z.ZodArray<z.ZodString>;
429
+ recordedReviewers: z.ZodArray<z.ZodString>;
430
+ }, z.core.$strict>>;
431
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
432
+ generation: z.ZodNumber;
433
+ outcome: z.ZodEnum<{
434
+ failed: "failed";
435
+ passed: "passed";
436
+ stale: "stale";
437
+ stopped: "stopped";
438
+ }>;
439
+ completedAt: z.ZodString;
440
+ }, z.core.$strict>>>;
441
+ }, z.core.$strict>>;
442
+ authority: z.ZodOptional<z.ZodArray<z.ZodObject<{
443
+ authorityId: z.ZodString;
444
+ availableUnits: z.ZodNumber;
445
+ revoked: z.ZodBoolean;
446
+ stages: z.ZodArray<z.ZodEnum<{
447
+ implementation: "implementation";
448
+ specification: "specification";
449
+ planning: "planning";
450
+ verification: "verification";
451
+ }>>;
452
+ reservedStops: z.ZodArray<z.ZodEnum<{
453
+ implementation: "implementation";
454
+ specification: "specification";
455
+ planning: "planning";
456
+ verification: "verification";
457
+ }>>;
458
+ prerequisites: z.ZodArray<z.ZodString>;
459
+ }, z.core.$strict>>>;
460
+ }, z.core.$strict>;
461
+ declare const delegatedRunViewSchema: z.ZodObject<{
462
+ runId: z.ZodString;
463
+ sessionId: z.ZodString;
464
+ planPath: z.ZodString;
465
+ specPath: z.ZodString;
466
+ workspaceRoot: z.ZodString;
467
+ status: z.ZodEnum<{
468
+ active: "active";
469
+ sealed: "sealed";
470
+ }>;
471
+ registeredAt: z.ZodString;
472
+ sealedAt: z.ZodOptional<z.ZodString>;
473
+ finalCheckpointId: z.ZodOptional<z.ZodString>;
474
+ tasks: z.ZodArray<z.ZodObject<{
475
+ taskId: z.ZodString;
476
+ workItemId: z.ZodString;
477
+ }, z.core.$strict>>;
478
+ checkpoints: z.ZodArray<z.ZodObject<{
479
+ checkpointId: z.ZodString;
480
+ kind: z.ZodEnum<{
481
+ milestone: "milestone";
482
+ final: "final";
483
+ }>;
484
+ afterWave: z.ZodString;
485
+ covers: z.ZodArray<z.ZodString>;
486
+ scope: z.ZodArray<z.ZodString>;
487
+ reviewers: z.ZodArray<z.ZodEnum<{
488
+ spec: "spec";
489
+ code: "code";
490
+ }>>;
491
+ status: z.ZodEnum<{
492
+ pending: "pending";
493
+ failed: "failed";
494
+ in_review: "in_review";
495
+ passed: "passed";
496
+ }>;
497
+ attempts: z.ZodNumber;
498
+ lastOutcome: z.ZodOptional<z.ZodEnum<{
499
+ failed: "failed";
500
+ passed: "passed";
501
+ stale: "stale";
502
+ stopped: "stopped";
503
+ incomplete: "incomplete";
504
+ }>>;
505
+ generationBudget: z.ZodNumber;
506
+ remainingGenerations: z.ZodNumber;
507
+ recoveryCount: z.ZodNumber;
508
+ nextAction: z.ZodEnum<{
509
+ start: "start";
510
+ blocked: "blocked";
511
+ recover: "recover";
512
+ recover_with_user_authorization: "recover_with_user_authorization";
513
+ passed: "passed";
514
+ collect_and_verify: "collect_and_verify";
515
+ start_next_generation: "start_next_generation";
516
+ }>;
517
+ prerequisite: z.ZodOptional<z.ZodString>;
518
+ currentReview: z.ZodOptional<z.ZodObject<{
519
+ reviewWorkItemId: z.ZodString;
520
+ generation: z.ZodNumber;
521
+ coveredAttemptIds: z.ZodArray<z.ZodString>;
522
+ recordedReviewers: z.ZodArray<z.ZodString>;
523
+ }, z.core.$strict>>;
524
+ history: z.ZodArray<z.ZodObject<{
525
+ generation: z.ZodNumber;
526
+ outcome: z.ZodEnum<{
527
+ failed: "failed";
528
+ passed: "passed";
529
+ stale: "stale";
530
+ stopped: "stopped";
531
+ }>;
532
+ fingerprint: z.ZodString;
533
+ completedAt: z.ZodString;
534
+ }, z.core.$strict>>;
535
+ }, z.core.$strict>>;
536
+ }, z.core.$strict>;
537
+ declare const workflowContractIdentitySchema: z.ZodObject<{
538
+ packageName: z.ZodString;
539
+ packageVersion: z.ZodString;
540
+ toolContractRevision: z.ZodString;
541
+ referencePath: z.ZodString;
542
+ }, z.core.$strict>;
543
+ declare const workItemListViewSchema: z.ZodObject<{
544
+ tool: z.ZodLiteral<"work_item_list">;
545
+ sessionId: z.ZodString;
546
+ includeClosed: z.ZodBoolean;
547
+ items: z.ZodArray<z.ZodObject<{
548
+ workItemId: z.ZodString;
549
+ header: z.ZodString;
550
+ key: z.ZodString;
551
+ title: z.ZodString;
552
+ mode: z.ZodEnum<{
553
+ delegated: "delegated";
554
+ implementation: "implementation";
555
+ review_only: "review_only";
556
+ }>;
557
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
558
+ spec: "spec";
559
+ code: "code";
560
+ }>>;
561
+ state: z.ZodEnum<{
562
+ open: "open";
563
+ awaiting_implementer: "awaiting_implementer";
564
+ awaiting_reviews: "awaiting_reviews";
565
+ awaiting_acceptance: "awaiting_acceptance";
566
+ needs_context: "needs_context";
567
+ blocked: "blocked";
568
+ ready_to_close: "ready_to_close";
569
+ closed: "closed";
570
+ }>;
571
+ specReviewCount: z.ZodNumber;
572
+ codeReviewCount: z.ZodNumber;
573
+ reviewRound: z.ZodNumber;
574
+ currentRound: z.ZodOptional<z.ZodObject<{
575
+ round: z.ZodNumber;
576
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
577
+ spec: "spec";
578
+ code: "code";
579
+ }>>;
580
+ pendingReviewers: z.ZodArray<z.ZodEnum<{
581
+ spec: "spec";
582
+ code: "code";
583
+ }>>;
584
+ inFlightReviewers: z.ZodArray<z.ZodEnum<{
585
+ spec: "spec";
586
+ code: "code";
587
+ }>>;
588
+ completedReviewers: z.ZodArray<z.ZodEnum<{
589
+ spec: "spec";
590
+ code: "code";
591
+ }>>;
592
+ results: z.ZodObject<{
593
+ spec: z.ZodOptional<z.ZodObject<{
594
+ reviewer: z.ZodEnum<{
595
+ spec: "spec";
596
+ code: "code";
597
+ }>;
598
+ agent: z.ZodEnum<{
599
+ "vv-spec-reviewer": "vv-spec-reviewer";
600
+ "vv-code-reviewer": "vv-code-reviewer";
601
+ }>;
602
+ status: z.ZodEnum<{
603
+ FAIL: "FAIL";
604
+ NEEDS_CONTEXT: "NEEDS_CONTEXT";
605
+ PASS: "PASS";
606
+ }>;
607
+ completedAt: z.ZodString;
608
+ resultExcerpt: z.ZodOptional<z.ZodObject<{
609
+ source: z.ZodEnum<{
610
+ parsed_body: "parsed_body";
611
+ normalized_output: "normalized_output";
612
+ }>;
613
+ text: z.ZodString;
614
+ truncated: z.ZodBoolean;
615
+ originalLength: z.ZodNumber;
616
+ maxLength: z.ZodNumber;
617
+ }, z.core.$strict>>;
618
+ }, z.core.$strict>>;
619
+ code: z.ZodOptional<z.ZodObject<{
620
+ reviewer: z.ZodEnum<{
621
+ spec: "spec";
622
+ code: "code";
623
+ }>;
624
+ agent: z.ZodEnum<{
625
+ "vv-spec-reviewer": "vv-spec-reviewer";
626
+ "vv-code-reviewer": "vv-code-reviewer";
627
+ }>;
628
+ status: z.ZodEnum<{
629
+ FAIL: "FAIL";
630
+ NEEDS_CONTEXT: "NEEDS_CONTEXT";
631
+ PASS: "PASS";
632
+ }>;
633
+ completedAt: z.ZodString;
634
+ resultExcerpt: z.ZodOptional<z.ZodObject<{
635
+ source: z.ZodEnum<{
636
+ parsed_body: "parsed_body";
637
+ normalized_output: "normalized_output";
638
+ }>;
639
+ text: z.ZodString;
640
+ truncated: z.ZodBoolean;
641
+ originalLength: z.ZodNumber;
642
+ maxLength: z.ZodNumber;
643
+ }, z.core.$strict>>;
644
+ }, z.core.$strict>>;
645
+ }, z.core.$strict>;
646
+ status: z.ZodEnum<{
647
+ active: "active";
648
+ completed: "completed";
649
+ }>;
650
+ createdAt: z.ZodString;
651
+ completedAt: z.ZodOptional<z.ZodString>;
652
+ }, z.core.$strict>>;
653
+ resultExcerpt: z.ZodOptional<z.ZodObject<{
654
+ source: z.ZodEnum<{
655
+ parsed_body: "parsed_body";
656
+ normalized_output: "normalized_output";
657
+ }>;
658
+ text: z.ZodString;
659
+ truncated: z.ZodBoolean;
660
+ originalLength: z.ZodNumber;
661
+ maxLength: z.ZodNumber;
662
+ }, z.core.$strict>>;
663
+ completedReviewRoundCount: z.ZodNumber;
664
+ createdAt: z.ZodString;
665
+ updatedAt: z.ZodString;
666
+ closedAt: z.ZodOptional<z.ZodString>;
667
+ delegated: z.ZodOptional<z.ZodObject<{
668
+ writeScope: z.ZodArray<z.ZodString>;
669
+ planRunId: z.ZodOptional<z.ZodString>;
670
+ planTaskId: z.ZodOptional<z.ZodString>;
671
+ attempts: z.ZodNumber;
672
+ inFlightAttempt: z.ZodBoolean;
673
+ decisions: z.ZodNumber;
674
+ accepted: z.ZodBoolean;
675
+ acceptedAttempt: z.ZodOptional<z.ZodNumber>;
676
+ reworkCount: z.ZodNumber;
677
+ attemptBudget: z.ZodNumber;
678
+ remainingAttempts: z.ZodNumber;
679
+ recoveryCount: z.ZodNumber;
680
+ autonomousGrantConsumed: z.ZodBoolean;
681
+ reportRejectionCount: z.ZodNumber;
682
+ nextAction: z.ZodEnum<{
683
+ closed: "closed";
684
+ launch_implementer: "launch_implementer";
685
+ await_result: "await_result";
686
+ decide: "decide";
687
+ recover: "recover";
688
+ recover_with_user_authorization: "recover_with_user_authorization";
689
+ launch_blocked: "launch_blocked";
690
+ close: "close";
691
+ }>;
692
+ latestAttempt: z.ZodOptional<z.ZodObject<{
693
+ attempt: z.ZodNumber;
694
+ status: z.ZodEnum<{
695
+ completed: "completed";
696
+ in_flight: "in_flight";
697
+ failed: "failed";
698
+ report_rejected: "report_rejected";
699
+ }>;
700
+ resultStatus: z.ZodOptional<z.ZodEnum<{
701
+ DONE: "DONE";
702
+ DONE_WITH_CONCERNS: "DONE_WITH_CONCERNS";
703
+ NEEDS_CONTEXT: "NEEDS_CONTEXT";
704
+ BLOCKED: "BLOCKED";
705
+ }>>;
706
+ completedAt: z.ZodOptional<z.ZodString>;
707
+ reportRejected: z.ZodBoolean;
708
+ }, z.core.$strict>>;
709
+ guidance: z.ZodOptional<z.ZodObject<{
710
+ nextAction: z.ZodEnum<{
711
+ closed: "closed";
712
+ launch_implementer: "launch_implementer";
713
+ await_result: "await_result";
714
+ decide: "decide";
715
+ recover: "recover";
716
+ recover_with_user_authorization: "recover_with_user_authorization";
717
+ launch_blocked: "launch_blocked";
718
+ close: "close";
719
+ }>;
720
+ launchEligible: z.ZodBoolean;
721
+ blockers: z.ZodArray<z.ZodString>;
722
+ prerequisites: z.ZodArray<z.ZodString>;
723
+ requiresConcernsDisposition: z.ZodBoolean;
724
+ }, z.core.$strict>>;
725
+ }, z.core.$strict>>;
726
+ }, z.core.$strict>>;
727
+ planRuns: z.ZodOptional<z.ZodArray<z.ZodObject<{
728
+ runId: z.ZodString;
729
+ sessionId: z.ZodString;
730
+ planPath: z.ZodString;
731
+ specPath: z.ZodString;
732
+ workspaceRoot: z.ZodString;
733
+ status: z.ZodEnum<{
734
+ active: "active";
735
+ sealed: "sealed";
736
+ }>;
737
+ registeredAt: z.ZodString;
738
+ sealedAt: z.ZodOptional<z.ZodString>;
739
+ finalCheckpointId: z.ZodOptional<z.ZodString>;
740
+ tasks: z.ZodArray<z.ZodObject<{
741
+ taskId: z.ZodString;
742
+ workItemId: z.ZodString;
743
+ }, z.core.$strict>>;
744
+ checkpoints: z.ZodArray<z.ZodObject<{
745
+ checkpointId: z.ZodString;
746
+ kind: z.ZodEnum<{
747
+ milestone: "milestone";
748
+ final: "final";
749
+ }>;
750
+ afterWave: z.ZodString;
751
+ covers: z.ZodArray<z.ZodString>;
752
+ scope: z.ZodArray<z.ZodString>;
753
+ reviewers: z.ZodArray<z.ZodEnum<{
754
+ spec: "spec";
755
+ code: "code";
756
+ }>>;
757
+ status: z.ZodEnum<{
758
+ pending: "pending";
759
+ failed: "failed";
760
+ in_review: "in_review";
761
+ passed: "passed";
762
+ }>;
763
+ attempts: z.ZodNumber;
764
+ lastOutcome: z.ZodOptional<z.ZodEnum<{
765
+ failed: "failed";
766
+ passed: "passed";
767
+ stale: "stale";
768
+ stopped: "stopped";
769
+ incomplete: "incomplete";
770
+ }>>;
771
+ generationBudget: z.ZodNumber;
772
+ remainingGenerations: z.ZodNumber;
773
+ recoveryCount: z.ZodNumber;
774
+ nextAction: z.ZodEnum<{
775
+ start: "start";
776
+ blocked: "blocked";
777
+ recover: "recover";
778
+ recover_with_user_authorization: "recover_with_user_authorization";
779
+ passed: "passed";
780
+ collect_and_verify: "collect_and_verify";
781
+ start_next_generation: "start_next_generation";
782
+ }>;
783
+ prerequisite: z.ZodOptional<z.ZodString>;
784
+ currentReview: z.ZodOptional<z.ZodObject<{
785
+ reviewWorkItemId: z.ZodString;
786
+ generation: z.ZodNumber;
787
+ coveredAttemptIds: z.ZodArray<z.ZodString>;
788
+ recordedReviewers: z.ZodArray<z.ZodString>;
789
+ }, z.core.$strict>>;
790
+ history: z.ZodArray<z.ZodObject<{
791
+ generation: z.ZodNumber;
792
+ outcome: z.ZodEnum<{
793
+ failed: "failed";
794
+ passed: "passed";
795
+ stale: "stale";
796
+ stopped: "stopped";
797
+ }>;
798
+ fingerprint: z.ZodString;
799
+ completedAt: z.ZodString;
800
+ }, z.core.$strict>>;
801
+ }, z.core.$strict>>;
802
+ }, z.core.$strict>>>;
803
+ executions: z.ZodOptional<z.ZodArray<z.ZodObject<{
804
+ runId: z.ZodString;
805
+ sessionId: z.ZodString;
806
+ executionKey: z.ZodString;
807
+ sourceKind: z.ZodEnum<{
808
+ "native-package": "native-package";
809
+ "provided-plan": "provided-plan";
810
+ "conversation-scoped": "conversation-scoped";
811
+ }>;
812
+ goal: z.ZodString;
813
+ state: z.ZodEnum<{
814
+ preparing: "preparing";
815
+ active: "active";
816
+ sealed: "sealed";
817
+ }>;
818
+ revision: z.ZodNumber;
819
+ tasks: z.ZodArray<z.ZodObject<{
820
+ taskId: z.ZodString;
821
+ workItemId: z.ZodString;
822
+ status: z.ZodEnum<{
823
+ pending: "pending";
824
+ launched: "launched";
825
+ accepted: "accepted";
826
+ superseded: "superseded";
827
+ }>;
828
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
829
+ spec: "spec";
830
+ code: "code";
831
+ }>>;
832
+ dependsOn: z.ZodArray<z.ZodString>;
833
+ blockedBy: z.ZodArray<z.ZodString>;
834
+ latestAttempt: z.ZodOptional<z.ZodObject<{
835
+ attempt: z.ZodNumber;
836
+ status: z.ZodEnum<{
837
+ completed: "completed";
838
+ in_flight: "in_flight";
839
+ failed: "failed";
840
+ report_rejected: "report_rejected";
841
+ }>;
842
+ resultStatus: z.ZodOptional<z.ZodEnum<{
843
+ DONE: "DONE";
844
+ DONE_WITH_CONCERNS: "DONE_WITH_CONCERNS";
845
+ NEEDS_CONTEXT: "NEEDS_CONTEXT";
846
+ BLOCKED: "BLOCKED";
847
+ }>>;
848
+ completedAt: z.ZodOptional<z.ZodString>;
849
+ reportRejected: z.ZodBoolean;
850
+ }, z.core.$strict>>;
851
+ }, z.core.$strict>>;
852
+ checkpoints: z.ZodArray<z.ZodObject<{
853
+ checkpointId: z.ZodString;
854
+ kind: z.ZodEnum<{
855
+ milestone: "milestone";
856
+ final: "final";
857
+ }>;
858
+ covers: z.ZodArray<z.ZodString>;
859
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
860
+ spec: "spec";
861
+ code: "code";
862
+ }>>;
863
+ status: z.ZodOptional<z.ZodString>;
864
+ reviewWorkItemId: z.ZodOptional<z.ZodString>;
865
+ generation: z.ZodOptional<z.ZodNumber>;
866
+ recoveryCount: z.ZodOptional<z.ZodNumber>;
867
+ attempts: z.ZodOptional<z.ZodNumber>;
868
+ generationBudget: z.ZodOptional<z.ZodNumber>;
869
+ remainingGenerations: z.ZodOptional<z.ZodNumber>;
870
+ lastOutcome: z.ZodOptional<z.ZodEnum<{
871
+ failed: "failed";
872
+ passed: "passed";
873
+ stale: "stale";
874
+ stopped: "stopped";
875
+ incomplete: "incomplete";
876
+ }>>;
877
+ nextAction: z.ZodOptional<z.ZodEnum<{
878
+ start: "start";
879
+ blocked: "blocked";
880
+ recover: "recover";
881
+ recover_with_user_authorization: "recover_with_user_authorization";
882
+ passed: "passed";
883
+ collect_and_verify: "collect_and_verify";
884
+ start_next_generation: "start_next_generation";
885
+ }>>;
886
+ prerequisite: z.ZodOptional<z.ZodString>;
887
+ currentReview: z.ZodOptional<z.ZodObject<{
888
+ reviewWorkItemId: z.ZodString;
889
+ generation: z.ZodNumber;
890
+ coveredAttemptIds: z.ZodArray<z.ZodString>;
891
+ recordedReviewers: z.ZodArray<z.ZodString>;
892
+ }, z.core.$strict>>;
893
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
894
+ generation: z.ZodNumber;
895
+ outcome: z.ZodEnum<{
896
+ failed: "failed";
897
+ passed: "passed";
898
+ stale: "stale";
899
+ stopped: "stopped";
900
+ }>;
901
+ completedAt: z.ZodString;
902
+ }, z.core.$strict>>>;
903
+ }, z.core.$strict>>;
904
+ authority: z.ZodOptional<z.ZodArray<z.ZodObject<{
905
+ authorityId: z.ZodString;
906
+ availableUnits: z.ZodNumber;
907
+ revoked: z.ZodBoolean;
908
+ stages: z.ZodArray<z.ZodEnum<{
909
+ implementation: "implementation";
910
+ specification: "specification";
911
+ planning: "planning";
912
+ verification: "verification";
913
+ }>>;
914
+ reservedStops: z.ZodArray<z.ZodEnum<{
915
+ implementation: "implementation";
916
+ specification: "specification";
917
+ planning: "planning";
918
+ verification: "verification";
919
+ }>>;
920
+ prerequisites: z.ZodArray<z.ZodString>;
921
+ }, z.core.$strict>>>;
922
+ }, z.core.$strict>>>;
923
+ contract: z.ZodObject<{
924
+ packageName: z.ZodString;
925
+ packageVersion: z.ZodString;
926
+ toolContractRevision: z.ZodString;
927
+ referencePath: z.ZodString;
928
+ }, z.core.$strict>;
929
+ }, z.core.$strict>;
930
+ /** Closed per-tool result schema map; exported for inspection/catalog consumers. */
931
+ export declare const workflowToolResultSchemas: {
932
+ readonly work_item_open: z.ZodUnion<readonly [z.ZodObject<{
933
+ tool: z.ZodLiteral<"work_item_open">;
934
+ sessionId: z.ZodString;
935
+ items: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
936
+ ok: z.ZodLiteral<true>;
937
+ reused: z.ZodBoolean;
938
+ workItemId: z.ZodString;
939
+ header: z.ZodString;
940
+ key: z.ZodString;
941
+ title: z.ZodString;
942
+ mode: z.ZodEnum<{
943
+ delegated: "delegated";
944
+ implementation: "implementation";
945
+ review_only: "review_only";
946
+ }>;
947
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
948
+ spec: "spec";
949
+ code: "code";
950
+ }>>;
951
+ state: z.ZodEnum<{
952
+ open: "open";
953
+ awaiting_implementer: "awaiting_implementer";
954
+ awaiting_reviews: "awaiting_reviews";
955
+ awaiting_acceptance: "awaiting_acceptance";
956
+ needs_context: "needs_context";
957
+ blocked: "blocked";
958
+ ready_to_close: "ready_to_close";
959
+ closed: "closed";
960
+ }>;
961
+ specReviewCount: z.ZodNumber;
962
+ codeReviewCount: z.ZodNumber;
963
+ reviewRound: z.ZodNumber;
964
+ currentRound: z.ZodOptional<z.ZodObject<{
965
+ round: z.ZodNumber;
966
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
967
+ spec: "spec";
968
+ code: "code";
969
+ }>>;
970
+ pendingReviewers: z.ZodArray<z.ZodEnum<{
971
+ spec: "spec";
972
+ code: "code";
973
+ }>>;
974
+ inFlightReviewers: z.ZodArray<z.ZodEnum<{
975
+ spec: "spec";
976
+ code: "code";
977
+ }>>;
978
+ completedReviewers: z.ZodArray<z.ZodEnum<{
979
+ spec: "spec";
980
+ code: "code";
981
+ }>>;
982
+ results: z.ZodObject<{
983
+ spec: z.ZodOptional<z.ZodObject<{
984
+ reviewer: z.ZodEnum<{
985
+ spec: "spec";
986
+ code: "code";
987
+ }>;
988
+ agent: z.ZodEnum<{
989
+ "vv-spec-reviewer": "vv-spec-reviewer";
990
+ "vv-code-reviewer": "vv-code-reviewer";
991
+ }>;
992
+ status: z.ZodEnum<{
993
+ FAIL: "FAIL";
994
+ NEEDS_CONTEXT: "NEEDS_CONTEXT";
995
+ PASS: "PASS";
996
+ }>;
997
+ completedAt: z.ZodString;
998
+ resultExcerpt: z.ZodOptional<z.ZodObject<{
999
+ source: z.ZodEnum<{
1000
+ parsed_body: "parsed_body";
1001
+ normalized_output: "normalized_output";
1002
+ }>;
1003
+ text: z.ZodString;
1004
+ truncated: z.ZodBoolean;
1005
+ originalLength: z.ZodNumber;
1006
+ maxLength: z.ZodNumber;
1007
+ }, z.core.$strict>>;
1008
+ }, z.core.$strict>>;
1009
+ code: z.ZodOptional<z.ZodObject<{
1010
+ reviewer: z.ZodEnum<{
1011
+ spec: "spec";
1012
+ code: "code";
1013
+ }>;
1014
+ agent: z.ZodEnum<{
1015
+ "vv-spec-reviewer": "vv-spec-reviewer";
1016
+ "vv-code-reviewer": "vv-code-reviewer";
1017
+ }>;
1018
+ status: z.ZodEnum<{
1019
+ FAIL: "FAIL";
1020
+ NEEDS_CONTEXT: "NEEDS_CONTEXT";
1021
+ PASS: "PASS";
1022
+ }>;
1023
+ completedAt: z.ZodString;
1024
+ resultExcerpt: z.ZodOptional<z.ZodObject<{
1025
+ source: z.ZodEnum<{
1026
+ parsed_body: "parsed_body";
1027
+ normalized_output: "normalized_output";
1028
+ }>;
1029
+ text: z.ZodString;
1030
+ truncated: z.ZodBoolean;
1031
+ originalLength: z.ZodNumber;
1032
+ maxLength: z.ZodNumber;
1033
+ }, z.core.$strict>>;
1034
+ }, z.core.$strict>>;
1035
+ }, z.core.$strict>;
1036
+ status: z.ZodEnum<{
1037
+ active: "active";
1038
+ completed: "completed";
1039
+ }>;
1040
+ createdAt: z.ZodString;
1041
+ completedAt: z.ZodOptional<z.ZodString>;
1042
+ }, z.core.$strict>>;
1043
+ resultExcerpt: z.ZodOptional<z.ZodObject<{
1044
+ source: z.ZodEnum<{
1045
+ parsed_body: "parsed_body";
1046
+ normalized_output: "normalized_output";
1047
+ }>;
1048
+ text: z.ZodString;
1049
+ truncated: z.ZodBoolean;
1050
+ originalLength: z.ZodNumber;
1051
+ maxLength: z.ZodNumber;
1052
+ }, z.core.$strict>>;
1053
+ completedReviewRoundCount: z.ZodNumber;
1054
+ createdAt: z.ZodString;
1055
+ updatedAt: z.ZodString;
1056
+ closedAt: z.ZodOptional<z.ZodString>;
1057
+ delegated: z.ZodOptional<z.ZodObject<{
1058
+ writeScope: z.ZodArray<z.ZodString>;
1059
+ planRunId: z.ZodOptional<z.ZodString>;
1060
+ planTaskId: z.ZodOptional<z.ZodString>;
1061
+ attempts: z.ZodNumber;
1062
+ inFlightAttempt: z.ZodBoolean;
1063
+ decisions: z.ZodNumber;
1064
+ accepted: z.ZodBoolean;
1065
+ acceptedAttempt: z.ZodOptional<z.ZodNumber>;
1066
+ reworkCount: z.ZodNumber;
1067
+ attemptBudget: z.ZodNumber;
1068
+ remainingAttempts: z.ZodNumber;
1069
+ recoveryCount: z.ZodNumber;
1070
+ autonomousGrantConsumed: z.ZodBoolean;
1071
+ reportRejectionCount: z.ZodNumber;
1072
+ nextAction: z.ZodEnum<{
1073
+ closed: "closed";
1074
+ launch_implementer: "launch_implementer";
1075
+ await_result: "await_result";
1076
+ decide: "decide";
1077
+ recover: "recover";
1078
+ recover_with_user_authorization: "recover_with_user_authorization";
1079
+ launch_blocked: "launch_blocked";
1080
+ close: "close";
1081
+ }>;
1082
+ latestAttempt: z.ZodOptional<z.ZodObject<{
1083
+ attempt: z.ZodNumber;
1084
+ status: z.ZodEnum<{
1085
+ completed: "completed";
1086
+ in_flight: "in_flight";
1087
+ failed: "failed";
1088
+ report_rejected: "report_rejected";
1089
+ }>;
1090
+ resultStatus: z.ZodOptional<z.ZodEnum<{
1091
+ DONE: "DONE";
1092
+ DONE_WITH_CONCERNS: "DONE_WITH_CONCERNS";
1093
+ NEEDS_CONTEXT: "NEEDS_CONTEXT";
1094
+ BLOCKED: "BLOCKED";
1095
+ }>>;
1096
+ completedAt: z.ZodOptional<z.ZodString>;
1097
+ reportRejected: z.ZodBoolean;
1098
+ }, z.core.$strict>>;
1099
+ guidance: z.ZodOptional<z.ZodObject<{
1100
+ nextAction: z.ZodEnum<{
1101
+ closed: "closed";
1102
+ launch_implementer: "launch_implementer";
1103
+ await_result: "await_result";
1104
+ decide: "decide";
1105
+ recover: "recover";
1106
+ recover_with_user_authorization: "recover_with_user_authorization";
1107
+ launch_blocked: "launch_blocked";
1108
+ close: "close";
1109
+ }>;
1110
+ launchEligible: z.ZodBoolean;
1111
+ blockers: z.ZodArray<z.ZodString>;
1112
+ prerequisites: z.ZodArray<z.ZodString>;
1113
+ requiresConcernsDisposition: z.ZodBoolean;
1114
+ }, z.core.$strict>>;
1115
+ }, z.core.$strict>>;
1116
+ }, z.core.$strict>, z.ZodObject<{
1117
+ ok: z.ZodLiteral<false>;
1118
+ errorCode: z.ZodString;
1119
+ category: z.ZodOptional<z.ZodEnum<{
1120
+ input: "input";
1121
+ host_context: "host_context";
1122
+ state: "state";
1123
+ authorization: "authorization";
1124
+ persistence: "persistence";
1125
+ internal: "internal";
1126
+ }>>;
1127
+ message: z.ZodString;
1128
+ existingWorkItemId: z.ZodOptional<z.ZodString>;
1129
+ state: z.ZodOptional<z.ZodString>;
1130
+ prerequisite: z.ZodOptional<z.ZodString>;
1131
+ nextAction: z.ZodOptional<z.ZodString>;
1132
+ }, z.core.$strict>]>>;
1133
+ }, z.core.$strict>, z.ZodObject<{
1134
+ tool: z.ZodLiteral<"work_item_open">;
1135
+ sessionId: z.ZodString;
1136
+ ok: z.ZodLiteral<true>;
1137
+ action: z.ZodLiteral<"register">;
1138
+ runId: z.ZodString;
1139
+ reused: z.ZodBoolean;
1140
+ execution: z.ZodObject<{
1141
+ runId: z.ZodString;
1142
+ sessionId: z.ZodString;
1143
+ executionKey: z.ZodString;
1144
+ sourceKind: z.ZodEnum<{
1145
+ "native-package": "native-package";
1146
+ "provided-plan": "provided-plan";
1147
+ "conversation-scoped": "conversation-scoped";
1148
+ }>;
1149
+ goal: z.ZodString;
1150
+ state: z.ZodEnum<{
1151
+ preparing: "preparing";
1152
+ active: "active";
1153
+ sealed: "sealed";
1154
+ }>;
1155
+ revision: z.ZodNumber;
1156
+ tasks: z.ZodArray<z.ZodObject<{
1157
+ taskId: z.ZodString;
1158
+ workItemId: z.ZodString;
1159
+ status: z.ZodEnum<{
1160
+ pending: "pending";
1161
+ launched: "launched";
1162
+ accepted: "accepted";
1163
+ superseded: "superseded";
1164
+ }>;
1165
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
1166
+ spec: "spec";
1167
+ code: "code";
1168
+ }>>;
1169
+ dependsOn: z.ZodArray<z.ZodString>;
1170
+ blockedBy: z.ZodArray<z.ZodString>;
1171
+ latestAttempt: z.ZodOptional<z.ZodObject<{
1172
+ attempt: z.ZodNumber;
1173
+ status: z.ZodEnum<{
1174
+ completed: "completed";
1175
+ in_flight: "in_flight";
1176
+ failed: "failed";
1177
+ report_rejected: "report_rejected";
1178
+ }>;
1179
+ resultStatus: z.ZodOptional<z.ZodEnum<{
1180
+ DONE: "DONE";
1181
+ DONE_WITH_CONCERNS: "DONE_WITH_CONCERNS";
1182
+ NEEDS_CONTEXT: "NEEDS_CONTEXT";
1183
+ BLOCKED: "BLOCKED";
1184
+ }>>;
1185
+ completedAt: z.ZodOptional<z.ZodString>;
1186
+ reportRejected: z.ZodBoolean;
1187
+ }, z.core.$strict>>;
1188
+ }, z.core.$strict>>;
1189
+ checkpoints: z.ZodArray<z.ZodObject<{
1190
+ checkpointId: z.ZodString;
1191
+ kind: z.ZodEnum<{
1192
+ milestone: "milestone";
1193
+ final: "final";
1194
+ }>;
1195
+ covers: z.ZodArray<z.ZodString>;
1196
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
1197
+ spec: "spec";
1198
+ code: "code";
1199
+ }>>;
1200
+ status: z.ZodOptional<z.ZodString>;
1201
+ reviewWorkItemId: z.ZodOptional<z.ZodString>;
1202
+ generation: z.ZodOptional<z.ZodNumber>;
1203
+ recoveryCount: z.ZodOptional<z.ZodNumber>;
1204
+ attempts: z.ZodOptional<z.ZodNumber>;
1205
+ generationBudget: z.ZodOptional<z.ZodNumber>;
1206
+ remainingGenerations: z.ZodOptional<z.ZodNumber>;
1207
+ lastOutcome: z.ZodOptional<z.ZodEnum<{
1208
+ failed: "failed";
1209
+ passed: "passed";
1210
+ stale: "stale";
1211
+ stopped: "stopped";
1212
+ incomplete: "incomplete";
1213
+ }>>;
1214
+ nextAction: z.ZodOptional<z.ZodEnum<{
1215
+ start: "start";
1216
+ blocked: "blocked";
1217
+ recover: "recover";
1218
+ recover_with_user_authorization: "recover_with_user_authorization";
1219
+ passed: "passed";
1220
+ collect_and_verify: "collect_and_verify";
1221
+ start_next_generation: "start_next_generation";
1222
+ }>>;
1223
+ prerequisite: z.ZodOptional<z.ZodString>;
1224
+ currentReview: z.ZodOptional<z.ZodObject<{
1225
+ reviewWorkItemId: z.ZodString;
1226
+ generation: z.ZodNumber;
1227
+ coveredAttemptIds: z.ZodArray<z.ZodString>;
1228
+ recordedReviewers: z.ZodArray<z.ZodString>;
1229
+ }, z.core.$strict>>;
1230
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
1231
+ generation: z.ZodNumber;
1232
+ outcome: z.ZodEnum<{
1233
+ failed: "failed";
1234
+ passed: "passed";
1235
+ stale: "stale";
1236
+ stopped: "stopped";
1237
+ }>;
1238
+ completedAt: z.ZodString;
1239
+ }, z.core.$strict>>>;
1240
+ }, z.core.$strict>>;
1241
+ authority: z.ZodOptional<z.ZodArray<z.ZodObject<{
1242
+ authorityId: z.ZodString;
1243
+ availableUnits: z.ZodNumber;
1244
+ revoked: z.ZodBoolean;
1245
+ stages: z.ZodArray<z.ZodEnum<{
1246
+ implementation: "implementation";
1247
+ specification: "specification";
1248
+ planning: "planning";
1249
+ verification: "verification";
1250
+ }>>;
1251
+ reservedStops: z.ZodArray<z.ZodEnum<{
1252
+ implementation: "implementation";
1253
+ specification: "specification";
1254
+ planning: "planning";
1255
+ verification: "verification";
1256
+ }>>;
1257
+ prerequisites: z.ZodArray<z.ZodString>;
1258
+ }, z.core.$strict>>>;
1259
+ }, z.core.$strict>;
1260
+ }, z.core.$strict>, z.ZodObject<{
1261
+ tool: z.ZodLiteral<"work_item_open">;
1262
+ sessionId: z.ZodString;
1263
+ ok: z.ZodLiteral<true>;
1264
+ action: z.ZodLiteral<"amend">;
1265
+ runId: z.ZodString;
1266
+ revision: z.ZodNumber;
1267
+ execution: z.ZodObject<{
1268
+ runId: z.ZodString;
1269
+ sessionId: z.ZodString;
1270
+ executionKey: z.ZodString;
1271
+ sourceKind: z.ZodEnum<{
1272
+ "native-package": "native-package";
1273
+ "provided-plan": "provided-plan";
1274
+ "conversation-scoped": "conversation-scoped";
1275
+ }>;
1276
+ goal: z.ZodString;
1277
+ state: z.ZodEnum<{
1278
+ preparing: "preparing";
1279
+ active: "active";
1280
+ sealed: "sealed";
1281
+ }>;
1282
+ revision: z.ZodNumber;
1283
+ tasks: z.ZodArray<z.ZodObject<{
1284
+ taskId: z.ZodString;
1285
+ workItemId: z.ZodString;
1286
+ status: z.ZodEnum<{
1287
+ pending: "pending";
1288
+ launched: "launched";
1289
+ accepted: "accepted";
1290
+ superseded: "superseded";
1291
+ }>;
1292
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
1293
+ spec: "spec";
1294
+ code: "code";
1295
+ }>>;
1296
+ dependsOn: z.ZodArray<z.ZodString>;
1297
+ blockedBy: z.ZodArray<z.ZodString>;
1298
+ latestAttempt: z.ZodOptional<z.ZodObject<{
1299
+ attempt: z.ZodNumber;
1300
+ status: z.ZodEnum<{
1301
+ completed: "completed";
1302
+ in_flight: "in_flight";
1303
+ failed: "failed";
1304
+ report_rejected: "report_rejected";
1305
+ }>;
1306
+ resultStatus: z.ZodOptional<z.ZodEnum<{
1307
+ DONE: "DONE";
1308
+ DONE_WITH_CONCERNS: "DONE_WITH_CONCERNS";
1309
+ NEEDS_CONTEXT: "NEEDS_CONTEXT";
1310
+ BLOCKED: "BLOCKED";
1311
+ }>>;
1312
+ completedAt: z.ZodOptional<z.ZodString>;
1313
+ reportRejected: z.ZodBoolean;
1314
+ }, z.core.$strict>>;
1315
+ }, z.core.$strict>>;
1316
+ checkpoints: z.ZodArray<z.ZodObject<{
1317
+ checkpointId: z.ZodString;
1318
+ kind: z.ZodEnum<{
1319
+ milestone: "milestone";
1320
+ final: "final";
1321
+ }>;
1322
+ covers: z.ZodArray<z.ZodString>;
1323
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
1324
+ spec: "spec";
1325
+ code: "code";
1326
+ }>>;
1327
+ status: z.ZodOptional<z.ZodString>;
1328
+ reviewWorkItemId: z.ZodOptional<z.ZodString>;
1329
+ generation: z.ZodOptional<z.ZodNumber>;
1330
+ recoveryCount: z.ZodOptional<z.ZodNumber>;
1331
+ attempts: z.ZodOptional<z.ZodNumber>;
1332
+ generationBudget: z.ZodOptional<z.ZodNumber>;
1333
+ remainingGenerations: z.ZodOptional<z.ZodNumber>;
1334
+ lastOutcome: z.ZodOptional<z.ZodEnum<{
1335
+ failed: "failed";
1336
+ passed: "passed";
1337
+ stale: "stale";
1338
+ stopped: "stopped";
1339
+ incomplete: "incomplete";
1340
+ }>>;
1341
+ nextAction: z.ZodOptional<z.ZodEnum<{
1342
+ start: "start";
1343
+ blocked: "blocked";
1344
+ recover: "recover";
1345
+ recover_with_user_authorization: "recover_with_user_authorization";
1346
+ passed: "passed";
1347
+ collect_and_verify: "collect_and_verify";
1348
+ start_next_generation: "start_next_generation";
1349
+ }>>;
1350
+ prerequisite: z.ZodOptional<z.ZodString>;
1351
+ currentReview: z.ZodOptional<z.ZodObject<{
1352
+ reviewWorkItemId: z.ZodString;
1353
+ generation: z.ZodNumber;
1354
+ coveredAttemptIds: z.ZodArray<z.ZodString>;
1355
+ recordedReviewers: z.ZodArray<z.ZodString>;
1356
+ }, z.core.$strict>>;
1357
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
1358
+ generation: z.ZodNumber;
1359
+ outcome: z.ZodEnum<{
1360
+ failed: "failed";
1361
+ passed: "passed";
1362
+ stale: "stale";
1363
+ stopped: "stopped";
1364
+ }>;
1365
+ completedAt: z.ZodString;
1366
+ }, z.core.$strict>>>;
1367
+ }, z.core.$strict>>;
1368
+ authority: z.ZodOptional<z.ZodArray<z.ZodObject<{
1369
+ authorityId: z.ZodString;
1370
+ availableUnits: z.ZodNumber;
1371
+ revoked: z.ZodBoolean;
1372
+ stages: z.ZodArray<z.ZodEnum<{
1373
+ implementation: "implementation";
1374
+ specification: "specification";
1375
+ planning: "planning";
1376
+ verification: "verification";
1377
+ }>>;
1378
+ reservedStops: z.ZodArray<z.ZodEnum<{
1379
+ implementation: "implementation";
1380
+ specification: "specification";
1381
+ planning: "planning";
1382
+ verification: "verification";
1383
+ }>>;
1384
+ prerequisites: z.ZodArray<z.ZodString>;
1385
+ }, z.core.$strict>>>;
1386
+ }, z.core.$strict>;
1387
+ }, z.core.$strict>, z.ZodObject<{
1388
+ sessionId: z.ZodOptional<z.ZodString>;
1389
+ ok: z.ZodLiteral<false>;
1390
+ errorCode: z.ZodString;
1391
+ category: z.ZodEnum<{
1392
+ input: "input";
1393
+ host_context: "host_context";
1394
+ state: "state";
1395
+ authorization: "authorization";
1396
+ persistence: "persistence";
1397
+ internal: "internal";
1398
+ }>;
1399
+ message: z.ZodString;
1400
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
1401
+ code: z.ZodEnum<{
1402
+ unrecognized_keys: "unrecognized_keys";
1403
+ invalid_value: "invalid_value";
1404
+ invalid_type: "invalid_type";
1405
+ invalid_format: "invalid_format";
1406
+ too_small: "too_small";
1407
+ too_big: "too_big";
1408
+ missing_value: "missing_value";
1409
+ invalid_union: "invalid_union";
1410
+ custom: "custom";
1411
+ }>;
1412
+ path: z.ZodString;
1413
+ message: z.ZodString;
1414
+ expected: z.ZodOptional<z.ZodString>;
1415
+ received: z.ZodOptional<z.ZodString>;
1416
+ }, z.core.$strict>>>;
1417
+ state: z.ZodOptional<z.ZodString>;
1418
+ attempt: z.ZodOptional<z.ZodNumber>;
1419
+ attemptStatus: z.ZodOptional<z.ZodString>;
1420
+ resultStatus: z.ZodOptional<z.ZodString>;
1421
+ attemptBudget: z.ZodOptional<z.ZodNumber>;
1422
+ remainingAttempts: z.ZodOptional<z.ZodNumber>;
1423
+ recoveryCount: z.ZodOptional<z.ZodNumber>;
1424
+ pendingReviewers: z.ZodOptional<z.ZodArray<z.ZodString>>;
1425
+ prerequisite: z.ZodOptional<z.ZodString>;
1426
+ nextAction: z.ZodOptional<z.ZodString>;
1427
+ outcome: z.ZodOptional<z.ZodEnum<{
1428
+ unknown: "unknown";
1429
+ committed: "committed";
1430
+ not_applied: "not_applied";
1431
+ rolled_back: "rolled_back";
1432
+ }>>;
1433
+ applied: z.ZodOptional<z.ZodBoolean>;
1434
+ retrySafe: z.ZodOptional<z.ZodBoolean>;
1435
+ existingWorkItemId: z.ZodOptional<z.ZodString>;
1436
+ runId: z.ZodOptional<z.ZodString>;
1437
+ tool: z.ZodLiteral<string>;
1438
+ }, z.core.$strict>]>;
1439
+ readonly work_item_list: z.ZodUnion<readonly [z.ZodObject<{
1440
+ tool: z.ZodLiteral<"work_item_list">;
1441
+ sessionId: z.ZodString;
1442
+ includeClosed: z.ZodBoolean;
1443
+ items: z.ZodArray<z.ZodObject<{
1444
+ workItemId: z.ZodString;
1445
+ header: z.ZodString;
1446
+ key: z.ZodString;
1447
+ title: z.ZodString;
1448
+ mode: z.ZodEnum<{
1449
+ delegated: "delegated";
1450
+ implementation: "implementation";
1451
+ review_only: "review_only";
1452
+ }>;
1453
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
1454
+ spec: "spec";
1455
+ code: "code";
1456
+ }>>;
1457
+ state: z.ZodEnum<{
1458
+ open: "open";
1459
+ awaiting_implementer: "awaiting_implementer";
1460
+ awaiting_reviews: "awaiting_reviews";
1461
+ awaiting_acceptance: "awaiting_acceptance";
1462
+ needs_context: "needs_context";
1463
+ blocked: "blocked";
1464
+ ready_to_close: "ready_to_close";
1465
+ closed: "closed";
1466
+ }>;
1467
+ specReviewCount: z.ZodNumber;
1468
+ codeReviewCount: z.ZodNumber;
1469
+ reviewRound: z.ZodNumber;
1470
+ currentRound: z.ZodOptional<z.ZodObject<{
1471
+ round: z.ZodNumber;
1472
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
1473
+ spec: "spec";
1474
+ code: "code";
1475
+ }>>;
1476
+ pendingReviewers: z.ZodArray<z.ZodEnum<{
1477
+ spec: "spec";
1478
+ code: "code";
1479
+ }>>;
1480
+ inFlightReviewers: z.ZodArray<z.ZodEnum<{
1481
+ spec: "spec";
1482
+ code: "code";
1483
+ }>>;
1484
+ completedReviewers: z.ZodArray<z.ZodEnum<{
1485
+ spec: "spec";
1486
+ code: "code";
1487
+ }>>;
1488
+ results: z.ZodObject<{
1489
+ spec: z.ZodOptional<z.ZodObject<{
1490
+ reviewer: z.ZodEnum<{
1491
+ spec: "spec";
1492
+ code: "code";
1493
+ }>;
1494
+ agent: z.ZodEnum<{
1495
+ "vv-spec-reviewer": "vv-spec-reviewer";
1496
+ "vv-code-reviewer": "vv-code-reviewer";
1497
+ }>;
1498
+ status: z.ZodEnum<{
1499
+ FAIL: "FAIL";
1500
+ NEEDS_CONTEXT: "NEEDS_CONTEXT";
1501
+ PASS: "PASS";
1502
+ }>;
1503
+ completedAt: z.ZodString;
1504
+ resultExcerpt: z.ZodOptional<z.ZodObject<{
1505
+ source: z.ZodEnum<{
1506
+ parsed_body: "parsed_body";
1507
+ normalized_output: "normalized_output";
1508
+ }>;
1509
+ text: z.ZodString;
1510
+ truncated: z.ZodBoolean;
1511
+ originalLength: z.ZodNumber;
1512
+ maxLength: z.ZodNumber;
1513
+ }, z.core.$strict>>;
1514
+ }, z.core.$strict>>;
1515
+ code: z.ZodOptional<z.ZodObject<{
1516
+ reviewer: z.ZodEnum<{
1517
+ spec: "spec";
1518
+ code: "code";
1519
+ }>;
1520
+ agent: z.ZodEnum<{
1521
+ "vv-spec-reviewer": "vv-spec-reviewer";
1522
+ "vv-code-reviewer": "vv-code-reviewer";
1523
+ }>;
1524
+ status: z.ZodEnum<{
1525
+ FAIL: "FAIL";
1526
+ NEEDS_CONTEXT: "NEEDS_CONTEXT";
1527
+ PASS: "PASS";
1528
+ }>;
1529
+ completedAt: z.ZodString;
1530
+ resultExcerpt: z.ZodOptional<z.ZodObject<{
1531
+ source: z.ZodEnum<{
1532
+ parsed_body: "parsed_body";
1533
+ normalized_output: "normalized_output";
1534
+ }>;
1535
+ text: z.ZodString;
1536
+ truncated: z.ZodBoolean;
1537
+ originalLength: z.ZodNumber;
1538
+ maxLength: z.ZodNumber;
1539
+ }, z.core.$strict>>;
1540
+ }, z.core.$strict>>;
1541
+ }, z.core.$strict>;
1542
+ status: z.ZodEnum<{
1543
+ active: "active";
1544
+ completed: "completed";
1545
+ }>;
1546
+ createdAt: z.ZodString;
1547
+ completedAt: z.ZodOptional<z.ZodString>;
1548
+ }, z.core.$strict>>;
1549
+ resultExcerpt: z.ZodOptional<z.ZodObject<{
1550
+ source: z.ZodEnum<{
1551
+ parsed_body: "parsed_body";
1552
+ normalized_output: "normalized_output";
1553
+ }>;
1554
+ text: z.ZodString;
1555
+ truncated: z.ZodBoolean;
1556
+ originalLength: z.ZodNumber;
1557
+ maxLength: z.ZodNumber;
1558
+ }, z.core.$strict>>;
1559
+ completedReviewRoundCount: z.ZodNumber;
1560
+ createdAt: z.ZodString;
1561
+ updatedAt: z.ZodString;
1562
+ closedAt: z.ZodOptional<z.ZodString>;
1563
+ delegated: z.ZodOptional<z.ZodObject<{
1564
+ writeScope: z.ZodArray<z.ZodString>;
1565
+ planRunId: z.ZodOptional<z.ZodString>;
1566
+ planTaskId: z.ZodOptional<z.ZodString>;
1567
+ attempts: z.ZodNumber;
1568
+ inFlightAttempt: z.ZodBoolean;
1569
+ decisions: z.ZodNumber;
1570
+ accepted: z.ZodBoolean;
1571
+ acceptedAttempt: z.ZodOptional<z.ZodNumber>;
1572
+ reworkCount: z.ZodNumber;
1573
+ attemptBudget: z.ZodNumber;
1574
+ remainingAttempts: z.ZodNumber;
1575
+ recoveryCount: z.ZodNumber;
1576
+ autonomousGrantConsumed: z.ZodBoolean;
1577
+ reportRejectionCount: z.ZodNumber;
1578
+ nextAction: z.ZodEnum<{
1579
+ closed: "closed";
1580
+ launch_implementer: "launch_implementer";
1581
+ await_result: "await_result";
1582
+ decide: "decide";
1583
+ recover: "recover";
1584
+ recover_with_user_authorization: "recover_with_user_authorization";
1585
+ launch_blocked: "launch_blocked";
1586
+ close: "close";
1587
+ }>;
1588
+ latestAttempt: z.ZodOptional<z.ZodObject<{
1589
+ attempt: z.ZodNumber;
1590
+ status: z.ZodEnum<{
1591
+ completed: "completed";
1592
+ in_flight: "in_flight";
1593
+ failed: "failed";
1594
+ report_rejected: "report_rejected";
1595
+ }>;
1596
+ resultStatus: z.ZodOptional<z.ZodEnum<{
1597
+ DONE: "DONE";
1598
+ DONE_WITH_CONCERNS: "DONE_WITH_CONCERNS";
1599
+ NEEDS_CONTEXT: "NEEDS_CONTEXT";
1600
+ BLOCKED: "BLOCKED";
1601
+ }>>;
1602
+ completedAt: z.ZodOptional<z.ZodString>;
1603
+ reportRejected: z.ZodBoolean;
1604
+ }, z.core.$strict>>;
1605
+ guidance: z.ZodOptional<z.ZodObject<{
1606
+ nextAction: z.ZodEnum<{
1607
+ closed: "closed";
1608
+ launch_implementer: "launch_implementer";
1609
+ await_result: "await_result";
1610
+ decide: "decide";
1611
+ recover: "recover";
1612
+ recover_with_user_authorization: "recover_with_user_authorization";
1613
+ launch_blocked: "launch_blocked";
1614
+ close: "close";
1615
+ }>;
1616
+ launchEligible: z.ZodBoolean;
1617
+ blockers: z.ZodArray<z.ZodString>;
1618
+ prerequisites: z.ZodArray<z.ZodString>;
1619
+ requiresConcernsDisposition: z.ZodBoolean;
1620
+ }, z.core.$strict>>;
1621
+ }, z.core.$strict>>;
1622
+ }, z.core.$strict>>;
1623
+ planRuns: z.ZodOptional<z.ZodArray<z.ZodObject<{
1624
+ runId: z.ZodString;
1625
+ sessionId: z.ZodString;
1626
+ planPath: z.ZodString;
1627
+ specPath: z.ZodString;
1628
+ workspaceRoot: z.ZodString;
1629
+ status: z.ZodEnum<{
1630
+ active: "active";
1631
+ sealed: "sealed";
1632
+ }>;
1633
+ registeredAt: z.ZodString;
1634
+ sealedAt: z.ZodOptional<z.ZodString>;
1635
+ finalCheckpointId: z.ZodOptional<z.ZodString>;
1636
+ tasks: z.ZodArray<z.ZodObject<{
1637
+ taskId: z.ZodString;
1638
+ workItemId: z.ZodString;
1639
+ }, z.core.$strict>>;
1640
+ checkpoints: z.ZodArray<z.ZodObject<{
1641
+ checkpointId: z.ZodString;
1642
+ kind: z.ZodEnum<{
1643
+ milestone: "milestone";
1644
+ final: "final";
1645
+ }>;
1646
+ afterWave: z.ZodString;
1647
+ covers: z.ZodArray<z.ZodString>;
1648
+ scope: z.ZodArray<z.ZodString>;
1649
+ reviewers: z.ZodArray<z.ZodEnum<{
1650
+ spec: "spec";
1651
+ code: "code";
1652
+ }>>;
1653
+ status: z.ZodEnum<{
1654
+ pending: "pending";
1655
+ failed: "failed";
1656
+ in_review: "in_review";
1657
+ passed: "passed";
1658
+ }>;
1659
+ attempts: z.ZodNumber;
1660
+ lastOutcome: z.ZodOptional<z.ZodEnum<{
1661
+ failed: "failed";
1662
+ passed: "passed";
1663
+ stale: "stale";
1664
+ stopped: "stopped";
1665
+ incomplete: "incomplete";
1666
+ }>>;
1667
+ generationBudget: z.ZodNumber;
1668
+ remainingGenerations: z.ZodNumber;
1669
+ recoveryCount: z.ZodNumber;
1670
+ nextAction: z.ZodEnum<{
1671
+ start: "start";
1672
+ blocked: "blocked";
1673
+ recover: "recover";
1674
+ recover_with_user_authorization: "recover_with_user_authorization";
1675
+ passed: "passed";
1676
+ collect_and_verify: "collect_and_verify";
1677
+ start_next_generation: "start_next_generation";
1678
+ }>;
1679
+ prerequisite: z.ZodOptional<z.ZodString>;
1680
+ currentReview: z.ZodOptional<z.ZodObject<{
1681
+ reviewWorkItemId: z.ZodString;
1682
+ generation: z.ZodNumber;
1683
+ coveredAttemptIds: z.ZodArray<z.ZodString>;
1684
+ recordedReviewers: z.ZodArray<z.ZodString>;
1685
+ }, z.core.$strict>>;
1686
+ history: z.ZodArray<z.ZodObject<{
1687
+ generation: z.ZodNumber;
1688
+ outcome: z.ZodEnum<{
1689
+ failed: "failed";
1690
+ passed: "passed";
1691
+ stale: "stale";
1692
+ stopped: "stopped";
1693
+ }>;
1694
+ fingerprint: z.ZodString;
1695
+ completedAt: z.ZodString;
1696
+ }, z.core.$strict>>;
1697
+ }, z.core.$strict>>;
1698
+ }, z.core.$strict>>>;
1699
+ executions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1700
+ runId: z.ZodString;
1701
+ sessionId: z.ZodString;
1702
+ executionKey: z.ZodString;
1703
+ sourceKind: z.ZodEnum<{
1704
+ "native-package": "native-package";
1705
+ "provided-plan": "provided-plan";
1706
+ "conversation-scoped": "conversation-scoped";
1707
+ }>;
1708
+ goal: z.ZodString;
1709
+ state: z.ZodEnum<{
1710
+ preparing: "preparing";
1711
+ active: "active";
1712
+ sealed: "sealed";
1713
+ }>;
1714
+ revision: z.ZodNumber;
1715
+ tasks: z.ZodArray<z.ZodObject<{
1716
+ taskId: z.ZodString;
1717
+ workItemId: z.ZodString;
1718
+ status: z.ZodEnum<{
1719
+ pending: "pending";
1720
+ launched: "launched";
1721
+ accepted: "accepted";
1722
+ superseded: "superseded";
1723
+ }>;
1724
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
1725
+ spec: "spec";
1726
+ code: "code";
1727
+ }>>;
1728
+ dependsOn: z.ZodArray<z.ZodString>;
1729
+ blockedBy: z.ZodArray<z.ZodString>;
1730
+ latestAttempt: z.ZodOptional<z.ZodObject<{
1731
+ attempt: z.ZodNumber;
1732
+ status: z.ZodEnum<{
1733
+ completed: "completed";
1734
+ in_flight: "in_flight";
1735
+ failed: "failed";
1736
+ report_rejected: "report_rejected";
1737
+ }>;
1738
+ resultStatus: z.ZodOptional<z.ZodEnum<{
1739
+ DONE: "DONE";
1740
+ DONE_WITH_CONCERNS: "DONE_WITH_CONCERNS";
1741
+ NEEDS_CONTEXT: "NEEDS_CONTEXT";
1742
+ BLOCKED: "BLOCKED";
1743
+ }>>;
1744
+ completedAt: z.ZodOptional<z.ZodString>;
1745
+ reportRejected: z.ZodBoolean;
1746
+ }, z.core.$strict>>;
1747
+ }, z.core.$strict>>;
1748
+ checkpoints: z.ZodArray<z.ZodObject<{
1749
+ checkpointId: z.ZodString;
1750
+ kind: z.ZodEnum<{
1751
+ milestone: "milestone";
1752
+ final: "final";
1753
+ }>;
1754
+ covers: z.ZodArray<z.ZodString>;
1755
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
1756
+ spec: "spec";
1757
+ code: "code";
1758
+ }>>;
1759
+ status: z.ZodOptional<z.ZodString>;
1760
+ reviewWorkItemId: z.ZodOptional<z.ZodString>;
1761
+ generation: z.ZodOptional<z.ZodNumber>;
1762
+ recoveryCount: z.ZodOptional<z.ZodNumber>;
1763
+ attempts: z.ZodOptional<z.ZodNumber>;
1764
+ generationBudget: z.ZodOptional<z.ZodNumber>;
1765
+ remainingGenerations: z.ZodOptional<z.ZodNumber>;
1766
+ lastOutcome: z.ZodOptional<z.ZodEnum<{
1767
+ failed: "failed";
1768
+ passed: "passed";
1769
+ stale: "stale";
1770
+ stopped: "stopped";
1771
+ incomplete: "incomplete";
1772
+ }>>;
1773
+ nextAction: z.ZodOptional<z.ZodEnum<{
1774
+ start: "start";
1775
+ blocked: "blocked";
1776
+ recover: "recover";
1777
+ recover_with_user_authorization: "recover_with_user_authorization";
1778
+ passed: "passed";
1779
+ collect_and_verify: "collect_and_verify";
1780
+ start_next_generation: "start_next_generation";
1781
+ }>>;
1782
+ prerequisite: z.ZodOptional<z.ZodString>;
1783
+ currentReview: z.ZodOptional<z.ZodObject<{
1784
+ reviewWorkItemId: z.ZodString;
1785
+ generation: z.ZodNumber;
1786
+ coveredAttemptIds: z.ZodArray<z.ZodString>;
1787
+ recordedReviewers: z.ZodArray<z.ZodString>;
1788
+ }, z.core.$strict>>;
1789
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
1790
+ generation: z.ZodNumber;
1791
+ outcome: z.ZodEnum<{
1792
+ failed: "failed";
1793
+ passed: "passed";
1794
+ stale: "stale";
1795
+ stopped: "stopped";
1796
+ }>;
1797
+ completedAt: z.ZodString;
1798
+ }, z.core.$strict>>>;
1799
+ }, z.core.$strict>>;
1800
+ authority: z.ZodOptional<z.ZodArray<z.ZodObject<{
1801
+ authorityId: z.ZodString;
1802
+ availableUnits: z.ZodNumber;
1803
+ revoked: z.ZodBoolean;
1804
+ stages: z.ZodArray<z.ZodEnum<{
1805
+ implementation: "implementation";
1806
+ specification: "specification";
1807
+ planning: "planning";
1808
+ verification: "verification";
1809
+ }>>;
1810
+ reservedStops: z.ZodArray<z.ZodEnum<{
1811
+ implementation: "implementation";
1812
+ specification: "specification";
1813
+ planning: "planning";
1814
+ verification: "verification";
1815
+ }>>;
1816
+ prerequisites: z.ZodArray<z.ZodString>;
1817
+ }, z.core.$strict>>>;
1818
+ }, z.core.$strict>>>;
1819
+ contract: z.ZodObject<{
1820
+ packageName: z.ZodString;
1821
+ packageVersion: z.ZodString;
1822
+ toolContractRevision: z.ZodString;
1823
+ referencePath: z.ZodString;
1824
+ }, z.core.$strict>;
1825
+ }, z.core.$strict>, z.ZodObject<{
1826
+ sessionId: z.ZodOptional<z.ZodString>;
1827
+ ok: z.ZodLiteral<false>;
1828
+ errorCode: z.ZodString;
1829
+ category: z.ZodEnum<{
1830
+ input: "input";
1831
+ host_context: "host_context";
1832
+ state: "state";
1833
+ authorization: "authorization";
1834
+ persistence: "persistence";
1835
+ internal: "internal";
1836
+ }>;
1837
+ message: z.ZodString;
1838
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
1839
+ code: z.ZodEnum<{
1840
+ unrecognized_keys: "unrecognized_keys";
1841
+ invalid_value: "invalid_value";
1842
+ invalid_type: "invalid_type";
1843
+ invalid_format: "invalid_format";
1844
+ too_small: "too_small";
1845
+ too_big: "too_big";
1846
+ missing_value: "missing_value";
1847
+ invalid_union: "invalid_union";
1848
+ custom: "custom";
1849
+ }>;
1850
+ path: z.ZodString;
1851
+ message: z.ZodString;
1852
+ expected: z.ZodOptional<z.ZodString>;
1853
+ received: z.ZodOptional<z.ZodString>;
1854
+ }, z.core.$strict>>>;
1855
+ state: z.ZodOptional<z.ZodString>;
1856
+ attempt: z.ZodOptional<z.ZodNumber>;
1857
+ attemptStatus: z.ZodOptional<z.ZodString>;
1858
+ resultStatus: z.ZodOptional<z.ZodString>;
1859
+ attemptBudget: z.ZodOptional<z.ZodNumber>;
1860
+ remainingAttempts: z.ZodOptional<z.ZodNumber>;
1861
+ recoveryCount: z.ZodOptional<z.ZodNumber>;
1862
+ pendingReviewers: z.ZodOptional<z.ZodArray<z.ZodString>>;
1863
+ prerequisite: z.ZodOptional<z.ZodString>;
1864
+ nextAction: z.ZodOptional<z.ZodString>;
1865
+ outcome: z.ZodOptional<z.ZodEnum<{
1866
+ unknown: "unknown";
1867
+ committed: "committed";
1868
+ not_applied: "not_applied";
1869
+ rolled_back: "rolled_back";
1870
+ }>>;
1871
+ applied: z.ZodOptional<z.ZodBoolean>;
1872
+ retrySafe: z.ZodOptional<z.ZodBoolean>;
1873
+ existingWorkItemId: z.ZodOptional<z.ZodString>;
1874
+ runId: z.ZodOptional<z.ZodString>;
1875
+ tool: z.ZodLiteral<string>;
1876
+ }, z.core.$strict>]>;
1877
+ readonly work_item_close: z.ZodUnion<readonly [z.ZodObject<{
1878
+ tool: z.ZodLiteral<"work_item_close">;
1879
+ sessionId: z.ZodString;
1880
+ ok: z.ZodLiteral<true>;
1881
+ workItemId: z.ZodString;
1882
+ header: z.ZodString;
1883
+ state: z.ZodEnum<{
1884
+ open: "open";
1885
+ awaiting_implementer: "awaiting_implementer";
1886
+ awaiting_reviews: "awaiting_reviews";
1887
+ awaiting_acceptance: "awaiting_acceptance";
1888
+ needs_context: "needs_context";
1889
+ blocked: "blocked";
1890
+ ready_to_close: "ready_to_close";
1891
+ closed: "closed";
1892
+ }>;
1893
+ closedAt: z.ZodString;
1894
+ }, z.core.$strict>, z.ZodObject<{
1895
+ sessionId: z.ZodOptional<z.ZodString>;
1896
+ ok: z.ZodLiteral<false>;
1897
+ errorCode: z.ZodString;
1898
+ category: z.ZodEnum<{
1899
+ input: "input";
1900
+ host_context: "host_context";
1901
+ state: "state";
1902
+ authorization: "authorization";
1903
+ persistence: "persistence";
1904
+ internal: "internal";
1905
+ }>;
1906
+ message: z.ZodString;
1907
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
1908
+ code: z.ZodEnum<{
1909
+ unrecognized_keys: "unrecognized_keys";
1910
+ invalid_value: "invalid_value";
1911
+ invalid_type: "invalid_type";
1912
+ invalid_format: "invalid_format";
1913
+ too_small: "too_small";
1914
+ too_big: "too_big";
1915
+ missing_value: "missing_value";
1916
+ invalid_union: "invalid_union";
1917
+ custom: "custom";
1918
+ }>;
1919
+ path: z.ZodString;
1920
+ message: z.ZodString;
1921
+ expected: z.ZodOptional<z.ZodString>;
1922
+ received: z.ZodOptional<z.ZodString>;
1923
+ }, z.core.$strict>>>;
1924
+ state: z.ZodOptional<z.ZodString>;
1925
+ attempt: z.ZodOptional<z.ZodNumber>;
1926
+ attemptStatus: z.ZodOptional<z.ZodString>;
1927
+ resultStatus: z.ZodOptional<z.ZodString>;
1928
+ attemptBudget: z.ZodOptional<z.ZodNumber>;
1929
+ remainingAttempts: z.ZodOptional<z.ZodNumber>;
1930
+ recoveryCount: z.ZodOptional<z.ZodNumber>;
1931
+ pendingReviewers: z.ZodOptional<z.ZodArray<z.ZodString>>;
1932
+ prerequisite: z.ZodOptional<z.ZodString>;
1933
+ nextAction: z.ZodOptional<z.ZodString>;
1934
+ outcome: z.ZodOptional<z.ZodEnum<{
1935
+ unknown: "unknown";
1936
+ committed: "committed";
1937
+ not_applied: "not_applied";
1938
+ rolled_back: "rolled_back";
1939
+ }>>;
1940
+ applied: z.ZodOptional<z.ZodBoolean>;
1941
+ retrySafe: z.ZodOptional<z.ZodBoolean>;
1942
+ existingWorkItemId: z.ZodOptional<z.ZodString>;
1943
+ runId: z.ZodOptional<z.ZodString>;
1944
+ tool: z.ZodLiteral<string>;
1945
+ }, z.core.$strict>]>;
1946
+ readonly work_item_decide: z.ZodUnion<readonly [z.ZodObject<{
1947
+ tool: z.ZodLiteral<"work_item_decide">;
1948
+ sessionId: z.ZodString;
1949
+ ok: z.ZodLiteral<true>;
1950
+ action: z.ZodLiteral<"rework">;
1951
+ workItemId: z.ZodString;
1952
+ reworkId: z.ZodString;
1953
+ grantedAttempts: z.ZodNumber;
1954
+ state: z.ZodOptional<z.ZodEnum<{
1955
+ open: "open";
1956
+ awaiting_implementer: "awaiting_implementer";
1957
+ awaiting_reviews: "awaiting_reviews";
1958
+ awaiting_acceptance: "awaiting_acceptance";
1959
+ needs_context: "needs_context";
1960
+ blocked: "blocked";
1961
+ ready_to_close: "ready_to_close";
1962
+ closed: "closed";
1963
+ }>>;
1964
+ }, z.core.$strict>, z.ZodObject<{
1965
+ tool: z.ZodLiteral<"work_item_decide">;
1966
+ sessionId: z.ZodString;
1967
+ ok: z.ZodLiteral<true>;
1968
+ action: z.ZodLiteral<"recover">;
1969
+ workItemId: z.ZodString;
1970
+ recoveryId: z.ZodString;
1971
+ kind: z.ZodEnum<{
1972
+ resume: "resume";
1973
+ autonomous_grant: "autonomous_grant";
1974
+ user_grant: "user_grant";
1975
+ advance_grant: "advance_grant";
1976
+ }>;
1977
+ attemptBudget: z.ZodNumber;
1978
+ remainingAttempts: z.ZodNumber;
1979
+ state: z.ZodEnum<{
1980
+ open: "open";
1981
+ awaiting_implementer: "awaiting_implementer";
1982
+ awaiting_reviews: "awaiting_reviews";
1983
+ awaiting_acceptance: "awaiting_acceptance";
1984
+ needs_context: "needs_context";
1985
+ blocked: "blocked";
1986
+ ready_to_close: "ready_to_close";
1987
+ closed: "closed";
1988
+ }>;
1989
+ nextAction: z.ZodEnum<{
1990
+ closed: "closed";
1991
+ launch_implementer: "launch_implementer";
1992
+ await_result: "await_result";
1993
+ decide: "decide";
1994
+ recover: "recover";
1995
+ recover_with_user_authorization: "recover_with_user_authorization";
1996
+ launch_blocked: "launch_blocked";
1997
+ close: "close";
1998
+ }>;
1999
+ }, z.core.$strict>, z.ZodObject<{
2000
+ tool: z.ZodLiteral<"work_item_decide">;
2001
+ sessionId: z.ZodString;
2002
+ ok: z.ZodLiteral<true>;
2003
+ action: z.ZodEnum<{
2004
+ accept: "accept";
2005
+ request_changes: "request_changes";
2006
+ }>;
2007
+ workItemId: z.ZodString;
2008
+ attempt: z.ZodNumber;
2009
+ decisionId: z.ZodString;
2010
+ state: z.ZodEnum<{
2011
+ open: "open";
2012
+ awaiting_implementer: "awaiting_implementer";
2013
+ awaiting_reviews: "awaiting_reviews";
2014
+ awaiting_acceptance: "awaiting_acceptance";
2015
+ needs_context: "needs_context";
2016
+ blocked: "blocked";
2017
+ ready_to_close: "ready_to_close";
2018
+ closed: "closed";
2019
+ }>;
2020
+ }, z.core.$strict>, z.ZodObject<{
2021
+ sessionId: z.ZodOptional<z.ZodString>;
2022
+ ok: z.ZodLiteral<false>;
2023
+ errorCode: z.ZodString;
2024
+ category: z.ZodEnum<{
2025
+ input: "input";
2026
+ host_context: "host_context";
2027
+ state: "state";
2028
+ authorization: "authorization";
2029
+ persistence: "persistence";
2030
+ internal: "internal";
2031
+ }>;
2032
+ message: z.ZodString;
2033
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
2034
+ code: z.ZodEnum<{
2035
+ unrecognized_keys: "unrecognized_keys";
2036
+ invalid_value: "invalid_value";
2037
+ invalid_type: "invalid_type";
2038
+ invalid_format: "invalid_format";
2039
+ too_small: "too_small";
2040
+ too_big: "too_big";
2041
+ missing_value: "missing_value";
2042
+ invalid_union: "invalid_union";
2043
+ custom: "custom";
2044
+ }>;
2045
+ path: z.ZodString;
2046
+ message: z.ZodString;
2047
+ expected: z.ZodOptional<z.ZodString>;
2048
+ received: z.ZodOptional<z.ZodString>;
2049
+ }, z.core.$strict>>>;
2050
+ state: z.ZodOptional<z.ZodString>;
2051
+ attempt: z.ZodOptional<z.ZodNumber>;
2052
+ attemptStatus: z.ZodOptional<z.ZodString>;
2053
+ resultStatus: z.ZodOptional<z.ZodString>;
2054
+ attemptBudget: z.ZodOptional<z.ZodNumber>;
2055
+ remainingAttempts: z.ZodOptional<z.ZodNumber>;
2056
+ recoveryCount: z.ZodOptional<z.ZodNumber>;
2057
+ pendingReviewers: z.ZodOptional<z.ZodArray<z.ZodString>>;
2058
+ prerequisite: z.ZodOptional<z.ZodString>;
2059
+ nextAction: z.ZodOptional<z.ZodString>;
2060
+ outcome: z.ZodOptional<z.ZodEnum<{
2061
+ unknown: "unknown";
2062
+ committed: "committed";
2063
+ not_applied: "not_applied";
2064
+ rolled_back: "rolled_back";
2065
+ }>>;
2066
+ applied: z.ZodOptional<z.ZodBoolean>;
2067
+ retrySafe: z.ZodOptional<z.ZodBoolean>;
2068
+ existingWorkItemId: z.ZodOptional<z.ZodString>;
2069
+ runId: z.ZodOptional<z.ZodString>;
2070
+ tool: z.ZodLiteral<string>;
2071
+ }, z.core.$strict>]>;
2072
+ readonly work_checkpoint: z.ZodUnion<readonly [z.ZodObject<{
2073
+ tool: z.ZodLiteral<"work_checkpoint">;
2074
+ sessionId: z.ZodString;
2075
+ ok: z.ZodLiteral<true>;
2076
+ action: z.ZodLiteral<"register">;
2077
+ runId: z.ZodString;
2078
+ reused: z.ZodBoolean;
2079
+ tasks: z.ZodNumber;
2080
+ checkpoints: z.ZodNumber;
2081
+ }, z.core.$strict>, z.ZodObject<{
2082
+ tool: z.ZodLiteral<"work_checkpoint">;
2083
+ sessionId: z.ZodString;
2084
+ ok: z.ZodLiteral<true>;
2085
+ action: z.ZodLiteral<"start">;
2086
+ runId: z.ZodString;
2087
+ checkpointId: z.ZodString;
2088
+ generation: z.ZodOptional<z.ZodNumber>;
2089
+ reviewWorkItemId: z.ZodString;
2090
+ header: z.ZodString;
2091
+ reviewersToLaunch: z.ZodArray<z.ZodEnum<{
2092
+ spec: "spec";
2093
+ code: "code";
2094
+ }>>;
2095
+ coveredAttemptIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2096
+ }, z.core.$strict>, z.ZodObject<{
2097
+ tool: z.ZodLiteral<"work_checkpoint">;
2098
+ sessionId: z.ZodString;
2099
+ ok: z.ZodLiteral<true>;
2100
+ action: z.ZodLiteral<"verify">;
2101
+ runId: z.ZodString;
2102
+ checkpointId: z.ZodString;
2103
+ outcome: z.ZodEnum<{
2104
+ failed: "failed";
2105
+ passed: "passed";
2106
+ stale: "stale";
2107
+ stopped: "stopped";
2108
+ incomplete: "incomplete";
2109
+ "already-passed": "already-passed";
2110
+ }>;
2111
+ snapshotCurrent: z.ZodBoolean;
2112
+ sealedRun: z.ZodOptional<z.ZodBoolean>;
2113
+ }, z.core.$strict>, z.ZodObject<{
2114
+ tool: z.ZodLiteral<"work_checkpoint">;
2115
+ sessionId: z.ZodString;
2116
+ ok: z.ZodLiteral<true>;
2117
+ action: z.ZodEnum<{
2118
+ verify: "verify";
2119
+ review: "review";
2120
+ bind: "bind";
2121
+ }>;
2122
+ runId: z.ZodString;
2123
+ checkpointId: z.ZodString;
2124
+ reviewer: z.ZodOptional<z.ZodEnum<{
2125
+ spec: "spec";
2126
+ code: "code";
2127
+ }>>;
2128
+ outcome: z.ZodEnum<{
2129
+ in_progress: "in_progress";
2130
+ failed: "failed";
2131
+ passed: "passed";
2132
+ stopped: "stopped";
2133
+ }>;
2134
+ checkpointStatus: z.ZodEnum<{
2135
+ pending: "pending";
2136
+ failed: "failed";
2137
+ in_review: "in_review";
2138
+ passed: "passed";
2139
+ }>;
2140
+ }, z.core.$strict>, z.ZodObject<{
2141
+ tool: z.ZodLiteral<"work_checkpoint">;
2142
+ sessionId: z.ZodString;
2143
+ ok: z.ZodLiteral<true>;
2144
+ action: z.ZodLiteral<"recover">;
2145
+ runId: z.ZodString;
2146
+ checkpointId: z.ZodString;
2147
+ recoveryId: z.ZodString;
2148
+ kind: z.ZodEnum<{
2149
+ resume: "resume";
2150
+ autonomous_grant: "autonomous_grant";
2151
+ user_grant: "user_grant";
2152
+ advance_grant: "advance_grant";
2153
+ }>;
2154
+ checkpointStatus: z.ZodEnum<{
2155
+ pending: "pending";
2156
+ failed: "failed";
2157
+ in_review: "in_review";
2158
+ passed: "passed";
2159
+ }>;
2160
+ generationBudget: z.ZodOptional<z.ZodNumber>;
2161
+ settledStoppedGeneration: z.ZodOptional<z.ZodNumber>;
2162
+ lastOutcome: z.ZodOptional<z.ZodEnum<{
2163
+ failed: "failed";
2164
+ passed: "passed";
2165
+ stale: "stale";
2166
+ stopped: "stopped";
2167
+ incomplete: "incomplete";
2168
+ }>>;
2169
+ }, z.core.$strict>, z.ZodObject<{
2170
+ tool: z.ZodLiteral<"work_checkpoint">;
2171
+ sessionId: z.ZodString;
2172
+ runId: z.ZodString;
2173
+ ok: z.ZodLiteral<true>;
2174
+ action: z.ZodLiteral<"amend">;
2175
+ revision: z.ZodNumber;
2176
+ execution: z.ZodObject<{
2177
+ runId: z.ZodString;
2178
+ sessionId: z.ZodString;
2179
+ executionKey: z.ZodString;
2180
+ sourceKind: z.ZodEnum<{
2181
+ "native-package": "native-package";
2182
+ "provided-plan": "provided-plan";
2183
+ "conversation-scoped": "conversation-scoped";
2184
+ }>;
2185
+ goal: z.ZodString;
2186
+ state: z.ZodEnum<{
2187
+ preparing: "preparing";
2188
+ active: "active";
2189
+ sealed: "sealed";
2190
+ }>;
2191
+ revision: z.ZodNumber;
2192
+ tasks: z.ZodArray<z.ZodObject<{
2193
+ taskId: z.ZodString;
2194
+ workItemId: z.ZodString;
2195
+ status: z.ZodEnum<{
2196
+ pending: "pending";
2197
+ launched: "launched";
2198
+ accepted: "accepted";
2199
+ superseded: "superseded";
2200
+ }>;
2201
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
2202
+ spec: "spec";
2203
+ code: "code";
2204
+ }>>;
2205
+ dependsOn: z.ZodArray<z.ZodString>;
2206
+ blockedBy: z.ZodArray<z.ZodString>;
2207
+ latestAttempt: z.ZodOptional<z.ZodObject<{
2208
+ attempt: z.ZodNumber;
2209
+ status: z.ZodEnum<{
2210
+ completed: "completed";
2211
+ in_flight: "in_flight";
2212
+ failed: "failed";
2213
+ report_rejected: "report_rejected";
2214
+ }>;
2215
+ resultStatus: z.ZodOptional<z.ZodEnum<{
2216
+ DONE: "DONE";
2217
+ DONE_WITH_CONCERNS: "DONE_WITH_CONCERNS";
2218
+ NEEDS_CONTEXT: "NEEDS_CONTEXT";
2219
+ BLOCKED: "BLOCKED";
2220
+ }>>;
2221
+ completedAt: z.ZodOptional<z.ZodString>;
2222
+ reportRejected: z.ZodBoolean;
2223
+ }, z.core.$strict>>;
2224
+ }, z.core.$strict>>;
2225
+ checkpoints: z.ZodArray<z.ZodObject<{
2226
+ checkpointId: z.ZodString;
2227
+ kind: z.ZodEnum<{
2228
+ milestone: "milestone";
2229
+ final: "final";
2230
+ }>;
2231
+ covers: z.ZodArray<z.ZodString>;
2232
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
2233
+ spec: "spec";
2234
+ code: "code";
2235
+ }>>;
2236
+ status: z.ZodOptional<z.ZodString>;
2237
+ reviewWorkItemId: z.ZodOptional<z.ZodString>;
2238
+ generation: z.ZodOptional<z.ZodNumber>;
2239
+ recoveryCount: z.ZodOptional<z.ZodNumber>;
2240
+ attempts: z.ZodOptional<z.ZodNumber>;
2241
+ generationBudget: z.ZodOptional<z.ZodNumber>;
2242
+ remainingGenerations: z.ZodOptional<z.ZodNumber>;
2243
+ lastOutcome: z.ZodOptional<z.ZodEnum<{
2244
+ failed: "failed";
2245
+ passed: "passed";
2246
+ stale: "stale";
2247
+ stopped: "stopped";
2248
+ incomplete: "incomplete";
2249
+ }>>;
2250
+ nextAction: z.ZodOptional<z.ZodEnum<{
2251
+ start: "start";
2252
+ blocked: "blocked";
2253
+ recover: "recover";
2254
+ recover_with_user_authorization: "recover_with_user_authorization";
2255
+ passed: "passed";
2256
+ collect_and_verify: "collect_and_verify";
2257
+ start_next_generation: "start_next_generation";
2258
+ }>>;
2259
+ prerequisite: z.ZodOptional<z.ZodString>;
2260
+ currentReview: z.ZodOptional<z.ZodObject<{
2261
+ reviewWorkItemId: z.ZodString;
2262
+ generation: z.ZodNumber;
2263
+ coveredAttemptIds: z.ZodArray<z.ZodString>;
2264
+ recordedReviewers: z.ZodArray<z.ZodString>;
2265
+ }, z.core.$strict>>;
2266
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
2267
+ generation: z.ZodNumber;
2268
+ outcome: z.ZodEnum<{
2269
+ failed: "failed";
2270
+ passed: "passed";
2271
+ stale: "stale";
2272
+ stopped: "stopped";
2273
+ }>;
2274
+ completedAt: z.ZodString;
2275
+ }, z.core.$strict>>>;
2276
+ }, z.core.$strict>>;
2277
+ authority: z.ZodOptional<z.ZodArray<z.ZodObject<{
2278
+ authorityId: z.ZodString;
2279
+ availableUnits: z.ZodNumber;
2280
+ revoked: z.ZodBoolean;
2281
+ stages: z.ZodArray<z.ZodEnum<{
2282
+ implementation: "implementation";
2283
+ specification: "specification";
2284
+ planning: "planning";
2285
+ verification: "verification";
2286
+ }>>;
2287
+ reservedStops: z.ZodArray<z.ZodEnum<{
2288
+ implementation: "implementation";
2289
+ specification: "specification";
2290
+ planning: "planning";
2291
+ verification: "verification";
2292
+ }>>;
2293
+ prerequisites: z.ZodArray<z.ZodString>;
2294
+ }, z.core.$strict>>>;
2295
+ }, z.core.$strict>;
2296
+ }, z.core.$strict>, z.ZodObject<{
2297
+ tool: z.ZodLiteral<"work_checkpoint">;
2298
+ sessionId: z.ZodString;
2299
+ runId: z.ZodString;
2300
+ ok: z.ZodLiteral<true>;
2301
+ action: z.ZodLiteral<"complete">;
2302
+ reviewStatus: z.ZodEnum<{
2303
+ controller_accepted: "controller_accepted";
2304
+ independently_reviewed: "independently_reviewed";
2305
+ }>;
2306
+ execution: z.ZodObject<{
2307
+ runId: z.ZodString;
2308
+ sessionId: z.ZodString;
2309
+ executionKey: z.ZodString;
2310
+ sourceKind: z.ZodEnum<{
2311
+ "native-package": "native-package";
2312
+ "provided-plan": "provided-plan";
2313
+ "conversation-scoped": "conversation-scoped";
2314
+ }>;
2315
+ goal: z.ZodString;
2316
+ state: z.ZodEnum<{
2317
+ preparing: "preparing";
2318
+ active: "active";
2319
+ sealed: "sealed";
2320
+ }>;
2321
+ revision: z.ZodNumber;
2322
+ tasks: z.ZodArray<z.ZodObject<{
2323
+ taskId: z.ZodString;
2324
+ workItemId: z.ZodString;
2325
+ status: z.ZodEnum<{
2326
+ pending: "pending";
2327
+ launched: "launched";
2328
+ accepted: "accepted";
2329
+ superseded: "superseded";
2330
+ }>;
2331
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
2332
+ spec: "spec";
2333
+ code: "code";
2334
+ }>>;
2335
+ dependsOn: z.ZodArray<z.ZodString>;
2336
+ blockedBy: z.ZodArray<z.ZodString>;
2337
+ latestAttempt: z.ZodOptional<z.ZodObject<{
2338
+ attempt: z.ZodNumber;
2339
+ status: z.ZodEnum<{
2340
+ completed: "completed";
2341
+ in_flight: "in_flight";
2342
+ failed: "failed";
2343
+ report_rejected: "report_rejected";
2344
+ }>;
2345
+ resultStatus: z.ZodOptional<z.ZodEnum<{
2346
+ DONE: "DONE";
2347
+ DONE_WITH_CONCERNS: "DONE_WITH_CONCERNS";
2348
+ NEEDS_CONTEXT: "NEEDS_CONTEXT";
2349
+ BLOCKED: "BLOCKED";
2350
+ }>>;
2351
+ completedAt: z.ZodOptional<z.ZodString>;
2352
+ reportRejected: z.ZodBoolean;
2353
+ }, z.core.$strict>>;
2354
+ }, z.core.$strict>>;
2355
+ checkpoints: z.ZodArray<z.ZodObject<{
2356
+ checkpointId: z.ZodString;
2357
+ kind: z.ZodEnum<{
2358
+ milestone: "milestone";
2359
+ final: "final";
2360
+ }>;
2361
+ covers: z.ZodArray<z.ZodString>;
2362
+ requiredReviewers: z.ZodArray<z.ZodEnum<{
2363
+ spec: "spec";
2364
+ code: "code";
2365
+ }>>;
2366
+ status: z.ZodOptional<z.ZodString>;
2367
+ reviewWorkItemId: z.ZodOptional<z.ZodString>;
2368
+ generation: z.ZodOptional<z.ZodNumber>;
2369
+ recoveryCount: z.ZodOptional<z.ZodNumber>;
2370
+ attempts: z.ZodOptional<z.ZodNumber>;
2371
+ generationBudget: z.ZodOptional<z.ZodNumber>;
2372
+ remainingGenerations: z.ZodOptional<z.ZodNumber>;
2373
+ lastOutcome: z.ZodOptional<z.ZodEnum<{
2374
+ failed: "failed";
2375
+ passed: "passed";
2376
+ stale: "stale";
2377
+ stopped: "stopped";
2378
+ incomplete: "incomplete";
2379
+ }>>;
2380
+ nextAction: z.ZodOptional<z.ZodEnum<{
2381
+ start: "start";
2382
+ blocked: "blocked";
2383
+ recover: "recover";
2384
+ recover_with_user_authorization: "recover_with_user_authorization";
2385
+ passed: "passed";
2386
+ collect_and_verify: "collect_and_verify";
2387
+ start_next_generation: "start_next_generation";
2388
+ }>>;
2389
+ prerequisite: z.ZodOptional<z.ZodString>;
2390
+ currentReview: z.ZodOptional<z.ZodObject<{
2391
+ reviewWorkItemId: z.ZodString;
2392
+ generation: z.ZodNumber;
2393
+ coveredAttemptIds: z.ZodArray<z.ZodString>;
2394
+ recordedReviewers: z.ZodArray<z.ZodString>;
2395
+ }, z.core.$strict>>;
2396
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
2397
+ generation: z.ZodNumber;
2398
+ outcome: z.ZodEnum<{
2399
+ failed: "failed";
2400
+ passed: "passed";
2401
+ stale: "stale";
2402
+ stopped: "stopped";
2403
+ }>;
2404
+ completedAt: z.ZodString;
2405
+ }, z.core.$strict>>>;
2406
+ }, z.core.$strict>>;
2407
+ authority: z.ZodOptional<z.ZodArray<z.ZodObject<{
2408
+ authorityId: z.ZodString;
2409
+ availableUnits: z.ZodNumber;
2410
+ revoked: z.ZodBoolean;
2411
+ stages: z.ZodArray<z.ZodEnum<{
2412
+ implementation: "implementation";
2413
+ specification: "specification";
2414
+ planning: "planning";
2415
+ verification: "verification";
2416
+ }>>;
2417
+ reservedStops: z.ZodArray<z.ZodEnum<{
2418
+ implementation: "implementation";
2419
+ specification: "specification";
2420
+ planning: "planning";
2421
+ verification: "verification";
2422
+ }>>;
2423
+ prerequisites: z.ZodArray<z.ZodString>;
2424
+ }, z.core.$strict>>>;
2425
+ }, z.core.$strict>;
2426
+ }, z.core.$strict>, z.ZodObject<{
2427
+ tool: z.ZodLiteral<"work_checkpoint">;
2428
+ sessionId: z.ZodString;
2429
+ runId: z.ZodString;
2430
+ ok: z.ZodLiteral<true>;
2431
+ action: z.ZodLiteral<"authorize">;
2432
+ authorityId: z.ZodString;
2433
+ reused: z.ZodOptional<z.ZodBoolean>;
2434
+ units: z.ZodOptional<z.ZodNumber>;
2435
+ extensions: z.ZodOptional<z.ZodNumber>;
2436
+ availableUnits: z.ZodNumber;
2437
+ }, z.core.$strict>, z.ZodObject<{
2438
+ tool: z.ZodLiteral<"work_checkpoint">;
2439
+ sessionId: z.ZodString;
2440
+ runId: z.ZodString;
2441
+ ok: z.ZodLiteral<true>;
2442
+ action: z.ZodLiteral<"record_approval">;
2443
+ approvalId: z.ZodString;
2444
+ stage: z.ZodEnum<{
2445
+ implementation: "implementation";
2446
+ specification: "specification";
2447
+ planning: "planning";
2448
+ verification: "verification";
2449
+ }>;
2450
+ provenance: z.ZodEnum<{
2451
+ controller_delegated: "controller_delegated";
2452
+ user_observed: "user_observed";
2453
+ unspecified: "unspecified";
2454
+ }>;
2455
+ }, z.core.$strict>, z.ZodObject<{
2456
+ tool: z.ZodLiteral<"work_checkpoint">;
2457
+ sessionId: z.ZodString;
2458
+ runId: z.ZodString;
2459
+ ok: z.ZodLiteral<true>;
2460
+ action: z.ZodLiteral<"revoke_authority">;
2461
+ authorityId: z.ZodString;
2462
+ kind: z.ZodEnum<{
2463
+ narrow: "narrow";
2464
+ revoke: "revoke";
2465
+ }>;
2466
+ availableUnits: z.ZodNumber;
2467
+ stages: z.ZodArray<z.ZodEnum<{
2468
+ implementation: "implementation";
2469
+ specification: "specification";
2470
+ planning: "planning";
2471
+ verification: "verification";
2472
+ }>>;
2473
+ }, z.core.$strict>, z.ZodObject<{
2474
+ sessionId: z.ZodOptional<z.ZodString>;
2475
+ ok: z.ZodLiteral<false>;
2476
+ errorCode: z.ZodString;
2477
+ category: z.ZodEnum<{
2478
+ input: "input";
2479
+ host_context: "host_context";
2480
+ state: "state";
2481
+ authorization: "authorization";
2482
+ persistence: "persistence";
2483
+ internal: "internal";
2484
+ }>;
2485
+ message: z.ZodString;
2486
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
2487
+ code: z.ZodEnum<{
2488
+ unrecognized_keys: "unrecognized_keys";
2489
+ invalid_value: "invalid_value";
2490
+ invalid_type: "invalid_type";
2491
+ invalid_format: "invalid_format";
2492
+ too_small: "too_small";
2493
+ too_big: "too_big";
2494
+ missing_value: "missing_value";
2495
+ invalid_union: "invalid_union";
2496
+ custom: "custom";
2497
+ }>;
2498
+ path: z.ZodString;
2499
+ message: z.ZodString;
2500
+ expected: z.ZodOptional<z.ZodString>;
2501
+ received: z.ZodOptional<z.ZodString>;
2502
+ }, z.core.$strict>>>;
2503
+ state: z.ZodOptional<z.ZodString>;
2504
+ attempt: z.ZodOptional<z.ZodNumber>;
2505
+ attemptStatus: z.ZodOptional<z.ZodString>;
2506
+ resultStatus: z.ZodOptional<z.ZodString>;
2507
+ attemptBudget: z.ZodOptional<z.ZodNumber>;
2508
+ remainingAttempts: z.ZodOptional<z.ZodNumber>;
2509
+ recoveryCount: z.ZodOptional<z.ZodNumber>;
2510
+ pendingReviewers: z.ZodOptional<z.ZodArray<z.ZodString>>;
2511
+ prerequisite: z.ZodOptional<z.ZodString>;
2512
+ nextAction: z.ZodOptional<z.ZodString>;
2513
+ outcome: z.ZodOptional<z.ZodEnum<{
2514
+ unknown: "unknown";
2515
+ committed: "committed";
2516
+ not_applied: "not_applied";
2517
+ rolled_back: "rolled_back";
2518
+ }>>;
2519
+ applied: z.ZodOptional<z.ZodBoolean>;
2520
+ retrySafe: z.ZodOptional<z.ZodBoolean>;
2521
+ existingWorkItemId: z.ZodOptional<z.ZodString>;
2522
+ runId: z.ZodOptional<z.ZodString>;
2523
+ tool: z.ZodLiteral<string>;
2524
+ }, z.core.$strict>]>;
2525
+ };
2526
+ export type WorkflowToolResultToolId = keyof typeof workflowToolResultSchemas;
2527
+ /** Schema-derived per-tool result DTO map for future inspection/catalog consumers. */
2528
+ export type WorkflowToolResultMap = {
2529
+ [K in WorkflowToolResultToolId]: z.infer<(typeof workflowToolResultSchemas)[K]>;
2530
+ };
2531
+ /** Bounded loaded-identity view returned by work_item_list.contract. */
2532
+ export type WorkflowContractIdentity = z.infer<typeof workflowContractIdentitySchema>;
2533
+ /** Read-only execution view shared by generic register/amend/complete and inspection. */
2534
+ export type WorkflowExecutionView = z.infer<typeof executionViewSchema>;
2535
+ /** Read-only native plan-run view kept alongside the unified execution view. */
2536
+ export type WorkflowDelegatedRunView = z.infer<typeof delegatedRunViewSchema>;
2537
+ /** Read-only work-item view, including delegated budget/guidance, returned by work_item_list.items. */
2538
+ export type WorkflowWorkItemView = z.infer<typeof workItemViewSchema>;
2539
+ /** Additive work_item_list inspection payload. */
2540
+ export type WorkflowInspectionView = z.infer<typeof workItemListViewSchema>;
2541
+ /** Closed result schema for one owned workflow tool id, preserving its inferred type. */
2542
+ export declare function workflowToolResultSchema<K extends WorkflowToolResultToolId>(toolId: K): (typeof workflowToolResultSchemas)[K];
2543
+ /**
2544
+ * Producer/test validation of one owned workflow tool result against its
2545
+ * closed schema. It does not normalize or repair failures first: a malformed
2546
+ * producer representation fails rather than being made compliant. Producers
2547
+ * apply `finalizeWorkflowResult` before this is used on their output.
2548
+ * Never call this as a throw-after-side-effect execute wrapper.
2549
+ */
2550
+ export declare function validateWorkflowToolResult(toolId: WorkflowToolResultToolId, value: unknown): {
2551
+ ok: true;
2552
+ } | {
2553
+ ok: false;
2554
+ issues: readonly ContractIssue[];
2555
+ };
2556
+ /**
2557
+ * Serialize a public workflow result. Producers finalize category/guidance
2558
+ * before this point, so this is a pure presentation step (no silent repair). If
2559
+ * serialization itself fails after execution, produce a bounded truthful
2560
+ * internal error carrying the observed outcome instead of throwing raw or
2561
+ * inviting an unqualified replay. An `unknown` outcome omits `applied`.
2562
+ */
2563
+ export declare function serializeWorkflowResult(value: Record<string, unknown>, options?: {
2564
+ outcome?: WorkflowMutationOutcome;
2565
+ }): string;
2566
+ export {};