@xpert-ai/contracts 3.22.0 → 3.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/index.cjs.js +5296 -368
  2. package/index.esm.js +5185 -369
  3. package/package.json +2 -2
  4. package/src/ai/agent-output-delivery.model.d.ts +10 -10
  5. package/src/ai/agent-runtime.model.d.ts +24 -24
  6. package/src/ai/assistant-model.model.d.ts +8 -0
  7. package/src/ai/assistant-template-dependencies.model.d.ts +1 -1
  8. package/src/ai/chat-group.model.d.ts +7 -3
  9. package/src/ai/index.d.ts +2 -0
  10. package/src/ai/mcp-publication.model.d.ts +20 -0
  11. package/src/ai/model-discovery.model.d.ts +2 -0
  12. package/src/ai/project-pipeline/analytics.d.ts +1685 -0
  13. package/src/ai/project-pipeline/budget.schema.d.ts +78 -0
  14. package/src/ai/project-pipeline/catalog.schema.d.ts +188 -0
  15. package/src/ai/project-pipeline/catalog.validation.d.ts +4 -0
  16. package/src/ai/project-pipeline/commands.schema.d.ts +4381 -0
  17. package/src/ai/project-pipeline/compatibility.d.ts +5 -0
  18. package/src/ai/project-pipeline/compatibility.schema.d.ts +29 -0
  19. package/src/ai/project-pipeline/configuration-form.d.ts +17374 -0
  20. package/src/ai/project-pipeline/configuration.schema.d.ts +3774 -0
  21. package/src/ai/project-pipeline/contribution.schema.d.ts +6721 -0
  22. package/src/ai/project-pipeline/dataflow.validation.d.ts +6 -0
  23. package/src/ai/project-pipeline/definition.schema.d.ts +3808 -0
  24. package/src/ai/project-pipeline/definition.validation.d.ts +7 -0
  25. package/src/ai/project-pipeline/execution-statistics.d.ts +267 -0
  26. package/src/ai/project-pipeline/graph.model.d.ts +89 -0
  27. package/src/ai/project-pipeline/human-wait-statistics.d.ts +70 -0
  28. package/src/ai/project-pipeline/human-wait.schema.d.ts +26 -0
  29. package/src/ai/project-pipeline/index.d.ts +28 -0
  30. package/src/ai/project-pipeline/model-usage-statistics.d.ts +143 -0
  31. package/src/ai/project-pipeline/native-source.schema.d.ts +40 -0
  32. package/src/ai/project-pipeline/node.schema.d.ts +839 -0
  33. package/src/ai/project-pipeline/operation.schema.d.ts +800 -0
  34. package/src/ai/project-pipeline/portfolio.schema.d.ts +3817 -0
  35. package/src/ai/project-pipeline/primitives.schema.d.ts +138 -0
  36. package/src/ai/project-pipeline/projection.schema.d.ts +4715 -0
  37. package/src/ai/project-pipeline/provider-actions.schema.d.ts +2030 -0
  38. package/src/ai/project-pipeline/queue-statistics.d.ts +326 -0
  39. package/src/ai/project-pipeline/resources.schema.d.ts +73 -0
  40. package/src/ai/project-pipeline/runtime.schema.d.ts +934 -0
  41. package/src/ai/project-pipeline/statistics.d.ts +811 -0
  42. package/src/ai/project-task-graph.model.d.ts +18 -2
  43. package/src/ai/project-task-runtime.model.d.ts +924 -924
  44. package/src/ai/provider-credential-validation.model.d.ts +63 -0
  45. package/src/ai/template-installation.model.d.ts +27 -0
  46. package/src/ai/types.d.ts +6 -4
  47. package/src/ai/xpert-project-type.model.d.ts +15 -4
  48. package/src/ai/xpert-project.model.d.ts +9 -2
  49. package/src/ai/xpert.model.d.ts +5 -0
  50. package/src/analytics-query.model.d.ts +180 -0
  51. package/src/artifact-presentation.model.d.ts +28 -0
  52. package/src/artifact.model.d.ts +15 -0
  53. package/src/assistant-sharing.model.d.ts +32 -0
  54. package/src/index.d.ts +4 -0
  55. package/src/plugin-application.d.ts +4 -1
  56. package/src/user-directory.model.d.ts +15 -0
  57. package/src/user-group.model.d.ts +1 -0
  58. package/src/view-extension/model.d.ts +16 -1
