@ag-ui/core 0.0.28 → 0.0.30
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.mts +366 -260
- package/dist/index.d.ts +366 -260
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +42 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -55,15 +55,13 @@ declare const BaseMessageSchema: z.ZodObject<{
|
|
|
55
55
|
name?: string | undefined;
|
|
56
56
|
content?: string | undefined;
|
|
57
57
|
}>;
|
|
58
|
-
declare const DeveloperMessageSchema: z.ZodObject<
|
|
58
|
+
declare const DeveloperMessageSchema: z.ZodObject<{
|
|
59
59
|
id: z.ZodString;
|
|
60
|
-
role: z.ZodString;
|
|
61
|
-
content: z.ZodOptional<z.ZodString>;
|
|
62
60
|
name: z.ZodOptional<z.ZodString>;
|
|
63
|
-
}
|
|
61
|
+
} & {
|
|
64
62
|
role: z.ZodLiteral<"developer">;
|
|
65
63
|
content: z.ZodString;
|
|
66
|
-
}
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
67
65
|
id: string;
|
|
68
66
|
role: "developer";
|
|
69
67
|
content: string;
|
|
@@ -74,15 +72,13 @@ declare const DeveloperMessageSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
74
72
|
content: string;
|
|
75
73
|
name?: string | undefined;
|
|
76
74
|
}>;
|
|
77
|
-
declare const SystemMessageSchema: z.ZodObject<
|
|
75
|
+
declare const SystemMessageSchema: z.ZodObject<{
|
|
78
76
|
id: z.ZodString;
|
|
79
|
-
role: z.ZodString;
|
|
80
|
-
content: z.ZodOptional<z.ZodString>;
|
|
81
77
|
name: z.ZodOptional<z.ZodString>;
|
|
82
|
-
}
|
|
78
|
+
} & {
|
|
83
79
|
role: z.ZodLiteral<"system">;
|
|
84
80
|
content: z.ZodString;
|
|
85
|
-
}
|
|
81
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
82
|
id: string;
|
|
87
83
|
role: "system";
|
|
88
84
|
content: string;
|
|
@@ -93,12 +89,10 @@ declare const SystemMessageSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
93
89
|
content: string;
|
|
94
90
|
name?: string | undefined;
|
|
95
91
|
}>;
|
|
96
|
-
declare const AssistantMessageSchema: z.ZodObject<
|
|
92
|
+
declare const AssistantMessageSchema: z.ZodObject<{
|
|
97
93
|
id: z.ZodString;
|
|
98
|
-
role: z.ZodString;
|
|
99
|
-
content: z.ZodOptional<z.ZodString>;
|
|
100
94
|
name: z.ZodOptional<z.ZodString>;
|
|
101
|
-
}
|
|
95
|
+
} & {
|
|
102
96
|
role: z.ZodLiteral<"assistant">;
|
|
103
97
|
content: z.ZodOptional<z.ZodString>;
|
|
104
98
|
toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -129,7 +123,7 @@ declare const AssistantMessageSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
129
123
|
type: "function";
|
|
130
124
|
id: string;
|
|
131
125
|
}>, "many">>;
|
|
132
|
-
}
|
|
126
|
+
}, "strip", z.ZodTypeAny, {
|
|
133
127
|
id: string;
|
|
134
128
|
role: "assistant";
|
|
135
129
|
name?: string | undefined;
|
|
@@ -156,15 +150,13 @@ declare const AssistantMessageSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
156
150
|
id: string;
|
|
157
151
|
}[] | undefined;
|
|
158
152
|
}>;
|
|
159
|
-
declare const UserMessageSchema: z.ZodObject<
|
|
153
|
+
declare const UserMessageSchema: z.ZodObject<{
|
|
160
154
|
id: z.ZodString;
|
|
161
|
-
role: z.ZodString;
|
|
162
|
-
content: z.ZodOptional<z.ZodString>;
|
|
163
155
|
name: z.ZodOptional<z.ZodString>;
|
|
164
|
-
}
|
|
156
|
+
} & {
|
|
165
157
|
role: z.ZodLiteral<"user">;
|
|
166
158
|
content: z.ZodString;
|
|
167
|
-
}
|
|
159
|
+
}, "strip", z.ZodTypeAny, {
|
|
168
160
|
id: string;
|
|
169
161
|
role: "user";
|
|
170
162
|
content: string;
|
|
@@ -191,15 +183,13 @@ declare const ToolMessageSchema: z.ZodObject<{
|
|
|
191
183
|
content: string;
|
|
192
184
|
toolCallId: string;
|
|
193
185
|
}>;
|
|
194
|
-
declare const MessageSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject<
|
|
186
|
+
declare const MessageSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
|
|
195
187
|
id: z.ZodString;
|
|
196
|
-
role: z.ZodString;
|
|
197
|
-
content: z.ZodOptional<z.ZodString>;
|
|
198
188
|
name: z.ZodOptional<z.ZodString>;
|
|
199
|
-
}
|
|
189
|
+
} & {
|
|
200
190
|
role: z.ZodLiteral<"developer">;
|
|
201
191
|
content: z.ZodString;
|
|
202
|
-
}
|
|
192
|
+
}, "strip", z.ZodTypeAny, {
|
|
203
193
|
id: string;
|
|
204
194
|
role: "developer";
|
|
205
195
|
content: string;
|
|
@@ -209,15 +199,13 @@ declare const MessageSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject<z.obje
|
|
|
209
199
|
role: "developer";
|
|
210
200
|
content: string;
|
|
211
201
|
name?: string | undefined;
|
|
212
|
-
}>, z.ZodObject<
|
|
202
|
+
}>, z.ZodObject<{
|
|
213
203
|
id: z.ZodString;
|
|
214
|
-
role: z.ZodString;
|
|
215
|
-
content: z.ZodOptional<z.ZodString>;
|
|
216
204
|
name: z.ZodOptional<z.ZodString>;
|
|
217
|
-
}
|
|
205
|
+
} & {
|
|
218
206
|
role: z.ZodLiteral<"system">;
|
|
219
207
|
content: z.ZodString;
|
|
220
|
-
}
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
221
209
|
id: string;
|
|
222
210
|
role: "system";
|
|
223
211
|
content: string;
|
|
@@ -227,12 +215,10 @@ declare const MessageSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject<z.obje
|
|
|
227
215
|
role: "system";
|
|
228
216
|
content: string;
|
|
229
217
|
name?: string | undefined;
|
|
230
|
-
}>, z.ZodObject<
|
|
218
|
+
}>, z.ZodObject<{
|
|
231
219
|
id: z.ZodString;
|
|
232
|
-
role: z.ZodString;
|
|
233
|
-
content: z.ZodOptional<z.ZodString>;
|
|
234
220
|
name: z.ZodOptional<z.ZodString>;
|
|
235
|
-
}
|
|
221
|
+
} & {
|
|
236
222
|
role: z.ZodLiteral<"assistant">;
|
|
237
223
|
content: z.ZodOptional<z.ZodString>;
|
|
238
224
|
toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -263,7 +249,7 @@ declare const MessageSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject<z.obje
|
|
|
263
249
|
type: "function";
|
|
264
250
|
id: string;
|
|
265
251
|
}>, "many">>;
|
|
266
|
-
}
|
|
252
|
+
}, "strip", z.ZodTypeAny, {
|
|
267
253
|
id: string;
|
|
268
254
|
role: "assistant";
|
|
269
255
|
name?: string | undefined;
|
|
@@ -289,15 +275,13 @@ declare const MessageSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject<z.obje
|
|
|
289
275
|
type: "function";
|
|
290
276
|
id: string;
|
|
291
277
|
}[] | undefined;
|
|
292
|
-
}>, z.ZodObject<
|
|
278
|
+
}>, z.ZodObject<{
|
|
293
279
|
id: z.ZodString;
|
|
294
|
-
role: z.ZodString;
|
|
295
|
-
content: z.ZodOptional<z.ZodString>;
|
|
296
280
|
name: z.ZodOptional<z.ZodString>;
|
|
297
|
-
}
|
|
281
|
+
} & {
|
|
298
282
|
role: z.ZodLiteral<"user">;
|
|
299
283
|
content: z.ZodString;
|
|
300
|
-
}
|
|
284
|
+
}, "strip", z.ZodTypeAny, {
|
|
301
285
|
id: string;
|
|
302
286
|
role: "user";
|
|
303
287
|
content: string;
|
|
@@ -351,15 +335,13 @@ declare const RunAgentInputSchema: z.ZodObject<{
|
|
|
351
335
|
threadId: z.ZodString;
|
|
352
336
|
runId: z.ZodString;
|
|
353
337
|
state: z.ZodAny;
|
|
354
|
-
messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<
|
|
338
|
+
messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
|
|
355
339
|
id: z.ZodString;
|
|
356
|
-
role: z.ZodString;
|
|
357
|
-
content: z.ZodOptional<z.ZodString>;
|
|
358
340
|
name: z.ZodOptional<z.ZodString>;
|
|
359
|
-
}
|
|
341
|
+
} & {
|
|
360
342
|
role: z.ZodLiteral<"developer">;
|
|
361
343
|
content: z.ZodString;
|
|
362
|
-
}
|
|
344
|
+
}, "strip", z.ZodTypeAny, {
|
|
363
345
|
id: string;
|
|
364
346
|
role: "developer";
|
|
365
347
|
content: string;
|
|
@@ -369,15 +351,13 @@ declare const RunAgentInputSchema: z.ZodObject<{
|
|
|
369
351
|
role: "developer";
|
|
370
352
|
content: string;
|
|
371
353
|
name?: string | undefined;
|
|
372
|
-
}>, z.ZodObject<
|
|
354
|
+
}>, z.ZodObject<{
|
|
373
355
|
id: z.ZodString;
|
|
374
|
-
role: z.ZodString;
|
|
375
|
-
content: z.ZodOptional<z.ZodString>;
|
|
376
356
|
name: z.ZodOptional<z.ZodString>;
|
|
377
|
-
}
|
|
357
|
+
} & {
|
|
378
358
|
role: z.ZodLiteral<"system">;
|
|
379
359
|
content: z.ZodString;
|
|
380
|
-
}
|
|
360
|
+
}, "strip", z.ZodTypeAny, {
|
|
381
361
|
id: string;
|
|
382
362
|
role: "system";
|
|
383
363
|
content: string;
|
|
@@ -387,12 +367,10 @@ declare const RunAgentInputSchema: z.ZodObject<{
|
|
|
387
367
|
role: "system";
|
|
388
368
|
content: string;
|
|
389
369
|
name?: string | undefined;
|
|
390
|
-
}>, z.ZodObject<
|
|
370
|
+
}>, z.ZodObject<{
|
|
391
371
|
id: z.ZodString;
|
|
392
|
-
role: z.ZodString;
|
|
393
|
-
content: z.ZodOptional<z.ZodString>;
|
|
394
372
|
name: z.ZodOptional<z.ZodString>;
|
|
395
|
-
}
|
|
373
|
+
} & {
|
|
396
374
|
role: z.ZodLiteral<"assistant">;
|
|
397
375
|
content: z.ZodOptional<z.ZodString>;
|
|
398
376
|
toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -423,7 +401,7 @@ declare const RunAgentInputSchema: z.ZodObject<{
|
|
|
423
401
|
type: "function";
|
|
424
402
|
id: string;
|
|
425
403
|
}>, "many">>;
|
|
426
|
-
}
|
|
404
|
+
}, "strip", z.ZodTypeAny, {
|
|
427
405
|
id: string;
|
|
428
406
|
role: "assistant";
|
|
429
407
|
name?: string | undefined;
|
|
@@ -449,15 +427,13 @@ declare const RunAgentInputSchema: z.ZodObject<{
|
|
|
449
427
|
type: "function";
|
|
450
428
|
id: string;
|
|
451
429
|
}[] | undefined;
|
|
452
|
-
}>, z.ZodObject<
|
|
430
|
+
}>, z.ZodObject<{
|
|
453
431
|
id: z.ZodString;
|
|
454
|
-
role: z.ZodString;
|
|
455
|
-
content: z.ZodOptional<z.ZodString>;
|
|
456
432
|
name: z.ZodOptional<z.ZodString>;
|
|
457
|
-
}
|
|
433
|
+
} & {
|
|
458
434
|
role: z.ZodLiteral<"user">;
|
|
459
435
|
content: z.ZodString;
|
|
460
|
-
}
|
|
436
|
+
}, "strip", z.ZodTypeAny, {
|
|
461
437
|
id: string;
|
|
462
438
|
role: "user";
|
|
463
439
|
content: string;
|
|
@@ -627,10 +603,16 @@ declare enum EventType {
|
|
|
627
603
|
TEXT_MESSAGE_CONTENT = "TEXT_MESSAGE_CONTENT",
|
|
628
604
|
TEXT_MESSAGE_END = "TEXT_MESSAGE_END",
|
|
629
605
|
TEXT_MESSAGE_CHUNK = "TEXT_MESSAGE_CHUNK",
|
|
606
|
+
THINKING_TEXT_MESSAGE_START = "THINKING_TEXT_MESSAGE_START",
|
|
607
|
+
THINKING_TEXT_MESSAGE_CONTENT = "THINKING_TEXT_MESSAGE_CONTENT",
|
|
608
|
+
THINKING_TEXT_MESSAGE_END = "THINKING_TEXT_MESSAGE_END",
|
|
630
609
|
TOOL_CALL_START = "TOOL_CALL_START",
|
|
631
610
|
TOOL_CALL_ARGS = "TOOL_CALL_ARGS",
|
|
632
611
|
TOOL_CALL_END = "TOOL_CALL_END",
|
|
633
612
|
TOOL_CALL_CHUNK = "TOOL_CALL_CHUNK",
|
|
613
|
+
TOOL_CALL_RESULT = "TOOL_CALL_RESULT",
|
|
614
|
+
THINKING_START = "THINKING_START",
|
|
615
|
+
THINKING_END = "THINKING_END",
|
|
634
616
|
STATE_SNAPSHOT = "STATE_SNAPSHOT",
|
|
635
617
|
STATE_DELTA = "STATE_DELTA",
|
|
636
618
|
MESSAGES_SNAPSHOT = "MESSAGES_SNAPSHOT",
|
|
@@ -655,15 +637,14 @@ declare const BaseEventSchema: z.ZodObject<{
|
|
|
655
637
|
timestamp?: number | undefined;
|
|
656
638
|
rawEvent?: any;
|
|
657
639
|
}>;
|
|
658
|
-
declare const RunStartedSchema: z.ZodObject<
|
|
659
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
640
|
+
declare const RunStartedSchema: z.ZodObject<{
|
|
660
641
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
661
642
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
662
|
-
}
|
|
643
|
+
} & {
|
|
663
644
|
type: z.ZodLiteral<EventType.RUN_STARTED>;
|
|
664
645
|
threadId: z.ZodString;
|
|
665
646
|
runId: z.ZodString;
|
|
666
|
-
}
|
|
647
|
+
}, "strip", z.ZodTypeAny, {
|
|
667
648
|
type: EventType.RUN_STARTED;
|
|
668
649
|
threadId: string;
|
|
669
650
|
runId: string;
|
|
@@ -676,15 +657,14 @@ declare const RunStartedSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
676
657
|
timestamp?: number | undefined;
|
|
677
658
|
rawEvent?: any;
|
|
678
659
|
}>;
|
|
679
|
-
declare const RunFinishedSchema: z.ZodObject<
|
|
680
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
660
|
+
declare const RunFinishedSchema: z.ZodObject<{
|
|
681
661
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
682
662
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
683
|
-
}
|
|
663
|
+
} & {
|
|
684
664
|
type: z.ZodLiteral<EventType.RUN_FINISHED>;
|
|
685
665
|
threadId: z.ZodString;
|
|
686
666
|
runId: z.ZodString;
|
|
687
|
-
}
|
|
667
|
+
}, "strip", z.ZodTypeAny, {
|
|
688
668
|
type: EventType.RUN_FINISHED;
|
|
689
669
|
threadId: string;
|
|
690
670
|
runId: string;
|
|
@@ -697,15 +677,14 @@ declare const RunFinishedSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
697
677
|
timestamp?: number | undefined;
|
|
698
678
|
rawEvent?: any;
|
|
699
679
|
}>;
|
|
700
|
-
declare const RunErrorSchema: z.ZodObject<
|
|
701
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
680
|
+
declare const RunErrorSchema: z.ZodObject<{
|
|
702
681
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
703
682
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
704
|
-
}
|
|
683
|
+
} & {
|
|
705
684
|
type: z.ZodLiteral<EventType.RUN_ERROR>;
|
|
706
685
|
message: z.ZodString;
|
|
707
686
|
code: z.ZodOptional<z.ZodString>;
|
|
708
|
-
}
|
|
687
|
+
}, "strip", z.ZodTypeAny, {
|
|
709
688
|
message: string;
|
|
710
689
|
type: EventType.RUN_ERROR;
|
|
711
690
|
code?: string | undefined;
|
|
@@ -718,14 +697,13 @@ declare const RunErrorSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
718
697
|
timestamp?: number | undefined;
|
|
719
698
|
rawEvent?: any;
|
|
720
699
|
}>;
|
|
721
|
-
declare const StepStartedSchema: z.ZodObject<
|
|
722
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
700
|
+
declare const StepStartedSchema: z.ZodObject<{
|
|
723
701
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
724
702
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
725
|
-
}
|
|
703
|
+
} & {
|
|
726
704
|
type: z.ZodLiteral<EventType.STEP_STARTED>;
|
|
727
705
|
stepName: z.ZodString;
|
|
728
|
-
}
|
|
706
|
+
}, "strip", z.ZodTypeAny, {
|
|
729
707
|
type: EventType.STEP_STARTED;
|
|
730
708
|
stepName: string;
|
|
731
709
|
timestamp?: number | undefined;
|
|
@@ -736,14 +714,13 @@ declare const StepStartedSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
736
714
|
timestamp?: number | undefined;
|
|
737
715
|
rawEvent?: any;
|
|
738
716
|
}>;
|
|
739
|
-
declare const StepFinishedSchema: z.ZodObject<
|
|
740
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
717
|
+
declare const StepFinishedSchema: z.ZodObject<{
|
|
741
718
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
742
719
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
743
|
-
}
|
|
720
|
+
} & {
|
|
744
721
|
type: z.ZodLiteral<EventType.STEP_FINISHED>;
|
|
745
722
|
stepName: z.ZodString;
|
|
746
|
-
}
|
|
723
|
+
}, "strip", z.ZodTypeAny, {
|
|
747
724
|
type: EventType.STEP_FINISHED;
|
|
748
725
|
stepName: string;
|
|
749
726
|
timestamp?: number | undefined;
|
|
@@ -754,15 +731,14 @@ declare const StepFinishedSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
754
731
|
timestamp?: number | undefined;
|
|
755
732
|
rawEvent?: any;
|
|
756
733
|
}>;
|
|
757
|
-
declare const TextMessageStartEventSchema: z.ZodObject<
|
|
758
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
734
|
+
declare const TextMessageStartEventSchema: z.ZodObject<{
|
|
759
735
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
760
736
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
761
|
-
}
|
|
737
|
+
} & {
|
|
762
738
|
type: z.ZodLiteral<EventType.TEXT_MESSAGE_START>;
|
|
763
739
|
messageId: z.ZodString;
|
|
764
740
|
role: z.ZodLiteral<"assistant">;
|
|
765
|
-
}
|
|
741
|
+
}, "strip", z.ZodTypeAny, {
|
|
766
742
|
type: EventType.TEXT_MESSAGE_START;
|
|
767
743
|
role: "assistant";
|
|
768
744
|
messageId: string;
|
|
@@ -775,15 +751,14 @@ declare const TextMessageStartEventSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
775
751
|
timestamp?: number | undefined;
|
|
776
752
|
rawEvent?: any;
|
|
777
753
|
}>;
|
|
778
|
-
declare const TextMessageContentEventSchema: z.ZodObject<
|
|
779
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
754
|
+
declare const TextMessageContentEventSchema: z.ZodObject<{
|
|
780
755
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
781
756
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
782
|
-
}
|
|
757
|
+
} & {
|
|
783
758
|
type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
|
|
784
759
|
messageId: z.ZodString;
|
|
785
760
|
delta: z.ZodEffects<z.ZodString, string, string>;
|
|
786
|
-
}
|
|
761
|
+
}, "strip", z.ZodTypeAny, {
|
|
787
762
|
type: EventType.TEXT_MESSAGE_CONTENT;
|
|
788
763
|
messageId: string;
|
|
789
764
|
delta: string;
|
|
@@ -796,14 +771,13 @@ declare const TextMessageContentEventSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
796
771
|
timestamp?: number | undefined;
|
|
797
772
|
rawEvent?: any;
|
|
798
773
|
}>;
|
|
799
|
-
declare const TextMessageEndEventSchema: z.ZodObject<
|
|
800
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
774
|
+
declare const TextMessageEndEventSchema: z.ZodObject<{
|
|
801
775
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
802
776
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
803
|
-
}
|
|
777
|
+
} & {
|
|
804
778
|
type: z.ZodLiteral<EventType.TEXT_MESSAGE_END>;
|
|
805
779
|
messageId: z.ZodString;
|
|
806
|
-
}
|
|
780
|
+
}, "strip", z.ZodTypeAny, {
|
|
807
781
|
type: EventType.TEXT_MESSAGE_END;
|
|
808
782
|
messageId: string;
|
|
809
783
|
timestamp?: number | undefined;
|
|
@@ -814,16 +788,15 @@ declare const TextMessageEndEventSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
814
788
|
timestamp?: number | undefined;
|
|
815
789
|
rawEvent?: any;
|
|
816
790
|
}>;
|
|
817
|
-
declare const TextMessageChunkEventSchema: z.ZodObject<
|
|
818
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
791
|
+
declare const TextMessageChunkEventSchema: z.ZodObject<{
|
|
819
792
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
820
793
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
821
|
-
}
|
|
794
|
+
} & {
|
|
822
795
|
type: z.ZodLiteral<EventType.TEXT_MESSAGE_CHUNK>;
|
|
823
796
|
messageId: z.ZodOptional<z.ZodString>;
|
|
824
797
|
role: z.ZodOptional<z.ZodLiteral<"assistant">>;
|
|
825
798
|
delta: z.ZodOptional<z.ZodString>;
|
|
826
|
-
}
|
|
799
|
+
}, "strip", z.ZodTypeAny, {
|
|
827
800
|
type: EventType.TEXT_MESSAGE_CHUNK;
|
|
828
801
|
role?: "assistant" | undefined;
|
|
829
802
|
timestamp?: number | undefined;
|
|
@@ -838,16 +811,63 @@ declare const TextMessageChunkEventSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
838
811
|
messageId?: string | undefined;
|
|
839
812
|
delta?: string | undefined;
|
|
840
813
|
}>;
|
|
841
|
-
declare const
|
|
842
|
-
|
|
814
|
+
declare const ThinkingTextMessageStartEventSchema: z.ZodObject<{
|
|
815
|
+
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
816
|
+
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
817
|
+
} & {
|
|
818
|
+
type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_START>;
|
|
819
|
+
}, "strip", z.ZodTypeAny, {
|
|
820
|
+
type: EventType.THINKING_TEXT_MESSAGE_START;
|
|
821
|
+
timestamp?: number | undefined;
|
|
822
|
+
rawEvent?: any;
|
|
823
|
+
}, {
|
|
824
|
+
type: EventType.THINKING_TEXT_MESSAGE_START;
|
|
825
|
+
timestamp?: number | undefined;
|
|
826
|
+
rawEvent?: any;
|
|
827
|
+
}>;
|
|
828
|
+
declare const ThinkingTextMessageContentEventSchema: z.ZodObject<Omit<{
|
|
843
829
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
844
830
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
831
|
+
} & {
|
|
832
|
+
type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
|
|
833
|
+
messageId: z.ZodString;
|
|
834
|
+
delta: z.ZodEffects<z.ZodString, string, string>;
|
|
835
|
+
}, "type" | "messageId"> & {
|
|
836
|
+
type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_CONTENT>;
|
|
837
|
+
}, "strip", z.ZodTypeAny, {
|
|
838
|
+
type: EventType.THINKING_TEXT_MESSAGE_CONTENT;
|
|
839
|
+
delta: string;
|
|
840
|
+
timestamp?: number | undefined;
|
|
841
|
+
rawEvent?: any;
|
|
845
842
|
}, {
|
|
843
|
+
type: EventType.THINKING_TEXT_MESSAGE_CONTENT;
|
|
844
|
+
delta: string;
|
|
845
|
+
timestamp?: number | undefined;
|
|
846
|
+
rawEvent?: any;
|
|
847
|
+
}>;
|
|
848
|
+
declare const ThinkingTextMessageEndEventSchema: z.ZodObject<{
|
|
849
|
+
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
850
|
+
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
851
|
+
} & {
|
|
852
|
+
type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_END>;
|
|
853
|
+
}, "strip", z.ZodTypeAny, {
|
|
854
|
+
type: EventType.THINKING_TEXT_MESSAGE_END;
|
|
855
|
+
timestamp?: number | undefined;
|
|
856
|
+
rawEvent?: any;
|
|
857
|
+
}, {
|
|
858
|
+
type: EventType.THINKING_TEXT_MESSAGE_END;
|
|
859
|
+
timestamp?: number | undefined;
|
|
860
|
+
rawEvent?: any;
|
|
861
|
+
}>;
|
|
862
|
+
declare const ToolCallStartEventSchema: z.ZodObject<{
|
|
863
|
+
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
864
|
+
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
865
|
+
} & {
|
|
846
866
|
type: z.ZodLiteral<EventType.TOOL_CALL_START>;
|
|
847
867
|
toolCallId: z.ZodString;
|
|
848
868
|
toolCallName: z.ZodString;
|
|
849
869
|
parentMessageId: z.ZodOptional<z.ZodString>;
|
|
850
|
-
}
|
|
870
|
+
}, "strip", z.ZodTypeAny, {
|
|
851
871
|
type: EventType.TOOL_CALL_START;
|
|
852
872
|
toolCallId: string;
|
|
853
873
|
toolCallName: string;
|
|
@@ -862,15 +882,14 @@ declare const ToolCallStartEventSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
862
882
|
rawEvent?: any;
|
|
863
883
|
parentMessageId?: string | undefined;
|
|
864
884
|
}>;
|
|
865
|
-
declare const ToolCallArgsEventSchema: z.ZodObject<
|
|
866
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
885
|
+
declare const ToolCallArgsEventSchema: z.ZodObject<{
|
|
867
886
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
868
887
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
869
|
-
}
|
|
888
|
+
} & {
|
|
870
889
|
type: z.ZodLiteral<EventType.TOOL_CALL_ARGS>;
|
|
871
890
|
toolCallId: z.ZodString;
|
|
872
891
|
delta: z.ZodString;
|
|
873
|
-
}
|
|
892
|
+
}, "strip", z.ZodTypeAny, {
|
|
874
893
|
type: EventType.TOOL_CALL_ARGS;
|
|
875
894
|
toolCallId: string;
|
|
876
895
|
delta: string;
|
|
@@ -883,14 +902,13 @@ declare const ToolCallArgsEventSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
883
902
|
timestamp?: number | undefined;
|
|
884
903
|
rawEvent?: any;
|
|
885
904
|
}>;
|
|
886
|
-
declare const ToolCallEndEventSchema: z.ZodObject<
|
|
887
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
905
|
+
declare const ToolCallEndEventSchema: z.ZodObject<{
|
|
888
906
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
889
907
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
890
|
-
}
|
|
908
|
+
} & {
|
|
891
909
|
type: z.ZodLiteral<EventType.TOOL_CALL_END>;
|
|
892
910
|
toolCallId: z.ZodString;
|
|
893
|
-
}
|
|
911
|
+
}, "strip", z.ZodTypeAny, {
|
|
894
912
|
type: EventType.TOOL_CALL_END;
|
|
895
913
|
toolCallId: string;
|
|
896
914
|
timestamp?: number | undefined;
|
|
@@ -901,17 +919,42 @@ declare const ToolCallEndEventSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
901
919
|
timestamp?: number | undefined;
|
|
902
920
|
rawEvent?: any;
|
|
903
921
|
}>;
|
|
904
|
-
declare const
|
|
905
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
922
|
+
declare const ToolCallResultEventSchema: z.ZodObject<{
|
|
906
923
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
907
924
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
925
|
+
} & {
|
|
926
|
+
messageId: z.ZodString;
|
|
927
|
+
type: z.ZodLiteral<EventType.TOOL_CALL_RESULT>;
|
|
928
|
+
toolCallId: z.ZodString;
|
|
929
|
+
content: z.ZodString;
|
|
930
|
+
role: z.ZodOptional<z.ZodLiteral<"tool">>;
|
|
931
|
+
}, "strip", z.ZodTypeAny, {
|
|
932
|
+
type: EventType.TOOL_CALL_RESULT;
|
|
933
|
+
content: string;
|
|
934
|
+
toolCallId: string;
|
|
935
|
+
messageId: string;
|
|
936
|
+
role?: "tool" | undefined;
|
|
937
|
+
timestamp?: number | undefined;
|
|
938
|
+
rawEvent?: any;
|
|
908
939
|
}, {
|
|
940
|
+
type: EventType.TOOL_CALL_RESULT;
|
|
941
|
+
content: string;
|
|
942
|
+
toolCallId: string;
|
|
943
|
+
messageId: string;
|
|
944
|
+
role?: "tool" | undefined;
|
|
945
|
+
timestamp?: number | undefined;
|
|
946
|
+
rawEvent?: any;
|
|
947
|
+
}>;
|
|
948
|
+
declare const ToolCallChunkEventSchema: z.ZodObject<{
|
|
949
|
+
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
950
|
+
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
951
|
+
} & {
|
|
909
952
|
type: z.ZodLiteral<EventType.TOOL_CALL_CHUNK>;
|
|
910
953
|
toolCallId: z.ZodOptional<z.ZodString>;
|
|
911
954
|
toolCallName: z.ZodOptional<z.ZodString>;
|
|
912
955
|
parentMessageId: z.ZodOptional<z.ZodString>;
|
|
913
956
|
delta: z.ZodOptional<z.ZodString>;
|
|
914
|
-
}
|
|
957
|
+
}, "strip", z.ZodTypeAny, {
|
|
915
958
|
type: EventType.TOOL_CALL_CHUNK;
|
|
916
959
|
toolCallId?: string | undefined;
|
|
917
960
|
timestamp?: number | undefined;
|
|
@@ -928,14 +971,44 @@ declare const ToolCallChunkEventSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
928
971
|
toolCallName?: string | undefined;
|
|
929
972
|
parentMessageId?: string | undefined;
|
|
930
973
|
}>;
|
|
931
|
-
declare const
|
|
932
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
974
|
+
declare const ThinkingStartEventSchema: z.ZodObject<{
|
|
933
975
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
934
976
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
977
|
+
} & {
|
|
978
|
+
type: z.ZodLiteral<EventType.THINKING_START>;
|
|
979
|
+
title: z.ZodOptional<z.ZodString>;
|
|
980
|
+
}, "strip", z.ZodTypeAny, {
|
|
981
|
+
type: EventType.THINKING_START;
|
|
982
|
+
timestamp?: number | undefined;
|
|
983
|
+
rawEvent?: any;
|
|
984
|
+
title?: string | undefined;
|
|
935
985
|
}, {
|
|
986
|
+
type: EventType.THINKING_START;
|
|
987
|
+
timestamp?: number | undefined;
|
|
988
|
+
rawEvent?: any;
|
|
989
|
+
title?: string | undefined;
|
|
990
|
+
}>;
|
|
991
|
+
declare const ThinkingEndEventSchema: z.ZodObject<{
|
|
992
|
+
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
993
|
+
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
994
|
+
} & {
|
|
995
|
+
type: z.ZodLiteral<EventType.THINKING_END>;
|
|
996
|
+
}, "strip", z.ZodTypeAny, {
|
|
997
|
+
type: EventType.THINKING_END;
|
|
998
|
+
timestamp?: number | undefined;
|
|
999
|
+
rawEvent?: any;
|
|
1000
|
+
}, {
|
|
1001
|
+
type: EventType.THINKING_END;
|
|
1002
|
+
timestamp?: number | undefined;
|
|
1003
|
+
rawEvent?: any;
|
|
1004
|
+
}>;
|
|
1005
|
+
declare const StateSnapshotEventSchema: z.ZodObject<{
|
|
1006
|
+
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1007
|
+
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1008
|
+
} & {
|
|
936
1009
|
type: z.ZodLiteral<EventType.STATE_SNAPSHOT>;
|
|
937
1010
|
snapshot: z.ZodAny;
|
|
938
|
-
}
|
|
1011
|
+
}, "strip", z.ZodTypeAny, {
|
|
939
1012
|
type: EventType.STATE_SNAPSHOT;
|
|
940
1013
|
timestamp?: number | undefined;
|
|
941
1014
|
rawEvent?: any;
|
|
@@ -946,14 +1019,13 @@ declare const StateSnapshotEventSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
946
1019
|
rawEvent?: any;
|
|
947
1020
|
snapshot?: any;
|
|
948
1021
|
}>;
|
|
949
|
-
declare const StateDeltaEventSchema: z.ZodObject<
|
|
950
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1022
|
+
declare const StateDeltaEventSchema: z.ZodObject<{
|
|
951
1023
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
952
1024
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
953
|
-
}
|
|
1025
|
+
} & {
|
|
954
1026
|
type: z.ZodLiteral<EventType.STATE_DELTA>;
|
|
955
1027
|
delta: z.ZodArray<z.ZodAny, "many">;
|
|
956
|
-
}
|
|
1028
|
+
}, "strip", z.ZodTypeAny, {
|
|
957
1029
|
type: EventType.STATE_DELTA;
|
|
958
1030
|
delta: any[];
|
|
959
1031
|
timestamp?: number | undefined;
|
|
@@ -964,21 +1036,18 @@ declare const StateDeltaEventSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
964
1036
|
timestamp?: number | undefined;
|
|
965
1037
|
rawEvent?: any;
|
|
966
1038
|
}>;
|
|
967
|
-
declare const MessagesSnapshotEventSchema: z.ZodObject<
|
|
968
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1039
|
+
declare const MessagesSnapshotEventSchema: z.ZodObject<{
|
|
969
1040
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
970
1041
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
971
|
-
}
|
|
1042
|
+
} & {
|
|
972
1043
|
type: z.ZodLiteral<EventType.MESSAGES_SNAPSHOT>;
|
|
973
|
-
messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<
|
|
1044
|
+
messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
|
|
974
1045
|
id: z.ZodString;
|
|
975
|
-
role: z.ZodString;
|
|
976
|
-
content: z.ZodOptional<z.ZodString>;
|
|
977
1046
|
name: z.ZodOptional<z.ZodString>;
|
|
978
|
-
}
|
|
1047
|
+
} & {
|
|
979
1048
|
role: z.ZodLiteral<"developer">;
|
|
980
1049
|
content: z.ZodString;
|
|
981
|
-
}
|
|
1050
|
+
}, "strip", z.ZodTypeAny, {
|
|
982
1051
|
id: string;
|
|
983
1052
|
role: "developer";
|
|
984
1053
|
content: string;
|
|
@@ -988,15 +1057,13 @@ declare const MessagesSnapshotEventSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
988
1057
|
role: "developer";
|
|
989
1058
|
content: string;
|
|
990
1059
|
name?: string | undefined;
|
|
991
|
-
}>, z.ZodObject<
|
|
1060
|
+
}>, z.ZodObject<{
|
|
992
1061
|
id: z.ZodString;
|
|
993
|
-
role: z.ZodString;
|
|
994
|
-
content: z.ZodOptional<z.ZodString>;
|
|
995
1062
|
name: z.ZodOptional<z.ZodString>;
|
|
996
|
-
}
|
|
1063
|
+
} & {
|
|
997
1064
|
role: z.ZodLiteral<"system">;
|
|
998
1065
|
content: z.ZodString;
|
|
999
|
-
}
|
|
1066
|
+
}, "strip", z.ZodTypeAny, {
|
|
1000
1067
|
id: string;
|
|
1001
1068
|
role: "system";
|
|
1002
1069
|
content: string;
|
|
@@ -1006,12 +1073,10 @@ declare const MessagesSnapshotEventSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1006
1073
|
role: "system";
|
|
1007
1074
|
content: string;
|
|
1008
1075
|
name?: string | undefined;
|
|
1009
|
-
}>, z.ZodObject<
|
|
1076
|
+
}>, z.ZodObject<{
|
|
1010
1077
|
id: z.ZodString;
|
|
1011
|
-
role: z.ZodString;
|
|
1012
|
-
content: z.ZodOptional<z.ZodString>;
|
|
1013
1078
|
name: z.ZodOptional<z.ZodString>;
|
|
1014
|
-
}
|
|
1079
|
+
} & {
|
|
1015
1080
|
role: z.ZodLiteral<"assistant">;
|
|
1016
1081
|
content: z.ZodOptional<z.ZodString>;
|
|
1017
1082
|
toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1042,7 +1107,7 @@ declare const MessagesSnapshotEventSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1042
1107
|
type: "function";
|
|
1043
1108
|
id: string;
|
|
1044
1109
|
}>, "many">>;
|
|
1045
|
-
}
|
|
1110
|
+
}, "strip", z.ZodTypeAny, {
|
|
1046
1111
|
id: string;
|
|
1047
1112
|
role: "assistant";
|
|
1048
1113
|
name?: string | undefined;
|
|
@@ -1068,15 +1133,13 @@ declare const MessagesSnapshotEventSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1068
1133
|
type: "function";
|
|
1069
1134
|
id: string;
|
|
1070
1135
|
}[] | undefined;
|
|
1071
|
-
}>, z.ZodObject<
|
|
1136
|
+
}>, z.ZodObject<{
|
|
1072
1137
|
id: z.ZodString;
|
|
1073
|
-
role: z.ZodString;
|
|
1074
|
-
content: z.ZodOptional<z.ZodString>;
|
|
1075
1138
|
name: z.ZodOptional<z.ZodString>;
|
|
1076
|
-
}
|
|
1139
|
+
} & {
|
|
1077
1140
|
role: z.ZodLiteral<"user">;
|
|
1078
1141
|
content: z.ZodString;
|
|
1079
|
-
}
|
|
1142
|
+
}, "strip", z.ZodTypeAny, {
|
|
1080
1143
|
id: string;
|
|
1081
1144
|
role: "user";
|
|
1082
1145
|
content: string;
|
|
@@ -1102,7 +1165,7 @@ declare const MessagesSnapshotEventSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1102
1165
|
content: string;
|
|
1103
1166
|
toolCallId: string;
|
|
1104
1167
|
}>]>, "many">;
|
|
1105
|
-
}
|
|
1168
|
+
}, "strip", z.ZodTypeAny, {
|
|
1106
1169
|
type: EventType.MESSAGES_SNAPSHOT;
|
|
1107
1170
|
messages: ({
|
|
1108
1171
|
id: string;
|
|
@@ -1179,15 +1242,14 @@ declare const MessagesSnapshotEventSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1179
1242
|
timestamp?: number | undefined;
|
|
1180
1243
|
rawEvent?: any;
|
|
1181
1244
|
}>;
|
|
1182
|
-
declare const RawEventSchema: z.ZodObject<
|
|
1183
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1245
|
+
declare const RawEventSchema: z.ZodObject<{
|
|
1184
1246
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1185
1247
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1186
|
-
}
|
|
1248
|
+
} & {
|
|
1187
1249
|
type: z.ZodLiteral<EventType.RAW>;
|
|
1188
1250
|
event: z.ZodAny;
|
|
1189
1251
|
source: z.ZodOptional<z.ZodString>;
|
|
1190
|
-
}
|
|
1252
|
+
}, "strip", z.ZodTypeAny, {
|
|
1191
1253
|
type: EventType.RAW;
|
|
1192
1254
|
timestamp?: number | undefined;
|
|
1193
1255
|
rawEvent?: any;
|
|
@@ -1200,15 +1262,14 @@ declare const RawEventSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1200
1262
|
event?: any;
|
|
1201
1263
|
source?: string | undefined;
|
|
1202
1264
|
}>;
|
|
1203
|
-
declare const CustomEventSchema: z.ZodObject<
|
|
1204
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1265
|
+
declare const CustomEventSchema: z.ZodObject<{
|
|
1205
1266
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1206
1267
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1207
|
-
}
|
|
1268
|
+
} & {
|
|
1208
1269
|
type: z.ZodLiteral<EventType.CUSTOM>;
|
|
1209
1270
|
name: z.ZodString;
|
|
1210
1271
|
value: z.ZodAny;
|
|
1211
|
-
}
|
|
1272
|
+
}, "strip", z.ZodTypeAny, {
|
|
1212
1273
|
name: string;
|
|
1213
1274
|
type: EventType.CUSTOM;
|
|
1214
1275
|
value?: any;
|
|
@@ -1221,15 +1282,14 @@ declare const CustomEventSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1221
1282
|
timestamp?: number | undefined;
|
|
1222
1283
|
rawEvent?: any;
|
|
1223
1284
|
}>;
|
|
1224
|
-
declare const RunStartedEventSchema: z.ZodObject<
|
|
1225
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1285
|
+
declare const RunStartedEventSchema: z.ZodObject<{
|
|
1226
1286
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1227
1287
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1228
|
-
}
|
|
1288
|
+
} & {
|
|
1229
1289
|
type: z.ZodLiteral<EventType.RUN_STARTED>;
|
|
1230
1290
|
threadId: z.ZodString;
|
|
1231
1291
|
runId: z.ZodString;
|
|
1232
|
-
}
|
|
1292
|
+
}, "strip", z.ZodTypeAny, {
|
|
1233
1293
|
type: EventType.RUN_STARTED;
|
|
1234
1294
|
threadId: string;
|
|
1235
1295
|
runId: string;
|
|
@@ -1242,15 +1302,14 @@ declare const RunStartedEventSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1242
1302
|
timestamp?: number | undefined;
|
|
1243
1303
|
rawEvent?: any;
|
|
1244
1304
|
}>;
|
|
1245
|
-
declare const RunFinishedEventSchema: z.ZodObject<
|
|
1246
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1305
|
+
declare const RunFinishedEventSchema: z.ZodObject<{
|
|
1247
1306
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1248
1307
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1249
|
-
}
|
|
1308
|
+
} & {
|
|
1250
1309
|
type: z.ZodLiteral<EventType.RUN_FINISHED>;
|
|
1251
1310
|
threadId: z.ZodString;
|
|
1252
1311
|
runId: z.ZodString;
|
|
1253
|
-
}
|
|
1312
|
+
}, "strip", z.ZodTypeAny, {
|
|
1254
1313
|
type: EventType.RUN_FINISHED;
|
|
1255
1314
|
threadId: string;
|
|
1256
1315
|
runId: string;
|
|
@@ -1263,15 +1322,14 @@ declare const RunFinishedEventSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1263
1322
|
timestamp?: number | undefined;
|
|
1264
1323
|
rawEvent?: any;
|
|
1265
1324
|
}>;
|
|
1266
|
-
declare const RunErrorEventSchema: z.ZodObject<
|
|
1267
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1325
|
+
declare const RunErrorEventSchema: z.ZodObject<{
|
|
1268
1326
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1269
1327
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1270
|
-
}
|
|
1328
|
+
} & {
|
|
1271
1329
|
type: z.ZodLiteral<EventType.RUN_ERROR>;
|
|
1272
1330
|
message: z.ZodString;
|
|
1273
1331
|
code: z.ZodOptional<z.ZodString>;
|
|
1274
|
-
}
|
|
1332
|
+
}, "strip", z.ZodTypeAny, {
|
|
1275
1333
|
message: string;
|
|
1276
1334
|
type: EventType.RUN_ERROR;
|
|
1277
1335
|
code?: string | undefined;
|
|
@@ -1284,14 +1342,13 @@ declare const RunErrorEventSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1284
1342
|
timestamp?: number | undefined;
|
|
1285
1343
|
rawEvent?: any;
|
|
1286
1344
|
}>;
|
|
1287
|
-
declare const StepStartedEventSchema: z.ZodObject<
|
|
1288
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1345
|
+
declare const StepStartedEventSchema: z.ZodObject<{
|
|
1289
1346
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1290
1347
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1291
|
-
}
|
|
1348
|
+
} & {
|
|
1292
1349
|
type: z.ZodLiteral<EventType.STEP_STARTED>;
|
|
1293
1350
|
stepName: z.ZodString;
|
|
1294
|
-
}
|
|
1351
|
+
}, "strip", z.ZodTypeAny, {
|
|
1295
1352
|
type: EventType.STEP_STARTED;
|
|
1296
1353
|
stepName: string;
|
|
1297
1354
|
timestamp?: number | undefined;
|
|
@@ -1302,14 +1359,13 @@ declare const StepStartedEventSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1302
1359
|
timestamp?: number | undefined;
|
|
1303
1360
|
rawEvent?: any;
|
|
1304
1361
|
}>;
|
|
1305
|
-
declare const StepFinishedEventSchema: z.ZodObject<
|
|
1306
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1362
|
+
declare const StepFinishedEventSchema: z.ZodObject<{
|
|
1307
1363
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1308
1364
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1309
|
-
}
|
|
1365
|
+
} & {
|
|
1310
1366
|
type: z.ZodLiteral<EventType.STEP_FINISHED>;
|
|
1311
1367
|
stepName: z.ZodString;
|
|
1312
|
-
}
|
|
1368
|
+
}, "strip", z.ZodTypeAny, {
|
|
1313
1369
|
type: EventType.STEP_FINISHED;
|
|
1314
1370
|
stepName: string;
|
|
1315
1371
|
timestamp?: number | undefined;
|
|
@@ -1320,15 +1376,14 @@ declare const StepFinishedEventSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1320
1376
|
timestamp?: number | undefined;
|
|
1321
1377
|
rawEvent?: any;
|
|
1322
1378
|
}>;
|
|
1323
|
-
declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
|
|
1324
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1379
|
+
declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1325
1380
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1326
1381
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1327
|
-
}
|
|
1382
|
+
} & {
|
|
1328
1383
|
type: z.ZodLiteral<EventType.TEXT_MESSAGE_START>;
|
|
1329
1384
|
messageId: z.ZodString;
|
|
1330
1385
|
role: z.ZodLiteral<"assistant">;
|
|
1331
|
-
}
|
|
1386
|
+
}, "strip", z.ZodTypeAny, {
|
|
1332
1387
|
type: EventType.TEXT_MESSAGE_START;
|
|
1333
1388
|
role: "assistant";
|
|
1334
1389
|
messageId: string;
|
|
@@ -1340,15 +1395,14 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1340
1395
|
messageId: string;
|
|
1341
1396
|
timestamp?: number | undefined;
|
|
1342
1397
|
rawEvent?: any;
|
|
1343
|
-
}>, z.ZodObject<
|
|
1344
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1398
|
+
}>, z.ZodObject<{
|
|
1345
1399
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1346
1400
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1347
|
-
}
|
|
1401
|
+
} & {
|
|
1348
1402
|
type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
|
|
1349
1403
|
messageId: z.ZodString;
|
|
1350
1404
|
delta: z.ZodEffects<z.ZodString, string, string>;
|
|
1351
|
-
}
|
|
1405
|
+
}, "strip", z.ZodTypeAny, {
|
|
1352
1406
|
type: EventType.TEXT_MESSAGE_CONTENT;
|
|
1353
1407
|
messageId: string;
|
|
1354
1408
|
delta: string;
|
|
@@ -1360,14 +1414,13 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1360
1414
|
delta: string;
|
|
1361
1415
|
timestamp?: number | undefined;
|
|
1362
1416
|
rawEvent?: any;
|
|
1363
|
-
}>, z.ZodObject<
|
|
1364
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1417
|
+
}>, z.ZodObject<{
|
|
1365
1418
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1366
1419
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1367
|
-
}
|
|
1420
|
+
} & {
|
|
1368
1421
|
type: z.ZodLiteral<EventType.TEXT_MESSAGE_END>;
|
|
1369
1422
|
messageId: z.ZodString;
|
|
1370
|
-
}
|
|
1423
|
+
}, "strip", z.ZodTypeAny, {
|
|
1371
1424
|
type: EventType.TEXT_MESSAGE_END;
|
|
1372
1425
|
messageId: string;
|
|
1373
1426
|
timestamp?: number | undefined;
|
|
@@ -1377,16 +1430,15 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1377
1430
|
messageId: string;
|
|
1378
1431
|
timestamp?: number | undefined;
|
|
1379
1432
|
rawEvent?: any;
|
|
1380
|
-
}>, z.ZodObject<
|
|
1381
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1433
|
+
}>, z.ZodObject<{
|
|
1382
1434
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1383
1435
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1384
|
-
}
|
|
1436
|
+
} & {
|
|
1385
1437
|
type: z.ZodLiteral<EventType.TEXT_MESSAGE_CHUNK>;
|
|
1386
1438
|
messageId: z.ZodOptional<z.ZodString>;
|
|
1387
1439
|
role: z.ZodOptional<z.ZodLiteral<"assistant">>;
|
|
1388
1440
|
delta: z.ZodOptional<z.ZodString>;
|
|
1389
|
-
}
|
|
1441
|
+
}, "strip", z.ZodTypeAny, {
|
|
1390
1442
|
type: EventType.TEXT_MESSAGE_CHUNK;
|
|
1391
1443
|
role?: "assistant" | undefined;
|
|
1392
1444
|
timestamp?: number | undefined;
|
|
@@ -1400,16 +1452,60 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1400
1452
|
rawEvent?: any;
|
|
1401
1453
|
messageId?: string | undefined;
|
|
1402
1454
|
delta?: string | undefined;
|
|
1403
|
-
}>, z.ZodObject<
|
|
1404
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1455
|
+
}>, z.ZodObject<{
|
|
1405
1456
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1406
1457
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1458
|
+
} & {
|
|
1459
|
+
type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_START>;
|
|
1460
|
+
}, "strip", z.ZodTypeAny, {
|
|
1461
|
+
type: EventType.THINKING_TEXT_MESSAGE_START;
|
|
1462
|
+
timestamp?: number | undefined;
|
|
1463
|
+
rawEvent?: any;
|
|
1407
1464
|
}, {
|
|
1465
|
+
type: EventType.THINKING_TEXT_MESSAGE_START;
|
|
1466
|
+
timestamp?: number | undefined;
|
|
1467
|
+
rawEvent?: any;
|
|
1468
|
+
}>, z.ZodObject<Omit<{
|
|
1469
|
+
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1470
|
+
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1471
|
+
} & {
|
|
1472
|
+
type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
|
|
1473
|
+
messageId: z.ZodString;
|
|
1474
|
+
delta: z.ZodEffects<z.ZodString, string, string>;
|
|
1475
|
+
}, "type" | "messageId"> & {
|
|
1476
|
+
type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_CONTENT>;
|
|
1477
|
+
}, "strip", z.ZodTypeAny, {
|
|
1478
|
+
type: EventType.THINKING_TEXT_MESSAGE_CONTENT;
|
|
1479
|
+
delta: string;
|
|
1480
|
+
timestamp?: number | undefined;
|
|
1481
|
+
rawEvent?: any;
|
|
1482
|
+
}, {
|
|
1483
|
+
type: EventType.THINKING_TEXT_MESSAGE_CONTENT;
|
|
1484
|
+
delta: string;
|
|
1485
|
+
timestamp?: number | undefined;
|
|
1486
|
+
rawEvent?: any;
|
|
1487
|
+
}>, z.ZodObject<{
|
|
1488
|
+
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1489
|
+
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1490
|
+
} & {
|
|
1491
|
+
type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_END>;
|
|
1492
|
+
}, "strip", z.ZodTypeAny, {
|
|
1493
|
+
type: EventType.THINKING_TEXT_MESSAGE_END;
|
|
1494
|
+
timestamp?: number | undefined;
|
|
1495
|
+
rawEvent?: any;
|
|
1496
|
+
}, {
|
|
1497
|
+
type: EventType.THINKING_TEXT_MESSAGE_END;
|
|
1498
|
+
timestamp?: number | undefined;
|
|
1499
|
+
rawEvent?: any;
|
|
1500
|
+
}>, z.ZodObject<{
|
|
1501
|
+
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1502
|
+
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1503
|
+
} & {
|
|
1408
1504
|
type: z.ZodLiteral<EventType.TOOL_CALL_START>;
|
|
1409
1505
|
toolCallId: z.ZodString;
|
|
1410
1506
|
toolCallName: z.ZodString;
|
|
1411
1507
|
parentMessageId: z.ZodOptional<z.ZodString>;
|
|
1412
|
-
}
|
|
1508
|
+
}, "strip", z.ZodTypeAny, {
|
|
1413
1509
|
type: EventType.TOOL_CALL_START;
|
|
1414
1510
|
toolCallId: string;
|
|
1415
1511
|
toolCallName: string;
|
|
@@ -1423,15 +1519,14 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1423
1519
|
timestamp?: number | undefined;
|
|
1424
1520
|
rawEvent?: any;
|
|
1425
1521
|
parentMessageId?: string | undefined;
|
|
1426
|
-
}>, z.ZodObject<
|
|
1427
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1522
|
+
}>, z.ZodObject<{
|
|
1428
1523
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1429
1524
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1430
|
-
}
|
|
1525
|
+
} & {
|
|
1431
1526
|
type: z.ZodLiteral<EventType.TOOL_CALL_ARGS>;
|
|
1432
1527
|
toolCallId: z.ZodString;
|
|
1433
1528
|
delta: z.ZodString;
|
|
1434
|
-
}
|
|
1529
|
+
}, "strip", z.ZodTypeAny, {
|
|
1435
1530
|
type: EventType.TOOL_CALL_ARGS;
|
|
1436
1531
|
toolCallId: string;
|
|
1437
1532
|
delta: string;
|
|
@@ -1443,14 +1538,13 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1443
1538
|
delta: string;
|
|
1444
1539
|
timestamp?: number | undefined;
|
|
1445
1540
|
rawEvent?: any;
|
|
1446
|
-
}>, z.ZodObject<
|
|
1447
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1541
|
+
}>, z.ZodObject<{
|
|
1448
1542
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1449
1543
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1450
|
-
}
|
|
1544
|
+
} & {
|
|
1451
1545
|
type: z.ZodLiteral<EventType.TOOL_CALL_END>;
|
|
1452
1546
|
toolCallId: z.ZodString;
|
|
1453
|
-
}
|
|
1547
|
+
}, "strip", z.ZodTypeAny, {
|
|
1454
1548
|
type: EventType.TOOL_CALL_END;
|
|
1455
1549
|
toolCallId: string;
|
|
1456
1550
|
timestamp?: number | undefined;
|
|
@@ -1460,17 +1554,16 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1460
1554
|
toolCallId: string;
|
|
1461
1555
|
timestamp?: number | undefined;
|
|
1462
1556
|
rawEvent?: any;
|
|
1463
|
-
}>, z.ZodObject<
|
|
1464
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1557
|
+
}>, z.ZodObject<{
|
|
1465
1558
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1466
1559
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1467
|
-
}
|
|
1560
|
+
} & {
|
|
1468
1561
|
type: z.ZodLiteral<EventType.TOOL_CALL_CHUNK>;
|
|
1469
1562
|
toolCallId: z.ZodOptional<z.ZodString>;
|
|
1470
1563
|
toolCallName: z.ZodOptional<z.ZodString>;
|
|
1471
1564
|
parentMessageId: z.ZodOptional<z.ZodString>;
|
|
1472
1565
|
delta: z.ZodOptional<z.ZodString>;
|
|
1473
|
-
}
|
|
1566
|
+
}, "strip", z.ZodTypeAny, {
|
|
1474
1567
|
type: EventType.TOOL_CALL_CHUNK;
|
|
1475
1568
|
toolCallId?: string | undefined;
|
|
1476
1569
|
timestamp?: number | undefined;
|
|
@@ -1486,14 +1579,38 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1486
1579
|
delta?: string | undefined;
|
|
1487
1580
|
toolCallName?: string | undefined;
|
|
1488
1581
|
parentMessageId?: string | undefined;
|
|
1489
|
-
}>, z.ZodObject<
|
|
1490
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1582
|
+
}>, z.ZodObject<{
|
|
1491
1583
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1492
1584
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1585
|
+
} & {
|
|
1586
|
+
messageId: z.ZodString;
|
|
1587
|
+
type: z.ZodLiteral<EventType.TOOL_CALL_RESULT>;
|
|
1588
|
+
toolCallId: z.ZodString;
|
|
1589
|
+
content: z.ZodString;
|
|
1590
|
+
role: z.ZodOptional<z.ZodLiteral<"tool">>;
|
|
1591
|
+
}, "strip", z.ZodTypeAny, {
|
|
1592
|
+
type: EventType.TOOL_CALL_RESULT;
|
|
1593
|
+
content: string;
|
|
1594
|
+
toolCallId: string;
|
|
1595
|
+
messageId: string;
|
|
1596
|
+
role?: "tool" | undefined;
|
|
1597
|
+
timestamp?: number | undefined;
|
|
1598
|
+
rawEvent?: any;
|
|
1493
1599
|
}, {
|
|
1600
|
+
type: EventType.TOOL_CALL_RESULT;
|
|
1601
|
+
content: string;
|
|
1602
|
+
toolCallId: string;
|
|
1603
|
+
messageId: string;
|
|
1604
|
+
role?: "tool" | undefined;
|
|
1605
|
+
timestamp?: number | undefined;
|
|
1606
|
+
rawEvent?: any;
|
|
1607
|
+
}>, z.ZodObject<{
|
|
1608
|
+
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1609
|
+
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1610
|
+
} & {
|
|
1494
1611
|
type: z.ZodLiteral<EventType.STATE_SNAPSHOT>;
|
|
1495
1612
|
snapshot: z.ZodAny;
|
|
1496
|
-
}
|
|
1613
|
+
}, "strip", z.ZodTypeAny, {
|
|
1497
1614
|
type: EventType.STATE_SNAPSHOT;
|
|
1498
1615
|
timestamp?: number | undefined;
|
|
1499
1616
|
rawEvent?: any;
|
|
@@ -1503,14 +1620,13 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1503
1620
|
timestamp?: number | undefined;
|
|
1504
1621
|
rawEvent?: any;
|
|
1505
1622
|
snapshot?: any;
|
|
1506
|
-
}>, z.ZodObject<
|
|
1507
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1623
|
+
}>, z.ZodObject<{
|
|
1508
1624
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1509
1625
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1510
|
-
}
|
|
1626
|
+
} & {
|
|
1511
1627
|
type: z.ZodLiteral<EventType.STATE_DELTA>;
|
|
1512
1628
|
delta: z.ZodArray<z.ZodAny, "many">;
|
|
1513
|
-
}
|
|
1629
|
+
}, "strip", z.ZodTypeAny, {
|
|
1514
1630
|
type: EventType.STATE_DELTA;
|
|
1515
1631
|
delta: any[];
|
|
1516
1632
|
timestamp?: number | undefined;
|
|
@@ -1520,21 +1636,18 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1520
1636
|
delta: any[];
|
|
1521
1637
|
timestamp?: number | undefined;
|
|
1522
1638
|
rawEvent?: any;
|
|
1523
|
-
}>, z.ZodObject<
|
|
1524
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1639
|
+
}>, z.ZodObject<{
|
|
1525
1640
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1526
1641
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1527
|
-
}
|
|
1642
|
+
} & {
|
|
1528
1643
|
type: z.ZodLiteral<EventType.MESSAGES_SNAPSHOT>;
|
|
1529
|
-
messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<
|
|
1644
|
+
messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
|
|
1530
1645
|
id: z.ZodString;
|
|
1531
|
-
role: z.ZodString;
|
|
1532
|
-
content: z.ZodOptional<z.ZodString>;
|
|
1533
1646
|
name: z.ZodOptional<z.ZodString>;
|
|
1534
|
-
}
|
|
1647
|
+
} & {
|
|
1535
1648
|
role: z.ZodLiteral<"developer">;
|
|
1536
1649
|
content: z.ZodString;
|
|
1537
|
-
}
|
|
1650
|
+
}, "strip", z.ZodTypeAny, {
|
|
1538
1651
|
id: string;
|
|
1539
1652
|
role: "developer";
|
|
1540
1653
|
content: string;
|
|
@@ -1544,15 +1657,13 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1544
1657
|
role: "developer";
|
|
1545
1658
|
content: string;
|
|
1546
1659
|
name?: string | undefined;
|
|
1547
|
-
}>, z.ZodObject<
|
|
1660
|
+
}>, z.ZodObject<{
|
|
1548
1661
|
id: z.ZodString;
|
|
1549
|
-
role: z.ZodString;
|
|
1550
|
-
content: z.ZodOptional<z.ZodString>;
|
|
1551
1662
|
name: z.ZodOptional<z.ZodString>;
|
|
1552
|
-
}
|
|
1663
|
+
} & {
|
|
1553
1664
|
role: z.ZodLiteral<"system">;
|
|
1554
1665
|
content: z.ZodString;
|
|
1555
|
-
}
|
|
1666
|
+
}, "strip", z.ZodTypeAny, {
|
|
1556
1667
|
id: string;
|
|
1557
1668
|
role: "system";
|
|
1558
1669
|
content: string;
|
|
@@ -1562,12 +1673,10 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1562
1673
|
role: "system";
|
|
1563
1674
|
content: string;
|
|
1564
1675
|
name?: string | undefined;
|
|
1565
|
-
}>, z.ZodObject<
|
|
1676
|
+
}>, z.ZodObject<{
|
|
1566
1677
|
id: z.ZodString;
|
|
1567
|
-
role: z.ZodString;
|
|
1568
|
-
content: z.ZodOptional<z.ZodString>;
|
|
1569
1678
|
name: z.ZodOptional<z.ZodString>;
|
|
1570
|
-
}
|
|
1679
|
+
} & {
|
|
1571
1680
|
role: z.ZodLiteral<"assistant">;
|
|
1572
1681
|
content: z.ZodOptional<z.ZodString>;
|
|
1573
1682
|
toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1598,7 +1707,7 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1598
1707
|
type: "function";
|
|
1599
1708
|
id: string;
|
|
1600
1709
|
}>, "many">>;
|
|
1601
|
-
}
|
|
1710
|
+
}, "strip", z.ZodTypeAny, {
|
|
1602
1711
|
id: string;
|
|
1603
1712
|
role: "assistant";
|
|
1604
1713
|
name?: string | undefined;
|
|
@@ -1624,15 +1733,13 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1624
1733
|
type: "function";
|
|
1625
1734
|
id: string;
|
|
1626
1735
|
}[] | undefined;
|
|
1627
|
-
}>, z.ZodObject<
|
|
1736
|
+
}>, z.ZodObject<{
|
|
1628
1737
|
id: z.ZodString;
|
|
1629
|
-
role: z.ZodString;
|
|
1630
|
-
content: z.ZodOptional<z.ZodString>;
|
|
1631
1738
|
name: z.ZodOptional<z.ZodString>;
|
|
1632
|
-
}
|
|
1739
|
+
} & {
|
|
1633
1740
|
role: z.ZodLiteral<"user">;
|
|
1634
1741
|
content: z.ZodString;
|
|
1635
|
-
}
|
|
1742
|
+
}, "strip", z.ZodTypeAny, {
|
|
1636
1743
|
id: string;
|
|
1637
1744
|
role: "user";
|
|
1638
1745
|
content: string;
|
|
@@ -1658,7 +1765,7 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1658
1765
|
content: string;
|
|
1659
1766
|
toolCallId: string;
|
|
1660
1767
|
}>]>, "many">;
|
|
1661
|
-
}
|
|
1768
|
+
}, "strip", z.ZodTypeAny, {
|
|
1662
1769
|
type: EventType.MESSAGES_SNAPSHOT;
|
|
1663
1770
|
messages: ({
|
|
1664
1771
|
id: string;
|
|
@@ -1734,15 +1841,14 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1734
1841
|
})[];
|
|
1735
1842
|
timestamp?: number | undefined;
|
|
1736
1843
|
rawEvent?: any;
|
|
1737
|
-
}>, z.ZodObject<
|
|
1738
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1844
|
+
}>, z.ZodObject<{
|
|
1739
1845
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1740
1846
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1741
|
-
}
|
|
1847
|
+
} & {
|
|
1742
1848
|
type: z.ZodLiteral<EventType.RAW>;
|
|
1743
1849
|
event: z.ZodAny;
|
|
1744
1850
|
source: z.ZodOptional<z.ZodString>;
|
|
1745
|
-
}
|
|
1851
|
+
}, "strip", z.ZodTypeAny, {
|
|
1746
1852
|
type: EventType.RAW;
|
|
1747
1853
|
timestamp?: number | undefined;
|
|
1748
1854
|
rawEvent?: any;
|
|
@@ -1754,15 +1860,14 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1754
1860
|
rawEvent?: any;
|
|
1755
1861
|
event?: any;
|
|
1756
1862
|
source?: string | undefined;
|
|
1757
|
-
}>, z.ZodObject<
|
|
1758
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1863
|
+
}>, z.ZodObject<{
|
|
1759
1864
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1760
1865
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1761
|
-
}
|
|
1866
|
+
} & {
|
|
1762
1867
|
type: z.ZodLiteral<EventType.CUSTOM>;
|
|
1763
1868
|
name: z.ZodString;
|
|
1764
1869
|
value: z.ZodAny;
|
|
1765
|
-
}
|
|
1870
|
+
}, "strip", z.ZodTypeAny, {
|
|
1766
1871
|
name: string;
|
|
1767
1872
|
type: EventType.CUSTOM;
|
|
1768
1873
|
value?: any;
|
|
@@ -1774,15 +1879,14 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1774
1879
|
value?: any;
|
|
1775
1880
|
timestamp?: number | undefined;
|
|
1776
1881
|
rawEvent?: any;
|
|
1777
|
-
}>, z.ZodObject<
|
|
1778
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1882
|
+
}>, z.ZodObject<{
|
|
1779
1883
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1780
1884
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1781
|
-
}
|
|
1885
|
+
} & {
|
|
1782
1886
|
type: z.ZodLiteral<EventType.RUN_STARTED>;
|
|
1783
1887
|
threadId: z.ZodString;
|
|
1784
1888
|
runId: z.ZodString;
|
|
1785
|
-
}
|
|
1889
|
+
}, "strip", z.ZodTypeAny, {
|
|
1786
1890
|
type: EventType.RUN_STARTED;
|
|
1787
1891
|
threadId: string;
|
|
1788
1892
|
runId: string;
|
|
@@ -1794,15 +1898,14 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1794
1898
|
runId: string;
|
|
1795
1899
|
timestamp?: number | undefined;
|
|
1796
1900
|
rawEvent?: any;
|
|
1797
|
-
}>, z.ZodObject<
|
|
1798
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1901
|
+
}>, z.ZodObject<{
|
|
1799
1902
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1800
1903
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1801
|
-
}
|
|
1904
|
+
} & {
|
|
1802
1905
|
type: z.ZodLiteral<EventType.RUN_FINISHED>;
|
|
1803
1906
|
threadId: z.ZodString;
|
|
1804
1907
|
runId: z.ZodString;
|
|
1805
|
-
}
|
|
1908
|
+
}, "strip", z.ZodTypeAny, {
|
|
1806
1909
|
type: EventType.RUN_FINISHED;
|
|
1807
1910
|
threadId: string;
|
|
1808
1911
|
runId: string;
|
|
@@ -1814,15 +1917,14 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1814
1917
|
runId: string;
|
|
1815
1918
|
timestamp?: number | undefined;
|
|
1816
1919
|
rawEvent?: any;
|
|
1817
|
-
}>, z.ZodObject<
|
|
1818
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1920
|
+
}>, z.ZodObject<{
|
|
1819
1921
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1820
1922
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1821
|
-
}
|
|
1923
|
+
} & {
|
|
1822
1924
|
type: z.ZodLiteral<EventType.RUN_ERROR>;
|
|
1823
1925
|
message: z.ZodString;
|
|
1824
1926
|
code: z.ZodOptional<z.ZodString>;
|
|
1825
|
-
}
|
|
1927
|
+
}, "strip", z.ZodTypeAny, {
|
|
1826
1928
|
message: string;
|
|
1827
1929
|
type: EventType.RUN_ERROR;
|
|
1828
1930
|
code?: string | undefined;
|
|
@@ -1834,14 +1936,13 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1834
1936
|
code?: string | undefined;
|
|
1835
1937
|
timestamp?: number | undefined;
|
|
1836
1938
|
rawEvent?: any;
|
|
1837
|
-
}>, z.ZodObject<
|
|
1838
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1939
|
+
}>, z.ZodObject<{
|
|
1839
1940
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1840
1941
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1841
|
-
}
|
|
1942
|
+
} & {
|
|
1842
1943
|
type: z.ZodLiteral<EventType.STEP_STARTED>;
|
|
1843
1944
|
stepName: z.ZodString;
|
|
1844
|
-
}
|
|
1945
|
+
}, "strip", z.ZodTypeAny, {
|
|
1845
1946
|
type: EventType.STEP_STARTED;
|
|
1846
1947
|
stepName: string;
|
|
1847
1948
|
timestamp?: number | undefined;
|
|
@@ -1851,14 +1952,13 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objec
|
|
|
1851
1952
|
stepName: string;
|
|
1852
1953
|
timestamp?: number | undefined;
|
|
1853
1954
|
rawEvent?: any;
|
|
1854
|
-
}>, z.ZodObject<
|
|
1855
|
-
type: z.ZodNativeEnum<typeof EventType>;
|
|
1955
|
+
}>, z.ZodObject<{
|
|
1856
1956
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1857
1957
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
1858
|
-
}
|
|
1958
|
+
} & {
|
|
1859
1959
|
type: z.ZodLiteral<EventType.STEP_FINISHED>;
|
|
1860
1960
|
stepName: z.ZodString;
|
|
1861
|
-
}
|
|
1961
|
+
}, "strip", z.ZodTypeAny, {
|
|
1862
1962
|
type: EventType.STEP_FINISHED;
|
|
1863
1963
|
stepName: string;
|
|
1864
1964
|
timestamp?: number | undefined;
|
|
@@ -1874,10 +1974,16 @@ type TextMessageStartEvent = z.infer<typeof TextMessageStartEventSchema>;
|
|
|
1874
1974
|
type TextMessageContentEvent = z.infer<typeof TextMessageContentEventSchema>;
|
|
1875
1975
|
type TextMessageEndEvent = z.infer<typeof TextMessageEndEventSchema>;
|
|
1876
1976
|
type TextMessageChunkEvent = z.infer<typeof TextMessageChunkEventSchema>;
|
|
1977
|
+
type ThinkingTextMessageStartEvent = z.infer<typeof ThinkingTextMessageStartEventSchema>;
|
|
1978
|
+
type ThinkingTextMessageContentEvent = z.infer<typeof ThinkingTextMessageContentEventSchema>;
|
|
1979
|
+
type ThinkingTextMessageEndEvent = z.infer<typeof ThinkingTextMessageEndEventSchema>;
|
|
1877
1980
|
type ToolCallStartEvent = z.infer<typeof ToolCallStartEventSchema>;
|
|
1878
1981
|
type ToolCallArgsEvent = z.infer<typeof ToolCallArgsEventSchema>;
|
|
1879
1982
|
type ToolCallEndEvent = z.infer<typeof ToolCallEndEventSchema>;
|
|
1880
1983
|
type ToolCallChunkEvent = z.infer<typeof ToolCallChunkEventSchema>;
|
|
1984
|
+
type ToolCallResultEvent = z.infer<typeof ToolCallResultEventSchema>;
|
|
1985
|
+
type ThinkingStartEvent = z.infer<typeof ThinkingStartEventSchema>;
|
|
1986
|
+
type ThinkingEndEvent = z.infer<typeof ThinkingEndEventSchema>;
|
|
1881
1987
|
type StateSnapshotEvent = z.infer<typeof StateSnapshotEventSchema>;
|
|
1882
1988
|
type StateDeltaEvent = z.infer<typeof StateDeltaEventSchema>;
|
|
1883
1989
|
type MessagesSnapshotEvent = z.infer<typeof MessagesSnapshotEventSchema>;
|
|
@@ -1906,4 +2012,4 @@ interface AgentState {
|
|
|
1906
2012
|
*/
|
|
1907
2013
|
type ApplyEvents = (input: RunAgentInput, events$: Observable<BaseEvent>) => Observable<AgentState>;
|
|
1908
2014
|
|
|
1909
|
-
export { AGUIError, type AgentState, type ApplyEvents, type AssistantMessage, AssistantMessageSchema, type BaseEvent, BaseMessageSchema, type Context, ContextSchema, type CustomEvent, CustomEventSchema, type DeveloperMessage, DeveloperMessageSchema, EventSchemas, EventType, type FunctionCall, FunctionCallSchema, type Message, MessageSchema, type MessagesSnapshotEvent, MessagesSnapshotEventSchema, type RawEvent, RawEventSchema, type Role, RoleSchema, type RunAgent, type RunAgentInput, RunAgentInputSchema, type RunErrorEvent, RunErrorEventSchema, RunErrorSchema, type RunFinishedEvent, RunFinishedEventSchema, RunFinishedSchema, type RunStartedEvent, RunStartedEventSchema, RunStartedSchema, type State, type StateDeltaEvent, StateDeltaEventSchema, StateSchema, type StateSnapshotEvent, StateSnapshotEventSchema, type StepFinishedEvent, StepFinishedEventSchema, StepFinishedSchema, type StepStartedEvent, StepStartedEventSchema, StepStartedSchema, type SystemMessage, SystemMessageSchema, type TextMessageChunkEvent, TextMessageChunkEventSchema, type TextMessageContentEvent, TextMessageContentEventSchema, type TextMessageEndEvent, TextMessageEndEventSchema, type TextMessageStartEvent, TextMessageStartEventSchema, type Tool, type ToolCall, type ToolCallArgsEvent, ToolCallArgsEventSchema, type ToolCallChunkEvent, ToolCallChunkEventSchema, type ToolCallEndEvent, ToolCallEndEventSchema, ToolCallSchema, type ToolCallStartEvent, ToolCallStartEventSchema, type ToolMessage, ToolMessageSchema, ToolSchema, type UserMessage, UserMessageSchema };
|
|
2015
|
+
export { AGUIError, type AgentState, type ApplyEvents, type AssistantMessage, AssistantMessageSchema, type BaseEvent, BaseMessageSchema, type Context, ContextSchema, type CustomEvent, CustomEventSchema, type DeveloperMessage, DeveloperMessageSchema, EventSchemas, EventType, type FunctionCall, FunctionCallSchema, type Message, MessageSchema, type MessagesSnapshotEvent, MessagesSnapshotEventSchema, type RawEvent, RawEventSchema, type Role, RoleSchema, type RunAgent, type RunAgentInput, RunAgentInputSchema, type RunErrorEvent, RunErrorEventSchema, RunErrorSchema, type RunFinishedEvent, RunFinishedEventSchema, RunFinishedSchema, type RunStartedEvent, RunStartedEventSchema, RunStartedSchema, type State, type StateDeltaEvent, StateDeltaEventSchema, StateSchema, type StateSnapshotEvent, StateSnapshotEventSchema, type StepFinishedEvent, StepFinishedEventSchema, StepFinishedSchema, type StepStartedEvent, StepStartedEventSchema, StepStartedSchema, type SystemMessage, SystemMessageSchema, type TextMessageChunkEvent, TextMessageChunkEventSchema, type TextMessageContentEvent, TextMessageContentEventSchema, type TextMessageEndEvent, TextMessageEndEventSchema, type TextMessageStartEvent, TextMessageStartEventSchema, type ThinkingEndEvent, ThinkingEndEventSchema, type ThinkingStartEvent, ThinkingStartEventSchema, type ThinkingTextMessageContentEvent, ThinkingTextMessageContentEventSchema, type ThinkingTextMessageEndEvent, ThinkingTextMessageEndEventSchema, type ThinkingTextMessageStartEvent, ThinkingTextMessageStartEventSchema, type Tool, type ToolCall, type ToolCallArgsEvent, ToolCallArgsEventSchema, type ToolCallChunkEvent, ToolCallChunkEventSchema, type ToolCallEndEvent, ToolCallEndEventSchema, type ToolCallResultEvent, ToolCallResultEventSchema, ToolCallSchema, type ToolCallStartEvent, ToolCallStartEventSchema, type ToolMessage, ToolMessageSchema, ToolSchema, type UserMessage, UserMessageSchema };
|