@copilotkit/runtime 1.51.3 → 1.51.4-next.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.
@@ -1,5 +1,6 @@
1
1
  import { TextMessageStartEvent, TextMessageContentEvent, TextMessageEndEvent, ToolCallStartEvent, ToolCallArgsEvent, ToolCallEndEvent, RunAgentInput, EventType } from '@ag-ui/client';
2
2
  import * as rxjs from 'rxjs';
3
+ import * as zod from 'zod';
3
4
  import { LangGraphAgent as LangGraphAgent$1, LangGraphAgentConfig, ProcessedEvents, State, StateEnrichment, SchemaKeys } from '@ag-ui/langgraph';
4
5
  export { LangGraphHttpAgent } from '@ag-ui/langgraph';
5
6
  import { Message } from '@langchain/langgraph-sdk/dist/types.messages';
@@ -33,96 +34,184 @@ interface CopilotKitStateEnrichment {
33
34
 
34
35
  declare class LangGraphAgent extends LangGraphAgent$1 {
35
36
  constructor(config: LangGraphAgentConfig);
36
- clone(): LangGraphAgent;
37
37
  dispatchEvent(event: ProcessedEvents): boolean;
38
- run(input: RunAgentInput): rxjs.Observable<{
39
- type: EventType.TEXT_MESSAGE_START;
40
- role: "developer" | "system" | "assistant" | "user";
41
- messageId: string;
42
- timestamp?: number | undefined;
43
- rawEvent?: any;
44
- } | {
45
- type: EventType.TEXT_MESSAGE_CONTENT;
46
- messageId: string;
47
- delta: string;
48
- timestamp?: number | undefined;
49
- rawEvent?: any;
50
- } | {
51
- type: EventType.TEXT_MESSAGE_END;
52
- messageId: string;
53
- timestamp?: number | undefined;
54
- rawEvent?: any;
55
- } | {
56
- type: EventType.TOOL_CALL_START;
57
- toolCallId: string;
58
- toolCallName: string;
59
- timestamp?: number | undefined;
60
- rawEvent?: any;
61
- parentMessageId?: string | undefined;
62
- } | {
63
- type: EventType.TOOL_CALL_ARGS;
64
- toolCallId: string;
65
- delta: string;
66
- timestamp?: number | undefined;
67
- rawEvent?: any;
68
- } | {
69
- type: EventType.TOOL_CALL_END;
70
- toolCallId: string;
71
- timestamp?: number | undefined;
72
- rawEvent?: any;
73
- } | {
74
- type: EventType.THINKING_TEXT_MESSAGE_START;
75
- timestamp?: number | undefined;
76
- rawEvent?: any;
77
- } | {
78
- type: EventType.THINKING_TEXT_MESSAGE_CONTENT;
79
- delta: string;
80
- timestamp?: number | undefined;
81
- rawEvent?: any;
82
- } | {
83
- type: EventType.THINKING_TEXT_MESSAGE_END;
84
- timestamp?: number | undefined;
85
- rawEvent?: any;
86
- } | {
87
- type: EventType.TOOL_CALL_RESULT;
88
- content: string;
89
- toolCallId: string;
90
- messageId: string;
91
- role?: "tool" | undefined;
92
- timestamp?: number | undefined;
93
- rawEvent?: any;
94
- } | {
95
- type: EventType.THINKING_START;
96
- timestamp?: number | undefined;
97
- rawEvent?: any;
98
- title?: string | undefined;
99
- } | {
100
- type: EventType.THINKING_END;
101
- timestamp?: number | undefined;
102
- rawEvent?: any;
103
- } | {
104
- type: EventType.STATE_SNAPSHOT;
105
- timestamp?: number | undefined;
106
- rawEvent?: any;
107
- snapshot?: any;
108
- } | {
109
- type: EventType.STATE_DELTA;
110
- delta: any[];
111
- timestamp?: number | undefined;
112
- rawEvent?: any;
113
- } | {
114
- type: EventType.MESSAGES_SNAPSHOT;
115
- messages: ({
38
+ run(input: RunAgentInput): rxjs.Observable<zod.objectOutputType<{
39
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
40
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
41
+ } & {
42
+ type: zod.ZodLiteral<EventType.TEXT_MESSAGE_START>;
43
+ messageId: zod.ZodString;
44
+ role: zod.ZodDefault<zod.ZodUnion<[zod.ZodLiteral<"developer">, zod.ZodLiteral<"system">, zod.ZodLiteral<"assistant">, zod.ZodLiteral<"user">]>>;
45
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<{
46
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
47
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
48
+ } & {
49
+ type: zod.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
50
+ messageId: zod.ZodString;
51
+ delta: zod.ZodEffects<zod.ZodString, string, string>;
52
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<{
53
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
54
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
55
+ } & {
56
+ type: zod.ZodLiteral<EventType.TEXT_MESSAGE_END>;
57
+ messageId: zod.ZodString;
58
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<{
59
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
60
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
61
+ } & {
62
+ type: zod.ZodLiteral<EventType.TOOL_CALL_START>;
63
+ toolCallId: zod.ZodString;
64
+ toolCallName: zod.ZodString;
65
+ parentMessageId: zod.ZodOptional<zod.ZodString>;
66
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<{
67
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
68
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
69
+ } & {
70
+ type: zod.ZodLiteral<EventType.TOOL_CALL_ARGS>;
71
+ toolCallId: zod.ZodString;
72
+ delta: zod.ZodString;
73
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<{
74
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
75
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
76
+ } & {
77
+ type: zod.ZodLiteral<EventType.TOOL_CALL_END>;
78
+ toolCallId: zod.ZodString;
79
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<{
80
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
81
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
82
+ } & {
83
+ type: zod.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_START>;
84
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<Omit<{
85
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
86
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
87
+ } & {
88
+ type: zod.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
89
+ messageId: zod.ZodString;
90
+ delta: zod.ZodEffects<zod.ZodString, string, string>;
91
+ }, "type" | "messageId"> & {
92
+ type: zod.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_CONTENT>;
93
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<{
94
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
95
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
96
+ } & {
97
+ type: zod.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_END>;
98
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<{
99
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
100
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
101
+ } & {
102
+ messageId: zod.ZodString;
103
+ type: zod.ZodLiteral<EventType.TOOL_CALL_RESULT>;
104
+ toolCallId: zod.ZodString;
105
+ content: zod.ZodString;
106
+ role: zod.ZodOptional<zod.ZodLiteral<"tool">>;
107
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<{
108
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
109
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
110
+ } & {
111
+ type: zod.ZodLiteral<EventType.THINKING_START>;
112
+ title: zod.ZodOptional<zod.ZodString>;
113
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<{
114
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
115
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
116
+ } & {
117
+ type: zod.ZodLiteral<EventType.THINKING_END>;
118
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<{
119
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
120
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
121
+ } & {
122
+ type: zod.ZodLiteral<EventType.STATE_SNAPSHOT>;
123
+ snapshot: zod.ZodAny;
124
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<{
125
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
126
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
127
+ } & {
128
+ type: zod.ZodLiteral<EventType.STATE_DELTA>;
129
+ delta: zod.ZodArray<zod.ZodAny, "many">;
130
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<{
131
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
132
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
133
+ } & {
134
+ type: zod.ZodLiteral<EventType.MESSAGES_SNAPSHOT>;
135
+ messages: zod.ZodArray<zod.ZodDiscriminatedUnion<"role", [zod.ZodObject<{
136
+ id: zod.ZodString;
137
+ name: zod.ZodOptional<zod.ZodString>;
138
+ } & {
139
+ role: zod.ZodLiteral<"developer">;
140
+ content: zod.ZodString;
141
+ }, "strip", zod.ZodTypeAny, {
116
142
  id: string;
117
143
  role: "developer";
118
144
  content: string;
119
145
  name?: string | undefined;
120
- } | {
146
+ }, {
147
+ id: string;
148
+ role: "developer";
149
+ content: string;
150
+ name?: string | undefined;
151
+ }>, zod.ZodObject<{
152
+ id: zod.ZodString;
153
+ name: zod.ZodOptional<zod.ZodString>;
154
+ } & {
155
+ role: zod.ZodLiteral<"system">;
156
+ content: zod.ZodString;
157
+ }, "strip", zod.ZodTypeAny, {
158
+ id: string;
159
+ role: "system";
160
+ content: string;
161
+ name?: string | undefined;
162
+ }, {
121
163
  id: string;
122
164
  role: "system";
123
165
  content: string;
124
166
  name?: string | undefined;
125
- } | {
167
+ }>, zod.ZodObject<{
168
+ id: zod.ZodString;
169
+ name: zod.ZodOptional<zod.ZodString>;
170
+ } & {
171
+ role: zod.ZodLiteral<"assistant">;
172
+ content: zod.ZodOptional<zod.ZodString>;
173
+ toolCalls: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
174
+ id: zod.ZodString;
175
+ type: zod.ZodLiteral<"function">;
176
+ function: zod.ZodObject<{
177
+ name: zod.ZodString;
178
+ arguments: zod.ZodString;
179
+ }, "strip", zod.ZodTypeAny, {
180
+ name: string;
181
+ arguments: string;
182
+ }, {
183
+ name: string;
184
+ arguments: string;
185
+ }>;
186
+ }, "strip", zod.ZodTypeAny, {
187
+ function: {
188
+ name: string;
189
+ arguments: string;
190
+ };
191
+ type: "function";
192
+ id: string;
193
+ }, {
194
+ function: {
195
+ name: string;
196
+ arguments: string;
197
+ };
198
+ type: "function";
199
+ id: string;
200
+ }>, "many">>;
201
+ }, "strip", zod.ZodTypeAny, {
202
+ id: string;
203
+ role: "assistant";
204
+ name?: string | undefined;
205
+ content?: string | undefined;
206
+ toolCalls?: {
207
+ function: {
208
+ name: string;
209
+ arguments: string;
210
+ };
211
+ type: "function";
212
+ id: string;
213
+ }[] | undefined;
214
+ }, {
126
215
  id: string;
127
216
  role: "assistant";
128
217
  name?: string | undefined;
@@ -135,7 +224,78 @@ declare class LangGraphAgent extends LangGraphAgent$1 {
135
224
  type: "function";
136
225
  id: string;
137
226
  }[] | undefined;
138
- } | {
227
+ }>, zod.ZodObject<{
228
+ id: zod.ZodString;
229
+ name: zod.ZodOptional<zod.ZodString>;
230
+ } & {
231
+ role: zod.ZodLiteral<"user">;
232
+ content: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodEffects<zod.ZodDiscriminatedUnion<"type", [zod.ZodObject<{
233
+ type: zod.ZodLiteral<"text">;
234
+ text: zod.ZodString;
235
+ }, "strip", zod.ZodTypeAny, {
236
+ type: "text";
237
+ text: string;
238
+ }, {
239
+ type: "text";
240
+ text: string;
241
+ }>, zod.ZodObject<{
242
+ type: zod.ZodLiteral<"binary">;
243
+ mimeType: zod.ZodString;
244
+ id: zod.ZodOptional<zod.ZodString>;
245
+ url: zod.ZodOptional<zod.ZodString>;
246
+ data: zod.ZodOptional<zod.ZodString>;
247
+ filename: zod.ZodOptional<zod.ZodString>;
248
+ }, "strip", zod.ZodTypeAny, {
249
+ type: "binary";
250
+ mimeType: string;
251
+ id?: string | undefined;
252
+ url?: string | undefined;
253
+ data?: string | undefined;
254
+ filename?: string | undefined;
255
+ }, {
256
+ type: "binary";
257
+ mimeType: string;
258
+ id?: string | undefined;
259
+ url?: string | undefined;
260
+ data?: string | undefined;
261
+ filename?: string | undefined;
262
+ }>]>, {
263
+ type: "text";
264
+ text: string;
265
+ } | {
266
+ type: "binary";
267
+ mimeType: string;
268
+ id?: string | undefined;
269
+ url?: string | undefined;
270
+ data?: string | undefined;
271
+ filename?: string | undefined;
272
+ }, {
273
+ type: "text";
274
+ text: string;
275
+ } | {
276
+ type: "binary";
277
+ mimeType: string;
278
+ id?: string | undefined;
279
+ url?: string | undefined;
280
+ data?: string | undefined;
281
+ filename?: string | undefined;
282
+ }>, "many">]>;
283
+ }, "strip", zod.ZodTypeAny, {
284
+ id: string;
285
+ role: "user";
286
+ content: string | ({
287
+ type: "text";
288
+ text: string;
289
+ } | {
290
+ type: "binary";
291
+ mimeType: string;
292
+ id?: string | undefined;
293
+ url?: string | undefined;
294
+ data?: string | undefined;
295
+ filename?: string | undefined;
296
+ })[];
297
+ name?: string | undefined;
298
+ }, {
139
299
  id: string;
140
300
  role: "user";
141
301
  content: string | ({
@@ -150,40 +310,369 @@ declare class LangGraphAgent extends LangGraphAgent$1 {
150
310
  filename?: string | undefined;
151
311
  })[];
152
312
  name?: string | undefined;
153
- } | {
313
+ }>, zod.ZodObject<{
314
+ id: zod.ZodString;
315
+ content: zod.ZodString;
316
+ role: zod.ZodLiteral<"tool">;
317
+ toolCallId: zod.ZodString;
318
+ error: zod.ZodOptional<zod.ZodString>;
319
+ }, "strip", zod.ZodTypeAny, {
154
320
  id: string;
155
321
  role: "tool";
156
322
  content: string;
157
323
  toolCallId: string;
158
324
  error?: string | undefined;
159
- } | {
325
+ }, {
326
+ id: string;
327
+ role: "tool";
328
+ content: string;
329
+ toolCallId: string;
330
+ error?: string | undefined;
331
+ }>, zod.ZodObject<{
332
+ id: zod.ZodString;
333
+ role: zod.ZodLiteral<"activity">;
334
+ activityType: zod.ZodString;
335
+ content: zod.ZodRecord<zod.ZodString, zod.ZodAny>;
336
+ }, "strip", zod.ZodTypeAny, {
160
337
  id: string;
161
338
  role: "activity";
162
339
  content: Record<string, any>;
163
340
  activityType: string;
164
- })[];
165
- timestamp?: number | undefined;
166
- rawEvent?: any;
167
- } | {
168
- type: EventType.RAW;
169
- timestamp?: number | undefined;
170
- rawEvent?: any;
171
- event?: any;
172
- source?: string | undefined;
173
- } | {
174
- name: string;
175
- type: EventType.CUSTOM;
176
- value?: any;
177
- timestamp?: number | undefined;
178
- rawEvent?: any;
179
- } | {
180
- type: EventType.RUN_STARTED;
181
- threadId: string;
182
- runId: string;
183
- parentRunId?: string | undefined;
184
- timestamp?: number | undefined;
185
- rawEvent?: any;
186
- input?: {
341
+ }, {
342
+ id: string;
343
+ role: "activity";
344
+ content: Record<string, any>;
345
+ activityType: string;
346
+ }>]>, "many">;
347
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<{
348
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
349
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
350
+ } & {
351
+ type: zod.ZodLiteral<EventType.RAW>;
352
+ event: zod.ZodAny;
353
+ source: zod.ZodOptional<zod.ZodString>;
354
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<{
355
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
356
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
357
+ } & {
358
+ type: zod.ZodLiteral<EventType.CUSTOM>;
359
+ name: zod.ZodString;
360
+ value: zod.ZodAny;
361
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<{
362
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
363
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
364
+ } & {
365
+ type: zod.ZodLiteral<EventType.RUN_STARTED>;
366
+ threadId: zod.ZodString;
367
+ runId: zod.ZodString;
368
+ parentRunId: zod.ZodOptional<zod.ZodString>;
369
+ input: zod.ZodOptional<zod.ZodObject<{
370
+ threadId: zod.ZodString;
371
+ runId: zod.ZodString;
372
+ parentRunId: zod.ZodOptional<zod.ZodString>;
373
+ state: zod.ZodAny;
374
+ messages: zod.ZodArray<zod.ZodDiscriminatedUnion<"role", [zod.ZodObject<{
375
+ id: zod.ZodString;
376
+ name: zod.ZodOptional<zod.ZodString>;
377
+ } & {
378
+ role: zod.ZodLiteral<"developer">;
379
+ content: zod.ZodString;
380
+ }, "strip", zod.ZodTypeAny, {
381
+ id: string;
382
+ role: "developer";
383
+ content: string;
384
+ name?: string | undefined;
385
+ }, {
386
+ id: string;
387
+ role: "developer";
388
+ content: string;
389
+ name?: string | undefined;
390
+ }>, zod.ZodObject<{
391
+ id: zod.ZodString;
392
+ name: zod.ZodOptional<zod.ZodString>;
393
+ } & {
394
+ role: zod.ZodLiteral<"system">;
395
+ content: zod.ZodString;
396
+ }, "strip", zod.ZodTypeAny, {
397
+ id: string;
398
+ role: "system";
399
+ content: string;
400
+ name?: string | undefined;
401
+ }, {
402
+ id: string;
403
+ role: "system";
404
+ content: string;
405
+ name?: string | undefined;
406
+ }>, zod.ZodObject<{
407
+ id: zod.ZodString;
408
+ name: zod.ZodOptional<zod.ZodString>;
409
+ } & {
410
+ role: zod.ZodLiteral<"assistant">;
411
+ content: zod.ZodOptional<zod.ZodString>;
412
+ toolCalls: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
413
+ id: zod.ZodString;
414
+ type: zod.ZodLiteral<"function">;
415
+ function: zod.ZodObject<{
416
+ name: zod.ZodString;
417
+ arguments: zod.ZodString;
418
+ }, "strip", zod.ZodTypeAny, {
419
+ name: string;
420
+ arguments: string;
421
+ }, {
422
+ name: string;
423
+ arguments: string;
424
+ }>;
425
+ }, "strip", zod.ZodTypeAny, {
426
+ function: {
427
+ name: string;
428
+ arguments: string;
429
+ };
430
+ type: "function";
431
+ id: string;
432
+ }, {
433
+ function: {
434
+ name: string;
435
+ arguments: string;
436
+ };
437
+ type: "function";
438
+ id: string;
439
+ }>, "many">>;
440
+ }, "strip", zod.ZodTypeAny, {
441
+ id: string;
442
+ role: "assistant";
443
+ name?: string | undefined;
444
+ content?: string | undefined;
445
+ toolCalls?: {
446
+ function: {
447
+ name: string;
448
+ arguments: string;
449
+ };
450
+ type: "function";
451
+ id: string;
452
+ }[] | undefined;
453
+ }, {
454
+ id: string;
455
+ role: "assistant";
456
+ name?: string | undefined;
457
+ content?: string | undefined;
458
+ toolCalls?: {
459
+ function: {
460
+ name: string;
461
+ arguments: string;
462
+ };
463
+ type: "function";
464
+ id: string;
465
+ }[] | undefined;
466
+ }>, zod.ZodObject<{
467
+ id: zod.ZodString;
468
+ name: zod.ZodOptional<zod.ZodString>;
469
+ } & {
470
+ role: zod.ZodLiteral<"user">;
471
+ content: zod.ZodUnion<[zod.ZodString, zod.ZodArray<zod.ZodEffects<zod.ZodDiscriminatedUnion<"type", [zod.ZodObject<{
472
+ type: zod.ZodLiteral<"text">;
473
+ text: zod.ZodString;
474
+ }, "strip", zod.ZodTypeAny, {
475
+ type: "text";
476
+ text: string;
477
+ }, {
478
+ type: "text";
479
+ text: string;
480
+ }>, zod.ZodObject<{
481
+ type: zod.ZodLiteral<"binary">;
482
+ mimeType: zod.ZodString;
483
+ id: zod.ZodOptional<zod.ZodString>;
484
+ url: zod.ZodOptional<zod.ZodString>;
485
+ data: zod.ZodOptional<zod.ZodString>;
486
+ filename: zod.ZodOptional<zod.ZodString>;
487
+ }, "strip", zod.ZodTypeAny, {
488
+ type: "binary";
489
+ mimeType: string;
490
+ id?: string | undefined;
491
+ url?: string | undefined;
492
+ data?: string | undefined;
493
+ filename?: string | undefined;
494
+ }, {
495
+ type: "binary";
496
+ mimeType: string;
497
+ id?: string | undefined;
498
+ url?: string | undefined;
499
+ data?: string | undefined;
500
+ filename?: string | undefined;
501
+ }>]>, {
502
+ type: "text";
503
+ text: string;
504
+ } | {
505
+ type: "binary";
506
+ mimeType: string;
507
+ id?: string | undefined;
508
+ url?: string | undefined;
509
+ data?: string | undefined;
510
+ filename?: string | undefined;
511
+ }, {
512
+ type: "text";
513
+ text: string;
514
+ } | {
515
+ type: "binary";
516
+ mimeType: string;
517
+ id?: string | undefined;
518
+ url?: string | undefined;
519
+ data?: string | undefined;
520
+ filename?: string | undefined;
521
+ }>, "many">]>;
522
+ }, "strip", zod.ZodTypeAny, {
523
+ id: string;
524
+ role: "user";
525
+ content: string | ({
526
+ type: "text";
527
+ text: string;
528
+ } | {
529
+ type: "binary";
530
+ mimeType: string;
531
+ id?: string | undefined;
532
+ url?: string | undefined;
533
+ data?: string | undefined;
534
+ filename?: string | undefined;
535
+ })[];
536
+ name?: string | undefined;
537
+ }, {
538
+ id: string;
539
+ role: "user";
540
+ content: string | ({
541
+ type: "text";
542
+ text: string;
543
+ } | {
544
+ type: "binary";
545
+ mimeType: string;
546
+ id?: string | undefined;
547
+ url?: string | undefined;
548
+ data?: string | undefined;
549
+ filename?: string | undefined;
550
+ })[];
551
+ name?: string | undefined;
552
+ }>, zod.ZodObject<{
553
+ id: zod.ZodString;
554
+ content: zod.ZodString;
555
+ role: zod.ZodLiteral<"tool">;
556
+ toolCallId: zod.ZodString;
557
+ error: zod.ZodOptional<zod.ZodString>;
558
+ }, "strip", zod.ZodTypeAny, {
559
+ id: string;
560
+ role: "tool";
561
+ content: string;
562
+ toolCallId: string;
563
+ error?: string | undefined;
564
+ }, {
565
+ id: string;
566
+ role: "tool";
567
+ content: string;
568
+ toolCallId: string;
569
+ error?: string | undefined;
570
+ }>, zod.ZodObject<{
571
+ id: zod.ZodString;
572
+ role: zod.ZodLiteral<"activity">;
573
+ activityType: zod.ZodString;
574
+ content: zod.ZodRecord<zod.ZodString, zod.ZodAny>;
575
+ }, "strip", zod.ZodTypeAny, {
576
+ id: string;
577
+ role: "activity";
578
+ content: Record<string, any>;
579
+ activityType: string;
580
+ }, {
581
+ id: string;
582
+ role: "activity";
583
+ content: Record<string, any>;
584
+ activityType: string;
585
+ }>]>, "many">;
586
+ tools: zod.ZodArray<zod.ZodObject<{
587
+ name: zod.ZodString;
588
+ description: zod.ZodString;
589
+ parameters: zod.ZodAny;
590
+ }, "strip", zod.ZodTypeAny, {
591
+ name: string;
592
+ description: string;
593
+ parameters?: any;
594
+ }, {
595
+ name: string;
596
+ description: string;
597
+ parameters?: any;
598
+ }>, "many">;
599
+ context: zod.ZodArray<zod.ZodObject<{
600
+ description: zod.ZodString;
601
+ value: zod.ZodString;
602
+ }, "strip", zod.ZodTypeAny, {
603
+ value: string;
604
+ description: string;
605
+ }, {
606
+ value: string;
607
+ description: string;
608
+ }>, "many">;
609
+ forwardedProps: zod.ZodAny;
610
+ }, "strip", zod.ZodTypeAny, {
611
+ threadId: string;
612
+ runId: string;
613
+ messages: ({
614
+ id: string;
615
+ role: "developer";
616
+ content: string;
617
+ name?: string | undefined;
618
+ } | {
619
+ id: string;
620
+ role: "system";
621
+ content: string;
622
+ name?: string | undefined;
623
+ } | {
624
+ id: string;
625
+ role: "assistant";
626
+ name?: string | undefined;
627
+ content?: string | undefined;
628
+ toolCalls?: {
629
+ function: {
630
+ name: string;
631
+ arguments: string;
632
+ };
633
+ type: "function";
634
+ id: string;
635
+ }[] | undefined;
636
+ } | {
637
+ id: string;
638
+ role: "user";
639
+ content: string | ({
640
+ type: "text";
641
+ text: string;
642
+ } | {
643
+ type: "binary";
644
+ mimeType: string;
645
+ id?: string | undefined;
646
+ url?: string | undefined;
647
+ data?: string | undefined;
648
+ filename?: string | undefined;
649
+ })[];
650
+ name?: string | undefined;
651
+ } | {
652
+ id: string;
653
+ role: "tool";
654
+ content: string;
655
+ toolCallId: string;
656
+ error?: string | undefined;
657
+ } | {
658
+ id: string;
659
+ role: "activity";
660
+ content: Record<string, any>;
661
+ activityType: string;
662
+ })[];
663
+ tools: {
664
+ name: string;
665
+ description: string;
666
+ parameters?: any;
667
+ }[];
668
+ context: {
669
+ value: string;
670
+ description: string;
671
+ }[];
672
+ parentRunId?: string | undefined;
673
+ state?: any;
674
+ forwardedProps?: any;
675
+ }, {
187
676
  threadId: string;
188
677
  runId: string;
189
678
  messages: ({
@@ -248,31 +737,35 @@ declare class LangGraphAgent extends LangGraphAgent$1 {
248
737
  parentRunId?: string | undefined;
249
738
  state?: any;
250
739
  forwardedProps?: any;
251
- } | undefined;
252
- } | {
253
- type: EventType.RUN_FINISHED;
254
- threadId: string;
255
- runId: string;
256
- timestamp?: number | undefined;
257
- rawEvent?: any;
258
- result?: any;
259
- } | {
260
- message: string;
261
- type: EventType.RUN_ERROR;
262
- code?: string | undefined;
263
- timestamp?: number | undefined;
264
- rawEvent?: any;
265
- } | {
266
- type: EventType.STEP_STARTED;
267
- stepName: string;
268
- timestamp?: number | undefined;
269
- rawEvent?: any;
270
- } | {
271
- type: EventType.STEP_FINISHED;
272
- stepName: string;
273
- timestamp?: number | undefined;
274
- rawEvent?: any;
275
- } | {
740
+ }>>;
741
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<{
742
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
743
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
744
+ } & {
745
+ type: zod.ZodLiteral<EventType.RUN_FINISHED>;
746
+ threadId: zod.ZodString;
747
+ runId: zod.ZodString;
748
+ result: zod.ZodOptional<zod.ZodAny>;
749
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<{
750
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
751
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
752
+ } & {
753
+ type: zod.ZodLiteral<EventType.RUN_ERROR>;
754
+ message: zod.ZodString;
755
+ code: zod.ZodOptional<zod.ZodString>;
756
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<{
757
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
758
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
759
+ } & {
760
+ type: zod.ZodLiteral<EventType.STEP_STARTED>;
761
+ stepName: zod.ZodString;
762
+ }, zod.ZodTypeAny, "passthrough"> | zod.objectOutputType<{
763
+ timestamp: zod.ZodOptional<zod.ZodNumber>;
764
+ rawEvent: zod.ZodOptional<zod.ZodAny>;
765
+ } & {
766
+ type: zod.ZodLiteral<EventType.STEP_FINISHED>;
767
+ stepName: zod.ZodString;
768
+ }, zod.ZodTypeAny, "passthrough"> | {
276
769
  type: EventType;
277
770
  name: string;
278
771
  value: any;