codecane 1.0.148 → 1.0.150

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 (55) hide show
  1. package/README.md +1 -1
  2. package/dist/__tests__/browser-runner.test.d.ts +1 -0
  3. package/dist/__tests__/browser-runner.test.js +15 -0
  4. package/dist/__tests__/browser-runner.test.js.map +1 -0
  5. package/dist/browser-runner.d.ts +33 -0
  6. package/dist/browser-runner.js +599 -0
  7. package/dist/browser-runner.js.map +1 -0
  8. package/dist/chat-storage.d.ts +2 -4
  9. package/dist/chat-storage.js +74 -44
  10. package/dist/chat-storage.js.map +1 -1
  11. package/dist/cli.d.ts +2 -1
  12. package/dist/cli.js +64 -22
  13. package/dist/cli.js.map +1 -1
  14. package/dist/client.d.ts +7 -3
  15. package/dist/client.js +55 -37
  16. package/dist/client.js.map +1 -1
  17. package/dist/code-map/languages.js +7 -17
  18. package/dist/code-map/languages.js.map +1 -1
  19. package/dist/code-map/parse.js +7 -17
  20. package/dist/code-map/parse.js.map +1 -1
  21. package/dist/code-map/tsconfig.tsbuildinfo +1 -1
  22. package/dist/common/actions.d.ts +100 -81
  23. package/dist/common/actions.js +4 -0
  24. package/dist/common/actions.js.map +1 -1
  25. package/dist/common/advanced-analyzer.d.ts +19 -0
  26. package/dist/common/advanced-analyzer.js +140 -0
  27. package/dist/common/advanced-analyzer.js.map +1 -0
  28. package/dist/common/browser-actions.d.ts +4335 -0
  29. package/dist/common/browser-actions.js +330 -0
  30. package/dist/common/browser-actions.js.map +1 -0
  31. package/dist/common/constants.d.ts +3 -1
  32. package/dist/common/constants.js +5 -3
  33. package/dist/common/constants.js.map +1 -1
  34. package/dist/common/util/credentials.d.ts +2 -2
  35. package/dist/common/util/file.d.ts +3 -0
  36. package/dist/common/util/file.js +1 -0
  37. package/dist/common/util/file.js.map +1 -1
  38. package/dist/common/websockets/websocket-schema.d.ts +216 -158
  39. package/dist/index.js +17 -22
  40. package/dist/index.js.map +1 -1
  41. package/dist/menu.d.ts +2 -0
  42. package/dist/menu.js +29 -18
  43. package/dist/menu.js.map +1 -1
  44. package/dist/project-files.d.ts +6 -0
  45. package/dist/project-files.js +64 -22
  46. package/dist/project-files.js.map +1 -1
  47. package/dist/tool-handlers.d.ts +1 -0
  48. package/dist/tool-handlers.js +67 -6
  49. package/dist/tool-handlers.js.map +1 -1
  50. package/dist/utils/terminal.js +15 -25
  51. package/dist/utils/terminal.js.map +1 -1
  52. package/package.json +4 -3
  53. package/dist/common/util/helpers.d.ts +0 -1
  54. package/dist/common/util/helpers.js +0 -6
  55. package/dist/common/util/helpers.js.map +0 -1
@@ -95,16 +95,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
95
95
  }>>;
96
96
  }, "strip", z.ZodTypeAny, {
97
97
  type: "tool_use";
98
- id: string;
99
98
  name: string;
99
+ id: string;
100
100
  input: Record<string, any>;
101
101
  cache_control?: {
102
102
  type: "ephemeral";
103
103
  } | undefined;
104
104
  }, {
105
105
  type: "tool_use";
106
- id: string;
107
106
  name: string;
107
+ id: string;
108
108
  input: Record<string, any>;
109
109
  cache_control?: {
110
110
  type: "ephemeral";
@@ -122,15 +122,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
122
122
  }>>;
123
123
  }, "strip", z.ZodTypeAny, {
124
124
  type: "tool_result";
125
- tool_use_id: string;
126
125
  content: string;
126
+ tool_use_id: string;
127
127
  cache_control?: {
128
128
  type: "ephemeral";
129
129
  } | undefined;
130
130
  }, {
131
131
  type: "tool_result";
132
- tool_use_id: string;
133
132
  content: string;
133
+ tool_use_id: string;
134
134
  cache_control?: {
135
135
  type: "ephemeral";
136
136
  } | undefined;
@@ -144,16 +144,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
144
144
  } | undefined;
145
145
  } | {
146
146
  type: "tool_use";
147
- id: string;
148
147
  name: string;
148
+ id: string;
149
149
  input: Record<string, any>;
150
150
  cache_control?: {
151
151
  type: "ephemeral";
152
152
  } | undefined;
153
153
  } | {
154
154
  type: "tool_result";
155
- tool_use_id: string;
156
155
  content: string;
156
+ tool_use_id: string;
157
157
  cache_control?: {
158
158
  type: "ephemeral";
159
159
  } | undefined;
@@ -168,16 +168,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
168
168
  } | undefined;
169
169
  } | {
170
170
  type: "tool_use";
171
- id: string;
172
171
  name: string;
172
+ id: string;
173
173
  input: Record<string, any>;
174
174
  cache_control?: {
175
175
  type: "ephemeral";
176
176
  } | undefined;
177
177
  } | {
178
178
  type: "tool_result";
179
- tool_use_id: string;
180
179
  content: string;
180
+ tool_use_id: string;
181
181
  cache_control?: {
182
182
  type: "ephemeral";
183
183
  } | undefined;
@@ -189,19 +189,20 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
189
189
  fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
190
190
  fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
191
191
  knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
192
+ userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
192
193
  gitChanges: z.ZodObject<{
193
194
  status: z.ZodString;
194
195
  diff: z.ZodString;
195
196
  diffCached: z.ZodString;
196
197
  lastCommitMessages: z.ZodString;
197
198
  }, "strip", z.ZodTypeAny, {
198
- diff: string;
199
199
  status: string;
200
+ diff: string;
200
201
  diffCached: string;
201
202
  lastCommitMessages: string;
202
203
  }, {
203
- diff: string;
204
204
  status: string;
205
+ diff: string;
205
206
  diffCached: string;
206
207
  lastCommitMessages: string;
207
208
  }>;
@@ -245,8 +246,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
245
246
  fileTokenScores: Record<string, Record<string, number>>;
246
247
  knowledgeFiles: Record<string, string>;
247
248
  gitChanges: {
248
- diff: string;
249
249
  status: string;
250
+ diff: string;
250
251
  diffCached: string;
251
252
  lastCommitMessages: string;
252
253
  };
@@ -264,14 +265,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
264
265
  path: string;
265
266
  content: string;
266
267
  }[][];
268
+ userKnowledgeFiles?: Record<string, string> | undefined;
267
269
  }, {
268
270
  currentWorkingDirectory: string;
269
271
  fileTree: import("../util/file").FileTreeNode[];
270
272
  fileTokenScores: Record<string, Record<string, number>>;
271
273
  knowledgeFiles: Record<string, string>;
272
274
  gitChanges: {
273
- diff: string;
274
275
  status: string;
276
+ diff: string;
275
277
  diffCached: string;
276
278
  lastCommitMessages: string;
277
279
  };
@@ -289,6 +291,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
289
291
  path: string;
290
292
  content: string;
291
293
  }[][];
294
+ userKnowledgeFiles?: Record<string, string> | undefined;
292
295
  }>;
293
296
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
294
297
  type: z.ZodEnum<["patch", "file"]>;
@@ -296,14 +299,14 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
296
299
  content: z.ZodString;
