acpus 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -2,69 +2,31 @@ import { z } from "zod";
2
2
 
3
3
  //#region src/schema/workflow-spec.d.ts
4
4
  declare const SCHEMA_VERSION = "acpus.workflow/v1";
5
- declare const InputTypeSchema: z.ZodEnum<{
6
- string: "string";
7
- number: "number";
8
- boolean: "boolean";
9
- path: "path";
10
- glob: "glob";
11
- json: "json";
12
- "array<string>": "array<string>";
13
- "array<path>": "array<path>";
14
- "array<json>": "array<json>";
15
- }>;
16
- declare const InputDeclarationSchema: z.ZodObject<{
17
- type: z.ZodEnum<{
18
- string: "string";
19
- number: "number";
20
- boolean: "boolean";
21
- path: "path";
22
- glob: "glob";
23
- json: "json";
24
- "array<string>": "array<string>";
25
- "array<path>": "array<path>";
26
- "array<json>": "array<json>";
27
- }>;
28
- default: z.ZodOptional<z.ZodUnknown>;
5
+ declare const WorkflowInputSchema: z.ZodObject<{
6
+ schema: z.ZodString;
7
+ default: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
29
8
  description: z.ZodOptional<z.ZodString>;
30
- }, z.core.$strip>;
31
- declare const RoleCategorySchema: z.ZodEnum<{
32
- planning: "planning";
33
- implementation: "implementation";
34
- validation: "validation";
35
- review: "review";
36
- research: "research";
37
- summarization: "summarization";
38
- coordination: "coordination";
39
- }>;
40
- declare const RoleModeSchema: z.ZodEnum<{
9
+ }, z.core.$strict>;
10
+ declare const ActorModeSchema: z.ZodEnum<{
41
11
  denyAll: "denyAll";
42
12
  readOnly: "readOnly";
43
13
  edit: "edit";
44
14
  }>;
45
- declare const RoleSchema: z.ZodObject<{
46
- category: z.ZodEnum<{
47
- planning: "planning";
48
- implementation: "implementation";
49
- validation: "validation";
50
- review: "review";
51
- research: "research";
52
- summarization: "summarization";
53
- coordination: "coordination";
54
- }>;
15
+ declare const ActorSchema: z.ZodObject<{
55
16
  agent: z.ZodString;
56
17
  mode: z.ZodEnum<{
57
18
  denyAll: "denyAll";
58
19
  readOnly: "readOnly";
59
20
  edit: "edit";
60
21
  }>;
61
- }, z.core.$strip>;
22
+ label: z.ZodOptional<z.ZodString>;
23
+ }, z.core.$strict>;
62
24
  declare const TransformSchema: z.ZodObject<{
63
25
  fn: z.ZodEnum<{
64
- json: "json";
65
26
  default: "default";
66
27
  compact: "compact";
67
28
  tail: "tail";
29
+ json: "json";
68
30
  quoteBlock: "quoteBlock";
69
31
  pathList: "pathList";
70
32
  filterSeverity: "filterSeverity";
@@ -72,16 +34,16 @@ declare const TransformSchema: z.ZodObject<{
72
34
  join: "join";
73
35
  }>;
74
36
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
75
- }, z.core.$strip>;
37
+ }, z.core.$strict>;
76
38
  declare const VariableSchema: z.ZodObject<{
77
39
  name: z.ZodString;
78
40
  source: z.ZodString;
79
41
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
80
42
  fn: z.ZodEnum<{
81
- json: "json";
82
43
  default: "default";
83
44
  compact: "compact";
84
45
  tail: "tail";
46
+ json: "json";
85
47
  quoteBlock: "quoteBlock";
86
48
  pathList: "pathList";
87
49
  filterSeverity: "filterSeverity";
@@ -89,179 +51,43 @@ declare const VariableSchema: z.ZodObject<{
89
51
  join: "join";
90
52
  }>;
91
53
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
92
- }, z.core.$strip>>>;
93
- }, z.core.$strip>;
54
+ }, z.core.$strict>>>;
55
+ }, z.core.$strict>;
56
+ declare const PositiveIntegerLimitSchema: z.ZodNumber;
57
+ declare const LimitBindingSchema: z.ZodObject<{
58
+ source: z.ZodString;
59
+ default: z.ZodOptional<z.ZodNumber>;
60
+ }, z.core.$strict>;
61
+ declare const LimitValueSchema: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
62
+ source: z.ZodString;
63
+ default: z.ZodOptional<z.ZodNumber>;
64
+ }, z.core.$strict>]>;
94
65
  declare const WorkflowLimitsSchema: z.ZodObject<{
95
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
66
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
67
+ source: z.ZodString;
68
+ default: z.ZodOptional<z.ZodNumber>;
69
+ }, z.core.$strict>]>>;
96
70
  }, z.core.$strict>;
97
71
  declare const StageLimitsSchema: z.ZodObject<{
98
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
99
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
100
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
72
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
73
+ source: z.ZodString;
74
+ default: z.ZodOptional<z.ZodNumber>;
75
+ }, z.core.$strict>]>>;
76
+ }, z.core.$strict>;
77
+ declare const FanoutStageLimitsSchema: z.ZodObject<{
78
+ maxConcurrency: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
79
+ source: z.ZodString;
80
+ default: z.ZodOptional<z.ZodNumber>;
81
+ }, z.core.$strict>]>>;
82
+ maxFanoutItems: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
83
+ source: z.ZodString;
84
+ default: z.ZodOptional<z.ZodNumber>;
85
+ }, z.core.$strict>]>>;
86
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
87
+ source: z.ZodString;
88
+ default: z.ZodOptional<z.ZodNumber>;
89
+ }, z.core.$strict>]>>;
101
90
  }, z.core.$strict>;
102
- declare const ArtifactSchema: z.ZodObject<{
103
- kind: z.ZodOptional<z.ZodString>;
104
- path: z.ZodOptional<z.ZodString>;
105
- url: z.ZodOptional<z.ZodString>;
106
- label: z.ZodOptional<z.ZodString>;
107
- }, z.core.$strip>;
108
- declare const SeverityCountsSchema: z.ZodObject<{
109
- P0: z.ZodNumber;
110
- P1: z.ZodNumber;
111
- P2: z.ZodNumber;
112
- P3: z.ZodNumber;
113
- }, z.core.$strip>;
114
- declare const FindingSchema: z.ZodObject<{
115
- severity: z.ZodEnum<{
116
- P0: "P0";
117
- P1: "P1";
118
- P2: "P2";
119
- P3: "P3";
120
- }>;
121
- summary: z.ZodString;
122
- path: z.ZodOptional<z.ZodString>;
123
- details: z.ZodOptional<z.ZodString>;
124
- }, z.core.$strip>;
125
- declare const CheckSchema: z.ZodObject<{
126
- command: z.ZodOptional<z.ZodString>;
127
- name: z.ZodOptional<z.ZodString>;
128
- status: z.ZodEnum<{
129
- unknown: "unknown";
130
- pass: "pass";
131
- fail: "fail";
132
- skipped: "skipped";
133
- }>;
134
- summary: z.ZodOptional<z.ZodString>;
135
- }, z.core.$strip>;
136
- declare const BaseOutputSchema: z.ZodObject<{
137
- status: z.ZodEnum<{
138
- completed: "completed";
139
- blocked: "blocked";
140
- }>;
141
- summary: z.ZodString;
142
- artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
143
- kind: z.ZodOptional<z.ZodString>;
144
- path: z.ZodOptional<z.ZodString>;
145
- url: z.ZodOptional<z.ZodString>;
146
- label: z.ZodOptional<z.ZodString>;
147
- }, z.core.$strip>>>;
148
- nextFocus: z.ZodDefault<z.ZodString>;
149
- data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
150
- }, z.core.$strip>;
151
- declare const ValidationOutputSchema: z.ZodObject<{
152
- status: z.ZodEnum<{
153
- completed: "completed";
154
- blocked: "blocked";
155
- }>;
156
- summary: z.ZodString;
157
- artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
158
- kind: z.ZodOptional<z.ZodString>;
159
- path: z.ZodOptional<z.ZodString>;
160
- url: z.ZodOptional<z.ZodString>;
161
- label: z.ZodOptional<z.ZodString>;
162
- }, z.core.$strip>>>;
163
- nextFocus: z.ZodDefault<z.ZodString>;
164
- data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
165
- verdict: z.ZodEnum<{
166
- unknown: "unknown";
167
- pass: "pass";
168
- blocked: "blocked";
169
- fix: "fix";
170
- }>;
171
- severityCounts: z.ZodObject<{
172
- P0: z.ZodNumber;
173
- P1: z.ZodNumber;
174
- P2: z.ZodNumber;
175
- P3: z.ZodNumber;
176
- }, z.core.$strip>;
177
- findings: z.ZodDefault<z.ZodArray<z.ZodObject<{
178
- severity: z.ZodEnum<{
179
- P0: "P0";
180
- P1: "P1";
181
- P2: "P2";
182
- P3: "P3";
183
- }>;
184
- summary: z.ZodString;
185
- path: z.ZodOptional<z.ZodString>;
186
- details: z.ZodOptional<z.ZodString>;
187
- }, z.core.$strip>>>;
188
- checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
189
- command: z.ZodOptional<z.ZodString>;
190
- name: z.ZodOptional<z.ZodString>;
191
- status: z.ZodEnum<{
192
- unknown: "unknown";
193
- pass: "pass";
194
- fail: "fail";
195
- skipped: "skipped";
196
- }>;
197
- summary: z.ZodOptional<z.ZodString>;
198
- }, z.core.$strip>>>;
199
- }, z.core.$strip>;
200
- declare const ImplementationOutputSchema: z.ZodObject<{
201
- status: z.ZodEnum<{
202
- completed: "completed";
203
- blocked: "blocked";
204
- }>;
205
- summary: z.ZodString;
206
- artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
207
- kind: z.ZodOptional<z.ZodString>;
208
- path: z.ZodOptional<z.ZodString>;
209
- url: z.ZodOptional<z.ZodString>;
210
- label: z.ZodOptional<z.ZodString>;
211
- }, z.core.$strip>>>;
212
- nextFocus: z.ZodDefault<z.ZodString>;
213
- data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
214
- changedFiles: z.ZodDefault<z.ZodArray<z.ZodString>>;
215
- checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
216
- command: z.ZodOptional<z.ZodString>;
217
- name: z.ZodOptional<z.ZodString>;
218
- status: z.ZodEnum<{
219
- unknown: "unknown";
220
- pass: "pass";
221
- fail: "fail";
222
- skipped: "skipped";
223
- }>;
224
- summary: z.ZodOptional<z.ZodString>;
225
- }, z.core.$strip>>>;
226
- }, z.core.$strip>;
227
- declare const GateOutputSchema: z.ZodObject<{
228
- status: z.ZodEnum<{
229
- completed: "completed";
230
- blocked: "blocked";
231
- }>;
232
- summary: z.ZodString;
233
- artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
234
- kind: z.ZodOptional<z.ZodString>;
235
- path: z.ZodOptional<z.ZodString>;
236
- url: z.ZodOptional<z.ZodString>;
237
- label: z.ZodOptional<z.ZodString>;
238
- }, z.core.$strip>>>;
239
- nextFocus: z.ZodDefault<z.ZodString>;
240
- data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
241
- verdict: z.ZodEnum<{
242
- unknown: "unknown";
243
- pass: "pass";
244
- blocked: "blocked";
245
- pass_with_warnings: "pass_with_warnings";
246
- failed: "failed";
247
- }>;
248
- deliverables: z.ZodDefault<z.ZodArray<z.ZodString>>;
249
- changedFiles: z.ZodDefault<z.ZodArray<z.ZodString>>;
250
- checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
251
- command: z.ZodOptional<z.ZodString>;
252
- name: z.ZodOptional<z.ZodString>;
253
- status: z.ZodEnum<{
254
- unknown: "unknown";
255
- pass: "pass";
256
- fail: "fail";
257
- skipped: "skipped";
258
- }>;
259
- summary: z.ZodOptional<z.ZodString>;
260
- }, z.core.$strip>>>;
261
- warnings: z.ZodDefault<z.ZodArray<z.ZodString>>;
262
- risks: z.ZodDefault<z.ZodArray<z.ZodString>>;
263
- nextActions: z.ZodDefault<z.ZodArray<z.ZodString>>;
264
- }, z.core.$strip>;
265
91
  type Condition = {
266
92
  source?: string;
267
93
  op?: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "exists" | "empty";
@@ -271,32 +97,11 @@ type Condition = {
271
97
  not?: Condition;
272
98
  };
273
99
  declare const ConditionSchema: z.ZodType<Condition>;
274
- declare const DecisionRuleSchema: z.ZodObject<{
100
+ declare const RouteRuleSchema: z.ZodObject<{
275
101
  when: z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>;
276
102
  to: z.ZodString;
277
- }, z.core.$strip>;
278
- declare const FanoutLaneSchema: z.ZodObject<{
279
- id: z.ZodString;
280
- role: z.ZodString;
281
- prompt: z.ZodOptional<z.ZodString>;
282
- when: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
283
- default: z.ZodOptional<z.ZodBoolean>;
284
- }, z.core.$strip>;
285
- declare const FanoutLaneGroupSchema: z.ZodObject<{
286
- id: z.ZodString;
287
- mode: z.ZodEnum<{
288
- all: "all";
289
- oneOf: "oneOf";
290
- }>;
291
- lanes: z.ZodArray<z.ZodObject<{
292
- id: z.ZodString;
293
- role: z.ZodString;
294
- prompt: z.ZodOptional<z.ZodString>;
295
- when: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
296
- default: z.ZodOptional<z.ZodBoolean>;
297
- }, z.core.$strip>>;
298
- }, z.core.$strip>;
299
- declare const AgentTaskStageSchema: z.ZodObject<{
103
+ }, z.core.$strict>;
104
+ declare const TaskAgentStageSchema: z.ZodObject<{
300
105
  id: z.ZodString;
301
106
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
302
107
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -304,10 +109,10 @@ declare const AgentTaskStageSchema: z.ZodObject<{
304
109
  source: z.ZodString;
305
110
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
306
111
  fn: z.ZodEnum<{
307
- json: "json";
308
112
  default: "default";
309
113
  compact: "compact";
310
114
  tail: "tail";
115
+ json: "json";
311
116
  quoteBlock: "quoteBlock";
312
117
  pathList: "pathList";
313
118
  filterSeverity: "filterSeverity";
@@ -315,18 +120,31 @@ declare const AgentTaskStageSchema: z.ZodObject<{
315
120
  join: "join";
316
121
  }>;
317
122
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
318
- }, z.core.$strip>>>;
319
- }, z.core.$strip>>>;
123
+ }, z.core.$strict>>>;
124
+ }, z.core.$strict>>>;
320
125
  limits: z.ZodOptional<z.ZodObject<{
321
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
322
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
323
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
126
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
127
+ source: z.ZodString;
128
+ default: z.ZodOptional<z.ZodNumber>;
129
+ }, z.core.$strict>]>>;
324
130
  }, z.core.$strict>>;
325
- kind: z.ZodLiteral<"agentTask">;
326
- role: z.ZodString;
131
+ kind: z.ZodLiteral<"task">;
132
+ mode: z.ZodLiteral<"agent">;
133
+ actor: z.ZodObject<{
134
+ agent: z.ZodString;
135
+ mode: z.ZodEnum<{
136
+ denyAll: "denyAll";
137
+ readOnly: "readOnly";
138
+ edit: "edit";
139
+ }>;
140
+ label: z.ZodOptional<z.ZodString>;
141
+ }, z.core.$strict>;
327
142
  prompt: z.ZodString;
328
- }, z.core.$strip>;
329
- declare const DiscoverStageSchema: z.ZodObject<{
143
+ output: z.ZodOptional<z.ZodObject<{
144
+ schema: z.ZodString;
145
+ }, z.core.$strict>>;
146
+ }, z.core.$strict>;
147
+ declare const TaskProgramStageSchema: z.ZodObject<{
330
148
  id: z.ZodString;
331
149
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
332
150
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -334,10 +152,10 @@ declare const DiscoverStageSchema: z.ZodObject<{
334
152
  source: z.ZodString;
335
153
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
336
154
  fn: z.ZodEnum<{
337
- json: "json";
338
155
  default: "default";
339
156
  compact: "compact";
340
157
  tail: "tail";
158
+ json: "json";
341
159
  quoteBlock: "quoteBlock";
342
160
  pathList: "pathList";
343
161
  filterSeverity: "filterSeverity";
@@ -345,25 +163,24 @@ declare const DiscoverStageSchema: z.ZodObject<{
345
163
  join: "join";
346
164
  }>;
347
165
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
348
- }, z.core.$strip>>>;
349
- }, z.core.$strip>>>;
166
+ }, z.core.$strict>>>;
167
+ }, z.core.$strict>>>;
350
168
  limits: z.ZodOptional<z.ZodObject<{
351
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
352
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
353
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
169
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
170
+ source: z.ZodString;
171
+ default: z.ZodOptional<z.ZodNumber>;
172
+ }, z.core.$strict>]>>;
354
173
  }, z.core.$strict>>;
355
- kind: z.ZodLiteral<"discover">;
356
- method: z.ZodEnum<{
357
- glob: "glob";
358
- agent: "agent";
359
- gitChangedFiles: "gitChangedFiles";
360
- }>;
361
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
362
- output: z.ZodDefault<z.ZodString>;
363
- role: z.ZodOptional<z.ZodString>;
364
- prompt: z.ZodOptional<z.ZodString>;
365
- }, z.core.$strip>;
366
- declare const FanoutStageSchema: z.ZodObject<{
174
+ kind: z.ZodLiteral<"task">;
175
+ mode: z.ZodLiteral<"program">;
176
+ operation: z.ZodLiteral<"command">;
177
+ command: z.ZodString;
178
+ args: z.ZodDefault<z.ZodArray<z.ZodString>>;
179
+ cwd: z.ZodOptional<z.ZodString>;
180
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
181
+ allowMutation: z.ZodDefault<z.ZodBoolean>;
182
+ }, z.core.$strict>;
183
+ declare const TaskStageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
367
184
  id: z.ZodString;
