@kortyx/telemetry-contracts 0.7.0 → 0.9.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
@@ -1,5 +1,317 @@
1
1
  import { z } from 'zod';
2
2
 
3
+ declare const FEEDBACK_FILTERS: readonly ["positive", "negative", "unrated"];
4
+ declare const FeedbackSummarySchema: z.ZodObject<{
5
+ positive: z.ZodNumber;
6
+ negative: z.ZodNumber;
7
+ }, z.core.$strict>;
8
+ declare const FeedbackReasonSchema: z.ZodEnum<{
9
+ incomplete: "incomplete";
10
+ incorrect: "incorrect";
11
+ irrelevant: "irrelevant";
12
+ unsafe: "unsafe";
13
+ other: "other";
14
+ }>;
15
+ declare const ReviewVerdictSchema: z.ZodEnum<{
16
+ incorrect: "incorrect";
17
+ correct: "correct";
18
+ "partially-correct": "partially-correct";
19
+ }>;
20
+ declare const UserFeedbackRequestSchema: z.ZodObject<{
21
+ runId: z.ZodString;
22
+ actorId: z.ZodString;
23
+ value: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>;
24
+ reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<{
25
+ incomplete: "incomplete";
26
+ incorrect: "incorrect";
27
+ irrelevant: "irrelevant";
28
+ unsafe: "unsafe";
29
+ other: "other";
30
+ }>>>;
31
+ comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32
+ }, z.core.$strict>;
33
+ declare const ClearUserFeedbackRequestSchema: z.ZodObject<{
34
+ runId: z.ZodString;
35
+ actorId: z.ZodString;
36
+ }, z.core.$strict>;
37
+ declare const StudioReviewRequestSchema: z.ZodObject<{
38
+ value: z.ZodEnum<{
39
+ incorrect: "incorrect";
40
+ correct: "correct";
41
+ "partially-correct": "partially-correct";
42
+ }>;
43
+ comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
+ }, z.core.$strict>;
45
+ declare const StudioScoreSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
46
+ id: z.ZodString;
47
+ target: z.ZodObject<{
48
+ type: z.ZodLiteral<"run">;
49
+ runId: z.ZodString;
50
+ }, z.core.$strict>;
51
+ environment: z.ZodString;
52
+ name: z.ZodString;
53
+ source: z.ZodEnum<{
54
+ "end-user": "end-user";
55
+ "human-review": "human-review";
56
+ evaluator: "evaluator";
57
+ }>;
58
+ actorId: z.ZodString;
59
+ reasons: z.ZodArray<z.ZodEnum<{
60
+ incomplete: "incomplete";
61
+ incorrect: "incorrect";
62
+ irrelevant: "irrelevant";
63
+ unsafe: "unsafe";
64
+ other: "other";
65
+ }>>;
66
+ comment: z.ZodNullable<z.ZodString>;
67
+ createdAt: z.ZodString;
68
+ updatedAt: z.ZodString;
69
+ dataType: z.ZodLiteral<"BOOLEAN">;
70
+ value: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>;
71
+ }, z.core.$strict>, z.ZodObject<{
72
+ id: z.ZodString;
73
+ target: z.ZodObject<{
74
+ type: z.ZodLiteral<"run">;
75
+ runId: z.ZodString;
76
+ }, z.core.$strict>;
77
+ environment: z.ZodString;
78
+ name: z.ZodString;
79
+ source: z.ZodEnum<{
80
+ "end-user": "end-user";
81
+ "human-review": "human-review";
82
+ evaluator: "evaluator";
83
+ }>;
84
+ actorId: z.ZodString;
85
+ reasons: z.ZodArray<z.ZodEnum<{
86
+ incomplete: "incomplete";
87
+ incorrect: "incorrect";
88
+ irrelevant: "irrelevant";
89
+ unsafe: "unsafe";
90
+ other: "other";
91
+ }>>;
92
+ comment: z.ZodNullable<z.ZodString>;
93
+ createdAt: z.ZodString;
94
+ updatedAt: z.ZodString;
95
+ dataType: z.ZodLiteral<"CATEGORICAL">;
96
+ value: z.ZodString;
97
+ }, z.core.$strict>, z.ZodObject<{
98
+ id: z.ZodString;
99
+ target: z.ZodObject<{
100
+ type: z.ZodLiteral<"run">;
101
+ runId: z.ZodString;
102
+ }, z.core.$strict>;
103
+ environment: z.ZodString;
104
+ name: z.ZodString;
105
+ source: z.ZodEnum<{
106
+ "end-user": "end-user";
107
+ "human-review": "human-review";
108
+ evaluator: "evaluator";
109
+ }>;
110
+ actorId: z.ZodString;
111
+ reasons: z.ZodArray<z.ZodEnum<{
112
+ incomplete: "incomplete";
113
+ incorrect: "incorrect";
114
+ irrelevant: "irrelevant";
115
+ unsafe: "unsafe";
116
+ other: "other";
117
+ }>>;
118
+ comment: z.ZodNullable<z.ZodString>;
119
+ createdAt: z.ZodString;
120
+ updatedAt: z.ZodString;
121
+ dataType: z.ZodLiteral<"NUMERIC">;
122
+ value: z.ZodNumber;
123
+ }, z.core.$strict>], "dataType">;
124
+ declare const StudioScoreResponseSchema: z.ZodObject<{
125
+ score: z.ZodDiscriminatedUnion<[z.ZodObject<{
126
+ id: z.ZodString;
127
+ target: z.ZodObject<{
128
+ type: z.ZodLiteral<"run">;
129
+ runId: z.ZodString;
130
+ }, z.core.$strict>;
131
+ environment: z.ZodString;
132
+ name: z.ZodString;
133
+ source: z.ZodEnum<{
134
+ "end-user": "end-user";
135
+ "human-review": "human-review";
136
+ evaluator: "evaluator";
137
+ }>;
138
+ actorId: z.ZodString;
139
+ reasons: z.ZodArray<z.ZodEnum<{
140
+ incomplete: "incomplete";
141
+ incorrect: "incorrect";
142
+ irrelevant: "irrelevant";
143
+ unsafe: "unsafe";
144
+ other: "other";
145
+ }>>;
146
+ comment: z.ZodNullable<z.ZodString>;
147
+ createdAt: z.ZodString;
148
+ updatedAt: z.ZodString;
149
+ dataType: z.ZodLiteral<"BOOLEAN">;
150
+ value: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>;
151
+ }, z.core.$strict>, z.ZodObject<{
152
+ id: z.ZodString;
153
+ target: z.ZodObject<{
154
+ type: z.ZodLiteral<"run">;
155
+ runId: z.ZodString;
156
+ }, z.core.$strict>;
157
+ environment: z.ZodString;
158
+ name: z.ZodString;
159
+ source: z.ZodEnum<{
160
+ "end-user": "end-user";
161
+ "human-review": "human-review";
162
+ evaluator: "evaluator";
163
+ }>;
164
+ actorId: z.ZodString;
165
+ reasons: z.ZodArray<z.ZodEnum<{
166
+ incomplete: "incomplete";
167
+ incorrect: "incorrect";
168
+ irrelevant: "irrelevant";
169
+ unsafe: "unsafe";
170
+ other: "other";
171
+ }>>;
172
+ comment: z.ZodNullable<z.ZodString>;
173
+ createdAt: z.ZodString;
174
+ updatedAt: z.ZodString;
175
+ dataType: z.ZodLiteral<"CATEGORICAL">;
176
+ value: z.ZodString;
177
+ }, z.core.$strict>, z.ZodObject<{
178
+ id: z.ZodString;
179
+ target: z.ZodObject<{
180
+ type: z.ZodLiteral<"run">;
181
+ runId: z.ZodString;
182
+ }, z.core.$strict>;
183
+ environment: z.ZodString;
184
+ name: z.ZodString;
185
+ source: z.ZodEnum<{
186
+ "end-user": "end-user";
187
+ "human-review": "human-review";
188
+ evaluator: "evaluator";
189
+ }>;
190
+ actorId: z.ZodString;
191
+ reasons: z.ZodArray<z.ZodEnum<{
192
+ incomplete: "incomplete";
193
+ incorrect: "incorrect";
194
+ irrelevant: "irrelevant";
195
+ unsafe: "unsafe";
196
+ other: "other";
197
+ }>>;
198
+ comment: z.ZodNullable<z.ZodString>;
199
+ createdAt: z.ZodString;
200
+ updatedAt: z.ZodString;
201
+ dataType: z.ZodLiteral<"NUMERIC">;
202
+ value: z.ZodNumber;
203
+ }, z.core.$strict>], "dataType">;
204
+ }, z.core.$strict>;
205
+ declare const ClearScoreResponseSchema: z.ZodObject<{
206
+ ok: z.ZodLiteral<true>;
207
+ }, z.core.$strict>;
208
+ type FeedbackSummary = z.infer<typeof FeedbackSummarySchema>;
209
+ type StudioScore = z.infer<typeof StudioScoreSchema>;
210
+ type UserFeedbackRequest = z.infer<typeof UserFeedbackRequestSchema>;
211
+ type StudioReviewRequest = z.infer<typeof StudioReviewRequestSchema>;
212
+ declare function summarizeUserFeedback(scores: readonly StudioScore[]): FeedbackSummary;
213
+
214
+ declare const ToolOutcomeSchema: z.ZodEnum<{
215
+ success: "success";
216
+ cancelled: "cancelled";
217
+ denied: "denied";
218
+ fault: "fault";
219
+ }>;
220
+ declare const ToolObservationSchema: z.ZodObject<{
221
+ version: z.ZodLiteral<1>;
222
+ name: z.ZodString;
223
+ toolCallId: z.ZodString;
224
+ attemptId: z.ZodString;
225
+ callingMode: z.ZodEnum<{
226
+ model: "model";
227
+ direct: "direct";
228
+ }>;
229
+ executed: z.ZodBoolean;
230
+ outcome: z.ZodOptional<z.ZodEnum<{
231
+ success: "success";
232
+ cancelled: "cancelled";
233
+ denied: "denied";
234
+ fault: "fault";
235
+ }>>;
236
+ denialCode: z.ZodOptional<z.ZodString>;
237
+ errorType: z.ZodOptional<z.ZodString>;
238
+ errorMessage: z.ZodOptional<z.ZodString>;
239
+ durationMs: z.ZodOptional<z.ZodNumber>;
240
+ workflowId: z.ZodOptional<z.ZodString>;
241
+ nodeId: z.ZodOptional<z.ZodString>;
242
+ workflowRevisionId: z.ZodOptional<z.ZodString>;
243
+ runId: z.ZodOptional<z.ZodString>;
244
+ invocationId: z.ZodOptional<z.ZodString>;
245
+ parentInvocationId: z.ZodOptional<z.ZodString>;
246
+ branchId: z.ZodOptional<z.ZodString>;
247
+ observationKind: z.ZodOptional<z.ZodEnum<{
248
+ reused: "reused";
249
+ waiting: "waiting";
250
+ }>>;
251
+ suspended: z.ZodOptional<z.ZodBoolean>;
252
+ source: z.ZodOptional<z.ZodObject<{
253
+ runId: z.ZodOptional<z.ZodString>;
254
+ invocationId: z.ZodOptional<z.ZodString>;
255
+ branchId: z.ZodOptional<z.ZodString>;
256
+ toolCallId: z.ZodString;
257
+ attemptId: z.ZodString;
258
+ }, z.core.$strict>>;
259
+ }, z.core.$strip>;
260
+ /** Topology contains safe capability descriptions, never executable factories. */
261
+ declare const WorkflowToolSchema: z.ZodObject<{
262
+ name: z.ZodString;
263
+ description: z.ZodOptional<z.ZodString>;
264
+ callingMode: z.ZodEnum<{
265
+ model: "model";
266
+ direct: "direct";
267
+ }>;
268
+ provenance: z.ZodEnum<{
269
+ source: "source";
270
+ observed: "observed";
271
+ }>;
272
+ inputFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
273
+ name: z.ZodString;
274
+ type: z.ZodString;
275
+ required: z.ZodBoolean;
276
+ }, z.core.$strict>>>;
277
+ }, z.core.$strict>;
278
+ declare const ToolDiscoverySchema: z.ZodObject<{
279
+ status: z.ZodEnum<{
280
+ complete: "complete";
281
+ unresolved: "unresolved";
282
+ }>;
283
+ publishedAt: z.ZodOptional<z.ZodString>;
284
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
285
+ }, z.core.$strict>;
286
+ declare const StudioToolSchema: z.ZodObject<{
287
+ name: z.ZodString;
288
+ description: z.ZodOptional<z.ZodString>;
289
+ provenance: z.ZodEnum<{
290
+ source: "source";
291
+ observed: "observed";
292
+ }>;
293
+ inputFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
294
+ name: z.ZodString;
295
+ type: z.ZodString;
296
+ required: z.ZodBoolean;
297
+ }, z.core.$strict>>>;
298
+ callingMode: z.ZodEnum<{
299
+ model: "model";
300
+ unknown: "unknown";
301
+ direct: "direct";
302
+ }>;
303
+ calls: z.ZodNumber;
304
+ replays: z.ZodNumber;
305
+ successes: z.ZodNumber;
306
+ denials: z.ZodNumber;
307
+ faults: z.ZodNumber;
308
+ cancellations: z.ZodNumber;
309
+ p50DurationMs: z.ZodNullable<z.ZodNumber>;
310
+ p95DurationMs: z.ZodNullable<z.ZodNumber>;
311
+ }, z.core.$strict>;
312
+ type WorkflowTool = z.infer<typeof WorkflowToolSchema>;
313
+ type StudioTool = z.infer<typeof StudioToolSchema>;
314
+
3
315
  declare const StudioReleaseVersionSchema: z.ZodString;