@@ -0,0 +1,4381 @@
1
+ import { z } from 'zod/v3';
2
+ export declare const projectPipelineConfigureSchema: z.ZodObject<{
3
+ requestId: z.ZodString;
4
+ configuration: z.ZodEffects<z.ZodObject<{
5
+ schemaVersion: z.ZodLiteral<1>;
6
+ template: z.ZodEffects<z.ZodDiscriminatedUnion<"executionAuthority", [z.ZodObject<{
7
+ executionAuthority: z.ZodLiteral<"provider">;
8
+ providerRef: z.ZodString;
9
+ topology: z.ZodObject<{
10
+ source: z.ZodLiteral<"provider">;
11
+ presentationAdapterRef: z.ZodString;
12
+ }, "strict", z.ZodTypeAny, {
13
+ source: "provider";
14
+ presentationAdapterRef: string;
15
+ }, {
16
+ source: "provider";
17
+ presentationAdapterRef: string;
18
+ }>;
19
+ actionRefs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
20
+ hostRequirements: z.ZodOptional<z.ZodObject<{
21
+ protocol: z.ZodNumber;
22
+ features: z.ZodEffects<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodNumber>, Record<string, number>, Record<string, number>>;
23
+ }, "strict", z.ZodTypeAny, {
24
+ protocol: number;
25
+ features: Record<string, number>;
26
+ }, {
27
+ protocol: number;
28
+ features: Record<string, number>;
29
+ }>>;
30
+ key: z.ZodEffects<z.ZodString, string, string>;
31
+ version: z.ZodString;
32
+ title: z.ZodString;
33
+ subjectResolverRef: z.ZodString;
34
+ roles: z.ZodArray<z.ZodObject<{
35
+ key: z.ZodEffects<z.ZodString, string, string>;
36
+ allowedKinds: z.ZodArray<z.ZodEnum<["assistant", "runtime_binding", "human", "service"]>, "many">;
37
+ }, "strict", z.ZodTypeAny, {
38
+ key: string;
39
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
40
+ }, {
41
+ key: string;
42
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
43
+ }>, "many">;
44
+ lanes: z.ZodArray<z.ZodObject<{
45
+ key: z.ZodEffects<z.ZodString, string, string>;
46
+ roleKey: z.ZodEffects<z.ZodString, string, string>;
47
+ label: z.ZodString;
48
+ order: z.ZodNumber;
49
+ }, "strict", z.ZodTypeAny, {
50
+ key: string;
51
+ roleKey: string;
52
+ label: string;
53
+ order: number;
54
+ }, {
55
+ key: string;
56
+ roleKey: string;
57
+ label: string;
58
+ order: number;
59
+ }>, "many">;
60
+ stages: z.ZodArray<z.ZodObject<{
61
+ key: z.ZodEffects<z.ZodString, string, string>;
62
+ label: z.ZodString;
63
+ icon: z.ZodOptional<z.ZodEnum<["layers", "file-text", "folder-open", "list-checks", "search", "scan-search", "boxes", "package", "settings", "clipboard-check", "shield-check", "git-pull-request", "code", "test-tube", "git-merge", "calculator", "file-check", "truck"]>>;
64
+ order: z.ZodNumber;
65
+ }, "strict", z.ZodTypeAny, {
66
+ key: string;
67
+ label: string;
68
+ order: number;
69
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
70
+ }, {
71
+ key: string;
72
+ label: string;
73
+ order: number;
74
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
75
+ }>, "many">;
76
+ presentation: z.ZodOptional<z.ZodObject<{
77
+ views: z.ZodArray<z.ZodEnum<["tasks", "pipeline", "agent_timeline"]>, "many">;
78
+ nodeDetailRef: z.ZodOptional<z.ZodString>;
79
+ evidenceTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
80
+ }, "strict", z.ZodTypeAny, {
81
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
82
+ nodeDetailRef?: string | undefined;
83
+ evidenceTypes?: string[] | undefined;
84
+ }, {
85
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
86
+ nodeDetailRef?: string | undefined;
87
+ evidenceTypes?: string[] | undefined;
88
+ }>>;
89
+ metrics: z.ZodOptional<z.ZodObject<{
90
+ dimensionRefs: z.ZodArray<z.ZodString, "many">;
91
+ metricRefs: z.ZodArray<z.ZodString, "many">;
92
+ }, "strict", z.ZodTypeAny, {
93
+ dimensionRefs: string[];
94
+ metricRefs: string[];
95
+ }, {
96
+ dimensionRefs: string[];
97
+ metricRefs: string[];
98
+ }>>;
99
+ }, "strict", z.ZodTypeAny, {
100
+ key: string;
101
+ executionAuthority: "provider";
102
+ providerRef: string;
103
+ topology: {
104
+ source: "provider";
105
+ presentationAdapterRef: string;
106
+ };
107
+ version: string;
108
+ title: string;
109
+ subjectResolverRef: string;
110
+ roles: {
111
+ key: string;
112
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
113
+ }[];
114
+ lanes: {
115
+ key: string;
116
+ roleKey: string;
117
+ label: string;
118
+ order: number;
119
+ }[];
120
+ stages: {
121
+ key: string;
122
+ label: string;
123
+ order: number;
124
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
125
+ }[];
126
+ actionRefs?: string[] | undefined;
127
+ hostRequirements?: {
128
+ protocol: number;
129
+ features: Record<string, number>;
130
+ } | undefined;
131
+ presentation?: {
132
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
133
+ nodeDetailRef?: string | undefined;
134
+ evidenceTypes?: string[] | undefined;
135
+ } | undefined;
136
+ metrics?: {
137
+ dimensionRefs: string[];
138
+ metricRefs: string[];
139
+ } | undefined;
140
+ }, {
141
+ key: string;
142
+ executionAuthority: "provider";
143
+ providerRef: string;
144
+ topology: {
145
+ source: "provider";
146
+ presentationAdapterRef: string;
147
+ };
148
+ version: string;
149
+ title: string;
150
+ subjectResolverRef: string;
151
+ roles: {
152
+ key: string;
153
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
154
+ }[];
155
+ lanes: {
156
+ key: string;
157
+ roleKey: string;
158
+ label: string;
159
+ order: number;
160
+ }[];
161
+ stages: {
162
+ key: string;
163
+ label: string;
164
+ order: number;
165
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
166
+ }[];
167
+ actionRefs?: string[] | undefined;
168
+ hostRequirements?: {
169
+ protocol: number;
170
+ features: Record<string, number>;
171
+ } | undefined;
172
+ presentation?: {
173
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
174
+ nodeDetailRef?: string | undefined;
175
+ evidenceTypes?: string[] | undefined;
176
+ } | undefined;
177
+ metrics?: {
178
+ dimensionRefs: string[];
179
+ metricRefs: string[];
180
+ } | undefined;
181
+ }>, z.ZodObject<{
182
+ executionAuthority: z.ZodLiteral<"platform">;
183
+ topology: z.ZodObject<{
184
+ source: z.ZodLiteral<"definition">;
185
+ }, "strict", z.ZodTypeAny, {
186
+ source: "definition";
187
+ }, {
188
+ source: "definition";
189
+ }>;
190
+ nodes: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
191
+ kind: z.ZodLiteral<"work">;
192
+ laneKey: z.ZodEffects<z.ZodString, string, string>;
193
+ operationRef: z.ZodString;
194
+ executorSlot: z.ZodEffects<z.ZodString, string, string>;
195
+ completionRef: z.ZodString;
196
+ resourceResolverRef: z.ZodOptional<z.ZodString>;
197
+ outputSchemaRef: z.ZodOptional<z.ZodString>;
198
+ key: z.ZodEffects<z.ZodString, string, string>;
199
+ label: z.ZodOptional<z.ZodString>;
200
+ stageKey: z.ZodEffects<z.ZodString, string, string>;
201
+ inputBindings: z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodDiscriminatedUnion<"from", [z.ZodObject<{
202
+ from: z.ZodLiteral<"subject">;
203
+ }, "strict", z.ZodTypeAny, {
204
+ from: "subject";
205
+ }, {
206
+ from: "subject";
207
+ }>, z.ZodObject<{
208
+ from: z.ZodLiteral<"parameter">;
209
+ key: z.ZodEffects<z.ZodString, string, string>;
210
+ }, "strict", z.ZodTypeAny, {
211
+ key: string;
212
+ from: "parameter";
213
+ }, {
214
+ key: string;
215
+ from: "parameter";
216
+ }>, z.ZodObject<{
217
+ from: z.ZodLiteral<"node_output">;
218
+ nodeKey: z.ZodEffects<z.ZodString, string, string>;
219
+ port: z.ZodEffects<z.ZodString, string, string>;
220
+ }, "strict", z.ZodTypeAny, {
221
+ from: "node_output";
222
+ nodeKey: string;
223
+ port: string;
224
+ }, {
225
+ from: "node_output";
226
+ nodeKey: string;
227
+ port: string;
228
+ }>, z.ZodObject<{
229
+ from: z.ZodLiteral<"collection">;
230
+ items: z.ZodArray<z.ZodObject<{
231
+ from: z.ZodLiteral<"node_output">;
232
+ nodeKey: z.ZodEffects<z.ZodString, string, string>;
233
+ port: z.ZodEffects<z.ZodString, string, string>;
234
+ }, "strict", z.ZodTypeAny, {
235
+ from: "node_output";
236
+ nodeKey: string;
237
+ port: string;
238
+ }, {
239
+ from: "node_output";
240
+ nodeKey: string;
241
+ port: string;
242
+ }>, "many">;
243
+ }, "strict", z.ZodTypeAny, {
244
+ from: "collection";
245
+ items: {
246
+ from: "node_output";
247
+ nodeKey: string;
248
+ port: string;
249
+ }[];
250
+ }, {
251
+ from: "collection";
252
+ items: {
253
+ from: "node_output";
254
+ nodeKey: string;
255
+ port: string;
256
+ }[];
257
+ }>]>>>;
258
+ outputPorts: z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodString>>;
259
+ }, "strict", z.ZodTypeAny, {
260
+ key: string;
261
+ kind: "work";
262
+ laneKey: string;
263
+ operationRef: string;
264
+ executorSlot: string;
265
+ completionRef: string;
266
+ stageKey: string;
267
+ label?: string | undefined;
268
+ resourceResolverRef?: string | undefined;
269
+ outputSchemaRef?: string | undefined;
270
+ inputBindings?: Record<string, {
271
+ from: "node_output";
272
+ nodeKey: string;
273
+ port: string;
274
+ } | {
275
+ from: "subject";
276
+ } | {
277
+ key: string;
278
+ from: "parameter";
279
+ } | {
280
+ from: "collection";
281
+ items: {
282
+ from: "node_output";
283
+ nodeKey: string;
284
+ port: string;
285
+ }[];
286
+ }> | undefined;
287
+ outputPorts?: Record<string, string> | undefined;
288
+ }, {
289
+ key: string;
290
+ kind: "work";
291
+ laneKey: string;
292
+ operationRef: string;
293
+ executorSlot: string;
294
+ completionRef: string;
295
+ stageKey: string;
296
+ label?: string | undefined;
297
+ resourceResolverRef?: string | undefined;
298
+ outputSchemaRef?: string | undefined;
299
+ inputBindings?: Record<string, {
300
+ from: "node_output";
301
+ nodeKey: string;
302
+ port: string;
303
+ } | {
304
+ from: "subject";
305
+ } | {
306
+ key: string;
307
+ from: "parameter";
308
+ } | {
309
+ from: "collection";
310
+ items: {
311
+ from: "node_output";
312
+ nodeKey: string;
313
+ port: string;
314
+ }[];
315
+ }> | undefined;
316
+ outputPorts?: Record<string, string> | undefined;
317
+ }>, z.ZodObject<{
318
+ kind: z.ZodLiteral<"fork">;
319
+ key: z.ZodEffects<z.ZodString, string, string>;
320
+ label: z.ZodOptional<z.ZodString>;
321
+ stageKey: z.ZodEffects<z.ZodString, string, string>;
322
+ inputBindings: z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodDiscriminatedUnion<"from", [z.ZodObject<{
323
+ from: z.ZodLiteral<"subject">;
324
+ }, "strict", z.ZodTypeAny, {
325
+ from: "subject";
326
+ }, {
327
+ from: "subject";
328
+ }>, z.ZodObject<{
329
+ from: z.ZodLiteral<"parameter">;
330
+ key: z.ZodEffects<z.ZodString, string, string>;
331
+ }, "strict", z.ZodTypeAny, {
332
+ key: string;
333
+ from: "parameter";
334
+ }, {
335
+ key: string;
336
+ from: "parameter";
337
+ }>, z.ZodObject<{
338
+ from: z.ZodLiteral<"node_output">;
339
+ nodeKey: z.ZodEffects<z.ZodString, string, string>;
340
+ port: z.ZodEffects<z.ZodString, string, string>;
341
+ }, "strict", z.ZodTypeAny, {
342
+ from: "node_output";
343
+ nodeKey: string;
344
+ port: string;
345
+ }, {
346
+ from: "node_output";
347
+ nodeKey: string;
348
+ port: string;
349
+ }>, z.ZodObject<{
350
+ from: z.ZodLiteral<"collection">;
351
+ items: z.ZodArray<z.ZodObject<{
352
+ from: z.ZodLiteral<"node_output">;
353
+ nodeKey: z.ZodEffects<z.ZodString, string, string>;
354
+ port: z.ZodEffects<z.ZodString, string, string>;
355
+ }, "strict", z.ZodTypeAny, {
356
+ from: "node_output";
357
+ nodeKey: string;
358
+ port: string;
359
+ }, {
360
+ from: "node_output";
361
+ nodeKey: string;
362
+ port: string;
363
+ }>, "many">;
364
+ }, "strict", z.ZodTypeAny, {
365
+ from: "collection";
366
+ items: {
367
+ from: "node_output";
368
+ nodeKey: string;
369
+ port: string;
370
+ }[];
371
+ }, {
372
+ from: "collection";
373
+ items: {
374
+ from: "node_output";
375
+ nodeKey: string;
376
+ port: string;
377
+ }[];
378
+ }>]>>>;
379
+ outputPorts: z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodString>>;
380
+ }, "strict", z.ZodTypeAny, {
381
+ key: string;
382
+ kind: "fork";
383
+ stageKey: string;
384
+ label?: string | undefined;
385
+ inputBindings?: Record<string, {
386
+ from: "node_output";
387
+ nodeKey: string;
388
+ port: string;
389
+ } | {
390
+ from: "subject";
391
+ } | {
392
+ key: string;
393
+ from: "parameter";
394
+ } | {
395
+ from: "collection";
396
+ items: {
397
+ from: "node_output";
398
+ nodeKey: string;
399
+ port: string;
400
+ }[];
401
+ }> | undefined;
402
+ outputPorts?: Record<string, string> | undefined;
403
+ }, {
404
+ key: string;
405
+ kind: "fork";
406
+ stageKey: string;
407
+ label?: string | undefined;
408
+ inputBindings?: Record<string, {
409
+ from: "node_output";
410
+ nodeKey: string;
411
+ port: string;
412
+ } | {
413
+ from: "subject";
414
+ } | {
415
+ key: string;
416
+ from: "parameter";
417
+ } | {
418
+ from: "collection";
419
+ items: {
420
+ from: "node_output";
421
+ nodeKey: string;
422
+ port: string;
423
+ }[];
424
+ }> | undefined;
425
+ outputPorts?: Record<string, string> | undefined;
426
+ }>, z.ZodObject<{
427
+ kind: z.ZodLiteral<"join">;
428
+ join: z.ZodObject<{
429
+ mode: z.ZodLiteral<"all_selected">;
430
+ accept: z.ZodLiteral<"completed">;
431
+ }, "strict", z.ZodTypeAny, {
432
+ mode: "all_selected";
433
+ accept: "completed";
434
+ }, {
435
+ mode: "all_selected";
436
+ accept: "completed";
437
+ }>;
438
+ key: z.ZodEffects<z.ZodString, string, string>;
439
+ label: z.ZodOptional<z.ZodString>;
440
+ stageKey: z.ZodEffects<z.ZodString, string, string>;
441
+ inputBindings: z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodDiscriminatedUnion<"from", [z.ZodObject<{
442
+ from: z.ZodLiteral<"subject">;
443
+ }, "strict", z.ZodTypeAny, {
444
+ from: "subject";
445
+ }, {
446
+ from: "subject";
447
+ }>, z.ZodObject<{
448
+ from: z.ZodLiteral<"parameter">;
449
+ key: z.ZodEffects<z.ZodString, string, string>;
450
+ }, "strict", z.ZodTypeAny, {
451
+ key: string;
452
+ from: "parameter";
453
+ }, {
454
+ key: string;
455
+ from: "parameter";
456
+ }>, z.ZodObject<{
457
+ from: z.ZodLiteral<"node_output">;
458
+ nodeKey: z.ZodEffects<z.ZodString, string, string>;
459
+ port: z.ZodEffects<z.ZodString, string, string>;
460
+ }, "strict", z.ZodTypeAny, {
461
+ from: "node_output";
462
+ nodeKey: string;
463
+ port: string;
464
+ }, {
465
+ from: "node_output";
466
+ nodeKey: string;
467
+ port: string;
468
+ }>, z.ZodObject<{
469
+ from: z.ZodLiteral<"collection">;
470
+ items: z.ZodArray<z.ZodObject<{
471
+ from: z.ZodLiteral<"node_output">;
472
+ nodeKey: z.ZodEffects<z.ZodString, string, string>;
473
+ port: z.ZodEffects<z.ZodString, string, string>;
474
+ }, "strict", z.ZodTypeAny, {
475
+ from: "node_output";
476
+ nodeKey: string;
477
+ port: string;
478
+ }, {
479
+ from: "node_output";
480
+ nodeKey: string;
481
+ port: string;
482
+ }>, "many">;
483
+ }, "strict", z.ZodTypeAny, {
484
+ from: "collection";
485
+ items: {
486
+ from: "node_output";
487
+ nodeKey: string;
488
+ port: string;
489
+ }[];
490
+ }, {
491
+ from: "collection";
492
+ items: {
493
+ from: "node_output";
494
+ nodeKey: string;
495
+ port: string;
496
+ }[];
497
+ }>]>>>;
498
+ outputPorts: z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodString>>;
499
+ }, "strict", z.ZodTypeAny, {
500
+ join: {
501
+ mode: "all_selected";
502
+ accept: "completed";
503
+ };
504
+ key: string;
505
+ kind: "join";
506
+ stageKey: string;
507
+ label?: string | undefined;
508
+ inputBindings?: Record<string, {
509
+ from: "node_output";
510
+ nodeKey: string;
511
+ port: string;
512
+ } | {
513
+ from: "subject";
514
+ } | {
515
+ key: string;
516
+ from: "parameter";
517
+ } | {
518
+ from: "collection";
519
+ items: {
520
+ from: "node_output";
521
+ nodeKey: string;
522
+ port: string;
523
+ }[];
524
+ }> | undefined;
525
+ outputPorts?: Record<string, string> | undefined;
526
+ }, {
527
+ join: {
528
+ mode: "all_selected";
529
+ accept: "completed";
530
+ };
531
+ key: string;
532
+ kind: "join";
533
+ stageKey: string;
534
+ label?: string | undefined;
535
+ inputBindings?: Record<string, {
536
+ from: "node_output";
537
+ nodeKey: string;
538
+ port: string;
539
+ } | {
540
+ from: "subject";
541
+ } | {
542
+ key: string;
543
+ from: "parameter";
544
+ } | {
545
+ from: "collection";
546
+ items: {
547
+ from: "node_output";
548
+ nodeKey: string;
549
+ port: string;
550
+ }[];
551
+ }> | undefined;
552
+ outputPorts?: Record<string, string> | undefined;
553
+ }>, z.ZodObject<{
554
+ kind: z.ZodLiteral<"router">;
555
+ policyRef: z.ZodString;
556
+ outcomes: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
557
+ unmatched: z.ZodLiteral<"block">;
558
+ key: z.ZodEffects<z.ZodString, string, string>;
559
+ label: z.ZodOptional<z.ZodString>;
560
+ stageKey: z.ZodEffects<z.ZodString, string, string>;
561
+ inputBindings: z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodDiscriminatedUnion<"from", [z.ZodObject<{
562
+ from: z.ZodLiteral<"subject">;
563
+ }, "strict", z.ZodTypeAny, {
564
+ from: "subject";
565
+ }, {
566
+ from: "subject";
567
+ }>, z.ZodObject<{
568
+ from: z.ZodLiteral<"parameter">;
569
+ key: z.ZodEffects<z.ZodString, string, string>;
570
+ }, "strict", z.ZodTypeAny, {
571
+ key: string;
572
+ from: "parameter";
573
+ }, {
574
+ key: string;
575
+ from: "parameter";
576
+ }>, z.ZodObject<{
577
+ from: z.ZodLiteral<"node_output">;
578
+ nodeKey: z.ZodEffects<z.ZodString, string, string>;
579
+ port: z.ZodEffects<z.ZodString, string, string>;
580
+ }, "strict", z.ZodTypeAny, {
581
+ from: "node_output";
582
+ nodeKey: string;
583
+ port: string;
584
+ }, {
585
+ from: "node_output";
586
+ nodeKey: string;
587
+ port: string;
588
+ }>, z.ZodObject<{
589
+ from: z.ZodLiteral<"collection">;
590
+ items: z.ZodArray<z.ZodObject<{
591
+ from: z.ZodLiteral<"node_output">;
592
+ nodeKey: z.ZodEffects<z.ZodString, string, string>;
593
+ port: z.ZodEffects<z.ZodString, string, string>;
594
+ }, "strict", z.ZodTypeAny, {
595
+ from: "node_output";
596
+ nodeKey: string;
597
+ port: string;
598
+ }, {
599
+ from: "node_output";
600
+ nodeKey: string;
601
+ port: string;
602
+ }>, "many">;
603
+ }, "strict", z.ZodTypeAny, {
604
+ from: "collection";
605
+ items: {
606
+ from: "node_output";
607
+ nodeKey: string;
608
+ port: string;
609
+ }[];
610
+ }, {
611
+ from: "collection";
612
+ items: {
613
+ from: "node_output";
614
+ nodeKey: string;
615
+ port: string;
616
+ }[];
617
+ }>]>>>;
618
+ outputPorts: z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodString>>;
619
+ }, "strict", z.ZodTypeAny, {
620
+ key: string;
621
+ kind: "router";
622
+ stageKey: string;
623
+ policyRef: string;
624
+ outcomes: string[];
625
+ unmatched: "block";
626
+ label?: string | undefined;
627
+ inputBindings?: Record<string, {
628
+ from: "node_output";
629
+ nodeKey: string;
630
+ port: string;
631
+ } | {
632
+ from: "subject";
633
+ } | {
634
+ key: string;
635
+ from: "parameter";
636
+ } | {
637
+ from: "collection";
638
+ items: {
639
+ from: "node_output";
640
+ nodeKey: string;
641
+ port: string;
642
+ }[];
643
+ }> | undefined;
644
+ outputPorts?: Record<string, string> | undefined;
645
+ }, {
646
+ key: string;
647
+ kind: "router";
648
+ stageKey: string;
649
+ policyRef: string;
650
+ outcomes: string[];
651
+ unmatched: "block";
652
+ label?: string | undefined;
653
+ inputBindings?: Record<string, {
654
+ from: "node_output";
655
+ nodeKey: string;
656
+ port: string;
657
+ } | {
658
+ from: "subject";
659
+ } | {
660
+ key: string;
661
+ from: "parameter";
662
+ } | {
663
+ from: "collection";
664
+ items: {
665
+ from: "node_output";
666
+ nodeKey: string;
667
+ port: string;
668
+ }[];
669
+ }> | undefined;
670
+ outputPorts?: Record<string, string> | undefined;
671
+ }>, z.ZodObject<{
672
+ kind: z.ZodLiteral<"human_gate">;
673
+ laneKey: z.ZodEffects<z.ZodString, string, string>;
674
+ policyRef: z.ZodString;
675
+ candidateRoleKey: z.ZodEffects<z.ZodString, string, string>;
676
+ outcomes: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
677
+ outcomeLabels: z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodString>>;
678
+ key: z.ZodEffects<z.ZodString, string, string>;
679
+ label: z.ZodOptional<z.ZodString>;
680
+ stageKey: z.ZodEffects<z.ZodString, string, string>;
681
+ inputBindings: z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodDiscriminatedUnion<"from", [z.ZodObject<{
682
+ from: z.ZodLiteral<"subject">;
683
+ }, "strict", z.ZodTypeAny, {
684
+ from: "subject";
685
+ }, {
686
+ from: "subject";
687
+ }>, z.ZodObject<{
688
+ from: z.ZodLiteral<"parameter">;
689
+ key: z.ZodEffects<z.ZodString, string, string>;
690
+ }, "strict", z.ZodTypeAny, {
691
+ key: string;
692
+ from: "parameter";
693
+ }, {
694
+ key: string;
695
+ from: "parameter";
696
+ }>, z.ZodObject<{
697
+ from: z.ZodLiteral<"node_output">;
698
+ nodeKey: z.ZodEffects<z.ZodString, string, string>;
699
+ port: z.ZodEffects<z.ZodString, string, string>;
700
+ }, "strict", z.ZodTypeAny, {
701
+ from: "node_output";
702
+ nodeKey: string;
703
+ port: string;
704
+ }, {
705
+ from: "node_output";
706
+ nodeKey: string;
707
+ port: string;
708
+ }>, z.ZodObject<{
709
+ from: z.ZodLiteral<"collection">;
710
+ items: z.ZodArray<z.ZodObject<{
711
+ from: z.ZodLiteral<"node_output">;
712
+ nodeKey: z.ZodEffects<z.ZodString, string, string>;
713
+ port: z.ZodEffects<z.ZodString, string, string>;
714
+ }, "strict", z.ZodTypeAny, {
715
+ from: "node_output";
716
+ nodeKey: string;
717
+ port: string;
718
+ }, {
719
+ from: "node_output";
720
+ nodeKey: string;
721
+ port: string;
722
+ }>, "many">;
723
+ }, "strict", z.ZodTypeAny, {
724
+ from: "collection";
725
+ items: {
726
+ from: "node_output";
727
+ nodeKey: string;
728
+ port: string;
729
+ }[];
730
+ }, {
731
+ from: "collection";
732
+ items: {
733
+ from: "node_output";
734
+ nodeKey: string;
735
+ port: string;
736
+ }[];
737
+ }>]>>>;
738
+ outputPorts: z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodString>>;
739
+ }, "strict", z.ZodTypeAny, {
740
+ key: string;
741
+ kind: "human_gate";
742
+ laneKey: string;
743
+ stageKey: string;
744
+ policyRef: string;
745
+ outcomes: string[];
746
+ candidateRoleKey: string;
747
+ label?: string | undefined;
748
+ inputBindings?: Record<string, {
749
+ from: "node_output";
750
+ nodeKey: string;
751
+ port: string;
752
+ } | {
753
+ from: "subject";
754
+ } | {
755
+ key: string;
756
+ from: "parameter";
757
+ } | {
758
+ from: "collection";
759
+ items: {
760
+ from: "node_output";
761
+ nodeKey: string;
762
+ port: string;
763
+ }[];
764
+ }> | undefined;
765
+ outputPorts?: Record<string, string> | undefined;
766
+ outcomeLabels?: Record<string, string> | undefined;
767
+ }, {
768
+ key: string;
769
+ kind: "human_gate";
770
+ laneKey: string;
771
+ stageKey: string;
772
+ policyRef: string;
773
+ outcomes: string[];
774
+ candidateRoleKey: string;
775
+ label?: string | undefined;
776
+ inputBindings?: Record<string, {
777
+ from: "node_output";
778
+ nodeKey: string;
779
+ port: string;
780
+ } | {
781
+ from: "subject";
782
+ } | {
783
+ key: string;
784
+ from: "parameter";
785
+ } | {
786
+ from: "collection";
787
+ items: {
788
+ from: "node_output";
789
+ nodeKey: string;
790
+ port: string;
791
+ }[];
792
+ }> | undefined;
793
+ outputPorts?: Record<string, string> | undefined;
794
+ outcomeLabels?: Record<string, string> | undefined;
795
+ }>, z.ZodObject<{
796
+ kind: z.ZodLiteral<"external_wait">;
797
+ laneKey: z.ZodEffects<z.ZodString, string, string>;
798
+ subscriptionRef: z.ZodString;
799
+ key: z.ZodEffects<z.ZodString, string, string>;
800
+ label: z.ZodOptional<z.ZodString>;
801
+ stageKey: z.ZodEffects<z.ZodString, string, string>;
802
+ inputBindings: z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodDiscriminatedUnion<"from", [z.ZodObject<{
803
+ from: z.ZodLiteral<"subject">;
804
+ }, "strict", z.ZodTypeAny, {
805
+ from: "subject";
806
+ }, {
807
+ from: "subject";
808
+ }>, z.ZodObject<{
809
+ from: z.ZodLiteral<"parameter">;
810
+ key: z.ZodEffects<z.ZodString, string, string>;
811
+ }, "strict", z.ZodTypeAny, {
812
+ key: string;
813
+ from: "parameter";
814
+ }, {
815
+ key: string;
816
+ from: "parameter";
817
+ }>, z.ZodObject<{
818
+ from: z.ZodLiteral<"node_output">;
819
+ nodeKey: z.ZodEffects<z.ZodString, string, string>;
820
+ port: z.ZodEffects<z.ZodString, string, string>;
821
+ }, "strict", z.ZodTypeAny, {
822
+ from: "node_output";
823
+ nodeKey: string;
824
+ port: string;
825
+ }, {
826
+ from: "node_output";
827
+ nodeKey: string;
828
+ port: string;
829
+ }>, z.ZodObject<{
830
+ from: z.ZodLiteral<"collection">;
831
+ items: z.ZodArray<z.ZodObject<{
832
+ from: z.ZodLiteral<"node_output">;
833
+ nodeKey: z.ZodEffects<z.ZodString, string, string>;
834
+ port: z.ZodEffects<z.ZodString, string, string>;
835
+ }, "strict", z.ZodTypeAny, {
836
+ from: "node_output";
837
+ nodeKey: string;
838
+ port: string;
839
+ }, {
840
+ from: "node_output";
841
+ nodeKey: string;
842
+ port: string;
843
+ }>, "many">;
844
+ }, "strict", z.ZodTypeAny, {
845
+ from: "collection";
846
+ items: {
847
+ from: "node_output";
848
+ nodeKey: string;
849
+ port: string;
850
+ }[];
851
+ }, {
852
+ from: "collection";
853
+ items: {
854
+ from: "node_output";
855
+ nodeKey: string;
856
+ port: string;
857
+ }[];
858
+ }>]>>>;
859
+ outputPorts: z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodString>>;
860
+ }, "strict", z.ZodTypeAny, {
861
+ key: string;
862
+ kind: "external_wait";
863
+ laneKey: string;
864
+ stageKey: string;
865
+ subscriptionRef: string;
866
+ label?: string | undefined;
867
+ inputBindings?: Record<string, {
868
+ from: "node_output";
869
+ nodeKey: string;
870
+ port: string;
871
+ } | {
872
+ from: "subject";
873
+ } | {
874
+ key: string;
875
+ from: "parameter";
876
+ } | {
877
+ from: "collection";
878
+ items: {
879
+ from: "node_output";
880
+ nodeKey: string;
881
+ port: string;
882
+ }[];
883
+ }> | undefined;
884
+ outputPorts?: Record<string, string> | undefined;
885
+ }, {
886
+ key: string;
887
+ kind: "external_wait";
888
+ laneKey: string;
889
+ stageKey: string;
890
+ subscriptionRef: string;
891
+ label?: string | undefined;
892
+ inputBindings?: Record<string, {
893
+ from: "node_output";
894
+ nodeKey: string;
895
+ port: string;
896
+ } | {
897
+ from: "subject";
898
+ } | {
899
+ key: string;
900
+ from: "parameter";
901
+ } | {
902
+ from: "collection";
903
+ items: {
904
+ from: "node_output";
905
+ nodeKey: string;
906
+ port: string;
907
+ }[];
908
+ }> | undefined;
909
+ outputPorts?: Record<string, string> | undefined;
910
+ }>, z.ZodObject<{
911
+ kind: z.ZodLiteral<"terminal">;
912
+ outcome: z.ZodEffects<z.ZodString, string, string>;
913
+ disposition: z.ZodOptional<z.ZodEnum<["complete", "await_new_subject"]>>;
914
+ key: z.ZodEffects<z.ZodString, string, string>;
915
+ label: z.ZodOptional<z.ZodString>;
916
+ stageKey: z.ZodEffects<z.ZodString, string, string>;
917
+ inputBindings: z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodDiscriminatedUnion<"from", [z.ZodObject<{
918
+ from: z.ZodLiteral<"subject">;
919
+ }, "strict", z.ZodTypeAny, {
920
+ from: "subject";
921
+ }, {
922
+ from: "subject";
923
+ }>, z.ZodObject<{
924
+ from: z.ZodLiteral<"parameter">;
925
+ key: z.ZodEffects<z.ZodString, string, string>;
926
+ }, "strict", z.ZodTypeAny, {
927
+ key: string;
928
+ from: "parameter";
929
+ }, {
930
+ key: string;
931
+ from: "parameter";
932
+ }>, z.ZodObject<{
933
+ from: z.ZodLiteral<"node_output">;
934
+ nodeKey: z.ZodEffects<z.ZodString, string, string>;
935
+ port: z.ZodEffects<z.ZodString, string, string>;
936
+ }, "strict", z.ZodTypeAny, {
937
+ from: "node_output";
938
+ nodeKey: string;
939
+ port: string;
940
+ }, {
941
+ from: "node_output";
942
+ nodeKey: string;
943
+ port: string;
944
+ }>, z.ZodObject<{
945
+ from: z.ZodLiteral<"collection">;
946
+ items: z.ZodArray<z.ZodObject<{
947
+ from: z.ZodLiteral<"node_output">;
948
+ nodeKey: z.ZodEffects<z.ZodString, string, string>;
949
+ port: z.ZodEffects<z.ZodString, string, string>;
950
+ }, "strict", z.ZodTypeAny, {
951
+ from: "node_output";
952
+ nodeKey: string;
953
+ port: string;
954
+ }, {
955
+ from: "node_output";
956
+ nodeKey: string;
957
+ port: string;
958
+ }>, "many">;
959
+ }, "strict", z.ZodTypeAny, {
960
+ from: "collection";
961
+ items: {
962
+ from: "node_output";
963
+ nodeKey: string;
964
+ port: string;
965
+ }[];
966
+ }, {
967
+ from: "collection";
968
+ items: {
969
+ from: "node_output";
970
+ nodeKey: string;
971
+ port: string;
972
+ }[];
973
+ }>]>>>;
974
+ outputPorts: z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodString>>;
975
+ }, "strict", z.ZodTypeAny, {
976
+ key: string;
977
+ outcome: string;
978
+ kind: "terminal";
979
+ stageKey: string;
980
+ label?: string | undefined;
981
+ inputBindings?: Record<string, {
982
+ from: "node_output";
983
+ nodeKey: string;
984
+ port: string;
985
+ } | {
986
+ from: "subject";
987
+ } | {
988
+ key: string;
989
+ from: "parameter";
990
+ } | {
991
+ from: "collection";
992
+ items: {
993
+ from: "node_output";
994
+ nodeKey: string;
995
+ port: string;
996
+ }[];
997
+ }> | undefined;
998
+ outputPorts?: Record<string, string> | undefined;
999
+ disposition?: "complete" | "await_new_subject" | undefined;
1000
+ }, {
1001
+ key: string;
1002
+ outcome: string;
1003
+ kind: "terminal";
1004
+ stageKey: string;
1005
+ label?: string | undefined;
1006
+ inputBindings?: Record<string, {
1007
+ from: "node_output";
1008
+ nodeKey: string;
1009
+ port: string;
1010
+ } | {
1011
+ from: "subject";
1012
+ } | {
1013
+ key: string;
1014
+ from: "parameter";
1015
+ } | {
1016
+ from: "collection";
1017
+ items: {
1018
+ from: "node_output";
1019
+ nodeKey: string;
1020
+ port: string;
1021
+ }[];
1022
+ }> | undefined;
1023
+ outputPorts?: Record<string, string> | undefined;
1024
+ disposition?: "complete" | "await_new_subject" | undefined;
1025
+ }>]>, "many">;
1026
+ edges: z.ZodArray<z.ZodObject<{
1027
+ from: z.ZodEffects<z.ZodString, string, string>;
1028
+ to: z.ZodEffects<z.ZodString, string, string>;
1029
+ outcome: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1030
+ }, "strict", z.ZodTypeAny, {
1031
+ from: string;
1032
+ to: string;
1033
+ outcome?: string | undefined;
1034
+ }, {
1035
+ from: string;
1036
+ to: string;
1037
+ outcome?: string | undefined;
1038
+ }>, "many">;
1039
+ roundPolicy: z.ZodObject<{
1040
+ entryNodeKey: z.ZodEffects<z.ZodString, string, string>;
1041
+ maxRounds: z.ZodNumber;
1042
+ onRework: z.ZodLiteral<"await_new_subject_then_next_round">;
1043
+ onLimit: z.ZodLiteral<"attention">;
1044
+ newVersionWhileActive: z.ZodLiteral<"supersede_round">;
1045
+ terminalOutcomes: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
1046
+ }, "strict", z.ZodTypeAny, {
1047
+ entryNodeKey: string;
1048
+ maxRounds: number;
1049
+ onRework: "await_new_subject_then_next_round";
1050
+ onLimit: "attention";
1051
+ newVersionWhileActive: "supersede_round";
1052
+ terminalOutcomes: string[];
1053
+ }, {
1054
+ entryNodeKey: string;
1055
+ maxRounds: number;
1056
+ onRework: "await_new_subject_then_next_round";
1057
+ onLimit: "attention";
1058
+ newVersionWhileActive: "supersede_round";
1059
+ terminalOutcomes: string[];
1060
+ }>;
1061
+ failurePolicy: z.ZodObject<{
1062
+ requiredNodeFailure: z.ZodLiteral<"block_and_attention">;
1063
+ unknownExecution: z.ZodLiteral<"inspect_without_replay">;
1064
+ }, "strict", z.ZodTypeAny, {
1065
+ requiredNodeFailure: "block_and_attention";
1066
+ unknownExecution: "inspect_without_replay";
1067
+ }, {
1068
+ requiredNodeFailure: "block_and_attention";
1069
+ unknownExecution: "inspect_without_replay";
1070
+ }>;
1071
+ hostRequirements: z.ZodOptional<z.ZodObject<{
1072
+ protocol: z.ZodNumber;
1073
+ features: z.ZodEffects<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodNumber>, Record<string, number>, Record<string, number>>;
1074
+ }, "strict", z.ZodTypeAny, {
1075
+ protocol: number;
1076
+ features: Record<string, number>;
1077
+ }, {
1078
+ protocol: number;
1079
+ features: Record<string, number>;
1080
+ }>>;
1081
+ key: z.ZodEffects<z.ZodString, string, string>;
1082
+ version: z.ZodString;
1083
+ title: z.ZodString;
1084
+ subjectResolverRef: z.ZodString;
1085
+ roles: z.ZodArray<z.ZodObject<{
1086
+ key: z.ZodEffects<z.ZodString, string, string>;
1087
+ allowedKinds: z.ZodArray<z.ZodEnum<["assistant", "runtime_binding", "human", "service"]>, "many">;
1088
+ }, "strict", z.ZodTypeAny, {
1089
+ key: string;
1090
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
1091
+ }, {
1092
+ key: string;
1093
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
1094
+ }>, "many">;
1095
+ lanes: z.ZodArray<z.ZodObject<{
1096
+ key: z.ZodEffects<z.ZodString, string, string>;
1097
+ roleKey: z.ZodEffects<z.ZodString, string, string>;
1098
+ label: z.ZodString;
1099
+ order: z.ZodNumber;
1100
+ }, "strict", z.ZodTypeAny, {
1101
+ key: string;
1102
+ roleKey: string;
1103
+ label: string;
1104
+ order: number;
1105
+ }, {
1106
+ key: string;
1107
+ roleKey: string;
1108
+ label: string;
1109
+ order: number;
1110
+ }>, "many">;
1111
+ stages: z.ZodArray<z.ZodObject<{
1112
+ key: z.ZodEffects<z.ZodString, string, string>;
1113
+ label: z.ZodString;
1114
+ icon: z.ZodOptional<z.ZodEnum<["layers", "file-text", "folder-open", "list-checks", "search", "scan-search", "boxes", "package", "settings", "clipboard-check", "shield-check", "git-pull-request", "code", "test-tube", "git-merge", "calculator", "file-check", "truck"]>>;
1115
+ order: z.ZodNumber;
1116
+ }, "strict", z.ZodTypeAny, {
1117
+ key: string;
1118
+ label: string;
1119
+ order: number;
1120
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
1121
+ }, {
1122
+ key: string;
1123
+ label: string;
1124
+ order: number;
1125
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
1126
+ }>, "many">;
1127
+ presentation: z.ZodOptional<z.ZodObject<{
1128
+ views: z.ZodArray<z.ZodEnum<["tasks", "pipeline", "agent_timeline"]>, "many">;
1129
+ nodeDetailRef: z.ZodOptional<z.ZodString>;
1130
+ evidenceTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1131
+ }, "strict", z.ZodTypeAny, {
1132
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
1133
+ nodeDetailRef?: string | undefined;
1134
+ evidenceTypes?: string[] | undefined;
1135
+ }, {
1136
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
1137
+ nodeDetailRef?: string | undefined;
1138
+ evidenceTypes?: string[] | undefined;
1139
+ }>>;
1140
+ metrics: z.ZodOptional<z.ZodObject<{
1141
+ dimensionRefs: z.ZodArray<z.ZodString, "many">;
1142
+ metricRefs: z.ZodArray<z.ZodString, "many">;
1143
+ }, "strict", z.ZodTypeAny, {
1144
+ dimensionRefs: string[];
1145
+ metricRefs: string[];
1146
+ }, {
1147
+ dimensionRefs: string[];
1148
+ metricRefs: string[];
1149
+ }>>;
1150
+ }, "strict", z.ZodTypeAny, {
1151
+ key: string;
1152
+ executionAuthority: "platform";
1153
+ topology: {
1154
+ source: "definition";
1155
+ };
1156
+ version: string;
1157
+ title: string;
1158
+ subjectResolverRef: string;
1159
+ roles: {
1160
+ key: string;
1161
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
1162
+ }[];
1163
+ lanes: {
1164
+ key: string;
1165
+ roleKey: string;
1166
+ label: string;
1167
+ order: number;
1168
+ }[];
1169
+ stages: {
1170
+ key: string;
1171
+ label: string;
1172
+ order: number;
1173
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
1174
+ }[];
1175
+ nodes: ({
1176
+ key: string;
1177
+ kind: "work";
1178
+ laneKey: string;
1179
+ operationRef: string;
1180
+ executorSlot: string;
1181
+ completionRef: string;
1182
+ stageKey: string;
1183
+ label?: string | undefined;
1184
+ resourceResolverRef?: string | undefined;
1185
+ outputSchemaRef?: string | undefined;
1186
+ inputBindings?: Record<string, {
1187
+ from: "node_output";
1188
+ nodeKey: string;
1189
+ port: string;
1190
+ } | {
1191
+ from: "subject";
1192
+ } | {
1193
+ key: string;
1194
+ from: "parameter";
1195
+ } | {
1196
+ from: "collection";
1197
+ items: {
1198
+ from: "node_output";
1199
+ nodeKey: string;
1200
+ port: string;
1201
+ }[];
1202
+ }> | undefined;
1203
+ outputPorts?: Record<string, string> | undefined;
1204
+ } | {
1205
+ key: string;
1206
+ kind: "fork";
1207
+ stageKey: string;
1208
+ label?: string | undefined;
1209
+ inputBindings?: Record<string, {
1210
+ from: "node_output";
1211
+ nodeKey: string;
1212
+ port: string;
1213
+ } | {
1214
+ from: "subject";
1215
+ } | {
1216
+ key: string;
1217
+ from: "parameter";
1218
+ } | {
1219
+ from: "collection";
1220
+ items: {
1221
+ from: "node_output";
1222
+ nodeKey: string;
1223
+ port: string;
1224
+ }[];
1225
+ }> | undefined;
1226
+ outputPorts?: Record<string, string> | undefined;
1227
+ } | {
1228
+ join: {
1229
+ mode: "all_selected";
1230
+ accept: "completed";
1231
+ };
1232
+ key: string;
1233
+ kind: "join";
1234
+ stageKey: string;
1235
+ label?: string | undefined;
1236
+ inputBindings?: Record<string, {
1237
+ from: "node_output";
1238
+ nodeKey: string;
1239
+ port: string;
1240
+ } | {
1241
+ from: "subject";
1242
+ } | {
1243
+ key: string;
1244
+ from: "parameter";
1245
+ } | {
1246
+ from: "collection";
1247
+ items: {
1248
+ from: "node_output";
1249
+ nodeKey: string;
1250
+ port: string;
1251
+ }[];
1252
+ }> | undefined;
1253
+ outputPorts?: Record<string, string> | undefined;
1254
+ } | {
1255
+ key: string;
1256
+ kind: "router";
1257
+ stageKey: string;
1258
+ policyRef: string;
1259
+ outcomes: string[];
1260
+ unmatched: "block";
1261
+ label?: string | undefined;
1262
+ inputBindings?: Record<string, {
1263
+ from: "node_output";
1264
+ nodeKey: string;
1265
+ port: string;
1266
+ } | {
1267
+ from: "subject";
1268
+ } | {
1269
+ key: string;
1270
+ from: "parameter";
1271
+ } | {
1272
+ from: "collection";
1273
+ items: {
1274
+ from: "node_output";
1275
+ nodeKey: string;
1276
+ port: string;
1277
+ }[];
1278
+ }> | undefined;
1279
+ outputPorts?: Record<string, string> | undefined;
1280
+ } | {
1281
+ key: string;
1282
+ kind: "human_gate";
1283
+ laneKey: string;
1284
+ stageKey: string;
1285
+ policyRef: string;
1286
+ outcomes: string[];
1287
+ candidateRoleKey: string;
1288
+ label?: string | undefined;
1289
+ inputBindings?: Record<string, {
1290
+ from: "node_output";
1291
+ nodeKey: string;
1292
+ port: string;
1293
+ } | {
1294
+ from: "subject";
1295
+ } | {
1296
+ key: string;
1297
+ from: "parameter";
1298
+ } | {
1299
+ from: "collection";
1300
+ items: {
1301
+ from: "node_output";
1302
+ nodeKey: string;
1303
+ port: string;
1304
+ }[];
1305
+ }> | undefined;
1306
+ outputPorts?: Record<string, string> | undefined;
1307
+ outcomeLabels?: Record<string, string> | undefined;
1308
+ } | {
1309
+ key: string;
1310
+ kind: "external_wait";
1311
+ laneKey: string;
1312
+ stageKey: string;
1313
+ subscriptionRef: string;
1314
+ label?: string | undefined;
1315
+ inputBindings?: Record<string, {
1316
+ from: "node_output";
1317
+ nodeKey: string;
1318
+ port: string;
1319
+ } | {
1320
+ from: "subject";
1321
+ } | {
1322
+ key: string;
1323
+ from: "parameter";
1324
+ } | {
1325
+ from: "collection";
1326
+ items: {
1327
+ from: "node_output";
1328
+ nodeKey: string;
1329
+ port: string;
1330
+ }[];
1331
+ }> | undefined;
1332
+ outputPorts?: Record<string, string> | undefined;
1333
+ } | {
1334
+ key: string;
1335
+ outcome: string;
1336
+ kind: "terminal";
1337
+ stageKey: string;
1338
+ label?: string | undefined;
1339
+ inputBindings?: Record<string, {
1340
+ from: "node_output";
1341
+ nodeKey: string;
1342
+ port: string;
1343
+ } | {
1344
+ from: "subject";
1345
+ } | {
1346
+ key: string;
1347
+ from: "parameter";
1348
+ } | {
1349
+ from: "collection";
1350
+ items: {
1351
+ from: "node_output";
1352
+ nodeKey: string;
1353
+ port: string;
1354
+ }[];
1355
+ }> | undefined;
1356
+ outputPorts?: Record<string, string> | undefined;
1357
+ disposition?: "complete" | "await_new_subject" | undefined;
1358
+ })[];
1359
+ edges: {
1360
+ from: string;
1361
+ to: string;
1362
+ outcome?: string | undefined;
1363
+ }[];
1364
+ roundPolicy: {
1365
+ entryNodeKey: string;
1366
+ maxRounds: number;
1367
+ onRework: "await_new_subject_then_next_round";
1368
+ onLimit: "attention";
1369
+ newVersionWhileActive: "supersede_round";
1370
+ terminalOutcomes: string[];
1371
+ };
1372
+ failurePolicy: {
1373
+ requiredNodeFailure: "block_and_attention";
1374
+ unknownExecution: "inspect_without_replay";
1375
+ };
1376
+ hostRequirements?: {
1377
+ protocol: number;
1378
+ features: Record<string, number>;
1379
+ } | undefined;
1380
+ presentation?: {
1381
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
1382
+ nodeDetailRef?: string | undefined;
1383
+ evidenceTypes?: string[] | undefined;
1384
+ } | undefined;
1385
+ metrics?: {
1386
+ dimensionRefs: string[];
1387
+ metricRefs: string[];
1388
+ } | undefined;
1389
+ }, {
1390
+ key: string;
1391
+ executionAuthority: "platform";
1392
+ topology: {
1393
+ source: "definition";
1394
+ };
1395
+ version: string;
1396
+ title: string;
1397
+ subjectResolverRef: string;
1398
+ roles: {
1399
+ key: string;
1400
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
1401
+ }[];
1402
+ lanes: {
1403
+ key: string;
1404
+ roleKey: string;
1405
+ label: string;
1406
+ order: number;
1407
+ }[];
1408
+ stages: {
1409
+ key: string;
1410
+ label: string;
1411
+ order: number;
1412
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
1413
+ }[];
1414
+ nodes: ({
1415
+ key: string;
1416
+ kind: "work";
1417
+ laneKey: string;
1418
+ operationRef: string;
1419
+ executorSlot: string;
1420
+ completionRef: string;
1421
+ stageKey: string;
1422
+ label?: string | undefined;
1423
+ resourceResolverRef?: string | undefined;
1424
+ outputSchemaRef?: string | undefined;
1425
+ inputBindings?: Record<string, {
1426
+ from: "node_output";
1427
+ nodeKey: string;
1428
+ port: string;
1429
+ } | {
1430
+ from: "subject";
1431
+ } | {
1432
+ key: string;
1433
+ from: "parameter";
1434
+ } | {
1435
+ from: "collection";
1436
+ items: {
1437
+ from: "node_output";
1438
+ nodeKey: string;
1439
+ port: string;
1440
+ }[];
1441
+ }> | undefined;
1442
+ outputPorts?: Record<string, string> | undefined;
1443
+ } | {
1444
+ key: string;
1445
+ kind: "fork";
1446
+ stageKey: string;
1447
+ label?: string | undefined;
1448
+ inputBindings?: Record<string, {
1449
+ from: "node_output";
1450
+ nodeKey: string;
1451
+ port: string;
1452
+ } | {
1453
+ from: "subject";
1454
+ } | {
1455
+ key: string;
1456
+ from: "parameter";
1457
+ } | {
1458
+ from: "collection";
1459
+ items: {
1460
+ from: "node_output";
1461
+ nodeKey: string;
1462
+ port: string;
1463
+ }[];
1464
+ }> | undefined;
1465
+ outputPorts?: Record<string, string> | undefined;
1466
+ } | {
1467
+ join: {
1468
+ mode: "all_selected";
1469
+ accept: "completed";
1470
+ };
1471
+ key: string;
1472
+ kind: "join";
1473
+ stageKey: string;
1474
+ label?: string | undefined;
1475
+ inputBindings?: Record<string, {
1476
+ from: "node_output";
1477
+ nodeKey: string;
1478
+ port: string;
1479
+ } | {
1480
+ from: "subject";
1481
+ } | {
1482
+ key: string;
1483
+ from: "parameter";
1484
+ } | {
1485
+ from: "collection";
1486
+ items: {
1487
+ from: "node_output";
1488
+ nodeKey: string;
1489
+ port: string;
1490
+ }[];
1491
+ }> | undefined;
1492
+ outputPorts?: Record<string, string> | undefined;
1493
+ } | {
1494
+ key: string;
1495
+ kind: "router";
1496
+ stageKey: string;
1497
+ policyRef: string;
1498
+ outcomes: string[];
1499
+ unmatched: "block";
1500
+ label?: string | undefined;
1501
+ inputBindings?: Record<string, {
1502
+ from: "node_output";
1503
+ nodeKey: string;
1504
+ port: string;
1505
+ } | {
1506
+ from: "subject";
1507
+ } | {
1508
+ key: string;
1509
+ from: "parameter";
1510
+ } | {
1511
+ from: "collection";
1512
+ items: {
1513
+ from: "node_output";
1514
+ nodeKey: string;
1515
+ port: string;
1516
+ }[];
1517
+ }> | undefined;
1518
+ outputPorts?: Record<string, string> | undefined;
1519
+ } | {
1520
+ key: string;
1521
+ kind: "human_gate";
1522
+ laneKey: string;
1523
+ stageKey: string;
1524
+ policyRef: string;
1525
+ outcomes: string[];
1526
+ candidateRoleKey: string;
1527
+ label?: string | undefined;
1528
+ inputBindings?: Record<string, {
1529
+ from: "node_output";
1530
+ nodeKey: string;
1531
+ port: string;
1532
+ } | {
1533
+ from: "subject";
1534
+ } | {
1535
+ key: string;
1536
+ from: "parameter";
1537
+ } | {
1538
+ from: "collection";
1539
+ items: {
1540
+ from: "node_output";
1541
+ nodeKey: string;
1542
+ port: string;
1543
+ }[];
1544
+ }> | undefined;
1545
+ outputPorts?: Record<string, string> | undefined;
1546
+ outcomeLabels?: Record<string, string> | undefined;
1547
+ } | {
1548
+ key: string;
1549
+ kind: "external_wait";
1550
+ laneKey: string;
1551
+ stageKey: string;
1552
+ subscriptionRef: string;
1553
+ label?: string | undefined;
1554
+ inputBindings?: Record<string, {
1555
+ from: "node_output";
1556
+ nodeKey: string;
1557
+ port: string;
1558
+ } | {
1559
+ from: "subject";
1560
+ } | {
1561
+ key: string;
1562
+ from: "parameter";
1563
+ } | {
1564
+ from: "collection";
1565
+ items: {
1566
+ from: "node_output";
1567
+ nodeKey: string;
1568
+ port: string;
1569
+ }[];
1570
+ }> | undefined;
1571
+ outputPorts?: Record<string, string> | undefined;
1572
+ } | {
1573
+ key: string;
1574
+ outcome: string;
1575
+ kind: "terminal";
1576
+ stageKey: string;
1577
+ label?: string | undefined;
1578
+ inputBindings?: Record<string, {
1579
+ from: "node_output";
1580
+ nodeKey: string;
1581
+ port: string;
1582
+ } | {
1583
+ from: "subject";
1584
+ } | {
1585
+ key: string;
1586
+ from: "parameter";
1587
+ } | {
1588
+ from: "collection";
1589
+ items: {
1590
+ from: "node_output";
1591
+ nodeKey: string;
1592
+ port: string;
1593
+ }[];
1594
+ }> | undefined;
1595
+ outputPorts?: Record<string, string> | undefined;
1596
+ disposition?: "complete" | "await_new_subject" | undefined;
1597
+ })[];
1598
+ edges: {
1599
+ from: string;
1600
+ to: string;
1601
+ outcome?: string | undefined;
1602
+ }[];
1603
+ roundPolicy: {
1604
+ entryNodeKey: string;
1605
+ maxRounds: number;
1606
+ onRework: "await_new_subject_then_next_round";
1607
+ onLimit: "attention";
1608
+ newVersionWhileActive: "supersede_round";
1609
+ terminalOutcomes: string[];
1610
+ };
1611
+ failurePolicy: {
1612
+ requiredNodeFailure: "block_and_attention";
1613
+ unknownExecution: "inspect_without_replay";
1614
+ };
1615
+ hostRequirements?: {
1616
+ protocol: number;
1617
+ features: Record<string, number>;
1618
+ } | undefined;
1619
+ presentation?: {
1620
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
1621
+ nodeDetailRef?: string | undefined;
1622
+ evidenceTypes?: string[] | undefined;
1623
+ } | undefined;
1624
+ metrics?: {
1625
+ dimensionRefs: string[];
1626
+ metricRefs: string[];
1627
+ } | undefined;
1628
+ }>]>, {
1629
+ key: string;
1630
+ executionAuthority: "provider";
1631
+ providerRef: string;
1632
+ topology: {
1633
+ source: "provider";
1634
+ presentationAdapterRef: string;
1635
+ };
1636
+ version: string;
1637
+ title: string;
1638
+ subjectResolverRef: string;
1639
+ roles: {
1640
+ key: string;
1641
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
1642
+ }[];
1643
+ lanes: {
1644
+ key: string;
1645
+ roleKey: string;
1646
+ label: string;
1647
+ order: number;
1648
+ }[];
1649
+ stages: {
1650
+ key: string;
1651
+ label: string;
1652
+ order: number;
1653
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
1654
+ }[];
1655
+ actionRefs?: string[] | undefined;
1656
+ hostRequirements?: {
1657
+ protocol: number;
1658
+ features: Record<string, number>;
1659
+ } | undefined;
1660
+ presentation?: {
1661
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
1662
+ nodeDetailRef?: string | undefined;
1663
+ evidenceTypes?: string[] | undefined;
1664
+ } | undefined;
1665
+ metrics?: {
1666
+ dimensionRefs: string[];
1667
+ metricRefs: string[];
1668
+ } | undefined;
1669
+ } | {
1670
+ key: string;
1671
+ executionAuthority: "platform";
1672
+ topology: {
1673
+ source: "definition";
1674
+ };
1675
+ version: string;
1676
+ title: string;
1677
+ subjectResolverRef: string;
1678
+ roles: {
1679
+ key: string;
1680
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
1681
+ }[];
1682
+ lanes: {
1683
+ key: string;
1684
+ roleKey: string;
1685
+ label: string;
1686
+ order: number;
1687
+ }[];
1688
+ stages: {
1689
+ key: string;
1690
+ label: string;
1691
+ order: number;
1692
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
1693
+ }[];
1694
+ nodes: ({
1695
+ key: string;
1696
+ kind: "work";
1697
+ laneKey: string;
1698
+ operationRef: string;
1699
+ executorSlot: string;
1700
+ completionRef: string;
1701
+ stageKey: string;
1702
+ label?: string | undefined;
1703
+ resourceResolverRef?: string | undefined;
1704
+ outputSchemaRef?: string | undefined;
1705
+ inputBindings?: Record<string, {
1706
+ from: "node_output";
1707
+ nodeKey: string;
1708
+ port: string;
1709
+ } | {
1710
+ from: "subject";
1711
+ } | {
1712
+ key: string;
1713
+ from: "parameter";
1714
+ } | {
1715
+ from: "collection";
1716
+ items: {
1717
+ from: "node_output";
1718
+ nodeKey: string;
1719
+ port: string;
1720
+ }[];
1721
+ }> | undefined;
1722
+ outputPorts?: Record<string, string> | undefined;
1723
+ } | {
1724
+ key: string;
1725
+ kind: "fork";
1726
+ stageKey: string;
1727
+ label?: string | undefined;
1728
+ inputBindings?: Record<string, {
1729
+ from: "node_output";
1730
+ nodeKey: string;
1731
+ port: string;
1732
+ } | {
1733
+ from: "subject";
1734
+ } | {
1735
+ key: string;
1736
+ from: "parameter";
1737
+ } | {
1738
+ from: "collection";
1739
+ items: {
1740
+ from: "node_output";
1741
+ nodeKey: string;
1742
+ port: string;
1743
+ }[];
1744
+ }> | undefined;
1745
+ outputPorts?: Record<string, string> | undefined;
1746
+ } | {
1747
+ join: {
1748
+ mode: "all_selected";
1749
+ accept: "completed";
1750
+ };
1751
+ key: string;
1752
+ kind: "join";
1753
+ stageKey: string;
1754
+ label?: string | undefined;
1755
+ inputBindings?: Record<string, {
1756
+ from: "node_output";
1757
+ nodeKey: string;
1758
+ port: string;
1759
+ } | {
1760
+ from: "subject";
1761
+ } | {
1762
+ key: string;
1763
+ from: "parameter";
1764
+ } | {
1765
+ from: "collection";
1766
+ items: {
1767
+ from: "node_output";
1768
+ nodeKey: string;
1769
+ port: string;
1770
+ }[];
1771
+ }> | undefined;
1772
+ outputPorts?: Record<string, string> | undefined;
1773
+ } | {
1774
+ key: string;
1775
+ kind: "router";
1776
+ stageKey: string;
1777
+ policyRef: string;
1778
+ outcomes: string[];
1779
+ unmatched: "block";
1780
+ label?: string | undefined;
1781
+ inputBindings?: Record<string, {
1782
+ from: "node_output";
1783
+ nodeKey: string;
1784
+ port: string;
1785
+ } | {
1786
+ from: "subject";
1787
+ } | {
1788
+ key: string;
1789
+ from: "parameter";
1790
+ } | {
1791
+ from: "collection";
1792
+ items: {
1793
+ from: "node_output";
1794
+ nodeKey: string;
1795
+ port: string;
1796
+ }[];
1797
+ }> | undefined;
1798
+ outputPorts?: Record<string, string> | undefined;
1799
+ } | {
1800
+ key: string;
1801
+ kind: "human_gate";
1802
+ laneKey: string;
1803
+ stageKey: string;
1804
+ policyRef: string;
1805
+ outcomes: string[];
1806
+ candidateRoleKey: string;
1807
+ label?: string | undefined;
1808
+ inputBindings?: Record<string, {
1809
+ from: "node_output";
1810
+ nodeKey: string;
1811
+ port: string;
1812
+ } | {
1813
+ from: "subject";
1814
+ } | {
1815
+ key: string;
1816
+ from: "parameter";
1817
+ } | {
1818
+ from: "collection";
1819
+ items: {
1820
+ from: "node_output";
1821
+ nodeKey: string;
1822
+ port: string;
1823
+ }[];
1824
+ }> | undefined;
1825
+ outputPorts?: Record<string, string> | undefined;
1826
+ outcomeLabels?: Record<string, string> | undefined;
1827
+ } | {
1828
+ key: string;
1829
+ kind: "external_wait";
1830
+ laneKey: string;
1831
+ stageKey: string;
1832
+ subscriptionRef: string;
1833
+ label?: string | undefined;
1834
+ inputBindings?: Record<string, {
1835
+ from: "node_output";
1836
+ nodeKey: string;
1837
+ port: string;
1838
+ } | {
1839
+ from: "subject";
1840
+ } | {
1841
+ key: string;
1842
+ from: "parameter";
1843
+ } | {
1844
+ from: "collection";
1845
+ items: {
1846
+ from: "node_output";
1847
+ nodeKey: string;
1848
+ port: string;
1849
+ }[];
1850
+ }> | undefined;
1851
+ outputPorts?: Record<string, string> | undefined;
1852
+ } | {
1853
+ key: string;
1854
+ outcome: string;
1855
+ kind: "terminal";
1856
+ stageKey: string;
1857
+ label?: string | undefined;
1858
+ inputBindings?: Record<string, {
1859
+ from: "node_output";
1860
+ nodeKey: string;
1861
+ port: string;
1862
+ } | {
1863
+ from: "subject";
1864
+ } | {
1865
+ key: string;
1866
+ from: "parameter";
1867
+ } | {
1868
+ from: "collection";
1869
+ items: {
1870
+ from: "node_output";
1871
+ nodeKey: string;
1872
+ port: string;
1873
+ }[];
1874
+ }> | undefined;
1875
+ outputPorts?: Record<string, string> | undefined;
1876
+ disposition?: "complete" | "await_new_subject" | undefined;
1877
+ })[];
1878
+ edges: {
1879
+ from: string;
1880
+ to: string;
1881
+ outcome?: string | undefined;
1882
+ }[];
1883
+ roundPolicy: {
1884
+ entryNodeKey: string;
1885
+ maxRounds: number;
1886
+ onRework: "await_new_subject_then_next_round";
1887
+ onLimit: "attention";
1888
+ newVersionWhileActive: "supersede_round";
1889
+ terminalOutcomes: string[];
1890
+ };
1891
+ failurePolicy: {
1892
+ requiredNodeFailure: "block_and_attention";
1893
+ unknownExecution: "inspect_without_replay";
1894
+ };
1895
+ hostRequirements?: {
1896
+ protocol: number;
1897
+ features: Record<string, number>;
1898
+ } | undefined;
1899
+ presentation?: {
1900
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
1901
+ nodeDetailRef?: string | undefined;
1902
+ evidenceTypes?: string[] | undefined;
1903
+ } | undefined;
1904
+ metrics?: {
1905
+ dimensionRefs: string[];
1906
+ metricRefs: string[];
1907
+ } | undefined;
1908
+ }, {
1909
+ key: string;
1910
+ executionAuthority: "provider";
1911
+ providerRef: string;
1912
+ topology: {
1913
+ source: "provider";
1914
+ presentationAdapterRef: string;
1915
+ };
1916
+ version: string;
1917
+ title: string;
1918
+ subjectResolverRef: string;
1919
+ roles: {
1920
+ key: string;
1921
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
1922
+ }[];
1923
+ lanes: {
1924
+ key: string;
1925
+ roleKey: string;
1926
+ label: string;
1927
+ order: number;
1928
+ }[];
1929
+ stages: {
1930
+ key: string;
1931
+ label: string;
1932
+ order: number;
1933
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
1934
+ }[];
1935
+ actionRefs?: string[] | undefined;
1936
+ hostRequirements?: {
1937
+ protocol: number;
1938
+ features: Record<string, number>;
1939
+ } | undefined;
1940
+ presentation?: {
1941
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
1942
+ nodeDetailRef?: string | undefined;
1943
+ evidenceTypes?: string[] | undefined;
1944
+ } | undefined;
1945
+ metrics?: {
1946
+ dimensionRefs: string[];
1947
+ metricRefs: string[];
1948
+ } | undefined;
1949
+ } | {
1950
+ key: string;
1951
+ executionAuthority: "platform";
1952
+ topology: {
1953
+ source: "definition";
1954
+ };
1955
+ version: string;
1956
+ title: string;
1957
+ subjectResolverRef: string;
1958
+ roles: {
1959
+ key: string;
1960
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
1961
+ }[];
1962
+ lanes: {
1963
+ key: string;
1964
+ roleKey: string;
1965
+ label: string;
1966
+ order: number;
1967
+ }[];
1968
+ stages: {
1969
+ key: string;
1970
+ label: string;
1971
+ order: number;
1972
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
1973
+ }[];
1974
+ nodes: ({
1975
+ key: string;
1976
+ kind: "work";
1977
+ laneKey: string;
1978
+ operationRef: string;
1979
+ executorSlot: string;
1980
+ completionRef: string;
1981
+ stageKey: string;
1982
+ label?: string | undefined;
1983
+ resourceResolverRef?: string | undefined;
1984
+ outputSchemaRef?: string | undefined;
1985
+ inputBindings?: Record<string, {
1986
+ from: "node_output";
1987
+ nodeKey: string;
1988
+ port: string;
1989
+ } | {
1990
+ from: "subject";
1991
+ } | {
1992
+ key: string;
1993
+ from: "parameter";
1994
+ } | {
1995
+ from: "collection";
1996
+ items: {
1997
+ from: "node_output";
1998
+ nodeKey: string;
1999
+ port: string;
2000
+ }[];
2001
+ }> | undefined;
2002
+ outputPorts?: Record<string, string> | undefined;
2003
+ } | {
2004
+ key: string;
2005
+ kind: "fork";
2006
+ stageKey: string;
2007
+ label?: string | undefined;
2008
+ inputBindings?: Record<string, {
2009
+ from: "node_output";
2010
+ nodeKey: string;
2011
+ port: string;
2012
+ } | {
2013
+ from: "subject";
2014
+ } | {
2015
+ key: string;
2016
+ from: "parameter";
2017
+ } | {
2018
+ from: "collection";
2019
+ items: {
2020
+ from: "node_output";
2021
+ nodeKey: string;
2022
+ port: string;
2023
+ }[];
2024
+ }> | undefined;
2025
+ outputPorts?: Record<string, string> | undefined;
2026
+ } | {
2027
+ join: {
2028
+ mode: "all_selected";
2029
+ accept: "completed";
2030
+ };
2031
+ key: string;
2032
+ kind: "join";
2033
+ stageKey: string;
2034
+ label?: string | undefined;
2035
+ inputBindings?: Record<string, {
2036
+ from: "node_output";
2037
+ nodeKey: string;
2038
+ port: string;
2039
+ } | {
2040
+ from: "subject";
2041
+ } | {
2042
+ key: string;
2043
+ from: "parameter";
2044
+ } | {
2045
+ from: "collection";
2046
+ items: {
2047
+ from: "node_output";
2048
+ nodeKey: string;
2049
+ port: string;
2050
+ }[];
2051
+ }> | undefined;
2052
+ outputPorts?: Record<string, string> | undefined;
2053
+ } | {
2054
+ key: string;
2055
+ kind: "router";
2056
+ stageKey: string;
2057
+ policyRef: string;
2058
+ outcomes: string[];
2059
+ unmatched: "block";
2060
+ label?: string | undefined;
2061
+ inputBindings?: Record<string, {
2062
+ from: "node_output";
2063
+ nodeKey: string;
2064
+ port: string;
2065
+ } | {
2066
+ from: "subject";
2067
+ } | {
2068
+ key: string;
2069
+ from: "parameter";
2070
+ } | {
2071
+ from: "collection";
2072
+ items: {
2073
+ from: "node_output";
2074
+ nodeKey: string;
2075
+ port: string;
2076
+ }[];
2077
+ }> | undefined;
2078
+ outputPorts?: Record<string, string> | undefined;
2079
+ } | {
2080
+ key: string;
2081
+ kind: "human_gate";
2082
+ laneKey: string;
2083
+ stageKey: string;
2084
+ policyRef: string;
2085
+ outcomes: string[];
2086
+ candidateRoleKey: string;
2087
+ label?: string | undefined;
2088
+ inputBindings?: Record<string, {
2089
+ from: "node_output";
2090
+ nodeKey: string;
2091
+ port: string;
2092
+ } | {
2093
+ from: "subject";
2094
+ } | {
2095
+ key: string;
2096
+ from: "parameter";
2097
+ } | {
2098
+ from: "collection";
2099
+ items: {
2100
+ from: "node_output";
2101
+ nodeKey: string;
2102
+ port: string;
2103
+ }[];
2104
+ }> | undefined;
2105
+ outputPorts?: Record<string, string> | undefined;
2106
+ outcomeLabels?: Record<string, string> | undefined;
2107
+ } | {
2108
+ key: string;
2109
+ kind: "external_wait";
2110
+ laneKey: string;
2111
+ stageKey: string;
2112
+ subscriptionRef: string;
2113
+ label?: string | undefined;
2114
+ inputBindings?: Record<string, {
2115
+ from: "node_output";
2116
+ nodeKey: string;
2117
+ port: string;
2118
+ } | {
2119
+ from: "subject";
2120
+ } | {
2121
+ key: string;
2122
+ from: "parameter";
2123
+ } | {
2124
+ from: "collection";
2125
+ items: {
2126
+ from: "node_output";
2127
+ nodeKey: string;
2128
+ port: string;
2129
+ }[];
2130
+ }> | undefined;
2131
+ outputPorts?: Record<string, string> | undefined;
2132
+ } | {
2133
+ key: string;
2134
+ outcome: string;
2135
+ kind: "terminal";
2136
+ stageKey: string;
2137
+ label?: string | undefined;
2138
+ inputBindings?: Record<string, {
2139
+ from: "node_output";
2140
+ nodeKey: string;
2141
+ port: string;
2142
+ } | {
2143
+ from: "subject";
2144
+ } | {
2145
+ key: string;
2146
+ from: "parameter";
2147
+ } | {
2148
+ from: "collection";
2149
+ items: {
2150
+ from: "node_output";
2151
+ nodeKey: string;
2152
+ port: string;
2153
+ }[];
2154
+ }> | undefined;
2155
+ outputPorts?: Record<string, string> | undefined;
2156
+ disposition?: "complete" | "await_new_subject" | undefined;
2157
+ })[];
2158
+ edges: {
2159
+ from: string;
2160
+ to: string;
2161
+ outcome?: string | undefined;
2162
+ }[];
2163
+ roundPolicy: {
2164
+ entryNodeKey: string;
2165
+ maxRounds: number;
2166
+ onRework: "await_new_subject_then_next_round";
2167
+ onLimit: "attention";
2168
+ newVersionWhileActive: "supersede_round";
2169
+ terminalOutcomes: string[];
2170
+ };
2171
+ failurePolicy: {
2172
+ requiredNodeFailure: "block_and_attention";
2173
+ unknownExecution: "inspect_without_replay";
2174
+ };
2175
+ hostRequirements?: {
2176
+ protocol: number;
2177
+ features: Record<string, number>;
2178
+ } | undefined;
2179
+ presentation?: {
2180
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
2181
+ nodeDetailRef?: string | undefined;
2182
+ evidenceTypes?: string[] | undefined;
2183
+ } | undefined;
2184
+ metrics?: {
2185
+ dimensionRefs: string[];
2186
+ metricRefs: string[];
2187
+ } | undefined;
2188
+ }>;
2189
+ binding: z.ZodObject<{
2190
+ templateRef: z.ZodString;
2191
+ roleBindings: z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
2192
+ kind: z.ZodEnum<["assistant", "runtime_binding", "human", "service"]>;
2193
+ selectionKey: z.ZodEffects<z.ZodString, string, string>;
2194
+ requiredCapabilities: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
2195
+ }, "strict", z.ZodTypeAny, {
2196
+ kind: "assistant" | "runtime_binding" | "human" | "service";
2197
+ selectionKey: string;
2198
+ requiredCapabilities?: string[] | undefined;
2199
+ }, {
2200
+ kind: "assistant" | "runtime_binding" | "human" | "service";
2201
+ selectionKey: string;
2202
+ requiredCapabilities?: string[] | undefined;
2203
+ }>>;
2204
+ executorBindings: z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodObject<{
2205
+ kind: z.ZodEnum<["assistant", "runtime_binding", "human", "service"]>;
2206
+ selectionKey: z.ZodEffects<z.ZodString, string, string>;
2207
+ requiredCapabilities: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
2208
+ } & {
2209
+ roleKey: z.ZodEffects<z.ZodString, string, string>;
2210
+ workspaceId: z.ZodOptional<z.ZodString>;
2211
+ }, "strict", z.ZodTypeAny, {
2212
+ roleKey: string;
2213
+ kind: "assistant" | "runtime_binding" | "human" | "service";
2214
+ selectionKey: string;
2215
+ requiredCapabilities?: string[] | undefined;
2216
+ workspaceId?: string | undefined;
2217
+ }, {
2218
+ roleKey: string;
2219
+ kind: "assistant" | "runtime_binding" | "human" | "service";
2220
+ selectionKey: string;
2221
+ requiredCapabilities?: string[] | undefined;
2222
+ workspaceId?: string | undefined;
2223
+ }>, {
2224
+ roleKey: string;
2225
+ kind: "assistant" | "runtime_binding" | "human" | "service";
2226
+ selectionKey: string;
2227
+ requiredCapabilities?: string[] | undefined;
2228
+ workspaceId?: string | undefined;
2229
+ }, {
2230
+ roleKey: string;
2231
+ kind: "assistant" | "runtime_binding" | "human" | "service";
2232
+ selectionKey: string;
2233
+ requiredCapabilities?: string[] | undefined;
2234
+ workspaceId?: string | undefined;
2235
+ }>>>;
2236
+ providerConfiguration: z.ZodOptional<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodType<import("./primitives.schema").ProjectPipelineJsonValue, z.ZodTypeDef, import("./primitives.schema").ProjectPipelineJsonValue>>>;
2237
+ parameters: z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodType<import("./primitives.schema").ProjectPipelineJsonValue, z.ZodTypeDef, import("./primitives.schema").ProjectPipelineJsonValue>>;
2238
+ limits: z.ZodOptional<z.ZodObject<{
2239
+ maxConcurrentExecutions: z.ZodNumber;
2240
+ maxTechnicalAttemptsPerNode: z.ZodNumber;
2241
+ runTimeoutMinutes: z.ZodNumber;
2242
+ nativeModelBudget: z.ZodOptional<z.ZodEffects<z.ZodObject<{
2243
+ maxCalls: z.ZodNumber;
2244
+ maxTokens: z.ZodNumber;
2245
+ reservationTokens: z.ZodNumber;
2246
+ }, "strict", z.ZodTypeAny, {
2247
+ maxCalls: number;
2248
+ maxTokens: number;
2249
+ reservationTokens: number;
2250
+ }, {
2251
+ maxCalls: number;
2252
+ maxTokens: number;
2253
+ reservationTokens: number;
2254
+ }>, {
2255
+ maxCalls: number;
2256
+ maxTokens: number;
2257
+ reservationTokens: number;
2258
+ }, {
2259
+ maxCalls: number;
2260
+ maxTokens: number;
2261
+ reservationTokens: number;
2262
+ }>>;
2263
+ }, "strict", z.ZodTypeAny, {
2264
+ maxConcurrentExecutions: number;
2265
+ maxTechnicalAttemptsPerNode: number;
2266
+ runTimeoutMinutes: number;
2267
+ nativeModelBudget?: {
2268
+ maxCalls: number;
2269
+ maxTokens: number;
2270
+ reservationTokens: number;
2271
+ } | undefined;
2272
+ }, {
2273
+ maxConcurrentExecutions: number;
2274
+ maxTechnicalAttemptsPerNode: number;
2275
+ runTimeoutMinutes: number;
2276
+ nativeModelBudget?: {
2277
+ maxCalls: number;
2278
+ maxTokens: number;
2279
+ reservationTokens: number;
2280
+ } | undefined;
2281
+ }>>;
2282
+ triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
2283
+ adapterRef: z.ZodString;
2284
+ events: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
2285
+ }, "strict", z.ZodTypeAny, {
2286
+ adapterRef: string;
2287
+ events: string[];
2288
+ }, {
2289
+ adapterRef: string;
2290
+ events: string[];
2291
+ }>, "many">>;
2292
+ }, "strict", z.ZodTypeAny, {
2293
+ templateRef: string;
2294
+ roleBindings: Record<string, {
2295
+ kind: "assistant" | "runtime_binding" | "human" | "service";
2296
+ selectionKey: string;
2297
+ requiredCapabilities?: string[] | undefined;
2298
+ }>;
2299
+ parameters: Record<string, import("./primitives.schema").ProjectPipelineJsonValue>;
2300
+ executorBindings?: Record<string, {
2301
+ roleKey: string;
2302
+ kind: "assistant" | "runtime_binding" | "human" | "service";
2303
+ selectionKey: string;
2304
+ requiredCapabilities?: string[] | undefined;
2305
+ workspaceId?: string | undefined;
2306
+ }> | undefined;
2307
+ providerConfiguration?: Record<string, import("./primitives.schema").ProjectPipelineJsonValue> | undefined;
2308
+ limits?: {
2309
+ maxConcurrentExecutions: number;
2310
+ maxTechnicalAttemptsPerNode: number;
2311
+ runTimeoutMinutes: number;
2312
+ nativeModelBudget?: {
2313
+ maxCalls: number;
2314
+ maxTokens: number;
2315
+ reservationTokens: number;
2316
+ } | undefined;
2317
+ } | undefined;
2318
+ triggers?: {
2319
+ adapterRef: string;
2320
+ events: string[];
2321
+ }[] | undefined;
2322
+ }, {
2323
+ templateRef: string;
2324
+ roleBindings: Record<string, {
2325
+ kind: "assistant" | "runtime_binding" | "human" | "service";
2326
+ selectionKey: string;
2327
+ requiredCapabilities?: string[] | undefined;
2328
+ }>;
2329
+ parameters: Record<string, import("./primitives.schema").ProjectPipelineJsonValue>;
2330
+ executorBindings?: Record<string, {
2331
+ roleKey: string;
2332
+ kind: "assistant" | "runtime_binding" | "human" | "service";
2333
+ selectionKey: string;
2334
+ requiredCapabilities?: string[] | undefined;
2335
+ workspaceId?: string | undefined;
2336
+ }> | undefined;
2337
+ providerConfiguration?: Record<string, import("./primitives.schema").ProjectPipelineJsonValue> | undefined;
2338
+ limits?: {
2339
+ maxConcurrentExecutions: number;
2340
+ maxTechnicalAttemptsPerNode: number;
2341
+ runTimeoutMinutes: number;
2342
+ nativeModelBudget?: {
2343
+ maxCalls: number;
2344
+ maxTokens: number;
2345
+ reservationTokens: number;
2346
+ } | undefined;
2347
+ } | undefined;
2348
+ triggers?: {
2349
+ adapterRef: string;
2350
+ events: string[];
2351
+ }[] | undefined;
2352
+ }>;
2353
+ }, "strict", z.ZodTypeAny, {
2354
+ binding: {
2355
+ templateRef: string;
2356
+ roleBindings: Record<string, {
2357
+ kind: "assistant" | "runtime_binding" | "human" | "service";
2358
+ selectionKey: string;
2359
+ requiredCapabilities?: string[] | undefined;
2360
+ }>;
2361
+ parameters: Record<string, import("./primitives.schema").ProjectPipelineJsonValue>;
2362
+ executorBindings?: Record<string, {
2363
+ roleKey: string;
2364
+ kind: "assistant" | "runtime_binding" | "human" | "service";
2365
+ selectionKey: string;
2366
+ requiredCapabilities?: string[] | undefined;
2367
+ workspaceId?: string | undefined;
2368
+ }> | undefined;
2369
+ providerConfiguration?: Record<string, import("./primitives.schema").ProjectPipelineJsonValue> | undefined;
2370
+ limits?: {
2371
+ maxConcurrentExecutions: number;
2372
+ maxTechnicalAttemptsPerNode: number;
2373
+ runTimeoutMinutes: number;
2374
+ nativeModelBudget?: {
2375
+ maxCalls: number;
2376
+ maxTokens: number;
2377
+ reservationTokens: number;
2378
+ } | undefined;
2379
+ } | undefined;
2380
+ triggers?: {
2381
+ adapterRef: string;
2382
+ events: string[];
2383
+ }[] | undefined;
2384
+ };
2385
+ schemaVersion: 1;
2386
+ template: {
2387
+ key: string;
2388
+ executionAuthority: "provider";
2389
+ providerRef: string;
2390
+ topology: {
2391
+ source: "provider";
2392
+ presentationAdapterRef: string;
2393
+ };
2394
+ version: string;
2395
+ title: string;
2396
+ subjectResolverRef: string;
2397
+ roles: {
2398
+ key: string;
2399
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
2400
+ }[];
2401
+ lanes: {
2402
+ key: string;
2403
+ roleKey: string;
2404
+ label: string;
2405
+ order: number;
2406
+ }[];
2407
+ stages: {
2408
+ key: string;
2409
+ label: string;
2410
+ order: number;
2411
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
2412
+ }[];
2413
+ actionRefs?: string[] | undefined;
2414
+ hostRequirements?: {
2415
+ protocol: number;
2416
+ features: Record<string, number>;
2417
+ } | undefined;
2418
+ presentation?: {
2419
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
2420
+ nodeDetailRef?: string | undefined;
2421
+ evidenceTypes?: string[] | undefined;
2422
+ } | undefined;
2423
+ metrics?: {
2424
+ dimensionRefs: string[];
2425
+ metricRefs: string[];
2426
+ } | undefined;
2427
+ } | {
2428
+ key: string;
2429
+ executionAuthority: "platform";
2430
+ topology: {
2431
+ source: "definition";
2432
+ };
2433
+ version: string;
2434
+ title: string;
2435
+ subjectResolverRef: string;
2436
+ roles: {
2437
+ key: string;
2438
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
2439
+ }[];
2440
+ lanes: {
2441
+ key: string;
2442
+ roleKey: string;
2443
+ label: string;
2444
+ order: number;
2445
+ }[];
2446
+ stages: {
2447
+ key: string;
2448
+ label: string;
2449
+ order: number;
2450
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
2451
+ }[];
2452
+ nodes: ({
2453
+ key: string;
2454
+ kind: "work";
2455
+ laneKey: string;
2456
+ operationRef: string;
2457
+ executorSlot: string;
2458
+ completionRef: string;
2459
+ stageKey: string;
2460
+ label?: string | undefined;
2461
+ resourceResolverRef?: string | undefined;
2462
+ outputSchemaRef?: string | undefined;
2463
+ inputBindings?: Record<string, {
2464
+ from: "node_output";
2465
+ nodeKey: string;
2466
+ port: string;
2467
+ } | {
2468
+ from: "subject";
2469
+ } | {
2470
+ key: string;
2471
+ from: "parameter";
2472
+ } | {
2473
+ from: "collection";
2474
+ items: {
2475
+ from: "node_output";
2476
+ nodeKey: string;
2477
+ port: string;
2478
+ }[];
2479
+ }> | undefined;
2480
+ outputPorts?: Record<string, string> | undefined;
2481
+ } | {
2482
+ key: string;
2483
+ kind: "fork";
2484
+ stageKey: string;
2485
+ label?: string | undefined;
2486
+ inputBindings?: Record<string, {
2487
+ from: "node_output";
2488
+ nodeKey: string;
2489
+ port: string;
2490
+ } | {
2491
+ from: "subject";
2492
+ } | {
2493
+ key: string;
2494
+ from: "parameter";
2495
+ } | {
2496
+ from: "collection";
2497
+ items: {
2498
+ from: "node_output";
2499
+ nodeKey: string;
2500
+ port: string;
2501
+ }[];
2502
+ }> | undefined;
2503
+ outputPorts?: Record<string, string> | undefined;
2504
+ } | {
2505
+ join: {
2506
+ mode: "all_selected";
2507
+ accept: "completed";
2508
+ };
2509
+ key: string;
2510
+ kind: "join";
2511
+ stageKey: string;
2512
+ label?: string | undefined;
2513
+ inputBindings?: Record<string, {
2514
+ from: "node_output";
2515
+ nodeKey: string;
2516
+ port: string;
2517
+ } | {
2518
+ from: "subject";
2519
+ } | {
2520
+ key: string;
2521
+ from: "parameter";
2522
+ } | {
2523
+ from: "collection";
2524
+ items: {
2525
+ from: "node_output";
2526
+ nodeKey: string;
2527
+ port: string;
2528
+ }[];
2529
+ }> | undefined;
2530
+ outputPorts?: Record<string, string> | undefined;
2531
+ } | {
2532
+ key: string;
2533
+ kind: "router";
2534
+ stageKey: string;
2535
+ policyRef: string;
2536
+ outcomes: string[];
2537
+ unmatched: "block";
2538
+ label?: string | undefined;
2539
+ inputBindings?: Record<string, {
2540
+ from: "node_output";
2541
+ nodeKey: string;
2542
+ port: string;
2543
+ } | {
2544
+ from: "subject";
2545
+ } | {
2546
+ key: string;
2547
+ from: "parameter";
2548
+ } | {
2549
+ from: "collection";
2550
+ items: {
2551
+ from: "node_output";
2552
+ nodeKey: string;
2553
+ port: string;
2554
+ }[];
2555
+ }> | undefined;
2556
+ outputPorts?: Record<string, string> | undefined;
2557
+ } | {
2558
+ key: string;
2559
+ kind: "human_gate";
2560
+ laneKey: string;
2561
+ stageKey: string;
2562
+ policyRef: string;
2563
+ outcomes: string[];
2564
+ candidateRoleKey: string;
2565
+ label?: string | undefined;
2566
+ inputBindings?: Record<string, {
2567
+ from: "node_output";
2568
+ nodeKey: string;
2569
+ port: string;
2570
+ } | {
2571
+ from: "subject";
2572
+ } | {
2573
+ key: string;
2574
+ from: "parameter";
2575
+ } | {
2576
+ from: "collection";
2577
+ items: {
2578
+ from: "node_output";
2579
+ nodeKey: string;
2580
+ port: string;
2581
+ }[];
2582
+ }> | undefined;
2583
+ outputPorts?: Record<string, string> | undefined;
2584
+ outcomeLabels?: Record<string, string> | undefined;
2585
+ } | {
2586
+ key: string;
2587
+ kind: "external_wait";
2588
+ laneKey: string;
2589
+ stageKey: string;
2590
+ subscriptionRef: string;
2591
+ label?: string | undefined;
2592
+ inputBindings?: Record<string, {
2593
+ from: "node_output";
2594
+ nodeKey: string;
2595
+ port: string;
2596
+ } | {
2597
+ from: "subject";
2598
+ } | {
2599
+ key: string;
2600
+ from: "parameter";
2601
+ } | {
2602
+ from: "collection";
2603
+ items: {
2604
+ from: "node_output";
2605
+ nodeKey: string;
2606
+ port: string;
2607
+ }[];
2608
+ }> | undefined;
2609
+ outputPorts?: Record<string, string> | undefined;
2610
+ } | {
2611
+ key: string;
2612
+ outcome: string;
2613
+ kind: "terminal";
2614
+ stageKey: string;
2615
+ label?: string | undefined;
2616
+ inputBindings?: Record<string, {
2617
+ from: "node_output";
2618
+ nodeKey: string;
2619
+ port: string;
2620
+ } | {
2621
+ from: "subject";
2622
+ } | {
2623
+ key: string;
2624
+ from: "parameter";
2625
+ } | {
2626
+ from: "collection";
2627
+ items: {
2628
+ from: "node_output";
2629
+ nodeKey: string;
2630
+ port: string;
2631
+ }[];
2632
+ }> | undefined;
2633
+ outputPorts?: Record<string, string> | undefined;
2634
+ disposition?: "complete" | "await_new_subject" | undefined;
2635
+ })[];
2636
+ edges: {
2637
+ from: string;
2638
+ to: string;
2639
+ outcome?: string | undefined;
2640
+ }[];
2641
+ roundPolicy: {
2642
+ entryNodeKey: string;
2643
+ maxRounds: number;
2644
+ onRework: "await_new_subject_then_next_round";
2645
+ onLimit: "attention";
2646
+ newVersionWhileActive: "supersede_round";
2647
+ terminalOutcomes: string[];
2648
+ };
2649
+ failurePolicy: {
2650
+ requiredNodeFailure: "block_and_attention";
2651
+ unknownExecution: "inspect_without_replay";
2652
+ };
2653
+ hostRequirements?: {
2654
+ protocol: number;
2655
+ features: Record<string, number>;
2656
+ } | undefined;
2657
+ presentation?: {
2658
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
2659
+ nodeDetailRef?: string | undefined;
2660
+ evidenceTypes?: string[] | undefined;
2661
+ } | undefined;
2662
+ metrics?: {
2663
+ dimensionRefs: string[];
2664
+ metricRefs: string[];
2665
+ } | undefined;
2666
+ };
2667
+ }, {
2668
+ binding: {
2669
+ templateRef: string;
2670
+ roleBindings: Record<string, {
2671
+ kind: "assistant" | "runtime_binding" | "human" | "service";
2672
+ selectionKey: string;
2673
+ requiredCapabilities?: string[] | undefined;
2674
+ }>;
2675
+ parameters: Record<string, import("./primitives.schema").ProjectPipelineJsonValue>;
2676
+ executorBindings?: Record<string, {
2677
+ roleKey: string;
2678
+ kind: "assistant" | "runtime_binding" | "human" | "service";
2679
+ selectionKey: string;
2680
+ requiredCapabilities?: string[] | undefined;
2681
+ workspaceId?: string | undefined;
2682
+ }> | undefined;
2683
+ providerConfiguration?: Record<string, import("./primitives.schema").ProjectPipelineJsonValue> | undefined;
2684
+ limits?: {
2685
+ maxConcurrentExecutions: number;
2686
+ maxTechnicalAttemptsPerNode: number;
2687
+ runTimeoutMinutes: number;
2688
+ nativeModelBudget?: {
2689
+ maxCalls: number;
2690
+ maxTokens: number;
2691
+ reservationTokens: number;
2692
+ } | undefined;
2693
+ } | undefined;
2694
+ triggers?: {
2695
+ adapterRef: string;
2696
+ events: string[];
2697
+ }[] | undefined;
2698
+ };
2699
+ schemaVersion: 1;
2700
+ template: {
2701
+ key: string;
2702
+ executionAuthority: "provider";
2703
+ providerRef: string;
2704
+ topology: {
2705
+ source: "provider";
2706
+ presentationAdapterRef: string;
2707
+ };
2708
+ version: string;
2709
+ title: string;
2710
+ subjectResolverRef: string;
2711
+ roles: {
2712
+ key: string;
2713
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
2714
+ }[];
2715
+ lanes: {
2716
+ key: string;
2717
+ roleKey: string;
2718
+ label: string;
2719
+ order: number;
2720
+ }[];
2721
+ stages: {
2722
+ key: string;
2723
+ label: string;
2724
+ order: number;
2725
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
2726
+ }[];
2727
+ actionRefs?: string[] | undefined;
2728
+ hostRequirements?: {
2729
+ protocol: number;
2730
+ features: Record<string, number>;
2731
+ } | undefined;
2732
+ presentation?: {
2733
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
2734
+ nodeDetailRef?: string | undefined;
2735
+ evidenceTypes?: string[] | undefined;
2736
+ } | undefined;
2737
+ metrics?: {
2738
+ dimensionRefs: string[];
2739
+ metricRefs: string[];
2740
+ } | undefined;
2741
+ } | {
2742
+ key: string;
2743
+ executionAuthority: "platform";
2744
+ topology: {
2745
+ source: "definition";
2746
+ };
2747
+ version: string;
2748
+ title: string;
2749
+ subjectResolverRef: string;
2750
+ roles: {
2751
+ key: string;
2752
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
2753
+ }[];
2754
+ lanes: {
2755
+ key: string;
2756
+ roleKey: string;
2757
+ label: string;
2758
+ order: number;
2759
+ }[];
2760
+ stages: {
2761
+ key: string;
2762
+ label: string;
2763
+ order: number;
2764
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
2765
+ }[];
2766
+ nodes: ({
2767
+ key: string;
2768
+ kind: "work";
2769
+ laneKey: string;
2770
+ operationRef: string;
2771
+ executorSlot: string;
2772
+ completionRef: string;
2773
+ stageKey: string;
2774
+ label?: string | undefined;
2775
+ resourceResolverRef?: string | undefined;
2776
+ outputSchemaRef?: string | undefined;
2777
+ inputBindings?: Record<string, {
2778
+ from: "node_output";
2779
+ nodeKey: string;
2780
+ port: string;
2781
+ } | {
2782
+ from: "subject";
2783
+ } | {
2784
+ key: string;
2785
+ from: "parameter";
2786
+ } | {
2787
+ from: "collection";
2788
+ items: {
2789
+ from: "node_output";
2790
+ nodeKey: string;
2791
+ port: string;
2792
+ }[];
2793
+ }> | undefined;
2794
+ outputPorts?: Record<string, string> | undefined;
2795
+ } | {
2796
+ key: string;
2797
+ kind: "fork";
2798
+ stageKey: string;
2799
+ label?: string | undefined;
2800
+ inputBindings?: Record<string, {
2801
+ from: "node_output";
2802
+ nodeKey: string;
2803
+ port: string;
2804
+ } | {
2805
+ from: "subject";
2806
+ } | {
2807
+ key: string;
2808
+ from: "parameter";
2809
+ } | {
2810
+ from: "collection";
2811
+ items: {
2812
+ from: "node_output";
2813
+ nodeKey: string;
2814
+ port: string;
2815
+ }[];
2816
+ }> | undefined;
2817
+ outputPorts?: Record<string, string> | undefined;
2818
+ } | {
2819
+ join: {
2820
+ mode: "all_selected";
2821
+ accept: "completed";
2822
+ };
2823
+ key: string;
2824
+ kind: "join";
2825
+ stageKey: string;
2826
+ label?: string | undefined;
2827
+ inputBindings?: Record<string, {
2828
+ from: "node_output";
2829
+ nodeKey: string;
2830
+ port: string;
2831
+ } | {
2832
+ from: "subject";
2833
+ } | {
2834
+ key: string;
2835
+ from: "parameter";
2836
+ } | {
2837
+ from: "collection";
2838
+ items: {
2839
+ from: "node_output";
2840
+ nodeKey: string;
2841
+ port: string;
2842
+ }[];
2843
+ }> | undefined;
2844
+ outputPorts?: Record<string, string> | undefined;
2845
+ } | {
2846
+ key: string;
2847
+ kind: "router";
2848
+ stageKey: string;
2849
+ policyRef: string;
2850
+ outcomes: string[];
2851
+ unmatched: "block";
2852
+ label?: string | undefined;
2853
+ inputBindings?: Record<string, {
2854
+ from: "node_output";
2855
+ nodeKey: string;
2856
+ port: string;
2857
+ } | {
2858
+ from: "subject";
2859
+ } | {
2860
+ key: string;
2861
+ from: "parameter";
2862
+ } | {
2863
+ from: "collection";
2864
+ items: {
2865
+ from: "node_output";
2866
+ nodeKey: string;
2867
+ port: string;
2868
+ }[];
2869
+ }> | undefined;
2870
+ outputPorts?: Record<string, string> | undefined;
2871
+ } | {
2872
+ key: string;
2873
+ kind: "human_gate";
2874
+ laneKey: string;
2875
+ stageKey: string;
2876
+ policyRef: string;
2877
+ outcomes: string[];
2878
+ candidateRoleKey: string;
2879
+ label?: string | undefined;
2880
+ inputBindings?: Record<string, {
2881
+ from: "node_output";
2882
+ nodeKey: string;
2883
+ port: string;
2884
+ } | {
2885
+ from: "subject";
2886
+ } | {
2887
+ key: string;
2888
+ from: "parameter";
2889
+ } | {
2890
+ from: "collection";
2891
+ items: {
2892
+ from: "node_output";
2893
+ nodeKey: string;
2894
+ port: string;
2895
+ }[];
2896
+ }> | undefined;
2897
+ outputPorts?: Record<string, string> | undefined;
2898
+ outcomeLabels?: Record<string, string> | undefined;
2899
+ } | {
2900
+ key: string;
2901
+ kind: "external_wait";
2902
+ laneKey: string;
2903
+ stageKey: string;
2904
+ subscriptionRef: string;
2905
+ label?: string | undefined;
2906
+ inputBindings?: Record<string, {
2907
+ from: "node_output";
2908
+ nodeKey: string;
2909
+ port: string;
2910
+ } | {
2911
+ from: "subject";
2912
+ } | {
2913
+ key: string;
2914
+ from: "parameter";
2915
+ } | {
2916
+ from: "collection";
2917
+ items: {
2918
+ from: "node_output";
2919
+ nodeKey: string;
2920
+ port: string;
2921
+ }[];
2922
+ }> | undefined;
2923
+ outputPorts?: Record<string, string> | undefined;
2924
+ } | {
2925
+ key: string;
2926
+ outcome: string;
2927
+ kind: "terminal";
2928
+ stageKey: string;
2929
+ label?: string | undefined;
2930
+ inputBindings?: Record<string, {
2931
+ from: "node_output";
2932
+ nodeKey: string;
2933
+ port: string;
2934
+ } | {
2935
+ from: "subject";
2936
+ } | {
2937
+ key: string;
2938
+ from: "parameter";
2939
+ } | {
2940
+ from: "collection";
2941
+ items: {
2942
+ from: "node_output";
2943
+ nodeKey: string;
2944
+ port: string;
2945
+ }[];
2946
+ }> | undefined;
2947
+ outputPorts?: Record<string, string> | undefined;
2948
+ disposition?: "complete" | "await_new_subject" | undefined;
2949
+ })[];
2950
+ edges: {
2951
+ from: string;
2952
+ to: string;
2953
+ outcome?: string | undefined;
2954
+ }[];
2955
+ roundPolicy: {
2956
+ entryNodeKey: string;
2957
+ maxRounds: number;
2958
+ onRework: "await_new_subject_then_next_round";
2959
+ onLimit: "attention";
2960
+ newVersionWhileActive: "supersede_round";
2961
+ terminalOutcomes: string[];
2962
+ };
2963
+ failurePolicy: {
2964
+ requiredNodeFailure: "block_and_attention";
2965
+ unknownExecution: "inspect_without_replay";
2966
+ };
2967
+ hostRequirements?: {
2968
+ protocol: number;
2969
+ features: Record<string, number>;
2970
+ } | undefined;
2971
+ presentation?: {
2972
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
2973
+ nodeDetailRef?: string | undefined;
2974
+ evidenceTypes?: string[] | undefined;
2975
+ } | undefined;
2976
+ metrics?: {
2977
+ dimensionRefs: string[];
2978
+ metricRefs: string[];
2979
+ } | undefined;
2980
+ };
2981
+ }>, {
2982
+ binding: {
2983
+ templateRef: string;
2984
+ roleBindings: Record<string, {
2985
+ kind: "assistant" | "runtime_binding" | "human" | "service";
2986
+ selectionKey: string;
2987
+ requiredCapabilities?: string[] | undefined;
2988
+ }>;
2989
+ parameters: Record<string, import("./primitives.schema").ProjectPipelineJsonValue>;
2990
+ executorBindings?: Record<string, {
2991
+ roleKey: string;
2992
+ kind: "assistant" | "runtime_binding" | "human" | "service";
2993
+ selectionKey: string;
2994
+ requiredCapabilities?: string[] | undefined;
2995
+ workspaceId?: string | undefined;
2996
+ }> | undefined;
2997
+ providerConfiguration?: Record<string, import("./primitives.schema").ProjectPipelineJsonValue> | undefined;
2998
+ limits?: {
2999
+ maxConcurrentExecutions: number;
3000
+ maxTechnicalAttemptsPerNode: number;
3001
+ runTimeoutMinutes: number;
3002
+ nativeModelBudget?: {
3003
+ maxCalls: number;
3004
+ maxTokens: number;
3005
+ reservationTokens: number;
3006
+ } | undefined;
3007
+ } | undefined;
3008
+ triggers?: {
3009
+ adapterRef: string;
3010
+ events: string[];
3011
+ }[] | undefined;
3012
+ };
3013
+ schemaVersion: 1;
3014
+ template: {
3015
+ key: string;
3016
+ executionAuthority: "provider";
3017
+ providerRef: string;
3018
+ topology: {
3019
+ source: "provider";
3020
+ presentationAdapterRef: string;
3021
+ };
3022
+ version: string;
3023
+ title: string;
3024
+ subjectResolverRef: string;
3025
+ roles: {
3026
+ key: string;
3027
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
3028
+ }[];
3029
+ lanes: {
3030
+ key: string;
3031
+ roleKey: string;
3032
+ label: string;
3033
+ order: number;
3034
+ }[];
3035
+ stages: {
3036
+ key: string;
3037
+ label: string;
3038
+ order: number;
3039
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
3040
+ }[];
3041
+ actionRefs?: string[] | undefined;
3042
+ hostRequirements?: {
3043
+ protocol: number;
3044
+ features: Record<string, number>;
3045
+ } | undefined;
3046
+ presentation?: {
3047
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
3048
+ nodeDetailRef?: string | undefined;
3049
+ evidenceTypes?: string[] | undefined;
3050
+ } | undefined;
3051
+ metrics?: {
3052
+ dimensionRefs: string[];
3053
+ metricRefs: string[];
3054
+ } | undefined;
3055
+ } | {
3056
+ key: string;
3057
+ executionAuthority: "platform";
3058
+ topology: {
3059
+ source: "definition";
3060
+ };
3061
+ version: string;
3062
+ title: string;
3063
+ subjectResolverRef: string;
3064
+ roles: {
3065
+ key: string;
3066
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
3067
+ }[];
3068
+ lanes: {
3069
+ key: string;
3070
+ roleKey: string;
3071
+ label: string;
3072
+ order: number;
3073
+ }[];
3074
+ stages: {
3075
+ key: string;
3076
+ label: string;
3077
+ order: number;
3078
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
3079
+ }[];
3080
+ nodes: ({
3081
+ key: string;
3082
+ kind: "work";
3083
+ laneKey: string;
3084
+ operationRef: string;
3085
+ executorSlot: string;
3086
+ completionRef: string;
3087
+ stageKey: string;
3088
+ label?: string | undefined;
3089
+ resourceResolverRef?: string | undefined;
3090
+ outputSchemaRef?: string | undefined;
3091
+ inputBindings?: Record<string, {
3092
+ from: "node_output";
3093
+ nodeKey: string;
3094
+ port: string;
3095
+ } | {
3096
+ from: "subject";
3097
+ } | {
3098
+ key: string;
3099
+ from: "parameter";
3100
+ } | {
3101
+ from: "collection";
3102
+ items: {
3103
+ from: "node_output";
3104
+ nodeKey: string;
3105
+ port: string;
3106
+ }[];
3107
+ }> | undefined;
3108
+ outputPorts?: Record<string, string> | undefined;
3109
+ } | {
3110
+ key: string;
3111
+ kind: "fork";
3112
+ stageKey: string;
3113
+ label?: string | undefined;
3114
+ inputBindings?: Record<string, {
3115
+ from: "node_output";
3116
+ nodeKey: string;
3117
+ port: string;
3118
+ } | {
3119
+ from: "subject";
3120
+ } | {
3121
+ key: string;
3122
+ from: "parameter";
3123
+ } | {
3124
+ from: "collection";
3125
+ items: {
3126
+ from: "node_output";
3127
+ nodeKey: string;
3128
+ port: string;
3129
+ }[];
3130
+ }> | undefined;
3131
+ outputPorts?: Record<string, string> | undefined;
3132
+ } | {
3133
+ join: {
3134
+ mode: "all_selected";
3135
+ accept: "completed";
3136
+ };
3137
+ key: string;
3138
+ kind: "join";
3139
+ stageKey: string;
3140
+ label?: string | undefined;
3141
+ inputBindings?: Record<string, {
3142
+ from: "node_output";
3143
+ nodeKey: string;
3144
+ port: string;
3145
+ } | {
3146
+ from: "subject";
3147
+ } | {
3148
+ key: string;
3149
+ from: "parameter";
3150
+ } | {
3151
+ from: "collection";
3152
+ items: {
3153
+ from: "node_output";
3154
+ nodeKey: string;
3155
+ port: string;
3156
+ }[];
3157
+ }> | undefined;
3158
+ outputPorts?: Record<string, string> | undefined;
3159
+ } | {
3160
+ key: string;
3161
+ kind: "router";
3162
+ stageKey: string;
3163
+ policyRef: string;
3164
+ outcomes: string[];
3165
+ unmatched: "block";
3166
+ label?: string | undefined;
3167
+ inputBindings?: Record<string, {
3168
+ from: "node_output";
3169
+ nodeKey: string;
3170
+ port: string;
3171
+ } | {
3172
+ from: "subject";
3173
+ } | {
3174
+ key: string;
3175
+ from: "parameter";
3176
+ } | {
3177
+ from: "collection";
3178
+ items: {
3179
+ from: "node_output";
3180
+ nodeKey: string;
3181
+ port: string;
3182
+ }[];
3183
+ }> | undefined;
3184
+ outputPorts?: Record<string, string> | undefined;
3185
+ } | {
3186
+ key: string;
3187
+ kind: "human_gate";
3188
+ laneKey: string;
3189
+ stageKey: string;
3190
+ policyRef: string;
3191
+ outcomes: string[];
3192
+ candidateRoleKey: string;
3193
+ label?: string | undefined;
3194
+ inputBindings?: Record<string, {
3195
+ from: "node_output";
3196
+ nodeKey: string;
3197
+ port: string;
3198
+ } | {
3199
+ from: "subject";
3200
+ } | {
3201
+ key: string;
3202
+ from: "parameter";
3203
+ } | {
3204
+ from: "collection";
3205
+ items: {
3206
+ from: "node_output";
3207
+ nodeKey: string;
3208
+ port: string;
3209
+ }[];
3210
+ }> | undefined;
3211
+ outputPorts?: Record<string, string> | undefined;
3212
+ outcomeLabels?: Record<string, string> | undefined;
3213
+ } | {
3214
+ key: string;
3215
+ kind: "external_wait";
3216
+ laneKey: string;
3217
+ stageKey: string;
3218
+ subscriptionRef: string;
3219
+ label?: string | undefined;
3220
+ inputBindings?: Record<string, {
3221
+ from: "node_output";
3222
+ nodeKey: string;
3223
+ port: string;
3224
+ } | {
3225
+ from: "subject";
3226
+ } | {
3227
+ key: string;
3228
+ from: "parameter";
3229
+ } | {
3230
+ from: "collection";
3231
+ items: {
3232
+ from: "node_output";
3233
+ nodeKey: string;
3234
+ port: string;
3235
+ }[];
3236
+ }> | undefined;
3237
+ outputPorts?: Record<string, string> | undefined;
3238
+ } | {
3239
+ key: string;
3240
+ outcome: string;
3241
+ kind: "terminal";
3242
+ stageKey: string;
3243
+ label?: string | undefined;
3244
+ inputBindings?: Record<string, {
3245
+ from: "node_output";
3246
+ nodeKey: string;
3247
+ port: string;
3248
+ } | {
3249
+ from: "subject";
3250
+ } | {
3251
+ key: string;
3252
+ from: "parameter";
3253
+ } | {
3254
+ from: "collection";
3255
+ items: {
3256
+ from: "node_output";
3257
+ nodeKey: string;
3258
+ port: string;
3259
+ }[];
3260
+ }> | undefined;
3261
+ outputPorts?: Record<string, string> | undefined;
3262
+ disposition?: "complete" | "await_new_subject" | undefined;
3263
+ })[];
3264
+ edges: {
3265
+ from: string;
3266
+ to: string;
3267
+ outcome?: string | undefined;
3268
+ }[];
3269
+ roundPolicy: {
3270
+ entryNodeKey: string;
3271
+ maxRounds: number;
3272
+ onRework: "await_new_subject_then_next_round";
3273
+ onLimit: "attention";
3274
+ newVersionWhileActive: "supersede_round";
3275
+ terminalOutcomes: string[];
3276
+ };
3277
+ failurePolicy: {
3278
+ requiredNodeFailure: "block_and_attention";
3279
+ unknownExecution: "inspect_without_replay";
3280
+ };
3281
+ hostRequirements?: {
3282
+ protocol: number;
3283
+ features: Record<string, number>;
3284
+ } | undefined;
3285
+ presentation?: {
3286
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
3287
+ nodeDetailRef?: string | undefined;
3288
+ evidenceTypes?: string[] | undefined;
3289
+ } | undefined;
3290
+ metrics?: {
3291
+ dimensionRefs: string[];
3292
+ metricRefs: string[];
3293
+ } | undefined;
3294
+ };
3295
+ }, {
3296
+ binding: {
3297
+ templateRef: string;
3298
+ roleBindings: Record<string, {
3299
+ kind: "assistant" | "runtime_binding" | "human" | "service";
3300
+ selectionKey: string;
3301
+ requiredCapabilities?: string[] | undefined;
3302
+ }>;
3303
+ parameters: Record<string, import("./primitives.schema").ProjectPipelineJsonValue>;
3304
+ executorBindings?: Record<string, {
3305
+ roleKey: string;
3306
+ kind: "assistant" | "runtime_binding" | "human" | "service";
3307
+ selectionKey: string;
3308
+ requiredCapabilities?: string[] | undefined;
3309
+ workspaceId?: string | undefined;
3310
+ }> | undefined;
3311
+ providerConfiguration?: Record<string, import("./primitives.schema").ProjectPipelineJsonValue> | undefined;
3312
+ limits?: {
3313
+ maxConcurrentExecutions: number;
3314
+ maxTechnicalAttemptsPerNode: number;
3315
+ runTimeoutMinutes: number;
3316
+ nativeModelBudget?: {
3317
+ maxCalls: number;
3318
+ maxTokens: number;
3319
+ reservationTokens: number;
3320
+ } | undefined;
3321
+ } | undefined;
3322
+ triggers?: {
3323
+ adapterRef: string;
3324
+ events: string[];
3325
+ }[] | undefined;
3326
+ };
3327
+ schemaVersion: 1;
3328
+ template: {
3329
+ key: string;
3330
+ executionAuthority: "provider";
3331
+ providerRef: string;
3332
+ topology: {
3333
+ source: "provider";
3334
+ presentationAdapterRef: string;
3335
+ };
3336
+ version: string;
3337
+ title: string;
3338
+ subjectResolverRef: string;
3339
+ roles: {
3340
+ key: string;
3341
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
3342
+ }[];
3343
+ lanes: {
3344
+ key: string;
3345
+ roleKey: string;
3346
+ label: string;
3347
+ order: number;
3348
+ }[];
3349
+ stages: {
3350
+ key: string;
3351
+ label: string;
3352
+ order: number;
3353
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
3354
+ }[];
3355
+ actionRefs?: string[] | undefined;
3356
+ hostRequirements?: {
3357
+ protocol: number;
3358
+ features: Record<string, number>;
3359
+ } | undefined;
3360
+ presentation?: {
3361
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
3362
+ nodeDetailRef?: string | undefined;
3363
+ evidenceTypes?: string[] | undefined;
3364
+ } | undefined;
3365
+ metrics?: {
3366
+ dimensionRefs: string[];
3367
+ metricRefs: string[];
3368
+ } | undefined;
3369
+ } | {
3370
+ key: string;
3371
+ executionAuthority: "platform";
3372
+ topology: {
3373
+ source: "definition";
3374
+ };
3375
+ version: string;
3376
+ title: string;
3377
+ subjectResolverRef: string;
3378
+ roles: {
3379
+ key: string;
3380
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
3381
+ }[];
3382
+ lanes: {
3383
+ key: string;
3384
+ roleKey: string;
3385
+ label: string;
3386
+ order: number;
3387
+ }[];
3388
+ stages: {
3389
+ key: string;
3390
+ label: string;
3391
+ order: number;
3392
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
3393
+ }[];
3394
+ nodes: ({
3395
+ key: string;
3396
+ kind: "work";
3397
+ laneKey: string;
3398
+ operationRef: string;
3399
+ executorSlot: string;
3400
+ completionRef: string;
3401
+ stageKey: string;
3402
+ label?: string | undefined;
3403
+ resourceResolverRef?: string | undefined;
3404
+ outputSchemaRef?: string | undefined;
3405
+ inputBindings?: Record<string, {
3406
+ from: "node_output";
3407
+ nodeKey: string;
3408
+ port: string;
3409
+ } | {
3410
+ from: "subject";
3411
+ } | {
3412
+ key: string;
3413
+ from: "parameter";
3414
+ } | {
3415
+ from: "collection";
3416
+ items: {
3417
+ from: "node_output";
3418
+ nodeKey: string;
3419
+ port: string;
3420
+ }[];
3421
+ }> | undefined;
3422
+ outputPorts?: Record<string, string> | undefined;
3423
+ } | {
3424
+ key: string;
3425
+ kind: "fork";
3426
+ stageKey: string;
3427
+ label?: string | undefined;
3428
+ inputBindings?: Record<string, {
3429
+ from: "node_output";
3430
+ nodeKey: string;
3431
+ port: string;
3432
+ } | {
3433
+ from: "subject";
3434
+ } | {
3435
+ key: string;
3436
+ from: "parameter";
3437
+ } | {
3438
+ from: "collection";
3439
+ items: {
3440
+ from: "node_output";
3441
+ nodeKey: string;
3442
+ port: string;
3443
+ }[];
3444
+ }> | undefined;
3445
+ outputPorts?: Record<string, string> | undefined;
3446
+ } | {
3447
+ join: {
3448
+ mode: "all_selected";
3449
+ accept: "completed";
3450
+ };
3451
+ key: string;
3452
+ kind: "join";
3453
+ stageKey: string;
3454
+ label?: string | undefined;
3455
+ inputBindings?: Record<string, {
3456
+ from: "node_output";
3457
+ nodeKey: string;
3458
+ port: string;
3459
+ } | {
3460
+ from: "subject";
3461
+ } | {
3462
+ key: string;
3463
+ from: "parameter";
3464
+ } | {
3465
+ from: "collection";
3466
+ items: {
3467
+ from: "node_output";
3468
+ nodeKey: string;
3469
+ port: string;
3470
+ }[];
3471
+ }> | undefined;
3472
+ outputPorts?: Record<string, string> | undefined;
3473
+ } | {
3474
+ key: string;
3475
+ kind: "router";
3476
+ stageKey: string;
3477
+ policyRef: string;
3478
+ outcomes: string[];
3479
+ unmatched: "block";
3480
+ label?: string | undefined;
3481
+ inputBindings?: Record<string, {
3482
+ from: "node_output";
3483
+ nodeKey: string;
3484
+ port: string;
3485
+ } | {
3486
+ from: "subject";
3487
+ } | {
3488
+ key: string;
3489
+ from: "parameter";
3490
+ } | {
3491
+ from: "collection";
3492
+ items: {
3493
+ from: "node_output";
3494
+ nodeKey: string;
3495
+ port: string;
3496
+ }[];
3497
+ }> | undefined;
3498
+ outputPorts?: Record<string, string> | undefined;
3499
+ } | {
3500
+ key: string;
3501
+ kind: "human_gate";
3502
+ laneKey: string;
3503
+ stageKey: string;
3504
+ policyRef: string;
3505
+ outcomes: string[];
3506
+ candidateRoleKey: string;
3507
+ label?: string | undefined;
3508
+ inputBindings?: Record<string, {
3509
+ from: "node_output";
3510
+ nodeKey: string;
3511
+ port: string;
3512
+ } | {
3513
+ from: "subject";
3514
+ } | {
3515
+ key: string;
3516
+ from: "parameter";
3517
+ } | {
3518
+ from: "collection";
3519
+ items: {
3520
+ from: "node_output";
3521
+ nodeKey: string;
3522
+ port: string;
3523
+ }[];
3524
+ }> | undefined;
3525
+ outputPorts?: Record<string, string> | undefined;
3526
+ outcomeLabels?: Record<string, string> | undefined;
3527
+ } | {
3528
+ key: string;
3529
+ kind: "external_wait";
3530
+ laneKey: string;
3531
+ stageKey: string;
3532
+ subscriptionRef: string;
3533
+ label?: string | undefined;
3534
+ inputBindings?: Record<string, {
3535
+ from: "node_output";
3536
+ nodeKey: string;
3537
+ port: string;
3538
+ } | {
3539
+ from: "subject";
3540
+ } | {
3541
+ key: string;
3542
+ from: "parameter";
3543
+ } | {
3544
+ from: "collection";
3545
+ items: {
3546
+ from: "node_output";
3547
+ nodeKey: string;
3548
+ port: string;
3549
+ }[];
3550
+ }> | undefined;
3551
+ outputPorts?: Record<string, string> | undefined;
3552
+ } | {
3553
+ key: string;
3554
+ outcome: string;
3555
+ kind: "terminal";
3556
+ stageKey: string;
3557
+ label?: string | undefined;
3558
+ inputBindings?: Record<string, {
3559
+ from: "node_output";
3560
+ nodeKey: string;
3561
+ port: string;
3562
+ } | {
3563
+ from: "subject";
3564
+ } | {
3565
+ key: string;
3566
+ from: "parameter";
3567
+ } | {
3568
+ from: "collection";
3569
+ items: {
3570
+ from: "node_output";
3571
+ nodeKey: string;
3572
+ port: string;
3573
+ }[];
3574
+ }> | undefined;
3575
+ outputPorts?: Record<string, string> | undefined;
3576
+ disposition?: "complete" | "await_new_subject" | undefined;
3577
+ })[];
3578
+ edges: {
3579
+ from: string;
3580
+ to: string;
3581
+ outcome?: string | undefined;
3582
+ }[];
3583
+ roundPolicy: {
3584
+ entryNodeKey: string;
3585
+ maxRounds: number;
3586
+ onRework: "await_new_subject_then_next_round";
3587
+ onLimit: "attention";
3588
+ newVersionWhileActive: "supersede_round";
3589
+ terminalOutcomes: string[];
3590
+ };
3591
+ failurePolicy: {
3592
+ requiredNodeFailure: "block_and_attention";
3593
+ unknownExecution: "inspect_without_replay";
3594
+ };
3595
+ hostRequirements?: {
3596
+ protocol: number;
3597
+ features: Record<string, number>;
3598
+ } | undefined;
3599
+ presentation?: {
3600
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
3601
+ nodeDetailRef?: string | undefined;
3602
+ evidenceTypes?: string[] | undefined;
3603
+ } | undefined;
3604
+ metrics?: {
3605
+ dimensionRefs: string[];
3606
+ metricRefs: string[];
3607
+ } | undefined;
3608
+ };
3609
+ }>;
3610
+ }, "strict", z.ZodTypeAny, {
3611
+ requestId: string;
3612
+ configuration: {
3613
+ binding: {
3614
+ templateRef: string;
3615
+ roleBindings: Record<string, {
3616
+ kind: "assistant" | "runtime_binding" | "human" | "service";
3617
+ selectionKey: string;
3618
+ requiredCapabilities?: string[] | undefined;
3619
+ }>;
3620
+ parameters: Record<string, import("./primitives.schema").ProjectPipelineJsonValue>;
3621
+ executorBindings?: Record<string, {
3622
+ roleKey: string;
3623
+ kind: "assistant" | "runtime_binding" | "human" | "service";
3624
+ selectionKey: string;
3625
+ requiredCapabilities?: string[] | undefined;
3626
+ workspaceId?: string | undefined;
3627
+ }> | undefined;
3628
+ providerConfiguration?: Record<string, import("./primitives.schema").ProjectPipelineJsonValue> | undefined;
3629
+ limits?: {
3630
+ maxConcurrentExecutions: number;
3631
+ maxTechnicalAttemptsPerNode: number;
3632
+ runTimeoutMinutes: number;
3633
+ nativeModelBudget?: {
3634
+ maxCalls: number;
3635
+ maxTokens: number;
3636
+ reservationTokens: number;
3637
+ } | undefined;
3638
+ } | undefined;
3639
+ triggers?: {
3640
+ adapterRef: string;
3641
+ events: string[];
3642
+ }[] | undefined;
3643
+ };
3644
+ schemaVersion: 1;
3645
+ template: {
3646
+ key: string;
3647
+ executionAuthority: "provider";
3648
+ providerRef: string;
3649
+ topology: {
3650
+ source: "provider";
3651
+ presentationAdapterRef: string;
3652
+ };
3653
+ version: string;
3654
+ title: string;
3655
+ subjectResolverRef: string;
3656
+ roles: {
3657
+ key: string;
3658
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
3659
+ }[];
3660
+ lanes: {
3661
+ key: string;
3662
+ roleKey: string;
3663
+ label: string;
3664
+ order: number;
3665
+ }[];
3666
+ stages: {
3667
+ key: string;
3668
+ label: string;
3669
+ order: number;
3670
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
3671
+ }[];
3672
+ actionRefs?: string[] | undefined;
3673
+ hostRequirements?: {
3674
+ protocol: number;
3675
+ features: Record<string, number>;
3676
+ } | undefined;
3677
+ presentation?: {
3678
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
3679
+ nodeDetailRef?: string | undefined;
3680
+ evidenceTypes?: string[] | undefined;
3681
+ } | undefined;
3682
+ metrics?: {
3683
+ dimensionRefs: string[];
3684
+ metricRefs: string[];
3685
+ } | undefined;
3686
+ } | {
3687
+ key: string;
3688
+ executionAuthority: "platform";
3689
+ topology: {
3690
+ source: "definition";
3691
+ };
3692
+ version: string;
3693
+ title: string;
3694
+ subjectResolverRef: string;
3695
+ roles: {
3696
+ key: string;
3697
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
3698
+ }[];
3699
+ lanes: {
3700
+ key: string;
3701
+ roleKey: string;
3702
+ label: string;
3703
+ order: number;
3704
+ }[];
3705
+ stages: {
3706
+ key: string;
3707
+ label: string;
3708
+ order: number;
3709
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
3710
+ }[];
3711
+ nodes: ({
3712
+ key: string;
3713
+ kind: "work";
3714
+ laneKey: string;
3715
+ operationRef: string;
3716
+ executorSlot: string;
3717
+ completionRef: string;
3718
+ stageKey: string;
3719
+ label?: string | undefined;
3720
+ resourceResolverRef?: string | undefined;
3721
+ outputSchemaRef?: string | undefined;
3722
+ inputBindings?: Record<string, {
3723
+ from: "node_output";
3724
+ nodeKey: string;
3725
+ port: string;
3726
+ } | {
3727
+ from: "subject";
3728
+ } | {
3729
+ key: string;
3730
+ from: "parameter";
3731
+ } | {
3732
+ from: "collection";
3733
+ items: {
3734
+ from: "node_output";
3735
+ nodeKey: string;
3736
+ port: string;
3737
+ }[];
3738
+ }> | undefined;
3739
+ outputPorts?: Record<string, string> | undefined;
3740
+ } | {
3741
+ key: string;
3742
+ kind: "fork";
3743
+ stageKey: string;
3744
+ label?: string | undefined;
3745
+ inputBindings?: Record<string, {
3746
+ from: "node_output";
3747
+ nodeKey: string;
3748
+ port: string;
3749
+ } | {
3750
+ from: "subject";
3751
+ } | {
3752
+ key: string;
3753
+ from: "parameter";
3754
+ } | {
3755
+ from: "collection";
3756
+ items: {
3757
+ from: "node_output";
3758
+ nodeKey: string;
3759
+ port: string;
3760
+ }[];
3761
+ }> | undefined;
3762
+ outputPorts?: Record<string, string> | undefined;
3763
+ } | {
3764
+ join: {
3765
+ mode: "all_selected";
3766
+ accept: "completed";
3767
+ };
3768
+ key: string;
3769
+ kind: "join";
3770
+ stageKey: string;
3771
+ label?: string | undefined;
3772
+ inputBindings?: Record<string, {
3773
+ from: "node_output";
3774
+ nodeKey: string;
3775
+ port: string;
3776
+ } | {
3777
+ from: "subject";
3778
+ } | {
3779
+ key: string;
3780
+ from: "parameter";
3781
+ } | {
3782
+ from: "collection";
3783
+ items: {
3784
+ from: "node_output";
3785
+ nodeKey: string;
3786
+ port: string;
3787
+ }[];
3788
+ }> | undefined;
3789
+ outputPorts?: Record<string, string> | undefined;
3790
+ } | {
3791
+ key: string;
3792
+ kind: "router";
3793
+ stageKey: string;
3794
+ policyRef: string;
3795
+ outcomes: string[];
3796
+ unmatched: "block";
3797
+ label?: string | undefined;
3798
+ inputBindings?: Record<string, {
3799
+ from: "node_output";
3800
+ nodeKey: string;
3801
+ port: string;
3802
+ } | {
3803
+ from: "subject";
3804
+ } | {
3805
+ key: string;
3806
+ from: "parameter";
3807
+ } | {
3808
+ from: "collection";
3809
+ items: {
3810
+ from: "node_output";
3811
+ nodeKey: string;
3812
+ port: string;
3813
+ }[];
3814
+ }> | undefined;
3815
+ outputPorts?: Record<string, string> | undefined;
3816
+ } | {
3817
+ key: string;
3818
+ kind: "human_gate";
3819
+ laneKey: string;
3820
+ stageKey: string;
3821
+ policyRef: string;
3822
+ outcomes: string[];
3823
+ candidateRoleKey: string;
3824
+ label?: string | undefined;
3825
+ inputBindings?: Record<string, {
3826
+ from: "node_output";
3827
+ nodeKey: string;
3828
+ port: string;
3829
+ } | {
3830
+ from: "subject";
3831
+ } | {
3832
+ key: string;
3833
+ from: "parameter";
3834
+ } | {
3835
+ from: "collection";
3836
+ items: {
3837
+ from: "node_output";
3838
+ nodeKey: string;
3839
+ port: string;
3840
+ }[];
3841
+ }> | undefined;
3842
+ outputPorts?: Record<string, string> | undefined;
3843
+ outcomeLabels?: Record<string, string> | undefined;
3844
+ } | {
3845
+ key: string;
3846
+ kind: "external_wait";
3847
+ laneKey: string;
3848
+ stageKey: string;
3849
+ subscriptionRef: string;
3850
+ label?: string | undefined;
3851
+ inputBindings?: Record<string, {
3852
+ from: "node_output";
3853
+ nodeKey: string;
3854
+ port: string;
3855
+ } | {
3856
+ from: "subject";
3857
+ } | {
3858
+ key: string;
3859
+ from: "parameter";
3860
+ } | {
3861
+ from: "collection";
3862
+ items: {
3863
+ from: "node_output";
3864
+ nodeKey: string;
3865
+ port: string;
3866
+ }[];
3867
+ }> | undefined;
3868
+ outputPorts?: Record<string, string> | undefined;
3869
+ } | {
3870
+ key: string;
3871
+ outcome: string;
3872
+ kind: "terminal";
3873
+ stageKey: string;
3874
+ label?: string | undefined;
3875
+ inputBindings?: Record<string, {
3876
+ from: "node_output";
3877
+ nodeKey: string;
3878
+ port: string;
3879
+ } | {
3880
+ from: "subject";
3881
+ } | {
3882
+ key: string;
3883
+ from: "parameter";
3884
+ } | {
3885
+ from: "collection";
3886
+ items: {
3887
+ from: "node_output";
3888
+ nodeKey: string;
3889
+ port: string;
3890
+ }[];
3891
+ }> | undefined;
3892
+ outputPorts?: Record<string, string> | undefined;
3893
+ disposition?: "complete" | "await_new_subject" | undefined;
3894
+ })[];
3895
+ edges: {
3896
+ from: string;
3897
+ to: string;
3898
+ outcome?: string | undefined;
3899
+ }[];
3900
+ roundPolicy: {
3901
+ entryNodeKey: string;
3902
+ maxRounds: number;
3903
+ onRework: "await_new_subject_then_next_round";
3904
+ onLimit: "attention";
3905
+ newVersionWhileActive: "supersede_round";
3906
+ terminalOutcomes: string[];
3907
+ };
3908
+ failurePolicy: {
3909
+ requiredNodeFailure: "block_and_attention";
3910
+ unknownExecution: "inspect_without_replay";
3911
+ };
3912
+ hostRequirements?: {
3913
+ protocol: number;
3914
+ features: Record<string, number>;
3915
+ } | undefined;
3916
+ presentation?: {
3917
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
3918
+ nodeDetailRef?: string | undefined;
3919
+ evidenceTypes?: string[] | undefined;
3920
+ } | undefined;
3921
+ metrics?: {
3922
+ dimensionRefs: string[];
3923
+ metricRefs: string[];
3924
+ } | undefined;
3925
+ };
3926
+ };
3927
+ }, {
3928
+ requestId: string;
3929
+ configuration: {
3930
+ binding: {
3931
+ templateRef: string;
3932
+ roleBindings: Record<string, {
3933
+ kind: "assistant" | "runtime_binding" | "human" | "service";
3934
+ selectionKey: string;
3935
+ requiredCapabilities?: string[] | undefined;
3936
+ }>;
3937
+ parameters: Record<string, import("./primitives.schema").ProjectPipelineJsonValue>;
3938
+ executorBindings?: Record<string, {
3939
+ roleKey: string;
3940
+ kind: "assistant" | "runtime_binding" | "human" | "service";
3941
+ selectionKey: string;
3942
+ requiredCapabilities?: string[] | undefined;
3943
+ workspaceId?: string | undefined;
3944
+ }> | undefined;
3945
+ providerConfiguration?: Record<string, import("./primitives.schema").ProjectPipelineJsonValue> | undefined;
3946
+ limits?: {
3947
+ maxConcurrentExecutions: number;
3948
+ maxTechnicalAttemptsPerNode: number;
3949
+ runTimeoutMinutes: number;
3950
+ nativeModelBudget?: {
3951
+ maxCalls: number;
3952
+ maxTokens: number;
3953
+ reservationTokens: number;
3954
+ } | undefined;
3955
+ } | undefined;
3956
+ triggers?: {
3957
+ adapterRef: string;
3958
+ events: string[];
3959
+ }[] | undefined;
3960
+ };
3961
+ schemaVersion: 1;
3962
+ template: {
3963
+ key: string;
3964
+ executionAuthority: "provider";
3965
+ providerRef: string;
3966
+ topology: {
3967
+ source: "provider";
3968
+ presentationAdapterRef: string;
3969
+ };
3970
+ version: string;
3971
+ title: string;
3972
+ subjectResolverRef: string;
3973
+ roles: {
3974
+ key: string;
3975
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
3976
+ }[];
3977
+ lanes: {
3978
+ key: string;
3979
+ roleKey: string;
3980
+ label: string;
3981
+ order: number;
3982
+ }[];
3983
+ stages: {
3984
+ key: string;
3985
+ label: string;
3986
+ order: number;
3987
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
3988
+ }[];
3989
+ actionRefs?: string[] | undefined;
3990
+ hostRequirements?: {
3991
+ protocol: number;
3992
+ features: Record<string, number>;
3993
+ } | undefined;
3994
+ presentation?: {
3995
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
3996
+ nodeDetailRef?: string | undefined;
3997
+ evidenceTypes?: string[] | undefined;
3998
+ } | undefined;
3999
+ metrics?: {
4000
+ dimensionRefs: string[];
4001
+ metricRefs: string[];
4002
+ } | undefined;
4003
+ } | {
4004
+ key: string;
4005
+ executionAuthority: "platform";
4006
+ topology: {
4007
+ source: "definition";
4008
+ };
4009
+ version: string;
4010
+ title: string;
4011
+ subjectResolverRef: string;
4012
+ roles: {
4013
+ key: string;
4014
+ allowedKinds: ("assistant" | "runtime_binding" | "human" | "service")[];
4015
+ }[];
4016
+ lanes: {
4017
+ key: string;
4018
+ roleKey: string;
4019
+ label: string;
4020
+ order: number;
4021
+ }[];
4022
+ stages: {
4023
+ key: string;
4024
+ label: string;
4025
+ order: number;
4026
+ icon?: "code" | "layers" | "file-text" | "folder-open" | "list-checks" | "search" | "scan-search" | "boxes" | "package" | "settings" | "clipboard-check" | "shield-check" | "git-pull-request" | "test-tube" | "git-merge" | "calculator" | "file-check" | "truck" | undefined;
4027
+ }[];
4028
+ nodes: ({
4029
+ key: string;
4030
+ kind: "work";
4031
+ laneKey: string;
4032
+ operationRef: string;
4033
+ executorSlot: string;
4034
+ completionRef: string;
4035
+ stageKey: string;
4036
+ label?: string | undefined;
4037
+ resourceResolverRef?: string | undefined;
4038
+ outputSchemaRef?: string | undefined;
4039
+ inputBindings?: Record<string, {
4040
+ from: "node_output";
4041
+ nodeKey: string;
4042
+ port: string;
4043
+ } | {
4044
+ from: "subject";
4045
+ } | {
4046
+ key: string;
4047
+ from: "parameter";
4048
+ } | {
4049
+ from: "collection";
4050
+ items: {
4051
+ from: "node_output";
4052
+ nodeKey: string;
4053
+ port: string;
4054
+ }[];
4055
+ }> | undefined;
4056
+ outputPorts?: Record<string, string> | undefined;
4057
+ } | {
4058
+ key: string;
4059
+ kind: "fork";
4060
+ stageKey: string;
4061
+ label?: string | undefined;
4062
+ inputBindings?: Record<string, {
4063
+ from: "node_output";
4064
+ nodeKey: string;
4065
+ port: string;
4066
+ } | {
4067
+ from: "subject";
4068
+ } | {
4069
+ key: string;
4070
+ from: "parameter";
4071
+ } | {
4072
+ from: "collection";
4073
+ items: {
4074
+ from: "node_output";
4075
+ nodeKey: string;
4076
+ port: string;
4077
+ }[];
4078
+ }> | undefined;
4079
+ outputPorts?: Record<string, string> | undefined;
4080
+ } | {
4081
+ join: {
4082
+ mode: "all_selected";
4083
+ accept: "completed";
4084
+ };
4085
+ key: string;
4086
+ kind: "join";
4087
+ stageKey: string;
4088
+ label?: string | undefined;
4089
+ inputBindings?: Record<string, {
4090
+ from: "node_output";
4091
+ nodeKey: string;
4092
+ port: string;
4093
+ } | {
4094
+ from: "subject";
4095
+ } | {
4096
+ key: string;
4097
+ from: "parameter";
4098
+ } | {
4099
+ from: "collection";
4100
+ items: {
4101
+ from: "node_output";
4102
+ nodeKey: string;
4103
+ port: string;
4104
+ }[];
4105
+ }> | undefined;
4106
+ outputPorts?: Record<string, string> | undefined;
4107
+ } | {
4108
+ key: string;
4109
+ kind: "router";
4110
+ stageKey: string;
4111
+ policyRef: string;
4112
+ outcomes: string[];
4113
+ unmatched: "block";
4114
+ label?: string | undefined;
4115
+ inputBindings?: Record<string, {
4116
+ from: "node_output";
4117
+ nodeKey: string;
4118
+ port: string;
4119
+ } | {
4120
+ from: "subject";
4121
+ } | {
4122
+ key: string;
4123
+ from: "parameter";
4124
+ } | {
4125
+ from: "collection";
4126
+ items: {
4127
+ from: "node_output";
4128
+ nodeKey: string;
4129
+ port: string;
4130
+ }[];
4131
+ }> | undefined;
4132
+ outputPorts?: Record<string, string> | undefined;
4133
+ } | {
4134
+ key: string;
4135
+ kind: "human_gate";
4136
+ laneKey: string;
4137
+ stageKey: string;
4138
+ policyRef: string;
4139
+ outcomes: string[];
4140
+ candidateRoleKey: string;
4141
+ label?: string | undefined;
4142
+ inputBindings?: Record<string, {
4143
+ from: "node_output";
4144
+ nodeKey: string;
4145
+ port: string;
4146
+ } | {
4147
+ from: "subject";
4148
+ } | {
4149
+ key: string;
4150
+ from: "parameter";
4151
+ } | {
4152
+ from: "collection";
4153
+ items: {
4154
+ from: "node_output";
4155
+ nodeKey: string;
4156
+ port: string;
4157
+ }[];
4158
+ }> | undefined;
4159
+ outputPorts?: Record<string, string> | undefined;
4160
+ outcomeLabels?: Record<string, string> | undefined;
4161
+ } | {
4162
+ key: string;
4163
+ kind: "external_wait";
4164
+ laneKey: string;
4165
+ stageKey: string;
4166
+ subscriptionRef: string;
4167
+ label?: string | undefined;
4168
+ inputBindings?: Record<string, {
4169
+ from: "node_output";
4170
+ nodeKey: string;
4171
+ port: string;
4172
+ } | {
4173
+ from: "subject";
4174
+ } | {
4175
+ key: string;
4176
+ from: "parameter";
4177
+ } | {
4178
+ from: "collection";
4179
+ items: {
4180
+ from: "node_output";
4181
+ nodeKey: string;
4182
+ port: string;
4183
+ }[];
4184
+ }> | undefined;
4185
+ outputPorts?: Record<string, string> | undefined;
4186
+ } | {
4187
+ key: string;
4188
+ outcome: string;
4189
+ kind: "terminal";
4190
+ stageKey: string;
4191
+ label?: string | undefined;
4192
+ inputBindings?: Record<string, {
4193
+ from: "node_output";
4194
+ nodeKey: string;
4195
+ port: string;
4196
+ } | {
4197
+ from: "subject";
4198
+ } | {
4199
+ key: string;
4200
+ from: "parameter";
4201
+ } | {
4202
+ from: "collection";
4203
+ items: {
4204
+ from: "node_output";
4205
+ nodeKey: string;
4206
+ port: string;
4207
+ }[];
4208
+ }> | undefined;
4209
+ outputPorts?: Record<string, string> | undefined;
4210
+ disposition?: "complete" | "await_new_subject" | undefined;
4211
+ })[];
4212
+ edges: {
4213
+ from: string;
4214
+ to: string;
4215
+ outcome?: string | undefined;
4216
+ }[];
4217
+ roundPolicy: {
4218
+ entryNodeKey: string;
4219
+ maxRounds: number;
4220
+ onRework: "await_new_subject_then_next_round";
4221
+ onLimit: "attention";
4222
+ newVersionWhileActive: "supersede_round";
4223
+ terminalOutcomes: string[];
4224
+ };
4225
+ failurePolicy: {
4226
+ requiredNodeFailure: "block_and_attention";
4227
+ unknownExecution: "inspect_without_replay";
4228
+ };
4229
+ hostRequirements?: {
4230
+ protocol: number;
4231
+ features: Record<string, number>;
4232
+ } | undefined;
4233
+ presentation?: {
4234
+ views: ("tasks" | "pipeline" | "agent_timeline")[];
4235
+ nodeDetailRef?: string | undefined;
4236
+ evidenceTypes?: string[] | undefined;
4237
+ } | undefined;
4238
+ metrics?: {
4239
+ dimensionRefs: string[];
4240
+ metricRefs: string[];
4241
+ } | undefined;
4242
+ };
4243
+ };
4244
+ }>;
4245
+ export declare const projectPipelineStartSchema: z.ZodObject<{
4246
+ bindingId: z.ZodString;
4247
+ objectKey: z.ZodString;
4248
+ triggerKey: z.ZodString;
4249
+ title: z.ZodString;
4250
+ }, "strict", z.ZodTypeAny, {
4251
+ title: string;
4252
+ objectKey: string;
4253
+ bindingId: string;
4254
+ triggerKey: string;
4255
+ }, {
4256
+ title: string;
4257
+ objectKey: string;
4258
+ bindingId: string;
4259
+ triggerKey: string;
4260
+ }>;
4261
+ export type ProjectPipelineConfigure = z.output<typeof projectPipelineConfigureSchema>;
4262
+ export type ProjectPipelineStart = z.output<typeof projectPipelineStartSchema>;
4263
+ export declare const projectPipelineDecisionSchema: z.ZodObject<{
4264
+ requestId: z.ZodString;
4265
+ attentionId: z.ZodString;
4266
+ expectedRevision: z.ZodNumber;
4267
+ inputDigest: z.ZodString;
4268
+ generation: z.ZodNumber;
4269
+ outcome: z.ZodEffects<z.ZodString, string, string>;
4270
+ evidence: z.ZodArray<z.ZodObject<{
4271
+ resolverRef: z.ZodString;
4272
+ objectKey: z.ZodString;
4273
+ version: z.ZodString;
4274
+ digest: z.ZodString;
4275
+ } & {
4276
+ schemaRef: z.ZodString;
4277
+ producerOperationId: z.ZodOptional<z.ZodString>;
4278
+ }, "strict", z.ZodTypeAny, {
4279
+ version: string;
4280
+ resolverRef: string;
4281
+ digest: string;
4282
+ objectKey: string;
4283
+ schemaRef: string;
4284
+ producerOperationId?: string | undefined;
4285
+ }, {
4286
+ version: string;
4287
+ resolverRef: string;
4288
+ digest: string;
4289
+ objectKey: string;
4290
+ schemaRef: string;
4291
+ producerOperationId?: string | undefined;
4292
+ }>, "many">;
4293
+ }, "strict", z.ZodTypeAny, {
4294
+ outcome: string;
4295
+ requestId: string;
4296
+ inputDigest: string;
4297
+ generation: number;
4298
+ evidence: {
4299
+ version: string;
4300
+ resolverRef: string;
4301
+ digest: string;
4302
+ objectKey: string;
4303
+ schemaRef: string;
4304
+ producerOperationId?: string | undefined;
4305
+ }[];
4306
+ attentionId: string;
4307
+ expectedRevision: number;
4308
+ }, {
4309
+ outcome: string;
4310
+ requestId: string;
4311
+ inputDigest: string;
4312
+ generation: number;
4313
+ evidence: {
4314
+ version: string;
4315
+ resolverRef: string;
4316
+ digest: string;
4317
+ objectKey: string;
4318
+ schemaRef: string;
4319
+ producerOperationId?: string | undefined;
4320
+ }[];
4321
+ attentionId: string;
4322
+ expectedRevision: number;
4323
+ }>;
4324
+ export type ProjectPipelineDecision = z.output<typeof projectPipelineDecisionSchema>;
4325
+ export declare const projectPipelineNextRoundSchema: z.ZodObject<{
4326
+ instanceId: z.ZodString;
4327
+ requestId: z.ZodString;
4328
+ expectedRevision: z.ZodNumber;
4329
+ }, "strict", z.ZodTypeAny, {
4330
+ requestId: string;
4331
+ instanceId: string;
4332
+ expectedRevision: number;
4333
+ }, {
4334
+ requestId: string;
4335
+ instanceId: string;
4336
+ expectedRevision: number;
4337
+ }>;
4338
+ export type ProjectPipelineNextRound = z.output<typeof projectPipelineNextRoundSchema>;
4339
+ export declare const projectPipelineCancelSchema: z.ZodObject<{
4340
+ instanceId: z.ZodString;
4341
+ requestId: z.ZodString;
4342
+ expectedRevision: z.ZodNumber;
4343
+ }, "strict", z.ZodTypeAny, {
4344
+ requestId: string;
4345
+ instanceId: string;
4346
+ expectedRevision: number;
4347
+ }, {
4348
+ requestId: string;
4349
+ instanceId: string;
4350
+ expectedRevision: number;
4351
+ }>;
4352
+ export type ProjectPipelineCancel = z.output<typeof projectPipelineCancelSchema>;
4353
+ export declare const projectPipelineRetrySchema: z.ZodObject<{
4354
+ instanceId: z.ZodString;
4355
+ requestId: z.ZodString;
4356
+ expectedRevision: z.ZodNumber;
4357
+ operationId: z.ZodString;
4358
+ inputDigest: z.ZodString;
4359
+ generation: z.ZodNumber;
4360
+ }, "strict", z.ZodTypeAny, {
4361
+ operationId: string;
4362
+ requestId: string;
4363
+ instanceId: string;
4364
+ inputDigest: string;
4365
+ generation: number;
4366
+ expectedRevision: number;
4367
+ }, {
4368
+ operationId: string;
4369
+ requestId: string;
4370
+ instanceId: string;
4371
+ inputDigest: string;
4372
+ generation: number;
4373
+ expectedRevision: number;
4374
+ }>;
4375
+ export type ProjectPipelineRetry = z.output<typeof projectPipelineRetrySchema>;
4376
+ export interface ProjectPipelineStartReceipt {
4377
+ instanceId: string;
4378
+ runId: string;
4379
+ roundId: string;
4380
+ revision: number;
4381
+ }