cyrus-gemini-runner 0.2.11 → 0.2.13
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/LICENSE +201 -674
- package/dist/schemas.d.ts +139 -842
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +2 -2
- package/dist/schemas.js.map +1 -1
- package/package.json +6 -6
package/dist/schemas.d.ts
CHANGED
|
@@ -34,17 +34,7 @@ export declare const GeminiInitEventSchema: z.ZodObject<{
|
|
|
34
34
|
timestamp: z.ZodString;
|
|
35
35
|
session_id: z.ZodString;
|
|
36
36
|
model: z.ZodString;
|
|
37
|
-
},
|
|
38
|
-
type: "init";
|
|
39
|
-
timestamp: string;
|
|
40
|
-
session_id: string;
|
|
41
|
-
model: string;
|
|
42
|
-
}, {
|
|
43
|
-
type: "init";
|
|
44
|
-
timestamp: string;
|
|
45
|
-
session_id: string;
|
|
46
|
-
model: string;
|
|
47
|
-
}>;
|
|
37
|
+
}, z.core.$strip>;
|
|
48
38
|
/**
|
|
49
39
|
* User or assistant message event
|
|
50
40
|
*
|
|
@@ -60,22 +50,13 @@ export declare const GeminiInitEventSchema: z.ZodObject<{
|
|
|
60
50
|
export declare const GeminiMessageEventSchema: z.ZodObject<{
|
|
61
51
|
type: z.ZodLiteral<"message">;
|
|
62
52
|
timestamp: z.ZodString;
|
|
63
|
-
role: z.ZodEnum<
|
|
53
|
+
role: z.ZodEnum<{
|
|
54
|
+
user: "user";
|
|
55
|
+
assistant: "assistant";
|
|
56
|
+
}>;
|
|
64
57
|
content: z.ZodString;
|
|
65
58
|
delta: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
-
},
|
|
67
|
-
type: "message";
|
|
68
|
-
timestamp: string;
|
|
69
|
-
role: "user" | "assistant";
|
|
70
|
-
content: string;
|
|
71
|
-
delta?: boolean | undefined;
|
|
72
|
-
}, {
|
|
73
|
-
type: "message";
|
|
74
|
-
timestamp: string;
|
|
75
|
-
role: "user" | "assistant";
|
|
76
|
-
content: string;
|
|
77
|
-
delta?: boolean | undefined;
|
|
78
|
-
}>;
|
|
59
|
+
}, z.core.$strip>;
|
|
79
60
|
/**
|
|
80
61
|
* Parameters for the read_file tool
|
|
81
62
|
*
|
|
@@ -87,11 +68,7 @@ export declare const GeminiMessageEventSchema: z.ZodObject<{
|
|
|
87
68
|
*/
|
|
88
69
|
export declare const ReadFileParametersSchema: z.ZodObject<{
|
|
89
70
|
file_path: z.ZodString;
|
|
90
|
-
},
|
|
91
|
-
file_path: string;
|
|
92
|
-
}, {
|
|
93
|
-
file_path: string;
|
|
94
|
-
}>;
|
|
71
|
+
}, z.core.$strip>;
|
|
95
72
|
/**
|
|
96
73
|
* Parameters for the write_file tool
|
|
97
74
|
*
|
|
@@ -103,13 +80,7 @@ export declare const ReadFileParametersSchema: z.ZodObject<{
|
|
|
103
80
|
export declare const WriteFileParametersSchema: z.ZodObject<{
|
|
104
81
|
file_path: z.ZodString;
|
|
105
82
|
content: z.ZodString;
|
|
106
|
-
},
|
|
107
|
-
content: string;
|
|
108
|
-
file_path: string;
|
|
109
|
-
}, {
|
|
110
|
-
content: string;
|
|
111
|
-
file_path: string;
|
|
112
|
-
}>;
|
|
83
|
+
}, z.core.$strip>;
|
|
113
84
|
/**
|
|
114
85
|
* Parameters for the list_directory tool
|
|
115
86
|
*
|
|
@@ -121,11 +92,7 @@ export declare const WriteFileParametersSchema: z.ZodObject<{
|
|
|
121
92
|
*/
|
|
122
93
|
export declare const ListDirectoryParametersSchema: z.ZodObject<{
|
|
123
94
|
dir_path: z.ZodString;
|
|
124
|
-
},
|
|
125
|
-
dir_path: string;
|
|
126
|
-
}, {
|
|
127
|
-
dir_path: string;
|
|
128
|
-
}>;
|
|
95
|
+
}, z.core.$strip>;
|
|
129
96
|
/**
|
|
130
97
|
* Parameters for the search_file_content tool
|
|
131
98
|
*
|
|
@@ -137,11 +104,7 @@ export declare const ListDirectoryParametersSchema: z.ZodObject<{
|
|
|
137
104
|
*/
|
|
138
105
|
export declare const SearchFileContentParametersSchema: z.ZodObject<{
|
|
139
106
|
pattern: z.ZodString;
|
|
140
|
-
},
|
|
141
|
-
pattern: string;
|
|
142
|
-
}, {
|
|
143
|
-
pattern: string;
|
|
144
|
-
}>;
|
|
107
|
+
}, z.core.$strip>;
|
|
145
108
|
/**
|
|
146
109
|
* Parameters for the run_shell_command tool
|
|
147
110
|
*
|
|
@@ -154,24 +117,18 @@ export declare const SearchFileContentParametersSchema: z.ZodObject<{
|
|
|
154
117
|
*/
|
|
155
118
|
export declare const RunShellCommandParametersSchema: z.ZodObject<{
|
|
156
119
|
command: z.ZodString;
|
|
157
|
-
},
|
|
158
|
-
command: string;
|
|
159
|
-
}, {
|
|
160
|
-
command: string;
|
|
161
|
-
}>;
|
|
120
|
+
}, z.core.$strip>;
|
|
162
121
|
/**
|
|
163
122
|
* Todo item for the write_todos tool
|
|
164
123
|
*/
|
|
165
124
|
export declare const TodoItemSchema: z.ZodObject<{
|
|
166
125
|
description: z.ZodString;
|
|
167
|
-
status: z.ZodOptional<z.ZodEnum<
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
status?: "pending" | "in_progress" | "completed" | undefined;
|
|
174
|
-
}>;
|
|
126
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
127
|
+
pending: "pending";
|
|
128
|
+
in_progress: "in_progress";
|
|
129
|
+
completed: "completed";
|
|
130
|
+
}>>;
|
|
131
|
+
}, z.core.$strip>;
|
|
175
132
|
/**
|
|
176
133
|
* Parameters for the write_todos tool
|
|
177
134
|
*
|
|
@@ -183,25 +140,13 @@ export declare const TodoItemSchema: z.ZodObject<{
|
|
|
183
140
|
export declare const WriteTodosParametersSchema: z.ZodObject<{
|
|
184
141
|
todos: z.ZodArray<z.ZodObject<{
|
|
185
142
|
description: z.ZodString;
|
|
186
|
-
status: z.ZodOptional<z.ZodEnum<
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}>, "many">;
|
|
194
|
-
}, "strip", z.ZodTypeAny, {
|
|
195
|
-
todos: {
|
|
196
|
-
description: string;
|
|
197
|
-
status?: "pending" | "in_progress" | "completed" | undefined;
|
|
198
|
-
}[];
|
|
199
|
-
}, {
|
|
200
|
-
todos: {
|
|
201
|
-
description: string;
|
|
202
|
-
status?: "pending" | "in_progress" | "completed" | undefined;
|
|
203
|
-
}[];
|
|
204
|
-
}>;
|
|
143
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
144
|
+
pending: "pending";
|
|
145
|
+
in_progress: "in_progress";
|
|
146
|
+
completed: "completed";
|
|
147
|
+
}>>;
|
|
148
|
+
}, z.core.$strip>>;
|
|
149
|
+
}, z.core.$strip>;
|
|
205
150
|
/**
|
|
206
151
|
* Parameters for the replace tool (AI-powered code editing)
|
|
207
152
|
*
|
|
@@ -226,90 +171,36 @@ export declare const ReplaceParametersSchema: z.ZodObject<{
|
|
|
226
171
|
file_path: z.ZodOptional<z.ZodString>;
|
|
227
172
|
old_string: z.ZodOptional<z.ZodString>;
|
|
228
173
|
new_string: z.ZodOptional<z.ZodString>;
|
|
229
|
-
},
|
|
230
|
-
file_path?: string | undefined;
|
|
231
|
-
instruction?: string | undefined;
|
|
232
|
-
old_string?: string | undefined;
|
|
233
|
-
new_string?: string | undefined;
|
|
234
|
-
}, {
|
|
235
|
-
file_path?: string | undefined;
|
|
236
|
-
instruction?: string | undefined;
|
|
237
|
-
old_string?: string | undefined;
|
|
238
|
-
new_string?: string | undefined;
|
|
239
|
-
}>;
|
|
174
|
+
}, z.core.$strip>;
|
|
240
175
|
/**
|
|
241
176
|
* Union of all known tool parameter schemas
|
|
242
177
|
*/
|
|
243
|
-
export declare const GeminiToolParametersSchema: z.ZodUnion<[z.ZodObject<{
|
|
178
|
+
export declare const GeminiToolParametersSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
244
179
|
file_path: z.ZodString;
|
|
245
|
-
},
|
|
246
|
-
file_path: string;
|
|
247
|
-
}, {
|
|
248
|
-
file_path: string;
|
|
249
|
-
}>, z.ZodObject<{
|
|
180
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
250
181
|
file_path: z.ZodString;
|
|
251
182
|
content: z.ZodString;
|
|
252
|
-
},
|
|
253
|
-
content: string;
|
|
254
|
-
file_path: string;
|
|
255
|
-
}, {
|
|
256
|
-
content: string;
|
|
257
|
-
file_path: string;
|
|
258
|
-
}>, z.ZodObject<{
|
|
183
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
259
184
|
dir_path: z.ZodString;
|
|
260
|
-
},
|
|
261
|
-
dir_path: string;
|
|
262
|
-
}, {
|
|
263
|
-
dir_path: string;
|
|
264
|
-
}>, z.ZodObject<{
|
|
185
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
265
186
|
pattern: z.ZodString;
|
|
266
|
-
},
|
|
267
|
-
pattern: string;
|
|
268
|
-
}, {
|
|
269
|
-
pattern: string;
|
|
270
|
-
}>, z.ZodObject<{
|
|
187
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
271
188
|
command: z.ZodString;
|
|
272
|
-
},
|
|
273
|
-
command: string;
|
|
274
|
-
}, {
|
|
275
|
-
command: string;
|
|
276
|
-
}>, z.ZodObject<{
|
|
189
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
277
190
|
todos: z.ZodArray<z.ZodObject<{
|
|
278
191
|
description: z.ZodString;
|
|
279
|
-
status: z.ZodOptional<z.ZodEnum<
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}>, "many">;
|
|
287
|
-
}, "strip", z.ZodTypeAny, {
|
|
288
|
-
todos: {
|
|
289
|
-
description: string;
|
|
290
|
-
status?: "pending" | "in_progress" | "completed" | undefined;
|
|
291
|
-
}[];
|
|
292
|
-
}, {
|
|
293
|
-
todos: {
|
|
294
|
-
description: string;
|
|
295
|
-
status?: "pending" | "in_progress" | "completed" | undefined;
|
|
296
|
-
}[];
|
|
297
|
-
}>, z.ZodObject<{
|
|
192
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
193
|
+
pending: "pending";
|
|
194
|
+
in_progress: "in_progress";
|
|
195
|
+
completed: "completed";
|
|
196
|
+
}>>;
|
|
197
|
+
}, z.core.$strip>>;
|
|
198
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
298
199
|
instruction: z.ZodOptional<z.ZodString>;
|
|
299
200
|
file_path: z.ZodOptional<z.ZodString>;
|
|
300
201
|
old_string: z.ZodOptional<z.ZodString>;
|
|
301
202
|
new_string: z.ZodOptional<z.ZodString>;
|
|
302
|
-
},
|
|
303
|
-
file_path?: string | undefined;
|
|
304
|
-
instruction?: string | undefined;
|
|
305
|
-
old_string?: string | undefined;
|
|
306
|
-
new_string?: string | undefined;
|
|
307
|
-
}, {
|
|
308
|
-
file_path?: string | undefined;
|
|
309
|
-
instruction?: string | undefined;
|
|
310
|
-
old_string?: string | undefined;
|
|
311
|
-
new_string?: string | undefined;
|
|
312
|
-
}>]>;
|
|
203
|
+
}, z.core.$strip>]>;
|
|
313
204
|
export type ReadFileParameters = z.infer<typeof ReadFileParametersSchema>;
|
|
314
205
|
export type WriteFileParameters = z.infer<typeof WriteFileParametersSchema>;
|
|
315
206
|
export type ListDirectoryParameters = z.infer<typeof ListDirectoryParametersSchema>;
|
|
@@ -352,32 +243,11 @@ export declare const ReadFileToolUseEventSchema: z.ZodObject<{
|
|
|
352
243
|
type: z.ZodLiteral<"tool_use">;
|
|
353
244
|
timestamp: z.ZodString;
|
|
354
245
|
tool_id: z.ZodString;
|
|
355
|
-
} & {
|
|
356
246
|
tool_name: z.ZodLiteral<"read_file">;
|
|
357
247
|
parameters: z.ZodObject<{
|
|
358
248
|
file_path: z.ZodString;
|
|
359
|
-
},
|
|
360
|
-
|
|
361
|
-
}, {
|
|
362
|
-
file_path: string;
|
|
363
|
-
}>;
|
|
364
|
-
}, "strip", z.ZodTypeAny, {
|
|
365
|
-
type: "tool_use";
|
|
366
|
-
timestamp: string;
|
|
367
|
-
tool_id: string;
|
|
368
|
-
tool_name: "read_file";
|
|
369
|
-
parameters: {
|
|
370
|
-
file_path: string;
|
|
371
|
-
};
|
|
372
|
-
}, {
|
|
373
|
-
type: "tool_use";
|
|
374
|
-
timestamp: string;
|
|
375
|
-
tool_id: string;
|
|
376
|
-
tool_name: "read_file";
|
|
377
|
-
parameters: {
|
|
378
|
-
file_path: string;
|
|
379
|
-
};
|
|
380
|
-
}>;
|
|
249
|
+
}, z.core.$strip>;
|
|
250
|
+
}, z.core.$strip>;
|
|
381
251
|
/**
|
|
382
252
|
* Typed write_file tool use event
|
|
383
253
|
*/
|
|
@@ -385,37 +255,12 @@ export declare const WriteFileToolUseEventSchema: z.ZodObject<{
|
|
|
385
255
|
type: z.ZodLiteral<"tool_use">;
|
|
386
256
|
timestamp: z.ZodString;
|
|
387
257
|
tool_id: z.ZodString;
|
|
388
|
-
} & {
|
|
389
258
|
tool_name: z.ZodLiteral<"write_file">;
|
|
390
259
|
parameters: z.ZodObject<{
|
|
391
260
|
file_path: z.ZodString;
|
|
392
261
|
content: z.ZodString;
|
|
393
|
-
},
|
|
394
|
-
|
|
395
|
-
file_path: string;
|
|
396
|
-
}, {
|
|
397
|
-
content: string;
|
|
398
|
-
file_path: string;
|
|
399
|
-
}>;
|
|
400
|
-
}, "strip", z.ZodTypeAny, {
|
|
401
|
-
type: "tool_use";
|
|
402
|
-
timestamp: string;
|
|
403
|
-
tool_id: string;
|
|
404
|
-
tool_name: "write_file";
|
|
405
|
-
parameters: {
|
|
406
|
-
content: string;
|
|
407
|
-
file_path: string;
|
|
408
|
-
};
|
|
409
|
-
}, {
|
|
410
|
-
type: "tool_use";
|
|
411
|
-
timestamp: string;
|
|
412
|
-
tool_id: string;
|
|
413
|
-
tool_name: "write_file";
|
|
414
|
-
parameters: {
|
|
415
|
-
content: string;
|
|
416
|
-
file_path: string;
|
|
417
|
-
};
|
|
418
|
-
}>;
|
|
262
|
+
}, z.core.$strip>;
|
|
263
|
+
}, z.core.$strip>;
|
|
419
264
|
/**
|
|
420
265
|
* Typed list_directory tool use event
|
|
421
266
|
*/
|
|
@@ -423,32 +268,11 @@ export declare const ListDirectoryToolUseEventSchema: z.ZodObject<{
|
|
|
423
268
|
type: z.ZodLiteral<"tool_use">;
|
|
424
269
|
timestamp: z.ZodString;
|
|
425
270
|
tool_id: z.ZodString;
|
|
426
|
-
} & {
|
|
427
271
|
tool_name: z.ZodLiteral<"list_directory">;
|
|
428
272
|
parameters: z.ZodObject<{
|
|
429
273
|
dir_path: z.ZodString;
|
|
430
|
-
},
|
|
431
|
-
|
|
432
|
-
}, {
|
|
433
|
-
dir_path: string;
|
|
434
|
-
}>;
|
|
435
|
-
}, "strip", z.ZodTypeAny, {
|
|
436
|
-
type: "tool_use";
|
|
437
|
-
timestamp: string;
|
|
438
|
-
tool_id: string;
|
|
439
|
-
tool_name: "list_directory";
|
|
440
|
-
parameters: {
|
|
441
|
-
dir_path: string;
|
|
442
|
-
};
|
|
443
|
-
}, {
|
|
444
|
-
type: "tool_use";
|
|
445
|
-
timestamp: string;
|
|
446
|
-
tool_id: string;
|
|
447
|
-
tool_name: "list_directory";
|
|
448
|
-
parameters: {
|
|
449
|
-
dir_path: string;
|
|
450
|
-
};
|
|
451
|
-
}>;
|
|
274
|
+
}, z.core.$strip>;
|
|
275
|
+
}, z.core.$strip>;
|
|
452
276
|
/**
|
|
453
277
|
* Typed search_file_content tool use event
|
|
454
278
|
*/
|
|
@@ -456,32 +280,11 @@ export declare const SearchFileContentToolUseEventSchema: z.ZodObject<{
|
|
|
456
280
|
type: z.ZodLiteral<"tool_use">;
|
|
457
281
|
timestamp: z.ZodString;
|
|
458
282
|
tool_id: z.ZodString;
|
|
459
|
-
} & {
|
|
460
283
|
tool_name: z.ZodLiteral<"search_file_content">;
|
|
461
284
|
parameters: z.ZodObject<{
|
|
462
285
|
pattern: z.ZodString;
|
|
463
|
-
},
|
|
464
|
-
|
|
465
|
-
}, {
|
|
466
|
-
pattern: string;
|
|
467
|
-
}>;
|
|
468
|
-
}, "strip", z.ZodTypeAny, {
|
|
469
|
-
type: "tool_use";
|
|
470
|
-
timestamp: string;
|
|
471
|
-
tool_id: string;
|
|
472
|
-
tool_name: "search_file_content";
|
|
473
|
-
parameters: {
|
|
474
|
-
pattern: string;
|
|
475
|
-
};
|
|
476
|
-
}, {
|
|
477
|
-
type: "tool_use";
|
|
478
|
-
timestamp: string;
|
|
479
|
-
tool_id: string;
|
|
480
|
-
tool_name: "search_file_content";
|
|
481
|
-
parameters: {
|
|
482
|
-
pattern: string;
|
|
483
|
-
};
|
|
484
|
-
}>;
|
|
286
|
+
}, z.core.$strip>;
|
|
287
|
+
}, z.core.$strip>;
|
|
485
288
|
/**
|
|
486
289
|
* Typed run_shell_command tool use event
|
|
487
290
|
*/
|
|
@@ -489,32 +292,11 @@ export declare const RunShellCommandToolUseEventSchema: z.ZodObject<{
|
|
|
489
292
|
type: z.ZodLiteral<"tool_use">;
|
|
490
293
|
timestamp: z.ZodString;
|
|
491
294
|
tool_id: z.ZodString;
|
|
492
|
-
} & {
|
|
493
295
|
tool_name: z.ZodLiteral<"run_shell_command">;
|
|
494
296
|
parameters: z.ZodObject<{
|
|
495
297
|
command: z.ZodString;
|
|
496
|
-
},
|
|
497
|
-
|
|
498
|
-
}, {
|
|
499
|
-
command: string;
|
|
500
|
-
}>;
|
|
501
|
-
}, "strip", z.ZodTypeAny, {
|
|
502
|
-
type: "tool_use";
|
|
503
|
-
timestamp: string;
|
|
504
|
-
tool_id: string;
|
|
505
|
-
tool_name: "run_shell_command";
|
|
506
|
-
parameters: {
|
|
507
|
-
command: string;
|
|
508
|
-
};
|
|
509
|
-
}, {
|
|
510
|
-
type: "tool_use";
|
|
511
|
-
timestamp: string;
|
|
512
|
-
tool_id: string;
|
|
513
|
-
tool_name: "run_shell_command";
|
|
514
|
-
parameters: {
|
|
515
|
-
command: string;
|
|
516
|
-
};
|
|
517
|
-
}>;
|
|
298
|
+
}, z.core.$strip>;
|
|
299
|
+
}, z.core.$strip>;
|
|
518
300
|
/**
|
|
519
301
|
* Typed write_todos tool use event
|
|
520
302
|
*/
|
|
@@ -522,53 +304,18 @@ export declare const WriteTodosToolUseEventSchema: z.ZodObject<{
|
|
|
522
304
|
type: z.ZodLiteral<"tool_use">;
|
|
523
305
|
timestamp: z.ZodString;
|
|
524
306
|
tool_id: z.ZodString;
|
|
525
|
-
} & {
|
|
526
307
|
tool_name: z.ZodLiteral<"write_todos">;
|
|
527
308
|
parameters: z.ZodObject<{
|
|
528
309
|
todos: z.ZodArray<z.ZodObject<{
|
|
529
310
|
description: z.ZodString;
|
|
530
|
-
status: z.ZodOptional<z.ZodEnum<
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
}, "strip", z.ZodTypeAny, {
|
|
539
|
-
todos: {
|
|
540
|
-
description: string;
|
|
541
|
-
status?: "pending" | "in_progress" | "completed" | undefined;
|
|
542
|
-
}[];
|
|
543
|
-
}, {
|
|
544
|
-
todos: {
|
|
545
|
-
description: string;
|
|
546
|
-
status?: "pending" | "in_progress" | "completed" | undefined;
|
|
547
|
-
}[];
|
|
548
|
-
}>;
|
|
549
|
-
}, "strip", z.ZodTypeAny, {
|
|
550
|
-
type: "tool_use";
|
|
551
|
-
timestamp: string;
|
|
552
|
-
tool_id: string;
|
|
553
|
-
tool_name: "write_todos";
|
|
554
|
-
parameters: {
|
|
555
|
-
todos: {
|
|
556
|
-
description: string;
|
|
557
|
-
status?: "pending" | "in_progress" | "completed" | undefined;
|
|
558
|
-
}[];
|
|
559
|
-
};
|
|
560
|
-
}, {
|
|
561
|
-
type: "tool_use";
|
|
562
|
-
timestamp: string;
|
|
563
|
-
tool_id: string;
|
|
564
|
-
tool_name: "write_todos";
|
|
565
|
-
parameters: {
|
|
566
|
-
todos: {
|
|
567
|
-
description: string;
|
|
568
|
-
status?: "pending" | "in_progress" | "completed" | undefined;
|
|
569
|
-
}[];
|
|
570
|
-
};
|
|
571
|
-
}>;
|
|
311
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
312
|
+
pending: "pending";
|
|
313
|
+
in_progress: "in_progress";
|
|
314
|
+
completed: "completed";
|
|
315
|
+
}>>;
|
|
316
|
+
}, z.core.$strip>>;
|
|
317
|
+
}, z.core.$strip>;
|
|
318
|
+
}, z.core.$strip>;
|
|
572
319
|
/**
|
|
573
320
|
* Typed replace tool use event
|
|
574
321
|
*/
|
|
@@ -576,47 +323,14 @@ export declare const ReplaceToolUseEventSchema: z.ZodObject<{
|
|
|
576
323
|
type: z.ZodLiteral<"tool_use">;
|
|
577
324
|
timestamp: z.ZodString;
|
|
578
325
|
tool_id: z.ZodString;
|
|
579
|
-
} & {
|
|
580
326
|
tool_name: z.ZodLiteral<"replace">;
|
|
581
327
|
parameters: z.ZodObject<{
|
|
582
328
|
instruction: z.ZodOptional<z.ZodString>;
|
|
583
329
|
file_path: z.ZodOptional<z.ZodString>;
|
|
584
330
|
old_string: z.ZodOptional<z.ZodString>;
|
|
585
331
|
new_string: z.ZodOptional<z.ZodString>;
|
|
586
|
-
},
|
|
587
|
-
|
|
588
|
-
instruction?: string | undefined;
|
|
589
|
-
old_string?: string | undefined;
|
|
590
|
-
new_string?: string | undefined;
|
|
591
|
-
}, {
|
|
592
|
-
file_path?: string | undefined;
|
|
593
|
-
instruction?: string | undefined;
|
|
594
|
-
old_string?: string | undefined;
|
|
595
|
-
new_string?: string | undefined;
|
|
596
|
-
}>;
|
|
597
|
-
}, "strip", z.ZodTypeAny, {
|
|
598
|
-
type: "tool_use";
|
|
599
|
-
timestamp: string;
|
|
600
|
-
tool_id: string;
|
|
601
|
-
tool_name: "replace";
|
|
602
|
-
parameters: {
|
|
603
|
-
file_path?: string | undefined;
|
|
604
|
-
instruction?: string | undefined;
|
|
605
|
-
old_string?: string | undefined;
|
|
606
|
-
new_string?: string | undefined;
|
|
607
|
-
};
|
|
608
|
-
}, {
|
|
609
|
-
type: "tool_use";
|
|
610
|
-
timestamp: string;
|
|
611
|
-
tool_id: string;
|
|
612
|
-
tool_name: "replace";
|
|
613
|
-
parameters: {
|
|
614
|
-
file_path?: string | undefined;
|
|
615
|
-
instruction?: string | undefined;
|
|
616
|
-
old_string?: string | undefined;
|
|
617
|
-
new_string?: string | undefined;
|
|
618
|
-
};
|
|
619
|
-
}>;
|
|
332
|
+
}, z.core.$strip>;
|
|
333
|
+
}, z.core.$strip>;
|
|
620
334
|
/**
|
|
621
335
|
* Unknown tool use event (for tools not explicitly typed)
|
|
622
336
|
*/
|
|
@@ -624,22 +338,9 @@ export declare const UnknownToolUseEventSchema: z.ZodObject<{
|
|
|
624
338
|
type: z.ZodLiteral<"tool_use">;
|
|
625
339
|
timestamp: z.ZodString;
|
|
626
340
|
tool_id: z.ZodString;
|
|
627
|
-
} & {
|
|
628
341
|
tool_name: z.ZodString;
|
|
629
342
|
parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
630
|
-
},
|
|
631
|
-
type: "tool_use";
|
|
632
|
-
timestamp: string;
|
|
633
|
-
tool_id: string;
|
|
634
|
-
tool_name: string;
|
|
635
|
-
parameters: Record<string, unknown>;
|
|
636
|
-
}, {
|
|
637
|
-
type: "tool_use";
|
|
638
|
-
timestamp: string;
|
|
639
|
-
tool_id: string;
|
|
640
|
-
tool_name: string;
|
|
641
|
-
parameters: Record<string, unknown>;
|
|
642
|
-
}>;
|
|
343
|
+
}, z.core.$strip>;
|
|
643
344
|
export type ReadFileToolUseEvent = z.infer<typeof ReadFileToolUseEventSchema>;
|
|
644
345
|
export type WriteFileToolUseEvent = z.infer<typeof WriteFileToolUseEventSchema>;
|
|
645
346
|
export type ListDirectoryToolUseEvent = z.infer<typeof ListDirectoryToolUseEventSchema>;
|
|
@@ -666,19 +367,7 @@ export declare const GeminiToolUseEventSchema: z.ZodObject<{
|
|
|
666
367
|
tool_name: z.ZodString;
|
|
667
368
|
tool_id: z.ZodString;
|
|
668
369
|
parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
669
|
-
},
|
|
670
|
-
type: "tool_use";
|
|
671
|
-
timestamp: string;
|
|
672
|
-
tool_id: string;
|
|
673
|
-
tool_name: string;
|
|
674
|
-
parameters: Record<string, unknown>;
|
|
675
|
-
}, {
|
|
676
|
-
type: "tool_use";
|
|
677
|
-
timestamp: string;
|
|
678
|
-
tool_id: string;
|
|
679
|
-
tool_name: string;
|
|
680
|
-
parameters: Record<string, unknown>;
|
|
681
|
-
}>;
|
|
370
|
+
}, z.core.$strip>;
|
|
682
371
|
/**
|
|
683
372
|
* Tool result event - the result of a tool execution
|
|
684
373
|
*
|
|
@@ -700,44 +389,17 @@ export declare const GeminiToolResultEventSchema: z.ZodObject<{
|
|
|
700
389
|
type: z.ZodLiteral<"tool_result">;
|
|
701
390
|
timestamp: z.ZodString;
|
|
702
391
|
tool_id: z.ZodString;
|
|
703
|
-
status: z.ZodEnum<
|
|
392
|
+
status: z.ZodEnum<{
|
|
393
|
+
error: "error";
|
|
394
|
+
success: "success";
|
|
395
|
+
}>;
|
|
704
396
|
output: z.ZodOptional<z.ZodString>;
|
|
705
397
|
error: z.ZodOptional<z.ZodObject<{
|
|
706
398
|
type: z.ZodOptional<z.ZodString>;
|
|
707
399
|
message: z.ZodString;
|
|
708
400
|
code: z.ZodOptional<z.ZodString>;
|
|
709
|
-
},
|
|
710
|
-
|
|
711
|
-
type?: string | undefined;
|
|
712
|
-
code?: string | undefined;
|
|
713
|
-
}, {
|
|
714
|
-
message: string;
|
|
715
|
-
type?: string | undefined;
|
|
716
|
-
code?: string | undefined;
|
|
717
|
-
}>>;
|
|
718
|
-
}, "strip", z.ZodTypeAny, {
|
|
719
|
-
type: "tool_result";
|
|
720
|
-
status: "success" | "error";
|
|
721
|
-
timestamp: string;
|
|
722
|
-
tool_id: string;
|
|
723
|
-
error?: {
|
|
724
|
-
message: string;
|
|
725
|
-
type?: string | undefined;
|
|
726
|
-
code?: string | undefined;
|
|
727
|
-
} | undefined;
|
|
728
|
-
output?: string | undefined;
|
|
729
|
-
}, {
|
|
730
|
-
type: "tool_result";
|
|
731
|
-
status: "success" | "error";
|
|
732
|
-
timestamp: string;
|
|
733
|
-
tool_id: string;
|
|
734
|
-
error?: {
|
|
735
|
-
message: string;
|
|
736
|
-
type?: string | undefined;
|
|
737
|
-
code?: string | undefined;
|
|
738
|
-
} | undefined;
|
|
739
|
-
output?: string | undefined;
|
|
740
|
-
}>;
|
|
401
|
+
}, z.core.$strip>>;
|
|
402
|
+
}, z.core.$strip>;
|
|
741
403
|
/**
|
|
742
404
|
* Tool result output types based on the originating tool
|
|
743
405
|
*
|
|
@@ -756,44 +418,17 @@ export declare const ReadFileToolResultSchema: z.ZodObject<{
|
|
|
756
418
|
type: z.ZodLiteral<"tool_result">;
|
|
757
419
|
timestamp: z.ZodString;
|
|
758
420
|
tool_id: z.ZodString;
|
|
759
|
-
status: z.ZodEnum<
|
|
421
|
+
status: z.ZodEnum<{
|
|
422
|
+
error: "error";
|
|
423
|
+
success: "success";
|
|
424
|
+
}>;
|
|
760
425
|
output: z.ZodOptional<z.ZodString>;
|
|
761
426
|
error: z.ZodOptional<z.ZodObject<{
|
|
762
427
|
type: z.ZodOptional<z.ZodString>;
|
|
763
428
|
message: z.ZodString;
|
|
764
429
|
code: z.ZodOptional<z.ZodString>;
|
|
765
|
-
},
|
|
766
|
-
|
|
767
|
-
type?: string | undefined;
|
|
768
|
-
code?: string | undefined;
|
|
769
|
-
}, {
|
|
770
|
-
message: string;
|
|
771
|
-
type?: string | undefined;
|
|
772
|
-
code?: string | undefined;
|
|
773
|
-
}>>;
|
|
774
|
-
}, "strip", z.ZodTypeAny, {
|
|
775
|
-
type: "tool_result";
|
|
776
|
-
status: "success" | "error";
|
|
777
|
-
timestamp: string;
|
|
778
|
-
tool_id: string;
|
|
779
|
-
error?: {
|
|
780
|
-
message: string;
|
|
781
|
-
type?: string | undefined;
|
|
782
|
-
code?: string | undefined;
|
|
783
|
-
} | undefined;
|
|
784
|
-
output?: string | undefined;
|
|
785
|
-
}, {
|
|
786
|
-
type: "tool_result";
|
|
787
|
-
status: "success" | "error";
|
|
788
|
-
timestamp: string;
|
|
789
|
-
tool_id: string;
|
|
790
|
-
error?: {
|
|
791
|
-
message: string;
|
|
792
|
-
type?: string | undefined;
|
|
793
|
-
code?: string | undefined;
|
|
794
|
-
} | undefined;
|
|
795
|
-
output?: string | undefined;
|
|
796
|
-
}>;
|
|
430
|
+
}, z.core.$strip>>;
|
|
431
|
+
}, z.core.$strip>;
|
|
797
432
|
/**
|
|
798
433
|
* write_file tool result - returns empty output on success
|
|
799
434
|
*
|
|
@@ -806,44 +441,17 @@ export declare const WriteFileToolResultSchema: z.ZodObject<{
|
|
|
806
441
|
type: z.ZodLiteral<"tool_result">;
|
|
807
442
|
timestamp: z.ZodString;
|
|
808
443
|
tool_id: z.ZodString;
|
|
809
|
-
status: z.ZodEnum<
|
|
444
|
+
status: z.ZodEnum<{
|
|
445
|
+
error: "error";
|
|
446
|
+
success: "success";
|
|
447
|
+
}>;
|
|
810
448
|
output: z.ZodOptional<z.ZodString>;
|
|
811
449
|
error: z.ZodOptional<z.ZodObject<{
|
|
812
450
|
type: z.ZodOptional<z.ZodString>;
|
|
813
451
|
message: z.ZodString;
|
|
814
452
|
code: z.ZodOptional<z.ZodString>;
|
|
815
|
-
},
|
|
816
|
-
|
|
817
|
-
type?: string | undefined;
|
|
818
|
-
code?: string | undefined;
|
|
819
|
-
}, {
|
|
820
|
-
message: string;
|
|
821
|
-
type?: string | undefined;
|
|
822
|
-
code?: string | undefined;
|
|
823
|
-
}>>;
|
|
824
|
-
}, "strip", z.ZodTypeAny, {
|
|
825
|
-
type: "tool_result";
|
|
826
|
-
status: "success" | "error";
|
|
827
|
-
timestamp: string;
|
|
828
|
-
tool_id: string;
|
|
829
|
-
error?: {
|
|
830
|
-
message: string;
|
|
831
|
-
type?: string | undefined;
|
|
832
|
-
code?: string | undefined;
|
|
833
|
-
} | undefined;
|
|
834
|
-
output?: string | undefined;
|
|
835
|
-
}, {
|
|
836
|
-
type: "tool_result";
|
|
837
|
-
status: "success" | "error";
|
|
838
|
-
timestamp: string;
|
|
839
|
-
tool_id: string;
|
|
840
|
-
error?: {
|
|
841
|
-
message: string;
|
|
842
|
-
type?: string | undefined;
|
|
843
|
-
code?: string | undefined;
|
|
844
|
-
} | undefined;
|
|
845
|
-
output?: string | undefined;
|
|
846
|
-
}>;
|
|
453
|
+
}, z.core.$strip>>;
|
|
454
|
+
}, z.core.$strip>;
|
|
847
455
|
/**
|
|
848
456
|
* list_directory tool result - returns summary of items found
|
|
849
457
|
*
|
|
@@ -856,44 +464,17 @@ export declare const ListDirectoryToolResultSchema: z.ZodObject<{
|
|
|
856
464
|
type: z.ZodLiteral<"tool_result">;
|
|
857
465
|
timestamp: z.ZodString;
|
|
858
466
|
tool_id: z.ZodString;
|
|
859
|
-
status: z.ZodEnum<
|
|
467
|
+
status: z.ZodEnum<{
|
|
468
|
+
error: "error";
|
|
469
|
+
success: "success";
|
|
470
|
+
}>;
|
|
860
471
|
output: z.ZodOptional<z.ZodString>;
|
|
861
472
|
error: z.ZodOptional<z.ZodObject<{
|
|
862
473
|
type: z.ZodOptional<z.ZodString>;
|
|
863
474
|
message: z.ZodString;
|
|
864
475
|
code: z.ZodOptional<z.ZodString>;
|
|
865
|
-
},
|
|
866
|
-
|
|
867
|
-
type?: string | undefined;
|
|
868
|
-
code?: string | undefined;
|
|
869
|
-
}, {
|
|
870
|
-
message: string;
|
|
871
|
-
type?: string | undefined;
|
|
872
|
-
code?: string | undefined;
|
|
873
|
-
}>>;
|
|
874
|
-
}, "strip", z.ZodTypeAny, {
|
|
875
|
-
type: "tool_result";
|
|
876
|
-
status: "success" | "error";
|
|
877
|
-
timestamp: string;
|
|
878
|
-
tool_id: string;
|
|
879
|
-
error?: {
|
|
880
|
-
message: string;
|
|
881
|
-
type?: string | undefined;
|
|
882
|
-
code?: string | undefined;
|
|
883
|
-
} | undefined;
|
|
884
|
-
output?: string | undefined;
|
|
885
|
-
}, {
|
|
886
|
-
type: "tool_result";
|
|
887
|
-
status: "success" | "error";
|
|
888
|
-
timestamp: string;
|
|
889
|
-
tool_id: string;
|
|
890
|
-
error?: {
|
|
891
|
-
message: string;
|
|
892
|
-
type?: string | undefined;
|
|
893
|
-
code?: string | undefined;
|
|
894
|
-
} | undefined;
|
|
895
|
-
output?: string | undefined;
|
|
896
|
-
}>;
|
|
476
|
+
}, z.core.$strip>>;
|
|
477
|
+
}, z.core.$strip>;
|
|
897
478
|
/**
|
|
898
479
|
* search_file_content tool result - returns match info or "No matches found"
|
|
899
480
|
*
|
|
@@ -906,44 +487,17 @@ export declare const SearchFileContentToolResultSchema: z.ZodObject<{
|
|
|
906
487
|
type: z.ZodLiteral<"tool_result">;
|
|
907
488
|
timestamp: z.ZodString;
|
|
908
489
|
tool_id: z.ZodString;
|
|
909
|
-
status: z.ZodEnum<
|
|
490
|
+
status: z.ZodEnum<{
|
|
491
|
+
error: "error";
|
|
492
|
+
success: "success";
|
|
493
|
+
}>;
|
|
910
494
|
output: z.ZodOptional<z.ZodString>;
|
|
911
495
|
error: z.ZodOptional<z.ZodObject<{
|
|
912
496
|
type: z.ZodOptional<z.ZodString>;
|
|
913
497
|
message: z.ZodString;
|
|
914
498
|
code: z.ZodOptional<z.ZodString>;
|
|
915
|
-
},
|
|
916
|
-
|
|
917
|
-
type?: string | undefined;
|
|
918
|
-
code?: string | undefined;
|
|
919
|
-
}, {
|
|
920
|
-
message: string;
|
|
921
|
-
type?: string | undefined;
|
|
922
|
-
code?: string | undefined;
|
|
923
|
-
}>>;
|
|
924
|
-
}, "strip", z.ZodTypeAny, {
|
|
925
|
-
type: "tool_result";
|
|
926
|
-
status: "success" | "error";
|
|
927
|
-
timestamp: string;
|
|
928
|
-
tool_id: string;
|
|
929
|
-
error?: {
|
|
930
|
-
message: string;
|
|
931
|
-
type?: string | undefined;
|
|
932
|
-
code?: string | undefined;
|
|
933
|
-
} | undefined;
|
|
934
|
-
output?: string | undefined;
|
|
935
|
-
}, {
|
|
936
|
-
type: "tool_result";
|
|
937
|
-
status: "success" | "error";
|
|
938
|
-
timestamp: string;
|
|
939
|
-
tool_id: string;
|
|
940
|
-
error?: {
|
|
941
|
-
message: string;
|
|
942
|
-
type?: string | undefined;
|
|
943
|
-
code?: string | undefined;
|
|
944
|
-
} | undefined;
|
|
945
|
-
output?: string | undefined;
|
|
946
|
-
}>;
|
|
499
|
+
}, z.core.$strip>>;
|
|
500
|
+
}, z.core.$strip>;
|
|
947
501
|
/**
|
|
948
502
|
* run_shell_command tool result - returns command output
|
|
949
503
|
*
|
|
@@ -957,44 +511,17 @@ export declare const RunShellCommandToolResultSchema: z.ZodObject<{
|
|
|
957
511
|
type: z.ZodLiteral<"tool_result">;
|
|
958
512
|
timestamp: z.ZodString;
|
|
959
513
|
tool_id: z.ZodString;
|
|
960
|
-
status: z.ZodEnum<
|
|
514
|
+
status: z.ZodEnum<{
|
|
515
|
+
error: "error";
|
|
516
|
+
success: "success";
|
|
517
|
+
}>;
|
|
961
518
|
output: z.ZodOptional<z.ZodString>;
|
|
962
519
|
error: z.ZodOptional<z.ZodObject<{
|
|
963
520
|
type: z.ZodOptional<z.ZodString>;
|
|
964
521
|
message: z.ZodString;
|
|
965
522
|
code: z.ZodOptional<z.ZodString>;
|
|
966
|
-
},
|
|
967
|
-
|
|
968
|
-
type?: string | undefined;
|
|
969
|
-
code?: string | undefined;
|
|
970
|
-
}, {
|
|
971
|
-
message: string;
|
|
972
|
-
type?: string | undefined;
|
|
973
|
-
code?: string | undefined;
|
|
974
|
-
}>>;
|
|
975
|
-
}, "strip", z.ZodTypeAny, {
|
|
976
|
-
type: "tool_result";
|
|
977
|
-
status: "success" | "error";
|
|
978
|
-
timestamp: string;
|
|
979
|
-
tool_id: string;
|
|
980
|
-
error?: {
|
|
981
|
-
message: string;
|
|
982
|
-
type?: string | undefined;
|
|
983
|
-
code?: string | undefined;
|
|
984
|
-
} | undefined;
|
|
985
|
-
output?: string | undefined;
|
|
986
|
-
}, {
|
|
987
|
-
type: "tool_result";
|
|
988
|
-
status: "success" | "error";
|
|
989
|
-
timestamp: string;
|
|
990
|
-
tool_id: string;
|
|
991
|
-
error?: {
|
|
992
|
-
message: string;
|
|
993
|
-
type?: string | undefined;
|
|
994
|
-
code?: string | undefined;
|
|
995
|
-
} | undefined;
|
|
996
|
-
output?: string | undefined;
|
|
997
|
-
}>;
|
|
523
|
+
}, z.core.$strip>>;
|
|
524
|
+
}, z.core.$strip>;
|
|
998
525
|
/**
|
|
999
526
|
* write_todos tool result - returns empty output on success, or error if invalid
|
|
1000
527
|
*
|
|
@@ -1013,44 +540,17 @@ export declare const WriteTodosToolResultSchema: z.ZodObject<{
|
|
|
1013
540
|
type: z.ZodLiteral<"tool_result">;
|
|
1014
541
|
timestamp: z.ZodString;
|
|
1015
542
|
tool_id: z.ZodString;
|
|
1016
|
-
status: z.ZodEnum<
|
|
543
|
+
status: z.ZodEnum<{
|
|
544
|
+
error: "error";
|
|
545
|
+
success: "success";
|
|
546
|
+
}>;
|
|
1017
547
|
output: z.ZodOptional<z.ZodString>;
|
|
1018
548
|
error: z.ZodOptional<z.ZodObject<{
|
|
1019
549
|
type: z.ZodOptional<z.ZodString>;
|
|
1020
550
|
message: z.ZodString;
|
|
1021
551
|
code: z.ZodOptional<z.ZodString>;
|
|
1022
|
-
},
|
|
1023
|
-
|
|
1024
|
-
type?: string | undefined;
|
|
1025
|
-
code?: string | undefined;
|
|
1026
|
-
}, {
|
|
1027
|
-
message: string;
|
|
1028
|
-
type?: string | undefined;
|
|
1029
|
-
code?: string | undefined;
|
|
1030
|
-
}>>;
|
|
1031
|
-
}, "strip", z.ZodTypeAny, {
|
|
1032
|
-
type: "tool_result";
|
|
1033
|
-
status: "success" | "error";
|
|
1034
|
-
timestamp: string;
|
|
1035
|
-
tool_id: string;
|
|
1036
|
-
error?: {
|
|
1037
|
-
message: string;
|
|
1038
|
-
type?: string | undefined;
|
|
1039
|
-
code?: string | undefined;
|
|
1040
|
-
} | undefined;
|
|
1041
|
-
output?: string | undefined;
|
|
1042
|
-
}, {
|
|
1043
|
-
type: "tool_result";
|
|
1044
|
-
status: "success" | "error";
|
|
1045
|
-
timestamp: string;
|
|
1046
|
-
tool_id: string;
|
|
1047
|
-
error?: {
|
|
1048
|
-
message: string;
|
|
1049
|
-
type?: string | undefined;
|
|
1050
|
-
code?: string | undefined;
|
|
1051
|
-
} | undefined;
|
|
1052
|
-
output?: string | undefined;
|
|
1053
|
-
}>;
|
|
552
|
+
}, z.core.$strip>>;
|
|
553
|
+
}, z.core.$strip>;
|
|
1054
554
|
/**
|
|
1055
555
|
* replace tool result - returns empty output on success
|
|
1056
556
|
*
|
|
@@ -1063,44 +563,17 @@ export declare const ReplaceToolResultSchema: z.ZodObject<{
|
|
|
1063
563
|
type: z.ZodLiteral<"tool_result">;
|
|
1064
564
|
timestamp: z.ZodString;
|
|
1065
565
|
tool_id: z.ZodString;
|
|
1066
|
-
status: z.ZodEnum<
|
|
566
|
+
status: z.ZodEnum<{
|
|
567
|
+
error: "error";
|
|
568
|
+
success: "success";
|
|
569
|
+
}>;
|
|
1067
570
|
output: z.ZodOptional<z.ZodString>;
|
|
1068
571
|
error: z.ZodOptional<z.ZodObject<{
|
|
1069
572
|
type: z.ZodOptional<z.ZodString>;
|
|
1070
573
|
message: z.ZodString;
|
|
1071
574
|
code: z.ZodOptional<z.ZodString>;
|
|
1072
|
-
},
|
|
1073
|
-
|
|
1074
|
-
type?: string | undefined;
|
|
1075
|
-
code?: string | undefined;
|
|
1076
|
-
}, {
|
|
1077
|
-
message: string;
|
|
1078
|
-
type?: string | undefined;
|
|
1079
|
-
code?: string | undefined;
|
|
1080
|
-
}>>;
|
|
1081
|
-
}, "strip", z.ZodTypeAny, {
|
|
1082
|
-
type: "tool_result";
|
|
1083
|
-
status: "success" | "error";
|
|
1084
|
-
timestamp: string;
|
|
1085
|
-
tool_id: string;
|
|
1086
|
-
error?: {
|
|
1087
|
-
message: string;
|
|
1088
|
-
type?: string | undefined;
|
|
1089
|
-
code?: string | undefined;
|
|
1090
|
-
} | undefined;
|
|
1091
|
-
output?: string | undefined;
|
|
1092
|
-
}, {
|
|
1093
|
-
type: "tool_result";
|
|
1094
|
-
status: "success" | "error";
|
|
1095
|
-
timestamp: string;
|
|
1096
|
-
tool_id: string;
|
|
1097
|
-
error?: {
|
|
1098
|
-
message: string;
|
|
1099
|
-
type?: string | undefined;
|
|
1100
|
-
code?: string | undefined;
|
|
1101
|
-
} | undefined;
|
|
1102
|
-
output?: string | undefined;
|
|
1103
|
-
}>;
|
|
575
|
+
}, z.core.$strip>>;
|
|
576
|
+
}, z.core.$strip>;
|
|
1104
577
|
export type ReadFileToolResult = z.infer<typeof ReadFileToolResultSchema>;
|
|
1105
578
|
export type WriteFileToolResult = z.infer<typeof WriteFileToolResultSchema>;
|
|
1106
579
|
export type ListDirectoryToolResult = z.infer<typeof ListDirectoryToolResultSchema>;
|
|
@@ -1140,17 +613,7 @@ export declare const GeminiErrorEventSchema: z.ZodObject<{
|
|
|
1140
613
|
timestamp: z.ZodString;
|
|
1141
614
|
message: z.ZodString;
|
|
1142
615
|
code: z.ZodOptional<z.ZodNumber>;
|
|
1143
|
-
},
|
|
1144
|
-
type: "error";
|
|
1145
|
-
message: string;
|
|
1146
|
-
timestamp: string;
|
|
1147
|
-
code?: number | undefined;
|
|
1148
|
-
}, {
|
|
1149
|
-
type: "error";
|
|
1150
|
-
message: string;
|
|
1151
|
-
timestamp: string;
|
|
1152
|
-
code?: number | undefined;
|
|
1153
|
-
}>;
|
|
616
|
+
}, z.core.$strip>;
|
|
1154
617
|
/**
|
|
1155
618
|
* Final result event with session statistics
|
|
1156
619
|
*
|
|
@@ -1168,253 +631,87 @@ export declare const GeminiErrorEventSchema: z.ZodObject<{
|
|
|
1168
631
|
export declare const GeminiResultEventSchema: z.ZodObject<{
|
|
1169
632
|
type: z.ZodLiteral<"result">;
|
|
1170
633
|
timestamp: z.ZodString;
|
|
1171
|
-
status: z.ZodEnum<
|
|
634
|
+
status: z.ZodEnum<{
|
|
635
|
+
error: "error";
|
|
636
|
+
success: "success";
|
|
637
|
+
}>;
|
|
1172
638
|
stats: z.ZodOptional<z.ZodObject<{
|
|
1173
639
|
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
1174
640
|
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
1175
641
|
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
1176
642
|
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
1177
643
|
tool_calls: z.ZodOptional<z.ZodNumber>;
|
|
1178
|
-
},
|
|
1179
|
-
total_tokens?: number | undefined;
|
|
1180
|
-
input_tokens?: number | undefined;
|
|
1181
|
-
output_tokens?: number | undefined;
|
|
1182
|
-
duration_ms?: number | undefined;
|
|
1183
|
-
tool_calls?: number | undefined;
|
|
1184
|
-
}, {
|
|
1185
|
-
total_tokens?: number | undefined;
|
|
1186
|
-
input_tokens?: number | undefined;
|
|
1187
|
-
output_tokens?: number | undefined;
|
|
1188
|
-
duration_ms?: number | undefined;
|
|
1189
|
-
tool_calls?: number | undefined;
|
|
1190
|
-
}>>;
|
|
644
|
+
}, z.core.$strip>>;
|
|
1191
645
|
error: z.ZodOptional<z.ZodObject<{
|
|
1192
646
|
type: z.ZodString;
|
|
1193
647
|
message: z.ZodString;
|
|
1194
648
|
code: z.ZodOptional<z.ZodNumber>;
|
|
1195
|
-
},
|
|
1196
|
-
|
|
1197
|
-
message: string;
|
|
1198
|
-
code?: number | undefined;
|
|
1199
|
-
}, {
|
|
1200
|
-
type: string;
|
|
1201
|
-
message: string;
|
|
1202
|
-
code?: number | undefined;
|
|
1203
|
-
}>>;
|
|
1204
|
-
}, "strip", z.ZodTypeAny, {
|
|
1205
|
-
type: "result";
|
|
1206
|
-
status: "success" | "error";
|
|
1207
|
-
timestamp: string;
|
|
1208
|
-
error?: {
|
|
1209
|
-
type: string;
|
|
1210
|
-
message: string;
|
|
1211
|
-
code?: number | undefined;
|
|
1212
|
-
} | undefined;
|
|
1213
|
-
stats?: {
|
|
1214
|
-
total_tokens?: number | undefined;
|
|
1215
|
-
input_tokens?: number | undefined;
|
|
1216
|
-
output_tokens?: number | undefined;
|
|
1217
|
-
duration_ms?: number | undefined;
|
|
1218
|
-
tool_calls?: number | undefined;
|
|
1219
|
-
} | undefined;
|
|
1220
|
-
}, {
|
|
1221
|
-
type: "result";
|
|
1222
|
-
status: "success" | "error";
|
|
1223
|
-
timestamp: string;
|
|
1224
|
-
error?: {
|
|
1225
|
-
type: string;
|
|
1226
|
-
message: string;
|
|
1227
|
-
code?: number | undefined;
|
|
1228
|
-
} | undefined;
|
|
1229
|
-
stats?: {
|
|
1230
|
-
total_tokens?: number | undefined;
|
|
1231
|
-
input_tokens?: number | undefined;
|
|
1232
|
-
output_tokens?: number | undefined;
|
|
1233
|
-
duration_ms?: number | undefined;
|
|
1234
|
-
tool_calls?: number | undefined;
|
|
1235
|
-
} | undefined;
|
|
1236
|
-
}>;
|
|
649
|
+
}, z.core.$strip>>;
|
|
650
|
+
}, z.core.$strip>;
|
|
1237
651
|
/**
|
|
1238
652
|
* Discriminated union of all Gemini stream events
|
|
1239
653
|
*
|
|
1240
654
|
* Uses the 'type' field as the discriminator for type narrowing.
|
|
1241
655
|
*/
|
|
1242
|
-
export declare const GeminiStreamEventSchema: z.ZodDiscriminatedUnion<
|
|
656
|
+
export declare const GeminiStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1243
657
|
type: z.ZodLiteral<"init">;
|
|
1244
658
|
timestamp: z.ZodString;
|
|
1245
659
|
session_id: z.ZodString;
|
|
1246
660
|
model: z.ZodString;
|
|
1247
|
-
},
|
|
1248
|
-
type: "init";
|
|
1249
|
-
timestamp: string;
|
|
1250
|
-
session_id: string;
|
|
1251
|
-
model: string;
|
|
1252
|
-
}, {
|
|
1253
|
-
type: "init";
|
|
1254
|
-
timestamp: string;
|
|
1255
|
-
session_id: string;
|
|
1256
|
-
model: string;
|
|
1257
|
-
}>, z.ZodObject<{
|
|
661
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1258
662
|
type: z.ZodLiteral<"message">;
|
|
1259
663
|
timestamp: z.ZodString;
|
|
1260
|
-
role: z.ZodEnum<
|
|
664
|
+
role: z.ZodEnum<{
|
|
665
|
+
user: "user";
|
|
666
|
+
assistant: "assistant";
|
|
667
|
+
}>;
|
|
1261
668
|
content: z.ZodString;
|
|
1262
669
|
delta: z.ZodOptional<z.ZodBoolean>;
|
|
1263
|
-
},
|
|
1264
|
-
type: "message";
|
|
1265
|
-
timestamp: string;
|
|
1266
|
-
role: "user" | "assistant";
|
|
1267
|
-
content: string;
|
|
1268
|
-
delta?: boolean | undefined;
|
|
1269
|
-
}, {
|
|
1270
|
-
type: "message";
|
|
1271
|
-
timestamp: string;
|
|
1272
|
-
role: "user" | "assistant";
|
|
1273
|
-
content: string;
|
|
1274
|
-
delta?: boolean | undefined;
|
|
1275
|
-
}>, z.ZodObject<{
|
|
670
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1276
671
|
type: z.ZodLiteral<"tool_use">;
|
|
1277
672
|
timestamp: z.ZodString;
|
|
1278
673
|
tool_name: z.ZodString;
|
|
1279
674
|
tool_id: z.ZodString;
|
|
1280
675
|
parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1281
|
-
},
|
|
1282
|
-
type: "tool_use";
|
|
1283
|
-
timestamp: string;
|
|
1284
|
-
tool_id: string;
|
|
1285
|
-
tool_name: string;
|
|
1286
|
-
parameters: Record<string, unknown>;
|
|
1287
|
-
}, {
|
|
1288
|
-
type: "tool_use";
|
|
1289
|
-
timestamp: string;
|
|
1290
|
-
tool_id: string;
|
|
1291
|
-
tool_name: string;
|
|
1292
|
-
parameters: Record<string, unknown>;
|
|
1293
|
-
}>, z.ZodObject<{
|
|
676
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1294
677
|
type: z.ZodLiteral<"tool_result">;
|
|
1295
678
|
timestamp: z.ZodString;
|
|
1296
679
|
tool_id: z.ZodString;
|
|
1297
|
-
status: z.ZodEnum<
|
|
680
|
+
status: z.ZodEnum<{
|
|
681
|
+
error: "error";
|
|
682
|
+
success: "success";
|
|
683
|
+
}>;
|
|
1298
684
|
output: z.ZodOptional<z.ZodString>;
|
|
1299
685
|
error: z.ZodOptional<z.ZodObject<{
|
|
1300
686
|
type: z.ZodOptional<z.ZodString>;
|
|
1301
687
|
message: z.ZodString;
|
|
1302
688
|
code: z.ZodOptional<z.ZodString>;
|
|
1303
|
-
},
|
|
1304
|
-
|
|
1305
|
-
type?: string | undefined;
|
|
1306
|
-
code?: string | undefined;
|
|
1307
|
-
}, {
|
|
1308
|
-
message: string;
|
|
1309
|
-
type?: string | undefined;
|
|
1310
|
-
code?: string | undefined;
|
|
1311
|
-
}>>;
|
|
1312
|
-
}, "strip", z.ZodTypeAny, {
|
|
1313
|
-
type: "tool_result";
|
|
1314
|
-
status: "success" | "error";
|
|
1315
|
-
timestamp: string;
|
|
1316
|
-
tool_id: string;
|
|
1317
|
-
error?: {
|
|
1318
|
-
message: string;
|
|
1319
|
-
type?: string | undefined;
|
|
1320
|
-
code?: string | undefined;
|
|
1321
|
-
} | undefined;
|
|
1322
|
-
output?: string | undefined;
|
|
1323
|
-
}, {
|
|
1324
|
-
type: "tool_result";
|
|
1325
|
-
status: "success" | "error";
|
|
1326
|
-
timestamp: string;
|
|
1327
|
-
tool_id: string;
|
|
1328
|
-
error?: {
|
|
1329
|
-
message: string;
|
|
1330
|
-
type?: string | undefined;
|
|
1331
|
-
code?: string | undefined;
|
|
1332
|
-
} | undefined;
|
|
1333
|
-
output?: string | undefined;
|
|
1334
|
-
}>, z.ZodObject<{
|
|
689
|
+
}, z.core.$strip>>;
|
|
690
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1335
691
|
type: z.ZodLiteral<"error">;
|
|
1336
692
|
timestamp: z.ZodString;
|
|
1337
693
|
message: z.ZodString;
|
|
1338
694
|
code: z.ZodOptional<z.ZodNumber>;
|
|
1339
|
-
},
|
|
1340
|
-
type: "error";
|
|
1341
|
-
message: string;
|
|
1342
|
-
timestamp: string;
|
|
1343
|
-
code?: number | undefined;
|
|
1344
|
-
}, {
|
|
1345
|
-
type: "error";
|
|
1346
|
-
message: string;
|
|
1347
|
-
timestamp: string;
|
|
1348
|
-
code?: number | undefined;
|
|
1349
|
-
}>, z.ZodObject<{
|
|
695
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1350
696
|
type: z.ZodLiteral<"result">;
|
|
1351
697
|
timestamp: z.ZodString;
|
|
1352
|
-
status: z.ZodEnum<
|
|
698
|
+
status: z.ZodEnum<{
|
|
699
|
+
error: "error";
|
|
700
|
+
success: "success";
|
|
701
|
+
}>;
|
|
1353
702
|
stats: z.ZodOptional<z.ZodObject<{
|
|
1354
703
|
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
1355
704
|
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
1356
705
|
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
1357
706
|
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
1358
707
|
tool_calls: z.ZodOptional<z.ZodNumber>;
|
|
1359
|
-
},
|
|
1360
|
-
total_tokens?: number | undefined;
|
|
1361
|
-
input_tokens?: number | undefined;
|
|
1362
|
-
output_tokens?: number | undefined;
|
|
1363
|
-
duration_ms?: number | undefined;
|
|
1364
|
-
tool_calls?: number | undefined;
|
|
1365
|
-
}, {
|
|
1366
|
-
total_tokens?: number | undefined;
|
|
1367
|
-
input_tokens?: number | undefined;
|
|
1368
|
-
output_tokens?: number | undefined;
|
|
1369
|
-
duration_ms?: number | undefined;
|
|
1370
|
-
tool_calls?: number | undefined;
|
|
1371
|
-
}>>;
|
|
708
|
+
}, z.core.$strip>>;
|
|
1372
709
|
error: z.ZodOptional<z.ZodObject<{
|
|
1373
710
|
type: z.ZodString;
|
|
1374
711
|
message: z.ZodString;
|
|
1375
712
|
code: z.ZodOptional<z.ZodNumber>;
|
|
1376
|
-
},
|
|
1377
|
-
|
|
1378
|
-
message: string;
|
|
1379
|
-
code?: number | undefined;
|
|
1380
|
-
}, {
|
|
1381
|
-
type: string;
|
|
1382
|
-
message: string;
|
|
1383
|
-
code?: number | undefined;
|
|
1384
|
-
}>>;
|
|
1385
|
-
}, "strip", z.ZodTypeAny, {
|
|
1386
|
-
type: "result";
|
|
1387
|
-
status: "success" | "error";
|
|
1388
|
-
timestamp: string;
|
|
1389
|
-
error?: {
|
|
1390
|
-
type: string;
|
|
1391
|
-
message: string;
|
|
1392
|
-
code?: number | undefined;
|
|
1393
|
-
} | undefined;
|
|
1394
|
-
stats?: {
|
|
1395
|
-
total_tokens?: number | undefined;
|
|
1396
|
-
input_tokens?: number | undefined;
|
|
1397
|
-
output_tokens?: number | undefined;
|
|
1398
|
-
duration_ms?: number | undefined;
|
|
1399
|
-
tool_calls?: number | undefined;
|
|
1400
|
-
} | undefined;
|
|
1401
|
-
}, {
|
|
1402
|
-
type: "result";
|
|
1403
|
-
status: "success" | "error";
|
|
1404
|
-
timestamp: string;
|
|
1405
|
-
error?: {
|
|
1406
|
-
type: string;
|
|
1407
|
-
message: string;
|
|
1408
|
-
code?: number | undefined;
|
|
1409
|
-
} | undefined;
|
|
1410
|
-
stats?: {
|
|
1411
|
-
total_tokens?: number | undefined;
|
|
1412
|
-
input_tokens?: number | undefined;
|
|
1413
|
-
output_tokens?: number | undefined;
|
|
1414
|
-
duration_ms?: number | undefined;
|
|
1415
|
-
tool_calls?: number | undefined;
|
|
1416
|
-
} | undefined;
|
|
1417
|
-
}>]>;
|
|
713
|
+
}, z.core.$strip>>;
|
|
714
|
+
}, z.core.$strip>], "type">;
|
|
1418
715
|
export type GeminiInitEvent = z.infer<typeof GeminiInitEventSchema>;
|
|
1419
716
|
export type GeminiMessageEvent = z.infer<typeof GeminiMessageEventSchema>;
|
|
1420
717
|
export type GeminiToolUseEvent = z.infer<typeof GeminiToolUseEventSchema>;
|