@kortyx/telemetry-contracts 0.1.0 → 0.2.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.
package/dist/index.d.ts CHANGED
@@ -18,6 +18,12 @@ declare const WorkflowTopologyEdgeSchema: z.ZodObject<{
18
18
  targetNodeId: z.ZodString;
19
19
  condition: z.ZodOptional<z.ZodString>;
20
20
  }, z.core.$strict>;
21
+ declare const WorkflowTopologyTransitionSchema: z.ZodObject<{
22
+ sourceNodeId: z.ZodOptional<z.ZodString>;
23
+ targetWorkflowId: z.ZodString;
24
+ condition: z.ZodOptional<z.ZodString>;
25
+ intent: z.ZodOptional<z.ZodString>;
26
+ }, z.core.$strict>;
21
27
  declare const EnsureWorkflowTopologyRequestSchema: z.ZodObject<{
22
28
  schemaVersion: z.ZodLiteral<1>;
23
29
  environment: z.ZodString;
@@ -44,6 +50,12 @@ declare const EnsureWorkflowTopologyRequestSchema: z.ZodObject<{
44
50
  targetNodeId: z.ZodString;
45
51
  condition: z.ZodOptional<z.ZodString>;
46
52
  }, z.core.$strict>>;
53
+ transitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
54
+ sourceNodeId: z.ZodOptional<z.ZodString>;
55
+ targetWorkflowId: z.ZodString;
56
+ condition: z.ZodOptional<z.ZodString>;
57
+ intent: z.ZodOptional<z.ZodString>;
58
+ }, z.core.$strict>>>;
47
59
  }, z.core.$strict>;
48
60
  }, z.core.$strict>;
49
61
  declare const EnsureWorkflowTopologyResponseSchema: z.ZodObject<{
@@ -162,12 +174,1686 @@ declare const TelemetryEventBatchSchema: z.ZodObject<{
162
174
  payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
163
175
  }, z.core.$strict>>;
164
176
  }, z.core.$strict>;
177
+ declare const TelemetryEventBatchResponseSchema: z.ZodObject<{
178
+ accepted: z.ZodNumber;
179
+ inserted: z.ZodNumber;
180
+ duplicates: z.ZodNumber;
181
+ }, z.core.$strict>;
182
+ declare const TelemetryPricingSourceSchema: z.ZodEnum<{
183
+ provider: "provider";
184
+ custom: "custom";
185
+ sdk: "sdk";
186
+ "project-rate-card": "project-rate-card";
187
+ "default-rate-card": "default-rate-card";
188
+ }>;
189
+ declare const TelemetryPricingUnitSchema: z.ZodEnum<{
190
+ custom: "custom";
191
+ token: "token";
192
+ character: "character";
193
+ request: "request";
194
+ image: "image";
195
+ audio_second: "audio_second";
196
+ audio_minute: "audio_minute";
197
+ video_second: "video_second";
198
+ video_minute: "video_minute";
199
+ second: "second";
200
+ minute: "minute";
201
+ }>;
202
+ declare const TelemetryPricingUsageTypeSchema: z.ZodEnum<{
203
+ custom: "custom";
204
+ input: "input";
205
+ output: "output";
206
+ request: "request";
207
+ reasoning: "reasoning";
208
+ cache_read: "cache_read";
209
+ cache_write: "cache_write";
210
+ embedding: "embedding";
211
+ image_input: "image_input";
212
+ image_output: "image_output";
213
+ audio_input: "audio_input";
214
+ audio_output: "audio_output";
215
+ video_input: "video_input";
216
+ video_output: "video_output";
217
+ }>;
218
+ declare const TelemetryUsageItemSchema: z.ZodObject<{
219
+ usageType: z.ZodEnum<{
220
+ custom: "custom";
221
+ input: "input";
222
+ output: "output";
223
+ request: "request";
224
+ reasoning: "reasoning";
225
+ cache_read: "cache_read";
226
+ cache_write: "cache_write";
227
+ embedding: "embedding";
228
+ image_input: "image_input";
229
+ image_output: "image_output";
230
+ audio_input: "audio_input";
231
+ audio_output: "audio_output";
232
+ video_input: "video_input";
233
+ video_output: "video_output";
234
+ }>;
235
+ quantity: z.ZodNumber;
236
+ unit: z.ZodEnum<{
237
+ custom: "custom";
238
+ token: "token";
239
+ character: "character";
240
+ request: "request";
241
+ image: "image";
242
+ audio_second: "audio_second";
243
+ audio_minute: "audio_minute";
244
+ video_second: "video_second";
245
+ video_minute: "video_minute";
246
+ second: "second";
247
+ minute: "minute";
248
+ }>;
249
+ label: z.ZodOptional<z.ZodString>;
250
+ }, z.core.$strict>;
251
+ declare const TelemetryUnitPriceSchema: z.ZodObject<{
252
+ usageType: z.ZodEnum<{
253
+ custom: "custom";
254
+ input: "input";
255
+ output: "output";
256
+ request: "request";
257
+ reasoning: "reasoning";
258
+ cache_read: "cache_read";
259
+ cache_write: "cache_write";
260
+ embedding: "embedding";
261
+ image_input: "image_input";
262
+ image_output: "image_output";
263
+ audio_input: "audio_input";
264
+ audio_output: "audio_output";
265
+ video_input: "video_input";
266
+ video_output: "video_output";
267
+ }>;
268
+ unit: z.ZodEnum<{
269
+ custom: "custom";
270
+ token: "token";
271
+ character: "character";
272
+ request: "request";
273
+ image: "image";
274
+ audio_second: "audio_second";
275
+ audio_minute: "audio_minute";
276
+ video_second: "video_second";
277
+ video_minute: "video_minute";
278
+ second: "second";
279
+ minute: "minute";
280
+ }>;
281
+ unitQuantity: z.ZodDefault<z.ZodNumber>;
282
+ priceMicros: z.ZodNumber;
283
+ label: z.ZodOptional<z.ZodString>;
284
+ }, z.core.$strict>;
285
+ declare const TelemetryPricingLineItemSchema: z.ZodObject<{
286
+ usageType: z.ZodEnum<{
287
+ custom: "custom";
288
+ input: "input";
289
+ output: "output";
290
+ request: "request";
291
+ reasoning: "reasoning";
292
+ cache_read: "cache_read";
293
+ cache_write: "cache_write";
294
+ embedding: "embedding";
295
+ image_input: "image_input";
296
+ image_output: "image_output";
297
+ audio_input: "audio_input";
298
+ audio_output: "audio_output";
299
+ video_input: "video_input";
300
+ video_output: "video_output";
301
+ }>;
302
+ quantity: z.ZodNumber;
303
+ unit: z.ZodEnum<{
304
+ custom: "custom";
305
+ token: "token";
306
+ character: "character";
307
+ request: "request";
308
+ image: "image";
309
+ audio_second: "audio_second";
310
+ audio_minute: "audio_minute";
311
+ video_second: "video_second";
312
+ video_minute: "video_minute";
313
+ second: "second";
314
+ minute: "minute";
315
+ }>;
316
+ unitQuantity: z.ZodDefault<z.ZodNumber>;
317
+ unitPriceMicros: z.ZodOptional<z.ZodNumber>;
318
+ totalCostMicros: z.ZodOptional<z.ZodNumber>;
319
+ label: z.ZodOptional<z.ZodString>;
320
+ }, z.core.$strict>;
321
+ declare const TelemetryPricingHintSchema: z.ZodObject<{
322
+ source: z.ZodEnum<{
323
+ provider: "provider";
324
+ custom: "custom";
325
+ sdk: "sdk";
326
+ }>;
327
+ currency: z.ZodDefault<z.ZodString>;
328
+ actualCostMicros: z.ZodOptional<z.ZodNumber>;
329
+ lineItems: z.ZodOptional<z.ZodArray<z.ZodObject<{
330
+ usageType: z.ZodEnum<{
331
+ custom: "custom";
332
+ input: "input";
333
+ output: "output";
334
+ request: "request";
335
+ reasoning: "reasoning";
336
+ cache_read: "cache_read";
337
+ cache_write: "cache_write";
338
+ embedding: "embedding";
339
+ image_input: "image_input";
340
+ image_output: "image_output";
341
+ audio_input: "audio_input";
342
+ audio_output: "audio_output";
343
+ video_input: "video_input";
344
+ video_output: "video_output";
345
+ }>;
346
+ quantity: z.ZodNumber;
347
+ unit: z.ZodEnum<{
348
+ custom: "custom";
349
+ token: "token";
350
+ character: "character";
351
+ request: "request";
352
+ image: "image";
353
+ audio_second: "audio_second";
354
+ audio_minute: "audio_minute";
355
+ video_second: "video_second";
356
+ video_minute: "video_minute";
357
+ second: "second";
358
+ minute: "minute";
359
+ }>;
360
+ unitQuantity: z.ZodDefault<z.ZodNumber>;
361
+ unitPriceMicros: z.ZodOptional<z.ZodNumber>;
362
+ totalCostMicros: z.ZodOptional<z.ZodNumber>;
363
+ label: z.ZodOptional<z.ZodString>;
364
+ }, z.core.$strict>>>;
365
+ unitPrices: z.ZodOptional<z.ZodArray<z.ZodObject<{
366
+ usageType: z.ZodEnum<{
367
+ custom: "custom";
368
+ input: "input";
369
+ output: "output";
370
+ request: "request";
371
+ reasoning: "reasoning";
372
+ cache_read: "cache_read";
373
+ cache_write: "cache_write";
374
+ embedding: "embedding";
375
+ image_input: "image_input";
376
+ image_output: "image_output";
377
+ audio_input: "audio_input";
378
+ audio_output: "audio_output";
379
+ video_input: "video_input";
380
+ video_output: "video_output";
381
+ }>;
382
+ unit: z.ZodEnum<{
383
+ custom: "custom";
384
+ token: "token";
385
+ character: "character";
386
+ request: "request";
387
+ image: "image";
388
+ audio_second: "audio_second";
389
+ audio_minute: "audio_minute";
390
+ video_second: "video_second";
391
+ video_minute: "video_minute";
392
+ second: "second";
393
+ minute: "minute";
394
+ }>;
395
+ unitQuantity: z.ZodDefault<z.ZodNumber>;
396
+ priceMicros: z.ZodNumber;
397
+ label: z.ZodOptional<z.ZodString>;
398
+ }, z.core.$strict>>>;
399
+ usageItems: z.ZodOptional<z.ZodArray<z.ZodObject<{
400
+ usageType: z.ZodEnum<{
401
+ custom: "custom";
402
+ input: "input";
403
+ output: "output";
404
+ request: "request";
405
+ reasoning: "reasoning";
406
+ cache_read: "cache_read";
407
+ cache_write: "cache_write";
408
+ embedding: "embedding";
409
+ image_input: "image_input";
410
+ image_output: "image_output";
411
+ audio_input: "audio_input";
412
+ audio_output: "audio_output";
413
+ video_input: "video_input";
414
+ video_output: "video_output";
415
+ }>;
416
+ quantity: z.ZodNumber;
417
+ unit: z.ZodEnum<{
418
+ custom: "custom";
419
+ token: "token";
420
+ character: "character";
421
+ request: "request";
422
+ image: "image";
423
+ audio_second: "audio_second";
424
+ audio_minute: "audio_minute";
425
+ video_second: "video_second";
426
+ video_minute: "video_minute";
427
+ second: "second";
428
+ minute: "minute";
429
+ }>;
430
+ label: z.ZodOptional<z.ZodString>;
431
+ }, z.core.$strict>>>;
432
+ pricingRef: z.ZodOptional<z.ZodString>;
433
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
434
+ }, z.core.$strict>;
165
435
  type KortyxTelemetryService = z.infer<typeof TelemetryServiceSchema>;