368
185
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
369
186
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -371,10 +188,10 @@ declare const FanoutStageSchema: z.ZodObject<{
371
188
  source: z.ZodString;
372
189
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
373
190
  fn: z.ZodEnum<{
374
- json: "json";
375
191
  default: "default";
376
192
  compact: "compact";
377
193
  tail: "tail";
194
+ json: "json";
378
195
  quoteBlock: "quoteBlock";
379
196
  pathList: "pathList";
380
197
  filterSeverity: "filterSeverity";
@@ -382,39 +199,30 @@ declare const FanoutStageSchema: z.ZodObject<{
382
199
  join: "join";
383
200
  }>;
384
201
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
385
- }, z.core.$strip>>>;
386
- }, z.core.$strip>>>;
202
+ }, z.core.$strict>>>;
203
+ }, z.core.$strict>>>;
387
204
  limits: z.ZodOptional<z.ZodObject<{
388
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
389
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
390
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
205
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
206
+ source: z.ZodString;
207
+ default: z.ZodOptional<z.ZodNumber>;
208
+ }, z.core.$strict>]>>;
391
209
  }, z.core.$strict>>;
392
- kind: z.ZodLiteral<"fanout">;
393
- items: z.ZodObject<{
394
- source: z.ZodString;
395
- }, z.core.$strip>;
396
- prompt: z.ZodOptional<z.ZodString>;
397
- laneGroups: z.ZodArray<z.ZodObject<{
398
- id: z.ZodString;
210
+ kind: z.ZodLiteral<"task">;
211
+ mode: z.ZodLiteral<"agent">;
212
+ actor: z.ZodObject<{
213
+ agent: z.ZodString;
399
214
  mode: z.ZodEnum<{
400
- all: "all";
401
- oneOf: "oneOf";
215
+ denyAll: "denyAll";
216
+ readOnly: "readOnly";
217
+ edit: "edit";
402
218
  }>;
403
- lanes: z.ZodArray<z.ZodObject<{
404
- id: z.ZodString;
405
- role: z.ZodString;
406
- prompt: z.ZodOptional<z.ZodString>;
407
- when: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
408
- default: z.ZodOptional<z.ZodBoolean>;
409
- }, z.core.$strip>>;
410
- }, z.core.$strip>>;
411
- fanoutPolicy: z.ZodOptional<z.ZodObject<{
412
- allowPartial: z.ZodDefault<z.ZodBoolean>;
413
- minCompletedRatio: z.ZodOptional<z.ZodNumber>;
414
- maxBlockedItems: z.ZodOptional<z.ZodNumber>;
415
- }, z.core.$strip>>;
416
- }, z.core.$strip>;
417
- declare const ReduceStageSchema: z.ZodObject<{
219
+ label: z.ZodOptional<z.ZodString>;
220
+ }, z.core.$strict>;
221
+ prompt: z.ZodString;
222
+ output: z.ZodOptional<z.ZodObject<{
223
+ schema: z.ZodString;
224
+ }, z.core.$strict>>;
225
+ }, z.core.$strict>, z.ZodObject<{
418
226
  id: z.ZodString;
419
227
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
420
228
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -422,10 +230,10 @@ declare const ReduceStageSchema: z.ZodObject<{
422
230
  source: z.ZodString;
423
231
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
424
232
  fn: z.ZodEnum<{
425
- json: "json";
426
233
  default: "default";
427
234
  compact: "compact";
428
235
  tail: "tail";
236
+ json: "json";
429
237
  quoteBlock: "quoteBlock";
430
238
  pathList: "pathList";
431
239
  filterSeverity: "filterSeverity";
@@ -433,29 +241,24 @@ declare const ReduceStageSchema: z.ZodObject<{
433
241
  join: "join";
434
242
  }>;
435
243
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
436
- }, z.core.$strip>>>;
437
- }, z.core.$strip>>>;
244
+ }, z.core.$strict>>>;
245
+ }, z.core.$strict>>>;
438
246
  limits: z.ZodOptional<z.ZodObject<{
439
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
440
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
441
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
247
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
248
+ source: z.ZodString;
249
+ default: z.ZodOptional<z.ZodNumber>;
250
+ }, z.core.$strict>]>>;
442
251
  }, z.core.$strict>>;
443
- kind: z.ZodLiteral<"reduce">;
444
- mode: z.ZodDefault<z.ZodEnum<{
445
- agent: "agent";
446
- program: "program";
447
- }>>;
448
- from: z.ZodString;
449
- role: z.ZodOptional<z.ZodString>;
450
- prompt: z.ZodOptional<z.ZodString>;
451
- operation: z.ZodOptional<z.ZodEnum<{
452
- severitySummary: "severitySummary";
453
- mergeArrays: "mergeArrays";
454
- dedupeFindings: "dedupeFindings";
455
- sortBySeverity: "sortBySeverity";
456
- }>>;
457
- }, z.core.$strip>;
458
- declare const DecisionGateStageSchema: z.ZodObject<{
252
+ kind: z.ZodLiteral<"task">;
253
+ mode: z.ZodLiteral<"program">;
254
+ operation: z.ZodLiteral<"command">;
255
+ command: z.ZodString;
256
+ args: z.ZodDefault<z.ZodArray<z.ZodString>>;
257
+ cwd: z.ZodOptional<z.ZodString>;
258
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
259
+ allowMutation: z.ZodDefault<z.ZodBoolean>;
260
+ }, z.core.$strict>], "mode">;
261
+ declare const RouteProgramStageSchema: z.ZodObject<{
459
262
  id: z.ZodString;
460
263
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
461
264
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -463,10 +266,10 @@ declare const DecisionGateStageSchema: z.ZodObject<{
463
266
  source: z.ZodString;
464
267
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
465
268
  fn: z.ZodEnum<{
466
- json: "json";
467
269
  default: "default";
468
270
  compact: "compact";
469
271
  tail: "tail";
272
+ json: "json";
470
273
  quoteBlock: "quoteBlock";
471
274
  pathList: "pathList";
472
275
  filterSeverity: "filterSeverity";
@@ -474,28 +277,23 @@ declare const DecisionGateStageSchema: z.ZodObject<{
474
277
  join: "join";
475
278
  }>;
476
279
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
477
- }, z.core.$strip>>>;
478
- }, z.core.$strip>>>;
280
+ }, z.core.$strict>>>;
281
+ }, z.core.$strict>>>;
479
282
  limits: z.ZodOptional<z.ZodObject<{
480
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
481
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
482
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
283
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
284
+ source: z.ZodString;
285
+ default: z.ZodOptional<z.ZodNumber>;
286
+ }, z.core.$strict>]>>;
483
287
  }, z.core.$strict>>;
484
- kind: z.ZodLiteral<"decisionGate">;
485
- mode: z.ZodDefault<z.ZodEnum<{
486
- agent: "agent";
487
- program: "program";
488
- }>>;
288
+ kind: z.ZodLiteral<"route">;
289
+ mode: z.ZodLiteral<"program">;
489
290
  rules: z.ZodArray<z.ZodObject<{
490
291
  when: z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>;
491
292
  to: z.ZodString;
492
- }, z.core.$strip>>;
493
- default: z.ZodString;
494
- role: z.ZodOptional<z.ZodString>;
495
- prompt: z.ZodOptional<z.ZodString>;
496
- routes: z.ZodOptional<z.ZodArray<z.ZodString>>;
497
- }, z.core.$strip>;
498
- declare const GateStageSchema: z.ZodObject<{
293
+ }, z.core.$strict>>;
294
+ routes: z.ZodArray<z.ZodString>;
295
+ }, z.core.$strict>;
296
+ declare const RouteAgentStageSchema: z.ZodObject<{
499
297
  id: z.ZodString;
500
298
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
501
299
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -503,10 +301,10 @@ declare const GateStageSchema: z.ZodObject<{
503
301
  source: z.ZodString;
504
302
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
505
303
  fn: z.ZodEnum<{
506
- json: "json";
507
304
  default: "default";
508
305
  compact: "compact";
509
306
  tail: "tail";
307
+ json: "json";
510
308
  quoteBlock: "quoteBlock";
511
309
  pathList: "pathList";
512
310
  filterSeverity: "filterSeverity";
@@ -514,23 +312,33 @@ declare const GateStageSchema: z.ZodObject<{
514
312
  join: "join";
515
313
  }>;
516
314
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
517
- }, z.core.$strip>>>;
518
- }, z.core.$strip>>>;
315
+ }, z.core.$strict>>>;
316
+ }, z.core.$strict>>>;
519
317
  limits: z.ZodOptional<z.ZodObject<{
520
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
521
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
522
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
318
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
319
+ source: z.ZodString;
320
+ default: z.ZodOptional<z.ZodNumber>;
321
+ }, z.core.$strict>]>>;
523
322
  }, z.core.$strict>>;
524
- kind: z.ZodLiteral<"gate">;
525
- mode: z.ZodDefault<z.ZodEnum<{
526
- agent: "agent";
527
- program: "program";
528
- }>>;
529
- condition: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
530
- role: z.ZodOptional<z.ZodString>;
531
- prompt: z.ZodOptional<z.ZodString>;
532
- }, z.core.$strip>;
533
- declare const SummarizeStageSchema: z.ZodObject<{
323
+ kind: z.ZodLiteral<"route">;
324
+ mode: z.ZodLiteral<"agent">;
325
+ rules: z.ZodArray<z.ZodObject<{
326
+ when: z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>;
327
+ to: z.ZodString;
328
+ }, z.core.$strict>>;
329
+ routes: z.ZodArray<z.ZodString>;
330
+ actor: z.ZodObject<{
331
+ agent: z.ZodString;
332
+ mode: z.ZodEnum<{
333
+ denyAll: "denyAll";
334
+ readOnly: "readOnly";
335
+ edit: "edit";
336
+ }>;
337
+ label: z.ZodOptional<z.ZodString>;
338
+ }, z.core.$strict>;
339
+ prompt: z.ZodString;
340
+ }, z.core.$strict>;
341
+ declare const RouteStageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
534
342
  id: z.ZodString;
535
343
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
536
344
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -538,10 +346,10 @@ declare const SummarizeStageSchema: z.ZodObject<{
538
346
  source: z.ZodString;
539
347
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
540
348
  fn: z.ZodEnum<{
541
- json: "json";
542
349
  default: "default";
543
350
  compact: "compact";
544
351
  tail: "tail";
352
+ json: "json";
545
353
  quoteBlock: "quoteBlock";
546
354
  pathList: "pathList";
547
355
  filterSeverity: "filterSeverity";
@@ -549,18 +357,22 @@ declare const SummarizeStageSchema: z.ZodObject<{
549
357
  join: "join";
550
358
  }>;
551
359
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
552
- }, z.core.$strip>>>;
553
- }, z.core.$strip>>>;
360
+ }, z.core.$strict>>>;
361
+ }, z.core.$strict>>>;
554
362
  limits: z.ZodOptional<z.ZodObject<{
555
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
556
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
557
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
363
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
364
+ source: z.ZodString;
365
+ default: z.ZodOptional<z.ZodNumber>;
366
+ }, z.core.$strict>]>>;
558
367
  }, z.core.$strict>>;
559
- kind: z.ZodLiteral<"summarize">;
560
- role: z.ZodLiteral<"summarizer">;
561
- prompt: z.ZodString;
562
- }, z.core.$strip>;
563
- declare const LoopBodyStageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
368
+ kind: z.ZodLiteral<"route">;
369
+ mode: z.ZodLiteral<"program">;
370
+ rules: z.ZodArray<z.ZodObject<{
371
+ when: z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>;
372
+ to: z.ZodString;
373
+ }, z.core.$strict>>;
374
+ routes: z.ZodArray<z.ZodString>;
375
+ }, z.core.$strict>, z.ZodObject<{
564
376
  id: z.ZodString;
565
377
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
566
378
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -568,10 +380,10 @@ declare const LoopBodyStageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
568
380
  source: z.ZodString;
569
381
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
570
382
  fn: z.ZodEnum<{
571
- json: "json";
572
383
  default: "default";
573
384
  compact: "compact";
574
385
  tail: "tail";
386
+ json: "json";
575
387
  quoteBlock: "quoteBlock";
576
388
  pathList: "pathList";
577
389
  filterSeverity: "filterSeverity";
@@ -579,17 +391,33 @@ declare const LoopBodyStageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
579
391
  join: "join";
580
392
  }>;
581
393
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
582
- }, z.core.$strip>>>;
583
- }, z.core.$strip>>>;
394
+ }, z.core.$strict>>>;
395
+ }, z.core.$strict>>>;
584
396
  limits: z.ZodOptional<z.ZodObject<{
585
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
586
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
587
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
397
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
398
+ source: z.ZodString;
399
+ default: z.ZodOptional<z.ZodNumber>;
400
+ }, z.core.$strict>]>>;
588
401
  }, z.core.$strict>>;
589
- kind: z.ZodLiteral<"agentTask">;
590
- role: z.ZodString;
402
+ kind: z.ZodLiteral<"route">;
403
+ mode: z.ZodLiteral<"agent">;
404
+ rules: z.ZodArray<z.ZodObject<{
405
+ when: z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>;
406
+ to: z.ZodString;
407
+ }, z.core.$strict>>;
408
+ routes: z.ZodArray<z.ZodString>;
409
+ actor: z.ZodObject<{
410
+ agent: z.ZodString;
411
+ mode: z.ZodEnum<{
412
+ denyAll: "denyAll";
413
+ readOnly: "readOnly";
414
+ edit: "edit";
415
+ }>;
416
+ label: z.ZodOptional<z.ZodString>;
417
+ }, z.core.$strict>;
591
418
  prompt: z.ZodString;
592
- }, z.core.$strip>, z.ZodObject<{
419
+ }, z.core.$strict>], "mode">;
420
+ declare const GateProgramStageSchema: z.ZodObject<{
593
421
  id: z.ZodString;
594
422
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
595
423
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -597,10 +425,10 @@ declare const LoopBodyStageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
597
425
  source: z.ZodString;
598
426
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
599
427
  fn: z.ZodEnum<{
600
- json: "json";
601
428
  default: "default";
602
429
  compact: "compact";
603
430
  tail: "tail";
431
+ json: "json";
604
432
  quoteBlock: "quoteBlock";
605
433
  pathList: "pathList";
606
434
  filterSeverity: "filterSeverity";
@@ -608,24 +436,19 @@ declare const LoopBodyStageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
608
436
  join: "join";
609
437
  }>;
610
438
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
611
- }, z.core.$strip>>>;
612
- }, z.core.$strip>>>;
439
+ }, z.core.$strict>>>;
440
+ }, z.core.$strict>>>;
613
441
  limits: z.ZodOptional<z.ZodObject<{
614
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
615
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
616
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
442
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
443
+ source: z.ZodString;
444
+ default: z.ZodOptional<z.ZodNumber>;
445
+ }, z.core.$strict>]>>;
617
446
  }, z.core.$strict>>;
618
- kind: z.ZodLiteral<"discover">;
619
- method: z.ZodEnum<{
620
- glob: "glob";
621
- agent: "agent";
622
- gitChangedFiles: "gitChangedFiles";
623
- }>;
624
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
625
- output: z.ZodDefault<z.ZodString>;
626
- role: z.ZodOptional<z.ZodString>;
627
- prompt: z.ZodOptional<z.ZodString>;
628
- }, z.core.$strip>, z.ZodObject<{
447
+ kind: z.ZodLiteral<"gate">;
448
+ mode: z.ZodDefault<z.ZodLiteral<"program">>;
449
+ condition: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
450
+ }, z.core.$strict>;
451
+ declare const GateAgentStageSchema: z.ZodObject<{
629
452
  id: z.ZodString;
630
453
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
631
454
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -633,10 +456,10 @@ declare const LoopBodyStageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
633
456
  source: z.ZodString;
634
457
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
635
458
  fn: z.ZodEnum<{
636
- json: "json";
637
459
  default: "default";
638
460
  compact: "compact";
639
461
  tail: "tail";
462
+ json: "json";
640
463
  quoteBlock: "quoteBlock";
641
464
  pathList: "pathList";
642
465
  filterSeverity: "filterSeverity";
@@ -644,38 +467,32 @@ declare const LoopBodyStageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
644
467
  join: "join";
645
468
  }>;
646
469
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
647
- }, z.core.$strip>>>;
648
- }, z.core.$strip>>>;
470
+ }, z.core.$strict>>>;
471
+ }, z.core.$strict>>>;
649
472
  limits: z.ZodOptional<z.ZodObject<{
650
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
651
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
652
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
473
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
474
+ source: z.ZodString;
475
+ default: z.ZodOptional<z.ZodNumber>;
476
+ }, z.core.$strict>]>>;
653
477
  }, z.core.$strict>>;