4
316
  declare const StudioReleaseDeploymentSchema: z.ZodObject<{
5
317
  strategy: z.ZodEnum<{
@@ -147,7 +459,7 @@ type StudioWorkflowCall = {
147
459
  /** Logical calls are ordered by persisted sequence, independently within each branch. */
148
460
  declare function projectWorkflowCalls(events: StudioDetailEvent[]): StudioWorkflowCall[];
149
461
 
150
- declare const TELEMETRY_EVENT_TYPES: readonly ["span.started", "span.ended", "span.failed", "generation.completed", "tool.started", "tool.completed", "tool.failed", "response.completed", "interrupt.created", "interrupt.resolved", "interrupt.expired", "interrupt.cancelled", "run.cancelled", "run.limit_reached", "workflow.transitioned", "workflow.call.started", "workflow.call.suspended", "workflow.call.resumed", "workflow.call.completed", "workflow.call.failed", "workflow.call.reused", "workflow.call.restored", "session.checkpointed", "session.forked", "session.rolled_back"];
462
+ declare const TELEMETRY_EVENT_TYPES: readonly ["span.started", "span.ended", "span.failed", "generation.completed", "tool.started", "tool.completed", "tool.failed", "tool.denied", "tool.cancelled", "tool.reused", "tool.waiting", "tool.suspended", "response.completed", "interrupt.created", "interrupt.resolved", "interrupt.expired", "interrupt.cancelled", "run.cancelled", "run.limit_reached", "workflow.transitioned", "workflow.call.started", "workflow.call.suspended", "workflow.call.resumed", "workflow.call.completed", "workflow.call.failed", "workflow.call.reused", "workflow.call.restored", "session.checkpointed", "session.forked", "session.rolled_back"];
151
463
  declare const TelemetryServiceSchema: z.ZodObject<{
152
464
  name: z.ZodString;
153
465
  deploymentRef: z.ZodOptional<z.ZodString>;
@@ -159,6 +471,31 @@ declare const WorkflowTopologyNodeSchema: z.ZodObject<{
159
471
  provider: z.ZodOptional<z.ZodString>;
160
472
  model: z.ZodOptional<z.ZodString>;
161
473
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
474
+ tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
475
+ name: z.ZodString;
476
+ description: z.ZodOptional<z.ZodString>;
477
+ callingMode: z.ZodEnum<{
478
+ model: "model";
479
+ direct: "direct";
480
+ }>;
481
+ provenance: z.ZodEnum<{
482
+ source: "source";
483
+ observed: "observed";
484
+ }>;
485
+ inputFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
486
+ name: z.ZodString;
487
+ type: z.ZodString;
488
+ required: z.ZodBoolean;
489
+ }, z.core.$strict>>>;
490
+ }, z.core.$strict>>>;
491
+ toolDiscovery: z.ZodOptional<z.ZodObject<{
492
+ status: z.ZodEnum<{
493
+ complete: "complete";
494
+ unresolved: "unresolved";
495
+ }>;
496
+ publishedAt: z.ZodOptional<z.ZodString>;
497
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
498
+ }, z.core.$strict>>;
162
499
  }, z.core.$strict>;
163
500
  declare const WorkflowTopologyEdgeSchema: z.ZodObject<{
164
501
  sourceNodeId: z.ZodString;
@@ -199,6 +536,31 @@ declare const EnsureWorkflowTopologyRequestSchema: z.ZodObject<{
199
536
  provider: z.ZodOptional<z.ZodString>;
200
537
  model: z.ZodOptional<z.ZodString>;
201
538
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
539
+ tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
540
+ name: z.ZodString;
541
+ description: z.ZodOptional<z.ZodString>;
542
+ callingMode: z.ZodEnum<{
543
+ model: "model";
544
+ direct: "direct";
545
+ }>;
546
+ provenance: z.ZodEnum<{
547
+ source: "source";
548
+ observed: "observed";
549
+ }>;
550
+ inputFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
551
+ name: z.ZodString;
552
+ type: z.ZodString;
553
+ required: z.ZodBoolean;
554
+ }, z.core.$strict>>>;
555
+ }, z.core.$strict>>>;
556
+ toolDiscovery: z.ZodOptional<z.ZodObject<{
557
+ status: z.ZodEnum<{
558
+ complete: "complete";
559
+ unresolved: "unresolved";
560
+ }>;
561
+ publishedAt: z.ZodOptional<z.ZodString>;
562
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
563
+ }, z.core.$strict>>;
202
564
  }, z.core.$strict>>;
203
565
  edges: z.ZodArray<z.ZodObject<{
204
566
  sourceNodeId: z.ZodString;
@@ -233,6 +595,11 @@ declare const TelemetryEventTypeSchema: z.ZodEnum<{
233
595
  "tool.started": "tool.started";
234
596
  "tool.completed": "tool.completed";
235
597
  "tool.failed": "tool.failed";
598
+ "tool.denied": "tool.denied";
599
+ "tool.cancelled": "tool.cancelled";
600
+ "tool.reused": "tool.reused";
601
+ "tool.waiting": "tool.waiting";
602
+ "tool.suspended": "tool.suspended";
236
603
  "response.completed": "response.completed";
237
604
  "interrupt.created": "interrupt.created";
238
605
  "interrupt.resolved": "interrupt.resolved";
@@ -289,6 +656,11 @@ declare const TelemetryEventSchema: z.ZodObject<{
289
656
  "tool.started": "tool.started";
290
657
  "tool.completed": "tool.completed";
291
658
  "tool.failed": "tool.failed";
659
+ "tool.denied": "tool.denied";
660
+ "tool.cancelled": "tool.cancelled";
661
+ "tool.reused": "tool.reused";
662
+ "tool.waiting": "tool.waiting";
663
+ "tool.suspended": "tool.suspended";
292
664
  "response.completed": "response.completed";
293
665
  "interrupt.created": "interrupt.created";
294
666
  "interrupt.resolved": "interrupt.resolved";
@@ -348,6 +720,11 @@ declare const TelemetryEventBatchSchema: z.ZodObject<{
348
720
  "tool.started": "tool.started";
349
721
  "tool.completed": "tool.completed";
350
722
  "tool.failed": "tool.failed";
723
+ "tool.denied": "tool.denied";
724
+ "tool.cancelled": "tool.cancelled";
725
+ "tool.reused": "tool.reused";
726
+ "tool.waiting": "tool.waiting";
727
+ "tool.suspended": "tool.suspended";
351
728
  "response.completed": "response.completed";
352
729
  "interrupt.created": "interrupt.created";
353
730
  "interrupt.resolved": "interrupt.resolved";
@@ -758,6 +1135,7 @@ declare const StudioPricingSourceSchema: z.ZodNullable<z.ZodEnum<{
758
1135
  "default-rate-card": "default-rate-card";
759
1136
  }>>;
760
1137
  declare const StudioChangeResourceSchema: z.ZodEnum<{
1138
+ workflows: "workflows";
761
1139
  runs: "runs";
762
1140
  sessions: "sessions";
763
1141
  interrupts: "interrupts";
@@ -769,6 +1147,7 @@ declare const StudioChangeSchema: z.ZodObject<{
769
1147
  organizationId: z.ZodString;
770
1148
  projectId: z.ZodString;
771
1149
  resources: z.ZodArray<z.ZodEnum<{
1150
+ workflows: "workflows";
772
1151
  runs: "runs";
773
1152
  sessions: "sessions";
774
1153
  interrupts: "interrupts";
@@ -788,6 +1167,10 @@ declare const StudioMetricSchema: z.ZodObject<{
788
1167
  }, z.core.$strict>;
789
1168
  declare const StudioRunSchema: z.ZodObject<{
790
1169
  id: z.ZodString;
1170
+ feedback: z.ZodOptional<z.ZodObject<{
1171
+ positive: z.ZodNumber;
1172
+ negative: z.ZodNumber;
1173
+ }, z.core.$strict>>;
791
1174
  callerNodeId: z.ZodOptional<z.ZodString>;
792
1175
  parentRunId: z.ZodOptional<z.ZodString>;
793
1176
  parentWorkflowId: z.ZodOptional<z.ZodString>;
@@ -971,6 +1354,11 @@ declare const StudioDetailEventSchema: z.ZodObject<{
971
1354
  "tool.started": "tool.started";
972
1355
  "tool.completed": "tool.completed";
973
1356
  "tool.failed": "tool.failed";
1357
+ "tool.denied": "tool.denied";
1358
+ "tool.cancelled": "tool.cancelled";
1359
+ "tool.reused": "tool.reused";
1360
+ "tool.waiting": "tool.waiting";
1361
+ "tool.suspended": "tool.suspended";
974
1362
  "response.completed": "response.completed";
975
1363
  "interrupt.created": "interrupt.created";
976
1364
  "interrupt.resolved": "interrupt.resolved";
@@ -1010,6 +1398,40 @@ declare const StudioDetailEventSchema: z.ZodObject<{
1010
1398
  payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1011
1399
  }, z.core.$strict>;
1012
1400
  declare const StudioWorkflowNodeSchema: z.ZodObject<{
1401
+ tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
1402
+ name: z.ZodString;
1403
+ description: z.ZodOptional<z.ZodString>;
1404
+ provenance: z.ZodEnum<{
1405
+ source: "source";
1406
+ observed: "observed";
1407
+ }>;
1408
+ inputFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1409
+ name: z.ZodString;
1410
+ type: z.ZodString;
1411
+ required: z.ZodBoolean;
1412
+ }, z.core.$strict>>>;
1413
+ callingMode: z.ZodEnum<{
1414
+ model: "model";
1415
+ unknown: "unknown";
1416
+ direct: "direct";
1417
+ }>;
1418
+ calls: z.ZodNumber;
1419
+ replays: z.ZodNumber;
1420
+ successes: z.ZodNumber;
1421
+ denials: z.ZodNumber;
1422
+ faults: z.ZodNumber;
1423
+ cancellations: z.ZodNumber;
1424
+ p50DurationMs: z.ZodNullable<z.ZodNumber>;
1425
+ p95DurationMs: z.ZodNullable<z.ZodNumber>;
1426
+ }, z.core.$strict>>>;
1427
+ toolDiscovery: z.ZodOptional<z.ZodObject<{
1428
+ status: z.ZodEnum<{
1429
+ complete: "complete";
1430
+ unresolved: "unresolved";
1431
+ }>;
1432
+ publishedAt: z.ZodOptional<z.ZodString>;
1433
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
1434
+ }, z.core.$strict>>;
1013
1435
  id: z.ZodString;
1014
1436
  label: z.ZodString;
1015
1437
  type: z.ZodNullable<z.ZodString>;
@@ -1085,6 +1507,40 @@ declare const StudioWorkflowSchema: z.ZodObject<{
1085
1507
  currency: z.ZodNullable<z.ZodString>;
1086
1508
  }, z.core.$strict>;
1087
1509
  nodes: z.ZodArray<z.ZodObject<{
1510
+ tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
1511
+ name: z.ZodString;
1512
+ description: z.ZodOptional<z.ZodString>;
1513
+ provenance: z.ZodEnum<{
1514
+ source: "source";
1515
+ observed: "observed";
1516
+ }>;
1517
+ inputFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1518
+ name: z.ZodString;
1519
+ type: z.ZodString;
1520
+ required: z.ZodBoolean;
1521
+ }, z.core.$strict>>>;
1522
+ callingMode: z.ZodEnum<{
1523
+ model: "model";
1524
+ unknown: "unknown";
1525
+ direct: "direct";
1526
+ }>;
1527
+ calls: z.ZodNumber;
1528
+ replays: z.ZodNumber;
1529
+ successes: z.ZodNumber;
1530
+ denials: z.ZodNumber;
1531
+ faults: z.ZodNumber;
1532
+ cancellations: z.ZodNumber;
1533
+ p50DurationMs: z.ZodNullable<z.ZodNumber>;
1534
+ p95DurationMs: z.ZodNullable<z.ZodNumber>;
1535
+ }, z.core.$strict>>>;
1536
+ toolDiscovery: z.ZodOptional<z.ZodObject<{
1537
+ status: z.ZodEnum<{
1538
+ complete: "complete";
1539
+ unresolved: "unresolved";
1540
+ }>;
1541
+ publishedAt: z.ZodOptional<z.ZodString>;
1542
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
1543
+ }, z.core.$strict>>;
1088
1544
  id: z.ZodString;
1089
1545
  label: z.ZodString;
1090
1546
  type: z.ZodNullable<z.ZodString>;
@@ -1120,6 +1576,10 @@ declare const StudioWorkflowSchema: z.ZodObject<{
1120
1576
  declare const StudioRunsResponseSchema: z.ZodObject<{
1121
1577
  runs: z.ZodArray<z.ZodObject<{
1122
1578
  id: z.ZodString;
1579
+ feedback: z.ZodOptional<z.ZodObject<{
1580
+ positive: z.ZodNumber;
1581
+ negative: z.ZodNumber;
1582
+ }, z.core.$strict>>;
1123
1583
  callerNodeId: z.ZodOptional<z.ZodString>;
1124
1584
  parentRunId: z.ZodOptional<z.ZodString>;
1125
1585
  parentWorkflowId: z.ZodOptional<z.ZodString>;
@@ -1304,6 +1764,10 @@ declare const StudioInterruptsResponseSchema: z.ZodObject<{
1304
1764
  declare const StudioRunDetailResponseSchema: z.ZodObject<{
1305
1765
  run: z.ZodObject<{
1306
1766
  id: z.ZodString;
1767
+ feedback: z.ZodOptional<z.ZodObject<{
1768
+ positive: z.ZodNumber;
1769
+ negative: z.ZodNumber;
1770
+ }, z.core.$strict>>;
1307
1771
  callerNodeId: z.ZodOptional<z.ZodString>;
1308
1772
  parentRunId: z.ZodOptional<z.ZodString>;
1309
1773
  parentWorkflowId: z.ZodOptional<z.ZodString>;
@@ -1368,6 +1832,87 @@ declare const StudioRunDetailResponseSchema: z.ZodObject<{
1368
1832
  }>>>;
1369
1833
  interruptExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1370
1834
  }, z.core.$strict>;
1835
+ scores: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1836
+ id: z.ZodString;
1837
+ target: z.ZodObject<{
1838
+ type: z.ZodLiteral<"run">;
1839
+ runId: z.ZodString;
1840
+ }, z.core.$strict>;
1841
+ environment: z.ZodString;
1842
+ name: z.ZodString;
1843
+ source: z.ZodEnum<{
1844
+ "end-user": "end-user";
1845
+ "human-review": "human-review";
1846
+ evaluator: "evaluator";
1847
+ }>;
1848
+ actorId: z.ZodString;
1849
+ reasons: z.ZodArray<z.ZodEnum<{
1850
+ incomplete: "incomplete";
1851
+ incorrect: "incorrect";
1852
+ irrelevant: "irrelevant";
1853
+ unsafe: "unsafe";
1854
+ other: "other";
1855
+ }>>;
1856
+ comment: z.ZodNullable<z.ZodString>;
1857
+ createdAt: z.ZodString;
1858
+ updatedAt: z.ZodString;
1859
+ dataType: z.ZodLiteral<"BOOLEAN">;
1860
+ value: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>;
1861
+ }, z.core.$strict>, z.ZodObject<{
1862
+ id: z.ZodString;
1863
+ target: z.ZodObject<{
1864
+ type: z.ZodLiteral<"run">;
1865
+ runId: z.ZodString;
1866
+ }, z.core.$strict>;
1867
+ environment: z.ZodString;
1868
+ name: z.ZodString;
1869
+ source: z.ZodEnum<{
1870
+ "end-user": "end-user";
1871
+ "human-review": "human-review";
1872
+ evaluator: "evaluator";
1873
+ }>;
1874
+ actorId: z.ZodString;
1875
+ reasons: z.ZodArray<z.ZodEnum<{
1876
+ incomplete: "incomplete";
1877
+ incorrect: "incorrect";
1878
+ irrelevant: "irrelevant";
1879
+ unsafe: "unsafe";
1880
+ other: "other";
1881
+ }>>;
1882
+ comment: z.ZodNullable<z.ZodString>;
1883
+ createdAt: z.ZodString;
1884
+ updatedAt: z.ZodString;
1885
+ dataType: z.ZodLiteral<"CATEGORICAL">;
1886
+ value: z.ZodString;
1887
+ }, z.core.$strict>, z.ZodObject<{
1888
+ id: z.ZodString;
1889
+ target: z.ZodObject<{
1890
+ type: z.ZodLiteral<"run">;
1891
+ runId: z.ZodString;
1892
+ }, z.core.$strict>;
1893
+ environment: z.ZodString;
1894
+ name: z.ZodString;
1895
+ source: z.ZodEnum<{
1896
+ "end-user": "end-user";
1897
+ "human-review": "human-review";
1898
+ evaluator: "evaluator";
1899
+ }>;
1900
+ actorId: z.ZodString;
1901
+ reasons: z.ZodArray<z.ZodEnum<{
1902
+ incomplete: "incomplete";
1903
+ incorrect: "incorrect";
1904
+ irrelevant: "irrelevant";
1905
+ unsafe: "unsafe";
1906
+ other: "other";
1907
+ }>>;
1908
+ comment: z.ZodNullable<z.ZodString>;
1909
+ createdAt: z.ZodString;
1910
+ updatedAt: z.ZodString;
1911
+ dataType: z.ZodLiteral<"NUMERIC">;
1912
+ value: z.ZodNumber;
1913
+ }, z.core.$strict>], "dataType">>>;
1914
+ canReview: z.ZodOptional<z.ZodBoolean>;
1915
+ reviewActorId: z.ZodOptional<z.ZodString>;
1371
1916
  events: z.ZodArray<z.ZodObject<{
1372
1917
  id: z.ZodString;
1373
1918
  type: z.ZodEnum<{
@@ -1378,6 +1923,11 @@ declare const StudioRunDetailResponseSchema: z.ZodObject<{
1378
1923
  "tool.started": "tool.started";
1379
1924
  "tool.completed": "tool.completed";
1380
1925
  "tool.failed": "tool.failed";
1926
+ "tool.denied": "tool.denied";
1927
+ "tool.cancelled": "tool.cancelled";
1928
+ "tool.reused": "tool.reused";
1929
+ "tool.waiting": "tool.waiting";
1930
+ "tool.suspended": "tool.suspended";
1381
1931
  "response.completed": "response.completed";
1382
1932
  "interrupt.created": "interrupt.created";
1383
1933
  "interrupt.resolved": "interrupt.resolved";
@@ -1585,6 +2135,10 @@ declare const StudioSessionDetailResponseSchema: z.ZodObject<{
1585
2135
  }, z.core.$strict>;
1586
2136
  runs: z.ZodArray<z.ZodObject<{
1587
2137
  id: z.ZodString;
2138
+ feedback: z.ZodOptional<z.ZodObject<{
2139
+ positive: z.ZodNumber;
2140
+ negative: z.ZodNumber;
2141
+ }, z.core.$strict>>;
1588
2142
  callerNodeId: z.ZodOptional<z.ZodString>;
1589
2143
  parentRunId: z.ZodOptional<z.ZodString>;
1590
2144
  parentWorkflowId: z.ZodOptional<z.ZodString>;
@@ -1659,6 +2213,11 @@ declare const StudioSessionDetailResponseSchema: z.ZodObject<{
1659
2213
  "tool.started": "tool.started";
1660
2214
  "tool.completed": "tool.completed";
1661
2215
  "tool.failed": "tool.failed";
2216
+ "tool.denied": "tool.denied";
2217
+ "tool.cancelled": "tool.cancelled";
2218
+ "tool.reused": "tool.reused";
2219
+ "tool.waiting": "tool.waiting";
2220
+ "tool.suspended": "tool.suspended";
1662
2221
  "response.completed": "response.completed";
1663
2222
  "interrupt.created": "interrupt.created";
1664
2223
  "interrupt.resolved": "interrupt.resolved";
@@ -1818,6 +2377,11 @@ declare const StudioInterruptDetailResponseSchema: z.ZodObject<{
1818
2377
  "tool.started": "tool.started";
1819
2378
  "tool.completed": "tool.completed";
1820
2379
  "tool.failed": "tool.failed";
2380
+ "tool.denied": "tool.denied";
2381
+ "tool.cancelled": "tool.cancelled";
2382
+ "tool.reused": "tool.reused";
2383
+ "tool.waiting": "tool.waiting";
2384
+ "tool.suspended": "tool.suspended";
1821
2385
  "response.completed": "response.completed";
1822
2386
  "interrupt.created": "interrupt.created";
1823
2387
  "interrupt.resolved": "interrupt.resolved";
@@ -1858,6 +2422,10 @@ declare const StudioInterruptDetailResponseSchema: z.ZodObject<{
1858
2422
  }, z.core.$strict>>;
1859
2423
  run: z.ZodNullable<z.ZodObject<{
1860
2424
  id: z.ZodString;
2425
+ feedback: z.ZodOptional<z.ZodObject<{
2426
+ positive: z.ZodNumber;
2427
+ negative: z.ZodNumber;
2428
+ }, z.core.$strict>>;
1861
2429
  callerNodeId: z.ZodOptional<z.ZodString>;
1862
2430
  parentRunId: z.ZodOptional<z.ZodString>;
1863
2431
  parentWorkflowId: z.ZodOptional<z.ZodString>;
@@ -2009,6 +2577,40 @@ declare const StudioWorkflowsResponseSchema: z.ZodObject<{
2009
2577
  currency: z.ZodNullable<z.ZodString>;
2010
2578
  }, z.core.$strict>;
2011
2579
  nodes: z.ZodArray<z.ZodObject<{
2580
+ tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
2581
+ name: z.ZodString;
2582
+ description: z.ZodOptional<z.ZodString>;
2583
+ provenance: z.ZodEnum<{
2584
+ source: "source";
2585
+ observed: "observed";
2586
+ }>;
2587
+ inputFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
2588
+ name: z.ZodString;
2589
+ type: z.ZodString;
2590
+ required: z.ZodBoolean;
2591
+ }, z.core.$strict>>>;
2592
+ callingMode: z.ZodEnum<{
2593
+ model: "model";
2594
+ unknown: "unknown";
2595
+ direct: "direct";
2596
+ }>;
2597
+ calls: z.ZodNumber;
2598
+ replays: z.ZodNumber;
2599
+ successes: z.ZodNumber;
2600
+ denials: z.ZodNumber;
2601
+ faults: z.ZodNumber;
2602
+ cancellations: z.ZodNumber;
2603
+ p50DurationMs: z.ZodNullable<z.ZodNumber>;
2604
+ p95DurationMs: z.ZodNullable<z.ZodNumber>;
2605
+ }, z.core.$strict>>>;
2606
+ toolDiscovery: z.ZodOptional<z.ZodObject<{
2607
+ status: z.ZodEnum<{
2608
+ complete: "complete";
2609
+ unresolved: "unresolved";
2610
+ }>;
2611
+ publishedAt: z.ZodOptional<z.ZodString>;
2612
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
2613
+ }, z.core.$strict>>;
2012
2614
  id: z.ZodString;
2013
2615
  label: z.ZodString;
2014
2616
  type: z.ZodNullable<z.ZodString>;
@@ -2149,4 +2751,4 @@ type StudioWorkflowsResponse = z.infer<typeof StudioWorkflowsResponseSchema>;
2149
2751
  type StudioCatalogsResponse = z.infer<typeof StudioCatalogsResponseSchema>;
2150
2752
  type StudioContextResponse = z.infer<typeof StudioContextResponseSchema>;
2151
2753
 
2152
- 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 StudioRelease, StudioReleaseDeploymentSchema, StudioReleaseSchema, StudioReleaseVersionSchema, 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 StudioUpdateOperation, StudioUpdateOperationSchema, type StudioUpdateSettings, StudioUpdateSettingsSchema, type StudioUpdateStatus, StudioUpdateStatusSchema, type StudioWorkflow, type StudioWorkflowCall, 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, WorkflowTopologyCallSchema, WorkflowTopologyEdgeSchema, WorkflowTopologyNodeSchema, WorkflowTopologyTransitionSchema, newerStudioVersion, projectWorkflowCalls, resolveStudioInterruptStatus, resolveStudioTimeRange, studioUpdateRunning };
2754
+ export { ClearScoreResponseSchema, ClearUserFeedbackRequestSchema, type EnsureWorkflowTopologyRequest, EnsureWorkflowTopologyRequestSchema, type EnsureWorkflowTopologyResponse, EnsureWorkflowTopologyResponseSchema, FEEDBACK_FILTERS, FeedbackReasonSchema, type FeedbackSummary, FeedbackSummarySchema, type KortyxTelemetryEvent, type KortyxTelemetryEventType, type KortyxTelemetryService, type KortyxWorkflowTopologyEdge, type KortyxWorkflowTopologyNode, type KortyxWorkflowTopologyTransition, ReviewVerdictSchema, 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 StudioRelease, StudioReleaseDeploymentSchema, StudioReleaseSchema, StudioReleaseVersionSchema, type StudioResumeOutcome, StudioResumeOutcomeSchema, type StudioReviewRequest, StudioReviewRequestSchema, type StudioRun, type StudioRunDetailResponse, StudioRunDetailResponseSchema, StudioRunSchema, type StudioRunStatus, StudioRunStatusSchema, type StudioRunsResponse, StudioRunsResponseSchema, type StudioScore, StudioScoreResponseSchema, StudioScoreSchema, type StudioSession, type StudioSessionDetailResponse, StudioSessionDetailResponseSchema, StudioSessionSchema, type StudioSessionsResponse, StudioSessionsResponseSchema, type StudioTimeRange, type StudioTimeRangeContext, StudioTimeRangeContextSchema, StudioTimeRangeQuerySchema, type StudioTimeRangeResolution, StudioTimeRangeSchema, type StudioTool, StudioToolSchema, type StudioUpdateOperation, StudioUpdateOperationSchema, type StudioUpdateSettings, StudioUpdateSettingsSchema, type StudioUpdateStatus, StudioUpdateStatusSchema, type StudioWorkflow, type StudioWorkflowCall, 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, ToolDiscoverySchema, ToolObservationSchema, ToolOutcomeSchema, type UserFeedbackRequest, UserFeedbackRequestSchema, type WorkflowTool, WorkflowToolSchema, WorkflowTopologyCallSchema, WorkflowTopologyEdgeSchema, WorkflowTopologyNodeSchema, WorkflowTopologyTransitionSchema, newerStudioVersion, projectWorkflowCalls, resolveStudioInterruptStatus, resolveStudioTimeRange, studioUpdateRunning, summarizeUserFeedback };