166
436
  type KortyxWorkflowTopologyNode = z.infer<typeof WorkflowTopologyNodeSchema>;
167
437
  type KortyxWorkflowTopologyEdge = z.infer<typeof WorkflowTopologyEdgeSchema>;
438
+ type KortyxWorkflowTopologyTransition = z.infer<typeof WorkflowTopologyTransitionSchema>;
168
439
  type EnsureWorkflowTopologyRequest = z.infer<typeof EnsureWorkflowTopologyRequestSchema>;
169
440
  type EnsureWorkflowTopologyResponse = z.infer<typeof EnsureWorkflowTopologyResponseSchema>;
170
441
  type KortyxTelemetryEventType = z.infer<typeof TelemetryEventTypeSchema>;
171
442
  type KortyxTelemetryEvent = z.infer<typeof TelemetryEventSchema>;
443
+ type TelemetryEventBatch = z.infer<typeof TelemetryEventBatchSchema>;
444
+ type TelemetryEventBatchResponse = z.infer<typeof TelemetryEventBatchResponseSchema>;
445
+ type TelemetryPricingSource = z.infer<typeof TelemetryPricingSourceSchema>;
446
+ type TelemetryPricingUnit = z.infer<typeof TelemetryPricingUnitSchema>;
447
+ type TelemetryPricingUsageType = z.infer<typeof TelemetryPricingUsageTypeSchema>;
448
+ type TelemetryUsageItem = z.infer<typeof TelemetryUsageItemSchema>;
449
+ type TelemetryUnitPrice = z.infer<typeof TelemetryUnitPriceSchema>;
450
+ type TelemetryPricingLineItem = z.infer<typeof TelemetryPricingLineItemSchema>;
451
+ type TelemetryPricingHint = z.infer<typeof TelemetryPricingHintSchema>;
452
+ declare const StudioRunStatusSchema: z.ZodEnum<{
453
+ running: "running";
454
+ completed: "completed";
455
+ interrupted: "interrupted";
456
+ incomplete: "incomplete";
457
+ failed: "failed";
458
+ cancelled: "cancelled";
459
+ }>;
460
+ declare const STUDIO_TIME_RANGES: readonly ["Last hour", "24 hours", "7 days", "30 days", "All time", "Custom range"];
461
+ declare const StudioTimeRangeSchema: z.ZodEnum<{
462
+ "Last hour": "Last hour";
463
+ "24 hours": "24 hours";
464
+ "7 days": "7 days";
465
+ "30 days": "30 days";
466
+ "All time": "All time";
467
+ "Custom range": "Custom range";
468
+ }>;
469
+ declare const StudioTimeRangeQuerySchema: z.ZodObject<{
470
+ range: z.ZodOptional<z.ZodEnum<{
471
+ "Last hour": "Last hour";
472
+ "24 hours": "24 hours";
473
+ "7 days": "7 days";
474
+ "30 days": "30 days";
475
+ "All time": "All time";
476
+ "Custom range": "Custom range";
477
+ }>>;
478
+ startedAfter: z.ZodOptional<z.ZodString>;
479
+ startedBefore: z.ZodOptional<z.ZodString>;
480
+ }, z.core.$strict>;
481
+ declare const StudioTimeRangeContextSchema: z.ZodObject<{
482
+ range: z.ZodEnum<{
483
+ "Last hour": "Last hour";
484
+ "24 hours": "24 hours";
485
+ "7 days": "7 days";
486
+ "30 days": "30 days";
487
+ "All time": "All time";
488
+ "Custom range": "Custom range";
489
+ }>;
490
+ startedAfter: z.ZodNullable<z.ZodString>;
491
+ startedBefore: z.ZodNullable<z.ZodString>;
492
+ }, z.core.$strict>;
493
+ type StudioTimeRangeResolution = {
494
+ ok: true;
495
+ value: z.infer<typeof StudioTimeRangeContextSchema>;
496
+ } | {
497
+ ok: false;
498
+ error: string;
499
+ };
500
+ /**
501
+ * Resolves Studio time filters into absolute UTC boundaries.
502
+ *
503
+ * Relative presets are evaluated against `now`. Custom boundaries must be
504
+ * complete ISO timestamps with an explicit offset and are normalized to UTC.
505
+ */
506
+ declare const resolveStudioTimeRange: (input: {
507
+ range?: string | undefined;
508
+ startedAfter?: string | undefined;
509
+ startedBefore?: string | undefined;
510
+ }, now?: Date) => StudioTimeRangeResolution;
511
+ declare const StudioInterruptStatusSchema: z.ZodEnum<{
512
+ failed: "failed";
513
+ cancelled: "cancelled";
514
+ pending: "pending";
515
+ resolved: "resolved";
516
+ expired: "expired";
517
+ }>;
518
+ declare const resolveStudioInterruptStatus: (input: {
519
+ status: z.infer<typeof StudioInterruptStatusSchema>;
520
+ expiresAt?: string | null | undefined;
521
+ }, now?: Date | number) => z.infer<typeof StudioInterruptStatusSchema>;
522
+ declare const StudioInterruptTypeSchema: z.ZodEnum<{
523
+ unknown: "unknown";
524
+ choice: "choice";
525
+ "multi-choice": "multi-choice";
526
+ text: "text";
527
+ }>;
528
+ declare const StudioInterruptInteractionModeSchema: z.ZodEnum<{
529
+ unknown: "unknown";
530
+ "static-options": "static-options";
531
+ "dynamic-picker": "dynamic-picker";
532
+ freeform: "freeform";
533
+ }>;
534
+ declare const StudioInterruptOptionSchema: z.ZodObject<{
535
+ id: z.ZodString;
536
+ label: z.ZodString;
537
+ description: z.ZodNullable<z.ZodString>;
538
+ }, z.core.$strict>;
539
+ declare const StudioResumeOutcomeSchema: z.ZodEnum<{
540
+ cancelled: "cancelled";
541
+ resumed: "resumed";
542
+ "resume failed": "resume failed";
543
+ "expired before resume": "expired before resume";
544
+ }>;
545
+ declare const StudioWorkflowHealthSchema: z.ZodEnum<{
546
+ unknown: "unknown";
547
+ healthy: "healthy";
548
+ degraded: "degraded";
549
+ failing: "failing";
550
+ idle: "idle";
551
+ }>;
552
+ declare const StudioPricingStatusSchema: z.ZodEnum<{
553
+ unknown: "unknown";
554
+ priced: "priced";
555
+ unpriced: "unpriced";
556
+ }>;
557
+ declare const StudioPricingSourceSchema: z.ZodNullable<z.ZodEnum<{
558
+ provider: "provider";
559
+ custom: "custom";
560
+ sdk: "sdk";
561
+ "project-rate-card": "project-rate-card";
562
+ "default-rate-card": "default-rate-card";
563
+ }>>;
564
+ declare const StudioChangeResourceSchema: z.ZodEnum<{
565
+ runs: "runs";
566
+ sessions: "sessions";
567
+ interrupts: "interrupts";
568
+ }>;
569
+ declare const StudioChangeSchema: z.ZodObject<{
570
+ schemaVersion: z.ZodLiteral<1>;
571
+ changeId: z.ZodString;
572
+ emittedAt: z.ZodString;
573
+ organizationId: z.ZodString;
574
+ projectId: z.ZodString;
575
+ resources: z.ZodArray<z.ZodEnum<{
576
+ runs: "runs";
577
+ sessions: "sessions";
578
+ interrupts: "interrupts";
579
+ }>>;
580
+ }, z.core.$strict>;
581
+ declare const StudioMetricSchema: z.ZodObject<{
582
+ runCount: z.ZodNumber;
583
+ successRate: z.ZodNullable<z.ZodNumber>;
584
+ errorRate: z.ZodNullable<z.ZodNumber>;
585
+ retryCount: z.ZodNullable<z.ZodNumber>;
586
+ interruptRate: z.ZodNullable<z.ZodNumber>;
587
+ p50DurationMs: z.ZodNullable<z.ZodNumber>;
588
+ p95DurationMs: z.ZodNullable<z.ZodNumber>;
589
+ averageTokens: z.ZodNullable<z.ZodNumber>;
590
+ averageCost: z.ZodNullable<z.ZodNumber>;
591
+ currency: z.ZodNullable<z.ZodString>;
592
+ }, z.core.$strict>;
593
+ declare const StudioRunSchema: z.ZodObject<{
594
+ id: z.ZodString;
595
+ status: z.ZodEnum<{
596
+ running: "running";
597
+ completed: "completed";
598
+ interrupted: "interrupted";
599
+ incomplete: "incomplete";
600
+ failed: "failed";
601
+ cancelled: "cancelled";
602
+ }>;
603
+ startedAt: z.ZodString;
604
+ endedAt: z.ZodNullable<z.ZodString>;
605
+ workflowId: z.ZodString;
606
+ workflowIds: z.ZodArray<z.ZodString>;
607
+ workflowRefs: z.ZodArray<z.ZodObject<{
608
+ workflowId: z.ZodString;
609
+ workflowRevisionId: z.ZodNullable<z.ZodString>;
610
+ declaredVersion: z.ZodNullable<z.ZodString>;
611
+ }, z.core.$strict>>;
612
+ workflowRevisionId: z.ZodNullable<z.ZodString>;
613
+ declaredVersion: z.ZodNullable<z.ZodString>;
614
+ transitionIds: z.ZodArray<z.ZodString>;
615
+ path: z.ZodArray<z.ZodString>;
616
+ sessionId: z.ZodNullable<z.ZodString>;
617
+ provider: z.ZodNullable<z.ZodString>;
618
+ model: z.ZodNullable<z.ZodString>;
619
+ models: z.ZodArray<z.ZodString>;
620
+ durationMs: z.ZodNullable<z.ZodNumber>;
621
+ tokens: z.ZodNullable<z.ZodNumber>;
622
+ cost: z.ZodNullable<z.ZodNumber>;
623
+ pricingStatus: z.ZodEnum<{
624
+ unknown: "unknown";
625
+ priced: "priced";
626
+ unpriced: "unpriced";
627
+ }>;
628
+ pricingSource: z.ZodNullable<z.ZodEnum<{
629
+ provider: "provider";
630
+ custom: "custom";
631
+ sdk: "sdk";
632
+ "project-rate-card": "project-rate-card";
633
+ "default-rate-card": "default-rate-card";
634
+ }>>;
635
+ currency: z.ZodNullable<z.ZodString>;
636
+ result: z.ZodNullable<z.ZodString>;
637
+ environment: z.ZodString;
638
+ userId: z.ZodNullable<z.ZodString>;
639
+ tenantId: z.ZodNullable<z.ZodString>;
640
+ hasTool: z.ZodBoolean;
641
+ hasRetry: z.ZodBoolean;
642
+ interruptNodeId: z.ZodNullable<z.ZodString>;
643
+ interruptId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
644
+ interruptStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
645
+ failed: "failed";
646
+ cancelled: "cancelled";
647
+ pending: "pending";
648
+ resolved: "resolved";
649
+ expired: "expired";
650
+ }>>>;
651
+ interruptExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
652
+ }, z.core.$strict>;
653
+ declare const StudioSessionSchema: z.ZodObject<{
654
+ id: z.ZodString;
655
+ status: z.ZodEnum<{
656
+ running: "running";
657
+ completed: "completed";
658
+ interrupted: "interrupted";
659
+ incomplete: "incomplete";
660
+ failed: "failed";
661
+ cancelled: "cancelled";
662
+ }>;
663
+ lastActivityAt: z.ZodString;
664
+ workflowIds: z.ZodArray<z.ZodString>;
665
+ workflowCount: z.ZodNumber;
666
+ activeWorkflowId: z.ZodNullable<z.ZodString>;
667
+ activeVersion: z.ZodNullable<z.ZodString>;
668
+ userId: z.ZodNullable<z.ZodString>;
669
+ tenantId: z.ZodNullable<z.ZodString>;
670
+ runs: z.ZodNumber;
671
+ succeeded: z.ZodNumber;
672
+ failed: z.ZodNumber;
673
+ interrupted: z.ZodNumber;
674
+ checkpoints: z.ZodNumber;
675
+ hasFork: z.ZodBoolean;
676
+ durationMs: z.ZodNullable<z.ZodNumber>;
677
+ tokens: z.ZodNullable<z.ZodNumber>;
678
+ cost: z.ZodNullable<z.ZodNumber>;
679
+ pricingStatus: z.ZodEnum<{
680
+ unknown: "unknown";
681
+ priced: "priced";
682
+ unpriced: "unpriced";
683
+ }>;
684
+ pricingSource: z.ZodNullable<z.ZodEnum<{
685
+ provider: "provider";
686
+ custom: "custom";
687
+ sdk: "sdk";
688
+ "project-rate-card": "project-rate-card";
689
+ "default-rate-card": "default-rate-card";
690
+ }>>;
691
+ currency: z.ZodNullable<z.ZodString>;
692
+ latestResult: z.ZodNullable<z.ZodString>;
693
+ latestError: z.ZodNullable<z.ZodString>;
694
+ pendingInterruptId: z.ZodNullable<z.ZodString>;
695
+ interruptStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
696
+ failed: "failed";
697
+ cancelled: "cancelled";
698
+ pending: "pending";
699
+ resolved: "resolved";
700
+ expired: "expired";
701
+ }>>>;
702
+ interruptExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
703
+ providers: z.ZodArray<z.ZodString>;
704
+ models: z.ZodArray<z.ZodString>;
705
+ tags: z.ZodArray<z.ZodString>;
706
+ environment: z.ZodString;
707
+ }, z.core.$strict>;
708
+ declare const StudioInterruptSchema: z.ZodObject<{
709
+ id: z.ZodString;
710
+ status: z.ZodEnum<{
711
+ failed: "failed";
712
+ cancelled: "cancelled";
713
+ pending: "pending";
714
+ resolved: "resolved";
715
+ expired: "expired";
716
+ }>;
717
+ type: z.ZodEnum<{
718
+ unknown: "unknown";
719
+ choice: "choice";
720
+ "multi-choice": "multi-choice";
721
+ text: "text";
722
+ }>;
723
+ interactionMode: z.ZodEnum<{
724
+ unknown: "unknown";
725
+ "static-options": "static-options";
726
+ "dynamic-picker": "dynamic-picker";
727
+ freeform: "freeform";
728
+ }>;
729
+ schemaId: z.ZodNullable<z.ZodString>;
730
+ schemaVersion: z.ZodNullable<z.ZodString>;
731
+ createdAt: z.ZodString;
732
+ resolvedAt: z.ZodNullable<z.ZodString>;
733
+ expiresAt: z.ZodNullable<z.ZodString>;
734
+ question: z.ZodNullable<z.ZodString>;
735
+ contentCaptured: z.ZodBoolean;
736
+ optionCount: z.ZodNullable<z.ZodNumber>;
737
+ options: z.ZodNullable<z.ZodArray<z.ZodObject<{
738
+ id: z.ZodString;
739
+ label: z.ZodString;
740
+ description: z.ZodNullable<z.ZodString>;
741
+ }, z.core.$strict>>>;
742
+ workflowId: z.ZodString;
743
+ nodeId: z.ZodNullable<z.ZodString>;
744
+ sessionId: z.ZodNullable<z.ZodString>;
745
+ userId: z.ZodNullable<z.ZodString>;
746
+ tenantId: z.ZodNullable<z.ZodString>;
747
+ response: z.ZodNullable<z.ZodString>;
748
+ responseCaptured: z.ZodBoolean;
749
+ resumeOutcome: z.ZodNullable<z.ZodEnum<{
750
+ cancelled: "cancelled";
751
+ resumed: "resumed";
752
+ "resume failed": "resume failed";
753
+ "expired before resume": "expired before resume";
754
+ }>>;
755
+ resumeError: z.ZodNullable<z.ZodString>;
756
+ runId: z.ZodString;
757
+ resumeToken: z.ZodNullable<z.ZodString>;
758
+ resolvedBy: z.ZodNullable<z.ZodString>;
759
+ environment: z.ZodString;
760
+ }, z.core.$strict>;
761
+ declare const StudioDetailEventSchema: z.ZodObject<{
762
+ id: z.ZodString;
763
+ type: z.ZodEnum<{
764
+ "span.started": "span.started";
765
+ "span.ended": "span.ended";
766
+ "span.failed": "span.failed";
767
+ "generation.completed": "generation.completed";
768
+ "tool.started": "tool.started";
769
+ "tool.completed": "tool.completed";
770
+ "tool.failed": "tool.failed";
771
+ "interrupt.created": "interrupt.created";
772
+ "interrupt.resolved": "interrupt.resolved";
773
+ "interrupt.expired": "interrupt.expired";
774
+ "interrupt.cancelled": "interrupt.cancelled";
775
+ "run.cancelled": "run.cancelled";
776
+ "workflow.transitioned": "workflow.transitioned";
777
+ "session.checkpointed": "session.checkpointed";
778
+ "session.forked": "session.forked";
779
+ "session.rolled_back": "session.rolled_back";
780
+ }>;
781
+ occurredAt: z.ZodString;
782
+ receivedAt: z.ZodString;
783
+ environment: z.ZodString;
784
+ serviceName: z.ZodString;
785
+ deploymentRef: z.ZodNullable<z.ZodString>;
786
+ traceId: z.ZodNullable<z.ZodString>;
787
+ spanId: z.ZodNullable<z.ZodString>;
788
+ parentSpanId: z.ZodNullable<z.ZodString>;
789
+ runId: z.ZodString;
790
+ sessionId: z.ZodNullable<z.ZodString>;
791
+ workflowId: z.ZodString;
792
+ workflowRevisionId: z.ZodNullable<z.ZodString>;
793
+ nodeId: z.ZodNullable<z.ZodString>;
794
+ userId: z.ZodNullable<z.ZodString>;
795
+ tenantId: z.ZodNullable<z.ZodString>;
796
+ tags: z.ZodArray<z.ZodString>;
797
+ metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
798
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
799
+ }, z.core.$strict>;
800
+ declare const StudioWorkflowNodeSchema: z.ZodObject<{
801
+ id: z.ZodString;
802
+ label: z.ZodString;
803
+ type: z.ZodNullable<z.ZodString>;
804
+ state: z.ZodNullable<z.ZodEnum<{
805
+ interrupted: "interrupted";
806
+ failed: "failed";
807
+ healthy: "healthy";
808
+ warning: "warning";
809
+ retried: "retried";
810
+ }>>;
811
+ provider: z.ZodNullable<z.ZodString>;
812
+ model: z.ZodNullable<z.ZodString>;
813
+ metrics: z.ZodObject<{
814
+ runCount: z.ZodNumber;
815
+ successRate: z.ZodNullable<z.ZodNumber>;
816
+ errorRate: z.ZodNullable<z.ZodNumber>;
817
+ retryCount: z.ZodNullable<z.ZodNumber>;
818
+ interruptRate: z.ZodNullable<z.ZodNumber>;
819
+ p50DurationMs: z.ZodNullable<z.ZodNumber>;
820
+ p95DurationMs: z.ZodNullable<z.ZodNumber>;
821
+ averageTokens: z.ZodNullable<z.ZodNumber>;
822
+ averageCost: z.ZodNullable<z.ZodNumber>;
823
+ currency: z.ZodNullable<z.ZodString>;
824
+ }, z.core.$strict>;
825
+ }, z.core.$strict>;
826
+ declare const StudioWorkflowInternalEdgeSchema: z.ZodObject<{
827
+ id: z.ZodString;
828
+ source: z.ZodString;
829
+ target: z.ZodString;
830
+ condition: z.ZodNullable<z.ZodString>;
831
+ }, z.core.$strict>;
832
+ declare const StudioWorkflowTransitionSchema: z.ZodObject<{
833
+ id: z.ZodString;
834
+ sourceWorkflowId: z.ZodString;
835
+ sourceNodeId: z.ZodNullable<z.ZodString>;
836
+ targetWorkflowId: z.ZodString;
837
+ condition: z.ZodNullable<z.ZodString>;
838
+ volume: z.ZodNumber;
839
+ successRate: z.ZodNullable<z.ZodNumber>;
840
+ medianDurationMs: z.ZodNullable<z.ZodNumber>;
841
+ errorRate: z.ZodNullable<z.ZodNumber>;
842
+ }, z.core.$strict>;
843
+ declare const StudioWorkflowSchema: z.ZodObject<{
844
+ id: z.ZodString;
845
+ name: z.ZodString;
846
+ description: z.ZodNullable<z.ZodString>;
847
+ versions: z.ZodArray<z.ZodString>;
848
+ activeVersion: z.ZodNullable<z.ZodString>;
849
+ activeRevisionId: z.ZodNullable<z.ZodString>;
850
+ health: z.ZodEnum<{
851
+ unknown: "unknown";
852
+ healthy: "healthy";
853
+ degraded: "degraded";
854
+ failing: "failing";
855
+ idle: "idle";
856
+ }>;
857
+ tags: z.ZodArray<z.ZodString>;
858
+ lastActivityAt: z.ZodNullable<z.ZodString>;
859
+ metrics: z.ZodObject<{
860
+ runCount: z.ZodNumber;
861
+ successRate: z.ZodNullable<z.ZodNumber>;
862
+ errorRate: z.ZodNullable<z.ZodNumber>;
863
+ retryCount: z.ZodNullable<z.ZodNumber>;
864
+ interruptRate: z.ZodNullable<z.ZodNumber>;
865
+ p50DurationMs: z.ZodNullable<z.ZodNumber>;
866
+ p95DurationMs: z.ZodNullable<z.ZodNumber>;
867
+ averageTokens: z.ZodNullable<z.ZodNumber>;
868
+ averageCost: z.ZodNullable<z.ZodNumber>;
869
+ currency: z.ZodNullable<z.ZodString>;
870
+ }, z.core.$strict>;
871
+ nodes: z.ZodArray<z.ZodObject<{
872
+ id: z.ZodString;
873
+ label: z.ZodString;
874
+ type: z.ZodNullable<z.ZodString>;
875
+ state: z.ZodNullable<z.ZodEnum<{
876
+ interrupted: "interrupted";
877
+ failed: "failed";
878
+ healthy: "healthy";
879
+ warning: "warning";
880
+ retried: "retried";
881
+ }>>;
882
+ provider: z.ZodNullable<z.ZodString>;
883
+ model: z.ZodNullable<z.ZodString>;
884
+ metrics: z.ZodObject<{
885
+ runCount: z.ZodNumber;
886
+ successRate: z.ZodNullable<z.ZodNumber>;
887
+ errorRate: z.ZodNullable<z.ZodNumber>;
888
+ retryCount: z.ZodNullable<z.ZodNumber>;
889
+ interruptRate: z.ZodNullable<z.ZodNumber>;
890
+ p50DurationMs: z.ZodNullable<z.ZodNumber>;
891
+ p95DurationMs: z.ZodNullable<z.ZodNumber>;
892
+ averageTokens: z.ZodNullable<z.ZodNumber>;
893
+ averageCost: z.ZodNullable<z.ZodNumber>;
894
+ currency: z.ZodNullable<z.ZodString>;
895
+ }, z.core.$strict>;
896
+ }, z.core.$strict>>;
897
+ internalEdges: z.ZodArray<z.ZodObject<{
898
+ id: z.ZodString;
899
+ source: z.ZodString;
900
+ target: z.ZodString;
901
+ condition: z.ZodNullable<z.ZodString>;
902
+ }, z.core.$strict>>;
903
+ }, z.core.$strict>;
904
+ declare const StudioRunsResponseSchema: z.ZodObject<{
905
+ runs: z.ZodArray<z.ZodObject<{
906
+ id: z.ZodString;
907
+ status: z.ZodEnum<{
908
+ running: "running";
909
+ completed: "completed";
910
+ interrupted: "interrupted";
911
+ incomplete: "incomplete";
912
+ failed: "failed";
913
+ cancelled: "cancelled";
914
+ }>;
915
+ startedAt: z.ZodString;
916
+ endedAt: z.ZodNullable<z.ZodString>;
917
+ workflowId: z.ZodString;
918
+ workflowIds: z.ZodArray<z.ZodString>;
919
+ workflowRefs: z.ZodArray<z.ZodObject<{
920
+ workflowId: z.ZodString;
921
+ workflowRevisionId: z.ZodNullable<z.ZodString>;
922
+ declaredVersion: z.ZodNullable<z.ZodString>;
923
+ }, z.core.$strict>>;
924
+ workflowRevisionId: z.ZodNullable<z.ZodString>;
925
+ declaredVersion: z.ZodNullable<z.ZodString>;
926
+ transitionIds: z.ZodArray<z.ZodString>;
927
+ path: z.ZodArray<z.ZodString>;
928
+ sessionId: z.ZodNullable<z.ZodString>;
929
+ provider: z.ZodNullable<z.ZodString>;
930
+ model: z.ZodNullable<z.ZodString>;
931
+ models: z.ZodArray<z.ZodString>;
932
+ durationMs: z.ZodNullable<z.ZodNumber>;
933
+ tokens: z.ZodNullable<z.ZodNumber>;
934
+ cost: z.ZodNullable<z.ZodNumber>;
935
+ pricingStatus: z.ZodEnum<{
936
+ unknown: "unknown";
937
+ priced: "priced";
938
+ unpriced: "unpriced";
939
+ }>;
940
+ pricingSource: z.ZodNullable<z.ZodEnum<{
941
+ provider: "provider";
942
+ custom: "custom";
943
+ sdk: "sdk";
944
+ "project-rate-card": "project-rate-card";
945
+ "default-rate-card": "default-rate-card";
946
+ }>>;
947
+ currency: z.ZodNullable<z.ZodString>;
948
+ result: z.ZodNullable<z.ZodString>;
949
+ environment: z.ZodString;
950
+ userId: z.ZodNullable<z.ZodString>;
951
+ tenantId: z.ZodNullable<z.ZodString>;
952
+ hasTool: z.ZodBoolean;
953
+ hasRetry: z.ZodBoolean;
954
+ interruptNodeId: z.ZodNullable<z.ZodString>;
955
+ interruptId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
956
+ interruptStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
957
+ failed: "failed";
958
+ cancelled: "cancelled";
959
+ pending: "pending";
960
+ resolved: "resolved";
961
+ expired: "expired";
962
+ }>>>;
963
+ interruptExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
964
+ }, z.core.$strict>>;
965
+ totalCount: z.ZodNumber;
966
+ }, z.core.$strict>;
967
+ declare const StudioSessionsResponseSchema: z.ZodObject<{
968
+ sessions: z.ZodArray<z.ZodObject<{
969
+ id: z.ZodString;
970
+ status: z.ZodEnum<{
971
+ running: "running";
972
+ completed: "completed";
973
+ interrupted: "interrupted";
974
+ incomplete: "incomplete";
975
+ failed: "failed";
976
+ cancelled: "cancelled";
977
+ }>;
978
+ lastActivityAt: z.ZodString;
979
+ workflowIds: z.ZodArray<z.ZodString>;
980
+ workflowCount: z.ZodNumber;
981
+ activeWorkflowId: z.ZodNullable<z.ZodString>;
982
+ activeVersion: z.ZodNullable<z.ZodString>;
983
+ userId: z.ZodNullable<z.ZodString>;
984
+ tenantId: z.ZodNullable<z.ZodString>;
985
+ runs: z.ZodNumber;
986
+ succeeded: z.ZodNumber;
987
+ failed: z.ZodNumber;
988
+ interrupted: z.ZodNumber;
989
+ checkpoints: z.ZodNumber;
990
+ hasFork: z.ZodBoolean;
991
+ durationMs: z.ZodNullable<z.ZodNumber>;
992
+ tokens: z.ZodNullable<z.ZodNumber>;
993
+ cost: z.ZodNullable<z.ZodNumber>;
994
+ pricingStatus: z.ZodEnum<{
995
+ unknown: "unknown";
996
+ priced: "priced";
997
+ unpriced: "unpriced";
998
+ }>;
999
+ pricingSource: z.ZodNullable<z.ZodEnum<{
1000
+ provider: "provider";
1001
+ custom: "custom";
1002
+ sdk: "sdk";
1003
+ "project-rate-card": "project-rate-card";
1004
+ "default-rate-card": "default-rate-card";
1005
+ }>>;
1006
+ currency: z.ZodNullable<z.ZodString>;
1007
+ latestResult: z.ZodNullable<z.ZodString>;
1008
+ latestError: z.ZodNullable<z.ZodString>;
1009
+ pendingInterruptId: z.ZodNullable<z.ZodString>;
1010
+ interruptStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1011
+ failed: "failed";
1012
+ cancelled: "cancelled";
1013
+ pending: "pending";
1014
+ resolved: "resolved";
1015
+ expired: "expired";
1016
+ }>>>;
1017
+ interruptExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1018
+ providers: z.ZodArray<z.ZodString>;
1019
+ models: z.ZodArray<z.ZodString>;
1020
+ tags: z.ZodArray<z.ZodString>;
1021
+ environment: z.ZodString;
1022
+ }, z.core.$strict>>;
1023
+ totalCount: z.ZodNumber;
1024
+ }, z.core.$strict>;
1025
+ declare const StudioInterruptsResponseSchema: z.ZodObject<{
1026
+ interrupts: z.ZodArray<z.ZodObject<{
1027
+ id: z.ZodString;
1028
+ status: z.ZodEnum<{
1029
+ failed: "failed";
1030
+ cancelled: "cancelled";
1031
+ pending: "pending";
1032
+ resolved: "resolved";
1033
+ expired: "expired";
1034
+ }>;
1035
+ type: z.ZodEnum<{
1036
+ unknown: "unknown";
1037
+ choice: "choice";
1038
+ "multi-choice": "multi-choice";
1039
+ text: "text";
1040
+ }>;
1041
+ interactionMode: z.ZodEnum<{
1042
+ unknown: "unknown";
1043
+ "static-options": "static-options";
1044
+ "dynamic-picker": "dynamic-picker";
1045
+ freeform: "freeform";
1046
+ }>;
1047
+ schemaId: z.ZodNullable<z.ZodString>;
1048
+ schemaVersion: z.ZodNullable<z.ZodString>;
1049
+ createdAt: z.ZodString;
1050
+ resolvedAt: z.ZodNullable<z.ZodString>;
1051
+ expiresAt: z.ZodNullable<z.ZodString>;
1052
+ question: z.ZodNullable<z.ZodString>;
1053
+ contentCaptured: z.ZodBoolean;
1054
+ optionCount: z.ZodNullable<z.ZodNumber>;
1055
+ options: z.ZodNullable<z.ZodArray<z.ZodObject<{
1056
+ id: z.ZodString;
1057
+ label: z.ZodString;
1058
+ description: z.ZodNullable<z.ZodString>;
1059
+ }, z.core.$strict>>>;
1060
+ workflowId: z.ZodString;
1061
+ nodeId: z.ZodNullable<z.ZodString>;
1062
+ sessionId: z.ZodNullable<z.ZodString>;
1063
+ userId: z.ZodNullable<z.ZodString>;
1064
+ tenantId: z.ZodNullable<z.ZodString>;
1065
+ response: z.ZodNullable<z.ZodString>;
1066
+ responseCaptured: z.ZodBoolean;
1067
+ resumeOutcome: z.ZodNullable<z.ZodEnum<{
1068
+ cancelled: "cancelled";
1069
+ resumed: "resumed";
1070
+ "resume failed": "resume failed";
1071
+ "expired before resume": "expired before resume";
1072
+ }>>;
1073
+ resumeError: z.ZodNullable<z.ZodString>;
1074
+ runId: z.ZodString;
1075
+ resumeToken: z.ZodNullable<z.ZodString>;
1076
+ resolvedBy: z.ZodNullable<z.ZodString>;
1077
+ environment: z.ZodString;
1078
+ }, z.core.$strict>>;
1079
+ totalCount: z.ZodNumber;
1080
+ }, z.core.$strict>;
1081
+ declare const StudioRunDetailResponseSchema: z.ZodObject<{
1082
+ run: z.ZodObject<{
1083
+ id: z.ZodString;
1084
+ status: z.ZodEnum<{
1085
+ running: "running";
1086
+ completed: "completed";
1087
+ interrupted: "interrupted";
1088
+ incomplete: "incomplete";
1089
+ failed: "failed";
1090
+ cancelled: "cancelled";
1091
+ }>;
1092
+ startedAt: z.ZodString;
1093
+ endedAt: z.ZodNullable<z.ZodString>;
1094
+ workflowId: z.ZodString;
1095
+ workflowIds: z.ZodArray<z.ZodString>;
1096
+ workflowRefs: z.ZodArray<z.ZodObject<{
1097
+ workflowId: z.ZodString;
1098
+ workflowRevisionId: z.ZodNullable<z.ZodString>;
1099
+ declaredVersion: z.ZodNullable<z.ZodString>;
1100
+ }, z.core.$strict>>;
1101
+ workflowRevisionId: z.ZodNullable<z.ZodString>;
1102
+ declaredVersion: z.ZodNullable<z.ZodString>;
1103
+ transitionIds: z.ZodArray<z.ZodString>;
1104
+ path: z.ZodArray<z.ZodString>;
1105
+ sessionId: z.ZodNullable<z.ZodString>;
1106
+ provider: z.ZodNullable<z.ZodString>;
1107
+ model: z.ZodNullable<z.ZodString>;
1108
+ models: z.ZodArray<z.ZodString>;
1109
+ durationMs: z.ZodNullable<z.ZodNumber>;
1110
+ tokens: z.ZodNullable<z.ZodNumber>;
1111
+ cost: z.ZodNullable<z.ZodNumber>;
1112
+ pricingStatus: z.ZodEnum<{
1113
+ unknown: "unknown";
1114
+ priced: "priced";
1115
+ unpriced: "unpriced";
1116
+ }>;
1117
+ pricingSource: z.ZodNullable<z.ZodEnum<{
1118
+ provider: "provider";
1119
+ custom: "custom";
1120
+ sdk: "sdk";
1121
+ "project-rate-card": "project-rate-card";
1122
+ "default-rate-card": "default-rate-card";
1123
+ }>>;
1124
+ currency: z.ZodNullable<z.ZodString>;
1125
+ result: z.ZodNullable<z.ZodString>;
1126
+ environment: z.ZodString;
1127
+ userId: z.ZodNullable<z.ZodString>;
1128
+ tenantId: z.ZodNullable<z.ZodString>;
1129
+ hasTool: z.ZodBoolean;
1130
+ hasRetry: z.ZodBoolean;
1131
+ interruptNodeId: z.ZodNullable<z.ZodString>;
1132
+ interruptId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1133
+ interruptStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1134
+ failed: "failed";
1135
+ cancelled: "cancelled";
1136
+ pending: "pending";
1137
+ resolved: "resolved";
1138
+ expired: "expired";
1139
+ }>>>;
1140
+ interruptExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1141
+ }, z.core.$strict>;
1142
+ events: z.ZodArray<z.ZodObject<{
1143
+ id: z.ZodString;
1144
+ type: z.ZodEnum<{
1145
+ "span.started": "span.started";
1146
+ "span.ended": "span.ended";
1147
+ "span.failed": "span.failed";
1148
+ "generation.completed": "generation.completed";
1149
+ "tool.started": "tool.started";
1150
+ "tool.completed": "tool.completed";
1151
+ "tool.failed": "tool.failed";
1152
+ "interrupt.created": "interrupt.created";
1153
+ "interrupt.resolved": "interrupt.resolved";
1154
+ "interrupt.expired": "interrupt.expired";
1155
+ "interrupt.cancelled": "interrupt.cancelled";
1156
+ "run.cancelled": "run.cancelled";
1157
+ "workflow.transitioned": "workflow.transitioned";
1158
+ "session.checkpointed": "session.checkpointed";
1159
+ "session.forked": "session.forked";
1160
+ "session.rolled_back": "session.rolled_back";
1161
+ }>;
1162
+ occurredAt: z.ZodString;
1163
+ receivedAt: z.ZodString;
1164
+ environment: z.ZodString;
1165
+ serviceName: z.ZodString;
1166
+ deploymentRef: z.ZodNullable<z.ZodString>;
1167
+ traceId: z.ZodNullable<z.ZodString>;
1168
+ spanId: z.ZodNullable<z.ZodString>;
1169
+ parentSpanId: z.ZodNullable<z.ZodString>;
1170
+ runId: z.ZodString;
1171
+ sessionId: z.ZodNullable<z.ZodString>;
1172
+ workflowId: z.ZodString;
1173
+ workflowRevisionId: z.ZodNullable<z.ZodString>;
1174
+ nodeId: z.ZodNullable<z.ZodString>;
1175
+ userId: z.ZodNullable<z.ZodString>;
1176
+ tenantId: z.ZodNullable<z.ZodString>;
1177
+ tags: z.ZodArray<z.ZodString>;
1178
+ metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1179
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1180
+ }, z.core.$strict>>;
1181
+ session: z.ZodNullable<z.ZodObject<{
1182
+ id: z.ZodString;
1183
+ status: z.ZodEnum<{
1184
+ running: "running";
1185
+ completed: "completed";
1186
+ interrupted: "interrupted";
1187
+ incomplete: "incomplete";
1188
+ failed: "failed";
1189
+ cancelled: "cancelled";
1190
+ }>;
1191
+ lastActivityAt: z.ZodString;
1192
+ workflowIds: z.ZodArray<z.ZodString>;
1193
+ workflowCount: z.ZodNumber;
1194
+ activeWorkflowId: z.ZodNullable<z.ZodString>;
1195
+ activeVersion: z.ZodNullable<z.ZodString>;
1196
+ userId: z.ZodNullable<z.ZodString>;
1197
+ tenantId: z.ZodNullable<z.ZodString>;
1198
+ runs: z.ZodNumber;
1199
+ succeeded: z.ZodNumber;
1200
+ failed: z.ZodNumber;
1201
+ interrupted: z.ZodNumber;
1202
+ checkpoints: z.ZodNumber;
1203
+ hasFork: z.ZodBoolean;
1204
+ durationMs: z.ZodNullable<z.ZodNumber>;
1205
+ tokens: z.ZodNullable<z.ZodNumber>;
1206
+ cost: z.ZodNullable<z.ZodNumber>;
1207
+ pricingStatus: z.ZodEnum<{
1208
+ unknown: "unknown";
1209
+ priced: "priced";
1210
+ unpriced: "unpriced";
1211
+ }>;
1212
+ pricingSource: z.ZodNullable<z.ZodEnum<{
1213
+ provider: "provider";
1214
+ custom: "custom";
1215
+ sdk: "sdk";
1216
+ "project-rate-card": "project-rate-card";
1217
+ "default-rate-card": "default-rate-card";
1218
+ }>>;
1219
+ currency: z.ZodNullable<z.ZodString>;
1220
+ latestResult: z.ZodNullable<z.ZodString>;
1221
+ latestError: z.ZodNullable<z.ZodString>;
1222
+ pendingInterruptId: z.ZodNullable<z.ZodString>;
1223
+ interruptStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1224
+ failed: "failed";
1225
+ cancelled: "cancelled";
1226
+ pending: "pending";
1227
+ resolved: "resolved";
1228
+ expired: "expired";
1229
+ }>>>;
1230
+ interruptExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1231
+ providers: z.ZodArray<z.ZodString>;
1232
+ models: z.ZodArray<z.ZodString>;
1233
+ tags: z.ZodArray<z.ZodString>;
1234
+ environment: z.ZodString;
1235
+ }, z.core.$strict>>;
1236
+ interrupts: z.ZodArray<z.ZodObject<{
1237
+ id: z.ZodString;
1238
+ status: z.ZodEnum<{
1239
+ failed: "failed";
1240
+ cancelled: "cancelled";
1241
+ pending: "pending";
1242
+ resolved: "resolved";
1243
+ expired: "expired";
1244
+ }>;
1245
+ type: z.ZodEnum<{
1246
+ unknown: "unknown";
1247
+ choice: "choice";
1248
+ "multi-choice": "multi-choice";
1249
+ text: "text";
1250
+ }>;
1251
+ interactionMode: z.ZodEnum<{
1252
+ unknown: "unknown";
1253
+ "static-options": "static-options";
1254
+ "dynamic-picker": "dynamic-picker";
1255
+ freeform: "freeform";
1256
+ }>;
1257
+ schemaId: z.ZodNullable<z.ZodString>;
1258
+ schemaVersion: z.ZodNullable<z.ZodString>;
1259
+ createdAt: z.ZodString;
1260
+ resolvedAt: z.ZodNullable<z.ZodString>;
1261
+ expiresAt: z.ZodNullable<z.ZodString>;
1262
+ question: z.ZodNullable<z.ZodString>;
1263
+ contentCaptured: z.ZodBoolean;
1264
+ optionCount: z.ZodNullable<z.ZodNumber>;
1265
+ options: z.ZodNullable<z.ZodArray<z.ZodObject<{
1266
+ id: z.ZodString;
1267
+ label: z.ZodString;
1268
+ description: z.ZodNullable<z.ZodString>;
1269
+ }, z.core.$strict>>>;
1270
+ workflowId: z.ZodString;
1271
+ nodeId: z.ZodNullable<z.ZodString>;
1272
+ sessionId: z.ZodNullable<z.ZodString>;
1273
+ userId: z.ZodNullable<z.ZodString>;
1274
+ tenantId: z.ZodNullable<z.ZodString>;
1275
+ response: z.ZodNullable<z.ZodString>;
1276
+ responseCaptured: z.ZodBoolean;
1277
+ resumeOutcome: z.ZodNullable<z.ZodEnum<{
1278
+ cancelled: "cancelled";
1279
+ resumed: "resumed";
1280
+ "resume failed": "resume failed";
1281
+ "expired before resume": "expired before resume";
1282
+ }>>;
1283
+ resumeError: z.ZodNullable<z.ZodString>;
1284
+ runId: z.ZodString;
1285
+ resumeToken: z.ZodNullable<z.ZodString>;
1286
+ resolvedBy: z.ZodNullable<z.ZodString>;
1287
+ environment: z.ZodString;
1288
+ }, z.core.$strict>>;
1289
+ updatedAt: z.ZodString;
1290
+ }, z.core.$strict>;
1291
+ declare const StudioSessionDetailResponseSchema: z.ZodObject<{
1292
+ session: z.ZodObject<{
1293
+ id: z.ZodString;
1294
+ status: z.ZodEnum<{
1295
+ running: "running";
1296
+ completed: "completed";
1297
+ interrupted: "interrupted";
1298
+ incomplete: "incomplete";
1299
+ failed: "failed";
1300
+ cancelled: "cancelled";
1301
+ }>;
1302
+ lastActivityAt: z.ZodString;
1303
+ workflowIds: z.ZodArray<z.ZodString>;
1304
+ workflowCount: z.ZodNumber;
1305
+ activeWorkflowId: z.ZodNullable<z.ZodString>;
1306
+ activeVersion: z.ZodNullable<z.ZodString>;
1307
+ userId: z.ZodNullable<z.ZodString>;
1308
+ tenantId: z.ZodNullable<z.ZodString>;
1309
+ runs: z.ZodNumber;
1310
+ succeeded: z.ZodNumber;
1311
+ failed: z.ZodNumber;
1312
+ interrupted: z.ZodNumber;
1313
+ checkpoints: z.ZodNumber;
1314
+ hasFork: z.ZodBoolean;
1315
+ durationMs: z.ZodNullable<z.ZodNumber>;
1316
+ tokens: z.ZodNullable<z.ZodNumber>;
1317
+ cost: z.ZodNullable<z.ZodNumber>;
1318
+ pricingStatus: z.ZodEnum<{
1319
+ unknown: "unknown";
1320
+ priced: "priced";
1321
+ unpriced: "unpriced";
1322
+ }>;
1323
+ pricingSource: z.ZodNullable<z.ZodEnum<{
1324
+ provider: "provider";
1325
+ custom: "custom";
1326
+ sdk: "sdk";
1327
+ "project-rate-card": "project-rate-card";
1328
+ "default-rate-card": "default-rate-card";
1329
+ }>>;
1330
+ currency: z.ZodNullable<z.ZodString>;
1331
+ latestResult: z.ZodNullable<z.ZodString>;
1332
+ latestError: z.ZodNullable<z.ZodString>;
1333
+ pendingInterruptId: z.ZodNullable<z.ZodString>;
1334
+ interruptStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1335
+ failed: "failed";
1336
+ cancelled: "cancelled";
1337
+ pending: "pending";
1338
+ resolved: "resolved";
1339
+ expired: "expired";
1340
+ }>>>;
1341
+ interruptExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1342
+ providers: z.ZodArray<z.ZodString>;
1343
+ models: z.ZodArray<z.ZodString>;
1344
+ tags: z.ZodArray<z.ZodString>;
1345
+ environment: z.ZodString;
1346
+ }, z.core.$strict>;
1347
+ runs: z.ZodArray<z.ZodObject<{
1348
+ id: z.ZodString;
1349
+ status: z.ZodEnum<{
1350
+ running: "running";
1351
+ completed: "completed";
1352
+ interrupted: "interrupted";
1353
+ incomplete: "incomplete";
1354
+ failed: "failed";
1355
+ cancelled: "cancelled";
1356
+ }>;
1357
+ startedAt: z.ZodString;
1358
+ endedAt: z.ZodNullable<z.ZodString>;
1359
+ workflowId: z.ZodString;
1360
+ workflowIds: z.ZodArray<z.ZodString>;
1361
+ workflowRefs: z.ZodArray<z.ZodObject<{
1362
+ workflowId: z.ZodString;
1363
+ workflowRevisionId: z.ZodNullable<z.ZodString>;
1364
+ declaredVersion: z.ZodNullable<z.ZodString>;
1365
+ }, z.core.$strict>>;
1366
+ workflowRevisionId: z.ZodNullable<z.ZodString>;
1367
+ declaredVersion: z.ZodNullable<z.ZodString>;
1368
+ transitionIds: z.ZodArray<z.ZodString>;
1369
+ path: z.ZodArray<z.ZodString>;
1370
+ sessionId: z.ZodNullable<z.ZodString>;
1371
+ provider: z.ZodNullable<z.ZodString>;
1372
+ model: z.ZodNullable<z.ZodString>;
1373
+ models: z.ZodArray<z.ZodString>;
1374
+ durationMs: z.ZodNullable<z.ZodNumber>;
1375
+ tokens: z.ZodNullable<z.ZodNumber>;
1376
+ cost: z.ZodNullable<z.ZodNumber>;
1377
+ pricingStatus: z.ZodEnum<{
1378
+ unknown: "unknown";
1379
+ priced: "priced";
1380
+ unpriced: "unpriced";
1381
+ }>;
1382
+ pricingSource: z.ZodNullable<z.ZodEnum<{
1383
+ provider: "provider";
1384
+ custom: "custom";
1385
+ sdk: "sdk";
1386
+ "project-rate-card": "project-rate-card";
1387
+ "default-rate-card": "default-rate-card";
1388
+ }>>;
1389
+ currency: z.ZodNullable<z.ZodString>;
1390
+ result: z.ZodNullable<z.ZodString>;
1391
+ environment: z.ZodString;
1392
+ userId: z.ZodNullable<z.ZodString>;
1393
+ tenantId: z.ZodNullable<z.ZodString>;
1394
+ hasTool: z.ZodBoolean;
1395
+ hasRetry: z.ZodBoolean;
1396
+ interruptNodeId: z.ZodNullable<z.ZodString>;
1397
+ interruptId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1398
+ interruptStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1399
+ failed: "failed";
1400
+ cancelled: "cancelled";
1401
+ pending: "pending";
1402
+ resolved: "resolved";
1403
+ expired: "expired";
1404
+ }>>>;
1405
+ interruptExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1406
+ }, z.core.$strict>>;
1407
+ events: z.ZodArray<z.ZodObject<{
1408
+ id: z.ZodString;
1409
+ type: z.ZodEnum<{
1410
+ "span.started": "span.started";
1411
+ "span.ended": "span.ended";
1412
+ "span.failed": "span.failed";
1413
+ "generation.completed": "generation.completed";
1414
+ "tool.started": "tool.started";
1415
+ "tool.completed": "tool.completed";
1416
+ "tool.failed": "tool.failed";
1417
+ "interrupt.created": "interrupt.created";
1418
+ "interrupt.resolved": "interrupt.resolved";
1419
+ "interrupt.expired": "interrupt.expired";
1420
+ "interrupt.cancelled": "interrupt.cancelled";
1421
+ "run.cancelled": "run.cancelled";
1422
+ "workflow.transitioned": "workflow.transitioned";
1423
+ "session.checkpointed": "session.checkpointed";
1424
+ "session.forked": "session.forked";
1425
+ "session.rolled_back": "session.rolled_back";
1426
+ }>;
1427
+ occurredAt: z.ZodString;
1428
+ receivedAt: z.ZodString;
1429
+ environment: z.ZodString;
1430
+ serviceName: z.ZodString;
1431
+ deploymentRef: z.ZodNullable<z.ZodString>;
1432
+ traceId: z.ZodNullable<z.ZodString>;
1433
+ spanId: z.ZodNullable<z.ZodString>;
1434
+ parentSpanId: z.ZodNullable<z.ZodString>;
1435
+ runId: z.ZodString;
1436
+ sessionId: z.ZodNullable<z.ZodString>;
1437
+ workflowId: z.ZodString;
1438
+ workflowRevisionId: z.ZodNullable<z.ZodString>;
1439
+ nodeId: z.ZodNullable<z.ZodString>;
1440
+ userId: z.ZodNullable<z.ZodString>;
1441
+ tenantId: z.ZodNullable<z.ZodString>;
1442
+ tags: z.ZodArray<z.ZodString>;
1443
+ metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1444
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1445
+ }, z.core.$strict>>;
1446
+ interrupts: z.ZodArray<z.ZodObject<{
1447
+ id: z.ZodString;
1448
+ status: z.ZodEnum<{
1449
+ failed: "failed";
1450
+ cancelled: "cancelled";
1451
+ pending: "pending";
1452
+ resolved: "resolved";
1453
+ expired: "expired";
1454
+ }>;
1455
+ type: z.ZodEnum<{
1456
+ unknown: "unknown";
1457
+ choice: "choice";
1458
+ "multi-choice": "multi-choice";
1459
+ text: "text";
1460
+ }>;
1461
+ interactionMode: z.ZodEnum<{
1462
+ unknown: "unknown";
1463
+ "static-options": "static-options";
1464
+ "dynamic-picker": "dynamic-picker";
1465
+ freeform: "freeform";
1466
+ }>;
1467
+ schemaId: z.ZodNullable<z.ZodString>;
1468
+ schemaVersion: z.ZodNullable<z.ZodString>;
1469
+ createdAt: z.ZodString;
1470
+ resolvedAt: z.ZodNullable<z.ZodString>;
1471
+ expiresAt: z.ZodNullable<z.ZodString>;
1472
+ question: z.ZodNullable<z.ZodString>;
1473
+ contentCaptured: z.ZodBoolean;
1474
+ optionCount: z.ZodNullable<z.ZodNumber>;
1475
+ options: z.ZodNullable<z.ZodArray<z.ZodObject<{
1476
+ id: z.ZodString;
1477
+ label: z.ZodString;
1478
+ description: z.ZodNullable<z.ZodString>;
1479
+ }, z.core.$strict>>>;
1480
+ workflowId: z.ZodString;
1481
+ nodeId: z.ZodNullable<z.ZodString>;
1482
+ sessionId: z.ZodNullable<z.ZodString>;
1483
+ userId: z.ZodNullable<z.ZodString>;
1484
+ tenantId: z.ZodNullable<z.ZodString>;
1485
+ response: z.ZodNullable<z.ZodString>;
1486
+ responseCaptured: z.ZodBoolean;
1487
+ resumeOutcome: z.ZodNullable<z.ZodEnum<{
1488
+ cancelled: "cancelled";
1489
+ resumed: "resumed";
1490
+ "resume failed": "resume failed";
1491
+ "expired before resume": "expired before resume";
1492
+ }>>;
1493
+ resumeError: z.ZodNullable<z.ZodString>;
1494
+ runId: z.ZodString;
1495
+ resumeToken: z.ZodNullable<z.ZodString>;
1496
+ resolvedBy: z.ZodNullable<z.ZodString>;
1497
+ environment: z.ZodString;
1498
+ }, z.core.$strict>>;
1499
+ updatedAt: z.ZodString;
1500
+ }, z.core.$strict>;
1501
+ declare const StudioInterruptDetailResponseSchema: z.ZodObject<{
1502
+ interrupt: z.ZodObject<{
1503
+ id: z.ZodString;
1504
+ status: z.ZodEnum<{
1505
+ failed: "failed";
1506
+ cancelled: "cancelled";
1507
+ pending: "pending";
1508
+ resolved: "resolved";
1509
+ expired: "expired";
1510
+ }>;
1511
+ type: z.ZodEnum<{
1512
+ unknown: "unknown";
1513
+ choice: "choice";
1514
+ "multi-choice": "multi-choice";
1515
+ text: "text";
1516
+ }>;
1517
+ interactionMode: z.ZodEnum<{
1518
+ unknown: "unknown";
1519
+ "static-options": "static-options";
1520
+ "dynamic-picker": "dynamic-picker";
1521
+ freeform: "freeform";
1522
+ }>;
1523
+ schemaId: z.ZodNullable<z.ZodString>;
1524
+ schemaVersion: z.ZodNullable<z.ZodString>;
1525
+ createdAt: z.ZodString;
1526
+ resolvedAt: z.ZodNullable<z.ZodString>;
1527
+ expiresAt: z.ZodNullable<z.ZodString>;
1528
+ question: z.ZodNullable<z.ZodString>;
1529
+ contentCaptured: z.ZodBoolean;
1530
+ optionCount: z.ZodNullable<z.ZodNumber>;
1531
+ options: z.ZodNullable<z.ZodArray<z.ZodObject<{
1532
+ id: z.ZodString;
1533
+ label: z.ZodString;
1534
+ description: z.ZodNullable<z.ZodString>;
1535
+ }, z.core.$strict>>>;
1536
+ workflowId: z.ZodString;
1537
+ nodeId: z.ZodNullable<z.ZodString>;
1538
+ sessionId: z.ZodNullable<z.ZodString>;
1539
+ userId: z.ZodNullable<z.ZodString>;
1540
+ tenantId: z.ZodNullable<z.ZodString>;
1541
+ response: z.ZodNullable<z.ZodString>;
1542
+ responseCaptured: z.ZodBoolean;
1543
+ resumeOutcome: z.ZodNullable<z.ZodEnum<{
1544
+ cancelled: "cancelled";
1545
+ resumed: "resumed";
1546
+ "resume failed": "resume failed";
1547
+ "expired before resume": "expired before resume";
1548
+ }>>;
1549
+ resumeError: z.ZodNullable<z.ZodString>;
1550
+ runId: z.ZodString;
1551
+ resumeToken: z.ZodNullable<z.ZodString>;
1552
+ resolvedBy: z.ZodNullable<z.ZodString>;
1553
+ environment: z.ZodString;
1554
+ }, z.core.$strict>;
1555
+ events: z.ZodArray<z.ZodObject<{
1556
+ id: z.ZodString;
1557
+ type: z.ZodEnum<{
1558
+ "span.started": "span.started";
1559
+ "span.ended": "span.ended";
1560
+ "span.failed": "span.failed";
1561
+ "generation.completed": "generation.completed";
1562
+ "tool.started": "tool.started";
1563
+ "tool.completed": "tool.completed";
1564
+ "tool.failed": "tool.failed";
1565
+ "interrupt.created": "interrupt.created";
1566
+ "interrupt.resolved": "interrupt.resolved";
1567
+ "interrupt.expired": "interrupt.expired";
1568
+ "interrupt.cancelled": "interrupt.cancelled";
1569
+ "run.cancelled": "run.cancelled";
1570
+ "workflow.transitioned": "workflow.transitioned";
1571
+ "session.checkpointed": "session.checkpointed";
1572
+ "session.forked": "session.forked";
1573
+ "session.rolled_back": "session.rolled_back";
1574
+ }>;
1575
+ occurredAt: z.ZodString;
1576
+ receivedAt: z.ZodString;
1577
+ environment: z.ZodString;
1578
+ serviceName: z.ZodString;
1579
+ deploymentRef: z.ZodNullable<z.ZodString>;
1580
+ traceId: z.ZodNullable<z.ZodString>;
1581
+ spanId: z.ZodNullable<z.ZodString>;
1582
+ parentSpanId: z.ZodNullable<z.ZodString>;
1583
+ runId: z.ZodString;
1584
+ sessionId: z.ZodNullable<z.ZodString>;
1585
+ workflowId: z.ZodString;
1586
+ workflowRevisionId: z.ZodNullable<z.ZodString>;
1587
+ nodeId: z.ZodNullable<z.ZodString>;
1588
+ userId: z.ZodNullable<z.ZodString>;
1589
+ tenantId: z.ZodNullable<z.ZodString>;
1590
+ tags: z.ZodArray<z.ZodString>;
1591
+ metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1592
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1593
+ }, z.core.$strict>>;
1594
+ run: z.ZodNullable<z.ZodObject<{
1595
+ id: z.ZodString;
1596
+ status: z.ZodEnum<{
1597
+ running: "running";
1598
+ completed: "completed";
1599
+ interrupted: "interrupted";
1600
+ incomplete: "incomplete";
1601
+ failed: "failed";
1602
+ cancelled: "cancelled";
1603
+ }>;
1604
+ startedAt: z.ZodString;
1605
+ endedAt: z.ZodNullable<z.ZodString>;
1606
+ workflowId: z.ZodString;
1607
+ workflowIds: z.ZodArray<z.ZodString>;
1608
+ workflowRefs: z.ZodArray<z.ZodObject<{
1609
+ workflowId: z.ZodString;
1610
+ workflowRevisionId: z.ZodNullable<z.ZodString>;
1611
+ declaredVersion: z.ZodNullable<z.ZodString>;
1612
+ }, z.core.$strict>>;
1613
+ workflowRevisionId: z.ZodNullable<z.ZodString>;
1614
+ declaredVersion: z.ZodNullable<z.ZodString>;
1615
+ transitionIds: z.ZodArray<z.ZodString>;
1616
+ path: z.ZodArray<z.ZodString>;
1617
+ sessionId: z.ZodNullable<z.ZodString>;
1618
+ provider: z.ZodNullable<z.ZodString>;
1619
+ model: z.ZodNullable<z.ZodString>;
1620
+ models: z.ZodArray<z.ZodString>;
1621
+ durationMs: z.ZodNullable<z.ZodNumber>;
1622
+ tokens: z.ZodNullable<z.ZodNumber>;
1623
+ cost: z.ZodNullable<z.ZodNumber>;
1624
+ pricingStatus: z.ZodEnum<{
1625
+ unknown: "unknown";
1626
+ priced: "priced";
1627
+ unpriced: "unpriced";
1628
+ }>;
1629
+ pricingSource: z.ZodNullable<z.ZodEnum<{
1630
+ provider: "provider";
1631
+ custom: "custom";
1632
+ sdk: "sdk";
1633
+ "project-rate-card": "project-rate-card";
1634
+ "default-rate-card": "default-rate-card";
1635
+ }>>;
1636
+ currency: z.ZodNullable<z.ZodString>;
1637
+ result: z.ZodNullable<z.ZodString>;
1638
+ environment: z.ZodString;
1639
+ userId: z.ZodNullable<z.ZodString>;
1640
+ tenantId: z.ZodNullable<z.ZodString>;
1641
+ hasTool: z.ZodBoolean;
1642
+ hasRetry: z.ZodBoolean;
1643
+ interruptNodeId: z.ZodNullable<z.ZodString>;
1644
+ interruptId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1645
+ interruptStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1646
+ failed: "failed";
1647
+ cancelled: "cancelled";
1648
+ pending: "pending";
1649
+ resolved: "resolved";
1650
+ expired: "expired";
1651
+ }>>>;
1652
+ interruptExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1653
+ }, z.core.$strict>>;
1654
+ session: z.ZodNullable<z.ZodObject<{
1655
+ id: z.ZodString;
1656
+ status: z.ZodEnum<{
1657
+ running: "running";
1658
+ completed: "completed";
1659
+ interrupted: "interrupted";
1660
+ incomplete: "incomplete";
1661
+ failed: "failed";
1662
+ cancelled: "cancelled";
1663
+ }>;
1664
+ lastActivityAt: z.ZodString;
1665
+ workflowIds: z.ZodArray<z.ZodString>;
1666
+ workflowCount: z.ZodNumber;
1667
+ activeWorkflowId: z.ZodNullable<z.ZodString>;
1668
+ activeVersion: z.ZodNullable<z.ZodString>;
1669
+ userId: z.ZodNullable<z.ZodString>;
1670
+ tenantId: z.ZodNullable<z.ZodString>;
1671
+ runs: z.ZodNumber;
1672
+ succeeded: z.ZodNumber;
1673
+ failed: z.ZodNumber;
1674
+ interrupted: z.ZodNumber;
1675
+ checkpoints: z.ZodNumber;
1676
+ hasFork: z.ZodBoolean;
1677
+ durationMs: z.ZodNullable<z.ZodNumber>;
1678
+ tokens: z.ZodNullable<z.ZodNumber>;
1679
+ cost: z.ZodNullable<z.ZodNumber>;
1680
+ pricingStatus: z.ZodEnum<{
1681
+ unknown: "unknown";
1682
+ priced: "priced";
1683
+ unpriced: "unpriced";
1684
+ }>;
1685
+ pricingSource: z.ZodNullable<z.ZodEnum<{
1686
+ provider: "provider";
1687
+ custom: "custom";
1688
+ sdk: "sdk";
1689
+ "project-rate-card": "project-rate-card";
1690
+ "default-rate-card": "default-rate-card";
1691
+ }>>;
1692
+ currency: z.ZodNullable<z.ZodString>;
1693
+ latestResult: z.ZodNullable<z.ZodString>;
1694
+ latestError: z.ZodNullable<z.ZodString>;
1695
+ pendingInterruptId: z.ZodNullable<z.ZodString>;
1696
+ interruptStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1697
+ failed: "failed";
1698
+ cancelled: "cancelled";
1699
+ pending: "pending";
1700
+ resolved: "resolved";
1701
+ expired: "expired";
1702
+ }>>>;
1703
+ interruptExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1704
+ providers: z.ZodArray<z.ZodString>;
1705
+ models: z.ZodArray<z.ZodString>;
1706
+ tags: z.ZodArray<z.ZodString>;
1707
+ environment: z.ZodString;
1708
+ }, z.core.$strict>>;
1709
+ updatedAt: z.ZodString;
1710
+ }, z.core.$strict>;
1711
+ declare const StudioWorkflowsResponseSchema: z.ZodObject<{
1712
+ workflows: z.ZodArray<z.ZodObject<{
1713
+ id: z.ZodString;
1714
+ name: z.ZodString;
1715
+ description: z.ZodNullable<z.ZodString>;
1716
+ versions: z.ZodArray<z.ZodString>;
1717
+ activeVersion: z.ZodNullable<z.ZodString>;
1718
+ activeRevisionId: z.ZodNullable<z.ZodString>;
1719
+ health: z.ZodEnum<{
1720
+ unknown: "unknown";
1721
+ healthy: "healthy";
1722
+ degraded: "degraded";
1723
+ failing: "failing";
1724
+ idle: "idle";
1725
+ }>;
1726
+ tags: z.ZodArray<z.ZodString>;
1727
+ lastActivityAt: z.ZodNullable<z.ZodString>;
1728
+ metrics: z.ZodObject<{
1729
+ runCount: z.ZodNumber;
1730
+ successRate: z.ZodNullable<z.ZodNumber>;
1731
+ errorRate: z.ZodNullable<z.ZodNumber>;
1732
+ retryCount: z.ZodNullable<z.ZodNumber>;
1733
+ interruptRate: z.ZodNullable<z.ZodNumber>;
1734
+ p50DurationMs: z.ZodNullable<z.ZodNumber>;
1735
+ p95DurationMs: z.ZodNullable<z.ZodNumber>;
1736
+ averageTokens: z.ZodNullable<z.ZodNumber>;
1737
+ averageCost: z.ZodNullable<z.ZodNumber>;
1738
+ currency: z.ZodNullable<z.ZodString>;
1739
+ }, z.core.$strict>;
1740
+ nodes: z.ZodArray<z.ZodObject<{
1741
+ id: z.ZodString;
1742
+ label: z.ZodString;
1743
+ type: z.ZodNullable<z.ZodString>;
1744
+ state: z.ZodNullable<z.ZodEnum<{
1745
+ interrupted: "interrupted";
1746
+ failed: "failed";
1747
+ healthy: "healthy";
1748
+ warning: "warning";
1749
+ retried: "retried";
1750
+ }>>;
1751
+ provider: z.ZodNullable<z.ZodString>;
1752
+ model: z.ZodNullable<z.ZodString>;
1753
+ metrics: z.ZodObject<{
1754
+ runCount: z.ZodNumber;
1755
+ successRate: z.ZodNullable<z.ZodNumber>;
1756
+ errorRate: z.ZodNullable<z.ZodNumber>;
1757
+ retryCount: z.ZodNullable<z.ZodNumber>;
1758
+ interruptRate: z.ZodNullable<z.ZodNumber>;
1759
+ p50DurationMs: z.ZodNullable<z.ZodNumber>;
1760
+ p95DurationMs: z.ZodNullable<z.ZodNumber>;
1761
+ averageTokens: z.ZodNullable<z.ZodNumber>;
1762
+ averageCost: z.ZodNullable<z.ZodNumber>;
1763
+ currency: z.ZodNullable<z.ZodString>;
1764
+ }, z.core.$strict>;
1765
+ }, z.core.$strict>>;
1766
+ internalEdges: z.ZodArray<z.ZodObject<{
1767
+ id: z.ZodString;
1768
+ source: z.ZodString;
1769
+ target: z.ZodString;
1770
+ condition: z.ZodNullable<z.ZodString>;
1771
+ }, z.core.$strict>>;
1772
+ }, z.core.$strict>>;
1773
+ transitions: z.ZodArray<z.ZodObject<{
1774
+ id: z.ZodString;
1775
+ sourceWorkflowId: z.ZodString;
1776
+ sourceNodeId: z.ZodNullable<z.ZodString>;
1777
+ targetWorkflowId: z.ZodString;
1778
+ condition: z.ZodNullable<z.ZodString>;
1779
+ volume: z.ZodNumber;
1780
+ successRate: z.ZodNullable<z.ZodNumber>;
1781
+ medianDurationMs: z.ZodNullable<z.ZodNumber>;
1782
+ errorRate: z.ZodNullable<z.ZodNumber>;
1783
+ }, z.core.$strict>>;
1784
+ cohort: z.ZodObject<{
1785
+ range: z.ZodEnum<{
1786
+ "Last hour": "Last hour";
1787
+ "24 hours": "24 hours";
1788
+ "7 days": "7 days";
1789
+ "30 days": "30 days";
1790
+ "All time": "All time";
1791
+ "Custom range": "Custom range";
1792
+ }>;
1793
+ startedAfter: z.ZodNullable<z.ZodString>;
1794
+ startedBefore: z.ZodNullable<z.ZodString>;
1795
+ workflowId: z.ZodNullable<z.ZodString>;
1796
+ version: z.ZodNullable<z.ZodString>;
1797
+ }, z.core.$strict>;
1798
+ }, z.core.$strict>;
1799
+ declare const StudioCatalogsResponseSchema: z.ZodObject<{
1800
+ environments: z.ZodArray<z.ZodString>;
1801
+ providers: z.ZodArray<z.ZodString>;
1802
+ models: z.ZodArray<z.ZodString>;
1803
+ workflows: z.ZodArray<z.ZodString>;
1804
+ tags: z.ZodArray<z.ZodString>;
1805
+ }, z.core.$strict>;
1806
+ declare const StudioContextResponseSchema: z.ZodObject<{
1807
+ organization: z.ZodObject<{
1808
+ name: z.ZodString;
1809
+ }, z.core.$strict>;
1810
+ project: z.ZodObject<{
1811
+ name: z.ZodString;
1812
+ }, z.core.$strict>;
1813
+ environments: z.ZodArray<z.ZodString>;
1814
+ apiKey: z.ZodObject<{
1815
+ mode: z.ZodEnum<{
1816
+ test: "test";
1817
+ live: "live";
1818
+ }>;
1819
+ scopes: z.ZodArray<z.ZodString>;
1820
+ }, z.core.$strict>;
1821
+ api: z.ZodObject<{
1822
+ status: z.ZodLiteral<"ok">;
1823
+ service: z.ZodLiteral<"kortyx-api">;
1824
+ version: z.ZodString;
1825
+ }, z.core.$strict>;
1826
+ }, z.core.$strict>;
1827
+ type StudioRunStatus = z.infer<typeof StudioRunStatusSchema>;
1828
+ type StudioTimeRange = z.infer<typeof StudioTimeRangeSchema>;
1829
+ type StudioTimeRangeContext = z.infer<typeof StudioTimeRangeContextSchema>;
1830
+ type StudioInterruptStatus = z.infer<typeof StudioInterruptStatusSchema>;
1831
+ type StudioInterruptType = z.infer<typeof StudioInterruptTypeSchema>;
1832
+ type StudioInterruptInteractionMode = z.infer<typeof StudioInterruptInteractionModeSchema>;
1833
+ type StudioInterruptOption = z.infer<typeof StudioInterruptOptionSchema>;
1834
+ type StudioResumeOutcome = z.infer<typeof StudioResumeOutcomeSchema>;
1835
+ type StudioWorkflowHealth = z.infer<typeof StudioWorkflowHealthSchema>;
1836
+ type StudioPricingStatus = z.infer<typeof StudioPricingStatusSchema>;
1837
+ type StudioPricingSource = z.infer<typeof StudioPricingSourceSchema>;
1838
+ type StudioChangeResource = z.infer<typeof StudioChangeResourceSchema>;
1839
+ type StudioChange = z.infer<typeof StudioChangeSchema>;
1840
+ type StudioMetric = z.infer<typeof StudioMetricSchema>;
1841
+ type StudioRun = z.infer<typeof StudioRunSchema>;
1842
+ type StudioSession = z.infer<typeof StudioSessionSchema>;
1843
+ type StudioInterrupt = z.infer<typeof StudioInterruptSchema>;
1844
+ type StudioWorkflowNode = z.infer<typeof StudioWorkflowNodeSchema>;
1845
+ type StudioWorkflowInternalEdge = z.infer<typeof StudioWorkflowInternalEdgeSchema>;
1846
+ type StudioWorkflowTransition = z.infer<typeof StudioWorkflowTransitionSchema>;
1847
+ type StudioWorkflow = z.infer<typeof StudioWorkflowSchema>;
1848
+ type StudioRunsResponse = z.infer<typeof StudioRunsResponseSchema>;
1849
+ type StudioSessionsResponse = z.infer<typeof StudioSessionsResponseSchema>;
1850
+ type StudioInterruptsResponse = z.infer<typeof StudioInterruptsResponseSchema>;
1851
+ type StudioDetailEvent = z.infer<typeof StudioDetailEventSchema>;
1852
+ type StudioRunDetailResponse = z.infer<typeof StudioRunDetailResponseSchema>;
1853
+ type StudioSessionDetailResponse = z.infer<typeof StudioSessionDetailResponseSchema>;
1854
+ type StudioInterruptDetailResponse = z.infer<typeof StudioInterruptDetailResponseSchema>;
1855
+ type StudioWorkflowsResponse = z.infer<typeof StudioWorkflowsResponseSchema>;
1856
+ type StudioCatalogsResponse = z.infer<typeof StudioCatalogsResponseSchema>;
1857
+ type StudioContextResponse = z.infer<typeof StudioContextResponseSchema>;
172
1858
 
