codebuff 1.0.150 → 1.0.151

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 (74) hide show
  1. package/dist/__tests__/browser-runner.test.d.ts +1 -0
  2. package/dist/__tests__/browser-runner.test.js +15 -0
  3. package/dist/__tests__/browser-runner.test.js.map +1 -0
  4. package/dist/browser-runner.d.ts +34 -0
  5. package/dist/browser-runner.js +622 -0
  6. package/dist/browser-runner.js.map +1 -0
  7. package/dist/chat-storage.d.ts +2 -4
  8. package/dist/chat-storage.js +79 -46
  9. package/dist/chat-storage.js.map +1 -1
  10. package/dist/cli.js +7 -17
  11. package/dist/cli.js.map +1 -1
  12. package/dist/client.d.ts +5 -4
  13. package/dist/client.js +24 -18
  14. package/dist/client.js.map +1 -1
  15. package/dist/code-map/languages.js +7 -17
  16. package/dist/code-map/languages.js.map +1 -1
  17. package/dist/code-map/parse.js +7 -17
  18. package/dist/code-map/parse.js.map +1 -1
  19. package/dist/code-map/tsconfig.tsbuildinfo +1 -1
  20. package/dist/common/actions.d.ts +301 -106
  21. package/dist/common/actions.js +17 -0
  22. package/dist/common/actions.js.map +1 -1
  23. package/dist/common/advanced-analyzer.d.ts +19 -0
  24. package/dist/common/advanced-analyzer.js +140 -0
  25. package/dist/common/advanced-analyzer.js.map +1 -0
  26. package/dist/common/browser-actions.d.ts +59 -114
  27. package/dist/common/browser-actions.js +2 -4
  28. package/dist/common/browser-actions.js.map +1 -1
  29. package/dist/common/constants.d.ts +7 -0
  30. package/dist/common/constants.js +1 -0
  31. package/dist/common/constants.js.map +1 -1
  32. package/dist/common/message-image-handling.d.ts +41 -0
  33. package/dist/common/message-image-handling.js +57 -0
  34. package/dist/common/message-image-handling.js.map +1 -0
  35. package/dist/common/project-file-tree.js +7 -7
  36. package/dist/common/project-file-tree.js.map +1 -1
  37. package/dist/common/types/usage.d.ts +2 -2
  38. package/dist/common/util/credentials.d.ts +2 -2
  39. package/dist/common/util/string.d.ts +10 -0
  40. package/dist/common/util/string.js +29 -1
  41. package/dist/common/util/string.js.map +1 -1
  42. package/dist/common/websockets/websocket-schema.d.ts +478 -244
  43. package/dist/create-template-project.js +7 -17
  44. package/dist/create-template-project.js.map +1 -1
  45. package/dist/credentials.d.ts +1 -0
  46. package/dist/credentials.js +7 -3
  47. package/dist/credentials.js.map +1 -1
  48. package/dist/index.js +1 -1
  49. package/dist/menu.js +7 -17
  50. package/dist/menu.js.map +1 -1
  51. package/dist/project-files.d.ts +3 -0
  52. package/dist/project-files.js +41 -19
  53. package/dist/project-files.js.map +1 -1
  54. package/dist/tool-handlers.d.ts +3 -1
  55. package/dist/tool-handlers.js +59 -6
  56. package/dist/tool-handlers.js.map +1 -1
  57. package/dist/utils/terminal.js +7 -17
  58. package/dist/utils/terminal.js.map +1 -1
  59. package/package.json +4 -3
  60. package/dist/common/logger.d.ts +0 -1
  61. package/dist/common/logger.js +0 -7
  62. package/dist/common/logger.js.map +0 -1
  63. package/dist/common/util/constants.d.ts +0 -1
  64. package/dist/common/util/constants.js +0 -7
  65. package/dist/common/util/constants.js.map +0 -1
  66. package/dist/common/util/helpers.d.ts +0 -1
  67. package/dist/common/util/helpers.js +0 -6
  68. package/dist/common/util/helpers.js.map +0 -1
  69. package/dist/common/util/messages.d.ts +0 -1
  70. package/dist/common/util/messages.js +0 -7
  71. package/dist/common/util/messages.js.map +0 -1
  72. package/dist/common/util/token-counter.d.ts +0 -3
  73. package/dist/common/util/token-counter.js +0 -27
  74. package/dist/common/util/token-counter.js.map +0 -1
