codebuff 1.0.287 → 1.0.289

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.
Files changed (47) hide show
  1. package/dist/cli.d.ts +2 -1
  2. package/dist/cli.js +1 -2
  3. package/dist/cli.js.map +1 -1
  4. package/dist/client.d.ts +5 -8
  5. package/dist/client.js +3 -4
  6. package/dist/client.js.map +1 -1
  7. package/dist/common/actions.d.ts +178 -178
  8. package/dist/common/analytics.js +1 -4
  9. package/dist/common/analytics.js.map +1 -1
  10. package/dist/common/constants.d.ts +7 -7
  11. package/dist/common/constants.js +2 -2
  12. package/dist/common/types/agent-state.d.ts +8 -8
  13. package/dist/common/types/message.d.ts +6 -6
  14. package/dist/common/types/usage.d.ts +2 -2
  15. package/dist/common/util/__tests__/saxy.test.js +75 -0
  16. package/dist/common/util/__tests__/saxy.test.js.map +1 -1
  17. package/dist/common/util/credentials.d.ts +2 -2
  18. package/dist/common/util/saxy.js +40 -42
  19. package/dist/common/util/saxy.js.map +1 -1
  20. package/dist/common/websockets/websocket-schema.d.ts +328 -328
  21. package/dist/index.js +13 -1
  22. package/dist/menu.js +8 -6
  23. package/dist/menu.js.map +1 -1
  24. package/dist/slash-commands.d.ts +7 -0
  25. package/dist/slash-commands.js +21 -0
  26. package/dist/slash-commands.js.map +1 -0
  27. package/package.json +2 -1
  28. package/dist/common/__tests__/project-file-tree.test.d.ts +0 -1
  29. package/dist/common/__tests__/project-file-tree.test.js +0 -251
  30. package/dist/common/__tests__/project-file-tree.test.js.map +0 -1
  31. package/dist/common/json-config/__tests__/__snapshots__/stringify-schema.test.js.snap +0 -119
  32. package/dist/common/util/process-stream.d.ts +0 -7
  33. package/dist/common/util/process-stream.js +0 -162
  34. package/dist/common/util/process-stream.js.map +0 -1
  35. package/dist/utils/__tests__/__snapshots__/background-process-manager.test.js.snap +0 -137
  36. package/dist/utils/__tests__/file-paths.test.d.ts +0 -1
  37. package/dist/utils/__tests__/file-paths.test.js +0 -37
  38. package/dist/utils/__tests__/file-paths.test.js.map +0 -1
  39. package/dist/utils/__tests__/path.test.d.ts +0 -1
  40. package/dist/utils/__tests__/path.test.js +0 -37
  41. package/dist/utils/__tests__/path.test.js.map +0 -1
  42. package/dist/utils/file-paths.d.ts +0 -9
  43. package/dist/utils/file-paths.js +0 -24
  44. package/dist/utils/file-paths.js.map +0 -1
  45. package/dist/utils/path.d.ts +0 -9
  46. package/dist/utils/path.js +0 -27
  47. package/dist/utils/path.js.map +0 -1
@@ -4,13 +4,13 @@ export declare const FileChangeSchema: z.ZodObject<{
4
4
  path: z.ZodString;
5
5
  content: z.ZodString;
6
6
  }, "strip", z.ZodTypeAny, {
7
+ content: string;
7
8
  path: string;
8
9
  type: "patch" | "file";
9
- content: string;
10
10
  }, {
11
+ content: string;
11
12
  path: string;
12
13
  type: "patch" | "file";
13
- content: string;
14
14
  }>;
15
15
  export type FileChange = z.infer<typeof FileChangeSchema>;
16
16
  export declare const CHANGES: z.ZodArray<z.ZodObject<{
@@ -18,13 +18,13 @@ export declare const CHANGES: z.ZodArray<z.ZodObject<{
18
18
  path: z.ZodString;
19
19
  content: z.ZodString;
20
20
  }, "strip", z.ZodTypeAny, {
21
+ content: string;
21
22
  path: string;
22
23
  type: "patch" | "file";
23
- content: string;
24
24
  }, {
25
+ content: string;
25
26
  path: string;
26
27
  type: "patch" | "file";
27
- content: string;
28
28
  }>, "many">;
29
29
  export type FileChanges = z.infer<typeof CHANGES>;
30
30
  export declare const ToolCallSchema: z.ZodObject<{
@@ -101,11 +101,11 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
101
101
  path: z.ZodString;
102
102
  content: z.ZodString;
103
103
  }, "strip", z.ZodTypeAny, {
104
- path: string;
105
104
  content: string;
106
- }, {
107
105
  path: string;
106
+ }, {
108
107
  content: string;
108
+ path: string;
109
109
  }>, "many">, "many">>;
110
110
  }, "strip", z.ZodTypeAny, {
111
111
  currentWorkingDirectory: string;
@@ -131,8 +131,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
131
131
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
132
132
  userKnowledgeFiles?: Record<string, string> | undefined;
133
133
  fileVersions?: {
134
- path: string;
135
134
  content: string;
135
+ path: string;
136
136
  }[][] | undefined;
137
137
  }, {
138
138
  currentWorkingDirectory: string;
@@ -158,8 +158,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
158
158
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
159
159
  userKnowledgeFiles?: Record<string, string> | undefined;
160
160
  fileVersions?: {
161
- path: string;
162
161
  content: string;
162
+ path: string;
163
163
  }[][] | undefined;
164
164
  }>;
165
165
  messageHistory: z.ZodArray<z.ZodObject<{
@@ -175,14 +175,14 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
175
175
  type: "ephemeral";
176
176
  }>>;
177
177
  }, "strip", z.ZodTypeAny, {
178
- type: "text";
179
178
  text: string;
179
+ type: "text";
180
180
  cache_control?: {
181
181
  type: "ephemeral";
182
182
  } | undefined;
183
183
  }, {
184
- type: "text";
185
184
  text: string;
185
+ type: "text";
186
186
  cache_control?: {
187
187
  type: "ephemeral";
188
188
  } | undefined;
@@ -199,16 +199,16 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
199
199
  type: "ephemeral";
200
200
  }>>;