654
- kind: z.ZodLiteral<"fanout">;
655
- items: z.ZodObject<{
656
- source: z.ZodString;
657
- }, z.core.$strip>;
658
- prompt: z.ZodOptional<z.ZodString>;
659
- laneGroups: z.ZodArray<z.ZodObject<{
660
- id: z.ZodString;
478
+ kind: z.ZodLiteral<"gate">;
479
+ mode: z.ZodLiteral<"agent">;
480
+ condition: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
481
+ actor: z.ZodObject<{
482
+ agent: z.ZodString;
661
483
  mode: z.ZodEnum<{
662
- all: "all";
663
- oneOf: "oneOf";
484
+ denyAll: "denyAll";
485
+ readOnly: "readOnly";
486
+ edit: "edit";
664
487
  }>;
665
- lanes: z.ZodArray<z.ZodObject<{
666
- id: z.ZodString;
667
- role: z.ZodString;
668
- prompt: z.ZodOptional<z.ZodString>;
669
- when: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
670
- default: z.ZodOptional<z.ZodBoolean>;
671
- }, z.core.$strip>>;
672
- }, z.core.$strip>>;
673
- fanoutPolicy: z.ZodOptional<z.ZodObject<{
674
- allowPartial: z.ZodDefault<z.ZodBoolean>;
675
- minCompletedRatio: z.ZodOptional<z.ZodNumber>;
676
- maxBlockedItems: z.ZodOptional<z.ZodNumber>;
677
- }, z.core.$strip>>;
678
- }, z.core.$strip>, z.ZodObject<{
488
+ label: z.ZodOptional<z.ZodString>;
489
+ }, z.core.$strict>;
490
+ prompt: z.ZodString;
491
+ output: z.ZodOptional<z.ZodObject<{
492
+ schema: z.ZodString;
493
+ }, z.core.$strict>>;
494
+ }, z.core.$strict>;
495
+ declare const GateStageSchema: z.ZodUnion<readonly [z.ZodObject<{
679
496
  id: z.ZodString;
680
497
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
681
498
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -683,10 +500,53 @@ declare const LoopBodyStageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
683
500
  source: z.ZodString;
684
501
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
685
502
  fn: z.ZodEnum<{
503
+ default: "default";
504
+ compact: "compact";
505
+ tail: "tail";
686
506
  json: "json";
507
+ quoteBlock: "quoteBlock";
508
+ pathList: "pathList";
509
+ filterSeverity: "filterSeverity";
510
+ severitySummary: "severitySummary";
511
+ join: "join";
512
+ }>;
513
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
514
+ }, z.core.$strict>>>;
515
+ }, z.core.$strict>>>;
516
+ limits: z.ZodOptional<z.ZodObject<{
517
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
518
+ source: z.ZodString;
519
+ default: z.ZodOptional<z.ZodNumber>;
520
+ }, z.core.$strict>]>>;
521
+ }, z.core.$strict>>;
522
+ kind: z.ZodLiteral<"gate">;
523
+ mode: z.ZodLiteral<"agent">;
524
+ condition: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
525
+ actor: z.ZodObject<{
526
+ agent: z.ZodString;
527
+ mode: z.ZodEnum<{
528
+ denyAll: "denyAll";
529
+ readOnly: "readOnly";
530
+ edit: "edit";
531
+ }>;
532
+ label: z.ZodOptional<z.ZodString>;
533
+ }, z.core.$strict>;
534
+ prompt: z.ZodString;
535
+ output: z.ZodOptional<z.ZodObject<{
536
+ schema: z.ZodString;
537
+ }, z.core.$strict>>;
538
+ }, z.core.$strict>, z.ZodObject<{
539
+ id: z.ZodString;
540
+ dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
541
+ variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
542
+ name: z.ZodString;
543
+ source: z.ZodString;
544
+ transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
545
+ fn: z.ZodEnum<{
687
546
  default: "default";
688
547
  compact: "compact";
689
548
  tail: "tail";
549
+ json: "json";
690
550
  quoteBlock: "quoteBlock";
691
551
  pathList: "pathList";
692
552
  filterSeverity: "filterSeverity";
@@ -694,28 +554,80 @@ declare const LoopBodyStageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
694
554
  join: "join";
695
555
  }>;
696
556
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
697
- }, z.core.$strip>>>;
698
- }, z.core.$strip>>>;
557
+ }, z.core.$strict>>>;
558
+ }, z.core.$strict>>>;
699
559
  limits: z.ZodOptional<z.ZodObject<{
700
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
701
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
702
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
560
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
561
+ source: z.ZodString;
562
+ default: z.ZodOptional<z.ZodNumber>;
563
+ }, z.core.$strict>]>>;
703
564
  }, z.core.$strict>>;
704
- kind: z.ZodLiteral<"reduce">;
705
- mode: z.ZodDefault<z.ZodEnum<{
706
- agent: "agent";
707
- program: "program";
708
- }>>;
709
- from: z.ZodString;
710
- role: z.ZodOptional<z.ZodString>;
565
+ kind: z.ZodLiteral<"gate">;
566
+ mode: z.ZodDefault<z.ZodLiteral<"program">>;
567
+ condition: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
568
+ }, z.core.$strict>]>;
569
+ declare const FanoutLaneSchema: z.ZodObject<{
570
+ id: z.ZodString;
571
+ actor: z.ZodObject<{
572
+ agent: z.ZodString;
573
+ mode: z.ZodEnum<{
574
+ denyAll: "denyAll";
575
+ readOnly: "readOnly";
576
+ edit: "edit";
577
+ }>;
578
+ label: z.ZodOptional<z.ZodString>;
579
+ }, z.core.$strict>;
711
580
  prompt: z.ZodOptional<z.ZodString>;
712
- operation: z.ZodOptional<z.ZodEnum<{
713
- severitySummary: "severitySummary";
714
- mergeArrays: "mergeArrays";
715
- dedupeFindings: "dedupeFindings";
716
- sortBySeverity: "sortBySeverity";
717
- }>>;
718
- }, z.core.$strip>, z.ZodObject<{
581
+ when: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
582
+ output: z.ZodOptional<z.ZodObject<{
583
+ schema: z.ZodString;
584
+ }, z.core.$strict>>;
585
+ }, z.core.$strict>;
586
+ declare const FanoutPolicySchema: z.ZodObject<{
587
+ allowPartial: z.ZodDefault<z.ZodBoolean>;
588
+ minCompletedRatio: z.ZodOptional<z.ZodNumber>;
589
+ maxBlockedItems: z.ZodOptional<z.ZodNumber>;
590
+ }, z.core.$strict>;
591
+ declare const AgentFaninSchema: z.ZodObject<{
592
+ mode: z.ZodLiteral<"agent">;
593
+ actor: z.ZodObject<{
594
+ agent: z.ZodString;
595
+ mode: z.ZodEnum<{
596
+ denyAll: "denyAll";
597
+ readOnly: "readOnly";
598
+ edit: "edit";
599
+ }>;
600
+ label: z.ZodOptional<z.ZodString>;
601
+ }, z.core.$strict>;
602
+ prompt: z.ZodString;
603
+ output: z.ZodOptional<z.ZodObject<{
604
+ schema: z.ZodString;
605
+ }, z.core.$strict>>;
606
+ }, z.core.$strict>;
607
+ declare const ProgramFaninSchema: z.ZodObject<{
608
+ mode: z.ZodLiteral<"program">;
609
+ operation: z.ZodLiteral<"mergeArrays">;
610
+ }, z.core.$strict>;
611
+ declare const FaninSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
612
+ mode: z.ZodLiteral<"agent">;
613
+ actor: z.ZodObject<{
614
+ agent: z.ZodString;
615
+ mode: z.ZodEnum<{
616
+ denyAll: "denyAll";
617
+ readOnly: "readOnly";
618
+ edit: "edit";
619
+ }>;
620
+ label: z.ZodOptional<z.ZodString>;
621
+ }, z.core.$strict>;
622
+ prompt: z.ZodString;
623
+ output: z.ZodOptional<z.ZodObject<{
624
+ schema: z.ZodString;
625
+ }, z.core.$strict>>;
626
+ }, z.core.$strict>, z.ZodObject<{
627
+ mode: z.ZodLiteral<"program">;
628
+ operation: z.ZodLiteral<"mergeArrays">;
629
+ }, z.core.$strict>], "mode">;
630
+ declare const FanoutStageSchema: z.ZodObject<{
719
631
  id: z.ZodString;
720
632
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
721
633
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -723,10 +635,10 @@ declare const LoopBodyStageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
723
635
  source: z.ZodString;
724
636
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
725
637
  fn: z.ZodEnum<{
726
- json: "json";
727
638
  default: "default";
728
639
  compact: "compact";
729
640
  tail: "tail";
641
+ json: "json";
730
642
  quoteBlock: "quoteBlock";
731
643
  pathList: "pathList";
732
644
  filterSeverity: "filterSeverity";
@@ -734,27 +646,71 @@ declare const LoopBodyStageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
734
646
  join: "join";
735
647
  }>;
736
648
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
737
- }, z.core.$strip>>>;
738
- }, z.core.$strip>>>;
649
+ }, z.core.$strict>>>;
650
+ }, z.core.$strict>>>;
651
+ kind: z.ZodLiteral<"fanout">;
652
+ items: z.ZodObject<{
653
+ source: z.ZodString;
654
+ }, z.core.$strict>;
739
655
  limits: z.ZodOptional<z.ZodObject<{
740
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
741
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
742
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
656
+ maxConcurrency: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
657
+ source: z.ZodString;
658
+ default: z.ZodOptional<z.ZodNumber>;
659
+ }, z.core.$strict>]>>;
660
+ maxFanoutItems: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
661
+ source: z.ZodString;
662
+ default: z.ZodOptional<z.ZodNumber>;
663
+ }, z.core.$strict>]>>;
664
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
665
+ source: z.ZodString;
666
+ default: z.ZodOptional<z.ZodNumber>;
667
+ }, z.core.$strict>]>>;
743
668
  }, z.core.$strict>>;
744
- kind: z.ZodLiteral<"decisionGate">;
745
- mode: z.ZodDefault<z.ZodEnum<{
746
- agent: "agent";
747
- program: "program";
748
- }>>;
749
- rules: z.ZodArray<z.ZodObject<{
750
- when: z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>;
751
- to: z.ZodString;
752
- }, z.core.$strip>>;
753
- default: z.ZodString;
754
- role: z.ZodOptional<z.ZodString>;
755
669
  prompt: z.ZodOptional<z.ZodString>;
756
- routes: z.ZodOptional<z.ZodArray<z.ZodString>>;
757
- }, z.core.$strip>], "kind">;
670
+ lanes: z.ZodArray<z.ZodObject<{
671
+ id: z.ZodString;
672
+ actor: z.ZodObject<{
673
+ agent: z.ZodString;
674
+ mode: z.ZodEnum<{
675
+ denyAll: "denyAll";
676
+ readOnly: "readOnly";
677
+ edit: "edit";
678
+ }>;
679
+ label: z.ZodOptional<z.ZodString>;
680
+ }, z.core.$strict>;
681
+ prompt: z.ZodOptional<z.ZodString>;
682
+ when: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
683
+ output: z.ZodOptional<z.ZodObject<{
684
+ schema: z.ZodString;
685
+ }, z.core.$strict>>;
686
+ }, z.core.$strict>>;
687
+ fanin: z.ZodDiscriminatedUnion<[z.ZodObject<{
688
+ mode: z.ZodLiteral<"agent">;
689
+ actor: z.ZodObject<{
690
+ agent: z.ZodString;
691
+ mode: z.ZodEnum<{
692
+ denyAll: "denyAll";
693
+ readOnly: "readOnly";
694
+ edit: "edit";
695
+ }>;
696
+ label: z.ZodOptional<z.ZodString>;
697
+ }, z.core.$strict>;
698
+ prompt: z.ZodString;
699
+ output: z.ZodOptional<z.ZodObject<{
700
+ schema: z.ZodString;
701
+ }, z.core.$strict>>;
702
+ }, z.core.$strict>, z.ZodObject<{
703
+ mode: z.ZodLiteral<"program">;
704
+ operation: z.ZodLiteral<"mergeArrays">;
705
+ }, z.core.$strict>], "mode">;
706
+ fanoutPolicy: z.ZodOptional<z.ZodObject<{
707
+ allowPartial: z.ZodDefault<z.ZodBoolean>;
708
+ minCompletedRatio: z.ZodOptional<z.ZodNumber>;
709
+ maxBlockedItems: z.ZodOptional<z.ZodNumber>;
710
+ }, z.core.$strict>>;
711
+ }, z.core.$strict>;
712
+ type LoopBodyStage = z.infer<typeof TaskStageSchema> | z.infer<typeof FanoutStageSchema> | z.infer<typeof RouteStageSchema>;
713
+ declare const LoopBodyStageSchema: z.ZodType<LoopBodyStage>;
758
714
  declare const LoopStageSchema: z.ZodObject<{
759
715
  id: z.ZodString;
760
716
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -763,10 +719,10 @@ declare const LoopStageSchema: z.ZodObject<{
763
719
  source: z.ZodString;
764
720
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
765
721
  fn: z.ZodEnum<{
766
- json: "json";
767
722
  default: "default";
768
723
  compact: "compact";
769
724
  tail: "tail";
725
+ json: "json";
770
726
  quoteBlock: "quoteBlock";
771
727
  pathList: "pathList";
772
728
  filterSeverity: "filterSeverity";
@@ -774,219 +730,25 @@ declare const LoopStageSchema: z.ZodObject<{
774
730
  join: "join";
775
731
  }>;
776
732
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
777
- }, z.core.$strip>>>;
778
- }, z.core.$strip>>>;
779
- prompt: z.ZodOptional<z.ZodString>;
733
+ }, z.core.$strict>>>;
734
+ }, z.core.$strict>>>;
780
735
  limits: z.ZodOptional<z.ZodObject<{
781
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
782
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
783
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
736
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
737
+ source: z.ZodString;
738
+ default: z.ZodOptional<z.ZodNumber>;
739
+ }, z.core.$strict>]>>;
784
740
  }, z.core.$strict>>;
785
741
  kind: z.ZodLiteral<"loop">;
786
742
  maxRounds: z.ZodNumber;
787
743
  body: z.ZodObject<{
788
744
  root: z.ZodString;
789
745
  output: z.ZodString;
790
- stages: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
791
- id: z.ZodString;
792
- dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
793
- variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
794
- name: z.ZodString;
795
- source: z.ZodString;
796
- transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
797
- fn: z.ZodEnum<{
798
- json: "json";
799
- default: "default";
800
- compact: "compact";
801
- tail: "tail";
802
- quoteBlock: "quoteBlock";
803
- pathList: "pathList";
804
- filterSeverity: "filterSeverity";
805
- severitySummary: "severitySummary";
806
- join: "join";
807
- }>;
808
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
809
- }, z.core.$strip>>>;
810
- }, z.core.$strip>>>;
811
- limits: z.ZodOptional<z.ZodObject<{
812
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
813
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
814
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
815
- }, z.core.$strict>>;
816
- kind: z.ZodLiteral<"agentTask">;
817
- role: z.ZodString;
818
- prompt: z.ZodString;
819
- }, z.core.$strip>, z.ZodObject<{
820
- id: z.ZodString;
821
- dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
822
- variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
823
- name: z.ZodString;
824
- source: z.ZodString;
825
- transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
826
- fn: z.ZodEnum<{
827
- json: "json";
828
- default: "default";
829
- compact: "compact";
830
- tail: "tail";
831
- quoteBlock: "quoteBlock";
832
- pathList: "pathList";
833
- filterSeverity: "filterSeverity";
834
- severitySummary: "severitySummary";
835
- join: "join";
836
- }>;
837
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
838
- }, z.core.$strip>>>;
839
- }, z.core.$strip>>>;
840
- limits: z.ZodOptional<z.ZodObject<{
841
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
842
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
843
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
844
- }, z.core.$strict>>;
845
- kind: z.ZodLiteral<"discover">;
846
- method: z.ZodEnum<{
847
- glob: "glob";
848
- agent: "agent";
849
- gitChangedFiles: "gitChangedFiles";
850
- }>;
851
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
852
- output: z.ZodDefault<z.ZodString>;
853
- role: z.ZodOptional<z.ZodString>;
854
- prompt: z.ZodOptional<z.ZodString>;
855
- }, z.core.$strip>, z.ZodObject<{
856
- id: z.ZodString;
857
- dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
858
- variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
859
- name: z.ZodString;
860
- source: z.ZodString;
861
- transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
862
- fn: z.ZodEnum<{
863
- json: "json";
864
- default: "default";
865
- compact: "compact";
866
- tail: "tail";
867
- quoteBlock: "quoteBlock";
868
- pathList: "pathList";
869
- filterSeverity: "filterSeverity";
870
- severitySummary: "severitySummary";
871
- join: "join";
872
- }>;
873
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
874
- }, z.core.$strip>>>;
875
- }, z.core.$strip>>>;
876
- limits: z.ZodOptional<z.ZodObject<{
877
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
878
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
879
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
880
- }, z.core.$strict>>;
881
- kind: z.ZodLiteral<"fanout">;
882
- items: z.ZodObject<{
883
- source: z.ZodString;
884
- }, z.core.$strip>;
885
- prompt: z.ZodOptional<z.ZodString>;
886
- laneGroups: z.ZodArray<z.ZodObject<{
887
- id: z.ZodString;
888
- mode: z.ZodEnum<{
889
- all: "all";
890
- oneOf: "oneOf";
891
- }>;
892
- lanes: z.ZodArray<z.ZodObject<{
893
- id: z.ZodString;
894
- role: z.ZodString;
895
- prompt: z.ZodOptional<z.ZodString>;
896
- when: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
897
- default: z.ZodOptional<z.ZodBoolean>;
898
- }, z.core.$strip>>;
899
- }, z.core.$strip>>;
900
- fanoutPolicy: z.ZodOptional<z.ZodObject<{
901
- allowPartial: z.ZodDefault<z.ZodBoolean>;
902
- minCompletedRatio: z.ZodOptional<z.ZodNumber>;
903
- maxBlockedItems: z.ZodOptional<z.ZodNumber>;
904
- }, z.core.$strip>>;
905
- }, z.core.$strip>, z.ZodObject<{
906
- id: z.ZodString;
907
- dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
908
- variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
909
- name: z.ZodString;
910
- source: z.ZodString;
911
- transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
912
- fn: z.ZodEnum<{
913
- json: "json";
914
- default: "default";
915
- compact: "compact";
916
- tail: "tail";
917
- quoteBlock: "quoteBlock";
918
- pathList: "pathList";
919
- filterSeverity: "filterSeverity";
920
- severitySummary: "severitySummary";
921
- join: "join";
922
- }>;
923
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
924
- }, z.core.$strip>>>;
925
- }, z.core.$strip>>>;
926
- limits: z.ZodOptional<z.ZodObject<{
927
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
928
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
929
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
930
- }, z.core.$strict>>;
931
- kind: z.ZodLiteral<"reduce">;
932
- mode: z.ZodDefault<z.ZodEnum<{
933
- agent: "agent";
934
- program: "program";
935
- }>>;
936
- from: z.ZodString;
937
- role: z.ZodOptional<z.ZodString>;
938
- prompt: z.ZodOptional<z.ZodString>;
939
- operation: z.ZodOptional<z.ZodEnum<{
940
- severitySummary: "severitySummary";
941
- mergeArrays: "mergeArrays";
942
- dedupeFindings: "dedupeFindings";
943
- sortBySeverity: "sortBySeverity";
944
- }>>;
945
- }, z.core.$strip>, z.ZodObject<{
946
- id: z.ZodString;
947
- dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
948
- variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
949
- name: z.ZodString;
950
- source: z.ZodString;
951
- transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
952
- fn: z.ZodEnum<{
953
- json: "json";
954
- default: "default";
955
- compact: "compact";
956
- tail: "tail";
957
- quoteBlock: "quoteBlock";
958
- pathList: "pathList";
959
- filterSeverity: "filterSeverity";
960
- severitySummary: "severitySummary";
961
- join: "join";
962
- }>;
963
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
964
- }, z.core.$strip>>>;
965
- }, z.core.$strip>>>;
966
- limits: z.ZodOptional<z.ZodObject<{
967
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
968
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
969
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
970
- }, z.core.$strict>>;
971
- kind: z.ZodLiteral<"decisionGate">;
972
- mode: z.ZodDefault<z.ZodEnum<{
973
- agent: "agent";
974
- program: "program";
975
- }>>;
976
- rules: z.ZodArray<z.ZodObject<{
977
- when: z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>;
978
- to: z.ZodString;
979
- }, z.core.$strip>>;
980
- default: z.ZodString;
981
- role: z.ZodOptional<z.ZodString>;
982
- prompt: z.ZodOptional<z.ZodString>;
983
- routes: z.ZodOptional<z.ZodArray<z.ZodString>>;
984
- }, z.core.$strip>], "kind">>;
985
- }, z.core.$strip>;
746
+ stages: z.ZodArray<z.ZodType<LoopBodyStage, unknown, z.core.$ZodTypeInternals<LoopBodyStage, unknown>>>;
747
+ }, z.core.$strict>;
986
748
  continueWhen: z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>;