@@ -61,19 +61,61 @@ declare const MessageContentObjectSchema: z.ZodUnion<[z.ZodObject<{
61
61
  type: "ephemeral";
62
62
  }>>;
63
63
  }, "strip", z.ZodTypeAny, {
64
- content: string;
65
64
  type: "tool_result";
65
+ content: string;
66
66
  tool_use_id: string;
67
67
  cache_control?: {
68
68
  type: "ephemeral";
69
69
  } | undefined;
70
70
  }, {
71
- content: string;
72
71
  type: "tool_result";
72
+ content: string;
73
73
  tool_use_id: string;
74
74
  cache_control?: {
75
75
  type: "ephemeral";
76
76
  } | undefined;
77
+ }>, z.ZodObject<{
78
+ type: z.ZodLiteral<"image">;
79
+ source: z.ZodObject<{
80
+ type: z.ZodLiteral<"base64">;
81
+ media_type: z.ZodLiteral<"image/jpeg">;
82
+ data: z.ZodString;
83
+ }, "strip", z.ZodTypeAny, {
84
+ type: "base64";
85
+ media_type: "image/jpeg";
86
+ data: string;
87
+ }, {
88
+ type: "base64";
89
+ media_type: "image/jpeg";
90
+ data: string;
91
+ }>;
92
+ cache_control: z.ZodOptional<z.ZodObject<{
93
+ type: z.ZodLiteral<"ephemeral">;
94
+ }, "strip", z.ZodTypeAny, {
95
+ type: "ephemeral";
96
+ }, {
97
+ type: "ephemeral";
98
+ }>>;
99
+ }, "strip", z.ZodTypeAny, {
100
+ type: "image";
101
+ source: {
102
+ type: "base64";
103
+ media_type: "image/jpeg";
104
+ data: string;
105
+ };
106
+ cache_control?: {
107
+ type: "ephemeral";
108
+ } | undefined;
109
+ }, {
110
+ type: "image";
111
+ source: {
112
+ type: "base64";
113
+ media_type: "image/jpeg";
114
+ data: string;
115
+ };
116
+ cache_control?: {
117
+ type: "ephemeral";
118
+ } | undefined;
77
119
  }>]>;
78
120
  declare const MessageSchema: z.ZodObject<{
79
121
  role: z.ZodUnion<[z.ZodLiteral<"user">, z.ZodLiteral<"assistant">]>;
@@ -139,19 +181,61 @@ declare const MessageSchema: z.ZodObject<{
139
181
  type: "ephemeral";
140
182
  }>>;
141
183
  }, "strip", z.ZodTypeAny, {
142
- content: string;
143
184
  type: "tool_result";
185
+ content: string;
144
186
  tool_use_id: string;
145
187
  cache_control?: {
146
188
  type: "ephemeral";
147
189
  } | undefined;
148
190
  }, {
149
- content: string;
150
191
  type: "tool_result";
192
+ content: string;
151
193
  tool_use_id: string;
152
194
  cache_control?: {
153
195
  type: "ephemeral";
154
196
  } | undefined;
197
+ }>, z.ZodObject<{
198
+ type: z.ZodLiteral<"image">;
199
+ source: z.ZodObject<{
200
+ type: z.ZodLiteral<"base64">;
201
+ media_type: z.ZodLiteral<"image/jpeg">;
202
+ data: z.ZodString;
203
+ }, "strip", z.ZodTypeAny, {
204
+ type: "base64";
205
+ media_type: "image/jpeg";
206
+ data: string;
207
+ }, {
208
+ type: "base64";
209
+ media_type: "image/jpeg";
210
+ data: string;
211
+ }>;
212
+ cache_control: z.ZodOptional<z.ZodObject<{
213
+ type: z.ZodLiteral<"ephemeral">;
214
+ }, "strip", z.ZodTypeAny, {
215
+ type: "ephemeral";
216
+ }, {
217
+ type: "ephemeral";
218
+ }>>;
219
+ }, "strip", z.ZodTypeAny, {
220
+ type: "image";
221
+ source: {
222
+ type: "base64";
223
+ media_type: "image/jpeg";
224
+ data: string;
225
+ };
226
+ cache_control?: {
227
+ type: "ephemeral";
228
+ } | undefined;
229
+ }, {
230
+ type: "image";
231
+ source: {
232
+ type: "base64";
233
+ media_type: "image/jpeg";
234
+ data: string;
235
+ };
236
+ cache_control?: {
237
+ type: "ephemeral";
238
+ } | undefined;
155
239
  }>]>, "many">]>;
