@xpert-ai/contracts 3.28.0 → 3.29.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.
@@ -0,0 +1,2163 @@
1
+ import { z } from 'zod/v3';
2
+ export declare const executionObservationStatusSchema: z.ZodEnum<["running", "success", "error", "pending", "timeout", "interrupted", "unknown"]>;
3
+ export declare const executionObservationFilterSchema: z.ZodObject<{
4
+ from: z.ZodString;
5
+ to: z.ZodString;
6
+ timeZone: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string>;
7
+ countingUnit: z.ZodDefault<z.ZodEnum<["root_execution", "assistant_invocation"]>>;
8
+ assistantId: z.ZodOptional<z.ZodString>;
9
+ conversationId: z.ZodOptional<z.ZodString>;
10
+ threadId: z.ZodOptional<z.ZodString>;
11
+ unknownAssistantOnly: z.ZodOptional<z.ZodBoolean>;
12
+ workspaceId: z.ZodOptional<z.ZodString>;
13
+ recordedById: z.ZodOptional<z.ZodString>;
14
+ source: z.ZodOptional<z.ZodString>;
15
+ statuses: z.ZodOptional<z.ZodArray<z.ZodEnum<["running", "success", "error", "pending", "timeout", "interrupted", "unknown"]>, "many">>;
16
+ search: z.ZodOptional<z.ZodString>;
17
+ asOf: z.ZodOptional<z.ZodString>;
18
+ }, "strict", z.ZodTypeAny, {
19
+ timeZone?: string;
20
+ workspaceId?: string;
21
+ search?: string;
22
+ source?: string;
23
+ conversationId?: string;
24
+ from?: string;
25
+ to?: string;
26
+ threadId?: string;
27
+ assistantId?: string;
28
+ countingUnit?: "root_execution" | "assistant_invocation";
29
+ unknownAssistantOnly?: boolean;
30
+ recordedById?: string;
31
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
32
+ asOf?: string;
33
+ }, {
34
+ timeZone?: string;
35
+ workspaceId?: string;
36
+ search?: string;
37
+ source?: string;
38
+ conversationId?: string;
39
+ from?: string;
40
+ to?: string;
41
+ threadId?: string;
42
+ assistantId?: string;
43
+ countingUnit?: "root_execution" | "assistant_invocation";
44
+ unknownAssistantOnly?: boolean;
45
+ recordedById?: string;
46
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
47
+ asOf?: string;
48
+ }>;
49
+ export declare const executionObservationQuerySchema: z.ZodEffects<z.ZodObject<{
50
+ from: z.ZodString;
51
+ to: z.ZodString;
52
+ timeZone: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string>;
53
+ countingUnit: z.ZodDefault<z.ZodEnum<["root_execution", "assistant_invocation"]>>;
54
+ assistantId: z.ZodOptional<z.ZodString>;
55
+ conversationId: z.ZodOptional<z.ZodString>;
56
+ threadId: z.ZodOptional<z.ZodString>;
57
+ unknownAssistantOnly: z.ZodOptional<z.ZodBoolean>;
58
+ workspaceId: z.ZodOptional<z.ZodString>;
59
+ recordedById: z.ZodOptional<z.ZodString>;
60
+ source: z.ZodOptional<z.ZodString>;
61
+ statuses: z.ZodOptional<z.ZodArray<z.ZodEnum<["running", "success", "error", "pending", "timeout", "interrupted", "unknown"]>, "many">>;
62
+ search: z.ZodOptional<z.ZodString>;
63
+ asOf: z.ZodOptional<z.ZodString>;
64
+ } & {
65
+ page: z.ZodDefault<z.ZodNumber>;
66
+ pageSize: z.ZodDefault<z.ZodNumber>;
67
+ }, "strict", z.ZodTypeAny, {
68
+ page?: number;
69
+ timeZone?: string;
70
+ workspaceId?: string;
71
+ search?: string;
72
+ source?: string;
73
+ conversationId?: string;
74
+ from?: string;
75
+ to?: string;
76
+ threadId?: string;
77
+ assistantId?: string;
78
+ countingUnit?: "root_execution" | "assistant_invocation";
79
+ unknownAssistantOnly?: boolean;
80
+ recordedById?: string;
81
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
82
+ asOf?: string;
83
+ pageSize?: number;
84
+ }, {
85
+ page?: number;
86
+ timeZone?: string;
87
+ workspaceId?: string;
88
+ search?: string;
89
+ source?: string;
90
+ conversationId?: string;
91
+ from?: string;
92
+ to?: string;
93
+ threadId?: string;
94
+ assistantId?: string;
95
+ countingUnit?: "root_execution" | "assistant_invocation";
96
+ unknownAssistantOnly?: boolean;
97
+ recordedById?: string;
98
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
99
+ asOf?: string;
100
+ pageSize?: number;
101
+ }>, {
102
+ page?: number;
103
+ timeZone?: string;
104
+ workspaceId?: string;
105
+ search?: string;
106
+ source?: string;
107
+ conversationId?: string;
108
+ from?: string;
109
+ to?: string;
110
+ threadId?: string;
111
+ assistantId?: string;
112
+ countingUnit?: "root_execution" | "assistant_invocation";
113
+ unknownAssistantOnly?: boolean;
114
+ recordedById?: string;
115
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
116
+ asOf?: string;
117
+ pageSize?: number;
118
+ }, {
119
+ page?: number;
120
+ timeZone?: string;
121
+ workspaceId?: string;
122
+ search?: string;
123
+ source?: string;
124
+ conversationId?: string;
125
+ from?: string;
126
+ to?: string;
127
+ threadId?: string;
128
+ assistantId?: string;
129
+ countingUnit?: "root_execution" | "assistant_invocation";
130
+ unknownAssistantOnly?: boolean;
131
+ recordedById?: string;
132
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
133
+ asOf?: string;
134
+ pageSize?: number;
135
+ }>;
136
+ export type ExecutionObservationQuery = z.output<typeof executionObservationQuerySchema>;
137
+ export type ExecutionObservationQueryInput = z.input<typeof executionObservationQuerySchema>;
138
+ export declare const executionObservationRecordSchema: z.ZodObject<{
139
+ id: z.ZodString;
140
+ assistantId: z.ZodNullable<z.ZodString>;
141
+ assistantName: z.ZodNullable<z.ZodString>;
142
+ workspaceId: z.ZodNullable<z.ZodString>;
143
+ workspaceName: z.ZodNullable<z.ZodString>;
144
+ conversationId: z.ZodNullable<z.ZodString>;
145
+ threadId: z.ZodNullable<z.ZodString>;
146
+ parentId: z.ZodNullable<z.ZodString>;
147
+ parentThreadId: z.ZodNullable<z.ZodString>;
148
+ forkedFromMessageId: z.ZodNullable<z.ZodString>;
149
+ title: z.ZodNullable<z.ZodString>;
150
+ source: z.ZodNullable<z.ZodString>;
151
+ recordedById: z.ZodNullable<z.ZodString>;
152
+ status: z.ZodEnum<["running", "success", "error", "pending", "timeout", "interrupted", "unknown"]>;
153
+ createdAt: z.ZodString;
154
+ completedAt: z.ZodNullable<z.ZodString>;
155
+ elapsedTimeMs: z.ZodNullable<z.ZodNumber>;
156
+ invocationKind: z.ZodNullable<z.ZodEnum<["external_assistant", "sub_agent"]>>;
157
+ endKnown: z.ZodBoolean;
158
+ hasError: z.ZodBoolean;
159
+ timingBasis: z.ZodLiteral<"record_lifecycle">;
160
+ phasesAvailable: z.ZodLiteral<false>;
161
+ }, "strip", z.ZodTypeAny, {
162
+ status?: "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout";
163
+ id?: string;
164
+ parentId?: string;
165
+ workspaceId?: string;
166
+ createdAt?: string;
167
+ source?: string;
168
+ completedAt?: string;
169
+ title?: string;
170
+ conversationId?: string;
171
+ threadId?: string;
172
+ invocationKind?: "external_assistant" | "sub_agent";
173
+ assistantName?: string;
174
+ assistantId?: string;
175
+ recordedById?: string;
176
+ workspaceName?: string;
177
+ parentThreadId?: string;
178
+ forkedFromMessageId?: string;
179
+ elapsedTimeMs?: number;
180
+ endKnown?: boolean;
181
+ hasError?: boolean;
182
+ timingBasis?: "record_lifecycle";
183
+ phasesAvailable?: false;
184
+ }, {
185
+ status?: "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout";
186
+ id?: string;
187
+ parentId?: string;
188
+ workspaceId?: string;
189
+ createdAt?: string;
190
+ source?: string;
191
+ completedAt?: string;
192
+ title?: string;
193
+ conversationId?: string;
194
+ threadId?: string;
195
+ invocationKind?: "external_assistant" | "sub_agent";
196
+ assistantName?: string;
197
+ assistantId?: string;
198
+ recordedById?: string;
199
+ workspaceName?: string;
200
+ parentThreadId?: string;
201
+ forkedFromMessageId?: string;
202
+ elapsedTimeMs?: number;
203
+ endKnown?: boolean;
204
+ hasError?: boolean;
205
+ timingBasis?: "record_lifecycle";
206
+ phasesAvailable?: false;
207
+ }>;
208
+ export type ExecutionObservationRecord = z.infer<typeof executionObservationRecordSchema>;
209
+ export declare const executionObservationSegmentSchema: z.ZodObject<{
210
+ start: z.ZodString;
211
+ end: z.ZodString;
212
+ count: z.ZodNumber;
213
+ }, "strip", z.ZodTypeAny, {
214
+ end?: string;
215
+ start?: string;
216
+ count?: number;
217
+ }, {
218
+ end?: string;
219
+ start?: string;
220
+ count?: number;
221
+ }>;
222
+ export type ExecutionObservationSegment = z.infer<typeof executionObservationSegmentSchema>;
223
+ export declare const executionObservationSummarySchema: z.ZodObject<{
224
+ total: z.ZodNumber;
225
+ assistants: z.ZodNumber;
226
+ conversations: z.ZodNumber;
227
+ statuses: z.ZodObject<{
228
+ running: z.ZodNumber;
229
+ success: z.ZodNumber;
230
+ error: z.ZodNumber;
231
+ pending: z.ZodNumber;
232
+ timeout: z.ZodNumber;
233
+ interrupted: z.ZodNumber;
234
+ unknown: z.ZodNumber;
235
+ }, "strip", z.ZodTypeAny, {
236
+ error?: number;
237
+ unknown?: number;
238
+ success?: number;
239
+ interrupted?: number;
240
+ running?: number;
241
+ pending?: number;
242
+ timeout?: number;
243
+ }, {
244
+ error?: number;
245
+ unknown?: number;
246
+ success?: number;
247
+ interrupted?: number;
248
+ running?: number;
249
+ pending?: number;
250
+ timeout?: number;
251
+ }>;
252
+ successRate: z.ZodNullable<z.ZodNumber>;
253
+ p50ElapsedMs: z.ZodNullable<z.ZodNumber>;
254
+ p95ElapsedMs: z.ZodNullable<z.ZodNumber>;
255
+ durationSamples: z.ZodNumber;
256
+ peakOverlap: z.ZodNumber;
257
+ overlap: z.ZodArray<z.ZodObject<{
258
+ start: z.ZodString;
259
+ end: z.ZodString;
260
+ count: z.ZodNumber;
261
+ }, "strip", z.ZodTypeAny, {
262
+ end?: string;
263
+ start?: string;
264
+ count?: number;
265
+ }, {
266
+ end?: string;
267
+ start?: string;
268
+ count?: number;
269
+ }>, "many">;
270
+ knownIntervals: z.ZodNumber;
271
+ unknownEnds: z.ZodNumber;
272
+ timingBasis: z.ZodLiteral<"record_lifecycle">;
273
+ phaseCoverage: z.ZodLiteral<"unavailable">;
274
+ observedAt: z.ZodString;
275
+ asOf: z.ZodString;
276
+ usage: z.ZodObject<{
277
+ records: z.ZodNumber;
278
+ totalTokens: z.ZodNullable<z.ZodNumber>;
279
+ unpricedRecords: z.ZodNumber;
280
+ currencies: z.ZodArray<z.ZodObject<{
281
+ currency: z.ZodString;
282
+ amount: z.ZodNumber;
283
+ }, "strip", z.ZodTypeAny, {
284
+ currency?: string;
285
+ amount?: number;
286
+ }, {
287
+ currency?: string;
288
+ amount?: number;
289
+ }>, "many">;
290
+ basis: z.ZodLiteral<"direct_execution_ledger">;
291
+ coveredExecutions: z.ZodNumber;
292
+ }, "strip", z.ZodTypeAny, {
293
+ totalTokens?: number;
294
+ records?: number;
295
+ unpricedRecords?: number;
296
+ currencies?: {
297
+ currency?: string;
298
+ amount?: number;
299
+ }[];
300
+ basis?: "direct_execution_ledger";
301
+ coveredExecutions?: number;
302
+ }, {
303
+ totalTokens?: number;
304
+ records?: number;
305
+ unpricedRecords?: number;
306
+ currencies?: {
307
+ currency?: string;
308
+ amount?: number;
309
+ }[];
310
+ basis?: "direct_execution_ledger";
311
+ coveredExecutions?: number;
312
+ }>;
313
+ }, "strip", z.ZodTypeAny, {
314
+ usage?: {
315
+ totalTokens?: number;
316
+ records?: number;
317
+ unpricedRecords?: number;
318
+ currencies?: {
319
+ currency?: string;
320
+ amount?: number;
321
+ }[];
322
+ basis?: "direct_execution_ledger";
323
+ coveredExecutions?: number;
324
+ };
325
+ total?: number;
326
+ observedAt?: string;
327
+ conversations?: number;
328
+ successRate?: number;
329
+ assistants?: number;
330
+ statuses?: {
331
+ error?: number;
332
+ unknown?: number;
333
+ success?: number;
334
+ interrupted?: number;
335
+ running?: number;
336
+ pending?: number;
337
+ timeout?: number;
338
+ };
339
+ asOf?: string;
340
+ timingBasis?: "record_lifecycle";
341
+ p50ElapsedMs?: number;
342
+ p95ElapsedMs?: number;
343
+ durationSamples?: number;
344
+ peakOverlap?: number;
345
+ overlap?: {
346
+ end?: string;
347
+ start?: string;
348
+ count?: number;
349
+ }[];
350
+ knownIntervals?: number;
351
+ unknownEnds?: number;
352
+ phaseCoverage?: "unavailable";
353
+ }, {
354
+ usage?: {
355
+ totalTokens?: number;
356
+ records?: number;
357
+ unpricedRecords?: number;
358
+ currencies?: {
359
+ currency?: string;
360
+ amount?: number;
361
+ }[];
362
+ basis?: "direct_execution_ledger";
363
+ coveredExecutions?: number;
364
+ };
365
+ total?: number;
366
+ observedAt?: string;
367
+ conversations?: number;
368
+ successRate?: number;
369
+ assistants?: number;
370
+ statuses?: {
371
+ error?: number;
372
+ unknown?: number;
373
+ success?: number;
374
+ interrupted?: number;
375
+ running?: number;
376
+ pending?: number;
377
+ timeout?: number;
378
+ };
379
+ asOf?: string;
380
+ timingBasis?: "record_lifecycle";
381
+ p50ElapsedMs?: number;
382
+ p95ElapsedMs?: number;
383
+ durationSamples?: number;
384
+ peakOverlap?: number;
385
+ overlap?: {
386
+ end?: string;
387
+ start?: string;
388
+ count?: number;
389
+ }[];
390
+ knownIntervals?: number;
391
+ unknownEnds?: number;
392
+ phaseCoverage?: "unavailable";
393
+ }>;
394
+ export type ExecutionObservationSummary = z.infer<typeof executionObservationSummarySchema>;
395
+ /** Static avatar projection; animated appearance assets are unnecessary in dense rows. */
396
+ export declare const executionObservationAvatarSchema: z.ZodObject<{
397
+ url: z.ZodOptional<z.ZodString>;
398
+ background: z.ZodOptional<z.ZodString>;
399
+ emoji: z.ZodOptional<z.ZodObject<{
400
+ id: z.ZodString;
401
+ unified: z.ZodOptional<z.ZodString>;
402
+ }, "strip", z.ZodTypeAny, {
403
+ id?: string;
404
+ unified?: string;
405
+ }, {
406
+ id?: string;
407
+ unified?: string;
408
+ }>>;
409
+ }, "strip", z.ZodTypeAny, {
410
+ emoji?: {
411
+ id?: string;
412
+ unified?: string;
413
+ };
414
+ url?: string;
415
+ background?: string;
416
+ }, {
417
+ emoji?: {
418
+ id?: string;
419
+ unified?: string;
420
+ };
421
+ url?: string;
422
+ background?: string;
423
+ }>;
424
+ export declare const executionObservationAssistantSchema: z.ZodObject<{
425
+ id: z.ZodNullable<z.ZodString>;
426
+ name: z.ZodNullable<z.ZodString>;
427
+ workspaceId: z.ZodNullable<z.ZodString>;
428
+ workspaceName: z.ZodNullable<z.ZodString>;
429
+ avatar: z.ZodNullable<z.ZodObject<{
430
+ url: z.ZodOptional<z.ZodString>;
431
+ background: z.ZodOptional<z.ZodString>;
432
+ emoji: z.ZodOptional<z.ZodObject<{
433
+ id: z.ZodString;
434
+ unified: z.ZodOptional<z.ZodString>;
435
+ }, "strip", z.ZodTypeAny, {
436
+ id?: string;
437
+ unified?: string;
438
+ }, {
439
+ id?: string;
440
+ unified?: string;
441
+ }>>;
442
+ }, "strip", z.ZodTypeAny, {
443
+ emoji?: {
444
+ id?: string;
445
+ unified?: string;
446
+ };
447
+ url?: string;
448
+ background?: string;
449
+ }, {
450
+ emoji?: {
451
+ id?: string;
452
+ unified?: string;
453
+ };
454
+ url?: string;
455
+ background?: string;
456
+ }>>;
457
+ total: z.ZodNumber;
458
+ running: z.ZodNumber;
459
+ pending: z.ZodNumber;
460
+ interrupted: z.ZodNumber;
461
+ failed: z.ZodNumber;
462
+ failures: z.ZodArray<z.ZodObject<{
463
+ id: z.ZodString;
464
+ completedAt: z.ZodString;
465
+ }, "strip", z.ZodTypeAny, {
466
+ id?: string;
467
+ completedAt?: string;
468
+ }, {
469
+ id?: string;
470
+ completedAt?: string;
471
+ }>, "many">;
472
+ failureMarkersTruncated: z.ZodBoolean;
473
+ overlap: z.ZodArray<z.ZodObject<{
474
+ start: z.ZodString;
475
+ end: z.ZodString;
476
+ count: z.ZodNumber;
477
+ }, "strip", z.ZodTypeAny, {
478
+ end?: string;
479
+ start?: string;
480
+ count?: number;
481
+ }, {
482
+ end?: string;
483
+ start?: string;
484
+ count?: number;
485
+ }>, "many">;
486
+ }, "strip", z.ZodTypeAny, {
487
+ failed?: number;
488
+ id?: string;
489
+ name?: string;
490
+ workspaceId?: string;
491
+ interrupted?: number;
492
+ running?: number;
493
+ pending?: number;
494
+ total?: number;
495
+ avatar?: {
496
+ emoji?: {
497
+ id?: string;
498
+ unified?: string;
499
+ };
500
+ url?: string;
501
+ background?: string;
502
+ };
503
+ workspaceName?: string;
504
+ overlap?: {
505
+ end?: string;
506
+ start?: string;
507
+ count?: number;
508
+ }[];
509
+ failures?: {
510
+ id?: string;
511
+ completedAt?: string;
512
+ }[];
513
+ failureMarkersTruncated?: boolean;
514
+ }, {
515
+ failed?: number;
516
+ id?: string;
517
+ name?: string;
518
+ workspaceId?: string;
519
+ interrupted?: number;
520
+ running?: number;
521
+ pending?: number;
522
+ total?: number;
523
+ avatar?: {
524
+ emoji?: {
525
+ id?: string;
526
+ unified?: string;
527
+ };
528
+ url?: string;
529
+ background?: string;
530
+ };
531
+ workspaceName?: string;
532
+ overlap?: {
533
+ end?: string;
534
+ start?: string;
535
+ count?: number;
536
+ }[];
537
+ failures?: {
538
+ id?: string;
539
+ completedAt?: string;
540
+ }[];
541
+ failureMarkersTruncated?: boolean;
542
+ }>;
543
+ export declare const executionObservationOverviewSchema: z.ZodObject<{
544
+ query: z.ZodEffects<z.ZodObject<{
545
+ from: z.ZodString;
546
+ to: z.ZodString;
547
+ timeZone: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string>;
548
+ countingUnit: z.ZodDefault<z.ZodEnum<["root_execution", "assistant_invocation"]>>;
549
+ assistantId: z.ZodOptional<z.ZodString>;
550
+ conversationId: z.ZodOptional<z.ZodString>;
551
+ threadId: z.ZodOptional<z.ZodString>;
552
+ unknownAssistantOnly: z.ZodOptional<z.ZodBoolean>;
553
+ workspaceId: z.ZodOptional<z.ZodString>;
554
+ recordedById: z.ZodOptional<z.ZodString>;
555
+ source: z.ZodOptional<z.ZodString>;
556
+ statuses: z.ZodOptional<z.ZodArray<z.ZodEnum<["running", "success", "error", "pending", "timeout", "interrupted", "unknown"]>, "many">>;
557
+ search: z.ZodOptional<z.ZodString>;
558
+ asOf: z.ZodOptional<z.ZodString>;
559
+ } & {
560
+ page: z.ZodDefault<z.ZodNumber>;
561
+ pageSize: z.ZodDefault<z.ZodNumber>;
562
+ }, "strict", z.ZodTypeAny, {
563
+ page?: number;
564
+ timeZone?: string;
565
+ workspaceId?: string;
566
+ search?: string;
567
+ source?: string;
568
+ conversationId?: string;
569
+ from?: string;
570
+ to?: string;
571
+ threadId?: string;
572
+ assistantId?: string;
573
+ countingUnit?: "root_execution" | "assistant_invocation";
574
+ unknownAssistantOnly?: boolean;
575
+ recordedById?: string;
576
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
577
+ asOf?: string;
578
+ pageSize?: number;
579
+ }, {
580
+ page?: number;
581
+ timeZone?: string;
582
+ workspaceId?: string;
583
+ search?: string;
584
+ source?: string;
585
+ conversationId?: string;
586
+ from?: string;
587
+ to?: string;
588
+ threadId?: string;
589
+ assistantId?: string;
590
+ countingUnit?: "root_execution" | "assistant_invocation";
591
+ unknownAssistantOnly?: boolean;
592
+ recordedById?: string;
593
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
594
+ asOf?: string;
595
+ pageSize?: number;
596
+ }>, {
597
+ page?: number;
598
+ timeZone?: string;
599
+ workspaceId?: string;
600
+ search?: string;
601
+ source?: string;
602
+ conversationId?: string;
603
+ from?: string;
604
+ to?: string;
605
+ threadId?: string;
606
+ assistantId?: string;
607
+ countingUnit?: "root_execution" | "assistant_invocation";
608
+ unknownAssistantOnly?: boolean;
609
+ recordedById?: string;
610
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
611
+ asOf?: string;
612
+ pageSize?: number;
613
+ }, {
614
+ page?: number;
615
+ timeZone?: string;
616
+ workspaceId?: string;
617
+ search?: string;
618
+ source?: string;
619
+ conversationId?: string;
620
+ from?: string;
621
+ to?: string;
622
+ threadId?: string;
623
+ assistantId?: string;
624
+ countingUnit?: "root_execution" | "assistant_invocation";
625
+ unknownAssistantOnly?: boolean;
626
+ recordedById?: string;
627
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
628
+ asOf?: string;
629
+ pageSize?: number;
630
+ }>;
631
+ summary: z.ZodObject<Omit<{
632
+ total: z.ZodNumber;
633
+ assistants: z.ZodNumber;
634
+ conversations: z.ZodNumber;
635
+ statuses: z.ZodObject<{
636
+ running: z.ZodNumber;
637
+ success: z.ZodNumber;
638
+ error: z.ZodNumber;
639
+ pending: z.ZodNumber;
640
+ timeout: z.ZodNumber;
641
+ interrupted: z.ZodNumber;
642
+ unknown: z.ZodNumber;
643
+ }, "strip", z.ZodTypeAny, {
644
+ error?: number;
645
+ unknown?: number;
646
+ success?: number;
647
+ interrupted?: number;
648
+ running?: number;
649
+ pending?: number;
650
+ timeout?: number;
651
+ }, {
652
+ error?: number;
653
+ unknown?: number;
654
+ success?: number;
655
+ interrupted?: number;
656
+ running?: number;
657
+ pending?: number;
658
+ timeout?: number;
659
+ }>;
660
+ successRate: z.ZodNullable<z.ZodNumber>;
661
+ p50ElapsedMs: z.ZodNullable<z.ZodNumber>;
662
+ p95ElapsedMs: z.ZodNullable<z.ZodNumber>;
663
+ durationSamples: z.ZodNumber;
664
+ peakOverlap: z.ZodNumber;
665
+ overlap: z.ZodArray<z.ZodObject<{
666
+ start: z.ZodString;
667
+ end: z.ZodString;
668
+ count: z.ZodNumber;
669
+ }, "strip", z.ZodTypeAny, {
670
+ end?: string;
671
+ start?: string;
672
+ count?: number;
673
+ }, {
674
+ end?: string;
675
+ start?: string;
676
+ count?: number;
677
+ }>, "many">;
678
+ knownIntervals: z.ZodNumber;
679
+ unknownEnds: z.ZodNumber;
680
+ timingBasis: z.ZodLiteral<"record_lifecycle">;
681
+ phaseCoverage: z.ZodLiteral<"unavailable">;
682
+ observedAt: z.ZodString;
683
+ asOf: z.ZodString;
684
+ usage: z.ZodObject<{
685
+ records: z.ZodNumber;
686
+ totalTokens: z.ZodNullable<z.ZodNumber>;
687
+ unpricedRecords: z.ZodNumber;
688
+ currencies: z.ZodArray<z.ZodObject<{
689
+ currency: z.ZodString;
690
+ amount: z.ZodNumber;
691
+ }, "strip", z.ZodTypeAny, {
692
+ currency?: string;
693
+ amount?: number;
694
+ }, {
695
+ currency?: string;
696
+ amount?: number;
697
+ }>, "many">;
698
+ basis: z.ZodLiteral<"direct_execution_ledger">;
699
+ coveredExecutions: z.ZodNumber;
700
+ }, "strip", z.ZodTypeAny, {
701
+ totalTokens?: number;
702
+ records?: number;
703
+ unpricedRecords?: number;
704
+ currencies?: {
705
+ currency?: string;
706
+ amount?: number;
707
+ }[];
708
+ basis?: "direct_execution_ledger";
709
+ coveredExecutions?: number;
710
+ }, {
711
+ totalTokens?: number;
712
+ records?: number;
713
+ unpricedRecords?: number;
714
+ currencies?: {
715
+ currency?: string;
716
+ amount?: number;
717
+ }[];
718
+ basis?: "direct_execution_ledger";
719
+ coveredExecutions?: number;
720
+ }>;
721
+ }, "usage">, "strip", z.ZodTypeAny, {
722
+ total?: number;
723
+ observedAt?: string;
724
+ conversations?: number;
725
+ successRate?: number;
726
+ assistants?: number;
727
+ statuses?: {
728
+ error?: number;
729
+ unknown?: number;
730
+ success?: number;
731
+ interrupted?: number;
732
+ running?: number;
733
+ pending?: number;
734
+ timeout?: number;
735
+ };
736
+ asOf?: string;
737
+ timingBasis?: "record_lifecycle";
738
+ p50ElapsedMs?: number;
739
+ p95ElapsedMs?: number;
740
+ durationSamples?: number;
741
+ peakOverlap?: number;
742
+ overlap?: {
743
+ end?: string;
744
+ start?: string;
745
+ count?: number;
746
+ }[];
747
+ knownIntervals?: number;
748
+ unknownEnds?: number;
749
+ phaseCoverage?: "unavailable";
750
+ }, {
751
+ total?: number;
752
+ observedAt?: string;
753
+ conversations?: number;
754
+ successRate?: number;
755
+ assistants?: number;
756
+ statuses?: {
757
+ error?: number;
758
+ unknown?: number;
759
+ success?: number;
760
+ interrupted?: number;
761
+ running?: number;
762
+ pending?: number;
763
+ timeout?: number;
764
+ };
765
+ asOf?: string;
766
+ timingBasis?: "record_lifecycle";
767
+ p50ElapsedMs?: number;
768
+ p95ElapsedMs?: number;
769
+ durationSamples?: number;
770
+ peakOverlap?: number;
771
+ overlap?: {
772
+ end?: string;
773
+ start?: string;
774
+ count?: number;
775
+ }[];
776
+ knownIntervals?: number;
777
+ unknownEnds?: number;
778
+ phaseCoverage?: "unavailable";
779
+ }>;
780
+ assistants: z.ZodArray<z.ZodObject<{
781
+ id: z.ZodNullable<z.ZodString>;
782
+ name: z.ZodNullable<z.ZodString>;
783
+ workspaceId: z.ZodNullable<z.ZodString>;
784
+ workspaceName: z.ZodNullable<z.ZodString>;
785
+ avatar: z.ZodNullable<z.ZodObject<{
786
+ url: z.ZodOptional<z.ZodString>;
787
+ background: z.ZodOptional<z.ZodString>;
788
+ emoji: z.ZodOptional<z.ZodObject<{
789
+ id: z.ZodString;
790
+ unified: z.ZodOptional<z.ZodString>;
791
+ }, "strip", z.ZodTypeAny, {
792
+ id?: string;
793
+ unified?: string;
794
+ }, {
795
+ id?: string;
796
+ unified?: string;
797
+ }>>;
798
+ }, "strip", z.ZodTypeAny, {
799
+ emoji?: {
800
+ id?: string;
801
+ unified?: string;
802
+ };
803
+ url?: string;
804
+ background?: string;
805
+ }, {
806
+ emoji?: {
807
+ id?: string;
808
+ unified?: string;
809
+ };
810
+ url?: string;
811
+ background?: string;
812
+ }>>;
813
+ total: z.ZodNumber;
814
+ running: z.ZodNumber;
815
+ pending: z.ZodNumber;
816
+ interrupted: z.ZodNumber;
817
+ failed: z.ZodNumber;
818
+ failures: z.ZodArray<z.ZodObject<{
819
+ id: z.ZodString;
820
+ completedAt: z.ZodString;
821
+ }, "strip", z.ZodTypeAny, {
822
+ id?: string;
823
+ completedAt?: string;
824
+ }, {
825
+ id?: string;
826
+ completedAt?: string;
827
+ }>, "many">;
828
+ failureMarkersTruncated: z.ZodBoolean;
829
+ overlap: z.ZodArray<z.ZodObject<{
830
+ start: z.ZodString;
831
+ end: z.ZodString;
832
+ count: z.ZodNumber;
833
+ }, "strip", z.ZodTypeAny, {
834
+ end?: string;
835
+ start?: string;
836
+ count?: number;
837
+ }, {
838
+ end?: string;
839
+ start?: string;
840
+ count?: number;
841
+ }>, "many">;
842
+ }, "strip", z.ZodTypeAny, {
843
+ failed?: number;
844
+ id?: string;
845
+ name?: string;
846
+ workspaceId?: string;
847
+ interrupted?: number;
848
+ running?: number;
849
+ pending?: number;
850
+ total?: number;
851
+ avatar?: {
852
+ emoji?: {
853
+ id?: string;
854
+ unified?: string;
855
+ };
856
+ url?: string;
857
+ background?: string;
858
+ };
859
+ workspaceName?: string;
860
+ overlap?: {
861
+ end?: string;
862
+ start?: string;
863
+ count?: number;
864
+ }[];
865
+ failures?: {
866
+ id?: string;
867
+ completedAt?: string;
868
+ }[];
869
+ failureMarkersTruncated?: boolean;
870
+ }, {
871
+ failed?: number;
872
+ id?: string;
873
+ name?: string;
874
+ workspaceId?: string;
875
+ interrupted?: number;
876
+ running?: number;
877
+ pending?: number;
878
+ total?: number;
879
+ avatar?: {
880
+ emoji?: {
881
+ id?: string;
882
+ unified?: string;
883
+ };
884
+ url?: string;
885
+ background?: string;
886
+ };
887
+ workspaceName?: string;
888
+ overlap?: {
889
+ end?: string;
890
+ start?: string;
891
+ count?: number;
892
+ }[];
893
+ failures?: {
894
+ id?: string;
895
+ completedAt?: string;
896
+ }[];
897
+ failureMarkersTruncated?: boolean;
898
+ }>, "many">;
899
+ totalAssistants: z.ZodNumber;
900
+ page: z.ZodNumber;
901
+ pageSize: z.ZodNumber;
902
+ }, "strip", z.ZodTypeAny, {
903
+ page?: number;
904
+ summary?: {
905
+ total?: number;
906
+ observedAt?: string;
907
+ conversations?: number;
908
+ successRate?: number;
909
+ assistants?: number;
910
+ statuses?: {
911
+ error?: number;
912
+ unknown?: number;
913
+ success?: number;
914
+ interrupted?: number;
915
+ running?: number;
916
+ pending?: number;
917
+ timeout?: number;
918
+ };
919
+ asOf?: string;
920
+ timingBasis?: "record_lifecycle";
921
+ p50ElapsedMs?: number;
922
+ p95ElapsedMs?: number;
923
+ durationSamples?: number;
924
+ peakOverlap?: number;
925
+ overlap?: {
926
+ end?: string;
927
+ start?: string;
928
+ count?: number;
929
+ }[];
930
+ knownIntervals?: number;
931
+ unknownEnds?: number;
932
+ phaseCoverage?: "unavailable";
933
+ };
934
+ query?: {
935
+ page?: number;
936
+ timeZone?: string;
937
+ workspaceId?: string;
938
+ search?: string;
939
+ source?: string;
940
+ conversationId?: string;
941
+ from?: string;
942
+ to?: string;
943
+ threadId?: string;
944
+ assistantId?: string;
945
+ countingUnit?: "root_execution" | "assistant_invocation";
946
+ unknownAssistantOnly?: boolean;
947
+ recordedById?: string;
948
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
949
+ asOf?: string;
950
+ pageSize?: number;
951
+ };
952
+ assistants?: {
953
+ failed?: number;
954
+ id?: string;
955
+ name?: string;
956
+ workspaceId?: string;
957
+ interrupted?: number;
958
+ running?: number;
959
+ pending?: number;
960
+ total?: number;
961
+ avatar?: {
962
+ emoji?: {
963
+ id?: string;
964
+ unified?: string;
965
+ };
966
+ url?: string;
967
+ background?: string;
968
+ };
969
+ workspaceName?: string;
970
+ overlap?: {
971
+ end?: string;
972
+ start?: string;
973
+ count?: number;
974
+ }[];
975
+ failures?: {
976
+ id?: string;
977
+ completedAt?: string;
978
+ }[];
979
+ failureMarkersTruncated?: boolean;
980
+ }[];
981
+ pageSize?: number;
982
+ totalAssistants?: number;
983
+ }, {
984
+ page?: number;
985
+ summary?: {
986
+ total?: number;
987
+ observedAt?: string;
988
+ conversations?: number;
989
+ successRate?: number;
990
+ assistants?: number;
991
+ statuses?: {
992
+ error?: number;
993
+ unknown?: number;
994
+ success?: number;
995
+ interrupted?: number;
996
+ running?: number;
997
+ pending?: number;
998
+ timeout?: number;
999
+ };
1000
+ asOf?: string;
1001
+ timingBasis?: "record_lifecycle";
1002
+ p50ElapsedMs?: number;
1003
+ p95ElapsedMs?: number;
1004
+ durationSamples?: number;
1005
+ peakOverlap?: number;
1006
+ overlap?: {
1007
+ end?: string;
1008
+ start?: string;
1009
+ count?: number;
1010
+ }[];
1011
+ knownIntervals?: number;
1012
+ unknownEnds?: number;
1013
+ phaseCoverage?: "unavailable";
1014
+ };
1015
+ query?: {
1016
+ page?: number;
1017
+ timeZone?: string;
1018
+ workspaceId?: string;
1019
+ search?: string;
1020
+ source?: string;
1021
+ conversationId?: string;
1022
+ from?: string;
1023
+ to?: string;
1024
+ threadId?: string;
1025
+ assistantId?: string;
1026
+ countingUnit?: "root_execution" | "assistant_invocation";
1027
+ unknownAssistantOnly?: boolean;
1028
+ recordedById?: string;
1029
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
1030
+ asOf?: string;
1031
+ pageSize?: number;
1032
+ };
1033
+ assistants?: {
1034
+ failed?: number;
1035
+ id?: string;
1036
+ name?: string;
1037
+ workspaceId?: string;
1038
+ interrupted?: number;
1039
+ running?: number;
1040
+ pending?: number;
1041
+ total?: number;
1042
+ avatar?: {
1043
+ emoji?: {
1044
+ id?: string;
1045
+ unified?: string;
1046
+ };
1047
+ url?: string;
1048
+ background?: string;
1049
+ };
1050
+ workspaceName?: string;
1051
+ overlap?: {
1052
+ end?: string;
1053
+ start?: string;
1054
+ count?: number;
1055
+ }[];
1056
+ failures?: {
1057
+ id?: string;
1058
+ completedAt?: string;
1059
+ }[];
1060
+ failureMarkersTruncated?: boolean;
1061
+ }[];
1062
+ pageSize?: number;
1063
+ totalAssistants?: number;
1064
+ }>;
1065
+ export type ExecutionObservationOverview = z.infer<typeof executionObservationOverviewSchema>;
1066
+ export declare const executionObservationListSchema: z.ZodObject<{
1067
+ items: z.ZodArray<z.ZodObject<{
1068
+ id: z.ZodString;
1069
+ assistantId: z.ZodNullable<z.ZodString>;
1070
+ assistantName: z.ZodNullable<z.ZodString>;
1071
+ workspaceId: z.ZodNullable<z.ZodString>;
1072
+ workspaceName: z.ZodNullable<z.ZodString>;
1073
+ conversationId: z.ZodNullable<z.ZodString>;
1074
+ threadId: z.ZodNullable<z.ZodString>;
1075
+ parentId: z.ZodNullable<z.ZodString>;
1076
+ parentThreadId: z.ZodNullable<z.ZodString>;
1077
+ forkedFromMessageId: z.ZodNullable<z.ZodString>;
1078
+ title: z.ZodNullable<z.ZodString>;
1079
+ source: z.ZodNullable<z.ZodString>;
1080
+ recordedById: z.ZodNullable<z.ZodString>;
1081
+ status: z.ZodEnum<["running", "success", "error", "pending", "timeout", "interrupted", "unknown"]>;
1082
+ createdAt: z.ZodString;
1083
+ completedAt: z.ZodNullable<z.ZodString>;
1084
+ elapsedTimeMs: z.ZodNullable<z.ZodNumber>;
1085
+ invocationKind: z.ZodNullable<z.ZodEnum<["external_assistant", "sub_agent"]>>;
1086
+ endKnown: z.ZodBoolean;
1087
+ hasError: z.ZodBoolean;
1088
+ timingBasis: z.ZodLiteral<"record_lifecycle">;
1089
+ phasesAvailable: z.ZodLiteral<false>;
1090
+ }, "strip", z.ZodTypeAny, {
1091
+ status?: "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout";
1092
+ id?: string;
1093
+ parentId?: string;
1094
+ workspaceId?: string;
1095
+ createdAt?: string;
1096
+ source?: string;
1097
+ completedAt?: string;
1098
+ title?: string;
1099
+ conversationId?: string;
1100
+ threadId?: string;
1101
+ invocationKind?: "external_assistant" | "sub_agent";
1102
+ assistantName?: string;
1103
+ assistantId?: string;
1104
+ recordedById?: string;
1105
+ workspaceName?: string;
1106
+ parentThreadId?: string;
1107
+ forkedFromMessageId?: string;
1108
+ elapsedTimeMs?: number;
1109
+ endKnown?: boolean;
1110
+ hasError?: boolean;
1111
+ timingBasis?: "record_lifecycle";
1112
+ phasesAvailable?: false;
1113
+ }, {
1114
+ status?: "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout";
1115
+ id?: string;
1116
+ parentId?: string;
1117
+ workspaceId?: string;
1118
+ createdAt?: string;
1119
+ source?: string;
1120
+ completedAt?: string;
1121
+ title?: string;
1122
+ conversationId?: string;
1123
+ threadId?: string;
1124
+ invocationKind?: "external_assistant" | "sub_agent";
1125
+ assistantName?: string;
1126
+ assistantId?: string;
1127
+ recordedById?: string;
1128
+ workspaceName?: string;
1129
+ parentThreadId?: string;
1130
+ forkedFromMessageId?: string;
1131
+ elapsedTimeMs?: number;
1132
+ endKnown?: boolean;
1133
+ hasError?: boolean;
1134
+ timingBasis?: "record_lifecycle";
1135
+ phasesAvailable?: false;
1136
+ }>, "many">;
1137
+ total: z.ZodNumber;
1138
+ page: z.ZodNumber;
1139
+ pageSize: z.ZodNumber;
1140
+ asOf: z.ZodString;
1141
+ observedAt: z.ZodString;
1142
+ }, "strip", z.ZodTypeAny, {
1143
+ page?: number;
1144
+ total?: number;
1145
+ items?: {
1146
+ status?: "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout";
1147
+ id?: string;
1148
+ parentId?: string;
1149
+ workspaceId?: string;
1150
+ createdAt?: string;
1151
+ source?: string;
1152
+ completedAt?: string;
1153
+ title?: string;
1154
+ conversationId?: string;
1155
+ threadId?: string;
1156
+ invocationKind?: "external_assistant" | "sub_agent";
1157
+ assistantName?: string;
1158
+ assistantId?: string;
1159
+ recordedById?: string;
1160
+ workspaceName?: string;
1161
+ parentThreadId?: string;
1162
+ forkedFromMessageId?: string;
1163
+ elapsedTimeMs?: number;
1164
+ endKnown?: boolean;
1165
+ hasError?: boolean;
1166
+ timingBasis?: "record_lifecycle";
1167
+ phasesAvailable?: false;
1168
+ }[];
1169
+ observedAt?: string;
1170
+ asOf?: string;
1171
+ pageSize?: number;
1172
+ }, {
1173
+ page?: number;
1174
+ total?: number;
1175
+ items?: {
1176
+ status?: "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout";
1177
+ id?: string;
1178
+ parentId?: string;
1179
+ workspaceId?: string;
1180
+ createdAt?: string;
1181
+ source?: string;
1182
+ completedAt?: string;
1183
+ title?: string;
1184
+ conversationId?: string;
1185
+ threadId?: string;
1186
+ invocationKind?: "external_assistant" | "sub_agent";
1187
+ assistantName?: string;
1188
+ assistantId?: string;
1189
+ recordedById?: string;
1190
+ workspaceName?: string;
1191
+ parentThreadId?: string;
1192
+ forkedFromMessageId?: string;
1193
+ elapsedTimeMs?: number;
1194
+ endKnown?: boolean;
1195
+ hasError?: boolean;
1196
+ timingBasis?: "record_lifecycle";
1197
+ phasesAvailable?: false;
1198
+ }[];
1199
+ observedAt?: string;
1200
+ asOf?: string;
1201
+ pageSize?: number;
1202
+ }>;
1203
+ export type ExecutionObservationList = z.infer<typeof executionObservationListSchema>;
1204
+ export declare const executionObservationWorkspacesSchema: z.ZodObject<{
1205
+ items: z.ZodArray<z.ZodObject<{
1206
+ id: z.ZodString;
1207
+ name: z.ZodString;
1208
+ }, "strip", z.ZodTypeAny, {
1209
+ id?: string;
1210
+ name?: string;
1211
+ }, {
1212
+ id?: string;
1213
+ name?: string;
1214
+ }>, "many">;
1215
+ hasMore: z.ZodBoolean;
1216
+ }, "strip", z.ZodTypeAny, {
1217
+ items?: {
1218
+ id?: string;
1219
+ name?: string;
1220
+ }[];
1221
+ hasMore?: boolean;
1222
+ }, {
1223
+ items?: {
1224
+ id?: string;
1225
+ name?: string;
1226
+ }[];
1227
+ hasMore?: boolean;
1228
+ }>;
1229
+ export declare const executionObservationDetailSchema: z.ZodObject<{
1230
+ item: z.ZodObject<{
1231
+ id: z.ZodString;
1232
+ assistantId: z.ZodNullable<z.ZodString>;
1233
+ assistantName: z.ZodNullable<z.ZodString>;
1234
+ workspaceId: z.ZodNullable<z.ZodString>;
1235
+ workspaceName: z.ZodNullable<z.ZodString>;
1236
+ conversationId: z.ZodNullable<z.ZodString>;
1237
+ threadId: z.ZodNullable<z.ZodString>;
1238
+ parentId: z.ZodNullable<z.ZodString>;
1239
+ parentThreadId: z.ZodNullable<z.ZodString>;
1240
+ forkedFromMessageId: z.ZodNullable<z.ZodString>;
1241
+ title: z.ZodNullable<z.ZodString>;
1242
+ source: z.ZodNullable<z.ZodString>;
1243
+ recordedById: z.ZodNullable<z.ZodString>;
1244
+ status: z.ZodEnum<["running", "success", "error", "pending", "timeout", "interrupted", "unknown"]>;
1245
+ createdAt: z.ZodString;
1246
+ completedAt: z.ZodNullable<z.ZodString>;
1247
+ elapsedTimeMs: z.ZodNullable<z.ZodNumber>;
1248
+ invocationKind: z.ZodNullable<z.ZodEnum<["external_assistant", "sub_agent"]>>;
1249
+ endKnown: z.ZodBoolean;
1250
+ hasError: z.ZodBoolean;
1251
+ timingBasis: z.ZodLiteral<"record_lifecycle">;
1252
+ phasesAvailable: z.ZodLiteral<false>;
1253
+ }, "strip", z.ZodTypeAny, {
1254
+ status?: "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout";
1255
+ id?: string;
1256
+ parentId?: string;
1257
+ workspaceId?: string;
1258
+ createdAt?: string;
1259
+ source?: string;
1260
+ completedAt?: string;
1261
+ title?: string;
1262
+ conversationId?: string;
1263
+ threadId?: string;
1264
+ invocationKind?: "external_assistant" | "sub_agent";
1265
+ assistantName?: string;
1266
+ assistantId?: string;
1267
+ recordedById?: string;
1268
+ workspaceName?: string;
1269
+ parentThreadId?: string;
1270
+ forkedFromMessageId?: string;
1271
+ elapsedTimeMs?: number;
1272
+ endKnown?: boolean;
1273
+ hasError?: boolean;
1274
+ timingBasis?: "record_lifecycle";
1275
+ phasesAvailable?: false;
1276
+ }, {
1277
+ status?: "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout";
1278
+ id?: string;
1279
+ parentId?: string;
1280
+ workspaceId?: string;
1281
+ createdAt?: string;
1282
+ source?: string;
1283
+ completedAt?: string;
1284
+ title?: string;
1285
+ conversationId?: string;
1286
+ threadId?: string;
1287
+ invocationKind?: "external_assistant" | "sub_agent";
1288
+ assistantName?: string;
1289
+ assistantId?: string;
1290
+ recordedById?: string;
1291
+ workspaceName?: string;
1292
+ parentThreadId?: string;
1293
+ forkedFromMessageId?: string;
1294
+ elapsedTimeMs?: number;
1295
+ endKnown?: boolean;
1296
+ hasError?: boolean;
1297
+ timingBasis?: "record_lifecycle";
1298
+ phasesAvailable?: false;
1299
+ }>;
1300
+ children: z.ZodArray<z.ZodObject<{
1301
+ id: z.ZodString;
1302
+ assistantId: z.ZodNullable<z.ZodString>;
1303
+ assistantName: z.ZodNullable<z.ZodString>;
1304
+ workspaceId: z.ZodNullable<z.ZodString>;
1305
+ workspaceName: z.ZodNullable<z.ZodString>;
1306
+ conversationId: z.ZodNullable<z.ZodString>;
1307
+ threadId: z.ZodNullable<z.ZodString>;
1308
+ parentId: z.ZodNullable<z.ZodString>;
1309
+ parentThreadId: z.ZodNullable<z.ZodString>;
1310
+ forkedFromMessageId: z.ZodNullable<z.ZodString>;
1311
+ title: z.ZodNullable<z.ZodString>;
1312
+ source: z.ZodNullable<z.ZodString>;
1313
+ recordedById: z.ZodNullable<z.ZodString>;
1314
+ status: z.ZodEnum<["running", "success", "error", "pending", "timeout", "interrupted", "unknown"]>;
1315
+ createdAt: z.ZodString;
1316
+ completedAt: z.ZodNullable<z.ZodString>;
1317
+ elapsedTimeMs: z.ZodNullable<z.ZodNumber>;
1318
+ invocationKind: z.ZodNullable<z.ZodEnum<["external_assistant", "sub_agent"]>>;
1319
+ endKnown: z.ZodBoolean;
1320
+ hasError: z.ZodBoolean;
1321
+ timingBasis: z.ZodLiteral<"record_lifecycle">;
1322
+ phasesAvailable: z.ZodLiteral<false>;
1323
+ }, "strip", z.ZodTypeAny, {
1324
+ status?: "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout";
1325
+ id?: string;
1326
+ parentId?: string;
1327
+ workspaceId?: string;
1328
+ createdAt?: string;
1329
+ source?: string;
1330
+ completedAt?: string;
1331
+ title?: string;
1332
+ conversationId?: string;
1333
+ threadId?: string;
1334
+ invocationKind?: "external_assistant" | "sub_agent";
1335
+ assistantName?: string;
1336
+ assistantId?: string;
1337
+ recordedById?: string;
1338
+ workspaceName?: string;
1339
+ parentThreadId?: string;
1340
+ forkedFromMessageId?: string;
1341
+ elapsedTimeMs?: number;
1342
+ endKnown?: boolean;
1343
+ hasError?: boolean;
1344
+ timingBasis?: "record_lifecycle";
1345
+ phasesAvailable?: false;
1346
+ }, {
1347
+ status?: "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout";
1348
+ id?: string;
1349
+ parentId?: string;
1350
+ workspaceId?: string;
1351
+ createdAt?: string;
1352
+ source?: string;
1353
+ completedAt?: string;
1354
+ title?: string;
1355
+ conversationId?: string;
1356
+ threadId?: string;
1357
+ invocationKind?: "external_assistant" | "sub_agent";
1358
+ assistantName?: string;
1359
+ assistantId?: string;
1360
+ recordedById?: string;
1361
+ workspaceName?: string;
1362
+ parentThreadId?: string;
1363
+ forkedFromMessageId?: string;
1364
+ elapsedTimeMs?: number;
1365
+ endKnown?: boolean;
1366
+ hasError?: boolean;
1367
+ timingBasis?: "record_lifecycle";
1368
+ phasesAvailable?: false;
1369
+ }>, "many">;
1370
+ childTotal: z.ZodNumber;
1371
+ childPage: z.ZodNumber;
1372
+ usage: z.ZodObject<{
1373
+ records: z.ZodNumber;
1374
+ totalTokens: z.ZodNullable<z.ZodNumber>;
1375
+ unpricedRecords: z.ZodNumber;
1376
+ currencies: z.ZodArray<z.ZodObject<{
1377
+ currency: z.ZodString;
1378
+ amount: z.ZodNumber;
1379
+ }, "strip", z.ZodTypeAny, {
1380
+ currency?: string;
1381
+ amount?: number;
1382
+ }, {
1383
+ currency?: string;
1384
+ amount?: number;
1385
+ }>, "many">;
1386
+ basis: z.ZodLiteral<"direct_execution_ledger">;
1387
+ coveredExecutions: z.ZodNumber;
1388
+ }, "strip", z.ZodTypeAny, {
1389
+ totalTokens?: number;
1390
+ records?: number;
1391
+ unpricedRecords?: number;
1392
+ currencies?: {
1393
+ currency?: string;
1394
+ amount?: number;
1395
+ }[];
1396
+ basis?: "direct_execution_ledger";
1397
+ coveredExecutions?: number;
1398
+ }, {
1399
+ totalTokens?: number;
1400
+ records?: number;
1401
+ unpricedRecords?: number;
1402
+ currencies?: {
1403
+ currency?: string;
1404
+ amount?: number;
1405
+ }[];
1406
+ basis?: "direct_execution_ledger";
1407
+ coveredExecutions?: number;
1408
+ }>;
1409
+ observedAt: z.ZodString;
1410
+ }, "strip", z.ZodTypeAny, {
1411
+ children?: {
1412
+ status?: "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout";
1413
+ id?: string;
1414
+ parentId?: string;
1415
+ workspaceId?: string;
1416
+ createdAt?: string;
1417
+ source?: string;
1418
+ completedAt?: string;
1419
+ title?: string;
1420
+ conversationId?: string;
1421
+ threadId?: string;
1422
+ invocationKind?: "external_assistant" | "sub_agent";
1423
+ assistantName?: string;
1424
+ assistantId?: string;
1425
+ recordedById?: string;
1426
+ workspaceName?: string;
1427
+ parentThreadId?: string;
1428
+ forkedFromMessageId?: string;
1429
+ elapsedTimeMs?: number;
1430
+ endKnown?: boolean;
1431
+ hasError?: boolean;
1432
+ timingBasis?: "record_lifecycle";
1433
+ phasesAvailable?: false;
1434
+ }[];
1435
+ usage?: {
1436
+ totalTokens?: number;
1437
+ records?: number;
1438
+ unpricedRecords?: number;
1439
+ currencies?: {
1440
+ currency?: string;
1441
+ amount?: number;
1442
+ }[];
1443
+ basis?: "direct_execution_ledger";
1444
+ coveredExecutions?: number;
1445
+ };
1446
+ observedAt?: string;
1447
+ item?: {
1448
+ status?: "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout";
1449
+ id?: string;
1450
+ parentId?: string;
1451
+ workspaceId?: string;
1452
+ createdAt?: string;
1453
+ source?: string;
1454
+ completedAt?: string;
1455
+ title?: string;
1456
+ conversationId?: string;
1457
+ threadId?: string;
1458
+ invocationKind?: "external_assistant" | "sub_agent";
1459
+ assistantName?: string;
1460
+ assistantId?: string;
1461
+ recordedById?: string;
1462
+ workspaceName?: string;
1463
+ parentThreadId?: string;
1464
+ forkedFromMessageId?: string;
1465
+ elapsedTimeMs?: number;
1466
+ endKnown?: boolean;
1467
+ hasError?: boolean;
1468
+ timingBasis?: "record_lifecycle";
1469
+ phasesAvailable?: false;
1470
+ };
1471
+ childTotal?: number;
1472
+ childPage?: number;
1473
+ }, {
1474
+ children?: {
1475
+ status?: "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout";
1476
+ id?: string;
1477
+ parentId?: string;
1478
+ workspaceId?: string;
1479
+ createdAt?: string;
1480
+ source?: string;
1481
+ completedAt?: string;
1482
+ title?: string;
1483
+ conversationId?: string;
1484
+ threadId?: string;
1485
+ invocationKind?: "external_assistant" | "sub_agent";
1486
+ assistantName?: string;
1487
+ assistantId?: string;
1488
+ recordedById?: string;
1489
+ workspaceName?: string;
1490
+ parentThreadId?: string;
1491
+ forkedFromMessageId?: string;
1492
+ elapsedTimeMs?: number;
1493
+ endKnown?: boolean;
1494
+ hasError?: boolean;
1495
+ timingBasis?: "record_lifecycle";
1496
+ phasesAvailable?: false;
1497
+ }[];
1498
+ usage?: {
1499
+ totalTokens?: number;
1500
+ records?: number;
1501
+ unpricedRecords?: number;
1502
+ currencies?: {
1503
+ currency?: string;
1504
+ amount?: number;
1505
+ }[];
1506
+ basis?: "direct_execution_ledger";
1507
+ coveredExecutions?: number;
1508
+ };
1509
+ observedAt?: string;
1510
+ item?: {
1511
+ status?: "error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout";
1512
+ id?: string;
1513
+ parentId?: string;
1514
+ workspaceId?: string;
1515
+ createdAt?: string;
1516
+ source?: string;
1517
+ completedAt?: string;
1518
+ title?: string;
1519
+ conversationId?: string;
1520
+ threadId?: string;
1521
+ invocationKind?: "external_assistant" | "sub_agent";
1522
+ assistantName?: string;
1523
+ assistantId?: string;
1524
+ recordedById?: string;
1525
+ workspaceName?: string;
1526
+ parentThreadId?: string;
1527
+ forkedFromMessageId?: string;
1528
+ elapsedTimeMs?: number;
1529
+ endKnown?: boolean;
1530
+ hasError?: boolean;
1531
+ timingBasis?: "record_lifecycle";
1532
+ phasesAvailable?: false;
1533
+ };
1534
+ childTotal?: number;
1535
+ childPage?: number;
1536
+ }>;
1537
+ export type ExecutionObservationDetail = z.infer<typeof executionObservationDetailSchema>;
1538
+ export declare const executionObservationDetailQuerySchema: z.ZodObject<{
1539
+ executionId: z.ZodString;
1540
+ childPage: z.ZodDefault<z.ZodNumber>;
1541
+ }, "strict", z.ZodTypeAny, {
1542
+ executionId?: string;
1543
+ childPage?: number;
1544
+ }, {
1545
+ executionId?: string;
1546
+ childPage?: number;
1547
+ }>;
1548
+ export declare const executionObservationCompareSchema: z.ZodObject<{
1549
+ current: z.ZodEffects<z.ZodObject<{
1550
+ from: z.ZodString;
1551
+ to: z.ZodString;
1552
+ timeZone: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string>;
1553
+ countingUnit: z.ZodDefault<z.ZodEnum<["root_execution", "assistant_invocation"]>>;
1554
+ assistantId: z.ZodOptional<z.ZodString>;
1555
+ conversationId: z.ZodOptional<z.ZodString>;
1556
+ threadId: z.ZodOptional<z.ZodString>;
1557
+ unknownAssistantOnly: z.ZodOptional<z.ZodBoolean>;
1558
+ workspaceId: z.ZodOptional<z.ZodString>;
1559
+ recordedById: z.ZodOptional<z.ZodString>;
1560
+ source: z.ZodOptional<z.ZodString>;
1561
+ statuses: z.ZodOptional<z.ZodArray<z.ZodEnum<["running", "success", "error", "pending", "timeout", "interrupted", "unknown"]>, "many">>;
1562
+ search: z.ZodOptional<z.ZodString>;
1563
+ asOf: z.ZodOptional<z.ZodString>;
1564
+ } & {
1565
+ page: z.ZodDefault<z.ZodNumber>;
1566
+ pageSize: z.ZodDefault<z.ZodNumber>;
1567
+ }, "strict", z.ZodTypeAny, {
1568
+ page?: number;
1569
+ timeZone?: string;
1570
+ workspaceId?: string;
1571
+ search?: string;
1572
+ source?: string;
1573
+ conversationId?: string;
1574
+ from?: string;
1575
+ to?: string;
1576
+ threadId?: string;
1577
+ assistantId?: string;
1578
+ countingUnit?: "root_execution" | "assistant_invocation";
1579
+ unknownAssistantOnly?: boolean;
1580
+ recordedById?: string;
1581
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
1582
+ asOf?: string;
1583
+ pageSize?: number;
1584
+ }, {
1585
+ page?: number;
1586
+ timeZone?: string;
1587
+ workspaceId?: string;
1588
+ search?: string;
1589
+ source?: string;
1590
+ conversationId?: string;
1591
+ from?: string;
1592
+ to?: string;
1593
+ threadId?: string;
1594
+ assistantId?: string;
1595
+ countingUnit?: "root_execution" | "assistant_invocation";
1596
+ unknownAssistantOnly?: boolean;
1597
+ recordedById?: string;
1598
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
1599
+ asOf?: string;
1600
+ pageSize?: number;
1601
+ }>, {
1602
+ page?: number;
1603
+ timeZone?: string;
1604
+ workspaceId?: string;
1605
+ search?: string;
1606
+ source?: string;
1607
+ conversationId?: string;
1608
+ from?: string;
1609
+ to?: string;
1610
+ threadId?: string;
1611
+ assistantId?: string;
1612
+ countingUnit?: "root_execution" | "assistant_invocation";
1613
+ unknownAssistantOnly?: boolean;
1614
+ recordedById?: string;
1615
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
1616
+ asOf?: string;
1617
+ pageSize?: number;
1618
+ }, {
1619
+ page?: number;
1620
+ timeZone?: string;
1621
+ workspaceId?: string;
1622
+ search?: string;
1623
+ source?: string;
1624
+ conversationId?: string;
1625
+ from?: string;
1626
+ to?: string;
1627
+ threadId?: string;
1628
+ assistantId?: string;
1629
+ countingUnit?: "root_execution" | "assistant_invocation";
1630
+ unknownAssistantOnly?: boolean;
1631
+ recordedById?: string;
1632
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
1633
+ asOf?: string;
1634
+ pageSize?: number;
1635
+ }>;
1636
+ baseline: z.ZodEffects<z.ZodObject<{
1637
+ from: z.ZodString;
1638
+ to: z.ZodString;
1639
+ timeZone: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string>;
1640
+ countingUnit: z.ZodDefault<z.ZodEnum<["root_execution", "assistant_invocation"]>>;
1641
+ assistantId: z.ZodOptional<z.ZodString>;
1642
+ conversationId: z.ZodOptional<z.ZodString>;
1643
+ threadId: z.ZodOptional<z.ZodString>;
1644
+ unknownAssistantOnly: z.ZodOptional<z.ZodBoolean>;
1645
+ workspaceId: z.ZodOptional<z.ZodString>;
1646
+ recordedById: z.ZodOptional<z.ZodString>;
1647
+ source: z.ZodOptional<z.ZodString>;
1648
+ statuses: z.ZodOptional<z.ZodArray<z.ZodEnum<["running", "success", "error", "pending", "timeout", "interrupted", "unknown"]>, "many">>;
1649
+ search: z.ZodOptional<z.ZodString>;
1650
+ asOf: z.ZodOptional<z.ZodString>;
1651
+ } & {
1652
+ page: z.ZodDefault<z.ZodNumber>;
1653
+ pageSize: z.ZodDefault<z.ZodNumber>;
1654
+ }, "strict", z.ZodTypeAny, {
1655
+ page?: number;
1656
+ timeZone?: string;
1657
+ workspaceId?: string;
1658
+ search?: string;
1659
+ source?: string;
1660
+ conversationId?: string;
1661
+ from?: string;
1662
+ to?: string;
1663
+ threadId?: string;
1664
+ assistantId?: string;
1665
+ countingUnit?: "root_execution" | "assistant_invocation";
1666
+ unknownAssistantOnly?: boolean;
1667
+ recordedById?: string;
1668
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
1669
+ asOf?: string;
1670
+ pageSize?: number;
1671
+ }, {
1672
+ page?: number;
1673
+ timeZone?: string;
1674
+ workspaceId?: string;
1675
+ search?: string;
1676
+ source?: string;
1677
+ conversationId?: string;
1678
+ from?: string;
1679
+ to?: string;
1680
+ threadId?: string;
1681
+ assistantId?: string;
1682
+ countingUnit?: "root_execution" | "assistant_invocation";
1683
+ unknownAssistantOnly?: boolean;
1684
+ recordedById?: string;
1685
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
1686
+ asOf?: string;
1687
+ pageSize?: number;
1688
+ }>, {
1689
+ page?: number;
1690
+ timeZone?: string;
1691
+ workspaceId?: string;
1692
+ search?: string;
1693
+ source?: string;
1694
+ conversationId?: string;
1695
+ from?: string;
1696
+ to?: string;
1697
+ threadId?: string;
1698
+ assistantId?: string;
1699
+ countingUnit?: "root_execution" | "assistant_invocation";
1700
+ unknownAssistantOnly?: boolean;
1701
+ recordedById?: string;
1702
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
1703
+ asOf?: string;
1704
+ pageSize?: number;
1705
+ }, {
1706
+ page?: number;
1707
+ timeZone?: string;
1708
+ workspaceId?: string;
1709
+ search?: string;
1710
+ source?: string;
1711
+ conversationId?: string;
1712
+ from?: string;
1713
+ to?: string;
1714
+ threadId?: string;
1715
+ assistantId?: string;
1716
+ countingUnit?: "root_execution" | "assistant_invocation";
1717
+ unknownAssistantOnly?: boolean;
1718
+ recordedById?: string;
1719
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
1720
+ asOf?: string;
1721
+ pageSize?: number;
1722
+ }>;
1723
+ }, "strict", z.ZodTypeAny, {
1724
+ current?: {
1725
+ page?: number;
1726
+ timeZone?: string;
1727
+ workspaceId?: string;
1728
+ search?: string;
1729
+ source?: string;
1730
+ conversationId?: string;
1731
+ from?: string;
1732
+ to?: string;
1733
+ threadId?: string;
1734
+ assistantId?: string;
1735
+ countingUnit?: "root_execution" | "assistant_invocation";
1736
+ unknownAssistantOnly?: boolean;
1737
+ recordedById?: string;
1738
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
1739
+ asOf?: string;
1740
+ pageSize?: number;
1741
+ };
1742
+ baseline?: {
1743
+ page?: number;
1744
+ timeZone?: string;
1745
+ workspaceId?: string;
1746
+ search?: string;
1747
+ source?: string;
1748
+ conversationId?: string;
1749
+ from?: string;
1750
+ to?: string;
1751
+ threadId?: string;
1752
+ assistantId?: string;
1753
+ countingUnit?: "root_execution" | "assistant_invocation";
1754
+ unknownAssistantOnly?: boolean;
1755
+ recordedById?: string;
1756
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
1757
+ asOf?: string;
1758
+ pageSize?: number;
1759
+ };
1760
+ }, {
1761
+ current?: {
1762
+ page?: number;
1763
+ timeZone?: string;
1764
+ workspaceId?: string;
1765
+ search?: string;
1766
+ source?: string;
1767
+ conversationId?: string;
1768
+ from?: string;
1769
+ to?: string;
1770
+ threadId?: string;
1771
+ assistantId?: string;
1772
+ countingUnit?: "root_execution" | "assistant_invocation";
1773
+ unknownAssistantOnly?: boolean;
1774
+ recordedById?: string;
1775
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
1776
+ asOf?: string;
1777
+ pageSize?: number;
1778
+ };
1779
+ baseline?: {
1780
+ page?: number;
1781
+ timeZone?: string;
1782
+ workspaceId?: string;
1783
+ search?: string;
1784
+ source?: string;
1785
+ conversationId?: string;
1786
+ from?: string;
1787
+ to?: string;
1788
+ threadId?: string;
1789
+ assistantId?: string;
1790
+ countingUnit?: "root_execution" | "assistant_invocation";
1791
+ unknownAssistantOnly?: boolean;
1792
+ recordedById?: string;
1793
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
1794
+ asOf?: string;
1795
+ pageSize?: number;
1796
+ };
1797
+ }>;
1798
+ export declare const executionObservationAnomalySchema: z.ZodObject<{
1799
+ query: z.ZodEffects<z.ZodObject<{
1800
+ from: z.ZodString;
1801
+ to: z.ZodString;
1802
+ timeZone: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string>;
1803
+ countingUnit: z.ZodDefault<z.ZodEnum<["root_execution", "assistant_invocation"]>>;
1804
+ assistantId: z.ZodOptional<z.ZodString>;
1805
+ conversationId: z.ZodOptional<z.ZodString>;
1806
+ threadId: z.ZodOptional<z.ZodString>;
1807
+ unknownAssistantOnly: z.ZodOptional<z.ZodBoolean>;
1808
+ workspaceId: z.ZodOptional<z.ZodString>;
1809
+ recordedById: z.ZodOptional<z.ZodString>;
1810
+ source: z.ZodOptional<z.ZodString>;
1811
+ statuses: z.ZodOptional<z.ZodArray<z.ZodEnum<["running", "success", "error", "pending", "timeout", "interrupted", "unknown"]>, "many">>;
1812
+ search: z.ZodOptional<z.ZodString>;
1813
+ asOf: z.ZodOptional<z.ZodString>;
1814
+ } & {
1815
+ page: z.ZodDefault<z.ZodNumber>;
1816
+ pageSize: z.ZodDefault<z.ZodNumber>;
1817
+ }, "strict", z.ZodTypeAny, {
1818
+ page?: number;
1819
+ timeZone?: string;
1820
+ workspaceId?: string;
1821
+ search?: string;
1822
+ source?: string;
1823
+ conversationId?: string;
1824
+ from?: string;
1825
+ to?: string;
1826
+ threadId?: string;
1827
+ assistantId?: string;
1828
+ countingUnit?: "root_execution" | "assistant_invocation";
1829
+ unknownAssistantOnly?: boolean;
1830
+ recordedById?: string;
1831
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
1832
+ asOf?: string;
1833
+ pageSize?: number;
1834
+ }, {
1835
+ page?: number;
1836
+ timeZone?: string;
1837
+ workspaceId?: string;
1838
+ search?: string;
1839
+ source?: string;
1840
+ conversationId?: string;
1841
+ from?: string;
1842
+ to?: string;
1843
+ threadId?: string;
1844
+ assistantId?: string;
1845
+ countingUnit?: "root_execution" | "assistant_invocation";
1846
+ unknownAssistantOnly?: boolean;
1847
+ recordedById?: string;
1848
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
1849
+ asOf?: string;
1850
+ pageSize?: number;
1851
+ }>, {
1852
+ page?: number;
1853
+ timeZone?: string;
1854
+ workspaceId?: string;
1855
+ search?: string;
1856
+ source?: string;
1857
+ conversationId?: string;
1858
+ from?: string;
1859
+ to?: string;
1860
+ threadId?: string;
1861
+ assistantId?: string;
1862
+ countingUnit?: "root_execution" | "assistant_invocation";
1863
+ unknownAssistantOnly?: boolean;
1864
+ recordedById?: string;
1865
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
1866
+ asOf?: string;
1867
+ pageSize?: number;
1868
+ }, {
1869
+ page?: number;
1870
+ timeZone?: string;
1871
+ workspaceId?: string;
1872
+ search?: string;
1873
+ source?: string;
1874
+ conversationId?: string;
1875
+ from?: string;
1876
+ to?: string;
1877
+ threadId?: string;
1878
+ assistantId?: string;
1879
+ countingUnit?: "root_execution" | "assistant_invocation";
1880
+ unknownAssistantOnly?: boolean;
1881
+ recordedById?: string;
1882
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
1883
+ asOf?: string;
1884
+ pageSize?: number;
1885
+ }>;
1886
+ rule: z.ZodDefault<z.ZodEnum<["failed", "long_running", "slow_completed"]>>;
1887
+ thresholdMs: z.ZodDefault<z.ZodNumber>;
1888
+ limit: z.ZodDefault<z.ZodNumber>;
1889
+ }, "strict", z.ZodTypeAny, {
1890
+ query?: {
1891
+ page?: number;
1892
+ timeZone?: string;
1893
+ workspaceId?: string;
1894
+ search?: string;
1895
+ source?: string;
1896
+ conversationId?: string;
1897
+ from?: string;
1898
+ to?: string;
1899
+ threadId?: string;
1900
+ assistantId?: string;
1901
+ countingUnit?: "root_execution" | "assistant_invocation";
1902
+ unknownAssistantOnly?: boolean;
1903
+ recordedById?: string;
1904
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
1905
+ asOf?: string;
1906
+ pageSize?: number;
1907
+ };
1908
+ rule?: "failed" | "long_running" | "slow_completed";
1909
+ thresholdMs?: number;
1910
+ limit?: number;
1911
+ }, {
1912
+ query?: {
1913
+ page?: number;
1914
+ timeZone?: string;
1915
+ workspaceId?: string;
1916
+ search?: string;
1917
+ source?: string;
1918
+ conversationId?: string;
1919
+ from?: string;
1920
+ to?: string;
1921
+ threadId?: string;
1922
+ assistantId?: string;
1923
+ countingUnit?: "root_execution" | "assistant_invocation";
1924
+ unknownAssistantOnly?: boolean;
1925
+ recordedById?: string;
1926
+ statuses?: ("error" | "unknown" | "success" | "interrupted" | "running" | "pending" | "timeout")[];
1927
+ asOf?: string;
1928
+ pageSize?: number;
1929
+ };
1930
+ rule?: "failed" | "long_running" | "slow_completed";
1931
+ thresholdMs?: number;
1932
+ limit?: number;
1933
+ }>;
1934
+ export type ExecutionObservationComparison = {
1935
+ current: ExecutionObservationSummary;
1936
+ baseline: ExecutionObservationSummary;
1937
+ currentPerHour: number;
1938
+ baselinePerHour: number;
1939
+ countDelta: number;
1940
+ successRateDelta: number | null;
1941
+ };
1942
+ export type ExecutionObservationAnomalies = {
1943
+ rule: z.infer<typeof executionObservationAnomalySchema>['rule'];
1944
+ thresholdMs: number;
1945
+ items: ExecutionObservationRecord[];
1946
+ total: number;
1947
+ asOf: string;
1948
+ observedAt: string;
1949
+ };
1950
+ /** Complete conversation groups, paginated after aggregation so a group is never split. */
1951
+ export declare const executionObservationConversationSchema: z.ZodObject<{
1952
+ key: z.ZodString;
1953
+ conversationId: z.ZodNullable<z.ZodString>;
1954
+ threadId: z.ZodNullable<z.ZodString>;
1955
+ executionId: z.ZodNullable<z.ZodString>;
1956
+ total: z.ZodNumber;
1957
+ threads: z.ZodNumber;
1958
+ branches: z.ZodNumber;
1959
+ childExecutions: z.ZodNumber;
1960
+ failed: z.ZodNumber;
1961
+ unknownEnds: z.ZodNumber;
1962
+ overlap: z.ZodArray<z.ZodObject<{
1963
+ start: z.ZodString;
1964
+ end: z.ZodString;
1965
+ count: z.ZodNumber;
1966
+ }, "strip", z.ZodTypeAny, {
1967
+ end?: string;
1968
+ start?: string;
1969
+ count?: number;
1970
+ }, {
1971
+ end?: string;
1972
+ start?: string;
1973
+ count?: number;
1974
+ }>, "many">;
1975
+ failures: z.ZodArray<z.ZodObject<{
1976
+ id: z.ZodString;
1977
+ completedAt: z.ZodString;
1978
+ }, "strip", z.ZodTypeAny, {
1979
+ id?: string;
1980
+ completedAt?: string;
1981
+ }, {
1982
+ id?: string;
1983
+ completedAt?: string;
1984
+ }>, "many">;
1985
+ }, "strip", z.ZodTypeAny, {
1986
+ failed?: number;
1987
+ total?: number;
1988
+ key?: string;
1989
+ conversationId?: string;
1990
+ executionId?: string;
1991
+ threadId?: string;
1992
+ overlap?: {
1993
+ end?: string;
1994
+ start?: string;
1995
+ count?: number;
1996
+ }[];
1997
+ unknownEnds?: number;
1998
+ failures?: {
1999
+ id?: string;
2000
+ completedAt?: string;
2001
+ }[];
2002
+ threads?: number;
2003
+ branches?: number;
2004
+ childExecutions?: number;
2005
+ }, {
2006
+ failed?: number;
2007
+ total?: number;
2008
+ key?: string;
2009
+ conversationId?: string;
2010
+ executionId?: string;
2011
+ threadId?: string;
2012
+ overlap?: {
2013
+ end?: string;
2014
+ start?: string;
2015
+ count?: number;
2016
+ }[];
2017
+ unknownEnds?: number;
2018
+ failures?: {
2019
+ id?: string;
2020
+ completedAt?: string;
2021
+ }[];
2022
+ threads?: number;
2023
+ branches?: number;
2024
+ childExecutions?: number;
2025
+ }>;
2026
+ export type ExecutionObservationConversation = z.infer<typeof executionObservationConversationSchema>;
2027
+ export declare const executionObservationConversationsSchema: z.ZodObject<{
2028
+ items: z.ZodArray<z.ZodObject<{
2029
+ key: z.ZodString;
2030
+ conversationId: z.ZodNullable<z.ZodString>;
2031
+ threadId: z.ZodNullable<z.ZodString>;
2032
+ executionId: z.ZodNullable<z.ZodString>;
2033
+ total: z.ZodNumber;
2034
+ threads: z.ZodNumber;
2035
+ branches: z.ZodNumber;
2036
+ childExecutions: z.ZodNumber;
2037
+ failed: z.ZodNumber;
2038
+ unknownEnds: z.ZodNumber;
2039
+ overlap: z.ZodArray<z.ZodObject<{
2040
+ start: z.ZodString;
2041
+ end: z.ZodString;
2042
+ count: z.ZodNumber;
2043
+ }, "strip", z.ZodTypeAny, {
2044
+ end?: string;
2045
+ start?: string;
2046
+ count?: number;
2047
+ }, {
2048
+ end?: string;
2049
+ start?: string;
2050
+ count?: number;
2051
+ }>, "many">;
2052
+ failures: z.ZodArray<z.ZodObject<{
2053
+ id: z.ZodString;
2054
+ completedAt: z.ZodString;
2055
+ }, "strip", z.ZodTypeAny, {
2056
+ id?: string;
2057
+ completedAt?: string;
2058
+ }, {
2059
+ id?: string;
2060
+ completedAt?: string;
2061
+ }>, "many">;
2062
+ }, "strip", z.ZodTypeAny, {
2063
+ failed?: number;
2064
+ total?: number;
2065
+ key?: string;
2066
+ conversationId?: string;
2067
+ executionId?: string;
2068
+ threadId?: string;
2069
+ overlap?: {
2070
+ end?: string;
2071
+ start?: string;
2072
+ count?: number;
2073
+ }[];
2074
+ unknownEnds?: number;
2075
+ failures?: {
2076
+ id?: string;
2077
+ completedAt?: string;
2078
+ }[];
2079
+ threads?: number;
2080
+ branches?: number;
2081
+ childExecutions?: number;
2082
+ }, {
2083
+ failed?: number;
2084
+ total?: number;
2085
+ key?: string;
2086
+ conversationId?: string;
2087
+ executionId?: string;
2088
+ threadId?: string;
2089
+ overlap?: {
2090
+ end?: string;
2091
+ start?: string;
2092
+ count?: number;
2093
+ }[];
2094
+ unknownEnds?: number;
2095
+ failures?: {
2096
+ id?: string;
2097
+ completedAt?: string;
2098
+ }[];
2099
+ threads?: number;
2100
+ branches?: number;
2101
+ childExecutions?: number;
2102
+ }>, "many">;
2103
+ total: z.ZodNumber;
2104
+ page: z.ZodNumber;
2105
+ pageSize: z.ZodNumber;
2106
+ asOf: z.ZodString;
2107
+ observedAt: z.ZodString;
2108
+ }, "strip", z.ZodTypeAny, {
2109
+ page?: number;
2110
+ total?: number;
2111
+ items?: {
2112
+ failed?: number;
2113
+ total?: number;
2114
+ key?: string;
2115
+ conversationId?: string;
2116
+ executionId?: string;
2117
+ threadId?: string;
2118
+ overlap?: {
2119
+ end?: string;
2120
+ start?: string;
2121
+ count?: number;
2122
+ }[];
2123
+ unknownEnds?: number;
2124
+ failures?: {
2125
+ id?: string;
2126
+ completedAt?: string;
2127
+ }[];
2128
+ threads?: number;
2129
+ branches?: number;
2130
+ childExecutions?: number;
2131
+ }[];
2132
+ observedAt?: string;
2133
+ asOf?: string;
2134
+ pageSize?: number;
2135
+ }, {
2136
+ page?: number;
2137
+ total?: number;
2138
+ items?: {
2139
+ failed?: number;
2140
+ total?: number;
2141
+ key?: string;
2142
+ conversationId?: string;
2143
+ executionId?: string;
2144
+ threadId?: string;
2145
+ overlap?: {
2146
+ end?: string;
2147
+ start?: string;
2148
+ count?: number;
2149
+ }[];
2150
+ unknownEnds?: number;
2151
+ failures?: {
2152
+ id?: string;
2153
+ completedAt?: string;
2154
+ }[];
2155
+ threads?: number;
2156
+ branches?: number;
2157
+ childExecutions?: number;
2158
+ }[];
2159
+ observedAt?: string;
2160
+ asOf?: string;
2161
+ pageSize?: number;
2162
+ }>;
2163
+ export type ExecutionObservationConversations = z.infer<typeof executionObservationConversationsSchema>;