987
749
  onExhausted: z.ZodLiteral<"blocked">;
988
- }, z.core.$strip>;
989
- declare const StageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
750
+ }, z.core.$strict>;
751
+ declare const StageSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
990
752
  id: z.ZodString;
991
753
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
992
754
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -994,10 +756,10 @@ declare const StageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
994
756
  source: z.ZodString;
995
757
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
996
758
  fn: z.ZodEnum<{
997
- json: "json";
998
759
  default: "default";
999
760
  compact: "compact";
1000
761
  tail: "tail";
762
+ json: "json";
1001
763
  quoteBlock: "quoteBlock";
1002
764
  pathList: "pathList";
1003
765
  filterSeverity: "filterSeverity";
@@ -1005,17 +767,30 @@ declare const StageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1005
767
  join: "join";
1006
768
  }>;
1007
769
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1008
- }, z.core.$strip>>>;
1009
- }, z.core.$strip>>>;
770
+ }, z.core.$strict>>>;
771
+ }, z.core.$strict>>>;
1010
772
  limits: z.ZodOptional<z.ZodObject<{
1011
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1012
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1013
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
773
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
774
+ source: z.ZodString;
775
+ default: z.ZodOptional<z.ZodNumber>;
776
+ }, z.core.$strict>]>>;
1014
777
  }, z.core.$strict>>;
1015
- kind: z.ZodLiteral<"agentTask">;
1016
- role: z.ZodString;
778
+ kind: z.ZodLiteral<"task">;
779
+ mode: z.ZodLiteral<"agent">;
780
+ actor: z.ZodObject<{
781
+ agent: z.ZodString;
782
+ mode: z.ZodEnum<{
783
+ denyAll: "denyAll";
784
+ readOnly: "readOnly";
785
+ edit: "edit";
786
+ }>;
787
+ label: z.ZodOptional<z.ZodString>;
788
+ }, z.core.$strict>;
1017
789
  prompt: z.ZodString;
1018
- }, z.core.$strip>, z.ZodObject<{
790
+ output: z.ZodOptional<z.ZodObject<{
791
+ schema: z.ZodString;
792
+ }, z.core.$strict>>;
793
+ }, z.core.$strict>, z.ZodObject<{
1019
794
  id: z.ZodString;
1020
795
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1021
796
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1023,10 +798,10 @@ declare const StageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1023
798
  source: z.ZodString;
1024
799
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1025
800
  fn: z.ZodEnum<{
1026
- json: "json";
1027
801
  default: "default";
1028
802
  compact: "compact";
1029
803
  tail: "tail";
804
+ json: "json";
1030
805
  quoteBlock: "quoteBlock";
1031
806
  pathList: "pathList";
1032
807
  filterSeverity: "filterSeverity";
@@ -1034,24 +809,23 @@ declare const StageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1034
809
  join: "join";
1035
810
  }>;
1036
811
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1037
- }, z.core.$strip>>>;
1038
- }, z.core.$strip>>>;
812
+ }, z.core.$strict>>>;
813
+ }, z.core.$strict>>>;
1039
814
  limits: z.ZodOptional<z.ZodObject<{
1040
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1041
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1042
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
815
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
816
+ source: z.ZodString;
817
+ default: z.ZodOptional<z.ZodNumber>;
818
+ }, z.core.$strict>]>>;
1043
819
  }, z.core.$strict>>;
1044
- kind: z.ZodLiteral<"discover">;
1045
- method: z.ZodEnum<{
1046
- glob: "glob";
1047
- agent: "agent";
1048
- gitChangedFiles: "gitChangedFiles";
1049
- }>;
1050
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1051
- output: z.ZodDefault<z.ZodString>;
1052
- role: z.ZodOptional<z.ZodString>;
1053
- prompt: z.ZodOptional<z.ZodString>;
1054
- }, z.core.$strip>, z.ZodObject<{
820
+ kind: z.ZodLiteral<"task">;
821
+ mode: z.ZodLiteral<"program">;
822
+ operation: z.ZodLiteral<"command">;
823
+ command: z.ZodString;
824
+ args: z.ZodDefault<z.ZodArray<z.ZodString>>;
825
+ cwd: z.ZodOptional<z.ZodString>;
826
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
827
+ allowMutation: z.ZodDefault<z.ZodBoolean>;
828
+ }, z.core.$strict>], "mode">, z.ZodObject<{
1055
829
  id: z.ZodString;
1056
830
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1057
831
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1059,10 +833,10 @@ declare const StageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1059
833
  source: z.ZodString;
1060
834
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1061
835
  fn: z.ZodEnum<{
1062
- json: "json";
1063
836
  default: "default";
1064
837
  compact: "compact";
1065
838
  tail: "tail";
839
+ json: "json";
1066
840
  quoteBlock: "quoteBlock";
1067
841
  pathList: "pathList";
1068
842
  filterSeverity: "filterSeverity";
@@ -1070,38 +844,69 @@ declare const StageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1070
844
  join: "join";
1071
845
  }>;
1072
846
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1073
- }, z.core.$strip>>>;
1074
- }, z.core.$strip>>>;
1075
- limits: z.ZodOptional<z.ZodObject<{
1076
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1077
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1078
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1079
- }, z.core.$strict>>;
847
+ }, z.core.$strict>>>;
848
+ }, z.core.$strict>>>;
1080
849
  kind: z.ZodLiteral<"fanout">;
1081
850
  items: z.ZodObject<{
1082
851
  source: z.ZodString;
1083
- }, z.core.$strip>;
852
+ }, z.core.$strict>;
853
+ limits: z.ZodOptional<z.ZodObject<{
854
+ maxConcurrency: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
855
+ source: z.ZodString;
856
+ default: z.ZodOptional<z.ZodNumber>;
857
+ }, z.core.$strict>]>>;
858
+ maxFanoutItems: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
859
+ source: z.ZodString;
860
+ default: z.ZodOptional<z.ZodNumber>;
861
+ }, z.core.$strict>]>>;
862
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
863
+ source: z.ZodString;
864
+ default: z.ZodOptional<z.ZodNumber>;
865
+ }, z.core.$strict>]>>;
866
+ }, z.core.$strict>>;
1084
867
  prompt: z.ZodOptional<z.ZodString>;
1085
- laneGroups: z.ZodArray<z.ZodObject<{
868
+ lanes: z.ZodArray<z.ZodObject<{
1086
869
  id: z.ZodString;
1087
- mode: z.ZodEnum<{
1088
- all: "all";
1089
- oneOf: "oneOf";
1090
- }>;
1091
- lanes: z.ZodArray<z.ZodObject<{
1092
- id: z.ZodString;
1093
- role: z.ZodString;
1094
- prompt: z.ZodOptional<z.ZodString>;
1095
- when: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
1096
- default: z.ZodOptional<z.ZodBoolean>;
1097
- }, z.core.$strip>>;
1098
- }, z.core.$strip>>;
870
+ actor: z.ZodObject<{
871
+ agent: z.ZodString;
872
+ mode: z.ZodEnum<{
873
+ denyAll: "denyAll";
874
+ readOnly: "readOnly";
875
+ edit: "edit";
876
+ }>;
877
+ label: z.ZodOptional<z.ZodString>;
878
+ }, z.core.$strict>;
879
+ prompt: z.ZodOptional<z.ZodString>;
880
+ when: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
881
+ output: z.ZodOptional<z.ZodObject<{
882
+ schema: z.ZodString;
883
+ }, z.core.$strict>>;
884
+ }, z.core.$strict>>;
885
+ fanin: z.ZodDiscriminatedUnion<[z.ZodObject<{
886
+ mode: z.ZodLiteral<"agent">;
887
+ actor: z.ZodObject<{
888
+ agent: z.ZodString;
889
+ mode: z.ZodEnum<{
890
+ denyAll: "denyAll";
891
+ readOnly: "readOnly";
892
+ edit: "edit";
893
+ }>;
894
+ label: z.ZodOptional<z.ZodString>;
895
+ }, z.core.$strict>;
896
+ prompt: z.ZodString;
897
+ output: z.ZodOptional<z.ZodObject<{
898
+ schema: z.ZodString;
899
+ }, z.core.$strict>>;
900
+ }, z.core.$strict>, z.ZodObject<{
901
+ mode: z.ZodLiteral<"program">;
902
+ operation: z.ZodLiteral<"mergeArrays">;
903
+ }, z.core.$strict>], "mode">;
1099
904
  fanoutPolicy: z.ZodOptional<z.ZodObject<{
1100
905
  allowPartial: z.ZodDefault<z.ZodBoolean>;
1101
906
  minCompletedRatio: z.ZodOptional<z.ZodNumber>;
1102
907
  maxBlockedItems: z.ZodOptional<z.ZodNumber>;
1103
- }, z.core.$strip>>;
1104
- }, z.core.$strip>, z.ZodObject<{
908
+ }, z.core.$strict>>;
909
+ }, z.core.$strict>, z.ZodObject<{
1105
910
  id: z.ZodString;
1106
911
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1107
912
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1109,10 +914,10 @@ declare const StageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1109
914
  source: z.ZodString;
1110
915
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1111
916
  fn: z.ZodEnum<{
1112
- json: "json";
1113
917
  default: "default";
1114
918
  compact: "compact";
1115
919
  tail: "tail";
920
+ json: "json";
1116
921
  quoteBlock: "quoteBlock";
1117
922
  pathList: "pathList";
1118
923
  filterSeverity: "filterSeverity";
@@ -1120,28 +925,24 @@ declare const StageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1120
925
  join: "join";
1121
926
  }>;
1122
927
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1123
- }, z.core.$strip>>>;
1124
- }, z.core.$strip>>>;
928
+ }, z.core.$strict>>>;
929
+ }, z.core.$strict>>>;
1125
930
  limits: z.ZodOptional<z.ZodObject<{
1126
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1127
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1128
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
931
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
932
+ source: z.ZodString;
933
+ default: z.ZodOptional<z.ZodNumber>;
934
+ }, z.core.$strict>]>>;
1129
935
  }, z.core.$strict>>;
1130
- kind: z.ZodLiteral<"reduce">;
1131
- mode: z.ZodDefault<z.ZodEnum<{
1132
- agent: "agent";
1133
- program: "program";
1134
- }>>;
1135
- from: z.ZodString;
1136
- role: z.ZodOptional<z.ZodString>;
1137
- prompt: z.ZodOptional<z.ZodString>;
1138
- operation: z.ZodOptional<z.ZodEnum<{
1139
- severitySummary: "severitySummary";
1140
- mergeArrays: "mergeArrays";
1141
- dedupeFindings: "dedupeFindings";
1142
- sortBySeverity: "sortBySeverity";
1143
- }>>;
1144
- }, z.core.$strip>, z.ZodObject<{
936
+ kind: z.ZodLiteral<"loop">;
937
+ maxRounds: z.ZodNumber;
938
+ body: z.ZodObject<{
939
+ root: z.ZodString;
940
+ output: z.ZodString;
941
+ stages: z.ZodArray<z.ZodType<LoopBodyStage, unknown, z.core.$ZodTypeInternals<LoopBodyStage, unknown>>>;
942
+ }, z.core.$strict>;
943
+ continueWhen: z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>;
944
+ onExhausted: z.ZodLiteral<"blocked">;
945
+ }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
1145
946
  id: z.ZodString;
1146
947
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1147
948
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1149,10 +950,10 @@ declare const StageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1149
950
  source: z.ZodString;
1150
951
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1151
952
  fn: z.ZodEnum<{
1152
- json: "json";
1153
953
  default: "default";
1154
954
  compact: "compact";
1155
955
  tail: "tail";
956
+ json: "json";
1156
957
  quoteBlock: "quoteBlock";
1157
958
  pathList: "pathList";
1158
959
  filterSeverity: "filterSeverity";
@@ -1160,218 +961,22 @@ declare const StageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1160
961
  join: "join";
1161
962
  }>;
1162
963
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1163
- }, z.core.$strip>>>;
1164
- }, z.core.$strip>>>;
1165
- prompt: z.ZodOptional<z.ZodString>;
964
+ }, z.core.$strict>>>;
965
+ }, z.core.$strict>>>;
1166
966
  limits: z.ZodOptional<z.ZodObject<{
1167
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1168
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1169
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
967
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
968
+ source: z.ZodString;
969
+ default: z.ZodOptional<z.ZodNumber>;
970
+ }, z.core.$strict>]>>;
1170
971
  }, z.core.$strict>>;
1171
- kind: z.ZodLiteral<"loop">;
1172
- maxRounds: z.ZodNumber;
1173
- body: z.ZodObject<{
1174
- root: z.ZodString;
1175
- output: z.ZodString;
1176
- stages: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1177
- id: z.ZodString;
1178
- dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1179
- variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
1180
- name: z.ZodString;
1181
- source: z.ZodString;
1182
- transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1183
- fn: z.ZodEnum<{
1184
- json: "json";
1185
- default: "default";
1186
- compact: "compact";
1187
- tail: "tail";
1188
- quoteBlock: "quoteBlock";
1189
- pathList: "pathList";
1190
- filterSeverity: "filterSeverity";
1191
- severitySummary: "severitySummary";
1192
- join: "join";
1193
- }>;
1194
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1195
- }, z.core.$strip>>>;
1196
- }, z.core.$strip>>>;
1197
- limits: z.ZodOptional<z.ZodObject<{
1198
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1199
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1200
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1201
- }, z.core.$strict>>;
1202
- kind: z.ZodLiteral<"agentTask">;
1203
- role: z.ZodString;
1204
- prompt: z.ZodString;
1205
- }, z.core.$strip>, z.ZodObject<{
1206
- id: z.ZodString;
1207
- dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1208
- variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
1209
- name: z.ZodString;
1210
- source: z.ZodString;
1211
- transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1212
- fn: z.ZodEnum<{
1213
- json: "json";
1214
- default: "default";
1215
- compact: "compact";
1216
- tail: "tail";
1217
- quoteBlock: "quoteBlock";
1218
- pathList: "pathList";
1219
- filterSeverity: "filterSeverity";
1220
- severitySummary: "severitySummary";
1221
- join: "join";
1222
- }>;
1223
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1224
- }, z.core.$strip>>>;
1225
- }, z.core.$strip>>>;
1226
- limits: z.ZodOptional<z.ZodObject<{
1227
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1228
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1229
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1230
- }, z.core.$strict>>;
1231
- kind: z.ZodLiteral<"discover">;
1232
- method: z.ZodEnum<{
1233
- glob: "glob";
1234
- agent: "agent";
1235
- gitChangedFiles: "gitChangedFiles";
1236
- }>;
1237
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1238
- output: z.ZodDefault<z.ZodString>;
1239
- role: z.ZodOptional<z.ZodString>;
1240
- prompt: z.ZodOptional<z.ZodString>;
1241
- }, z.core.$strip>, z.ZodObject<{
1242
- id: z.ZodString;
1243
- dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1244
- variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
1245
- name: z.ZodString;
1246
- source: z.ZodString;
1247
- transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1248
- fn: z.ZodEnum<{
1249
- json: "json";
1250
- default: "default";
1251
- compact: "compact";
1252
- tail: "tail";
1253
- quoteBlock: "quoteBlock";
1254
- pathList: "pathList";
1255
- filterSeverity: "filterSeverity";
1256
- severitySummary: "severitySummary";
1257
- join: "join";
1258
- }>;
1259
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1260
- }, z.core.$strip>>>;
1261
- }, z.core.$strip>>>;
1262
- limits: z.ZodOptional<z.ZodObject<{
1263
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1264
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1265
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1266
- }, z.core.$strict>>;
1267
- kind: z.ZodLiteral<"fanout">;
1268
- items: z.ZodObject<{
1269
- source: z.ZodString;
1270
- }, z.core.$strip>;
1271
- prompt: z.ZodOptional<z.ZodString>;
1272
- laneGroups: z.ZodArray<z.ZodObject<{
1273
- id: z.ZodString;
1274
- mode: z.ZodEnum<{
1275
- all: "all";
1276
- oneOf: "oneOf";
1277
- }>;
1278
- lanes: z.ZodArray<z.ZodObject<{
1279
- id: z.ZodString;
1280
- role: z.ZodString;
1281
- prompt: z.ZodOptional<z.ZodString>;
1282
- when: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
1283
- default: z.ZodOptional<z.ZodBoolean>;
1284
- }, z.core.$strip>>;
1285
- }, z.core.$strip>>;
1286
- fanoutPolicy: z.ZodOptional<z.ZodObject<{
1287
- allowPartial: z.ZodDefault<z.ZodBoolean>;
1288
- minCompletedRatio: z.ZodOptional<z.ZodNumber>;
1289
- maxBlockedItems: z.ZodOptional<z.ZodNumber>;
1290
- }, z.core.$strip>>;
1291
- }, z.core.$strip>, z.ZodObject<{
1292
- id: z.ZodString;
1293
- dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1294
- variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
1295
- name: z.ZodString;
1296
- source: z.ZodString;
1297
- transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1298
- fn: z.ZodEnum<{
1299
- json: "json";
1300
- default: "default";
1301
- compact: "compact";
1302
- tail: "tail";
1303
- quoteBlock: "quoteBlock";
1304
- pathList: "pathList";
1305
- filterSeverity: "filterSeverity";
1306
- severitySummary: "severitySummary";
1307
- join: "join";
1308
- }>;
1309
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1310
- }, z.core.$strip>>>;
1311
- }, z.core.$strip>>>;
1312
- limits: z.ZodOptional<z.ZodObject<{
1313
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1314
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1315
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1316
- }, z.core.$strict>>;
1317
- kind: z.ZodLiteral<"reduce">;
1318
- mode: z.ZodDefault<z.ZodEnum<{
1319
- agent: "agent";
1320
- program: "program";
1321
- }>>;
1322
- from: z.ZodString;
1323
- role: z.ZodOptional<z.ZodString>;
1324
- prompt: z.ZodOptional<z.ZodString>;
1325
- operation: z.ZodOptional<z.ZodEnum<{
1326
- severitySummary: "severitySummary";
1327
- mergeArrays: "mergeArrays";
1328
- dedupeFindings: "dedupeFindings";
1329
- sortBySeverity: "sortBySeverity";
1330
- }>>;
1331
- }, z.core.$strip>, z.ZodObject<{
1332
- id: z.ZodString;
1333
- dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1334
- variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
1335
- name: z.ZodString;
1336
- source: z.ZodString;
1337
- transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1338
- fn: z.ZodEnum<{
1339
- json: "json";
1340
- default: "default";
1341
- compact: "compact";
1342
- tail: "tail";
1343
- quoteBlock: "quoteBlock";
1344
- pathList: "pathList";
1345
- filterSeverity: "filterSeverity";
1346
- severitySummary: "severitySummary";
1347
- join: "join";
1348
- }>;
1349
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1350
- }, z.core.$strip>>>;
1351
- }, z.core.$strip>>>;
1352
- limits: z.ZodOptional<z.ZodObject<{
1353
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1354
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1355
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1356
- }, z.core.$strict>>;
1357
- kind: z.ZodLiteral<"decisionGate">;
1358
- mode: z.ZodDefault<z.ZodEnum<{
1359
- agent: "agent";
1360
- program: "program";
1361
- }>>;
1362
- rules: z.ZodArray<z.ZodObject<{
1363
- when: z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>;
1364
- to: z.ZodString;
1365
- }, z.core.$strip>>;
1366
- default: z.ZodString;
1367
- role: z.ZodOptional<z.ZodString>;
1368
- prompt: z.ZodOptional<z.ZodString>;
1369
- routes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1370
- }, z.core.$strip>], "kind">>;
1371
- }, z.core.$strip>;
1372
- continueWhen: z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>;
1373
- onExhausted: z.ZodLiteral<"blocked">;
1374
- }, z.core.$strip>, z.ZodObject<{
972
+ kind: z.ZodLiteral<"route">;
973
+ mode: z.ZodLiteral<"program">;
974
+ rules: z.ZodArray<z.ZodObject<{
975
+ when: z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>;
976
+ to: z.ZodString;
977
+ }, z.core.$strict>>;
978
+ routes: z.ZodArray<z.ZodString>;
979
+ }, z.core.$strict>, z.ZodObject<{
1375
980
  id: z.ZodString;
1376
981
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1377
982
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1379,10 +984,10 @@ declare const StageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1379
984
  source: z.ZodString;
1380
985
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1381
986
  fn: z.ZodEnum<{
1382
- json: "json";
1383
987
  default: "default";
1384
988
  compact: "compact";
1385
989
  tail: "tail";
990
+ json: "json";
1386
991
  quoteBlock: "quoteBlock";
1387
992
  pathList: "pathList";
1388
993
  filterSeverity: "filterSeverity";
@@ -1390,27 +995,32 @@ declare const StageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1390
995
  join: "join";
1391
996
  }>;
1392
997
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1393
- }, z.core.$strip>>>;
1394
- }, z.core.$strip>>>;
998
+ }, z.core.$strict>>>;
999
+ }, z.core.$strict>>>;
1395
1000
  limits: z.ZodOptional<z.ZodObject<{
1396
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1397
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1398
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1001
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1002
+ source: z.ZodString;
1003
+ default: z.ZodOptional<z.ZodNumber>;
1004
+ }, z.core.$strict>]>>;
1399
1005
  }, z.core.$strict>>;