156
240
  }, "strip", z.ZodTypeAny, {
157
241
  content: string | ({
@@ -169,12 +253,22 @@ declare const MessageSchema: z.ZodObject<{
169
253
  type: "ephemeral";
170
254
  } | undefined;
171
255
  } | {
172
- content: string;
173
256
  type: "tool_result";
257
+ content: string;
174
258
  tool_use_id: string;
175
259
  cache_control?: {
176
260
  type: "ephemeral";
177
261
  } | undefined;
262
+ } | {
263
+ type: "image";
264
+ source: {
265
+ type: "base64";
266
+ media_type: "image/jpeg";
267
+ data: string;
268
+ };
269
+ cache_control?: {
270
+ type: "ephemeral";
271
+ } | undefined;
178
272
  })[];
179
273
  role: "user" | "assistant";
180
274
  }, {
@@ -193,12 +287,22 @@ declare const MessageSchema: z.ZodObject<{
193
287
  type: "ephemeral";
194
288
  } | undefined;
195
289
  } | {
196
- content: string;
197
290
  type: "tool_result";
291
+ content: string;
198
292
  tool_use_id: string;
199
293
  cache_control?: {
200
294
  type: "ephemeral";
201
295
  } | undefined;
296
+ } | {
297
+ type: "image";
298
+ source: {
299
+ type: "base64";
300
+ media_type: "image/jpeg";
301
+ data: string;
302
+ };
303
+ cache_control?: {
304
+ type: "ephemeral";
305
+ } | undefined;
202
306
  })[];
203
307
  role: "user" | "assistant";
204
308
  }>;
@@ -209,13 +313,13 @@ export declare const FileChangeSchema: z.ZodObject<{
209
313
  filePath: z.ZodString;
210
314
  content: z.ZodString;
211
315
  }, "strip", z.ZodTypeAny, {
212
- content: string;
213
- type: "file" | "patch";
316
+ type: "patch" | "file";
214
317
  filePath: string;
215
- }, {
216
318
  content: string;
217
- type: "file" | "patch";
319
+ }, {
320
+ type: "patch" | "file";
218
321
  filePath: string;
322
+ content: string;
219
323
  }>;
220
324
  export type FileChange = z.infer<typeof FileChangeSchema>;
221
325
  export declare const CHANGES: z.ZodArray<z.ZodObject<{
@@ -223,13 +327,13 @@ export declare const CHANGES: z.ZodArray<z.ZodObject<{
223
327
  filePath: z.ZodString;
224
328
  content: z.ZodString;
225
329
  }, "strip", z.ZodTypeAny, {
226
- content: string;
227
- type: "file" | "patch";
330
+ type: "patch" | "file";
228
331
  filePath: string;
229
- }, {
230
332
  content: string;
231
- type: "file" | "patch";
333
+ }, {
334
+ type: "patch" | "file";
232
335
  filePath: string;
336
+ content: string;
233
337
  }>, "many">;
234
338
  export type FileChanges = z.infer<typeof CHANGES>;
235
339
  export declare const ToolCallSchema: z.ZodObject<{
@@ -315,19 +419,61 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
315
419
  type: "ephemeral";
316
420
  }>>;
317
421
  }, "strip", z.ZodTypeAny, {
318
- content: string;
319
422
  type: "tool_result";
423
+ content: string;
320
424
  tool_use_id: string;
321
425
  cache_control?: {
322
426
  type: "ephemeral";
323
427
  } | undefined;
324
428
  }, {
325
- content: string;
326
429
  type: "tool_result";
430
+ content: string;
327
431
  tool_use_id: string;
328
432
  cache_control?: {
329
433
  type: "ephemeral";
330
434
  } | undefined;
435
+ }>, z.ZodObject<{
436
+ type: z.ZodLiteral<"image">;
437
+ source: z.ZodObject<{
438
+ type: z.ZodLiteral<"base64">;
439
+ media_type: z.ZodLiteral<"image/jpeg">;
440
+ data: z.ZodString;
441
+ }, "strip", z.ZodTypeAny, {
442
+ type: "base64";
443
+ media_type: "image/jpeg";
444
+ data: string;
445
+ }, {
446
+ type: "base64";
447
+ media_type: "image/jpeg";
448
+ data: string;
449
+ }>;
450
+ cache_control: z.ZodOptional<z.ZodObject<{
451
+ type: z.ZodLiteral<"ephemeral">;
452
+ }, "strip", z.ZodTypeAny, {
453
+ type: "ephemeral";
454
+ }, {
455
+ type: "ephemeral";
456
+ }>>;
457
+ }, "strip", z.ZodTypeAny, {
458
+ type: "image";
459
+ source: {
460
+ type: "base64";
461
+ media_type: "image/jpeg";
462
+ data: string;
463
+ };
464
+ cache_control?: {
465
+ type: "ephemeral";
466
+ } | undefined;
467
+ }, {
468
+ type: "image";
469
+ source: {
470
+ type: "base64";
471
+ media_type: "image/jpeg";
472
+ data: string;
473
+ };
474
+ cache_control?: {
475
+ type: "ephemeral";
476
+ } | undefined;
331
477
  }>]>, "many">]>;
