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