173
- export { type EnsureWorkflowTopologyRequest, EnsureWorkflowTopologyRequestSchema, type EnsureWorkflowTopologyResponse, EnsureWorkflowTopologyResponseSchema, type KortyxTelemetryEvent, type KortyxTelemetryEventType, type KortyxTelemetryService, type KortyxWorkflowTopologyEdge, type KortyxWorkflowTopologyNode, TELEMETRY_EVENT_TYPES, TelemetryEventBatchSchema, TelemetryEventSchema, TelemetryEventTypeSchema, TelemetryServiceSchema, WorkflowTopologyEdgeSchema, WorkflowTopologyNodeSchema };
1859
+ export { type EnsureWorkflowTopologyRequest, EnsureWorkflowTopologyRequestSchema, type EnsureWorkflowTopologyResponse, EnsureWorkflowTopologyResponseSchema, type KortyxTelemetryEvent, type KortyxTelemetryEventType, type KortyxTelemetryService, type KortyxWorkflowTopologyEdge, type KortyxWorkflowTopologyNode, type KortyxWorkflowTopologyTransition, STUDIO_TIME_RANGES, type StudioCatalogsResponse, StudioCatalogsResponseSchema, type StudioChange, type StudioChangeResource, StudioChangeResourceSchema, StudioChangeSchema, type StudioContextResponse, StudioContextResponseSchema, type StudioDetailEvent, StudioDetailEventSchema, type StudioInterrupt, type StudioInterruptDetailResponse, StudioInterruptDetailResponseSchema, type StudioInterruptInteractionMode, StudioInterruptInteractionModeSchema, type StudioInterruptOption, StudioInterruptOptionSchema, StudioInterruptSchema, type StudioInterruptStatus, StudioInterruptStatusSchema, type StudioInterruptType, StudioInterruptTypeSchema, type StudioInterruptsResponse, StudioInterruptsResponseSchema, type StudioMetric, StudioMetricSchema, type StudioPricingSource, StudioPricingSourceSchema, type StudioPricingStatus, StudioPricingStatusSchema, type StudioResumeOutcome, StudioResumeOutcomeSchema, type StudioRun, type StudioRunDetailResponse, StudioRunDetailResponseSchema, StudioRunSchema, type StudioRunStatus, StudioRunStatusSchema, type StudioRunsResponse, StudioRunsResponseSchema, type StudioSession, type StudioSessionDetailResponse, StudioSessionDetailResponseSchema, StudioSessionSchema, type StudioSessionsResponse, StudioSessionsResponseSchema, type StudioTimeRange, type StudioTimeRangeContext, StudioTimeRangeContextSchema, StudioTimeRangeQuerySchema, type StudioTimeRangeResolution, StudioTimeRangeSchema, type StudioWorkflow, type StudioWorkflowHealth, StudioWorkflowHealthSchema, type StudioWorkflowInternalEdge, StudioWorkflowInternalEdgeSchema, type StudioWorkflowNode, StudioWorkflowNodeSchema, StudioWorkflowSchema, type StudioWorkflowTransition, StudioWorkflowTransitionSchema, type StudioWorkflowsResponse, StudioWorkflowsResponseSchema, TELEMETRY_EVENT_TYPES, type TelemetryEventBatch, type TelemetryEventBatchResponse, TelemetryEventBatchResponseSchema, TelemetryEventBatchSchema, TelemetryEventSchema, TelemetryEventTypeSchema, type TelemetryPricingHint, TelemetryPricingHintSchema, type TelemetryPricingLineItem, TelemetryPricingLineItemSchema, type TelemetryPricingSource, TelemetryPricingSourceSchema, type TelemetryPricingUnit, TelemetryPricingUnitSchema, type TelemetryPricingUsageType, TelemetryPricingUsageTypeSchema, TelemetryServiceSchema, type TelemetryUnitPrice, TelemetryUnitPriceSchema, type TelemetryUsageItem, TelemetryUsageItemSchema, WorkflowTopologyEdgeSchema, WorkflowTopologyNodeSchema, WorkflowTopologyTransitionSchema, resolveStudioInterruptStatus, resolveStudioTimeRange };