332
478
  }, "strip", z.ZodTypeAny, {
333
479
  content: string | ({
@@ -345,12 +491,22 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
345
491
  type: "ephemeral";
346
492
  } | undefined;
347
493
  } | {
348
- content: string;
349
494
  type: "tool_result";
495
+ content: string;
350
496
  tool_use_id: string;
351
497
  cache_control?: {
352
498
  type: "ephemeral";
353
499
  } | undefined;
500
+ } | {
501
+ type: "image";
502
+ source: {
503
+ type: "base64";
504
+ media_type: "image/jpeg";
505
+ data: string;
506
+ };
507
+ cache_control?: {
508
+ type: "ephemeral";
509
+ } | undefined;
354
510
  })[];
355
511
  role: "user" | "assistant";
356
512
  }, {
@@ -369,12 +525,22 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
369
525
  type: "ephemeral";
370
526
  } | undefined;
371
527
  } | {
372
- content: string;
373
528
  type: "tool_result";
529
+ content: string;
374
530
  tool_use_id: string;
375
531
  cache_control?: {
376
532
  type: "ephemeral";
377
533
  } | undefined;
534
+ } | {
535
+ type: "image";
536
+ source: {
537
+ type: "base64";
538
+ media_type: "image/jpeg";
539
+ data: string;
540
+ };
541
+ cache_control?: {
542
+ type: "ephemeral";
543
+ } | undefined;
378
544
  })[];
379
545
  role: "user" | "assistant";
380
546
  }>, "many">;
@@ -390,13 +556,13 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
390
556
  diffCached: z.ZodString;
391
557
  lastCommitMessages: z.ZodString;
392
558
  }, "strip", z.ZodTypeAny, {
393
- status: string;
394
559
  diff: string;
560
+ status: string;
395
561
  diffCached: string;
396
562
  lastCommitMessages: string;
397
563
  }, {
398
- status: string;
399
564
  diff: string;
565
+ status: string;
400
566
  diffCached: string;
401
567
  lastCommitMessages: string;
402
568
  }>;
@@ -440,8 +606,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
440
606
  fileTokenScores: Record<string, Record<string, number>>;
441
607
  knowledgeFiles: Record<string, string>;
442
608
  gitChanges: {
443
- status: string;
444
609
  diff: string;
610
+ status: string;
445
611
  diffCached: string;
446
612
  lastCommitMessages: string;
447
613
  };
@@ -466,8 +632,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
466
632
  fileTokenScores: Record<string, Record<string, number>>;
467
633
  knowledgeFiles: Record<string, string>;
468
634
  gitChanges: {
469
- status: string;
470
635
  diff: string;
636
+ status: string;
471
637
  diffCached: string;
472
638
  lastCommitMessages: string;
473
639
  };
@@ -492,13 +658,13 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
492
658
  filePath: z.ZodString;
493
659
  content: z.ZodString;
494
660
  }, "strip", z.ZodTypeAny, {
495
- content: string;
496
- type: "file" | "patch";
661
+ type: "patch" | "file";
497
662
  filePath: string;
498
- }, {
499
663
  content: string;
500
- type: "file" | "patch";
664
+ }, {
665
+ type: "patch" | "file";
501
666
  filePath: string;
667
+ content: string;
502
668
  }>, "many">;