297
300
  }, "strip", z.ZodTypeAny, {
298
301
  type: "patch" | "file";
299
- content: string;
300
302
  filePath: string;
303
+ content: string;
301
304
  }, {
302
305
  type: "patch" | "file";
303
- content: string;
304
306
  filePath: string;
307
+ content: string;
305
308
  }>, "many">;
306
- costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "pro"]>>>;
309
+ costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
307
310
  }, "strip", z.ZodTypeAny, {
308
311
  type: "user-input";
309
312
  fingerprintId: string;
@@ -317,16 +320,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
317
320
  } | undefined;
318
321
  } | {
319
322
  type: "tool_use";
320
- id: string;
321
323
  name: string;
324
+ id: string;
322
325
  input: Record<string, any>;
323
326
  cache_control?: {
324
327
  type: "ephemeral";
325
328
  } | undefined;
326
329
  } | {
327
330
  type: "tool_result";
328
- tool_use_id: string;
329
331
  content: string;
332
+ tool_use_id: string;
330
333
  cache_control?: {
331
334
  type: "ephemeral";
332
335
  } | undefined;
@@ -339,8 +342,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
339
342
  fileTokenScores: Record<string, Record<string, number>>;
340
343
  knowledgeFiles: Record<string, string>;
341
344
  gitChanges: {
342
- diff: string;
343
345
  status: string;
346
+ diff: string;
344
347
  diffCached: string;
345
348
  lastCommitMessages: string;
346
349
  };
@@ -358,13 +361,14 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
358
361
  path: string;
359
362
  content: string;
360
363
  }[][];
364
+ userKnowledgeFiles?: Record<string, string> | undefined;
361
365
  };
362
366
  changesAlreadyApplied: {
363
367
  type: "patch" | "file";
364
- content: string;
365
368
  filePath: string;
369
+ content: string;
366
370
  }[];
367
- costMode: "lite" | "normal" | "pro";
371
+ costMode: "max" | "lite" | "normal";
368
372
  authToken?: string | undefined;
369
373
  }, {
370
374
  type: "user-input";
@@ -379,16 +383,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
379
383
  } | undefined;
380
384
  } | {
381
385
  type: "tool_use";
382
- id: string;
383
386
  name: string;
387
+ id: string;
384
388
  input: Record<string, any>;
385
389
  cache_control?: {
386
390
  type: "ephemeral";
387
391
  } | undefined;
388
392
  } | {
389
393
  type: "tool_result";
390
- tool_use_id: string;
391
394
  content: string;
395
+ tool_use_id: string;
392
396
  cache_control?: {
393
397
  type: "ephemeral";
394
398
  } | undefined;
@@ -401,8 +405,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
401
405
  fileTokenScores: Record<string, Record<string, number>>;
402
406
  knowledgeFiles: Record<string, string>;
403
407
  gitChanges: {
404
- diff: string;
405
408
  status: string;
409
+ diff: string;
406
410
  diffCached: string;
407
411
  lastCommitMessages: string;
408
412
  };
@@ -420,14 +424,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
420
424
  path: string;
421
425
  content: string;
422
426
  }[][];
427
+ userKnowledgeFiles?: Record<string, string> | undefined;
423
428
  };
424
429
  changesAlreadyApplied: {
425
430
  type: "patch" | "file";
426
- content: string;
427
431
  filePath: string;
432
+ content: string;
428
433
  }[];
429
434
  authToken?: string | undefined;
430
- costMode?: "lite" | "normal" | "pro" | undefined;
435
+ costMode?: "max" | "lite" | "normal" | undefined;
431
436
  }>, z.ZodObject<{
432
437
  type: z.ZodLiteral<"read-files-response">;
433
438
  files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
@@ -446,19 +451,20 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
446
451
  fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
447
452
  fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
448
453
  knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
454
+ userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
449
455
  gitChanges: z.ZodObject<{
450
456
  status: z.ZodString;
451
457
  diff: z.ZodString;
452
458
  diffCached: z.ZodString;
453
459
  lastCommitMessages: z.ZodString;
454
460
  }, "strip", z.ZodTypeAny, {
455
- diff: string;
456
461
  status: string;
462
+ diff: string;
457
463
  diffCached: string;
458
464
  lastCommitMessages: string;
459
465
  }, {
460
- diff: string;
461
466
  status: string;
467
+ diff: string;
462
468
  diffCached: string;
463
469
  lastCommitMessages: string;
464
470
  }>;
@@ -502,8 +508,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
502
508
  fileTokenScores: Record<string, Record<string, number>>;
503
509
  knowledgeFiles: Record<string, string>;
504
510
  gitChanges: {
505
- diff: string;
506
511
  status: string;
512
+ diff: string;
507
513
  diffCached: string;
508
514
  lastCommitMessages: string;
509
515
  };
@@ -521,14 +527,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
521
527
  path: string;
522
528
  content: string;
523
529
  }[][];
530
+ userKnowledgeFiles?: Record<string, string> | undefined;
524
531
  }, {
525
532
  currentWorkingDirectory: string;
526
533
  fileTree: import("../util/file").FileTreeNode[];
527
534
  fileTokenScores: Record<string, Record<string, number>>;
528
535
  knowledgeFiles: Record<string, string>;
529
536
  gitChanges: {
530
- diff: string;
531
537
  status: string;
538
+ diff: string;
532
539
  diffCached: string;
533
540
  lastCommitMessages: string;
534
541
  };
@@ -546,6 +553,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
546
553
  path: string;
547
554
  content: string;
548
555
  }[][];
556
+ userKnowledgeFiles?: Record<string, string> | undefined;
549
557
  }>;
550
558
  }, "strip", z.ZodTypeAny, {
551
559
  type: "init";
@@ -556,8 +564,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
556
564
  fileTokenScores: Record<string, Record<string, number>>;
557
565
  knowledgeFiles: Record<string, string>;
558
566
  gitChanges: {
559
- diff: string;
560
567
  status: string;
568
+ diff: string;
561
569
  diffCached: string;
562
570
  lastCommitMessages: string;
563
571
  };
@@ -575,6 +583,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
575
583
  path: string;
576
584
  content: string;
577
585
  }[][];
586
+ userKnowledgeFiles?: Record<string, string> | undefined;
578
587
  };
579
588
  authToken?: string | undefined;
580
589
  }, {
@@ -586,8 +595,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
586
595
  fileTokenScores: Record<string, Record<string, number>>;
587
596
  knowledgeFiles: Record<string, string>;
588
597
  gitChanges: {
589
- diff: string;
590
598
  status: string;
599
+ diff: string;
591
600
  diffCached: string;
592
601
  lastCommitMessages: string;
593
602
  };
@@ -605,6 +614,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
605
614
  path: string;
606
615
  content: string;
607
616
  }[][];
617
+ userKnowledgeFiles?: Record<string, string> | undefined;
608
618
  };
609
619
  authToken?: string | undefined;
610
620
  }>, z.ZodObject<{
@@ -692,16 +702,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
692
702
  } | undefined;
693
703
  } | {
694
704
  type: "tool_use";
695
- id: string;
696
705
  name: string;
706
+ id: string;
697
707
  input: Record<string, any>;
698
708
  cache_control?: {
699
709
  type: "ephemeral";
700
710
  } | undefined;
701
711
  } | {
702
712
  type: "tool_result";
703
- tool_use_id: string;
704
713
  content: string;
714
+ tool_use_id: string;
705
715
  cache_control?: {
706
716
  type: "ephemeral";
707
717
  } | undefined;
@@ -714,8 +724,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
714
724
  fileTokenScores: Record<string, Record<string, number>>;
715
725
  knowledgeFiles: Record<string, string>;
716
726
  gitChanges: {
717
- diff: string;
718
727
  status: string;
728
+ diff: string;
719
729
  diffCached: string;
720
730
  lastCommitMessages: string;
721
731
  };
@@ -733,13 +743,14 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
733
743
  path: string;
734
744
  content: string;
735
745
  }[][];