201
201
  }, "strip", z.ZodTypeAny, {
202
- type: "tool_use";
203
202
  name: string;
203
+ type: "tool_use";
204
204
  id: string;
205
205
  input: Record<string, any>;
206
206
  cache_control?: {
207
207
  type: "ephemeral";
208
208
  } | undefined;
209
209
  }, {
210
- type: "tool_use";
211
210
  name: string;
211
+ type: "tool_use";
212
212
  id: string;
213
213
  input: Record<string, any>;
214
214
  cache_control?: {
@@ -226,15 +226,15 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
226
226
  type: "ephemeral";
227
227
  }>>;
228
228
  }, "strip", z.ZodTypeAny, {
229
- type: "tool_result";
230
229
  content: string;
230
+ type: "tool_result";
231
231
  tool_use_id: string;
232
232
  cache_control?: {
233
233
  type: "ephemeral";
234
234
  } | undefined;
235
235
  }, {
236
- type: "tool_result";
237
236
  content: string;
237
+ type: "tool_result";
238
238
  tool_use_id: string;
239
239
  cache_control?: {
240
240
  type: "ephemeral";
@@ -246,13 +246,13 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
246
246
  media_type: z.ZodLiteral<"image/jpeg">;
247
247
  data: z.ZodString;
248
248
  }, "strip", z.ZodTypeAny, {
249
+ data: string;
249
250
  type: "base64";
250
251
  media_type: "image/jpeg";
251
- data: string;
252
252
  }, {
253
+ data: string;
253
254
  type: "base64";
254
255
  media_type: "image/jpeg";
255
- data: string;
256
256
  }>;
257
257
  cache_control: z.ZodOptional<z.ZodObject<{
258
258
  type: z.ZodLiteral<"ephemeral">;
@@ -264,9 +264,9 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
264
264
  }, "strip", z.ZodTypeAny, {
265
265
  type: "image";
266
266
  source: {
267
+ data: string;
267
268
  type: "base64";
268
269
  media_type: "image/jpeg";
269
- data: string;
270
270
  };
271
271
  cache_control?: {
272
272
  type: "ephemeral";
@@ -274,9 +274,9 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
274
274
  }, {
275
275
  type: "image";
276
276
  source: {
277
+ data: string;
277
278
  type: "base64";
278
279
  media_type: "image/jpeg";
279
- data: string;
280
280
  };
281
281
  cache_control?: {
282
282
  type: "ephemeral";
@@ -284,22 +284,22 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
284
284
  }>]>, "many">]>;
285
285
  }, "strip", z.ZodTypeAny, {
286
286
  content: string | ({
287
- type: "text";
288
287
  text: string;
288
+ type: "text";
289
289
  cache_control?: {
290
290
  type: "ephemeral";
291
291
  } | undefined;
292
292
  } | {
293
- type: "tool_use";
294
293
  name: string;
294
+ type: "tool_use";
295
295
  id: string;
296
296
  input: Record<string, any>;
297
297
  cache_control?: {
298
298
  type: "ephemeral";
299
299
  } | undefined;
300
300
  } | {
301
- type: "tool_result";
302
301
  content: string;
302
+ type: "tool_result";
303
303
  tool_use_id: string;
304
304
  cache_control?: {
305
305
  type: "ephemeral";
@@ -307,9 +307,9 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
307
307
  } | {
308
308
  type: "image";
309
309
  source: {
310
+ data: string;
310
311
  type: "base64";
311
312
  media_type: "image/jpeg";
312
- data: string;
313
313
  };
314
314
  cache_control?: {
315
315
  type: "ephemeral";
@@ -318,22 +318,22 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
318
318
  role: "user" | "assistant";
319
319
  }, {
320
320
  content: string | ({
321
- type: "text";
322
321
  text: string;
322
+ type: "text";
323
323
  cache_control?: {
324
324
  type: "ephemeral";
325
325
  } | undefined;
326
326
  } | {
327
- type: "tool_use";
328
327
  name: string;
328
+ type: "tool_use";
329
329
  id: string;
330
330
  input: Record<string, any>;
331
331
  cache_control?: {
332
332
  type: "ephemeral";
333
333
  } | undefined;
334
334
  } | {
335
- type: "tool_result";
336
335
  content: string;
336
+ type: "tool_result";
337
337
  tool_use_id: string;
338
338
  cache_control?: {
339
339
  type: "ephemeral";
@@ -341,9 +341,9 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
341
341
  } | {
342
342
  type: "image";
343
343
  source: {
344
+ data: string;
344
345
  type: "base64";
345
346
  media_type: "image/jpeg";
346
- data: string;
347
347
  };
348
348
  cache_control?: {
349
349
  type: "ephemeral";
@@ -378,28 +378,28 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
378
378
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
379
379
  userKnowledgeFiles?: Record<string, string> | undefined;
380
380
  fileVersions?: {
381
- path: string;
382
381
  content: string;
382
+ path: string;
383
383
  }[][] | undefined;
384
384
  };
385
385
  messageHistory: {
386
386
  content: string | ({
387
- type: "text";
388
387
  text: string;
388
+ type: "text";
389
389
  cache_control?: {
390
390
  type: "ephemeral";
391
391
  } | undefined;
392
392
  } | {
393
- type: "tool_use";
394
393
  name: string;
394
+ type: "tool_use";
395
395
  id: string;
396
396
  input: Record<string, any>;
397
397
  cache_control?: {
398
398
  type: "ephemeral";
399
399
  } | undefined;
400
400
  } | {
401
- type: "tool_result";
402
401
  content: string;
402
+ type: "tool_result";
403
403
  tool_use_id: string;
404
404
  cache_control?: {
405
405
  type: "ephemeral";
@@ -407,9 +407,9 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
407
407
  } | {
408
408
  type: "image";
409
409
  source: {
410
+ data: string;
410
411
  type: "base64";
411
412
  media_type: "image/jpeg";
412
- data: string;
413
413
  };
414
414
  cache_control?: {
415
415
  type: "ephemeral";
@@ -444,28 +444,28 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
444
444
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
445
445
  userKnowledgeFiles?: Record<string, string> | undefined;
446
446
  fileVersions?: {
447
- path: string;
448
447
  content: string;
448
+ path: string;
449
449
  }[][] | undefined;
450
450
  };
451
451
  messageHistory: {
452
452
  content: string | ({
453
- type: "text";
454
453
  text: string;
454
+ type: "text";
455
455
  cache_control?: {
456
456
  type: "ephemeral";
457
457
  } | undefined;
458
458
  } | {
459
- type: "tool_use";
460
459
  name: string;
460
+ type: "tool_use";
461
461
  id: string;
462
462
  input: Record<string, any>;
463
463
  cache_control?: {
464
464
  type: "ephemeral";
465
465
  } | undefined;
466
466
  } | {
467
- type: "tool_result";
468
467
  content: string;
468
+ type: "tool_result";
469
469
  tool_use_id: string;
470
470
  cache_control?: {
471
471
  type: "ephemeral";
@@ -473,9 +473,9 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
473
473
  } | {
474
474
  type: "image";
475
475
  source: {
476
+ data: string;
476
477
  type: "base64";
477
478
  media_type: "image/jpeg";
478
- data: string;
479
479
  };
480
480
  cache_control?: {
481
481
  type: "ephemeral";
@@ -504,7 +504,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
504
504
  type: "prompt";
505
505
  promptId: string;
506
506
  fingerprintId: string;
507
- costMode: "max" | "lite" | "normal" | "experimental";
507
+ costMode: "lite" | "normal" | "max" | "experimental";
508
508
  agentState: {
509
509
  agentContext: string;
510
510
  fileContext: {
@@ -531,28 +531,28 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
531
531
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
532
532
  userKnowledgeFiles?: Record<string, string> | undefined;
533
533
  fileVersions?: {
534
- path: string;
535
534
  content: string;
535
+ path: string;
536
536
  }[][] | undefined;
537
537
  };
538
538
  messageHistory: {
539
539
  content: string | ({
540
- type: "text";
541
540
  text: string;
541
+ type: "text";
542
542
  cache_control?: {
543
543
  type: "ephemeral";
544
544
  } | undefined;
545
545
  } | {
546
- type: "tool_use";
547
546
  name: string;
547
+ type: "tool_use";
548
548
  id: string;
549
549
  input: Record<string, any>;
550
550
  cache_control?: {
551
551
  type: "ephemeral";
552
552
  } | undefined;
553
553
  } | {
554
- type: "tool_result";
555
554
  content: string;
555
+ type: "tool_result";
556
556
  tool_use_id: string;
557
557
  cache_control?: {
558
558
  type: "ephemeral";
@@ -560,9 +560,9 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
560
560
  } | {
561
561
  type: "image";
562
562
  source: {
563
+ data: string;
563
564
  type: "base64";
564
565
  media_type: "image/jpeg";
565
- data: string;
566
566
  };
567
567
  cache_control?: {
568
568
  type: "ephemeral";
@@ -611,28 +611,28 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
611
611
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
612
612
  userKnowledgeFiles?: Record<string, string> | undefined;
613
613
  fileVersions?: {
614
- path: string;
615
614
  content: string;
615
+ path: string;
616
616
  }[][] | undefined;
617
617
  };
618
618
  messageHistory: {
619
619
  content: string | ({
620
- type: "text";
621
620
  text: string;
621
+ type: "text";
622
622
  cache_control?: {
623
623
  type: "ephemeral";
624
624
  } | undefined;
625
625
  } | {
626
- type: "tool_use";
627
626
  name: string;
627
+ type: "tool_use";
628
628
  id: string;
629
629
  input: Record<string, any>;
630
630
  cache_control?: {
631
631
  type: "ephemeral";
632
632
  } | undefined;
633
633
  } | {
634
- type: "tool_result";
635
634
  content: string;
635
+ type: "tool_result";
636
636
  tool_use_id: string;
637
637
  cache_control?: {
638
638
  type: "ephemeral";
@@ -640,9 +640,9 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
640
640
  } | {
641
641
  type: "image";
642
642
  source: {
643
+ data: string;
643
644
  type: "base64";
644
645
  media_type: "image/jpeg";
645
- data: string;
646
646
  };
647
647
  cache_control?: {
648
648
  type: "ephemeral";
@@ -659,7 +659,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
659
659
  }[];
660
660
  prompt?: string | undefined;
661
661
  authToken?: string | undefined;
662
- costMode?: "max" | "lite" | "normal" | "experimental" | undefined;
662
+ costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
663
663
  model?: string | undefined;
664
664
  cwd?: string | undefined;
665
665
  }>, z.ZodObject<{
@@ -729,11 +729,11 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
729
729
  path: z.ZodString;
730
730
  content: z.ZodString;
731
731
  }, "strip", z.ZodTypeAny, {
732
- path: string;
733
732
  content: string;
734
- }, {
735
733
  path: string;
734
+ }, {
736
735
  content: string;
736
+ path: string;
737
737
  }>, "many">, "many">>;
738
738
  }, "strip", z.ZodTypeAny, {
739
739
  currentWorkingDirectory: string;
@@ -759,8 +759,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
759
759
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
760
760
  userKnowledgeFiles?: Record<string, string> | undefined;
761
761
  fileVersions?: {
762
- path: string;
763
762
  content: string;
763
+ path: string;
764
764
  }[][] | undefined;
765
765
  }, {
766
766
  currentWorkingDirectory: string;
@@ -786,8 +786,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
786
786
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
787
787
  userKnowledgeFiles?: Record<string, string> | undefined;
788
788
  fileVersions?: {
789
- path: string;
790
789
  content: string;
790
+ path: string;
791
791
  }[][] | undefined;
792
792
  }>;
793
793
  }, "strip", z.ZodTypeAny, {
@@ -817,8 +817,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
817
817
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
818
818
  userKnowledgeFiles?: Record<string, string> | undefined;
819
819
  fileVersions?: {
820
- path: string;
821
820
  content: string;
821
+ path: string;
822
822
  }[][] | undefined;
823
823
  };
824
824
  authToken?: string | undefined;
@@ -849,8 +849,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
849
849
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
850
850
  userKnowledgeFiles?: Record<string, string> | undefined;
851
851
  fileVersions?: {
852
- path: string;
853
852
  content: string;
853
+ path: string;
854
854
  }[][] | undefined;
855
855
  };
856
856
  authToken?: string | undefined;
@@ -928,36 +928,36 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
928
928
  path: z.ZodString;
929
929
  content: z.ZodString;
930
930
  }, "strip", z.ZodTypeAny, {
931
+ content: string;
931
932
  path: string;
932
933
  type: "patch" | "file";
933
- content: string;
934
934
  }, {
935
+ content: string;
935
936
  path: string;
936
937
  type: "patch" | "file";
937
- content: string;
938
938
  }>, "many">;
939
939
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
940
940
  type: z.ZodEnum<["patch", "file"]>;
941
941
  path: z.ZodString;
942
942
  content: z.ZodString;
943
943
  }, "strip", z.ZodTypeAny, {
944
+ content: string;
944
945
  path: string;
945
946
  type: "patch" | "file";
946
- content: string;
947
947
  }, {
948
+ content: string;
948
949
  path: string;
949
950
  type: "patch" | "file";
950
- content: string;
951
951
  }>, "many">;
952
952
  addedFileVersions: z.ZodArray<z.ZodObject<{
953
953
  path: z.ZodString;
954
954
  content: z.ZodString;
955
955
  }, "strip", z.ZodTypeAny, {
956
- path: string;
957
956
  content: string;
958
- }, {
959
957
  path: string;
958
+ }, {
960
959
  content: string;
960
+ path: string;
961
961
  }>, "many">;
962
962
  resetFileVersions: z.ZodBoolean;
963
963
  }, {
@@ -971,18 +971,18 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
971
971
  userInputId: string;
972
972
  response: string;
973
973
  changes: {
974
+ content: string;
974
975
  path: string;
975
976
  type: "patch" | "file";
976
- content: string;
977
977
  }[];
978
978
  changesAlreadyApplied: {
979
+ content: string;
979
980
  path: string;
980
981
  type: "patch" | "file";
981
- content: string;
982
982
  }[];
983
983
  addedFileVersions: {
984
- path: string;
985
984
  content: string;
985
+ path: string;
986
986
  }[];
987
987
  resetFileVersions: boolean;
988
988
  usage?: number | undefined;
@@ -995,18 +995,18 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
995
995
  userInputId: string;
996
996
  response: string;
997
997
  changes: {
998
+ content: string;
998
999
  path: string;
999
1000
  type: "patch" | "file";
1000
- content: string;
1001
1001
  }[];
1002
1002
  changesAlreadyApplied: {
1003
+ content: string;
1003
1004
  path: string;
1004
1005
  type: "patch" | "file";
1005
- content: string;
1006
1006
  }[];
1007
1007
  addedFileVersions: {
1008
- path: string;
1009
1008
  content: string;
1009
+ path: string;
1010
1010
  }[];
1011
1011
  resetFileVersions: boolean;
1012
1012
  usage?: number | undefined;
@@ -1085,11 +1085,11 @@ export declare const PromptResponseSchema: z.ZodObject<{
1085
1085
  path: z.ZodString;
1086
1086
  content: z.ZodString;
1087
1087
  }, "strip", z.ZodTypeAny, {
1088
- path: string;
1089
1088
  content: string;
1090
- }, {
1091
1089
  path: string;
1090
+ }, {
1092
1091
  content: string;
1092
+ path: string;
1093
1093
  }>, "many">, "many">>;
1094
1094
  }, "strip", z.ZodTypeAny, {
1095
1095
  currentWorkingDirectory: string;
@@ -1115,8 +1115,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
1115
1115
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1116
1116
  userKnowledgeFiles?: Record<string, string> | undefined;
1117
1117
  fileVersions?: {
1118
- path: string;
1119
1118
  content: string;
1119
+ path: string;
1120
1120
  }[][] | undefined;
1121
1121
  }, {
1122
1122
  currentWorkingDirectory: string;
@@ -1142,8 +1142,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
1142
1142
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1143
1143
  userKnowledgeFiles?: Record<string, string> | undefined;
1144
1144
  fileVersions?: {
1145
- path: string;
1146
1145
  content: string;
1146
+ path: string;
1147
1147
  }[][] | undefined;
1148
1148
  }>;
1149
1149
  messageHistory: z.ZodArray<z.ZodObject<{
@@ -1159,14 +1159,14 @@ export declare const PromptResponseSchema: z.ZodObject<{
1159
1159
  type: "ephemeral";
1160
1160
  }>>;
1161
1161
  }, "strip", z.ZodTypeAny, {
1162
- type: "text";
1163
1162
  text: string;
1163
+ type: "text";
1164
1164
  cache_control?: {
1165
1165
  type: "ephemeral";
1166
1166
  } | undefined;
1167
1167
  }, {
1168
- type: "text";
1169
1168
  text: string;
1169
+ type: "text";
1170
1170
  cache_control?: {
1171
1171
  type: "ephemeral";
1172
1172
  } | undefined;
@@ -1183,16 +1183,16 @@ export declare const PromptResponseSchema: z.ZodObject<{
1183
1183
  type: "ephemeral";
1184
1184
  }>>;
1185
1185
  }, "strip", z.ZodTypeAny, {
1186
- type: "tool_use";
1187
1186
  name: string;
1187
+ type: "tool_use";
1188
1188
  id: string;
1189
1189
  input: Record<string, any>;
1190
1190
  cache_control?: {
1191
1191
  type: "ephemeral";
1192
1192
  } | undefined;
1193
1193
  }, {
1194
- type: "tool_use";
1195
1194
  name: string;
1195
+ type: "tool_use";
1196
1196
  id: string;
1197
1197
  input: Record<string, any>;
1198
1198
  cache_control?: {
@@ -1210,15 +1210,15 @@ export declare const PromptResponseSchema: z.ZodObject<{
1210
1210
  type: "ephemeral";
1211
1211
  }>>;
1212
1212
  }, "strip", z.ZodTypeAny, {
1213
- type: "tool_result";
1214
1213
  content: string;
1214
+ type: "tool_result";
1215
1215
  tool_use_id: string;
1216
1216
  cache_control?: {
1217
1217
  type: "ephemeral";
1218
1218
  } | undefined;
1219
1219
  }, {
1220
- type: "tool_result";
1221
1220
  content: string;
1221
+ type: "tool_result";
1222
1222
  tool_use_id: string;
1223
1223
  cache_control?: {
1224
1224
  type: "ephemeral";
@@ -1230,13 +1230,13 @@ export declare const PromptResponseSchema: z.ZodObject<{
1230
1230
  media_type: z.ZodLiteral<"image/jpeg">;
1231
1231
  data: z.ZodString;
1232
1232
  }, "strip", z.ZodTypeAny, {
1233
+ data: string;
1233
1234
  type: "base64";
1234
1235
  media_type: "image/jpeg";
1235
- data: string;
1236
1236
  }, {
1237
+ data: string;
1237
1238
  type: "base64";
1238
1239
  media_type: "image/jpeg";
1239
- data: string;
1240
1240
  }>;
1241
1241
  cache_control: z.ZodOptional<z.ZodObject<{
1242
1242
  type: z.ZodLiteral<"ephemeral">;
@@ -1248,9 +1248,9 @@ export declare const PromptResponseSchema: z.ZodObject<{
1248
1248
  }, "strip", z.ZodTypeAny, {
1249
1249
  type: "image";
1250
1250
  source: {
1251
+ data: string;
1251
1252
  type: "base64";
1252
1253
  media_type: "image/jpeg";
1253
- data: string;
1254
1254
  };
1255
1255
  cache_control?: {
1256
1256
  type: "ephemeral";
@@ -1258,9 +1258,9 @@ export declare const PromptResponseSchema: z.ZodObject<{
1258
1258
  }, {
1259
1259
  type: "image";
1260
1260
  source: {
1261
+ data: string;
1261
1262
  type: "base64";
1262
1263
  media_type: "image/jpeg";
1263
- data: string;
1264
1264
  };
1265
1265
  cache_control?: {
1266
1266
  type: "ephemeral";
@@ -1268,22 +1268,22 @@ export declare const PromptResponseSchema: z.ZodObject<{
1268
1268
  }>]>, "many">]>;
1269
1269
  }, "strip", z.ZodTypeAny, {
1270
1270
  content: string | ({
1271
- type: "text";
1272
1271
  text: string;
1272
+ type: "text";
1273
1273
  cache_control?: {
1274
1274
  type: "ephemeral";
1275
1275
  } | undefined;
1276
1276
  } | {
1277
- type: "tool_use";
1278
1277
  name: string;
1278
+ type: "tool_use";
1279
1279
  id: string;
1280
1280
  input: Record<string, any>;
1281
1281
  cache_control?: {
1282
1282
  type: "ephemeral";
1283
1283
  } | undefined;
1284
1284
  } | {
1285
- type: "tool_result";
1286
1285
  content: string;
1286
+ type: "tool_result";
1287
1287
  tool_use_id: string;
1288
1288
  cache_control?: {
1289
1289
  type: "ephemeral";
@@ -1291,9 +1291,9 @@ export declare const PromptResponseSchema: z.ZodObject<{
1291
1291
  } | {
1292
1292
  type: "image";
1293
1293
  source: {
1294
+ data: string;
1294
1295
  type: "base64";
1295
1296
  media_type: "image/jpeg";
1296
- data: string;
1297
1297
  };
1298
1298
  cache_control?: {
1299
1299
  type: "ephemeral";
@@ -1302,22 +1302,22 @@ export declare const PromptResponseSchema: z.ZodObject<{
1302
1302
  role: "user" | "assistant";
1303
1303
  }, {
1304
1304
  content: string | ({
1305
- type: "text";
1306
1305
  text: string;
1306
+ type: "text";
1307
1307
  cache_control?: {
1308
1308
  type: "ephemeral";
1309
1309
  } | undefined;
1310
1310
  } | {
1311
- type: "tool_use";
1312
1311
  name: string;
1312
+ type: "tool_use";
1313
1313
  id: string;
1314
1314
  input: Record<string, any>;
1315
1315
  cache_control?: {
1316
1316
  type: "ephemeral";
1317
1317
  } | undefined;
1318
1318
  } | {
1319
- type: "tool_result";
1320
1319
  content: string;
1320
+ type: "tool_result";
1321
1321
  tool_use_id: string;
1322
1322
  cache_control?: {
1323
1323
  type: "ephemeral";
@@ -1325,9 +1325,9 @@ export declare const PromptResponseSchema: z.ZodObject<{
1325
1325
  } | {
1326
1326
  type: "image";
1327
1327
  source: {
1328
+ data: string;
1328
1329
  type: "base64";
1329
1330
  media_type: "image/jpeg";
1330
- data: string;
1331
1331
  };
1332
1332
  cache_control?: {
1333
1333
  type: "ephemeral";
@@ -1362,28 +1362,28 @@ export declare const PromptResponseSchema: z.ZodObject<{
1362
1362
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1363
1363
  userKnowledgeFiles?: Record<string, string> | undefined;
1364
1364
  fileVersions?: {
1365
- path: string;
1366
1365
  content: string;
1366
+ path: string;
1367
1367
  }[][] | undefined;
1368
1368
  };
1369
1369
  messageHistory: {
1370
1370
  content: string | ({
1371
- type: "text";
1372
1371
  text: string;
1372
+ type: "text";
1373
1373
  cache_control?: {
1374
1374
  type: "ephemeral";
1375
1375
  } | undefined;
1376
1376
  } | {
1377
- type: "tool_use";
1378
1377
  name: string;
1378
+ type: "tool_use";
1379
1379
  id: string;
1380
1380
  input: Record<string, any>;
1381
1381
  cache_control?: {
1382
1382
  type: "ephemeral";
1383
1383
  } | undefined;
1384
1384
  } | {
1385
- type: "tool_result";
1386
1385
  content: string;
1386
+ type: "tool_result";
1387
1387
  tool_use_id: string;
1388
1388
  cache_control?: {
1389
1389
  type: "ephemeral";
@@ -1391,9 +1391,9 @@ export declare const PromptResponseSchema: z.ZodObject<{
1391
1391
  } | {
1392
1392
  type: "image";
1393
1393
  source: {
1394
+ data: string;
1394
1395
  type: "base64";
1395
1396
  media_type: "image/jpeg";
1396
- data: string;
1397
1397
  };
1398
1398
  cache_control?: {
1399
1399
  type: "ephemeral";
@@ -1428,28 +1428,28 @@ export declare const PromptResponseSchema: z.ZodObject<{
1428
1428
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1429
1429
  userKnowledgeFiles?: Record<string, string> | undefined;
1430
1430
  fileVersions?: {
1431
- path: string;
1432
1431
  content: string;
1432
+ path: string;
1433
1433
  }[][] | undefined;
1434
1434
  };
1435
1435
  messageHistory: {
1436
1436
  content: string | ({
1437
- type: "text";
1438
1437
  text: string;
1438
+ type: "text";
1439
1439
  cache_control?: {
1440
1440
  type: "ephemeral";
1441
1441
  } | undefined;
1442
1442
  } | {
1443
- type: "tool_use";
1444
1443
  name: string;
1444
+ type: "tool_use";
1445
1445
  id: string;
1446
1446
  input: Record<string, any>;
1447
1447
  cache_control?: {
1448
1448
  type: "ephemeral";
1449
1449
  } | undefined;
1450
1450
  } | {
1451
- type: "tool_result";
1452
1451
  content: string;
1452
+ type: "tool_result";
1453
1453
  tool_use_id: string;
1454
1454
  cache_control?: {
1455
1455
  type: "ephemeral";
@@ -1457,9 +1457,9 @@ export declare const PromptResponseSchema: z.ZodObject<{
1457
1457
  } | {
1458
1458
  type: "image";
1459
1459
  source: {
1460
+ data: string;
1460
1461
  type: "base64";
1461
1462
  media_type: "image/jpeg";
1462
- data: string;
1463
1463
  };
1464
1464
  cache_control?: {
1465
1465
  type: "ephemeral";
@@ -1524,28 +1524,28 @@ export declare const PromptResponseSchema: z.ZodObject<{
1524
1524
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1525
1525
  userKnowledgeFiles?: Record<string, string> | undefined;
1526
1526
  fileVersions?: {
1527
- path: string;
1528
1527
  content: string;
1528
+ path: string;
1529
1529
  }[][] | undefined;
1530
1530
  };
1531
1531
  messageHistory: {
1532
1532
  content: string | ({
1533
- type: "text";
1534
1533
  text: string;
1534
+ type: "text";
1535
1535
  cache_control?: {
1536
1536
  type: "ephemeral";
1537
1537
  } | undefined;
1538
1538
  } | {
1539
- type: "tool_use";
1540
1539
  name: string;
1540
+ type: "tool_use";
1541
1541
  id: string;
1542
1542
  input: Record<string, any>;
1543
1543
  cache_control?: {
1544
1544
  type: "ephemeral";
1545
1545
  } | undefined;
1546
1546
  } | {
1547
- type: "tool_result";
1548
1547
  content: string;
1548
+ type: "tool_result";
1549
1549
  tool_use_id: string;
1550
1550
  cache_control?: {
1551
1551
  type: "ephemeral";
@@ -1553,9 +1553,9 @@ export declare const PromptResponseSchema: z.ZodObject<{
1553
1553
  } | {
1554
1554
  type: "image";
1555
1555
  source: {
1556
+ data: string;
1556
1557
  type: "base64";
1557
1558
  media_type: "image/jpeg";
1558
- data: string;
1559
1559
  };
1560
1560
  cache_control?: {
1561
1561
  type: "ephemeral";
@@ -1604,28 +1604,28 @@ export declare const PromptResponseSchema: z.ZodObject<{
1604
1604
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1605
1605
  userKnowledgeFiles?: Record<string, string> | undefined;
1606
1606
  fileVersions?: {
1607
- path: string;
1608
1607
  content: string;
1608
+ path: string;
1609
1609
  }[][] | undefined;
1610
1610
  };
1611
1611
  messageHistory: {
1612
1612
  content: string | ({
1613
- type: "text";
1614
1613
  text: string;
1614
+ type: "text";
1615
1615
  cache_control?: {
1616
1616
  type: "ephemeral";
1617
1617
  } | undefined;
1618
1618
  } | {
1619
- type: "tool_use";
1620
1619
  name: string;
1620
+ type: "tool_use";
1621
1621
  id: string;
1622
1622
  input: Record<string, any>;
1623
1623
  cache_control?: {
1624
1624
  type: "ephemeral";
1625
1625
  } | undefined;
1626
1626
  } | {
1627
- type: "tool_result";
1628
1627
  content: string;
1628
+ type: "tool_result";
1629
1629
  tool_use_id: string;
1630
1630
  cache_control?: {
1631
1631
  type: "ephemeral";
@@ -1633,9 +1633,9 @@ export declare const PromptResponseSchema: z.ZodObject<{
1633
1633
  } | {
1634
1634
  type: "image";
1635
1635
  source: {
1636
+ data: string;
1636
1637
  type: "base64";
1637
1638
  media_type: "image/jpeg";
1638
- data: string;
1639
1639
  };
1640
1640
  cache_control?: {
1641
1641
  type: "ephemeral";
@@ -1678,36 +1678,36 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1678
1678
  path: z.ZodString;
1679
1679
  content: z.ZodString;
1680
1680
  }, "strip", z.ZodTypeAny, {
1681
+ content: string;
1681
1682
  path: string;
1682
1683
  type: "patch" | "file";
1683
- content: string;
1684
1684
  }, {
1685
+ content: string;
1685
1686
  path: string;
1686
1687
  type: "patch" | "file";
1687
- content: string;
1688
1688
  }>, "many">;
1689
1689
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
1690
1690
  type: z.ZodEnum<["patch", "file"]>;
1691
1691
  path: z.ZodString;
1692
1692
  content: z.ZodString;
1693
1693
  }, "strip", z.ZodTypeAny, {
1694
+ content: string;
1694
1695
  path: string;
1695
1696
  type: "patch" | "file";
1696
- content: string;
1697
1697
  }, {
1698
+ content: string;
1698
1699
  path: string;
1699
1700
  type: "patch" | "file";
1700
- content: string;
1701
1701
  }>, "many">;
1702
1702
  addedFileVersions: z.ZodArray<z.ZodObject<{
1703
1703
  path: z.ZodString;
1704
1704
  content: z.ZodString;
1705
1705
  }, "strip", z.ZodTypeAny, {
1706
- path: string;
1707
1706
  content: string;
1708
- }, {
1709
1707
  path: string;
1708
+ }, {
1710
1709
  content: string;
1710
+ path: string;
1711
1711
  }>, "many">;
1712
1712
  resetFileVersions: z.ZodBoolean;
1713
1713
  }, {
@@ -1721,18 +1721,18 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1721
1721
  userInputId: string;
1722
1722
  response: string;
1723
1723
  changes: {
1724
+ content: string;
1724
1725
  path: string;
1725
1726
  type: "patch" | "file";
1726
- content: string;
1727
1727
  }[];
1728
1728
  changesAlreadyApplied: {
1729
+ content: string;
1729
1730
  path: string;
1730
1731
  type: "patch" | "file";
1731
- content: string;
1732
1732
  }[];
1733
1733
  addedFileVersions: {
1734
- path: string;
1735
1734
  content: string;
1735
+ path: string;
1736
1736
  }[];
1737
1737
  resetFileVersions: boolean;
1738
1738
  usage?: number | undefined;
@@ -1745,18 +1745,18 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1745
1745
  userInputId: string;
1746
1746
  response: string;
1747
1747
  changes: {
1748
+ content: string;
1748
1749
  path: string;
1749
1750
  type: "patch" | "file";
1750
- content: string;
1751
1751
  }[];
1752
1752
  changesAlreadyApplied: {
1753
+ content: string;
1753
1754
  path: string;
1754
1755
  type: "patch" | "file";
1755
- content: string;
1756
1756
  }[];
1757
1757
  addedFileVersions: {
1758
- path: string;
1759
1758
  content: string;
1759
+ path: string;
1760
1760
  }[];
1761
1761
  resetFileVersions: boolean;
1762
1762
  usage?: number | undefined;
@@ -1820,11 +1820,11 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1820
1820
  path: z.ZodString;
1821
1821
  content: z.ZodString;
1822
1822
  }, "strip", z.ZodTypeAny, {
1823
- path: string;
1824
1823
  content: string;
1825
- }, {
1826
1824
  path: string;
1825
+ }, {
1827
1826
  content: string;
1827
+ path: string;
1828
1828
  }>, "many">, "many">>;
1829
1829
  }, "strip", z.ZodTypeAny, {
1830
1830
  currentWorkingDirectory: string;
@@ -1850,8 +1850,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1850
1850
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1851
1851
  userKnowledgeFiles?: Record<string, string> | undefined;
1852
1852
  fileVersions?: {
1853
- path: string;
1854
1853
  content: string;
1854
+ path: string;
1855
1855
  }[][] | undefined;
1856
1856
  }, {
1857
1857
  currentWorkingDirectory: string;
@@ -1877,8 +1877,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1877
1877
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1878
1878
  userKnowledgeFiles?: Record<string, string> | undefined;
1879
1879
  fileVersions?: {
1880
- path: string;
1881
1880
  content: string;
1881
+ path: string;
1882
1882
  }[][] | undefined;
1883
1883
  }>;
1884
1884
  messageHistory: z.ZodArray<z.ZodObject<{
@@ -1894,14 +1894,14 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1894
1894
  type: "ephemeral";
1895
1895
  }>>;
1896
1896
  }, "strip", z.ZodTypeAny, {
1897
- type: "text";
1898
1897
  text: string;
1898
+ type: "text";
1899
1899
  cache_control?: {
1900
1900
  type: "ephemeral";
1901
1901
  } | undefined;
1902
1902
  }, {
1903
- type: "text";
1904
1903
  text: string;
1904
+ type: "text";
1905
1905
  cache_control?: {
1906
1906
  type: "ephemeral";
1907
1907
  } | undefined;
@@ -1918,16 +1918,16 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1918
1918
  type: "ephemeral";
1919
1919
  }>>;
1920
1920
  }, "strip", z.ZodTypeAny, {
1921
- type: "tool_use";
1922
1921
  name: string;
1922
+ type: "tool_use";
1923
1923
  id: string;
1924
1924
  input: Record<string, any>;
1925
1925
  cache_control?: {
1926
1926
  type: "ephemeral";
1927
1927
  } | undefined;
1928
1928
  }, {
1929
- type: "tool_use";
1930
1929
  name: string;
1930
+ type: "tool_use";
1931
1931
  id: string;
1932
1932
  input: Record<string, any>;
1933
1933
  cache_control?: {
@@ -1945,15 +1945,15 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1945
1945
  type: "ephemeral";
1946
1946
  }>>;
1947
1947
  }, "strip", z.ZodTypeAny, {
1948
- type: "tool_result";
1949
1948
  content: string;
1949
+ type: "tool_result";
1950
1950
  tool_use_id: string;
1951
1951
  cache_control?: {
1952
1952
  type: "ephemeral";
1953
1953
  } | undefined;
1954
1954
  }, {
1955
- type: "tool_result";
1956
1955
  content: string;
1956
+ type: "tool_result";
1957
1957
  tool_use_id: string;
1958
1958
  cache_control?: {
1959
1959
  type: "ephemeral";
@@ -1965,13 +1965,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1965
1965
  media_type: z.ZodLiteral<"image/jpeg">;
1966
1966
  data: z.ZodString;
1967
1967
  }, "strip", z.ZodTypeAny, {
1968
+ data: string;
1968
1969
  type: "base64";
1969
1970
  media_type: "image/jpeg";
1970
- data: string;
1971
1971
  }, {
1972
+ data: string;
1972
1973
  type: "base64";
1973
1974
  media_type: "image/jpeg";
1974
- data: string;
1975
1975
  }>;
1976
1976
  cache_control: z.ZodOptional<z.ZodObject<{
1977
1977
  type: z.ZodLiteral<"ephemeral">;
@@ -1983,9 +1983,9 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1983
1983
  }, "strip", z.ZodTypeAny, {
1984
1984
  type: "image";
1985
1985
  source: {
1986
+ data: string;
1986
1987
  type: "base64";
1987
1988
  media_type: "image/jpeg";
1988
- data: string;
1989
1989
  };
1990
1990
  cache_control?: {
1991
1991
  type: "ephemeral";
@@ -1993,9 +1993,9 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1993
1993
  }, {
1994
1994
  type: "image";
1995
1995
  source: {
1996
+ data: string;
1996
1997
  type: "base64";
1997
1998
  media_type: "image/jpeg";
1998
- data: string;
1999
1999
  };
2000
2000
  cache_control?: {
2001
2001
  type: "ephemeral";
@@ -2003,22 +2003,22 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2003
2003
  }>]>, "many">]>;
2004
2004
  }, "strip", z.ZodTypeAny, {
2005
2005
  content: string | ({
2006
- type: "text";
2007
2006
  text: string;
2007
+ type: "text";
2008
2008
  cache_control?: {
2009
2009
  type: "ephemeral";
2010
2010
  } | undefined;
2011
2011
  } | {
2012
- type: "tool_use";
2013
2012
  name: string;
2013
+ type: "tool_use";
2014
2014
  id: string;
2015
2015
  input: Record<string, any>;
2016
2016
  cache_control?: {
2017
2017
  type: "ephemeral";
2018
2018
  } | undefined;
2019
2019
  } | {
2020
- type: "tool_result";
2021
2020
  content: string;
2021
+ type: "tool_result";
2022
2022
  tool_use_id: string;
2023
2023
  cache_control?: {
2024
2024
  type: "ephemeral";
@@ -2026,9 +2026,9 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2026
2026
  } | {
2027
2027
  type: "image";
2028
2028
  source: {
2029
+ data: string;
2029
2030
  type: "base64";
2030
2031
  media_type: "image/jpeg";
2031
- data: string;
2032
2032
  };
2033
2033
  cache_control?: {
2034
2034
  type: "ephemeral";
@@ -2037,22 +2037,22 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2037
2037
  role: "user" | "assistant";
2038
2038
  }, {
2039
2039
  content: string | ({
2040
- type: "text";
2041
2040
  text: string;
2041
+ type: "text";
2042
2042
  cache_control?: {
2043
2043
  type: "ephemeral";
2044
2044
  } | undefined;
2045
2045
  } | {
2046
- type: "tool_use";
2047
2046
  name: string;
2047
+ type: "tool_use";
2048
2048
  id: string;
2049
2049
  input: Record<string, any>;
2050
2050
  cache_control?: {
2051
2051
  type: "ephemeral";
2052
2052
  } | undefined;
2053
2053
  } | {
2054
- type: "tool_result";
2055
2054
  content: string;
2055
+ type: "tool_result";
2056
2056
  tool_use_id: string;
2057
2057
  cache_control?: {
2058
2058
  type: "ephemeral";
@@ -2060,9 +2060,9 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2060
2060
  } | {
2061
2061
  type: "image";
2062
2062
  source: {
2063
+ data: string;
2063
2064
  type: "base64";
2064
2065
  media_type: "image/jpeg";
2065
- data: string;
2066
2066
  };
2067
2067
  cache_control?: {
2068
2068
  type: "ephemeral";
@@ -2097,28 +2097,28 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2097
2097
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
2098
2098
  userKnowledgeFiles?: Record<string, string> | undefined;
2099
2099
  fileVersions?: {
2100
- path: string;
2101
2100
  content: string;
2101
+ path: string;
2102
2102
  }[][] | undefined;
2103
2103
  };
2104
2104
  messageHistory: {
2105
2105
  content: string | ({
2106
- type: "text";
2107
2106
  text: string;
2107
+ type: "text";
2108
2108
  cache_control?: {
2109
2109
  type: "ephemeral";
2110
2110
  } | undefined;
2111
2111
  } | {
2112
- type: "tool_use";
2113
2112
  name: string;
2113
+ type: "tool_use";
2114
2114
  id: string;
2115
2115
  input: Record<string, any>;
2116
2116
  cache_control?: {
2117
2117
  type: "ephemeral";
2118
2118
  } | undefined;
2119
2119
  } | {
2120
- type: "tool_result";
2121
2120
  content: string;
2121
+ type: "tool_result";
2122
2122
  tool_use_id: string;
2123
2123
  cache_control?: {
2124
2124
  type: "ephemeral";
@@ -2126,9 +2126,9 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2126
2126
  } | {
2127
2127
  type: "image";
2128
2128
  source: {
2129
+ data: string;
2129
2130
  type: "base64";
2130
2131
  media_type: "image/jpeg";
2131
- data: string;
2132
2132
  };
2133
2133
  cache_control?: {
2134
2134
  type: "ephemeral";
@@ -2163,28 +2163,28 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2163
2163
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
2164
2164
  userKnowledgeFiles?: Record<string, string> | undefined;
2165
2165
  fileVersions?: {
2166
- path: string;
2167
2166
  content: string;
2167
+ path: string;
2168
2168
  }[][] | undefined;
2169
2169
  };
2170
2170
  messageHistory: {
2171
2171
  content: string | ({
2172
- type: "text";
2173
2172
  text: string;
2173
+ type: "text";
2174
2174
  cache_control?: {
2175
2175
  type: "ephemeral";
2176
2176
  } | undefined;
2177
2177
  } | {
2178
- type: "tool_use";
2179
2178
  name: string;
2179
+ type: "tool_use";
2180
2180
  id: string;
2181
2181
  input: Record<string, any>;
2182
2182
  cache_control?: {
2183
2183
  type: "ephemeral";
2184
2184
  } | undefined;
2185
2185
  } | {
2186
- type: "tool_result";
2187
2186
  content: string;
2187
+ type: "tool_result";
2188
2188
  tool_use_id: string;
2189
2189
  cache_control?: {
2190
2190
  type: "ephemeral";
@@ -2192,9 +2192,9 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2192
2192
  } | {
2193
2193
  type: "image";
2194
2194
  source: {
2195
+ data: string;
2195
2196
  type: "base64";
2196
2197
  media_type: "image/jpeg";
2197
- data: string;
2198
2198
  };
2199
2199
  cache_control?: {
2200
2200
  type: "ephemeral";
@@ -2259,28 +2259,28 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2259
2259
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
2260
2260
  userKnowledgeFiles?: Record<string, string> | undefined;
2261
2261
  fileVersions?: {
2262
- path: string;
2263
2262
  content: string;
2263
+ path: string;
2264
2264
  }[][] | undefined;
2265
2265
  };
2266
2266
  messageHistory: {
2267
2267
  content: string | ({
2268
- type: "text";
2269
2268
  text: string;
2269
+ type: "text";
2270
2270
  cache_control?: {
2271
2271
  type: "ephemeral";
2272
2272
  } | undefined;
2273
2273
  } | {
2274
- type: "tool_use";
2275
2274
  name: string;
2275
+ type: "tool_use";
2276
2276
  id: string;
2277
2277
  input: Record<string, any>;
2278
2278
  cache_control?: {
2279
2279
  type: "ephemeral";
2280
2280
  } | undefined;
2281
2281
  } | {
2282
- type: "tool_result";
2283
2282
  content: string;
2283
+ type: "tool_result";
2284
2284
  tool_use_id: string;
2285
2285
  cache_control?: {
2286
2286
  type: "ephemeral";
@@ -2288,9 +2288,9 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2288
2288
  } | {
2289
2289
  type: "image";
2290
2290
  source: {
2291
+ data: string;
2291
2292
  type: "base64";
2292
2293
  media_type: "image/jpeg";
2293
- data: string;
2294
2294
  };
2295
2295
  cache_control?: {
2296
2296
  type: "ephemeral";
@@ -2339,28 +2339,28 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2339
2339
  tokenCallers?: Record<string, Record<string, string[]>> | undefined;
2340
2340
  userKnowledgeFiles?: Record<string, string> | undefined;
2341
2341
  fileVersions?: {
2342
- path: string;
2343
2342
  content: string;
2343
+ path: string;
2344
2344
  }[][] | undefined;
2345
2345
  };
2346
2346
  messageHistory: {
2347
2347
  content: string | ({
2348
- type: "text";
2349
2348
  text: string;
2349
+ type: "text";
2350
2350
  cache_control?: {
2351
2351
  type: "ephemeral";
2352
2352
  } | undefined;
2353
2353
  } | {
2354
- type: "tool_use";
2355
2354
  name: string;
2355
+ type: "tool_use";
2356
2356
  id: string;
2357
2357
  input: Record<string, any>;
2358
2358
  cache_control?: {
2359
2359
  type: "ephemeral";
2360
2360
  } | undefined;
2361
2361
  } | {
2362
- type: "tool_result";
2363
2362
  content: string;
2363
+ type: "tool_result";
2364
2364
  tool_use_id: string;
2365
2365
  cache_control?: {
2366
2366
  type: "ephemeral";
@@ -2368,9 +2368,9 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2368
2368
  } | {
2369
2369
  type: "image";
2370
2370
  source: {
2371
+ data: string;
2371
2372
  type: "base64";
2372
2373
  media_type: "image/jpeg";
2373
- data: string;
2374
2374
  };
2375
2375
  cache_control?: {
2376
2376
  type: "ephemeral";
@@ -2424,84 +2424,84 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2424
2424
  path: z.ZodString;
2425
2425
  content: z.ZodString;
2426
2426
  }, "strip", z.ZodTypeAny, {
2427
+ content: string;
2427
2428
  path: string;
2428
2429
  type: "patch" | "file";
2429
- content: string;
2430
2430
  }, {
2431
+ content: string;
2431
2432
  path: string;
2432
2433
  type: "patch" | "file";
2433
- content: string;
2434
2434
  }>, "many">;
2435
2435
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
2436
2436
  type: z.ZodEnum<["patch", "file"]>;
2437
2437
  path: z.ZodString;
2438
2438
  content: z.ZodString;
2439
2439
  }, "strip", z.ZodTypeAny, {
2440
+ content: string;
2440
2441
  path: string;
2441
2442
  type: "patch" | "file";
2442
- content: string;
2443
2443
  }, {
2444
+ content: string;
2444
2445
  path: string;
2445
2446
  type: "patch" | "file";
2446
- content: string;
2447
2447
  }>, "many">;
2448
2448
  addedFileVersions: z.ZodArray<z.ZodObject<{
2449
2449
  path: z.ZodString;
2450
2450
  content: z.ZodString;
2451
2451
  }, "strip", z.ZodTypeAny, {
2452
- path: string;
2453
2452
  content: string;
2454
- }, {
2455
2453
  path: string;
2454
+ }, {
2456
2455
  content: string;
2456
+ path: string;
2457
2457
  }>, "many">;
2458
2458
  resetFileVersions: z.ZodBoolean;
2459
2459
  }, "strip", z.ZodTypeAny, {
2460
- type: "tool-call";
2461
2460
  data: {
2462
2461
  name: string;
2463
2462
  id: string;
2464
2463
  input: Record<string, any>;
2465
2464
  };
2465
+ type: "tool-call";
2466
2466
  userInputId: string;
2467
2467
  response: string;
2468
2468
  changes: {
2469
+ content: string;
2469
2470
  path: string;
2470
2471
  type: "patch" | "file";
2471
- content: string;
2472
2472
  }[];
2473
2473
  changesAlreadyApplied: {
2474
+ content: string;
2474
2475
  path: string;
2475
2476
  type: "patch" | "file";
2476
- content: string;
2477
2477
  }[];
2478
2478
  addedFileVersions: {
2479
- path: string;
2480
2479
  content: string;
2480
+ path: string;
2481
2481
  }[];
2482
2482
  resetFileVersions: boolean;
2483
2483
  }, {
2484
- type: "tool-call";
2485
2484
  data: {
2486
2485
  name: string;
2487
2486
  id: string;
2488
2487
  input: Record<string, any>;
2489
2488
  };
2489
+ type: "tool-call";
2490
2490
  userInputId: string;
2491
2491
  response: string;
2492
2492
  changes: {
2493
+ content: string;
2493
2494
  path: string;
2494
2495
  type: "patch" | "file";
2495
- content: string;
2496
2496
  }[];
2497
2497
  changesAlreadyApplied: {
2498
+ content: string;
2498
2499
  path: string;
2499
2500
  type: "patch" | "file";
2500
- content: string;
2501
2501
  }[];
2502
2502
  addedFileVersions: {
2503
- path: string;
2504
2503
  content: string;
2504
+ path: string;
2505
2505
  }[];
2506
2506
  resetFileVersions: boolean;
2507
2507
  }>, z.ZodObject<{
@@ -2590,13 +2590,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2590
2590
  error: z.ZodOptional<z.ZodString>;
2591
2591
  remainingBalance: z.ZodOptional<z.ZodNumber>;
2592
2592
  }, "strip", z.ZodTypeAny, {
2593
- message: string;
2594
2593
  type: "action-error";
2594
+ message: string;
2595
2595
  error?: string | undefined;
2596
2596
  remainingBalance?: number | undefined;
2597
2597
  }, {
2598
- message: string;
2599
2598
  type: "action-error";
2599
+ message: string;
2600
2600
  error?: string | undefined;
2601
2601
  remainingBalance?: number | undefined;
2602
2602
  }>, z.ZodObject<{