503
669
  costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
504
670
  }, "strip", z.ZodTypeAny, {
@@ -521,12 +687,22 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
521
687
  type: "ephemeral";
522
688
  } | undefined;
523
689
  } | {
524
- content: string;
525
690
  type: "tool_result";
691
+ content: string;
526
692
  tool_use_id: string;
527
693
  cache_control?: {
528
694
  type: "ephemeral";
529
695
  } | undefined;
696
+ } | {
697
+ type: "image";
698
+ source: {
699
+ type: "base64";
700
+ media_type: "image/jpeg";
701
+ data: string;
702
+ };
703
+ cache_control?: {
704
+ type: "ephemeral";
705
+ } | undefined;
530
706
  })[];
531
707
  role: "user" | "assistant";
532
708
  }[];
@@ -536,8 +712,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
536
712
  fileTokenScores: Record<string, Record<string, number>>;
537
713
  knowledgeFiles: Record<string, string>;
538
714
  gitChanges: {
539
- status: string;
540
715
  diff: string;
716
+ status: string;
541
717
  diffCached: string;
542
718
  lastCommitMessages: string;
543
719
  };
@@ -558,11 +734,11 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
558
734
  userKnowledgeFiles?: Record<string, string> | undefined;
559
735
  };
560
736
  changesAlreadyApplied: {
561
- content: string;
562
- type: "file" | "patch";
737
+ type: "patch" | "file";
563
738
  filePath: string;
739
+ content: string;
564
740
  }[];
565
- costMode: "max" | "lite" | "normal";
741
+ costMode: "lite" | "normal" | "max";
566
742
  authToken?: string | undefined;
567
743
  }, {
568
744
  type: "user-input";
@@ -584,12 +760,22 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
584
760
  type: "ephemeral";
585
761
  } | undefined;
586
762
  } | {
587
- content: string;
588
763
  type: "tool_result";
764
+ content: string;
589
765
  tool_use_id: string;
590
766
  cache_control?: {
591
767
  type: "ephemeral";
592
768
  } | undefined;
769
+ } | {
770
+ type: "image";
771
+ source: {
772
+ type: "base64";
773
+ media_type: "image/jpeg";
774
+ data: string;
775
+ };
776
+ cache_control?: {
777
+ type: "ephemeral";
778
+ } | undefined;
593
779
  })[];
594
780
  role: "user" | "assistant";
595
781
  }[];
@@ -599,8 +785,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
599
785
  fileTokenScores: Record<string, Record<string, number>>;
600
786
  knowledgeFiles: Record<string, string>;
601
787
  gitChanges: {
602
- status: string;
603
788
  diff: string;
789
+ status: string;
604
790
  diffCached: string;
605
791
  lastCommitMessages: string;
606
792
  };
@@ -621,12 +807,12 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
621
807
  userKnowledgeFiles?: Record<string, string> | undefined;
622
808
  };
623
809
  changesAlreadyApplied: {
624
- content: string;
625
- type: "file" | "patch";
810
+ type: "patch" | "file";
626
811
  filePath: string;
812
+ content: string;
627
813
  }[];
628
814
  authToken?: string | undefined;
629
- costMode?: "max" | "lite" | "normal" | undefined;
815
+ costMode?: "lite" | "normal" | "max" | undefined;
630
816
  }>, z.ZodObject<{
631
817
  type: z.ZodLiteral<"read-files-response">;
632
818
  files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
@@ -652,13 +838,13 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
652
838
  diffCached: z.ZodString;
653
839
  lastCommitMessages: z.ZodString;
654
840
  }, "strip", z.ZodTypeAny, {
655
- status: string;
656
841
  diff: string;
842
+ status: string;
657
843
  diffCached: string;
658
844
  lastCommitMessages: string;
659
845
  }, {
660
- status: string;
661
846
  diff: string;
847
+ status: string;
662
848
  diffCached: string;
663
849
  lastCommitMessages: string;
664
850
  }>;
@@ -702,8 +888,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
702
888
  fileTokenScores: Record<string, Record<string, number>>;
703
889
  knowledgeFiles: Record<string, string>;
704
890
  gitChanges: {
705
- status: string;
706
891
  diff: string;
892
+ status: string;
707
893
  diffCached: string;
708
894
  lastCommitMessages: string;
709
895
  };
