@sqlrooms/ai 0.19.2 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/schemas.d.ts CHANGED
@@ -13,304 +13,231 @@ export declare const QueryToolParameters: z.ZodObject<{
13
13
  reasoning: string;
14
14
  }>;
15
15
  export type QueryToolParameters = z.infer<typeof QueryToolParameters>;
16
- export declare const AnalysisSchema: z.ZodString;
17
- export type AnalysisSchema = z.infer<typeof AnalysisSchema>;
18
- export declare const ToolCallSchema: z.ZodObject<{
19
- toolName: z.ZodString;
20
- toolCallId: z.ZodString;
21
- args: z.ZodObject<{
22
- type: z.ZodLiteral<"query">;
23
- sqlQuery: z.ZodString;
24
- reasoning: z.ZodString;
25
- }, "strip", z.ZodTypeAny, {
26
- sqlQuery: string;
27
- type: "query";
28
- reasoning: string;
29
- }, {
30
- sqlQuery: string;
31
- type: "query";
32
- reasoning: string;
33
- }>;
34
- }, "strip", z.ZodTypeAny, {
35
- toolName: string;
36
- toolCallId: string;
37
- args: {
38
- sqlQuery: string;
39
- type: "query";
40
- reasoning: string;
41
- };
42
- }, {
43
- toolName: string;
44
- toolCallId: string;
45
- args: {
46
- sqlQuery: string;
47
- type: "query";
48
- reasoning: string;
49
- };
50
- }>;
51
- export type ToolCallSchema = z.infer<typeof ToolCallSchema>;
52
- export declare const QueryResultElementSchema: z.ZodObject<{
53
- type: z.ZodLiteral<"query-result">;
54
- title: z.ZodString;
55
- sqlQuery: z.ZodString;
16
+ export declare const ErrorMessageSchema: z.ZodObject<{
17
+ error: z.ZodString;
56
18
  }, "strip", z.ZodTypeAny, {
57
- title: string;
58
- sqlQuery: string;
59
- type: "query-result";
19
+ error: string;
60
20
  }, {
61
- title: string;
62
- sqlQuery: string;
63
- type: "query-result";
21
+ error: string;
64
22
  }>;
65
- export type QueryResultElementSchema = z.infer<typeof QueryResultElementSchema>;
66
- export declare const ElementSchema: z.ZodUnion<[z.ZodObject<{
67
- type: z.ZodLiteral<"query-result">;
68
- title: z.ZodString;
69
- sqlQuery: z.ZodString;
70
- }, "strip", z.ZodTypeAny, {
71
- title: string;
72
- sqlQuery: string;
73
- type: "query-result";
74
- }, {
75
- title: string;
76
- sqlQuery: string;
77
- type: "query-result";
78
- }>, z.ZodString]>;
79
- export type ElementSchema = z.infer<typeof ElementSchema>;
80
- export declare const ToolCallMessageSchema: z.ZodObject<{
81
- toolCallId: z.ZodString;
82
- element: z.ZodUnion<[z.ZodObject<{
83
- type: z.ZodLiteral<"query-result">;
84
- title: z.ZodString;
85
- sqlQuery: z.ZodString;
86
- }, "strip", z.ZodTypeAny, {
87
- title: string;
88
- sqlQuery: string;
89
- type: "query-result";
90
- }, {
91
- title: string;
92
- sqlQuery: string;
93
- type: "query-result";
94
- }>, z.ZodString]>;
23
+ export type ErrorMessageSchema = z.infer<typeof ErrorMessageSchema>;
24
+ export declare const StreamMessagePartSchema: z.ZodUnion<[z.ZodObject<{
25
+ type: z.ZodLiteral<"text">;
26
+ text: z.ZodString;
27
+ additionalData: z.ZodOptional<z.ZodAny>;
28
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
95
29
  }, "strip", z.ZodTypeAny, {
96
- toolCallId: string;
97
- element: string | {
98
- title: string;
99
- sqlQuery: string;
100
- type: "query-result";
101
- };
30
+ type: "text";
31
+ text: string;
32
+ additionalData?: any;
33
+ isCompleted?: boolean | undefined;
102
34
  }, {
103
- toolCallId: string;
104
- element: string | {
105
- title: string;
106
- sqlQuery: string;
107
- type: "query-result";
108
- };
109
- }>;
110
- export type ToolCallMessageSchema = z.infer<typeof ToolCallMessageSchema>;
111
- export declare const ToolResultSchema: z.ZodObject<{
112
- toolName: z.ZodString;
113
- toolCallId: z.ZodString;
114
- args: z.ZodRecord<z.ZodString, z.ZodAny>;
115
- result: z.ZodUnion<[z.ZodObject<{
116
- success: z.ZodLiteral<false>;
117
- error: z.ZodString;
35
+ type: "text";
36
+ text: string;
37
+ additionalData?: any;
38
+ isCompleted?: boolean | undefined;
39
+ }>, z.ZodObject<{
40
+ type: z.ZodLiteral<"tool-invocation">;
41
+ toolInvocation: z.ZodObject<{
42
+ toolCallId: z.ZodString;
43
+ toolName: z.ZodString;
44
+ args: z.ZodAny;
45
+ state: z.ZodString;
46
+ result: z.ZodOptional<z.ZodAny>;
118
47
  }, "strip", z.ZodTypeAny, {
119
- success: false;
120
- error: string;
48
+ toolCallId: string;
49
+ toolName: string;
50
+ state: string;
51
+ result?: any;
52
+ args?: any;
121
53
  }, {
122
- success: false;
123
- error: string;
124
- }>, z.ZodObject<{
125
- success: z.ZodLiteral<true>;
126
- data: z.ZodRecord<z.ZodString, z.ZodAny>;
127
- }, "strip", z.ZodTypeAny, {
128
- success: true;
129
- data: Record<string, any>;
130
- }, {
131
- success: true;
132
- data: Record<string, any>;
133
- }>]>;
54
+ toolCallId: string;
55
+ toolName: string;
56
+ state: string;
57
+ result?: any;
58
+ args?: any;
59
+ }>;
60
+ additionalData: z.ZodOptional<z.ZodAny>;
61
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
134
62
  }, "strip", z.ZodTypeAny, {
135
- result: {
136
- success: false;
137
- error: string;
138
- } | {
139
- success: true;
140
- data: Record<string, any>;
63
+ type: "tool-invocation";
64
+ toolInvocation: {
65
+ toolCallId: string;
66
+ toolName: string;
67
+ state: string;
68
+ result?: any;
69
+ args?: any;
141
70
  };
142
- toolName: string;
143
- toolCallId: string;
144
- args: Record<string, any>;
71
+ additionalData?: any;
72
+ isCompleted?: boolean | undefined;
145
73
  }, {
146
- result: {
147
- success: false;
148
- error: string;
149
- } | {
150
- success: true;
151
- data: Record<string, any>;
74
+ type: "tool-invocation";
75
+ toolInvocation: {
76
+ toolCallId: string;
77
+ toolName: string;
78
+ state: string;
79
+ result?: any;
80
+ args?: any;
152
81
  };
153
- toolName: string;
154
- toolCallId: string;
155
- args: Record<string, any>;
156
- }>;
157
- export type ToolResultSchema = z.infer<typeof ToolResultSchema>;
158
- export declare const ErrorMessageSchema: z.ZodObject<{
159
- error: z.ZodString;
160
- }, "strip", z.ZodTypeAny, {
161
- error: string;
162
- }, {
163
- error: string;
164
- }>;
165
- export type ErrorMessageSchema = z.infer<typeof ErrorMessageSchema>;
82
+ additionalData?: any;
83
+ isCompleted?: boolean | undefined;
84
+ }>, z.ZodObject<{
85
+ type: z.ZodString;
86
+ additionalData: z.ZodOptional<z.ZodAny>;
87
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
88
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
89
+ type: z.ZodString;
90
+ additionalData: z.ZodOptional<z.ZodAny>;
91
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
92
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
93
+ type: z.ZodString;
94
+ additionalData: z.ZodOptional<z.ZodAny>;
95
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
96
+ }, z.ZodTypeAny, "passthrough">>]>;
166
97
  export declare const AnalysisResultSchema: z.ZodObject<{
167
98
  id: z.ZodString;
168
99
  prompt: z.ZodString;
169
- streamMessage: z.ZodObject<{
170
- reasoning: z.ZodOptional<z.ZodString>;
171
- toolCallMessages: z.ZodOptional<z.ZodArray<z.ZodObject<{
172
- toolName: z.ZodString;
173
- toolCallId: z.ZodString;
174
- args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
175
- isCompleted: z.ZodBoolean;
176
- llmResult: z.ZodOptional<z.ZodUnknown>;
177
- additionalData: z.ZodOptional<z.ZodUnknown>;
178
- text: z.ZodOptional<z.ZodString>;
179
- }, "strip", z.ZodTypeAny, {
180
- toolName: string;
181
- toolCallId: string;
182
- args: Record<string, unknown>;
183
- isCompleted: boolean;
184
- text?: string | undefined;
185
- llmResult?: unknown;
186
- additionalData?: unknown;
187
- }, {
188
- toolName: string;
189
- toolCallId: string;
190
- args: Record<string, unknown>;
191
- isCompleted: boolean;
192
- text?: string | undefined;
193
- llmResult?: unknown;
194
- additionalData?: unknown;
195
- }>, "many">>;
196
- analysis: z.ZodOptional<z.ZodString>;
197
- text: z.ZodOptional<z.ZodString>;
100
+ streamMessage: z.ZodEffects<z.ZodObject<{
198
101
  parts: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
199
102
  type: z.ZodLiteral<"text">;
200
103
  text: z.ZodString;
104
+ additionalData: z.ZodOptional<z.ZodAny>;
105
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
201
106
  }, "strip", z.ZodTypeAny, {
202
- text: string;
203
107
  type: "text";
204
- }, {
205
108
  text: string;
109
+ additionalData?: any;
110
+ isCompleted?: boolean | undefined;
111
+ }, {
206
112
  type: "text";
113
+ text: string;
114
+ additionalData?: any;
115
+ isCompleted?: boolean | undefined;
207
116
  }>, z.ZodObject<{
208
- type: z.ZodLiteral<"tool">;
209
- toolCallMessages: z.ZodArray<z.ZodObject<{
210
- toolName: z.ZodString;
117
+ type: z.ZodLiteral<"tool-invocation">;
118
+ toolInvocation: z.ZodObject<{
211
119
  toolCallId: z.ZodString;
212
- args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
213
- isCompleted: z.ZodBoolean;
214
- llmResult: z.ZodOptional<z.ZodUnknown>;
215
- additionalData: z.ZodOptional<z.ZodUnknown>;
216
- text: z.ZodOptional<z.ZodString>;
120
+ toolName: z.ZodString;
121
+ args: z.ZodAny;
122
+ state: z.ZodString;
123
+ result: z.ZodOptional<z.ZodAny>;
217
124
  }, "strip", z.ZodTypeAny, {
218
- toolName: string;
219
125
  toolCallId: string;
220
- args: Record<string, unknown>;
221
- isCompleted: boolean;
222
- text?: string | undefined;
223
- llmResult?: unknown;
224
- additionalData?: unknown;
225
- }, {
226
126
  toolName: string;
127
+ state: string;
128
+ result?: any;
129
+ args?: any;
130
+ }, {
227
131
  toolCallId: string;
228
- args: Record<string, unknown>;
229
- isCompleted: boolean;
230
- text?: string | undefined;
231
- llmResult?: unknown;
232
- additionalData?: unknown;
233
- }>, "many">;
234
- }, "strip", z.ZodTypeAny, {
235
- type: "tool";
236
- toolCallMessages: {
237
132
  toolName: string;
133
+ state: string;
134
+ result?: any;
135
+ args?: any;
136
+ }>;
137
+ additionalData: z.ZodOptional<z.ZodAny>;
138
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
139
+ }, "strip", z.ZodTypeAny, {
140
+ type: "tool-invocation";
141
+ toolInvocation: {
238
142
  toolCallId: string;
239
- args: Record<string, unknown>;
240
- isCompleted: boolean;
241
- text?: string | undefined;
242
- llmResult?: unknown;
243
- additionalData?: unknown;
244
- }[];
245
- }, {
246
- type: "tool";
247
- toolCallMessages: {
248
143
  toolName: string;
144
+ state: string;
145
+ result?: any;
146
+ args?: any;
147
+ };
148
+ additionalData?: any;
149
+ isCompleted?: boolean | undefined;
150
+ }, {
151
+ type: "tool-invocation";
152
+ toolInvocation: {
249
153
  toolCallId: string;
250
- args: Record<string, unknown>;
251
- isCompleted: boolean;
252
- text?: string | undefined;
253
- llmResult?: unknown;
254
- additionalData?: unknown;
255
- }[];
256
- }>]>, "many">>;
154
+ toolName: string;
155
+ state: string;
156
+ result?: any;
157
+ args?: any;
158
+ };
159
+ additionalData?: any;
160
+ isCompleted?: boolean | undefined;
161
+ }>, z.ZodObject<{
162
+ type: z.ZodString;
163
+ additionalData: z.ZodOptional<z.ZodAny>;
164
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
165
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
166
+ type: z.ZodString;
167
+ additionalData: z.ZodOptional<z.ZodAny>;
168
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
169
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
170
+ type: z.ZodString;
171
+ additionalData: z.ZodOptional<z.ZodAny>;
172
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
173
+ }, z.ZodTypeAny, "passthrough">>]>, "many">>;
257
174
  }, "strip", z.ZodTypeAny, {
258
- text?: string | undefined;
259
- toolCallMessages?: {
260
- toolName: string;
261
- toolCallId: string;
262
- args: Record<string, unknown>;
263
- isCompleted: boolean;
264
- text?: string | undefined;
265
- llmResult?: unknown;
266
- additionalData?: unknown;
267
- }[] | undefined;
268
- reasoning?: string | undefined;
269
- analysis?: string | undefined;
270
175
  parts?: ({
271
- text: string;
272
176
  type: "text";
177
+ text: string;
178
+ additionalData?: any;
179
+ isCompleted?: boolean | undefined;
273
180
  } | {
274
- type: "tool";
275
- toolCallMessages: {
276
- toolName: string;
181
+ type: "tool-invocation";
182
+ toolInvocation: {
277
183
  toolCallId: string;
278
- args: Record<string, unknown>;
279
- isCompleted: boolean;
280
- text?: string | undefined;
281
- llmResult?: unknown;
282
- additionalData?: unknown;
283
- }[];
284
- })[] | undefined;
184
+ toolName: string;
185
+ state: string;
186
+ result?: any;
187
+ args?: any;
188
+ };
189
+ additionalData?: any;
190
+ isCompleted?: boolean | undefined;
191
+ } | z.objectOutputType<{
192
+ type: z.ZodString;
193
+ additionalData: z.ZodOptional<z.ZodAny>;
194
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
195
+ }, z.ZodTypeAny, "passthrough">)[] | undefined;
285
196
  }, {
286
- text?: string | undefined;
287
- toolCallMessages?: {
288
- toolName: string;
289
- toolCallId: string;
290
- args: Record<string, unknown>;
291
- isCompleted: boolean;
292
- text?: string | undefined;
293
- llmResult?: unknown;
294
- additionalData?: unknown;
295
- }[] | undefined;
296
- reasoning?: string | undefined;
297
- analysis?: string | undefined;
298
197
  parts?: ({
299
- text: string;
300
198
  type: "text";
199
+ text: string;
200
+ additionalData?: any;
201
+ isCompleted?: boolean | undefined;
301
202
  } | {
302
- type: "tool";
303
- toolCallMessages: {
203
+ type: "tool-invocation";
204
+ toolInvocation: {
205
+ toolCallId: string;
304
206
  toolName: string;
207
+ state: string;
208
+ result?: any;
209
+ args?: any;
210
+ };
211
+ additionalData?: any;
212
+ isCompleted?: boolean | undefined;
213
+ } | z.objectInputType<{
214
+ type: z.ZodString;
215
+ additionalData: z.ZodOptional<z.ZodAny>;
216
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
217
+ }, z.ZodTypeAny, "passthrough">)[] | undefined;
218
+ }>, {
219
+ parts?: ({
220
+ type: "text";
221
+ text: string;
222
+ additionalData?: any;
223
+ isCompleted?: boolean | undefined;
224
+ } | {
225
+ type: "tool-invocation";
226
+ toolInvocation: {
305
227
  toolCallId: string;
306
- args: Record<string, unknown>;
307
- isCompleted: boolean;
308
- text?: string | undefined;
309
- llmResult?: unknown;
310
- additionalData?: unknown;
311
- }[];
312
- })[] | undefined;
313
- }>;
228
+ toolName: string;
229
+ state: string;
230
+ result?: any;
231
+ args?: any;
232
+ };
233
+ additionalData?: any;
234
+ isCompleted?: boolean | undefined;
235
+ } | z.objectOutputType<{
236
+ type: z.ZodString;
237
+ additionalData: z.ZodOptional<z.ZodAny>;
238
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
239
+ }, z.ZodTypeAny, "passthrough">)[] | undefined;
240
+ }, unknown>;
314
241
  errorMessage: z.ZodOptional<z.ZodObject<{
315
242
  error: z.ZodString;
316
243
  }, "strip", z.ZodTypeAny, {
@@ -321,73 +248,39 @@ export declare const AnalysisResultSchema: z.ZodObject<{
321
248
  isCompleted: z.ZodBoolean;
322
249
  }, "strip", z.ZodTypeAny, {
323
250
  id: string;
251
+ isCompleted: boolean;
324
252
  prompt: string;
325
253
  streamMessage: {
326
- text?: string | undefined;
327
- toolCallMessages?: {
328
- toolName: string;
329
- toolCallId: string;
330
- args: Record<string, unknown>;
331
- isCompleted: boolean;
332
- text?: string | undefined;
333
- llmResult?: unknown;
334
- additionalData?: unknown;
335
- }[] | undefined;
336
- reasoning?: string | undefined;
337
- analysis?: string | undefined;
338
254
  parts?: ({
339
- text: string;
340
255
  type: "text";
256
+ text: string;
257
+ additionalData?: any;
258
+ isCompleted?: boolean | undefined;
341
259
  } | {
342
- type: "tool";
343
- toolCallMessages: {
344
- toolName: string;
260
+ type: "tool-invocation";
261
+ toolInvocation: {
345
262
  toolCallId: string;
346
- args: Record<string, unknown>;
347
- isCompleted: boolean;
348
- text?: string | undefined;
349
- llmResult?: unknown;
350
- additionalData?: unknown;
351
- }[];
352
- })[] | undefined;
263
+ toolName: string;
264
+ state: string;
265
+ result?: any;
266
+ args?: any;
267
+ };
268
+ additionalData?: any;
269
+ isCompleted?: boolean | undefined;
270
+ } | z.objectOutputType<{
271
+ type: z.ZodString;
272
+ additionalData: z.ZodOptional<z.ZodAny>;
273
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
274
+ }, z.ZodTypeAny, "passthrough">)[] | undefined;
353
275
  };