746
+ userKnowledgeFiles?: Record<string, string> | undefined;
736
747
  };
737
748
  changesAlreadyApplied: {
738
749
  type: "patch" | "file";
739
- content: string;
740
750
  filePath: string;
751
+ content: string;
741
752
  }[];
742
- costMode: "lite" | "normal" | "pro";
753
+ costMode: "max" | "lite" | "normal";
743
754
  authToken?: string | undefined;
744
755
  } | {
745
756
  type: "read-files-response";
@@ -753,8 +764,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
753
764
  fileTokenScores: Record<string, Record<string, number>>;
754
765
  knowledgeFiles: Record<string, string>;
755
766
  gitChanges: {
756
- diff: string;
757
767
  status: string;
768
+ diff: string;
758
769
  diffCached: string;
759
770
  lastCommitMessages: string;
760
771
  };
@@ -772,6 +783,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
772
783
  path: string;
773
784
  content: string;
774
785
  }[][];
786
+ userKnowledgeFiles?: Record<string, string> | undefined;
775
787
  };
776
788
  authToken?: string | undefined;
777
789
  } | {
@@ -814,16 +826,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
814
826
  } | undefined;
815
827
  } | {
816
828
  type: "tool_use";
817
- id: string;
818
829
  name: string;
830
+ id: string;
819
831
  input: Record<string, any>;
820
832
  cache_control?: {
821
833
  type: "ephemeral";
822
834
  } | undefined;
823
835
  } | {
824
836
  type: "tool_result";
825
- tool_use_id: string;
826
837
  content: string;
838
+ tool_use_id: string;
827
839
  cache_control?: {
828
840
  type: "ephemeral";
829
841
  } | undefined;
@@ -836,8 +848,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
836
848
  fileTokenScores: Record<string, Record<string, number>>;
837
849
  knowledgeFiles: Record<string, string>;
838
850
  gitChanges: {
839
- diff: string;
840
851
  status: string;
852
+ diff: string;
841
853
  diffCached: string;
842
854
  lastCommitMessages: string;
843
855
  };
@@ -855,14 +867,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
855
867
  path: string;
856
868
  content: string;
857
869
  }[][];
870
+ userKnowledgeFiles?: Record<string, string> | undefined;
858
871
  };
859
872
  changesAlreadyApplied: {
860
873
  type: "patch" | "file";
861
- content: string;
862
874
  filePath: string;
875
+ content: string;
863
876
  }[];
864
877
  authToken?: string | undefined;
865
- costMode?: "lite" | "normal" | "pro" | undefined;
878
+ costMode?: "max" | "lite" | "normal" | undefined;
866
879
  } | {
867
880
  type: "read-files-response";
868
881
  files: Record<string, string | null>;
@@ -875,8 +888,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
875
888
  fileTokenScores: Record<string, Record<string, number>>;
876
889
  knowledgeFiles: Record<string, string>;
877
890
  gitChanges: {
878
- diff: string;
879
891
  status: string;
892
+ diff: string;
880
893
  diffCached: string;
881
894
  lastCommitMessages: string;
882
895
  };
@@ -894,6 +907,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
894
907
  path: string;
895
908
  content: string;
896
909
  }[][];
910
+ userKnowledgeFiles?: Record<string, string> | undefined;
897
911
  };
898
912
  authToken?: string | undefined;
899
913
  } | {
@@ -1014,16 +1028,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1014
1028
  }>>;
1015
1029
  }, "strip", z.ZodTypeAny, {
1016
1030
  type: "tool_use";
1017
- id: string;
1018
1031
  name: string;
1032
+ id: string;
1019
1033
  input: Record<string, any>;
1020
1034
  cache_control?: {
1021
1035
  type: "ephemeral";
1022
1036
  } | undefined;
1023
1037
  }, {
1024
1038
  type: "tool_use";
1025
- id: string;
1026
1039
  name: string;
1040
+ id: string;
1027
1041
  input: Record<string, any>;
1028
1042
  cache_control?: {
1029
1043
  type: "ephemeral";
@@ -1041,15 +1055,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1041
1055
  }>>;
1042
1056
  }, "strip", z.ZodTypeAny, {
1043
1057
  type: "tool_result";
1044
- tool_use_id: string;
1045
1058
  content: string;
1059
+ tool_use_id: string;
1046
1060
  cache_control?: {
1047
1061
  type: "ephemeral";
1048
1062
  } | undefined;
1049
1063
  }, {
1050
1064
  type: "tool_result";
1051
- tool_use_id: string;
1052
1065
  content: string;
1066
+ tool_use_id: string;
1053
1067
  cache_control?: {
1054
1068
  type: "ephemeral";
1055
1069
  } | undefined;
@@ -1063,16 +1077,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1063
1077
  } | undefined;
1064
1078
  } | {
1065
1079
  type: "tool_use";
1066
- id: string;
1067
1080
  name: string;
1081
+ id: string;
1068
1082
  input: Record<string, any>;
1069
1083
  cache_control?: {
1070
1084
  type: "ephemeral";
1071
1085
  } | undefined;
1072
1086
  } | {
1073
1087
  type: "tool_result";
1074
- tool_use_id: string;
1075
1088
  content: string;
1089
+ tool_use_id: string;
1076
1090
  cache_control?: {
1077
1091
  type: "ephemeral";
1078
1092
  } | undefined;
@@ -1087,16 +1101,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1087
1101
  } | undefined;
1088
1102
  } | {
1089
1103
  type: "tool_use";
1090
- id: string;
1091
1104
  name: string;
1105
+ id: string;
1092
1106
  input: Record<string, any>;
1093
1107
  cache_control?: {
1094
1108
  type: "ephemeral";
1095
1109
  } | undefined;
1096
1110
  } | {
1097
1111
  type: "tool_result";
1098
- tool_use_id: string;
1099
1112
  content: string;
1113
+ tool_use_id: string;
1100
1114
  cache_control?: {
1101
1115
  type: "ephemeral";
1102
1116
  } | undefined;
@@ -1108,19 +1122,20 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1108
1122
  fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
1109
1123
  fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
1110
1124
  knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
1125
+ userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1111
1126
  gitChanges: z.ZodObject<{
1112
1127
  status: z.ZodString;
1113
1128
  diff: z.ZodString;
1114
1129
  diffCached: z.ZodString;
1115
1130
  lastCommitMessages: z.ZodString;
1116
1131
  }, "strip", z.ZodTypeAny, {
1117
- diff: string;
1118
1132
  status: string;
1133
+ diff: string;
1119
1134
  diffCached: string;
1120
1135
  lastCommitMessages: string;
1121
1136
  }, {
1122
- diff: string;
1123
1137
  status: string;
1138
+ diff: string;
1124
1139
  diffCached: string;
1125
1140
  lastCommitMessages: string;
1126
1141
  }>;
@@ -1164,8 +1179,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1164
1179
  fileTokenScores: Record<string, Record<string, number>>;
1165
1180
  knowledgeFiles: Record<string, string>;
1166
1181
  gitChanges: {
1167
- diff: string;
1168
1182
  status: string;
1183
+ diff: string;
1169
1184
  diffCached: string;
1170
1185
  lastCommitMessages: string;
1171
1186
  };
@@ -1183,14 +1198,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1183
1198
  path: string;
1184
1199
  content: string;
1185
1200
  }[][];