1400
- kind: z.ZodLiteral<"decisionGate">;
1401
- mode: z.ZodDefault<z.ZodEnum<{
1402
- agent: "agent";
1403
- program: "program";
1404
- }>>;
1006
+ kind: z.ZodLiteral<"route">;
1007
+ mode: z.ZodLiteral<"agent">;
1405
1008
  rules: z.ZodArray<z.ZodObject<{
1406
1009
  when: z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>;
1407
1010
  to: z.ZodString;
1408
- }, z.core.$strip>>;
1409
- default: z.ZodString;
1410
- role: z.ZodOptional<z.ZodString>;
1411
- prompt: z.ZodOptional<z.ZodString>;
1412
- routes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1413
- }, z.core.$strip>, z.ZodObject<{
1011
+ }, z.core.$strict>>;
1012
+ routes: z.ZodArray<z.ZodString>;
1013
+ actor: z.ZodObject<{
1014
+ agent: z.ZodString;
1015
+ mode: z.ZodEnum<{
1016
+ denyAll: "denyAll";
1017
+ readOnly: "readOnly";
1018
+ edit: "edit";
1019
+ }>;
1020
+ label: z.ZodOptional<z.ZodString>;
1021
+ }, z.core.$strict>;
1022
+ prompt: z.ZodString;
1023
+ }, z.core.$strict>], "mode">, z.ZodUnion<readonly [z.ZodObject<{
1414
1024
  id: z.ZodString;
1415
1025
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1416
1026
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1418,10 +1028,10 @@ declare const StageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1418
1028
  source: z.ZodString;
1419
1029
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1420
1030
  fn: z.ZodEnum<{
1421
- json: "json";
1422
1031
  default: "default";
1423
1032
  compact: "compact";
1424
1033
  tail: "tail";
1034
+ json: "json";
1425
1035
  quoteBlock: "quoteBlock";
1426
1036
  pathList: "pathList";
1427
1037
  filterSeverity: "filterSeverity";
@@ -1429,22 +1039,31 @@ declare const StageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1429
1039
  join: "join";
1430
1040
  }>;
1431
1041
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1432
- }, z.core.$strip>>>;
1433
- }, z.core.$strip>>>;
1042
+ }, z.core.$strict>>>;
1043
+ }, z.core.$strict>>>;
1434
1044
  limits: z.ZodOptional<z.ZodObject<{
1435
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1436
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1437
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1045
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1046
+ source: z.ZodString;
1047
+ default: z.ZodOptional<z.ZodNumber>;
1048
+ }, z.core.$strict>]>>;
1438
1049
  }, z.core.$strict>>;
1439
1050
  kind: z.ZodLiteral<"gate">;
1440
- mode: z.ZodDefault<z.ZodEnum<{
1441
- agent: "agent";
1442
- program: "program";
1443
- }>>;
1051
+ mode: z.ZodLiteral<"agent">;
1444
1052
  condition: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
1445
- role: z.ZodOptional<z.ZodString>;
1446
- prompt: z.ZodOptional<z.ZodString>;
1447
- }, z.core.$strip>, z.ZodObject<{
1053
+ actor: z.ZodObject<{
1054
+ agent: z.ZodString;
1055
+ mode: z.ZodEnum<{
1056
+ denyAll: "denyAll";
1057
+ readOnly: "readOnly";
1058
+ edit: "edit";
1059
+ }>;
1060
+ label: z.ZodOptional<z.ZodString>;
1061
+ }, z.core.$strict>;
1062
+ prompt: z.ZodString;
1063
+ output: z.ZodOptional<z.ZodObject<{
1064
+ schema: z.ZodString;
1065
+ }, z.core.$strict>>;
1066
+ }, z.core.$strict>, z.ZodObject<{
1448
1067
  id: z.ZodString;
1449
1068
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1450
1069
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1452,10 +1071,10 @@ declare const StageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1452
1071
  source: z.ZodString;
1453
1072
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1454
1073
  fn: z.ZodEnum<{
1455
- json: "json";
1456
1074
  default: "default";
1457
1075
  compact: "compact";
1458
1076
  tail: "tail";
1077
+ json: "json";
1459
1078
  quoteBlock: "quoteBlock";
1460
1079
  pathList: "pathList";
1461
1080
  filterSeverity: "filterSeverity";
@@ -1463,58 +1082,35 @@ declare const StageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1463
1082
  join: "join";
1464
1083
  }>;
1465
1084
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1466
- }, z.core.$strip>>>;
1467
- }, z.core.$strip>>>;
1085
+ }, z.core.$strict>>>;
1086
+ }, z.core.$strict>>>;
1468
1087
  limits: z.ZodOptional<z.ZodObject<{
1469
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1470
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1471
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1088
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1089
+ source: z.ZodString;
1090
+ default: z.ZodOptional<z.ZodNumber>;
1091
+ }, z.core.$strict>]>>;
1472
1092
  }, z.core.$strict>>;
1473
- kind: z.ZodLiteral<"summarize">;
1474
- role: z.ZodLiteral<"summarizer">;
1475
- prompt: z.ZodString;
1476
- }, z.core.$strip>], "kind">;
1093
+ kind: z.ZodLiteral<"gate">;
1094
+ mode: z.ZodDefault<z.ZodLiteral<"program">>;
1095
+ condition: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
1096
+ }, z.core.$strict>]>]>;
1477
1097
  declare const WorkflowSpecSchema: z.ZodObject<{
1478
1098
  schemaVersion: z.ZodLiteral<"acpus.workflow/v1">;
1479
1099
  name: z.ZodString;
1480
1100
  description: z.ZodDefault<z.ZodString>;
1481
1101
  root: z.ZodString;
1482
- inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
1483
- type: z.ZodEnum<{
1484
- string: "string";
1485
- number: "number";
1486
- boolean: "boolean";
1487
- path: "path";
1488
- glob: "glob";
1489
- json: "json";
1490
- "array<string>": "array<string>";
1491
- "array<path>": "array<path>";
1492
- "array<json>": "array<json>";
1493
- }>;
1494
- default: z.ZodOptional<z.ZodUnknown>;
1102
+ input: z.ZodOptional<z.ZodObject<{
1103
+ schema: z.ZodString;
1104
+ default: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1495
1105
  description: z.ZodOptional<z.ZodString>;
1496
- }, z.core.$strip>>>;
1497
- roles: z.ZodRecord<z.ZodString, z.ZodObject<{
1498
- category: z.ZodEnum<{
1499
- planning: "planning";
1500
- implementation: "implementation";
1501
- validation: "validation";
1502
- review: "review";
1503
- research: "research";
1504
- summarization: "summarization";
1505
- coordination: "coordination";
1506
- }>;
1507
- agent: z.ZodString;
1508
- mode: z.ZodEnum<{
1509
- denyAll: "denyAll";
1510
- readOnly: "readOnly";
1511
- edit: "edit";
1512
- }>;
1513
- }, z.core.$strip>>;
1106
+ }, z.core.$strict>>;
1514
1107
  limits: z.ZodDefault<z.ZodObject<{
1515
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1108
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1109
+ source: z.ZodString;
1110
+ default: z.ZodOptional<z.ZodNumber>;
1111
+ }, z.core.$strict>]>>;
1516
1112
  }, z.core.$strict>>;
1517
- stages: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1113
+ stages: z.ZodArray<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
1518
1114
  id: z.ZodString;
1519
1115
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1520
1116
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1522,10 +1118,10 @@ declare const WorkflowSpecSchema: z.ZodObject<{
1522
1118
  source: z.ZodString;
1523
1119
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1524
1120
  fn: z.ZodEnum<{
1525
- json: "json";
1526
1121
  default: "default";
1527
1122
  compact: "compact";
1528
1123
  tail: "tail";
1124
+ json: "json";
1529
1125
  quoteBlock: "quoteBlock";
1530
1126
  pathList: "pathList";
1531
1127
  filterSeverity: "filterSeverity";
@@ -1533,17 +1129,30 @@ declare const WorkflowSpecSchema: z.ZodObject<{
1533
1129
  join: "join";
1534
1130
  }>;
1535
1131
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1536
- }, z.core.$strip>>>;
1537
- }, z.core.$strip>>>;
1132
+ }, z.core.$strict>>>;
1133
+ }, z.core.$strict>>>;
1538
1134
  limits: z.ZodOptional<z.ZodObject<{
1539
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1540
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1541
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1135
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1136
+ source: z.ZodString;
1137
+ default: z.ZodOptional<z.ZodNumber>;
1138
+ }, z.core.$strict>]>>;
1542
1139
  }, z.core.$strict>>;
1543
- kind: z.ZodLiteral<"agentTask">;
1544
- role: z.ZodString;
1140
+ kind: z.ZodLiteral<"task">;
1141
+ mode: z.ZodLiteral<"agent">;
1142
+ actor: z.ZodObject<{
1143
+ agent: z.ZodString;
1144
+ mode: z.ZodEnum<{
1145
+ denyAll: "denyAll";
1146
+ readOnly: "readOnly";
1147
+ edit: "edit";
1148
+ }>;
1149
+ label: z.ZodOptional<z.ZodString>;
1150
+ }, z.core.$strict>;
1545
1151
  prompt: z.ZodString;
1546
- }, z.core.$strip>, z.ZodObject<{
1152
+ output: z.ZodOptional<z.ZodObject<{
1153
+ schema: z.ZodString;
1154
+ }, z.core.$strict>>;
1155
+ }, z.core.$strict>, z.ZodObject<{
1547
1156
  id: z.ZodString;
1548
1157
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1549
1158
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1551,10 +1160,10 @@ declare const WorkflowSpecSchema: z.ZodObject<{
1551
1160
  source: z.ZodString;
1552
1161
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1553
1162
  fn: z.ZodEnum<{
1554
- json: "json";
1555
1163
  default: "default";
1556
1164
  compact: "compact";
1557
1165
  tail: "tail";
1166
+ json: "json";
1558
1167
  quoteBlock: "quoteBlock";
1559
1168
  pathList: "pathList";
1560
1169
  filterSeverity: "filterSeverity";
@@ -1562,24 +1171,23 @@ declare const WorkflowSpecSchema: z.ZodObject<{
1562
1171
  join: "join";
1563
1172
  }>;
1564
1173
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1565
- }, z.core.$strip>>>;
1566
- }, z.core.$strip>>>;
1174
+ }, z.core.$strict>>>;
1175
+ }, z.core.$strict>>>;
1567
1176
  limits: z.ZodOptional<z.ZodObject<{
1568
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1569
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1570
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1177
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1178
+ source: z.ZodString;
1179
+ default: z.ZodOptional<z.ZodNumber>;
1180
+ }, z.core.$strict>]>>;
1571
1181
  }, z.core.$strict>>;
1572
- kind: z.ZodLiteral<"discover">;
1573
- method: z.ZodEnum<{
1574
- glob: "glob";
1575
- agent: "agent";
1576
- gitChangedFiles: "gitChangedFiles";
1577
- }>;
1578
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1579
- output: z.ZodDefault<z.ZodString>;
1580
- role: z.ZodOptional<z.ZodString>;
1581
- prompt: z.ZodOptional<z.ZodString>;
1582
- }, z.core.$strip>, z.ZodObject<{
1182
+ kind: z.ZodLiteral<"task">;
1183
+ mode: z.ZodLiteral<"program">;
1184
+ operation: z.ZodLiteral<"command">;
1185
+ command: z.ZodString;
1186
+ args: z.ZodDefault<z.ZodArray<z.ZodString>>;
1187
+ cwd: z.ZodOptional<z.ZodString>;
1188
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
1189
+ allowMutation: z.ZodDefault<z.ZodBoolean>;
1190
+ }, z.core.$strict>], "mode">, z.ZodObject<{
1583
1191
  id: z.ZodString;
1584
1192
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1585
1193
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1587,10 +1195,10 @@ declare const WorkflowSpecSchema: z.ZodObject<{
1587
1195
  source: z.ZodString;
1588
1196
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1589
1197
  fn: z.ZodEnum<{
1590
- json: "json";
1591
1198
  default: "default";
1592
1199
  compact: "compact";
1593
1200
  tail: "tail";
1201
+ json: "json";
1594
1202
  quoteBlock: "quoteBlock";
1595
1203
  pathList: "pathList";
1596
1204
  filterSeverity: "filterSeverity";
@@ -1598,38 +1206,69 @@ declare const WorkflowSpecSchema: z.ZodObject<{
1598
1206
  join: "join";
1599
1207
  }>;
1600
1208
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1601
- }, z.core.$strip>>>;
1602
- }, z.core.$strip>>>;
1603
- limits: z.ZodOptional<z.ZodObject<{
1604
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1605
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1606
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1607
- }, z.core.$strict>>;
1209
+ }, z.core.$strict>>>;
1210
+ }, z.core.$strict>>>;
1608
1211
  kind: z.ZodLiteral<"fanout">;
1609
1212
  items: z.ZodObject<{
1610
1213
  source: z.ZodString;
1611
- }, z.core.$strip>;
1214
+ }, z.core.$strict>;
1215
+ limits: z.ZodOptional<z.ZodObject<{
1216
+ maxConcurrency: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1217
+ source: z.ZodString;
1218
+ default: z.ZodOptional<z.ZodNumber>;
1219
+ }, z.core.$strict>]>>;
1220
+ maxFanoutItems: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1221
+ source: z.ZodString;
1222
+ default: z.ZodOptional<z.ZodNumber>;
1223
+ }, z.core.$strict>]>>;
1224
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1225
+ source: z.ZodString;
1226
+ default: z.ZodOptional<z.ZodNumber>;
1227
+ }, z.core.$strict>]>>;
1228
+ }, z.core.$strict>>;
1612
1229
  prompt: z.ZodOptional<z.ZodString>;