354
- isCompleted: boolean;
355
276
  errorMessage?: {
356
277
  error: string;
357
278
  } | undefined;
358
279
  }, {
359
280
  id: string;
360
- prompt: string;
361
- streamMessage: {
362
- text?: string | undefined;
363
- toolCallMessages?: {
364
- toolName: string;
365
- toolCallId: string;
366
- args: Record<string, unknown>;
367
- isCompleted: boolean;
368
- text?: string | undefined;
369
- llmResult?: unknown;
370
- additionalData?: unknown;
371
- }[] | undefined;
372
- reasoning?: string | undefined;
373
- analysis?: string | undefined;
374
- parts?: ({
375
- text: string;
376
- type: "text";
377
- } | {
378
- type: "tool";
379
- toolCallMessages: {
380
- toolName: string;
381
- toolCallId: string;
382
- args: Record<string, unknown>;
383
- isCompleted: boolean;
384
- text?: string | undefined;
385
- llmResult?: unknown;
386
- additionalData?: unknown;
387
- }[];
388
- })[] | undefined;
389
- };
390
281
  isCompleted: boolean;
282
+ prompt: string;
283
+ streamMessage?: unknown;
391
284
  errorMessage?: {
392
285
  error: string;
393
286
  } | undefined;
@@ -401,151 +294,147 @@ export declare const AnalysisSessionSchema: z.ZodObject<{
401
294
  analysisResults: z.ZodArray<z.ZodObject<{
402
295
  id: z.ZodString;
403
296
  prompt: z.ZodString;
404
- streamMessage: z.ZodObject<{
405
- reasoning: z.ZodOptional<z.ZodString>;
406
- toolCallMessages: z.ZodOptional<z.ZodArray<z.ZodObject<{
407
- toolName: z.ZodString;
408
- toolCallId: z.ZodString;
409
- args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
410
- isCompleted: z.ZodBoolean;
411
- llmResult: z.ZodOptional<z.ZodUnknown>;
412
- additionalData: z.ZodOptional<z.ZodUnknown>;
413
- text: z.ZodOptional<z.ZodString>;
414
- }, "strip", z.ZodTypeAny, {
415
- toolName: string;
416
- toolCallId: string;
417
- args: Record<string, unknown>;
418
- isCompleted: boolean;
419
- text?: string | undefined;
420
- llmResult?: unknown;
421
- additionalData?: unknown;
422
- }, {
423
- toolName: string;
424
- toolCallId: string;
425
- args: Record<string, unknown>;
426
- isCompleted: boolean;
427
- text?: string | undefined;
428
- llmResult?: unknown;
429
- additionalData?: unknown;
430
- }>, "many">>;
431
- analysis: z.ZodOptional<z.ZodString>;
432
- text: z.ZodOptional<z.ZodString>;
297
+ streamMessage: z.ZodEffects<z.ZodObject<{
433
298
  parts: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
434
299
  type: z.ZodLiteral<"text">;
435
300
  text: z.ZodString;
301
+ additionalData: z.ZodOptional<z.ZodAny>;
302
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
436
303
  }, "strip", z.ZodTypeAny, {
437
- text: string;
438
304
  type: "text";
439
- }, {
440
305
  text: string;
306
+ additionalData?: any;
307
+ isCompleted?: boolean | undefined;
308
+ }, {
441
309
  type: "text";
310
+ text: string;
311
+ additionalData?: any;
312
+ isCompleted?: boolean | undefined;
442
313
  }>, z.ZodObject<{
443
- type: z.ZodLiteral<"tool">;
444
- toolCallMessages: z.ZodArray<z.ZodObject<{
445
- toolName: z.ZodString;
314
+ type: z.ZodLiteral<"tool-invocation">;
315
+ toolInvocation: z.ZodObject<{
446
316
  toolCallId: z.ZodString;
447
- args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
448
- isCompleted: z.ZodBoolean;
449
- llmResult: z.ZodOptional<z.ZodUnknown>;
450
- additionalData: z.ZodOptional<z.ZodUnknown>;
451
- text: z.ZodOptional<z.ZodString>;
317
+ toolName: z.ZodString;
318
+ args: z.ZodAny;
319
+ state: z.ZodString;
320
+ result: z.ZodOptional<z.ZodAny>;
452
321
  }, "strip", z.ZodTypeAny, {
453
- toolName: string;
454
322
  toolCallId: string;
455
- args: Record<string, unknown>;
456
- isCompleted: boolean;
457
- text?: string | undefined;
458
- llmResult?: unknown;
459
- additionalData?: unknown;
460
- }, {
461
323
  toolName: string;
324
+ state: string;
325
+ result?: any;
326
+ args?: any;
327
+ }, {
462
328
  toolCallId: string;
463
- args: Record<string, unknown>;
464
- isCompleted: boolean;
465
- text?: string | undefined;
466
- llmResult?: unknown;
467
- additionalData?: unknown;
468
- }>, "many">;
469
- }, "strip", z.ZodTypeAny, {
470
- type: "tool";
471
- toolCallMessages: {
472
329
  toolName: string;
330
+ state: string;
331
+ result?: any;
332
+ args?: any;
333
+ }>;
334
+ additionalData: z.ZodOptional<z.ZodAny>;
335
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
336
+ }, "strip", z.ZodTypeAny, {
337
+ type: "tool-invocation";
338
+ toolInvocation: {
473
339
  toolCallId: string;
474
- args: Record<string, unknown>;
475
- isCompleted: boolean;
476
- text?: string | undefined;
477
- llmResult?: unknown;
478
- additionalData?: unknown;
479
- }[];
480
- }, {
481
- type: "tool";
482
- toolCallMessages: {
483
340
  toolName: string;
341
+ state: string;
342
+ result?: any;
343
+ args?: any;
344
+ };
345
+ additionalData?: any;
346
+ isCompleted?: boolean | undefined;
347
+ }, {
348
+ type: "tool-invocation";
349
+ toolInvocation: {
484
350
  toolCallId: string;
485
- args: Record<string, unknown>;
486
- isCompleted: boolean;
487
- text?: string | undefined;
488
- llmResult?: unknown;
489
- additionalData?: unknown;
490
- }[];
491
- }>]>, "many">>;
351
+ toolName: string;
352
+ state: string;
353
+ result?: any;
354
+ args?: any;
355
+ };
356
+ additionalData?: any;
357
+ isCompleted?: boolean | undefined;
358
+ }>, z.ZodObject<{
359
+ type: z.ZodString;
360
+ additionalData: z.ZodOptional<z.ZodAny>;
361
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
362
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
363
+ type: z.ZodString;
364
+ additionalData: z.ZodOptional<z.ZodAny>;
365
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
366
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
367
+ type: z.ZodString;
368
+ additionalData: z.ZodOptional<z.ZodAny>;
369
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
370
+ }, z.ZodTypeAny, "passthrough">>]>, "many">>;
492
371
  }, "strip", z.ZodTypeAny, {
493
- text?: string | undefined;
494
- toolCallMessages?: {
495
- toolName: string;
496
- toolCallId: string;
497
- args: Record<string, unknown>;
498
- isCompleted: boolean;
499
- text?: string | undefined;
500
- llmResult?: unknown;
501
- additionalData?: unknown;
502
- }[] | undefined;
503
- reasoning?: string | undefined;
504
- analysis?: string | undefined;
505
372
  parts?: ({
506
- text: string;
507
373
  type: "text";
374
+ text: string;
375
+ additionalData?: any;
376
+ isCompleted?: boolean | undefined;
508
377
  } | {
509
- type: "tool";
510
- toolCallMessages: {
511
- toolName: string;
378
+ type: "tool-invocation";
379
+ toolInvocation: {
512
380
  toolCallId: string;
513
- args: Record<string, unknown>;
514
- isCompleted: boolean;
515
- text?: string | undefined;
516
- llmResult?: unknown;
517
- additionalData?: unknown;
518
- }[];
519
- })[] | undefined;
381
+ toolName: string;
382
+ state: string;
383
+ result?: any;
384
+ args?: any;
385
+ };
386
+ additionalData?: any;
387
+ isCompleted?: boolean | undefined;
388
+ } | z.objectOutputType<{
389
+ type: z.ZodString;
390
+ additionalData: z.ZodOptional<z.ZodAny>;
391
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
392
+ }, z.ZodTypeAny, "passthrough">)[] | undefined;
520
393
  }, {
521
- text?: string | undefined;
522
- toolCallMessages?: {
523
- toolName: string;
524
- toolCallId: string;
525
- args: Record<string, unknown>;
526
- isCompleted: boolean;
527
- text?: string | undefined;
528
- llmResult?: unknown;
529
- additionalData?: unknown;
530
- }[] | undefined;
531
- reasoning?: string | undefined;
532
- analysis?: string | undefined;
533
394
  parts?: ({
534
- text: string;
535
395
  type: "text";
396
+ text: string;
397
+ additionalData?: any;
398
+ isCompleted?: boolean | undefined;
536
399
  } | {
537
- type: "tool";
538
- toolCallMessages: {
400
+ type: "tool-invocation";
401
+ toolInvocation: {
402
+ toolCallId: string;
539
403
  toolName: string;
404
+ state: string;
405
+ result?: any;
406
+ args?: any;
407
+ };
408
+ additionalData?: any;
409
+ isCompleted?: boolean | undefined;
410
+ } | z.objectInputType<{
411
+ type: z.ZodString;
412
+ additionalData: z.ZodOptional<z.ZodAny>;
413
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
414
+ }, z.ZodTypeAny, "passthrough">)[] | undefined;
415
+ }>, {
416
+ parts?: ({
417
+ type: "text";
418
+ text: string;
419
+ additionalData?: any;
420
+ isCompleted?: boolean | undefined;
421
+ } | {
422
+ type: "tool-invocation";
423
+ toolInvocation: {
540
424
  toolCallId: string;
541
- args: Record<string, unknown>;
542
- isCompleted: boolean;
543
- text?: string | undefined;
544
- llmResult?: unknown;
545
- additionalData?: unknown;
546
- }[];
547
- })[] | undefined;
548
- }>;
425
+ toolName: string;
426
+ state: string;
427
+ result?: any;
428
+ args?: any;
429
+ };
430
+ additionalData?: any;
431
+ isCompleted?: boolean | undefined;
432
+ } | z.objectOutputType<{
433
+ type: z.ZodString;
434
+ additionalData: z.ZodOptional<z.ZodAny>;
435
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
436
+ }, z.ZodTypeAny, "passthrough">)[] | undefined;
437
+ }, unknown>;
549
438
  errorMessage: z.ZodOptional<z.ZodObject<{
550
439
  error: z.ZodString;
551
440
  }, "strip", z.ZodTypeAny, {
@@ -556,73 +445,39 @@ export declare const AnalysisSessionSchema: z.ZodObject<{
556
445
  isCompleted: z.ZodBoolean;
557
446
  }, "strip", z.ZodTypeAny, {
558
447
  id: string;
448
+ isCompleted: boolean;
559
449
  prompt: string;
560
450
  streamMessage: {
561
- text?: string | undefined;
562
- toolCallMessages?: {
563
- toolName: string;
564
- toolCallId: string;
565
- args: Record<string, unknown>;
566
- isCompleted: boolean;
567
- text?: string | undefined;
568
- llmResult?: unknown;
569
- additionalData?: unknown;
570
- }[] | undefined;
571
- reasoning?: string | undefined;
572
- analysis?: string | undefined;
573
451
  parts?: ({
574
- text: string;
575
452
  type: "text";
453
+ text: string;
454
+ additionalData?: any;
455
+ isCompleted?: boolean | undefined;
576
456
  } | {
577
- type: "tool";
578
- toolCallMessages: {
579
- toolName: string;
457
+ type: "tool-invocation";
458
+ toolInvocation: {
580
459
  toolCallId: string;
581
- args: Record<string, unknown>;
582
- isCompleted: boolean;
583
- text?: string | undefined;
584
- llmResult?: unknown;
585
- additionalData?: unknown;
586
- }[];
587
- })[] | undefined;
460
+ toolName: string;
461
+ state: string;
462
+ result?: any;
463
+ args?: any;
464
+ };
465
+ additionalData?: any;
466
+ isCompleted?: boolean | undefined;
467
+ } | z.objectOutputType<{
468
+ type: z.ZodString;
469
+ additionalData: z.ZodOptional<z.ZodAny>;
470
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
471
+ }, z.ZodTypeAny, "passthrough">)[] | undefined;
588
472
  };