1201
+ userKnowledgeFiles?: Record<string, string> | undefined;
1186
1202
  }, {
1187
1203
  currentWorkingDirectory: string;
1188
1204
  fileTree: import("../util/file").FileTreeNode[];
1189
1205
  fileTokenScores: Record<string, Record<string, number>>;
1190
1206
  knowledgeFiles: Record<string, string>;
1191
1207
  gitChanges: {
1192
- diff: string;
1193
1208
  status: string;
1209
+ diff: string;
1194
1210
  diffCached: string;
1195
1211
  lastCommitMessages: string;
1196
1212
  };
@@ -1208,6 +1224,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1208
1224
  path: string;
1209
1225
  content: string;
1210
1226
  }[][];
1227
+ userKnowledgeFiles?: Record<string, string> | undefined;
1211
1228
  }>;
1212
1229
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
1213
1230
  type: z.ZodEnum<["patch", "file"]>;
@@ -1215,14 +1232,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1215
1232
  content: z.ZodString;
1216
1233
  }, "strip", z.ZodTypeAny, {
1217
1234
  type: "patch" | "file";
1218
- content: string;
1219
1235
  filePath: string;
1236
+ content: string;
1220
1237
  }, {
1221
1238
  type: "patch" | "file";
1222
- content: string;
1223
1239
  filePath: string;
1240
+ content: string;
1224
1241
  }>, "many">;
1225
- costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "pro"]>>>;
1242
+ costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
1226
1243
  }, "strip", z.ZodTypeAny, {
1227
1244
  type: "user-input";
1228
1245
  fingerprintId: string;
@@ -1236,16 +1253,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1236
1253
  } | undefined;
1237
1254
  } | {
1238
1255
  type: "tool_use";
1239
- id: string;
1240
1256
  name: string;
1257
+ id: string;
1241
1258
  input: Record<string, any>;
1242
1259
  cache_control?: {
1243
1260
  type: "ephemeral";
1244
1261
  } | undefined;
1245
1262
  } | {
1246
1263
  type: "tool_result";
1247
- tool_use_id: string;
1248
1264
  content: string;
1265
+ tool_use_id: string;
1249
1266
  cache_control?: {
1250
1267
  type: "ephemeral";
1251
1268
  } | undefined;
@@ -1258,8 +1275,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1258
1275
  fileTokenScores: Record<string, Record<string, number>>;
1259
1276
  knowledgeFiles: Record<string, string>;
1260
1277
  gitChanges: {
1261
- diff: string;
1262
1278
  status: string;
1279
+ diff: string;
1263
1280
  diffCached: string;
1264
1281
  lastCommitMessages: string;
1265
1282
  };
@@ -1277,13 +1294,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1277
1294
  path: string;
1278
1295
  content: string;
1279
1296
  }[][];
1297
+ userKnowledgeFiles?: Record<string, string> | undefined;
1280
1298
  };
1281
1299
  changesAlreadyApplied: {
1282
1300
  type: "patch" | "file";
1283
- content: string;
1284
1301
  filePath: string;
1302
+ content: string;
1285
1303
  }[];
1286
- costMode: "lite" | "normal" | "pro";
1304
+ costMode: "max" | "lite" | "normal";
1287
1305
  authToken?: string | undefined;
1288
1306
  }, {
1289
1307
  type: "user-input";
@@ -1298,16 +1316,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1298
1316
  } | undefined;
1299
1317
  } | {
1300
1318
  type: "tool_use";
1301
- id: string;
1302
1319
  name: string;
1320
+ id: string;
1303
1321
  input: Record<string, any>;
1304
1322
  cache_control?: {
1305
1323
  type: "ephemeral";
1306
1324
  } | undefined;
1307
1325
  } | {
1308
1326
  type: "tool_result";
1309
- tool_use_id: string;
1310
1327
  content: string;
1328
+ tool_use_id: string;
1311
1329
  cache_control?: {
1312
1330
  type: "ephemeral";
1313
1331
  } | undefined;
@@ -1320,8 +1338,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1320
1338
  fileTokenScores: Record<string, Record<string, number>>;
1321
1339
  knowledgeFiles: Record<string, string>;
1322
1340
  gitChanges: {
1323
- diff: string;
1324
1341
  status: string;
1342
+ diff: string;
1325
1343
  diffCached: string;
1326
1344
  lastCommitMessages: string;
1327
1345
  };
@@ -1339,14 +1357,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1339
1357
  path: string;
1340
1358
  content: string;
1341
1359
  }[][];
1360
+ userKnowledgeFiles?: Record<string, string> | undefined;
1342
1361
  };
1343
1362
  changesAlreadyApplied: {
1344
1363
  type: "patch" | "file";
1345
- content: string;
1346
1364
  filePath: string;
1365
+ content: string;
1347
1366
  }[];
1348
1367
  authToken?: string | undefined;
1349
- costMode?: "lite" | "normal" | "pro" | undefined;
1368
+ costMode?: "max" | "lite" | "normal" | undefined;
1350
1369
  }>, z.ZodObject<{
1351
1370
  type: z.ZodLiteral<"read-files-response">;
1352
1371
  files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
@@ -1365,19 +1384,20 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1365
1384
  fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
1366
1385
  fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
1367
1386
  knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
1387
+ userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1368
1388
  gitChanges: z.ZodObject<{
1369
1389
  status: z.ZodString;
1370
1390
  diff: z.ZodString;
1371
1391
  diffCached: z.ZodString;
1372
1392
  lastCommitMessages: z.ZodString;
1373
1393
  }, "strip", z.ZodTypeAny, {
1374
- diff: string;
1375
1394
  status: string;
1395
+ diff: string;
1376
1396
  diffCached: string;
1377
1397
  lastCommitMessages: string;
1378
1398
  }, {
1379
- diff: string;
1380
1399
  status: string;
1400
+ diff: string;
1381
1401
  diffCached: string;
1382
1402
  lastCommitMessages: string;
1383
1403
  }>;
@@ -1421,8 +1441,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1421
1441
  fileTokenScores: Record<string, Record<string, number>>;
1422
1442
  knowledgeFiles: Record<string, string>;
1423
1443
  gitChanges: {
1424
- diff: string;
1425
1444
  status: string;
1445
+ diff: string;
1426
1446
  diffCached: string;
1427
1447
  lastCommitMessages: string;
1428
1448
  };
@@ -1440,14 +1460,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1440
1460
  path: string;
1441
1461
  content: string;
1442
1462
  }[][];
1463
+ userKnowledgeFiles?: Record<string, string> | undefined;
1443
1464
  }, {
1444
1465
  currentWorkingDirectory: string;
1445
1466
  fileTree: import("../util/file").FileTreeNode[];
1446
1467
  fileTokenScores: Record<string, Record<string, number>>;
1447
1468
  knowledgeFiles: Record<string, string>;
1448
1469
  gitChanges: {
1449
- diff: string;
1450
1470
  status: string;
1471
+ diff: string;
1451
1472
  diffCached: string;
1452
1473
  lastCommitMessages: string;
1453
1474
  };
@@ -1465,6 +1486,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1465
1486
  path: string;
1466
1487
  content: string;
1467
1488
  }[][];
1489
+ userKnowledgeFiles?: Record<string, string> | undefined;
1468
1490
  }>;