1613
- laneGroups: z.ZodArray<z.ZodObject<{
1230
+ lanes: z.ZodArray<z.ZodObject<{
1614
1231
  id: z.ZodString;
1615
- mode: z.ZodEnum<{
1616
- all: "all";
1617
- oneOf: "oneOf";
1618
- }>;
1619
- lanes: z.ZodArray<z.ZodObject<{
1620
- id: z.ZodString;
1621
- role: z.ZodString;
1622
- prompt: z.ZodOptional<z.ZodString>;
1623
- when: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
1624
- default: z.ZodOptional<z.ZodBoolean>;
1625
- }, z.core.$strip>>;
1626
- }, z.core.$strip>>;
1232
+ actor: z.ZodObject<{
1233
+ agent: z.ZodString;
1234
+ mode: z.ZodEnum<{
1235
+ denyAll: "denyAll";
1236
+ readOnly: "readOnly";
1237
+ edit: "edit";
1238
+ }>;
1239
+ label: z.ZodOptional<z.ZodString>;
1240
+ }, z.core.$strict>;
1241
+ prompt: z.ZodOptional<z.ZodString>;
1242
+ when: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
1243
+ output: z.ZodOptional<z.ZodObject<{
1244
+ schema: z.ZodString;
1245
+ }, z.core.$strict>>;
1246
+ }, z.core.$strict>>;
1247
+ fanin: z.ZodDiscriminatedUnion<[z.ZodObject<{
1248
+ mode: z.ZodLiteral<"agent">;
1249
+ actor: z.ZodObject<{
1250
+ agent: z.ZodString;
1251
+ mode: z.ZodEnum<{
1252
+ denyAll: "denyAll";
1253
+ readOnly: "readOnly";
1254
+ edit: "edit";
1255
+ }>;
1256
+ label: z.ZodOptional<z.ZodString>;
1257
+ }, z.core.$strict>;
1258
+ prompt: z.ZodString;
1259
+ output: z.ZodOptional<z.ZodObject<{
1260
+ schema: z.ZodString;
1261
+ }, z.core.$strict>>;
1262
+ }, z.core.$strict>, z.ZodObject<{
1263
+ mode: z.ZodLiteral<"program">;
1264
+ operation: z.ZodLiteral<"mergeArrays">;
1265
+ }, z.core.$strict>], "mode">;
1627
1266
  fanoutPolicy: z.ZodOptional<z.ZodObject<{
1628
1267
  allowPartial: z.ZodDefault<z.ZodBoolean>;
1629
1268
  minCompletedRatio: z.ZodOptional<z.ZodNumber>;
1630
1269
  maxBlockedItems: z.ZodOptional<z.ZodNumber>;
1631
- }, z.core.$strip>>;
1632
- }, z.core.$strip>, z.ZodObject<{
1270
+ }, z.core.$strict>>;
1271
+ }, z.core.$strict>, z.ZodObject<{
1633
1272
  id: z.ZodString;
1634
1273
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1635
1274
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1637,10 +1276,10 @@ declare const WorkflowSpecSchema: z.ZodObject<{
1637
1276
  source: z.ZodString;
1638
1277
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1639
1278
  fn: z.ZodEnum<{
1640
- json: "json";
1641
1279
  default: "default";
1642
1280
  compact: "compact";
1643
1281
  tail: "tail";
1282
+ json: "json";
1644
1283
  quoteBlock: "quoteBlock";
1645
1284
  pathList: "pathList";
1646
1285
  filterSeverity: "filterSeverity";
@@ -1648,28 +1287,24 @@ declare const WorkflowSpecSchema: z.ZodObject<{
1648
1287
  join: "join";
1649
1288
  }>;
1650
1289
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1651
- }, z.core.$strip>>>;
1652
- }, z.core.$strip>>>;
1290
+ }, z.core.$strict>>>;
1291
+ }, z.core.$strict>>>;
1653
1292
  limits: z.ZodOptional<z.ZodObject<{
1654
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1655
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1656
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1293
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1294
+ source: z.ZodString;
1295
+ default: z.ZodOptional<z.ZodNumber>;
1296
+ }, z.core.$strict>]>>;
1657
1297
  }, z.core.$strict>>;
1658
- kind: z.ZodLiteral<"reduce">;
1659
- mode: z.ZodDefault<z.ZodEnum<{
1660
- agent: "agent";
1661
- program: "program";
1662
- }>>;
1663
- from: z.ZodString;
1664
- role: z.ZodOptional<z.ZodString>;
1665
- prompt: z.ZodOptional<z.ZodString>;
1666
- operation: z.ZodOptional<z.ZodEnum<{
1667
- severitySummary: "severitySummary";
1668
- mergeArrays: "mergeArrays";
1669
- dedupeFindings: "dedupeFindings";
1670
- sortBySeverity: "sortBySeverity";
1671
- }>>;
1672
- }, z.core.$strip>, z.ZodObject<{
1298
+ kind: z.ZodLiteral<"loop">;
1299
+ maxRounds: z.ZodNumber;
1300
+ body: z.ZodObject<{
1301
+ root: z.ZodString;
1302
+ output: z.ZodString;
1303
+ stages: z.ZodArray<z.ZodType<LoopBodyStage, unknown, z.core.$ZodTypeInternals<LoopBodyStage, unknown>>>;
1304
+ }, z.core.$strict>;
1305
+ continueWhen: z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>;
1306
+ onExhausted: z.ZodLiteral<"blocked">;
1307
+ }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
1673
1308
  id: z.ZodString;
1674
1309
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1675
1310
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1677,10 +1312,10 @@ declare const WorkflowSpecSchema: z.ZodObject<{
1677
1312
  source: z.ZodString;
1678
1313
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1679
1314
  fn: z.ZodEnum<{
1680
- json: "json";
1681
1315
  default: "default";
1682
1316
  compact: "compact";
1683
1317
  tail: "tail";
1318
+ json: "json";
1684
1319
  quoteBlock: "quoteBlock";
1685
1320
  pathList: "pathList";
1686
1321
  filterSeverity: "filterSeverity";
@@ -1688,218 +1323,22 @@ declare const WorkflowSpecSchema: z.ZodObject<{
1688
1323
  join: "join";
1689
1324
  }>;
1690
1325
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1691
- }, z.core.$strip>>>;
1692
- }, z.core.$strip>>>;
1693
- prompt: z.ZodOptional<z.ZodString>;
1326
+ }, z.core.$strict>>>;
1327
+ }, z.core.$strict>>>;
1694
1328
  limits: z.ZodOptional<z.ZodObject<{
1695
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1696
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1697
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1329
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1330
+ source: z.ZodString;
1331
+ default: z.ZodOptional<z.ZodNumber>;
1332
+ }, z.core.$strict>]>>;
1698
1333
  }, z.core.$strict>>;
1699
- kind: z.ZodLiteral<"loop">;
1700
- maxRounds: z.ZodNumber;
1701
- body: z.ZodObject<{
1702
- root: z.ZodString;
1703
- output: z.ZodString;
1704
- stages: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1705
- id: z.ZodString;
1706
- dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1707
- variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
1708
- name: z.ZodString;
1709
- source: z.ZodString;
1710
- transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1711
- fn: z.ZodEnum<{
1712
- json: "json";
1713
- default: "default";
1714
- compact: "compact";
1715
- tail: "tail";
1716
- quoteBlock: "quoteBlock";
1717
- pathList: "pathList";
1718
- filterSeverity: "filterSeverity";
1719
- severitySummary: "severitySummary";
1720
- join: "join";
1721
- }>;
1722
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1723
- }, z.core.$strip>>>;
1724
- }, z.core.$strip>>>;
1725
- limits: z.ZodOptional<z.ZodObject<{
1726
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1727
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1728
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1729
- }, z.core.$strict>>;
1730
- kind: z.ZodLiteral<"agentTask">;
1731
- role: z.ZodString;
1732
- prompt: z.ZodString;
1733
- }, z.core.$strip>, z.ZodObject<{
1734
- id: z.ZodString;
1735
- dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1736
- variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
1737
- name: z.ZodString;
1738
- source: z.ZodString;
1739
- transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1740
- fn: z.ZodEnum<{
1741
- json: "json";
1742
- default: "default";
1743
- compact: "compact";
1744
- tail: "tail";
1745
- quoteBlock: "quoteBlock";
1746
- pathList: "pathList";
1747
- filterSeverity: "filterSeverity";
1748
- severitySummary: "severitySummary";
1749
- join: "join";
1750
- }>;
1751
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1752
- }, z.core.$strip>>>;
1753
- }, z.core.$strip>>>;
1754
- limits: z.ZodOptional<z.ZodObject<{
1755
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1756
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1757
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1758
- }, z.core.$strict>>;
1759
- kind: z.ZodLiteral<"discover">;
1760
- method: z.ZodEnum<{
1761
- glob: "glob";
1762
- agent: "agent";
1763
- gitChangedFiles: "gitChangedFiles";
1764
- }>;
1765
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1766
- output: z.ZodDefault<z.ZodString>;
1767
- role: z.ZodOptional<z.ZodString>;
1768
- prompt: z.ZodOptional<z.ZodString>;
1769
- }, z.core.$strip>, z.ZodObject<{
1770
- id: z.ZodString;
1771
- dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1772
- variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
1773
- name: z.ZodString;
1774
- source: z.ZodString;
1775
- transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1776
- fn: z.ZodEnum<{
1777
- json: "json";
1778
- default: "default";
1779
- compact: "compact";
1780
- tail: "tail";
1781
- quoteBlock: "quoteBlock";
1782
- pathList: "pathList";
1783
- filterSeverity: "filterSeverity";
1784
- severitySummary: "severitySummary";
1785
- join: "join";
1786
- }>;
1787
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1788
- }, z.core.$strip>>>;
1789
- }, z.core.$strip>>>;
1790
- limits: z.ZodOptional<z.ZodObject<{
1791
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1792
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1793
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1794
- }, z.core.$strict>>;
1795
- kind: z.ZodLiteral<"fanout">;
1796
- items: z.ZodObject<{
1797
- source: z.ZodString;
1798
- }, z.core.$strip>;
1799
- prompt: z.ZodOptional<z.ZodString>;
1800
- laneGroups: z.ZodArray<z.ZodObject<{
1801
- id: z.ZodString;
1802
- mode: z.ZodEnum<{
1803
- all: "all";
1804
- oneOf: "oneOf";
1805
- }>;
1806
- lanes: z.ZodArray<z.ZodObject<{
1807
- id: z.ZodString;
1808
- role: z.ZodString;
1809
- prompt: z.ZodOptional<z.ZodString>;
1810
- when: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
1811
- default: z.ZodOptional<z.ZodBoolean>;
1812
- }, z.core.$strip>>;
1813
- }, z.core.$strip>>;
1814
- fanoutPolicy: z.ZodOptional<z.ZodObject<{
1815
- allowPartial: z.ZodDefault<z.ZodBoolean>;
1816
- minCompletedRatio: z.ZodOptional<z.ZodNumber>;
1817
- maxBlockedItems: z.ZodOptional<z.ZodNumber>;
1818
- }, z.core.$strip>>;
1819
- }, z.core.$strip>, z.ZodObject<{
1820
- id: z.ZodString;
1821
- dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1822
- variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
1823
- name: z.ZodString;
1824
- source: z.ZodString;
1825
- transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1826
- fn: z.ZodEnum<{
1827
- json: "json";
1828
- default: "default";
1829
- compact: "compact";
1830
- tail: "tail";
1831
- quoteBlock: "quoteBlock";
1832
- pathList: "pathList";
1833
- filterSeverity: "filterSeverity";
1834
- severitySummary: "severitySummary";
1835
- join: "join";
1836
- }>;
1837
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1838
- }, z.core.$strip>>>;
1839
- }, z.core.$strip>>>;
1840
- limits: z.ZodOptional<z.ZodObject<{
1841
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1842
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1843
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1844
- }, z.core.$strict>>;
1845
- kind: z.ZodLiteral<"reduce">;
1846
- mode: z.ZodDefault<z.ZodEnum<{
1847
- agent: "agent";
1848
- program: "program";
1849
- }>>;
1850
- from: z.ZodString;
1851
- role: z.ZodOptional<z.ZodString>;
1852
- prompt: z.ZodOptional<z.ZodString>;
1853
- operation: z.ZodOptional<z.ZodEnum<{
1854
- severitySummary: "severitySummary";
1855
- mergeArrays: "mergeArrays";
1856
- dedupeFindings: "dedupeFindings";
1857
- sortBySeverity: "sortBySeverity";
1858
- }>>;
1859
- }, z.core.$strip>, z.ZodObject<{
1860
- id: z.ZodString;
1861
- dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1862
- variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
1863
- name: z.ZodString;
1864
- source: z.ZodString;
1865
- transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1866
- fn: z.ZodEnum<{
1867
- json: "json";
1868
- default: "default";
1869
- compact: "compact";
1870
- tail: "tail";
1871
- quoteBlock: "quoteBlock";
1872
- pathList: "pathList";
1873
- filterSeverity: "filterSeverity";
1874
- severitySummary: "severitySummary";
1875
- join: "join";
1876
- }>;
1877
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1878
- }, z.core.$strip>>>;
1879
- }, z.core.$strip>>>;
1880
- limits: z.ZodOptional<z.ZodObject<{
1881
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1882
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1883
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1884
- }, z.core.$strict>>;
1885
- kind: z.ZodLiteral<"decisionGate">;
1886
- mode: z.ZodDefault<z.ZodEnum<{
1887
- agent: "agent";
1888
- program: "program";
1889
- }>>;
1890
- rules: z.ZodArray<z.ZodObject<{
1891
- when: z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>;
1892
- to: z.ZodString;
1893
- }, z.core.$strip>>;
1894
- default: z.ZodString;
1895
- role: z.ZodOptional<z.ZodString>;
1896
- prompt: z.ZodOptional<z.ZodString>;
1897
- routes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1898
- }, z.core.$strip>], "kind">>;
1899
- }, z.core.$strip>;
1900
- continueWhen: z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>;
1901
- onExhausted: z.ZodLiteral<"blocked">;
1902
- }, z.core.$strip>, z.ZodObject<{
1334
+ kind: z.ZodLiteral<"route">;
1335
+ mode: z.ZodLiteral<"program">;
1336
+ rules: z.ZodArray<z.ZodObject<{
1337
+ when: z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>;
1338
+ to: z.ZodString;
1339
+ }, z.core.$strict>>;
1340
+ routes: z.ZodArray<z.ZodString>;
1341
+ }, z.core.$strict>, z.ZodObject<{
1903
1342
  id: z.ZodString;
1904
1343
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1905
1344
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1907,10 +1346,10 @@ declare const WorkflowSpecSchema: z.ZodObject<{
1907
1346
  source: z.ZodString;
1908
1347
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1909
1348
  fn: z.ZodEnum<{
1910
- json: "json";
1911
1349
  default: "default";
1912
1350
  compact: "compact";
1913
1351
  tail: "tail";
1352
+ json: "json";
1914
1353
  quoteBlock: "quoteBlock";
1915
1354
  pathList: "pathList";
1916
1355
  filterSeverity: "filterSeverity";
@@ -1918,27 +1357,32 @@ declare const WorkflowSpecSchema: z.ZodObject<{
1918
1357
  join: "join";
1919
1358
  }>;
1920
1359
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1921
- }, z.core.$strip>>>;
1922
- }, z.core.$strip>>>;
1360
+ }, z.core.$strict>>>;
1361
+ }, z.core.$strict>>>;
1923
1362
  limits: z.ZodOptional<z.ZodObject<{
1924
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1925
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1926
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1363
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1364
+ source: z.ZodString;
1365
+ default: z.ZodOptional<z.ZodNumber>;
1366
+ }, z.core.$strict>]>>;
1927
1367
  }, z.core.$strict>>;
1928
- kind: z.ZodLiteral<"decisionGate">;
1929
- mode: z.ZodDefault<z.ZodEnum<{
1930
- agent: "agent";
1931
- program: "program";
1932
- }>>;
1368
+ kind: z.ZodLiteral<"route">;
1369
+ mode: z.ZodLiteral<"agent">;
1933
1370
  rules: z.ZodArray<z.ZodObject<{
1934
1371
  when: z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>;
1935
1372
  to: z.ZodString;
1936
- }, z.core.$strip>>;
1937
- default: z.ZodString;
1938
- role: z.ZodOptional<z.ZodString>;
1939
- prompt: z.ZodOptional<z.ZodString>;
1940
- routes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1941
- }, z.core.$strip>, z.ZodObject<{
1373
+ }, z.core.$strict>>;
1374
+ routes: z.ZodArray<z.ZodString>;
1375
+ actor: z.ZodObject<{
1376
+ agent: z.ZodString;
1377
+ mode: z.ZodEnum<{
1378
+ denyAll: "denyAll";
1379
+ readOnly: "readOnly";
1380
+ edit: "edit";
1381
+ }>;
1382
+ label: z.ZodOptional<z.ZodString>;
1383
+ }, z.core.$strict>;
1384
+ prompt: z.ZodString;
1385
+ }, z.core.$strict>], "mode">, z.ZodUnion<readonly [z.ZodObject<{
1942
1386
  id: z.ZodString;
1943
1387
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1944
1388
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1946,10 +1390,10 @@ declare const WorkflowSpecSchema: z.ZodObject<{
1946
1390
  source: z.ZodString;
1947
1391
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1948
1392
  fn: z.ZodEnum<{
1949
- json: "json";
1950
1393
  default: "default";
1951
1394
  compact: "compact";
1952
1395
  tail: "tail";
1396
+ json: "json";
1953
1397
  quoteBlock: "quoteBlock";
1954
1398
  pathList: "pathList";
1955
1399
  filterSeverity: "filterSeverity";
@@ -1957,22 +1401,31 @@ declare const WorkflowSpecSchema: z.ZodObject<{
1957
1401
  join: "join";
1958
1402
  }>;
1959
1403
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1960
- }, z.core.$strip>>>;
1961
- }, z.core.$strip>>>;
1404
+ }, z.core.$strict>>>;
1405
+ }, z.core.$strict>>>;
1962
1406
  limits: z.ZodOptional<z.ZodObject<{
1963
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1964
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1965
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1407
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1408
+ source: z.ZodString;
1409
+ default: z.ZodOptional<z.ZodNumber>;
1410
+ }, z.core.$strict>]>>;
1966
1411
  }, z.core.$strict>>;
1967
1412
  kind: z.ZodLiteral<"gate">;
1968
- mode: z.ZodDefault<z.ZodEnum<{
1969
- agent: "agent";
1970
- program: "program";
1971
- }>>;
1413
+ mode: z.ZodLiteral<"agent">;
1972
1414
  condition: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
1973
- role: z.ZodOptional<z.ZodString>;
1974
- prompt: z.ZodOptional<z.ZodString>;
1975
- }, z.core.$strip>, z.ZodObject<{
1415
+ actor: z.ZodObject<{
1416
+ agent: z.ZodString;
1417
+ mode: z.ZodEnum<{
1418
+ denyAll: "denyAll";
1419
+ readOnly: "readOnly";
1420
+ edit: "edit";
1421
+ }>;
1422
+ label: z.ZodOptional<z.ZodString>;
1423
+ }, z.core.$strict>;
1424
+ prompt: z.ZodString;
1425
+ output: z.ZodOptional<z.ZodObject<{
1426
+ schema: z.ZodString;
1427
+ }, z.core.$strict>>;
1428
+ }, z.core.$strict>, z.ZodObject<{
1976
1429
  id: z.ZodString;
1977
1430
  dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
1978
1431
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1980,10 +1433,10 @@ declare const WorkflowSpecSchema: z.ZodObject<{
1980
1433
  source: z.ZodString;
1981
1434
  transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
1982
1435
  fn: z.ZodEnum<{
1983
- json: "json";
1984
1436
  default: "default";
1985
1437
  compact: "compact";
1986
1438
  tail: "tail";
1439
+ json: "json";
1987
1440
  quoteBlock: "quoteBlock";
1988
1441
  pathList: "pathList";
1989
1442
  filterSeverity: "filterSeverity";
@@ -1991,21 +1444,22 @@ declare const WorkflowSpecSchema: z.ZodObject<{
1991
1444
  join: "join";
1992
1445
  }>;
1993
1446
  args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1994
- }, z.core.$strip>>>;
1995
- }, z.core.$strip>>>;
1447
+ }, z.core.$strict>>>;
1448
+ }, z.core.$strict>>>;
1996
1449
  limits: z.ZodOptional<z.ZodObject<{
1997
- maxConcurrency: z.ZodOptional<z.ZodNumber>;
1998
- maxFanoutItems: z.ZodOptional<z.ZodNumber>;
1999
- stageTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
1450
+ stageTimeoutMinutes: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1451
+ source: z.ZodString;
1452
+ default: z.ZodOptional<z.ZodNumber>;
1453
+ }, z.core.$strict>]>>;
2000
1454
  }, z.core.$strict>>;