589
- isCompleted: boolean;
590
473
  errorMessage?: {
591
474
  error: string;
592
475
  } | undefined;
593
476
  }, {
594
477
  id: string;
595
- prompt: string;
596
- streamMessage: {
597
- text?: string | undefined;
598
- toolCallMessages?: {
599
- toolName: string;
600
- toolCallId: string;
601
- args: Record<string, unknown>;
602
- isCompleted: boolean;
603
- text?: string | undefined;
604
- llmResult?: unknown;
605
- additionalData?: unknown;
606
- }[] | undefined;
607
- reasoning?: string | undefined;
608
- analysis?: string | undefined;
609
- parts?: ({
610
- text: string;
611
- type: "text";
612
- } | {
613
- type: "tool";
614
- toolCallMessages: {
615
- toolName: string;
616
- toolCallId: string;
617
- args: Record<string, unknown>;
618
- isCompleted: boolean;
619
- text?: string | undefined;
620
- llmResult?: unknown;
621
- additionalData?: unknown;
622
- }[];
623
- })[] | undefined;
624
- };
625
478
  isCompleted: boolean;
479
+ prompt: string;
480
+ streamMessage?: unknown;
626
481
  errorMessage?: {
627
482
  error: string;
628
483
  } | undefined;
@@ -635,37 +490,31 @@ export declare const AnalysisSessionSchema: z.ZodObject<{
635
490
  model: string;
636
491
  analysisResults: {
637
492
  id: string;
493
+ isCompleted: boolean;
638
494
  prompt: string;
639
495
  streamMessage: {
640
- text?: string | undefined;
641
- toolCallMessages?: {
642
- toolName: string;
643
- toolCallId: string;
644
- args: Record<string, unknown>;
645
- isCompleted: boolean;
646
- text?: string | undefined;
647
- llmResult?: unknown;
648
- additionalData?: unknown;
649
- }[] | undefined;
650
- reasoning?: string | undefined;
651
- analysis?: string | undefined;
652
496
  parts?: ({
653
- text: string;
654
497
  type: "text";
498
+ text: string;
499
+ additionalData?: any;
500
+ isCompleted?: boolean | undefined;
655
501
  } | {
656
- type: "tool";
657
- toolCallMessages: {
658
- toolName: string;
502
+ type: "tool-invocation";
503
+ toolInvocation: {
659
504
  toolCallId: string;
660
- args: Record<string, unknown>;
661
- isCompleted: boolean;
662
- text?: string | undefined;
663
- llmResult?: unknown;
664
- additionalData?: unknown;
665
- }[];
666
- })[] | undefined;
505
+ toolName: string;
506
+ state: string;
507
+ result?: any;
508
+ args?: any;
509
+ };
510
+ additionalData?: any;
511
+ isCompleted?: boolean | undefined;
512
+ } | z.objectOutputType<{
513
+ type: z.ZodString;
514
+ additionalData: z.ZodOptional<z.ZodAny>;
515
+ isCompleted: z.ZodOptional<z.ZodBoolean>;
516
+ }, z.ZodTypeAny, "passthrough">)[] | undefined;
667
517
  };
668
- isCompleted: boolean;
669
518
  errorMessage?: {
670
519
  error: string;
671
520
  } | undefined;
@@ -678,37 +527,9 @@ export declare const AnalysisSessionSchema: z.ZodObject<{
678
527
  model: string;
679
528
  analysisResults: {
680
529
  id: string;
681
- prompt: string;
682
- streamMessage: {
683
- text?: string | undefined;
684
- toolCallMessages?: {
685
- toolName: string;
686
- toolCallId: string;
687
- args: Record<string, unknown>;
688
- isCompleted: boolean;
689
- text?: string | undefined;
690
- llmResult?: unknown;
691
- additionalData?: unknown;
692
- }[] | undefined;
693
- reasoning?: string | undefined;
694
- analysis?: string | undefined;
695
- parts?: ({
696
- text: string;
697
- type: "text";
698
- } | {
699
- type: "tool";
700
- toolCallMessages: {
701
- toolName: string;
702
- toolCallId: string;
703
- args: Record<string, unknown>;
704
- isCompleted: boolean;
705
- text?: string | undefined;
706
- llmResult?: unknown;
707
- additionalData?: unknown;
708
- }[];
709
- })[] | undefined;
710
- };
711
530
  isCompleted: boolean;
531
+ prompt: string;
532
+ streamMessage?: unknown;
712
533
  errorMessage?: {
713
534
  error: string;
714
535
  } | undefined;