1469
1491
  }, "strip", z.ZodTypeAny, {
1470
1492
  type: "init";
@@ -1475,8 +1497,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1475
1497
  fileTokenScores: Record<string, Record<string, number>>;
1476
1498
  knowledgeFiles: Record<string, string>;
1477
1499
  gitChanges: {
1478
- diff: string;
1479
1500
  status: string;
1501
+ diff: string;
1480
1502
  diffCached: string;
1481
1503
  lastCommitMessages: string;
1482
1504
  };
@@ -1494,6 +1516,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1494
1516
  path: string;
1495
1517
  content: string;
1496
1518
  }[][];
1519
+ userKnowledgeFiles?: Record<string, string> | undefined;
1497
1520
  };
1498
1521
  authToken?: string | undefined;
1499
1522
  }, {
@@ -1505,8 +1528,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1505
1528
  fileTokenScores: Record<string, Record<string, number>>;
1506
1529
  knowledgeFiles: Record<string, string>;
1507
1530
  gitChanges: {
1508
- diff: string;
1509
1531
  status: string;
1532
+ diff: string;
1510
1533
  diffCached: string;
1511
1534
  lastCommitMessages: string;
1512
1535
  };
@@ -1524,6 +1547,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1524
1547
  path: string;
1525
1548
  content: string;
1526
1549
  }[][];
1550
+ userKnowledgeFiles?: Record<string, string> | undefined;
1527
1551
  };
1528
1552
  authToken?: string | undefined;
1529
1553
  }>, z.ZodObject<{
@@ -1611,16 +1635,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1611
1635
  } | undefined;
1612
1636
  } | {
1613
1637
  type: "tool_use";
1614
- id: string;
1615
1638
  name: string;
1639
+ id: string;
1616
1640
  input: Record<string, any>;
1617
1641
  cache_control?: {
1618
1642
  type: "ephemeral";
1619
1643
  } | undefined;
1620
1644
  } | {
1621
1645
  type: "tool_result";
1622
- tool_use_id: string;
1623
1646
  content: string;
1647
+ tool_use_id: string;
1624
1648
  cache_control?: {
1625
1649
  type: "ephemeral";
1626
1650
  } | undefined;
@@ -1633,8 +1657,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1633
1657
  fileTokenScores: Record<string, Record<string, number>>;
1634
1658
  knowledgeFiles: Record<string, string>;
1635
1659
  gitChanges: {
1636
- diff: string;
1637
1660
  status: string;
1661
+ diff: string;
1638
1662
  diffCached: string;
1639
1663
  lastCommitMessages: string;
1640
1664
  };
@@ -1652,13 +1676,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1652
1676
  path: string;
1653
1677
  content: string;
1654
1678
  }[][];
1679
+ userKnowledgeFiles?: Record<string, string> | undefined;
1655
1680
  };
1656
1681
  changesAlreadyApplied: {
1657
1682
  type: "patch" | "file";
1658
- content: string;
1659
1683
  filePath: string;
1684
+ content: string;
1660
1685
  }[];
1661
- costMode: "lite" | "normal" | "pro";
1686
+ costMode: "max" | "lite" | "normal";
1662
1687
  authToken?: string | undefined;
1663
1688
  } | {
1664
1689
  type: "read-files-response";
@@ -1672,8 +1697,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1672
1697
  fileTokenScores: Record<string, Record<string, number>>;
1673
1698
  knowledgeFiles: Record<string, string>;
1674
1699
  gitChanges: {
1675
- diff: string;
1676
1700
  status: string;
1701
+ diff: string;
1677
1702
  diffCached: string;
1678
1703
  lastCommitMessages: string;
1679
1704
  };
@@ -1691,6 +1716,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1691
1716
  path: string;
1692
1717
  content: string;
1693
1718
  }[][];
1719
+ userKnowledgeFiles?: Record<string, string> | undefined;
1694
1720
  };
1695
1721
  authToken?: string | undefined;
1696
1722
  } | {
@@ -1733,16 +1759,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1733
1759
  } | undefined;
1734
1760
  } | {
1735
1761
  type: "tool_use";
1736
- id: string;
1737
1762
  name: string;
1763
+ id: string;
1738
1764
  input: Record<string, any>;
1739
1765
  cache_control?: {
1740
1766
  type: "ephemeral";
1741
1767
  } | undefined;
1742
1768
  } | {
1743
1769
  type: "tool_result";
1744
- tool_use_id: string;
1745
1770
  content: string;
1771
+ tool_use_id: string;
1746
1772
  cache_control?: {
1747
1773
  type: "ephemeral";
1748
1774
  } | undefined;
@@ -1755,8 +1781,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1755
1781
  fileTokenScores: Record<string, Record<string, number>>;
1756
1782
  knowledgeFiles: Record<string, string>;
1757
1783
  gitChanges: {
1758
- diff: string;
1759
1784
  status: string;
1785
+ diff: string;
1760
1786
  diffCached: string;
1761
1787
  lastCommitMessages: string;
1762
1788
  };
@@ -1774,14 +1800,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1774
1800
  path: string;
1775
1801
  content: string;
1776
1802
  }[][];
1803
+ userKnowledgeFiles?: Record<string, string> | undefined;
1777
1804
  };
1778
1805
  changesAlreadyApplied: {
1779
1806
  type: "patch" | "file";
1780
- content: string;
1781
1807
  filePath: string;
1808
+ content: string;
1782
1809
  }[];
1783
1810
  authToken?: string | undefined;
1784
- costMode?: "lite" | "normal" | "pro" | undefined;
1811
+ costMode?: "max" | "lite" | "normal" | undefined;
1785
1812
  } | {
1786
1813
  type: "read-files-response";
1787
1814
  files: Record<string, string | null>;
@@ -1794,8 +1821,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1794
1821
  fileTokenScores: Record<string, Record<string, number>>;
1795
1822
  knowledgeFiles: Record<string, string>;
1796
1823
  gitChanges: {
1797
- diff: string;
1798
1824
  status: string;
1825
+ diff: string;
1799
1826
  diffCached: string;
1800
1827
  lastCommitMessages: string;
1801
1828
  };
@@ -1813,6 +1840,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1813
1840
  path: string;
1814
1841
  content: string;
1815
1842
  }[][];
1843
+ userKnowledgeFiles?: Record<string, string> | undefined;
1816
1844
  };
1817
1845
  authToken?: string | undefined;
1818
1846
  } | {
@@ -1863,6 +1891,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1863
1891
  action: z.ZodObject<{
1864
1892
  type: z.ZodLiteral<"action">;
1865
1893
  data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1894
+ type: z.ZodLiteral<"read-files-response">;
1895
+ files: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
1896
+ }, "strip", z.ZodTypeAny, {
1897
+ type: "read-files-response";
1898
+ files: Record<string, string | null>;
1899
+ }, {
1900
+ type: "read-files-response";
1901
+ files: Record<string, string | null>;
1902
+ }>, z.ZodObject<{
1866
1903
  type: z.ZodLiteral<"response-chunk">;
1867
1904
  userInputId: z.ZodString;
1868
1905
  chunk: z.ZodString;
@@ -1884,12 +1921,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1884
1921
  content: z.ZodString;
1885
1922
  }, "strip", z.ZodTypeAny, {
1886
1923
  type: "patch" | "file";
1887
- content: string;
1888
1924
  filePath: string;
1925
+ content: string;
1889
1926
  }, {
1890
1927
  type: "patch" | "file";
1891
- content: string;
1892
1928
  filePath: string;
1929
+ content: string;
1893
1930
  }>, "many">;
1894
1931
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
1895
1932
  type: z.ZodEnum<["patch", "file"]>;
@@ -1897,12 +1934,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1897
1934
  content: z.ZodString;
1898
1935
  }, "strip", z.ZodTypeAny, {
1899
1936
  type: "patch" | "file";
1900
- content: string;
1901
1937
  filePath: string;
1938
+ content: string;
1902
1939
  }, {
1903
1940
  type: "patch" | "file";
1904
- content: string;
1905
1941
  filePath: string;
1942
+ content: string;
1906
1943
  }>, "many">;