2001
- kind: z.ZodLiteral<"summarize">;
2002
- role: z.ZodLiteral<"summarizer">;
2003
- prompt: z.ZodString;
2004
- }, z.core.$strip>], "kind">>;
2005
- }, z.core.$strip>;
1455
+ kind: z.ZodLiteral<"gate">;
1456
+ mode: z.ZodDefault<z.ZodLiteral<"program">>;
1457
+ condition: z.ZodOptional<z.ZodType<Condition, unknown, z.core.$ZodTypeInternals<Condition, unknown>>>;
1458
+ }, z.core.$strict>]>]>>;
1459
+ }, z.core.$strict>;
2006
1460
  type WorkflowSpec = z.infer<typeof WorkflowSpecSchema>;
2007
1461
  type Stage = z.infer<typeof StageSchema>;
2008
- type Role = z.infer<typeof RoleSchema>;
1462
+ type Actor = z.infer<typeof ActorSchema>;
2009
1463
  type Variable = z.infer<typeof VariableSchema>;
2010
1464
  type ConditionNode = z.infer<typeof ConditionSchema>;
2011
1465
  //#endregion
@@ -2037,46 +1491,43 @@ declare function loadWorkflowSpec(filePath: string): Promise<{
2037
1491
  spec?: WorkflowSpec;
2038
1492
  issues: OrchestratorIssue[];
2039
1493
  }>;
1494
+ declare function stringifyWorkflowSpec(spec: WorkflowSpec): string;
1495
+ declare function isWorkflowYamlPath(filePath: string): boolean;
2040
1496
  //#endregion
2041
1497
  //#region src/compiler/lint.d.ts
2042
1498
  declare function lintWorkflowSpec(spec: WorkflowSpec): OrchestratorIssue[];
2043
1499
  //#endregion