@@ -728,8 +914,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
728
914
  fileTokenScores: Record<string, Record<string, number>>;
729
915
  knowledgeFiles: Record<string, string>;
730
916
  gitChanges: {
731
- status: string;
732
917
  diff: string;
918
+ status: string;
733
919
  diffCached: string;
734
920
  lastCommitMessages: string;
735
921
  };
@@ -758,8 +944,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
758
944
  fileTokenScores: Record<string, Record<string, number>>;
759
945
  knowledgeFiles: Record<string, string>;
760
946
  gitChanges: {
761
- status: string;
762
947
  diff: string;
948
+ status: string;
763
949
  diffCached: string;
764
950
  lastCommitMessages: string;
765
951
  };
@@ -789,8 +975,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
789
975
  fileTokenScores: Record<string, Record<string, number>>;
790
976
  knowledgeFiles: Record<string, string>;
791
977
  gitChanges: {
792
- status: string;
793
978
  diff: string;
979
+ status: string;
794
980
  diffCached: string;
795
981
  lastCommitMessages: string;
796
982
  };
@@ -945,26 +1131,26 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
945
1131
  filePath: z.ZodString;
946
1132
  content: z.ZodString;
947
1133
  }, "strip", z.ZodTypeAny, {
948
- content: string;
949
- type: "file" | "patch";
1134
+ type: "patch" | "file";
950
1135
  filePath: string;
951
- }, {
952
1136
  content: string;
953
- type: "file" | "patch";
1137
+ }, {
1138
+ type: "patch" | "file";
954
1139
  filePath: string;
1140
+ content: string;
955
1141
  }>, "many">;
956
1142
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
957
1143
  type: z.ZodEnum<["patch", "file"]>;
958
1144
  filePath: z.ZodString;
959
1145
  content: z.ZodString;
960
1146
  }, "strip", z.ZodTypeAny, {
961
- content: string;
962
- type: "file" | "patch";
1147
+ type: "patch" | "file";
963
1148
  filePath: string;
964
- }, {
965
1149
  content: string;
966
- type: "file" | "patch";
1150
+ }, {
1151
+ type: "patch" | "file";
967
1152
  filePath: string;
1153
+ content: string;
968
1154
  }>, "many">;
969
1155
  addedFileVersions: z.ZodArray<z.ZodObject<{
970
1156
  path: z.ZodString;
@@ -988,15 +1174,15 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
988
1174
  type: "response-complete";
989
1175
  userInputId: string;
990
1176
  changesAlreadyApplied: {
991
- content: string;
992
- type: "file" | "patch";
1177
+ type: "patch" | "file";
993
1178
  filePath: string;
1179
+ content: string;
994
1180
  }[];
995
1181
  response: string;
996
1182
  changes: {
997
- content: string;
998
- type: "file" | "patch";
1183
+ type: "patch" | "file";
999
1184
  filePath: string;
1185
+ content: string;
1000
1186
  }[];
1001
1187
  addedFileVersions: {
1002
1188
  path: string;
@@ -1013,15 +1199,15 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
1013
1199
  type: "response-complete";
1014
1200
  userInputId: string;
1015
1201
  changesAlreadyApplied: {
1016
- content: string;
1017
- type: "file" | "patch";
1202
+ type: "patch" | "file";
1018
1203
  filePath: string;
1204
+ content: string;
1019
1205
  }[];
1020
1206
  response: string;
1021
1207
  changes: {
1022
- content: string;
1023
- type: "file" | "patch";
1208
+ type: "patch" | "file";
1024
1209
  filePath: string;
1210
+ content: string;
1025
1211
  }[];
1026
1212
  addedFileVersions: {
1027
1213
  path: string;
@@ -1036,6 +1222,15 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
1036
1222
  session_credits_used?: number | undefined;
1037
1223
  }>;
1038
1224
  export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1225
+ type: z.ZodLiteral<"read-files-response">;
1226
+ files: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
1227
+ }, "strip", z.ZodTypeAny, {
1228
+ type: "read-files-response";
1229
+ files: Record<string, string | null>;
1230
+ }, {
1231
+ type: "read-files-response";
1232
+ files: Record<string, string | null>;
1233
+ }>, z.ZodObject<{
1039
1234
  type: z.ZodLiteral<"response-chunk">;
1040
1235
  userInputId: z.ZodString;
1041
1236
  chunk: z.ZodString;
@@ -1056,26 +1251,26 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1056
1251
  filePath: z.ZodString;
1057
1252
  content: z.ZodString;
1058
1253
  }, "strip", z.ZodTypeAny, {
1059
- content: string;
1060
- type: "file" | "patch";
1254
+ type: "patch" | "file";
1061
1255
  filePath: string;
1062
- }, {
1063
1256
  content: string;
1064
- type: "file" | "patch";
1257
+ }, {
1258
+ type: "patch" | "file";
1065
1259
  filePath: string;
1260
+ content: string;
1066
1261
  }>, "many">;
1067
1262
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
1068
1263
  type: z.ZodEnum<["patch", "file"]>;
1069
1264
  filePath: z.ZodString;
1070
1265
  content: z.ZodString;
1071
1266
  }, "strip", z.ZodTypeAny, {
1072
- content: string;
1073
- type: "file" | "patch";
1267
+ type: "patch" | "file";
1074
1268
  filePath: string;
1075
- }, {
1076
1269
  content: string;
1077
- type: "file" | "patch";
1270
+ }, {
1271
+ type: "patch" | "file";
1078
1272
  filePath: string;
1273
+ content: string;
1079
1274
  }>, "many">;