1907
1944
  addedFileVersions: z.ZodArray<z.ZodObject<{
1908
1945
  path: z.ZodString;
@@ -1927,14 +1964,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1927
1964
  userInputId: string;
1928
1965
  changesAlreadyApplied: {
1929
1966
  type: "patch" | "file";
1930
- content: string;
1931
1967
  filePath: string;
1968
+ content: string;
1932
1969
  }[];
1933
1970
  response: string;
1934
1971
  changes: {
1935
1972
  type: "patch" | "file";
1936
- content: string;
1937
1973
  filePath: string;
1974
+ content: string;
1938
1975
  }[];
1939
1976
  addedFileVersions: {
1940
1977
  path: string;
@@ -1952,14 +1989,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1952
1989
  userInputId: string;
1953
1990
  changesAlreadyApplied: {
1954
1991
  type: "patch" | "file";
1955
- content: string;
1956
1992
  filePath: string;
1993
+ content: string;
1957
1994
  }[];
1958
1995
  response: string;
1959
1996
  changes: {
1960
1997
  type: "patch" | "file";
1961
- content: string;
1962
1998
  filePath: string;
1999
+ content: string;
1963
2000
  }[];
1964
2001
  addedFileVersions: {
1965
2002
  path: string;
@@ -1990,12 +2027,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1990
2027
  id: z.ZodString;
1991
2028
  input: z.ZodRecord<z.ZodString, z.ZodAny>;
1992
2029
  }, "strip", z.ZodTypeAny, {
1993
- id: string;
1994
2030
  name: string;
2031
+ id: string;
1995
2032
  input: Record<string, any>;
1996
2033
  }, {
1997
- id: string;
1998
2034
  name: string;
2035
+ id: string;
1999
2036
  input: Record<string, any>;
2000
2037
  }>;
2001
2038
  changes: z.ZodArray<z.ZodObject<{
@@ -2004,12 +2041,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2004
2041
  content: z.ZodString;
2005
2042
  }, "strip", z.ZodTypeAny, {
2006
2043
  type: "patch" | "file";
2007
- content: string;
2008
2044
  filePath: string;
2045
+ content: string;
2009
2046
  }, {
2010
2047
  type: "patch" | "file";
2011
- content: string;
2012
2048
  filePath: string;
2049
+ content: string;
2013
2050
  }>, "many">;
2014
2051
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
2015
2052
  type: z.ZodEnum<["patch", "file"]>;
@@ -2017,12 +2054,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2017
2054
  content: z.ZodString;
2018
2055
  }, "strip", z.ZodTypeAny, {
2019
2056
  type: "patch" | "file";
2020
- content: string;
2021
2057
  filePath: string;
2058
+ content: string;
2022
2059
  }, {
2023
2060
  type: "patch" | "file";
2024
- content: string;
2025
2061
  filePath: string;
2062
+ content: string;
2026
2063
  }>, "many">;
2027
2064
  addedFileVersions: z.ZodArray<z.ZodObject<{
2028
2065
  path: z.ZodString;
@@ -2040,14 +2077,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2040
2077
  userInputId: string;
2041
2078
  changesAlreadyApplied: {
2042
2079
  type: "patch" | "file";
2043
- content: string;
2044
2080
  filePath: string;
2081
+ content: string;
2045
2082
  }[];
2046
2083
  response: string;
2047
2084
  changes: {
2048
2085
  type: "patch" | "file";
2049
- content: string;
2050
2086
  filePath: string;
2087
+ content: string;
2051
2088
  }[];
2052
2089
  addedFileVersions: {
2053
2090
  path: string;
@@ -2055,8 +2092,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2055
2092
  }[];
2056
2093
  resetFileVersions: boolean;
2057
2094
  data: {
2058
- id: string;
2059
2095
  name: string;
2096
+ id: string;
2060
2097
  input: Record<string, any>;
2061
2098
  };
2062
2099
  }, {
@@ -2064,14 +2101,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2064
2101
  userInputId: string;
2065
2102
  changesAlreadyApplied: {
2066
2103
  type: "patch" | "file";
2067
- content: string;
2068
2104
  filePath: string;
2105
+ content: string;
2069
2106
  }[];
2070
2107
  response: string;
2071
2108
  changes: {
2072
2109
  type: "patch" | "file";
2073
- content: string;
2074
2110
  filePath: string;
2111
+ content: string;
2075
2112
  }[];
2076
2113
  addedFileVersions: {
2077
2114
  path: string;
@@ -2079,8 +2116,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2079
2116
  }[];
2080
2117
  resetFileVersions: boolean;
2081
2118
  data: {
2082
- id: string;
2083
2119
  name: string;
2120
+ id: string;
2084
2121
  input: Record<string, any>;
2085
2122
  };
2086
2123
  }>, z.ZodObject<{
@@ -2143,15 +2180,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2143
2180
  fingerprintId: z.ZodString;
2144
2181
  fingerprintHash: z.ZodString;
2145
2182
  }, "strip", z.ZodTypeAny, {
2146
- id: string;
2147
2183
  name: string | null;
2184
+ id: string;
2148
2185
  fingerprintId: string;
2149
2186
  authToken: string;
2150
2187
  email: string;
2151
2188
  fingerprintHash: string;
2152
2189
  }, {
2153
- id: string;
2154
2190
  name: string | null;
2191
+ id: string;
2155
2192
  fingerprintId: string;
2156
2193
  authToken: string;
2157
2194
  email: string;
@@ -2162,8 +2199,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2162
2199
  type: "auth-result";
2163
2200
  message: string;
2164
2201
  user?: {
2165
- id: string;
2166
2202
  name: string | null;
2203
+ id: string;
2167
2204
  fingerprintId: string;
2168
2205
  authToken: string;
2169
2206
  email: string;
@@ -2173,8 +2210,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2173
2210
  type: "auth-result";
2174
2211
  message: string;
2175
2212
  user?: {
2176
- id: string;
2177
2213
  name: string | null;
2214
+ id: string;
2178
2215
  fingerprintId: string;
2179
2216
  authToken: string;
2180
2217
  email: string;
@@ -2261,14 +2298,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2261
2298
  userInputId: string;
2262
2299
  changesAlreadyApplied: {
2263
2300
  type: "patch" | "file";
2264
- content: string;
2265
2301
  filePath: string;
2302
+ content: string;
2266
2303
  }[];
2267
2304
  response: string;
2268
2305
  changes: {
2269
2306
  type: "patch" | "file";
2270
- content: string;
2271
2307
  filePath: string;
2308
+ content: string;
2272
2309
  }[];
2273
2310
  addedFileVersions: {
2274
2311
  path: string;
@@ -2281,6 +2318,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2281
2318
  subscription_active?: boolean | undefined;
2282
2319
  next_quota_reset?: Date | undefined;
2283
2320
  session_credits_used?: number | undefined;
2321
+ } | {
2322
+ type: "read-files-response";
2323
+ files: Record<string, string | null>;
2284
2324
  } | {
2285
2325
  type: "response-chunk";
2286
2326
  userInputId: string;
@@ -2293,14 +2333,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2293
2333
  userInputId: string;
2294
2334
  changesAlreadyApplied: {
2295
2335
  type: "patch" | "file";
2296
- content: string;
2297
2336
  filePath: string;
2337
+ content: string;
2298
2338
  }[];
2299
2339
  response: string;
2300
2340
  changes: {
2301
2341
  type: "patch" | "file";
2302
- content: string;
2303
2342
  filePath: string;
2343
+ content: string;
2304
2344
  }[];
2305
2345
  addedFileVersions: {
2306
2346
  path: string;
@@ -2308,8 +2348,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2308
2348
  }[];
2309
2349
  resetFileVersions: boolean;
2310
2350
  data: {
2311
- id: string;
2312
2351
  name: string;
2352
+ id: string;
2313
2353
  input: Record<string, any>;
2314
2354
  };
2315
2355
  } | {
@@ -2324,8 +2364,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2324
2364
  type: "auth-result";
2325
2365
  message: string;
2326
2366
  user?: {
2327
- id: string;
2328
2367
  name: string | null;
2368
+ id: string;
2329
2369
  fingerprintId: string;
2330
2370
  authToken: string;
2331
2371
  email: string;
@@ -2366,14 +2406,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2366
2406
  userInputId: string;
2367
2407
  changesAlreadyApplied: {
2368
2408
  type: "patch" | "file";
2369
- content: string;
2370
2409
  filePath: string;
2410
+ content: string;
2371
2411
  }[];
2372
2412
  response: string;
2373
2413
  changes: {
2374
2414
  type: "patch" | "file";
2375
- content: string;
2376
2415
  filePath: string;
2416
+ content: string;
2377
2417
  }[];
2378
2418
  addedFileVersions: {
2379
2419
  path: string;
@@ -2386,6 +2426,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2386
2426
  subscription_active?: boolean | undefined;
2387
2427
  next_quota_reset?: Date | undefined;
2388
2428
  session_credits_used?: number | undefined;
2429
+ } | {
2430
+ type: "read-files-response";
2431
+ files: Record<string, string | null>;
2389
2432
  } | {
2390
2433
  type: "response-chunk";
2391
2434
  userInputId: string;
@@ -2398,14 +2441,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2398
2441
  userInputId: string;
2399
2442
  changesAlreadyApplied: {
2400
2443
  type: "patch" | "file";
2401
- content: string;
2402
2444
  filePath: string;
2445
+ content: string;
2403
2446
  }[];
2404
2447
  response: string;
2405
2448
  changes: {
2406
2449
  type: "patch" | "file";
2407
- content: string;
2408
2450
  filePath: string;
2451
+ content: string;
2409
2452
  }[];
2410
2453
  addedFileVersions: {
2411
2454
  path: string;
@@ -2413,8 +2456,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2413
2456
  }[];
2414
2457
  resetFileVersions: boolean;
2415
2458
  data: {
2416
- id: string;
2417
2459
  name: string;
2460
+ id: string;
2418
2461
  input: Record<string, any>;
2419
2462
  };
2420
2463
  } | {
@@ -2429,8 +2472,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2429
2472
  type: "auth-result";
2430
2473
  message: string;
2431
2474
  user?: {
2432
- id: string;
2433
2475
  name: string | null;
2476
+ id: string;
2434
2477
  fingerprintId: string;
2435
2478
  authToken: string;
2436
2479
  email: string;
@@ -2468,6 +2511,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2468
2511
  }>, z.ZodObject<{
2469
2512
  type: z.ZodLiteral<"action">;
2470
2513
  data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2514
+ type: z.ZodLiteral<"read-files-response">;
2515
+ files: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
2516
+ }, "strip", z.ZodTypeAny, {
2517
+ type: "read-files-response";
2518
+ files: Record<string, string | null>;
2519
+ }, {
2520
+ type: "read-files-response";
2521
+ files: Record<string, string | null>;
2522
+ }>, z.ZodObject<{
2471
2523
  type: z.ZodLiteral<"response-chunk">;
2472
2524
  userInputId: z.ZodString;
2473
2525
  chunk: z.ZodString;
@@ -2489,12 +2541,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2489
2541
  content: z.ZodString;
2490
2542
  }, "strip", z.ZodTypeAny, {
2491
2543
  type: "patch" | "file";
2492
- content: string;
2493
2544
  filePath: string;
2545
+ content: string;
2494
2546
  }, {
2495
2547
  type: "patch" | "file";
2496
- content: string;
2497
2548
  filePath: string;
2549
+ content: string;
2498
2550
  }>, "many">;
2499
2551
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
2500
2552
  type: z.ZodEnum<["patch", "file"]>;
@@ -2502,12 +2554,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2502
2554
  content: z.ZodString;
2503
2555
  }, "strip", z.ZodTypeAny, {
2504
2556
  type: "patch" | "file";
2505
- content: string;
2506
2557
  filePath: string;
2558
+ content: string;
2507
2559
  }, {
2508
2560
  type: "patch" | "file";
2509
- content: string;
2510
2561
  filePath: string;
2562
+ content: string;
2511
2563
  }>, "many">;
2512
2564
  addedFileVersions: z.ZodArray<z.ZodObject<{
2513
2565
  path: z.ZodString;
@@ -2532,14 +2584,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2532
2584
  userInputId: string;
2533
2585
  changesAlreadyApplied: {
2534
2586
  type: "patch" | "file";
2535
- content: string;
2536
2587
  filePath: string;
2588
+ content: string;
2537
2589
  }[];
2538
2590
  response: string;
2539
2591
  changes: {
2540
2592
  type: "patch" | "file";
2541
- content: string;
2542
2593
  filePath: string;
2594
+ content: string;
2543
2595
  }[];
2544
2596
  addedFileVersions: {
2545
2597
  path: string;
@@ -2557,14 +2609,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2557
2609
  userInputId: string;
2558
2610
  changesAlreadyApplied: {
2559
2611
  type: "patch" | "file";
2560
- content: string;
2561
2612
  filePath: string;
2613
+ content: string;
2562
2614
  }[];
2563
2615
  response: string;
2564
2616
  changes: {
2565
2617
  type: "patch" | "file";
2566
- content: string;
2567
2618
  filePath: string;
2619
+ content: string;
2568
2620
  }[];
2569
2621
  addedFileVersions: {
2570
2622
  path: string;
@@ -2595,12 +2647,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2595
2647
  id: z.ZodString;
2596
2648
  input: z.ZodRecord<z.ZodString, z.ZodAny>;
2597
2649
  }, "strip", z.ZodTypeAny, {
2598
- id: string;
2599
2650
  name: string;
2651
+ id: string;
2600
2652
  input: Record<string, any>;
2601
2653
  }, {
2602
- id: string;
2603
2654
  name: string;
2655
+ id: string;
2604
2656
  input: Record<string, any>;
2605
2657
  }>;
2606
2658
  changes: z.ZodArray<z.ZodObject<{
@@ -2609,12 +2661,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2609
2661
  content: z.ZodString;
2610
2662
  }, "strip", z.ZodTypeAny, {
2611
2663
  type: "patch" | "file";
2612
- content: string;
2613
2664
  filePath: string;
2665
+ content: string;
2614
2666
  }, {
2615
2667
  type: "patch" | "file";
2616
- content: string;
2617
2668
  filePath: string;
2669
+ content: string;
2618
2670
  }>, "many">;
2619
2671
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
2620
2672
  type: z.ZodEnum<["patch", "file"]>;
@@ -2622,12 +2674,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2622
2674
  content: z.ZodString;
2623
2675
  }, "strip", z.ZodTypeAny, {
2624
2676
  type: "patch" | "file";
2625
- content: string;
2626
2677
  filePath: string;
2678
+ content: string;
2627
2679
  }, {
2628
2680
  type: "patch" | "file";
2629
- content: string;
2630
2681
  filePath: string;
2682
+ content: string;
2631
2683
  }>, "many">;
2632
2684
  addedFileVersions: z.ZodArray<z.ZodObject<{
2633
2685
  path: z.ZodString;
@@ -2645,14 +2697,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2645
2697
  userInputId: string;
2646
2698
  changesAlreadyApplied: {
2647
2699
  type: "patch" | "file";
2648
- content: string;
2649
2700
  filePath: string;
2701
+ content: string;
2650
2702
  }[];
2651
2703
  response: string;
2652
2704
  changes: {
2653
2705
  type: "patch" | "file";
2654
- content: string;
2655
2706
  filePath: string;
2707
+ content: string;
2656
2708
  }[];
2657
2709
  addedFileVersions: {
2658
2710
  path: string;
@@ -2660,8 +2712,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2660
2712
  }[];
2661
2713
  resetFileVersions: boolean;
2662
2714
  data: {
2663
- id: string;
2664
2715
  name: string;
2716
+ id: string;
2665
2717
  input: Record<string, any>;
2666
2718
  };
2667
2719
  }, {
@@ -2669,14 +2721,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2669
2721
  userInputId: string;
2670
2722
  changesAlreadyApplied: {
2671
2723
  type: "patch" | "file";
2672
- content: string;
2673
2724
  filePath: string;
2725
+ content: string;
2674
2726
  }[];
2675
2727
  response: string;
2676
2728
  changes: {
2677
2729
  type: "patch" | "file";
2678
- content: string;
2679
2730
  filePath: string;
2731
+ content: string;
2680
2732
  }[];
2681
2733
  addedFileVersions: {
2682
2734
  path: string;
@@ -2684,8 +2736,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2684
2736
  }[];
2685
2737
  resetFileVersions: boolean;
2686
2738
  data: {
2687
- id: string;
2688
2739
  name: string;
2740
+ id: string;
2689
2741
  input: Record<string, any>;
2690
2742
  };
2691
2743
  }>, z.ZodObject<{
@@ -2748,15 +2800,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2748
2800
  fingerprintId: z.ZodString;
2749
2801
  fingerprintHash: z.ZodString;
2750
2802
  }, "strip", z.ZodTypeAny, {
2751
- id: string;
2752
2803
  name: string | null;
2804
+ id: string;
2753
2805
  fingerprintId: string;
2754
2806
  authToken: string;
2755
2807
  email: string;
2756
2808
  fingerprintHash: string;
2757
2809
  }, {
2758
- id: string;
2759
2810
  name: string | null;
2811
+ id: string;
2760
2812
  fingerprintId: string;
2761
2813
  authToken: string;
2762
2814
  email: string;
@@ -2767,8 +2819,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2767
2819
  type: "auth-result";
2768
2820
  message: string;
2769
2821
  user?: {
2770
- id: string;
2771
2822
  name: string | null;
2823
+ id: string;
2772
2824
  fingerprintId: string;
2773
2825
  authToken: string;
2774
2826
  email: string;
@@ -2778,8 +2830,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2778
2830
  type: "auth-result";
2779
2831
  message: string;
2780
2832
  user?: {
2781
- id: string;
2782
2833
  name: string | null;
2834
+ id: string;
2783
2835
  fingerprintId: string;
2784
2836
  authToken: string;
2785
2837
  email: string;
@@ -2866,14 +2918,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2866
2918
  userInputId: string;
2867
2919
  changesAlreadyApplied: {
2868
2920
  type: "patch" | "file";
2869
- content: string;
2870
2921
  filePath: string;
2922
+ content: string;
2871
2923
  }[];
2872
2924
  response: string;
2873
2925
  changes: {
2874
2926
  type: "patch" | "file";
2875
- content: string;
2876
2927
  filePath: string;
2928
+ content: string;
2877
2929
  }[];
2878
2930
  addedFileVersions: {
2879
2931
  path: string;
@@ -2886,6 +2938,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2886
2938
  subscription_active?: boolean | undefined;
2887
2939
  next_quota_reset?: Date | undefined;
2888
2940
  session_credits_used?: number | undefined;
2941
+ } | {
2942
+ type: "read-files-response";
2943
+ files: Record<string, string | null>;
2889
2944
  } | {
2890
2945
  type: "response-chunk";
2891
2946
  userInputId: string;
@@ -2898,14 +2953,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2898
2953
  userInputId: string;
2899
2954
  changesAlreadyApplied: {
2900
2955
  type: "patch" | "file";
2901
- content: string;
2902
2956
  filePath: string;
2957
+ content: string;
2903
2958
  }[];
2904
2959
  response: string;
2905
2960
  changes: {
2906
2961
  type: "patch" | "file";
2907
- content: string;
2908
2962
  filePath: string;
2963
+ content: string;
2909
2964
  }[];
2910
2965
  addedFileVersions: {
2911
2966
  path: string;
@@ -2913,8 +2968,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2913
2968
  }[];
2914
2969
  resetFileVersions: boolean;
2915
2970
  data: {
2916
- id: string;
2917
2971
  name: string;
2972
+ id: string;
2918
2973
  input: Record<string, any>;
2919
2974
  };
2920
2975
  } | {
@@ -2929,8 +2984,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2929
2984
  type: "auth-result";
2930
2985
  message: string;
2931
2986
  user?: {
2932
- id: string;
2933
2987
  name: string | null;
2988
+ id: string;
2934
2989
  fingerprintId: string;
2935
2990
  authToken: string;
2936
2991
  email: string;
@@ -2971,14 +3026,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2971
3026
  userInputId: string;
2972
3027
  changesAlreadyApplied: {
2973
3028
  type: "patch" | "file";
2974
- content: string;
2975
3029
  filePath: string;
3030
+ content: string;
2976
3031
  }[];
2977
3032
  response: string;
2978
3033
  changes: {
2979
3034
  type: "patch" | "file";
2980
- content: string;
2981
3035
  filePath: string;
3036
+ content: string;
2982
3037
  }[];
2983
3038
  addedFileVersions: {
2984
3039
  path: string;
@@ -2991,6 +3046,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2991
3046
  subscription_active?: boolean | undefined;
2992
3047
  next_quota_reset?: Date | undefined;
2993
3048
  session_credits_used?: number | undefined;
3049
+ } | {
3050
+ type: "read-files-response";
3051
+ files: Record<string, string | null>;
2994
3052
  } | {
2995
3053
  type: "response-chunk";
2996
3054
  userInputId: string;
@@ -3003,14 +3061,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3003
3061
  userInputId: string;
3004
3062
  changesAlreadyApplied: {
3005
3063
  type: "patch" | "file";
3006
- content: string;
3007
3064
  filePath: string;
3065
+ content: string;
3008
3066
  }[];
3009
3067
  response: string;
3010
3068
  changes: {
3011
3069
  type: "patch" | "file";
3012
- content: string;
3013
3070
  filePath: string;
3071
+ content: string;
3014
3072
  }[];
3015
3073
  addedFileVersions: {
3016
3074
  path: string;
@@ -3018,8 +3076,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3018
3076
  }[];
3019
3077
  resetFileVersions: boolean;
3020
3078
  data: {
3021
- id: string;
3022
3079
  name: string;
3080
+ id: string;
3023
3081
  input: Record<string, any>;
3024
3082
  };
3025
3083
  } | {
@@ -3034,8 +3092,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3034
3092
  type: "auth-result";
3035
3093
  message: string;
3036
3094
  user?: {
3037
- id: string;
3038
3095
  name: string | null;
3096
+ id: string;
3039
3097
  fingerprintId: string;
3040
3098
  authToken: string;
3041
3099
  email: string;