2044
- //#region src/contracts/schemas.d.ts
2045
- declare const OutputContractNameSchema: z.ZodEnum<{
2046
- implementation: "implementation";
2047
- validation: "validation";
2048
- discover: "discover";
2049
- gate: "gate";
2050
- base: "base";
2051
- decision: "decision";
2052
- diagnostic: "diagnostic";
2053
- }>;
2054
- type OutputContractName = z.infer<typeof OutputContractNameSchema>;
2055
- //#endregion
2056
- //#region src/contracts/repair-hints.d.ts
2057
- type FixHint = {
2058
- path: string;
2059
- message: string;
2060
- instruction: string;
2061
- };
2062
- //#endregion
2063
- //#region src/contracts/descriptors.d.ts
2064
- type OutputContract = {
2065
- name: OutputContractName;
2066
- schema: z.ZodType;
2067
- schemaForPrompt: unknown;
2068
- minimalExample: unknown;
2069
- describeIssue(issue: z.core.$ZodIssue): FixHint;
2070
- footerText(): string;
1500
+ //#region src/contracts/schema-dsl.d.ts
1501
+ type SchemaAst = {
1502
+ kind: "primitive";
1503
+ name: "string" | "number" | "boolean" | "null" | "unknown";
1504
+ } | {
1505
+ kind: "literal";
1506
+ value: string | number | boolean;
1507
+ } | {
1508
+ kind: "array";
1509
+ item: SchemaAst;
1510
+ } | {
1511
+ kind: "object";
1512
+ fields: Array<{
1513
+ name: string;
1514
+ optional: boolean;
1515
+ schema: SchemaAst;
1516
+ }>;
1517
+ } | {
1518
+ kind: "union";
1519
+ options: SchemaAst[];
2071
1520
  };
2072
- type OutputContractOptions = {
2073
- outputKey?: string;
2074
- maxItems?: number;
1521
+ type CompiledSchema = {
1522
+ source: string;
1523
+ ast: SchemaAst;
2075
1524
  };
2076
- declare function getOutputContract(name: OutputContractName, options?: OutputContractOptions): OutputContract;
2077
- //#endregion
2078
- //#region src/contracts/output-contracts.d.ts
2079
- declare function contractNameForStage(stage: Stage, role?: Role): OutputContractName;
1525
+ declare const DEFAULT_AGENT_OUTPUT_SCHEMA: CompiledSchema;
1526
+ declare function compileSchemaDsl(source: string): CompiledSchema;
1527
+ declare function zodForCompiledSchema(schema: CompiledSchema, implicitFields?: Record<string, z.ZodType>): z.ZodType<Record<string, unknown>>;
1528
+ declare function defaultAgentOutputZod(implicitFields?: Record<string, z.ZodType>): z.ZodType<Record<string, unknown>>;
1529
+ declare function outputSchemaFooter(schema: CompiledSchema | undefined, implicit?: string[]): string;
1530
+ declare function formatSchema(ast: SchemaAst, indent?: number): string;
2080
1531
  //#endregion
2081
1532
  //#region src/compiler/execution-plan.d.ts
2082
1533
  declare const EXECUTION_PLAN_VERSION = "acpus.execution-plan/v1";
@@ -2085,16 +1536,10 @@ type ExecutionPlan = {
2085
1536
  workflowName: string;
2086
1537
  root: string;
2087
1538
  stages: ExecutionPlanStage[];
2088
- roles: Record<string, ExecutionPlanRole>;
2089
1539
  limits: ExecutionPlanLimits;
2090
1540
  prompts: Record<string, PromptPlan>;
2091
- contracts: Record<string, ContractPlan>;
2092
- repairPolicy: RepairPolicyPlan;
2093
1541
  fanout: FanoutPlan[];
2094
1542
  };
2095
- type ExecutionPlanRole = Role & {
2096
- name: string;
2097
- };
2098
1543
  type ExecutionPlanLimits = {
2099
1544
  stageTimeoutMinutes: number;
2100
1545
  };
@@ -2109,20 +1554,9 @@ type PromptPlan = {
2109
1554
  template: string;
2110
1555
  variables: Variable[];
2111
1556
  footer: string;
2112
- roleName?: string;
2113
- contractName: OutputContractName;
2114
- contractOptions?: ContractPlan["options"];
2115
- };
2116
- type ContractPlan = {
2117
- name: OutputContractName;
2118
- options?: {
2119
- outputKey?: string;
2120
- maxItems?: number;
2121
- };
2122
- };
2123
- type RepairPolicyPlan = {
2124
- maxRepairTurns: 1;
2125
- repairableReasons: ["OUTPUT_PARSE_FAILED", "OUTPUT_SCHEMA_FAILED"];
1557
+ actor?: Actor;
1558
+ outputSchema?: CompiledSchema;
1559
+ implicitOutputFields?: string[];
2126
1560
  };
2127
1561
  type SessionKeyStrategy = {
2128
1562
  kind: "linear";
@@ -2131,31 +1565,57 @@ type SessionKeyStrategy = {
2131
1565
  kind: "fanoutItem";
2132
1566
  template: string;
2133
1567
  };
1568
+ type AgentPlan = {
1569
+ actor: Actor;
1570
+ promptId: string;
1571
+ outputSchema?: CompiledSchema;
1572
+ implicitOutputFields?: string[];
1573
+ };
1574
+ type ProgramCommandPlan = {
1575
+ operation: "command";
1576
+ command: string;
1577
+ args: string[];
1578
+ cwd?: string;
1579
+ timeoutSeconds: number;
1580
+ allowMutation: boolean;
1581
+ };
2134
1582
  type FanoutLanePlan = {
2135
1583
  id: string;
2136
- roleName: string;
1584
+ actor: Actor;
2137
1585
  promptId: string;
2138
- contract: ContractPlan;
1586
+ outputSchema?: CompiledSchema;
1587
+ implicitOutputFields?: string[];
2139
1588
  sessionKeyTemplate: string;
2140
- when?: Extract<Stage, {
2141
- kind: "fanout";
2142
- }>["laneGroups"][number]["lanes"][number]["when"];
2143
- default?: boolean;
1589
+ when?: ConditionNode;
2144
1590
  };
2145
- type FanoutLaneGroupPlan = {
2146
- id: string;
2147
- mode: "all" | "oneOf";
2148
- lanes: FanoutLanePlan[];
1591
+ type FanoutFaninPlan = ({
1592
+ mode: "agent";
1593
+ } & AgentPlan & {
1594
+ sessionKey: string;
1595
+ }) | {
1596
+ mode: "program";
1597
+ operation: "mergeArrays";
2149
1598
  };
2150
1599
  type ExecutionPlanStage = {
2151
1600
  id: string;
2152
1601
  kind: Stage["kind"];
2153
1602
  dependencies: string[];
2154
- roleName?: string;
2155
- contract?: ContractPlan;
2156
- promptId?: string;
2157
1603
  session: SessionKeyStrategy;
2158
1604
  limits: ExecutionPlanStageLimits;
1605
+ agent?: AgentPlan;
1606
+ program?: ProgramCommandPlan;
1607
+ route?: {
1608
+ mode: "agent" | "program";
1609
+ rules: Array<{
1610
+ when: ConditionNode;
1611
+ to: string;
1612
+ }>;
1613
+ routes: string[];
1614
+ };
1615
+ gate?: {
1616
+ mode: "agent" | "program";
1617
+ condition?: ConditionNode;
1618
+ };
2159
1619
  fanout?: {
2160
1620
  itemsSource: string;
2161
1621
  allowPartial: boolean;
@@ -2163,31 +1623,8 @@ type ExecutionPlanStage = {
2163
1623
  maxBlockedItems?: number;
2164
1624
  maxItems: number;
2165
1625
  maxConcurrency: number;
2166
- laneGroups: FanoutLaneGroupPlan[];
2167
- };
2168
- reduce?: {
2169
- mode: "agent" | "program";
2170
- from: string;
2171
- operation?: string;
2172
- };
2173
- discover?: {
2174
- method: "gitChangedFiles" | "glob" | "agent";
2175
- args?: Record<string, unknown>;
2176
- outputKey: string;
2177
- };
2178
- decision?: {
2179
- mode: "agent" | "program";
2180
- rules: Extract<Stage, {
2181
- kind: "decisionGate";
2182
- }>["rules"];
2183
- defaultRoute: string;
2184
- routes: string[];
2185
- };
2186
- gate?: {
2187
- mode: "agent" | "program";
2188
- condition?: Extract<Stage, {
2189
- kind: "gate";
2190
- }>["condition"];
1626
+ lanes: FanoutLanePlan[];
1627
+ fanin: FanoutFaninPlan;
2191
1628
  };
2192
1629
  loop?: {
2193
1630
  maxRounds: number;
@@ -2196,9 +1633,7 @@ type ExecutionPlanStage = {
2196
1633
  output: string;
2197
1634
  stages: ExecutionPlanStage[];
2198
1635
  };
2199
- continueWhen: Extract<Stage, {
2200
- kind: "loop";
2201
- }>["continueWhen"];
1636
+ continueWhen: ConditionNode;
2202
1637
  onExhausted: "blocked";
2203
1638
  };
2204
1639
  };
@@ -2210,24 +1645,28 @@ type FanoutPlan = {
2210
1645
  allowPartial: boolean;
2211
1646
  minCompletedRatio?: number;
2212
1647
  maxBlockedItems?: number;
2213
- laneGroups: FanoutLaneGroupPlan[];
1648
+ lanes: FanoutLanePlan[];
1649
+ fanin: FanoutFaninPlan;
2214
1650
  };
2215
1651
  //#endregion
2216
1652
  //#region src/compiler/compile-execution-plan.d.ts
2217
1653
  type CompileExecutionPlanOptions = {
2218
1654
  stageIds?: string[];
2219
1655
  startStageId?: string;
1656
+ input?: Record<string, unknown>;
2220
1657
  };
2221
1658
  declare function compileExecutionPlan(spec: WorkflowSpec, options?: CompileExecutionPlanOptions): ExecutionPlan;
2222
- declare function renderStagePrompt(spec: WorkflowSpec, stage: Stage): string;
1659
+ declare function renderStagePrompt(_spec: WorkflowSpec, stage: Stage): string;
2223
1660
  declare function renderPromptMap(spec: WorkflowSpec): Record<string, string>;
2224
- declare function topologicalOrder(spec: WorkflowSpec): string[];
2225
- declare function stageRoleName(stage: Stage): string | undefined;
1661
+ declare function topologicalOrder(spec: Pick<WorkflowSpec, "root" | "stages">): string[];
1662
+ declare function stageActorLabel(stage: Stage): string | undefined;
2226
1663
  //#endregion
2227
1664
  //#region src/run-index/read-write.d.ts
2228
- type AttemptStatus = "pending" | "running" | "raw_received" | "parsing" | "repairing" | "completed" | "blocked" | "failed" | "cancelled" | "timed_out";
1665
+ type AttemptStatus = "pending" | "running" | "raw_received" | "parsing" | "completed" | "blocked" | "failed" | "cancelled" | "timed_out";
2229
1666
  type StageStatus = "pending" | "ready" | "running" | "completed" | "blocked" | "failed" | "skipped";
2230
- type RunStatus = "pending" | "running" | "completed" | "blocked" | "diagnosed_blocked" | "failed" | "cancelled";
1667
+ type RunStatus = "pending" | "running" | "completed" | "blocked" | "failed" | "cancelled";
1668
+ type AgentTaskRetryReason = "runtime" | "stale" | "continuation";
1669
+ type AgentTaskRetryPromptPolicy = "original" | "continuation";
2231
1670
  type WorkerStatus = "starting" | "running" | "stale" | "exited" | "failed";
2232
1671
  type RunWorkerState = {
2233
1672
  pid: number;
@@ -2242,9 +1681,8 @@ type AttemptIndexEntry = {
2242
1681
  id: string;
2243
1682
  stageId: string;
2244
1683
  itemId?: string;
2245
- groupId?: string;
2246
1684
  laneId?: string;
2247
- kind: "attempt" | "repair" | "diagnostic";
1685
+ kind: "attempt";
2248
1686
  status: AttemptStatus;
2249
1687
  path: string;
2250
1688
  startedAt?: string;
@@ -2257,11 +1695,17 @@ type AttemptIndexEntry = {
2257
1695
  requestId?: string;
2258
1696
  stopReason?: string;
2259
1697
  runtimeErrorCode?: string;
2260
- runtimeRetryOf?: string;
2261
- runtimeRetryOrdinal?: number;
2262
- runtimeRetryReason?: string;
1698
+ isRetry?: boolean;
1699
+ retryReason?: AgentTaskRetryReason;
1700
+ retryOf?: string;
1701
+ retryOrdinal?: number;
1702
+ retryBudgetUsed?: number;
1703
+ retryBudgetLimit?: number;
1704
+ promptPolicy?: AgentTaskRetryPromptPolicy;
1705
+ lastFailureCode?: string;
1706
+ retryMessage?: string;
2263
1707
  agent?: string;
2264
- roleMode?: string;
1708
+ actorMode?: string;
2265
1709
  runtimeDisposeInvoked?: boolean;
2266
1710
  };
2267
1711
  type StageIndexEntry = {
@@ -2273,8 +1717,9 @@ type StageIndexEntry = {
2273
1717
  startedAt?: string;
2274
1718
  completedAt?: string;
2275
1719
  skippedReason?: string;
2276
- runtimeRetryOf?: string;
2277
- runtimeRetryOrdinal?: number;
1720
+ retryOf?: string;
1721
+ retryOrdinal?: number;
1722
+ retryReason?: AgentTaskRetryReason;
2278
1723
  fanout?: {
2279
1724
  totalItems: number;
2280
1725
  completedItems: number;
@@ -2289,32 +1734,29 @@ type StageIndexEntry = {
2289
1734
  status: StageStatus;
2290
1735
  outputPath?: string;
2291
1736
  blockedReason?: string;
2292
- attemptId?: string;
2293
1737
  startedAt?: string;
2294
1738
  completedAt?: string;
2295
1739
  errorCode?: string;
2296
1740
  errorMessage?: string;
2297
- runtimeRetryOf?: string;
2298
- runtimeRetryOrdinal?: number;
1741
+ retryOf?: string;
1742
+ retryOrdinal?: number;
1743
+ retryReason?: AgentTaskRetryReason;
2299
1744
  skippedReason?: string;
2300
- groups?: Array<{
1745
+ lanes: Array<{
2301
1746
  id: string;
2302
- mode: "all" | "oneOf";
1747
+ actorLabel: string;
2303
1748
  status: StageStatus;
2304
- lanes: Array<{
2305
- id: string;
2306
- roleName: string;
2307
- status: StageStatus;
2308
- outputPath?: string;
2309
- blockedReason?: string;
2310
- attemptId?: string;
2311
- startedAt?: string;
2312
- completedAt?: string;
2313
- errorCode?: string;
2314
- errorMessage?: string;
2315
- runtimeRetryOf?: string;
2316
- runtimeRetryOrdinal?: number;
2317
- }>;
1749
+ outputPath?: string;
1750
+ blockedReason?: string;
1751
+ skippedReason?: string;
1752
+ attemptId?: string;
1753
+ startedAt?: string;
1754
+ completedAt?: string;
1755
+ errorCode?: string;
1756
+ errorMessage?: string;
1757
+ retryOf?: string;
1758
+ retryOrdinal?: number;
1759
+ retryReason?: AgentTaskRetryReason;
2318
1760
  }>;
2319
1761
  }>;
2320
1762
  };
@@ -2352,7 +1794,7 @@ type RunIndex = {
2352
1794
  createdAt: string;
2353
1795
  updatedAt: string;
2354
1796
  source?: {
2355
- kind: "draft" | "saved" | "spec";
1797
+ kind: "saved" | "spec";
2356
1798
  path?: string;
2357
1799
  sha256?: string;
2358
1800
  };
@@ -2361,8 +1803,12 @@ type RunIndex = {
2361
1803
  agentUsage: {
2362
1804
  planned: number;
2363
1805
  actual: number;
2364
- repairCalls: number;
2365
- recoveryCalls: number;
1806
+ retryCalls: number;
1807
+ retries: {
1808
+ runtime: number;
1809
+ stale: number;
1810
+ continuation: number;
1811
+ };
2366
1812
  };
2367
1813
  worker?: RunWorkerState;
2368
1814
  gateVerdict?: "pass" | "pass_with_warnings" | "blocked" | "failed" | "unknown";
@@ -2377,12 +1823,10 @@ type RunIndex = {
2377
1823
  };
2378
1824
  //#endregion
2379
1825
  //#region src/projections/run-view.d.ts
2380
- type RunViewStatus = "pending" | "running" | "completed" | "blocked" | "diagnosed_blocked" | "failed" | "cancelled";
1826
+ type RunViewStatus = "pending" | "running" | "completed" | "blocked" | "failed" | "cancelled";
2381
1827
  type RunViewOutputParse = {
2382
1828
  mode?: string;
2383
- repaired?: boolean;
2384
1829
  candidateCount?: number;
2385
- warnings: string[];
2386
1830
  };
2387
1831
  type RunViewParseDiagnostics = {
2388
1832
  errorCode?: string;
@@ -2401,19 +1845,12 @@ type RunView = {
2401
1845
  gateVerdict?: "pass" | "pass_with_warnings" | "blocked" | "failed" | "unknown";
2402
1846
  blockedReason?: string;
2403
1847
  summary: string;
2404
- checks: Array<{
2405
- command?: string;
2406
- name?: string;
2407
- status?: string;
2408
- summary?: string;
2409
- }>;
2410
1848
  finalWarnings: string[];
2411
1849
  risks: string[];
2412
1850
  warnings: OrchestratorIssue[];
2413
1851
  errors: OrchestratorIssue[];
2414
- roles: Array<{
2415
- name: string;
2416
- category: string;
1852
+ actors: Array<{
1853
+ label: string;
2417
1854
  agent: string;
2418
1855
  mode: string;
2419
1856
  }>;
@@ -2436,6 +1873,15 @@ type RunView = {
2436
1873
  blockedReason?: string;
2437
1874
  parseErrorCode?: string;
2438
1875
  path: string;
1876
+ isRetry?: boolean;
1877
+ retryReason?: string;
1878
+ retryOf?: string;
1879
+ retryOrdinal?: number;
1880
+ retryBudgetUsed?: number;
1881
+ retryBudgetLimit?: number;
1882
+ promptPolicy?: string;
1883
+ lastFailureCode?: string;
1884
+ retryMessage?: string;
2439
1885
  }>;
2440
1886
  fanout: Array<{
2441
1887
  stageId: string;
@@ -2446,14 +1892,13 @@ type RunView = {
2446
1892
  agentUsage: {
2447
1893
  planned: number;
2448
1894
  actual?: number;
2449
- repairCalls?: number;
2450
- recoveryCalls?: number;
1895
+ retryCalls?: number;
1896
+ retries?: {
1897
+ runtime: number;
1898
+ stale: number;
1899
+ continuation: number;
1900
+ };
2451
1901
  };
2452
- artifacts: Array<{
2453
- kind?: string;
2454
- path?: string;
2455
- label?: string;
2456
- }>;
2457
1902
  commands: Record<string, string>;
2458
1903
  };
2459
1904
  declare function previewRunView(spec: WorkflowSpec, issues?: OrchestratorIssue[], commands?: Record<string, string>): RunView;
@@ -2523,7 +1968,7 @@ declare function workerSummary(worker: RunWorkerState | undefined, now?: number)
2523
1968
  declare const RUN_MONITOR_VIEW_VERSION = "acpus.monitor/v1";
2524
1969
  declare const TASK_DETAIL_VIEW_VERSION = "acpus.task-detail/v1";
2525
1970
  type TaskStatus = StageStatus | AttemptStatus;
2526
- type TaskKind = "stage" | "fanoutLane" | "loopStage" | "loopFanoutLane";
1971
+ type TaskKind = "stage" | "fanoutLane" | "fanoutFanin" | "loopStage" | "loopFanoutLane" | "loopFanoutFanin";
2527
1972
  type TaskExecution = "agent" | "deterministic";
2528
1973
  type RunMonitorStage = {
2529
1974
  id: string;
@@ -2555,16 +2000,15 @@ type RunMonitorTask = {
2555
2000
  stageId: string;
2556
2001
  label: string;
2557
2002
  status: TaskStatus;
2558
- roleName?: string;
2003
+ actorLabel?: string;
2559
2004
  agent?: string;
2560
- roleMode?: string;
2005
+ actorMode?: string;
2561
2006
  attemptId?: string;
2562
2007
  attemptIds: string[];
2563
2008
  round?: number;
2564
2009
  bodyStageId?: string;
2565
2010
  itemId?: string;
2566
2011
  itemIndex?: number;
2567
- groupId?: string;
2568
2012
  laneId?: string;
2569
2013
  startedAt?: string;
2570
2014
  completedAt?: string;
@@ -2573,6 +2017,12 @@ type RunMonitorTask = {
2573
2017
  outputPath?: string;
2574
2018
  elapsedMs?: number;
2575
2019
  durationMs?: number;
2020
+ attemptCount?: number;
2021
+ currentAttemptOrdinal?: number;
2022
+ lastRetryReason?: AttemptIndexEntry["retryReason"];
2023
+ retryBudgetUsed?: number;
2024
+ retryBudgetLimit?: number;
2025
+ lastFailureCode?: string;
2576
2026
  };
2577
2027
  type RunMonitorView = {
2578
2028
  version: typeof RUN_MONITOR_VIEW_VERSION;
@@ -2596,6 +2046,7 @@ type RunMonitorView = {
2596
2046
  knownTasks: number;
2597
2047
  completedTasks: number;
2598
2048
  };
2049
+ finalOutput?: Record<string, unknown>;
2599
2050
  };
2600
2051
  type TaskDetailView = {
2601
2052
  version: typeof TASK_DETAIL_VIEW_VERSION;
@@ -2617,6 +2068,15 @@ type TaskDetailView = {
2617
2068
  blockedReason?: string;
2618
2069
  parseErrorCode?: string;
2619
2070
  runtimeErrorCode?: string;
2071
+ isRetry?: boolean;
2072
+ retryReason?: AttemptIndexEntry["retryReason"];
2073
+ retryOf?: string;
2074
+ retryOrdinal?: number;
2075
+ retryBudgetUsed?: number;
2076
+ retryBudgetLimit?: number;
2077
+ promptPolicy?: AttemptIndexEntry["promptPolicy"];
2078
+ lastFailureCode?: string;
2079
+ retryMessage?: string;
2620
2080
  }>;
2621
2081
  totalAttempts: number;
2622
2082
  };
@@ -2625,12 +2085,6 @@ type TaskDetailView = {
2625
2085
  status?: string;
2626
2086
  summary?: string;
2627
2087
  blockedReason?: string;
2628
- artifacts: Array<{
2629
- kind?: string;
2630
- path?: string;
2631
- url?: string;
2632
- label?: string;
2633
- }>;
2634
2088
  preview?: string;
2635
2089
  };
2636
2090
  };
@@ -2639,8 +2093,8 @@ declare function buildTaskDetailView(cwd: string, spec: WorkflowSpec, index: Run
2639
2093
  //#endregion
2640
2094
  //#region src/runtime/output-parser.d.ts
2641
2095
  type OutputParseErrorCode = "OK" | "OUTPUT_PARSE_FAILED" | "OUTPUT_SCHEMA_FAILED";
2642
- type OutputCandidateMode = "lastBalancedJson";
2643
- type OutputCandidateSyntax = "invalidJson" | "validJson" | "repairedJson";
2096
+ type OutputCandidateMode = "lastBalancedJsonObject";
2097
+ type OutputCandidateSyntax = "invalidJson" | "validJson";
2644
2098
  type OutputCandidateDiagnostic = {
2645
2099
  id: string;
2646
2100
  mode: OutputCandidateMode;
@@ -2648,7 +2102,6 @@ type OutputCandidateDiagnostic = {
2648
2102
  rawHash: string;
2649
2103
  rawPreview: string;
2650
2104
  normalizedPreview?: string;
2651
- repairedPreview?: string;
2652
2105
  parseError?: string;
2653
2106
  schemaErrors: Array<{
2654
2107
  path: string;
@@ -2662,18 +2115,15 @@ type OutputParseDiagnostics = {
2662
2115
  summary: string;
2663
2116
  candidateCount: number;
2664
2117
  bestCandidateId?: string;
2665
- recoverability: "repairable" | "not_repairable";
2118
+ recoverability: "retryable" | "not_retryable";
2666
2119
  candidates: OutputCandidateDiagnostic[];
2667
- warnings: string[];
2668
2120
  };
2669
2121
  type OutputParseSuccess = {
2670
2122
  ok: true;
2671
2123
  value: Record<string, unknown>;
2672
2124
  outputParse: {
2673
2125
  mode: OutputCandidateMode;
2674
- repaired: boolean;
2675
2126
  candidateCount: number;
2676
- warnings: string[];
2677
2127
  };
2678
2128
  diagnostics: OutputParseDiagnostics;
2679
2129
  };
@@ -2686,10 +2136,8 @@ type OutputParseFailure = {
2686
2136
  };
2687
2137
  type OutputParseResult = OutputParseSuccess | OutputParseFailure;
2688
2138
  type ParseWorkflowOutputOptions = {
2689
- contractOptions?: {
2690
- outputKey?: string;
2691
- maxItems?: number;
2692
- };
2139
+ outputSchema?: CompiledSchema;
2140
+ implicitFields?: Record<string, z.ZodType>;
2693
2141
  };
2694
2142
  type RawCandidate = {
2695
2143
  id: string;
@@ -2698,24 +2146,28 @@ type RawCandidate = {
2698
2146
  start: number;
2699
2147
  end: number;
2700
2148
  };
2701
- declare function parseWorkflowOutput(text: string, contractName: OutputContractName, options?: ParseWorkflowOutputOptions): OutputParseResult;
2149
+ declare function parseWorkflowOutput(text: string, options?: ParseWorkflowOutputOptions): OutputParseResult;
2702
2150
  declare function collectWorkflowOutputCandidates(text: string): RawCandidate[];
2703
2151
  //#endregion
2704
- //#region src/runtime/repair.d.ts
2705
- declare function isRepairableOutputFailure(reason: string | undefined): boolean;
2706
- declare function formatRepairPrompt(input: {
2707
- contractName: OutputContractName;
2152
+ //#region src/runtime/agent-task-retry.d.ts
2153
+ declare const AGENT_TASK_RETRY_BUDGET = 2;
2154
+ declare const AGENT_TASK_RETRY_DELAY_MS = 5000;
2155
+ declare function agentTaskRetryDelayMs(): number;
2156
+ declare function setAgentTaskRetryDelayForTests(delayMs: number | undefined): void;
2157
+ declare function retryableOutputFailure(reason: string | undefined): boolean;
2158
+ declare function formatContinuationPrompt(input: {
2708
2159
  failure: OutputParseFailure;
2709
- contractOptions?: {
2710
- outputKey?: string;
2711
- maxItems?: number;
2712
- };
2160
+ outputSchema?: CompiledSchema;
2161
+ implicitOutputFields?: string[];
2713
2162
  }): string;
2714
- declare function repairFailedEnvelope(input: {
2163
+ declare function retryExhaustedEnvelope(input: {
2715
2164
  summary: string;
2716
- originalReason: string;
2717
- repairDiagnostics: unknown;
2165
+ lastFailureCode: string;
2166
+ retryHistory: unknown[];
2718
2167
  }): Record<string, unknown>;
2168
+ declare function retryCountByReason(attempts: Array<{
2169
+ retryReason?: AgentTaskRetryReason;
2170
+ }>): Record<AgentTaskRetryReason, number>;
2719
2171
  //#endregion
2720
2172
  //#region src/runtime/run-workflow.d.ts
2721
2173
  type PreparedRun = {
@@ -2739,4 +2191,4 @@ type SyncRunOptions = {
2739
2191
  };
2740
2192
  declare function syncRun(cwd: string, logicalRunId: string, options?: SyncRunOptions): Promise<RunIndex>;
2741
2193
  //#endregion
2742
- export { AgentTaskStageSchema, ArtifactSchema, BaseOutputSchema, BuildRunDiagnosticsOptions, CheckSchema, type CompileExecutionPlanOptions, ConditionNode, ConditionSchema, type ContractPlan, DecisionGateStageSchema, DecisionRuleSchema, DiscoverStageSchema, EXECUTION_PLAN_VERSION, type ExecutionPlan, type ExecutionPlanLimits, type ExecutionPlanRole, type ExecutionPlanStage, type ExecutionPlanStageLimits, FanoutLaneGroupSchema, FanoutLaneSchema, type FanoutPlan, FanoutStageSchema, FindingSchema, GateOutputSchema, GateStageSchema, ImplementationOutputSchema, InputDeclarationSchema, InputTypeSchema, IssueResult, IssueSeverity, LoopBodyStageSchema, LoopStageSchema, OrchestratorError, OrchestratorIssue, OutputCandidateDiagnostic, OutputCandidateMode, OutputCandidateSyntax, type OutputContract, type OutputContractName, OutputContractNameSchema, type OutputContractOptions, OutputParseDiagnostics, OutputParseErrorCode, OutputParseFailure, OutputParseResult, OutputParseSuccess, ParseWorkflowOutputOptions, PreparedRun, type PromptPlan, RUN_DIAGNOSTICS_VIEW_VERSION, RUN_MONITOR_VIEW_VERSION, ReduceStageSchema, type RepairPolicyPlan, Role, RoleCategorySchema, RoleModeSchema, RoleSchema, RunDiagnostic, RunDiagnosticCodes, RunDiagnosticEvent, RunDiagnosticSource, RunDiagnosticsView, RunMonitorStage, RunMonitorTask, RunMonitorView, RunView, RunViewOutputParse, RunViewParseDiagnostics, RunViewStatus, SCHEMA_VERSION, type SessionKeyStrategy, SeverityCountsSchema, Stage, StageLimitsSchema, StageSchema, SummarizeStageSchema, type SyncRunOptions, TASK_DETAIL_VIEW_VERSION, TaskCounts, TaskDetailView, TaskExecution, TaskKind, TaskStatus, TransformSchema, ValidationOutputSchema, Variable, VariableSchema, WorkflowLimitsSchema, WorkflowSpec, WorkflowSpecSchema, buildRunDiagnosticsView, buildRunMonitorView, buildTaskDetailView, collectWorkflowOutputCandidates, compileExecutionPlan, contractNameForStage, estimateAgentCalls, estimateFanoutWork, formatRepairPrompt, getOutputContract, isRepairableOutputFailure, issue, lintWorkflowSpec, loadWorkflowSpec, parseWorkflowOutput, prepareRun, previewRunView, readNdjsonTail, renderPromptMap, renderStagePrompt, repairFailedEnvelope, resultFromIssues, runViewFromIndex, stageRoleName, startPreparedRun, syncRun, topologicalOrder };
2194
+ export { AGENT_TASK_RETRY_BUDGET, AGENT_TASK_RETRY_DELAY_MS, Actor, ActorModeSchema, ActorSchema, AgentFaninSchema, BuildRunDiagnosticsOptions, type CompileExecutionPlanOptions, CompiledSchema, ConditionNode, ConditionSchema, DEFAULT_AGENT_OUTPUT_SCHEMA, EXECUTION_PLAN_VERSION, type ExecutionPlan, type ExecutionPlanLimits, type ExecutionPlanStage, type ExecutionPlanStageLimits, FaninSchema, FanoutLaneSchema, type FanoutPlan, FanoutPolicySchema, FanoutStageLimitsSchema, FanoutStageSchema, GateAgentStageSchema, GateProgramStageSchema, GateStageSchema, IssueResult, IssueSeverity, LimitBindingSchema, LimitValueSchema, LoopBodyStage, LoopBodyStageSchema, LoopStageSchema, OrchestratorError, OrchestratorIssue, OutputCandidateDiagnostic, OutputCandidateMode, OutputCandidateSyntax, OutputParseDiagnostics, OutputParseErrorCode, OutputParseFailure, OutputParseResult, OutputParseSuccess, ParseWorkflowOutputOptions, PositiveIntegerLimitSchema, PreparedRun, ProgramFaninSchema, type PromptPlan, RUN_DIAGNOSTICS_VIEW_VERSION, RUN_MONITOR_VIEW_VERSION, RouteAgentStageSchema, RouteProgramStageSchema, RouteRuleSchema, RouteStageSchema, RunDiagnostic, RunDiagnosticCodes, RunDiagnosticEvent, RunDiagnosticSource, RunDiagnosticsView, RunMonitorStage, RunMonitorTask, RunMonitorView, RunView, RunViewOutputParse, RunViewParseDiagnostics, RunViewStatus, SCHEMA_VERSION, SchemaAst, type SessionKeyStrategy, Stage, StageLimitsSchema, StageSchema, type SyncRunOptions, TASK_DETAIL_VIEW_VERSION, TaskAgentStageSchema, TaskCounts, TaskDetailView, TaskExecution, TaskKind, TaskProgramStageSchema, TaskStageSchema, TaskStatus, TransformSchema, Variable, VariableSchema, WorkflowInputSchema, WorkflowLimitsSchema, WorkflowSpec, WorkflowSpecSchema, agentTaskRetryDelayMs, buildRunDiagnosticsView, buildRunMonitorView, buildTaskDetailView, collectWorkflowOutputCandidates, compileExecutionPlan, compileSchemaDsl, defaultAgentOutputZod, estimateAgentCalls, estimateFanoutWork, formatContinuationPrompt, formatSchema, isWorkflowYamlPath, issue, lintWorkflowSpec, loadWorkflowSpec, outputSchemaFooter, parseWorkflowOutput, prepareRun, previewRunView, readNdjsonTail, renderPromptMap, renderStagePrompt, resultFromIssues, retryCountByReason, retryExhaustedEnvelope, retryableOutputFailure, runViewFromIndex, setAgentTaskRetryDelayForTests, stageActorLabel, startPreparedRun, stringifyWorkflowSpec, syncRun, topologicalOrder, zodForCompiledSchema };