1080
1275
  addedFileVersions: z.ZodArray<z.ZodObject<{
1081
1276
  path: z.ZodString;
@@ -1099,15 +1294,15 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1099
1294
  type: "response-complete";
1100
1295
  userInputId: string;
1101
1296
  changesAlreadyApplied: {
1102
- content: string;
1103
- type: "file" | "patch";
1297
+ type: "patch" | "file";
1104
1298
  filePath: string;
1299
+ content: string;
1105
1300
  }[];
1106
1301
  response: string;
1107
1302
  changes: {
1108
- content: string;
1109
- type: "file" | "patch";
1303
+ type: "patch" | "file";
1110
1304
  filePath: string;
1305
+ content: string;
1111
1306
  }[];
1112
1307
  addedFileVersions: {
1113
1308
  path: string;
@@ -1124,15 +1319,15 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1124
1319
  type: "response-complete";
1125
1320
  userInputId: string;
1126
1321
  changesAlreadyApplied: {
1127
- content: string;
1128
- type: "file" | "patch";
1322
+ type: "patch" | "file";
1129
1323
  filePath: string;
1324
+ content: string;
1130
1325
  }[];
1131
1326
  response: string;
1132
1327
  changes: {
1133
- content: string;
1134
- type: "file" | "patch";
1328
+ type: "patch" | "file";
1135
1329
  filePath: string;
1330
+ content: string;
1136
1331
  }[];
1137
1332
  addedFileVersions: {
1138
1333
  path: string;
@@ -1176,26 +1371,26 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1176
1371
  filePath: z.ZodString;
1177
1372
  content: z.ZodString;
1178
1373
  }, "strip", z.ZodTypeAny, {
1179
- content: string;
1180
- type: "file" | "patch";
1374
+ type: "patch" | "file";
1181
1375
  filePath: string;
1182
- }, {
1183
1376
  content: string;
1184
- type: "file" | "patch";
1377
+ }, {
1378
+ type: "patch" | "file";
1185
1379
  filePath: string;
1380
+ content: string;
1186
1381
  }>, "many">;
1187
1382
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
1188
1383
  type: z.ZodEnum<["patch", "file"]>;
1189
1384
  filePath: z.ZodString;
1190
1385
  content: z.ZodString;
1191
1386
  }, "strip", z.ZodTypeAny, {
1192
- content: string;
1193
- type: "file" | "patch";
1387
+ type: "patch" | "file";
1194
1388
  filePath: string;
1195
- }, {
1196
1389
  content: string;
1197
- type: "file" | "patch";
1390
+ }, {
1391
+ type: "patch" | "file";
1198
1392
  filePath: string;
1393
+ content: string;
1199
1394
  }>, "many">;
1200
1395
  addedFileVersions: z.ZodArray<z.ZodObject<{
1201
1396
  path: z.ZodString;
@@ -1211,51 +1406,51 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1211
1406
  }, "strip", z.ZodTypeAny, {
1212
1407
  type: "tool-call";
1213
1408
  userInputId: string;
1409
+ data: {
1410
+ name: string;
1411
+ id: string;
1412
+ input: Record<string, any>;
1413
+ };
1214
1414
  changesAlreadyApplied: {
1215
- content: string;
1216
- type: "file" | "patch";
1415
+ type: "patch" | "file";
1217
1416
  filePath: string;
1417
+ content: string;
1218
1418
  }[];
1219
1419
  response: string;
1220
1420
  changes: {
1221
- content: string;
1222
- type: "file" | "patch";
1421
+ type: "patch" | "file";
1223
1422
  filePath: string;
1423
+ content: string;
1224
1424
  }[];
1225
1425
  addedFileVersions: {
1226
1426
  path: string;
1227
1427
  content: string;
1228
1428
  }[];
1229
1429
  resetFileVersions: boolean;
1430
+ }, {
1431
+ type: "tool-call";
1432
+ userInputId: string;
1230
1433
  data: {
1231
1434
  name: string;
1232
1435
  id: string;
1233
1436
  input: Record<string, any>;
1234
1437
  };
1235
- }, {
1236
- type: "tool-call";
1237
- userInputId: string;
1238
1438
  changesAlreadyApplied: {
1239
- content: string;
1240
- type: "file" | "patch";
1439
+ type: "patch" | "file";
1241
1440
  filePath: string;
1441
+ content: string;
1242
1442
  }[];
1243
1443
  response: string;
1244
1444
  changes: {
1245
- content: string;
1246
- type: "file" | "patch";
1445
+ type: "patch" | "file";
1247
1446
  filePath: string;
1447
+ content: string;
1248
1448
  }[];
1249
1449
  addedFileVersions: {
1250
1450
  path: string;
1251
1451
  content: string;
1252
1452
  }[];
1253
1453
  resetFileVersions: boolean;
1254
- data: {
1255
- name: string;
1256
- id: string;
1257
- input: Record<string, any>;
1258
- };
1259
1454
  }>, z.ZodObject<{
1260
1455
  type: z.ZodLiteral<"terminal-command-result">;
1261
1456
  userInputId: z.ZodString;
@@ -1316,41 +1511,41 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1316
1511
  fingerprintId: z.ZodString;
1317
1512
  fingerprintHash: z.ZodString;
1318
1513
  }, "strip", z.ZodTypeAny, {
1319
- email: string;
1320
1514
  name: string | null;
1321
1515
  id: string;
1322
1516
  fingerprintId: string;
1323
1517
  authToken: string;
1518
+ email: string;
1324
1519
  fingerprintHash: string;
1325
1520
  }, {
1326
- email: string;
1327
1521
  name: string | null;
1328
1522
  id: string;
1329
1523
  fingerprintId: string;
1330
1524
  authToken: string;
1525
+ email: string;
1331
1526
  fingerprintHash: string;
1332
1527
  }>>;
1333
1528
  message: z.ZodString;
1334
1529
  }, "strip", z.ZodTypeAny, {
1335
- message: string;
1336
1530
  type: "auth-result";
1531
+ message: string;
1337
1532
  user?: {
1338
- email: string;
1339
1533
  name: string | null;
1340
1534
  id: string;
1341
1535
  fingerprintId: string;
1342
1536
  authToken: string;
1537
+ email: string;
1343
1538
  fingerprintHash: string;
1344
1539
  } | undefined;
1345
1540
  }, {
1346
- message: string;
1347
1541
  type: "auth-result";
1542
+ message: string;
1348
1543
  user?: {
1349
- email: string;
1350
1544
  name: string | null;
1351
1545
  id: string;
1352
1546
  fingerprintId: string;
1353
1547
  authToken: string;
1548
+ email: string;
1354
1549
  fingerprintHash: string;
1355
1550
  } | undefined;
1356
1551
  }>, z.ZodObject<{
@@ -1396,11 +1591,11 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1396
1591
  type: z.ZodLiteral<"action-error">;
1397
1592
  message: z.ZodString;
1398
1593
  }, "strip", z.ZodTypeAny, {
1399
- message: string;
1400
1594
  type: "action-error";
1401
- }, {
1402
1595
  message: string;
1596
+ }, {
1403
1597
  type: "action-error";
1598
+ message: string;
1404
1599
  }>, z.ZodObject<{
1405
1600
  type: z.ZodLiteral<"commit-message-response">;
1406
1601
  commitMessage: z.ZodString;