codecane 1.0.177 → 1.0.179

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 (36) hide show
  1. package/dist/chat-storage.d.ts +1 -26
  2. package/dist/chat-storage.js +56 -132
  3. package/dist/chat-storage.js.map +1 -1
  4. package/dist/checkpoint-file-manager.d.ts +8 -0
  5. package/dist/checkpoint-file-manager.js +89 -0
  6. package/dist/checkpoint-file-manager.js.map +1 -0
  7. package/dist/checkpoints.d.ts +3 -6
  8. package/dist/checkpoints.js +35 -21
  9. package/dist/checkpoints.js.map +1 -1
  10. package/dist/cli.d.ts +1 -3
  11. package/dist/cli.js +22 -60
  12. package/dist/cli.js.map +1 -1
  13. package/dist/client.d.ts +9 -11
  14. package/dist/client.js +25 -22
  15. package/dist/client.js.map +1 -1
  16. package/dist/code-map/tsconfig.tsbuildinfo +1 -1
  17. package/dist/common/actions.d.ts +195 -195
  18. package/dist/common/constants/tools.d.ts +2 -2
  19. package/dist/common/constants/tools.js +3 -2
  20. package/dist/common/constants/tools.js.map +1 -1
  21. package/dist/common/websockets/websocket-schema.d.ts +528 -528
  22. package/dist/index.js +3 -1
  23. package/dist/index.js.map +1 -1
  24. package/dist/utils/xml-stream-parser.d.ts +2 -2
  25. package/dist/utils/xml-stream-parser.js +29 -2
  26. package/dist/utils/xml-stream-parser.js.map +1 -1
  27. package/package.json +2 -1
  28. package/dist/common/advanced-analyzer.d.ts +0 -19
  29. package/dist/common/advanced-analyzer.js +0 -140
  30. package/dist/common/advanced-analyzer.js.map +0 -1
  31. package/dist/common/message-image-handling.d.ts +0 -41
  32. package/dist/common/message-image-handling.js +0 -57
  33. package/dist/common/message-image-handling.js.map +0 -1
  34. package/dist/common/util/process-stream.d.ts +0 -8
  35. package/dist/common/util/process-stream.js +0 -102
  36. package/dist/common/util/process-stream.js.map +0 -1
@@ -70,14 +70,14 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
70
70
  type: "ephemeral";
71
71
  }>>;
72
72
  }, "strip", z.ZodTypeAny, {
73
- type: "text";
74
73
  text: string;
74
+ type: "text";
75
75
  cache_control?: {
76
76
  type: "ephemeral";
77
77
  } | undefined;
78
78
  }, {
79
- type: "text";
80
79
  text: string;
80
+ type: "text";
81
81
  cache_control?: {
82
82
  type: "ephemeral";
83
83
  } | undefined;
@@ -141,13 +141,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
141
141
  media_type: z.ZodLiteral<"image/jpeg">;
142
142
  data: z.ZodString;
143
143
  }, "strip", z.ZodTypeAny, {
144
+ data: string;
144
145
  type: "base64";
145
146
  media_type: "image/jpeg";
146
- data: string;
147
147
  }, {
148
+ data: string;
148
149
  type: "base64";
149
150
  media_type: "image/jpeg";
150
- data: string;
151
151
  }>;
152
152
  cache_control: z.ZodOptional<z.ZodObject<{
153
153
  type: z.ZodLiteral<"ephemeral">;
@@ -159,9 +159,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
159
159
  }, "strip", z.ZodTypeAny, {
160
160
  type: "image";
161
161
  source: {
162
+ data: string;
162
163
  type: "base64";
163
164
  media_type: "image/jpeg";
164
- data: string;
165
165
  };
166
166
  cache_control?: {
167
167
  type: "ephemeral";
@@ -169,9 +169,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
169
169
  }, {
170
170
  type: "image";
171
171
  source: {
172
+ data: string;
172
173
  type: "base64";
173
174
  media_type: "image/jpeg";
174
- data: string;
175
175
  };
176
176
  cache_control?: {
177
177
  type: "ephemeral";
@@ -179,8 +179,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
179
179
  }>]>, "many">]>;
180
180
  }, "strip", z.ZodTypeAny, {
181
181
  content: string | ({
182
- type: "text";
183
182
  text: string;
183
+ type: "text";
184
184
  cache_control?: {
185
185
  type: "ephemeral";
186
186
  } | undefined;
@@ -202,9 +202,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
202
202
  } | {
203
203
  type: "image";
204
204
  source: {
205
+ data: string;
205
206
  type: "base64";
206
207
  media_type: "image/jpeg";
207
- data: string;
208
208
  };
209
209
  cache_control?: {
210
210
  type: "ephemeral";
@@ -213,8 +213,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
213
213
  role: "user" | "assistant";
214
214
  }, {
215
215
  content: string | ({
216
- type: "text";
217
216
  text: string;
217
+ type: "text";
218
218
  cache_control?: {
219
219
  type: "ephemeral";
220
220
  } | undefined;
@@ -236,9 +236,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
236
236
  } | {
237
237
  type: "image";
238
238
  source: {
239
+ data: string;
239
240
  type: "base64";
240
241
  media_type: "image/jpeg";
241
- data: string;
242
242
  };
243
243
  cache_control?: {
244
244
  type: "ephemeral";
@@ -258,13 +258,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
258
258
  diffCached: z.ZodString;
259
259
  lastCommitMessages: z.ZodString;
260
260
  }, "strip", z.ZodTypeAny, {
261
- diff: string;
262
261
  status: string;
262
+ diff: string;
263
263
  diffCached: string;
264
264
  lastCommitMessages: string;
265
265
  }, {
266
- diff: string;
267
266
  status: string;
267
+ diff: string;
268
268
  diffCached: string;
269
269
  lastCommitMessages: string;
270
270
  }>;
@@ -308,8 +308,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
308
308
  fileTokenScores: Record<string, Record<string, number>>;
309
309
  knowledgeFiles: Record<string, string>;
310
310
  gitChanges: {
311
- diff: string;
312
311
  status: string;
312
+ diff: string;
313
313
  diffCached: string;
314
314
  lastCommitMessages: string;
315
315
  };
@@ -334,8 +334,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
334
334
  fileTokenScores: Record<string, Record<string, number>>;
335
335
  knowledgeFiles: Record<string, string>;
336
336
  gitChanges: {
337
- diff: string;
338
337
  status: string;
338
+ diff: string;
339
339
  diffCached: string;
340
340
  lastCommitMessages: string;
341
341
  };
@@ -360,23 +360,50 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
360
360
  path: z.ZodString;
361
361
  content: z.ZodString;
362
362
  }, "strip", z.ZodTypeAny, {
363
- type: "patch" | "file";
364
363
  path: string;
364
+ type: "file" | "patch";
365
365
  content: string;
366
366
  }, {
367
- type: "patch" | "file";
368
367
  path: string;
368
+ type: "file" | "patch";
369
369
  content: string;
370
370
  }>, "many">;
371
371
  costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
372
372
  }, "strip", z.ZodTypeAny, {
373
373
  type: "user-input";
374
+ fileContext: {
375
+ currentWorkingDirectory: string;
376
+ fileTree: import("../util/file").FileTreeNode[];
377
+ fileTokenScores: Record<string, Record<string, number>>;
378
+ knowledgeFiles: Record<string, string>;
379
+ gitChanges: {
380
+ status: string;
381
+ diff: string;
382
+ diffCached: string;
383
+ lastCommitMessages: string;
384
+ };
385
+ changesSinceLastChat: Record<string, string>;
386
+ shellConfigFiles: Record<string, string>;
387
+ systemInfo: {
388
+ platform: string;
389
+ shell: string;
390
+ nodeVersion: string;
391
+ arch: string;
392
+ homedir: string;
393
+ cpus: number;
394
+ };
395
+ fileVersions: {
396
+ path: string;
397
+ content: string;
398
+ }[][];
399
+ userKnowledgeFiles?: Record<string, string> | undefined;
400
+ };
374
401
  fingerprintId: string;
375
402
  userInputId: string;
376
403
  messages: {
377
404
  content: string | ({
378
- type: "text";
379
405
  text: string;
406
+ type: "text";
380
407
  cache_control?: {
381
408
  type: "ephemeral";
382
409
  } | undefined;
@@ -398,9 +425,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
398
425
  } | {
399
426
  type: "image";
400
427
  source: {
428
+ data: string;
401
429
  type: "base64";
402
430
  media_type: "image/jpeg";
403
- data: string;
404
431
  };
405
432
  cache_control?: {
406
433
  type: "ephemeral";
@@ -408,14 +435,23 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
408
435
  })[];
409
436
  role: "user" | "assistant";
410
437
  }[];
438
+ changesAlreadyApplied: {
439
+ path: string;
440
+ type: "file" | "patch";
441
+ content: string;
442
+ }[];
443
+ costMode: "max" | "lite" | "normal";
444
+ authToken?: string | undefined;
445
+ }, {
446
+ type: "user-input";
411
447
  fileContext: {
412
448
  currentWorkingDirectory: string;
413
449
  fileTree: import("../util/file").FileTreeNode[];
414
450
  fileTokenScores: Record<string, Record<string, number>>;
415
451
  knowledgeFiles: Record<string, string>;
416
452
  gitChanges: {
417
- diff: string;
418
453
  status: string;
454
+ diff: string;
419
455
  diffCached: string;
420
456
  lastCommitMessages: string;
421
457
  };
@@ -435,21 +471,12 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
435
471
  }[][];
436
472
  userKnowledgeFiles?: Record<string, string> | undefined;
437
473
  };
438
- changesAlreadyApplied: {
439
- type: "patch" | "file";
440
- path: string;
441
- content: string;
442
- }[];
443
- costMode: "lite" | "normal" | "max";
444
- authToken?: string | undefined;
445
- }, {
446
- type: "user-input";
447
474
  fingerprintId: string;
448
475
  userInputId: string;
449
476
  messages: {
450
477
  content: string | ({
451
- type: "text";
452
478
  text: string;
479
+ type: "text";
453
480
  cache_control?: {
454
481
  type: "ephemeral";
455
482
  } | undefined;
@@ -471,9 +498,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
471
498
  } | {
472
499
  type: "image";
473
500
  source: {
501
+ data: string;
474
502
  type: "base64";
475
503
  media_type: "image/jpeg";
476
- data: string;
477
504
  };
478
505
  cache_control?: {
479
506
  type: "ephemeral";
@@ -481,40 +508,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
481
508
  })[];
482
509
  role: "user" | "assistant";
483
510
  }[];
484
- fileContext: {
485
- currentWorkingDirectory: string;
486
- fileTree: import("../util/file").FileTreeNode[];
487
- fileTokenScores: Record<string, Record<string, number>>;
488
- knowledgeFiles: Record<string, string>;
489
- gitChanges: {
490
- diff: string;
491
- status: string;
492
- diffCached: string;
493
- lastCommitMessages: string;
494
- };
495
- changesSinceLastChat: Record<string, string>;
496
- shellConfigFiles: Record<string, string>;
497
- systemInfo: {
498
- platform: string;
499
- shell: string;
500
- nodeVersion: string;
501
- arch: string;
502
- homedir: string;
503
- cpus: number;
504
- };
505
- fileVersions: {
506
- path: string;
507
- content: string;
508
- }[][];
509
- userKnowledgeFiles?: Record<string, string> | undefined;
510
- };
511
511
  changesAlreadyApplied: {
512
- type: "patch" | "file";
513
512
  path: string;
513
+ type: "file" | "patch";
514
514
  content: string;
515
515
  }[];
516
516
  authToken?: string | undefined;
517
- costMode?: "lite" | "normal" | "max" | undefined;
517
+ costMode?: "max" | "lite" | "normal" | undefined;
518
518
  }>, z.ZodObject<{
519
519
  type: z.ZodLiteral<"prompt">;
520
520
  promptId: z.ZodString;
@@ -536,13 +536,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
536
536
  diffCached: z.ZodString;
537
537
  lastCommitMessages: z.ZodString;
538
538
  }, "strip", z.ZodTypeAny, {
539
- diff: string;
540
539
  status: string;
540
+ diff: string;
541
541
  diffCached: string;
542
542
  lastCommitMessages: string;
543
543
  }, {
544
- diff: string;
545
544
  status: string;
545
+ diff: string;
546
546
  diffCached: string;
547
547
  lastCommitMessages: string;
548
548
  }>;
@@ -586,8 +586,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
586
586
  fileTokenScores: Record<string, Record<string, number>>;
587
587
  knowledgeFiles: Record<string, string>;
588
588
  gitChanges: {
589
- diff: string;
590
589
  status: string;
590
+ diff: string;
591
591
  diffCached: string;
592
592
  lastCommitMessages: string;
593
593
  };
@@ -612,8 +612,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
612
612
  fileTokenScores: Record<string, Record<string, number>>;
613
613
  knowledgeFiles: Record<string, string>;
614
614
  gitChanges: {
615
- diff: string;
616
615
  status: string;
616
+ diff: string;
617
617
  diffCached: string;
618
618
  lastCommitMessages: string;
619
619
  };
@@ -646,14 +646,14 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
646
646
  type: "ephemeral";
647
647
  }>>;
648
648
  }, "strip", z.ZodTypeAny, {
649
- type: "text";
650
649
  text: string;
650
+ type: "text";
651
651
  cache_control?: {
652
652
  type: "ephemeral";
653
653
  } | undefined;
654
654
  }, {
655
- type: "text";
656
655
  text: string;
656
+ type: "text";
657
657
  cache_control?: {
658
658
  type: "ephemeral";
659
659
  } | undefined;
@@ -717,13 +717,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
717
717
  media_type: z.ZodLiteral<"image/jpeg">;
718
718
  data: z.ZodString;
719
719
  }, "strip", z.ZodTypeAny, {
720
+ data: string;
720
721
  type: "base64";
721
722
  media_type: "image/jpeg";
722
- data: string;
723
723
  }, {
724
+ data: string;
724
725
  type: "base64";
725
726
  media_type: "image/jpeg";
726
- data: string;
727
727
  }>;
728
728
  cache_control: z.ZodOptional<z.ZodObject<{
729
729
  type: z.ZodLiteral<"ephemeral">;
@@ -735,9 +735,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
735
735
  }, "strip", z.ZodTypeAny, {
736
736
  type: "image";
737
737
  source: {
738
+ data: string;
738
739
  type: "base64";
739
740
  media_type: "image/jpeg";
740
- data: string;
741
741
  };
742
742
  cache_control?: {
743
743
  type: "ephemeral";
@@ -745,9 +745,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
745
745
  }, {
746
746
  type: "image";
747
747
  source: {
748
+ data: string;
748
749
  type: "base64";
749
750
  media_type: "image/jpeg";
750
- data: string;
751
751
  };
752
752
  cache_control?: {
753
753
  type: "ephemeral";
@@ -755,8 +755,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
755
755
  }>]>, "many">]>;
756
756
  }, "strip", z.ZodTypeAny, {
757
757
  content: string | ({
758
- type: "text";
759
758
  text: string;
759
+ type: "text";
760
760
  cache_control?: {
761
761
  type: "ephemeral";
762
762
  } | undefined;
@@ -778,9 +778,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
778
778
  } | {
779
779
  type: "image";
780
780
  source: {
781
+ data: string;
781
782
  type: "base64";
782
783
  media_type: "image/jpeg";
783
- data: string;
784
784
  };
785
785
  cache_control?: {
786
786
  type: "ephemeral";
@@ -789,8 +789,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
789
789
  role: "user" | "assistant";
790
790
  }, {
791
791
  content: string | ({
792
- type: "text";
793
792
  text: string;
793
+ type: "text";
794
794
  cache_control?: {
795
795
  type: "ephemeral";
796
796
  } | undefined;
@@ -812,9 +812,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
812
812
  } | {
813
813
  type: "image";
814
814
  source: {
815
+ data: string;
815
816
  type: "base64";
816
817
  media_type: "image/jpeg";
817
- data: string;
818
818
  };
819
819
  cache_control?: {
820
820
  type: "ephemeral";
@@ -823,14 +823,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
823
823
  role: "user" | "assistant";
824
824
  }>, "many">;
825
825
  }, "strip", z.ZodTypeAny, {
826
+ agentContext: string;
826
827
  fileContext: {
827
828
  currentWorkingDirectory: string;
828
829
  fileTree: import("../util/file").FileTreeNode[];
829
830
  fileTokenScores: Record<string, Record<string, number>>;
830
831
  knowledgeFiles: Record<string, string>;
831
832
  gitChanges: {
832
- diff: string;
833
833
  status: string;
834
+ diff: string;
834
835
  diffCached: string;
835
836
  lastCommitMessages: string;
836
837
  };
@@ -850,11 +851,10 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
850
851
  }[][];
851
852
  userKnowledgeFiles?: Record<string, string> | undefined;
852
853
  };
853
- agentContext: string;
854
854
  messageHistory: {
855
855
  content: string | ({
856
- type: "text";
857
856
  text: string;
857
+ type: "text";
858
858
  cache_control?: {
859
859
  type: "ephemeral";
860
860
  } | undefined;
@@ -876,9 +876,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
876
876
  } | {
877
877
  type: "image";
878
878
  source: {
879
+ data: string;
879
880
  type: "base64";
880
881
  media_type: "image/jpeg";
881
- data: string;
882
882
  };
883
883
  cache_control?: {
884
884
  type: "ephemeral";
@@ -887,14 +887,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
887
887
  role: "user" | "assistant";
888
888
  }[];
889
889
  }, {
890
+ agentContext: string;
890
891
  fileContext: {
891
892
  currentWorkingDirectory: string;
892
893
  fileTree: import("../util/file").FileTreeNode[];
893
894
  fileTokenScores: Record<string, Record<string, number>>;
894
895
  knowledgeFiles: Record<string, string>;
895
896
  gitChanges: {
896
- diff: string;
897
897
  status: string;
898
+ diff: string;
898
899
  diffCached: string;
899
900
  lastCommitMessages: string;
900
901
  };
@@ -914,11 +915,10 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
914
915
  }[][];
915
916
  userKnowledgeFiles?: Record<string, string> | undefined;
916
917
  };
917
- agentContext: string;
918
918
  messageHistory: {
919
919
  content: string | ({
920
- type: "text";
921
920
  text: string;
921
+ type: "text";
922
922
  cache_control?: {
923
923
  type: "ephemeral";
924
924
  } | undefined;
@@ -940,9 +940,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
940
940
  } | {
941
941
  type: "image";
942
942
  source: {
943
+ data: string;
943
944
  type: "base64";
944
945
  media_type: "image/jpeg";
945
- data: string;
946
946
  };
947
947
  cache_control?: {
948
948
  type: "ephemeral";
@@ -967,17 +967,18 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
967
967
  }, "strip", z.ZodTypeAny, {
968
968
  type: "prompt";
969
969
  fingerprintId: string;
970
- costMode: "lite" | "normal" | "max";
970
+ costMode: "max" | "lite" | "normal";
971
971
  promptId: string;
972
972
  agentState: {
973
+ agentContext: string;
973
974
  fileContext: {
974
975
  currentWorkingDirectory: string;
975
976
  fileTree: import("../util/file").FileTreeNode[];
976
977
  fileTokenScores: Record<string, Record<string, number>>;
977
978
  knowledgeFiles: Record<string, string>;
978
979
  gitChanges: {
979
- diff: string;
980
980
  status: string;
981
+ diff: string;
981
982
  diffCached: string;
982
983
  lastCommitMessages: string;
983
984
  };
@@ -997,11 +998,10 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
997
998
  }[][];
998
999
  userKnowledgeFiles?: Record<string, string> | undefined;
999
1000
  };
1000
- agentContext: string;
1001
1001
  messageHistory: {
1002
1002
  content: string | ({
1003
- type: "text";
1004
1003
  text: string;
1004
+ type: "text";
1005
1005
  cache_control?: {
1006
1006
  type: "ephemeral";
1007
1007
  } | undefined;
@@ -1023,9 +1023,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1023
1023
  } | {
1024
1024
  type: "image";
1025
1025
  source: {
1026
+ data: string;
1026
1027
  type: "base64";
1027
1028
  media_type: "image/jpeg";
1028
- data: string;
1029
1029
  };
1030
1030
  cache_control?: {
1031
1031
  type: "ephemeral";
@@ -1046,14 +1046,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1046
1046
  fingerprintId: string;
1047
1047
  promptId: string;
1048
1048
  agentState: {
1049
+ agentContext: string;
1049
1050
  fileContext: {
1050
1051
  currentWorkingDirectory: string;
1051
1052
  fileTree: import("../util/file").FileTreeNode[];
1052
1053
  fileTokenScores: Record<string, Record<string, number>>;
1053
1054
  knowledgeFiles: Record<string, string>;
1054
1055
  gitChanges: {
1055
- diff: string;
1056
1056
  status: string;
1057
+ diff: string;
1057
1058
  diffCached: string;
1058
1059
  lastCommitMessages: string;
1059
1060
  };
@@ -1073,11 +1074,10 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1073
1074
  }[][];
1074
1075
  userKnowledgeFiles?: Record<string, string> | undefined;
1075
1076
  };
1076
- agentContext: string;
1077
1077
  messageHistory: {
1078
1078
  content: string | ({
1079
- type: "text";
1080
1079
  text: string;
1080
+ type: "text";
1081
1081
  cache_control?: {
1082
1082
  type: "ephemeral";
1083
1083
  } | undefined;
@@ -1099,9 +1099,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1099
1099
  } | {
1100
1100
  type: "image";
1101
1101
  source: {
1102
+ data: string;
1102
1103
  type: "base64";
1103
1104
  media_type: "image/jpeg";
1104
- data: string;
1105
1105
  };
1106
1106
  cache_control?: {
1107
1107
  type: "ephemeral";
@@ -1116,7 +1116,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1116
1116
  result: string;
1117
1117
  }[];
1118
1118
  authToken?: string | undefined;
1119
- costMode?: "lite" | "normal" | "max" | undefined;
1119
+ costMode?: "max" | "lite" | "normal" | undefined;
1120
1120
  prompt?: string | undefined;
1121
1121
  }>, z.ZodObject<{
1122
1122
  type: z.ZodLiteral<"read-files-response">;
@@ -1146,13 +1146,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1146
1146
  diffCached: z.ZodString;
1147
1147
  lastCommitMessages: z.ZodString;
1148
1148
  }, "strip", z.ZodTypeAny, {
1149
- diff: string;
1150
1149
  status: string;
1150
+ diff: string;
1151
1151
  diffCached: string;
1152
1152
  lastCommitMessages: string;
1153
1153
  }, {
1154
- diff: string;
1155
1154
  status: string;
1155
+ diff: string;
1156
1156
  diffCached: string;
1157
1157
  lastCommitMessages: string;
1158
1158
  }>;
@@ -1196,8 +1196,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1196
1196
  fileTokenScores: Record<string, Record<string, number>>;
1197
1197
  knowledgeFiles: Record<string, string>;
1198
1198
  gitChanges: {
1199
- diff: string;
1200
1199
  status: string;
1200
+ diff: string;
1201
1201
  diffCached: string;
1202
1202
  lastCommitMessages: string;
1203
1203
  };
@@ -1222,8 +1222,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1222
1222
  fileTokenScores: Record<string, Record<string, number>>;
1223
1223
  knowledgeFiles: Record<string, string>;
1224
1224
  gitChanges: {
1225
- diff: string;
1226
1225
  status: string;
1226
+ diff: string;
1227
1227
  diffCached: string;
1228
1228
  lastCommitMessages: string;
1229
1229
  };
@@ -1245,15 +1245,14 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1245
1245
  }>;
1246
1246
  }, "strip", z.ZodTypeAny, {
1247
1247
  type: "init";
1248
- fingerprintId: string;
1249
1248
  fileContext: {
1250
1249
  currentWorkingDirectory: string;
1251
1250
  fileTree: import("../util/file").FileTreeNode[];
1252
1251
  fileTokenScores: Record<string, Record<string, number>>;
1253
1252
  knowledgeFiles: Record<string, string>;
1254
1253
  gitChanges: {
1255
- diff: string;
1256
1254
  status: string;
1255
+ diff: string;
1257
1256
  diffCached: string;
1258
1257
  lastCommitMessages: string;
1259
1258
  };
@@ -1273,18 +1272,18 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1273
1272
  }[][];
1274
1273
  userKnowledgeFiles?: Record<string, string> | undefined;
1275
1274
  };
1275
+ fingerprintId: string;
1276
1276
  authToken?: string | undefined;
1277
1277
  }, {
1278
1278
  type: "init";
1279
- fingerprintId: string;
1280
1279
  fileContext: {
1281
1280
  currentWorkingDirectory: string;
1282
1281
  fileTree: import("../util/file").FileTreeNode[];
1283
1282
  fileTokenScores: Record<string, Record<string, number>>;
1284
1283
  knowledgeFiles: Record<string, string>;
1285
1284
  gitChanges: {
1286
- diff: string;
1287
1285
  status: string;
1286
+ diff: string;
1288
1287
  diffCached: string;
1289
1288
  lastCommitMessages: string;
1290
1289
  };
@@ -1304,6 +1303,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1304
1303
  }[][];
1305
1304
  userKnowledgeFiles?: Record<string, string> | undefined;
1306
1305
  };
1306
+ fingerprintId: string;
1307
1307
  authToken?: string | undefined;
1308
1308
  }>, z.ZodObject<{
1309
1309
  type: z.ZodLiteral<"usage">;
@@ -1334,15 +1334,41 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1334
1334
  authToken?: string | undefined;
1335
1335
  }>]>;
1336
1336
  }, "strip", z.ZodTypeAny, {
1337
- type: "action";
1338
1337
  data: {
1339
1338
  type: "user-input";
1339
+ fileContext: {
1340
+ currentWorkingDirectory: string;
1341
+ fileTree: import("../util/file").FileTreeNode[];
1342
+ fileTokenScores: Record<string, Record<string, number>>;
1343
+ knowledgeFiles: Record<string, string>;
1344
+ gitChanges: {
1345
+ status: string;
1346
+ diff: string;
1347
+ diffCached: string;
1348
+ lastCommitMessages: string;
1349
+ };
1350
+ changesSinceLastChat: Record<string, string>;
1351
+ shellConfigFiles: Record<string, string>;
1352
+ systemInfo: {
1353
+ platform: string;
1354
+ shell: string;
1355
+ nodeVersion: string;
1356
+ arch: string;
1357
+ homedir: string;
1358
+ cpus: number;
1359
+ };
1360
+ fileVersions: {
1361
+ path: string;
1362
+ content: string;
1363
+ }[][];
1364
+ userKnowledgeFiles?: Record<string, string> | undefined;
1365
+ };
1340
1366
  fingerprintId: string;
1341
1367
  userInputId: string;
1342
1368
  messages: {
1343
1369
  content: string | ({
1344
- type: "text";
1345
1370
  text: string;
1371
+ type: "text";
1346
1372
  cache_control?: {
1347
1373
  type: "ephemeral";
1348
1374
  } | undefined;
@@ -1364,9 +1390,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1364
1390
  } | {
1365
1391
  type: "image";
1366
1392
  source: {
1393
+ data: string;
1367
1394
  type: "base64";
1368
1395
  media_type: "image/jpeg";
1369
- data: string;
1370
1396
  };
1371
1397
  cache_control?: {
1372
1398
  type: "ephemeral";
@@ -1374,54 +1400,28 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1374
1400
  })[];
1375
1401
  role: "user" | "assistant";
1376
1402
  }[];
1377
- fileContext: {
1378
- currentWorkingDirectory: string;
1379
- fileTree: import("../util/file").FileTreeNode[];
1380
- fileTokenScores: Record<string, Record<string, number>>;
1381
- knowledgeFiles: Record<string, string>;
1382
- gitChanges: {
1383
- diff: string;
1384
- status: string;
1385
- diffCached: string;
1386
- lastCommitMessages: string;
1387
- };
1388
- changesSinceLastChat: Record<string, string>;
1389
- shellConfigFiles: Record<string, string>;
1390
- systemInfo: {
1391
- platform: string;
1392
- shell: string;
1393
- nodeVersion: string;
1394
- arch: string;
1395
- homedir: string;
1396
- cpus: number;
1397
- };
1398
- fileVersions: {
1399
- path: string;
1400
- content: string;
1401
- }[][];
1402
- userKnowledgeFiles?: Record<string, string> | undefined;
1403
- };
1404
1403
  changesAlreadyApplied: {
1405
- type: "patch" | "file";
1406
1404
  path: string;
1405
+ type: "file" | "patch";
1407
1406
  content: string;
1408
1407
  }[];
1409
- costMode: "lite" | "normal" | "max";
1408
+ costMode: "max" | "lite" | "normal";
1410
1409
  authToken?: string | undefined;
1411
1410
  } | {
1412
1411
  type: "prompt";
1413
1412
  fingerprintId: string;
1414
- costMode: "lite" | "normal" | "max";
1413
+ costMode: "max" | "lite" | "normal";
1415
1414
  promptId: string;
1416
1415
  agentState: {
1416
+ agentContext: string;
1417
1417
  fileContext: {
1418
1418
  currentWorkingDirectory: string;
1419
1419
  fileTree: import("../util/file").FileTreeNode[];
1420
1420
  fileTokenScores: Record<string, Record<string, number>>;
1421
1421
  knowledgeFiles: Record<string, string>;
1422
1422
  gitChanges: {
1423
- diff: string;
1424
1423
  status: string;
1424
+ diff: string;
1425
1425
  diffCached: string;
1426
1426
  lastCommitMessages: string;
1427
1427
  };
@@ -1441,11 +1441,10 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1441
1441
  }[][];
1442
1442
  userKnowledgeFiles?: Record<string, string> | undefined;
1443
1443
  };
1444
- agentContext: string;
1445
1444
  messageHistory: {
1446
1445
  content: string | ({
1447
- type: "text";
1448
1446
  text: string;
1447
+ type: "text";
1449
1448
  cache_control?: {
1450
1449
  type: "ephemeral";
1451
1450
  } | undefined;
@@ -1467,9 +1466,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1467
1466
  } | {
1468
1467
  type: "image";
1469
1468
  source: {
1469
+ data: string;
1470
1470
  type: "base64";
1471
1471
  media_type: "image/jpeg";
1472
- data: string;
1473
1472
  };
1474
1473
  cache_control?: {
1475
1474
  type: "ephemeral";
@@ -1491,15 +1490,14 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1491
1490
  requestId?: string | undefined;
1492
1491
  } | {
1493
1492
  type: "init";
1494
- fingerprintId: string;
1495
1493
  fileContext: {
1496
1494
  currentWorkingDirectory: string;
1497
1495
  fileTree: import("../util/file").FileTreeNode[];
1498
1496
  fileTokenScores: Record<string, Record<string, number>>;
1499
1497
  knowledgeFiles: Record<string, string>;
1500
1498
  gitChanges: {
1501
- diff: string;
1502
1499
  status: string;
1500
+ diff: string;
1503
1501
  diffCached: string;
1504
1502
  lastCommitMessages: string;
1505
1503
  };
@@ -1519,6 +1517,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1519
1517
  }[][];
1520
1518
  userKnowledgeFiles?: Record<string, string> | undefined;
1521
1519
  };
1520
+ fingerprintId: string;
1522
1521
  authToken?: string | undefined;
1523
1522
  } | {
1524
1523
  type: "usage";
@@ -1530,17 +1529,44 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1530
1529
  stagedChanges: string;
1531
1530
  authToken?: string | undefined;
1532
1531
  };
1532
+ type: "action";
1533
1533
  txid: number;
1534
1534
  }, {
1535
- type: "action";
1536
1535
  data: {
1537
1536
  type: "user-input";
1538
- fingerprintId: string;
1537
+ fileContext: {
1538
+ currentWorkingDirectory: string;
1539
+ fileTree: import("../util/file").FileTreeNode[];
1540
+ fileTokenScores: Record<string, Record<string, number>>;
1541
+ knowledgeFiles: Record<string, string>;
1542
+ gitChanges: {
1543
+ status: string;
1544
+ diff: string;
1545
+ diffCached: string;
1546
+ lastCommitMessages: string;
1547
+ };
1548
+ changesSinceLastChat: Record<string, string>;
1549
+ shellConfigFiles: Record<string, string>;
1550
+ systemInfo: {
1551
+ platform: string;
1552
+ shell: string;
1553
+ nodeVersion: string;
1554
+ arch: string;
1555
+ homedir: string;
1556
+ cpus: number;
1557
+ };
1558
+ fileVersions: {
1559
+ path: string;
1560
+ content: string;
1561
+ }[][];
1562
+ userKnowledgeFiles?: Record<string, string> | undefined;
1563
+ };
1564
+ fingerprintId: string;
1539
1565
  userInputId: string;
1540
1566
  messages: {
1541
1567
  content: string | ({
1542
- type: "text";
1543
1568
  text: string;
1569
+ type: "text";
1544
1570
  cache_control?: {
1545
1571
  type: "ephemeral";
1546
1572
  } | undefined;
@@ -1562,9 +1588,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1562
1588
  } | {
1563
1589
  type: "image";
1564
1590
  source: {
1591
+ data: string;
1565
1592
  type: "base64";
1566
1593
  media_type: "image/jpeg";
1567
- data: string;
1568
1594
  };
1569
1595
  cache_control?: {
1570
1596
  type: "ephemeral";
@@ -1572,53 +1598,27 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1572
1598
  })[];
1573
1599
  role: "user" | "assistant";
1574
1600
  }[];
1575
- fileContext: {
1576
- currentWorkingDirectory: string;
1577
- fileTree: import("../util/file").FileTreeNode[];
1578
- fileTokenScores: Record<string, Record<string, number>>;
1579
- knowledgeFiles: Record<string, string>;
1580
- gitChanges: {
1581
- diff: string;
1582
- status: string;
1583
- diffCached: string;
1584
- lastCommitMessages: string;
1585
- };
1586
- changesSinceLastChat: Record<string, string>;
1587
- shellConfigFiles: Record<string, string>;
1588
- systemInfo: {
1589
- platform: string;
1590
- shell: string;
1591
- nodeVersion: string;
1592
- arch: string;
1593
- homedir: string;
1594
- cpus: number;
1595
- };
1596
- fileVersions: {
1597
- path: string;
1598
- content: string;
1599
- }[][];
1600
- userKnowledgeFiles?: Record<string, string> | undefined;
1601
- };
1602
1601
  changesAlreadyApplied: {
1603
- type: "patch" | "file";
1604
1602
  path: string;
1603
+ type: "file" | "patch";
1605
1604
  content: string;
1606
1605
  }[];
1607
1606
  authToken?: string | undefined;
1608
- costMode?: "lite" | "normal" | "max" | undefined;
1607
+ costMode?: "max" | "lite" | "normal" | undefined;
1609
1608
  } | {
1610
1609
  type: "prompt";
1611
1610
  fingerprintId: string;
1612
1611
  promptId: string;
1613
1612
  agentState: {
1613
+ agentContext: string;
1614
1614
  fileContext: {
1615
1615
  currentWorkingDirectory: string;
1616
1616
  fileTree: import("../util/file").FileTreeNode[];
1617
1617
  fileTokenScores: Record<string, Record<string, number>>;
1618
1618
  knowledgeFiles: Record<string, string>;
1619
1619
  gitChanges: {
1620
- diff: string;
1621
1620
  status: string;
1621
+ diff: string;
1622
1622
  diffCached: string;
1623
1623
  lastCommitMessages: string;
1624
1624
  };
@@ -1638,11 +1638,10 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1638
1638
  }[][];
1639
1639
  userKnowledgeFiles?: Record<string, string> | undefined;
1640
1640
  };
1641
- agentContext: string;
1642
1641
  messageHistory: {
1643
1642
  content: string | ({
1644
- type: "text";
1645
1643
  text: string;
1644
+ type: "text";
1646
1645
  cache_control?: {
1647
1646
  type: "ephemeral";
1648
1647
  } | undefined;
@@ -1664,9 +1663,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1664
1663
  } | {
1665
1664
  type: "image";
1666
1665
  source: {
1666
+ data: string;
1667
1667
  type: "base64";
1668
1668
  media_type: "image/jpeg";
1669
- data: string;
1670
1669
  };
1671
1670
  cache_control?: {
1672
1671
  type: "ephemeral";
@@ -1681,7 +1680,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1681
1680
  result: string;
1682
1681
  }[];
1683
1682
  authToken?: string | undefined;
1684
- costMode?: "lite" | "normal" | "max" | undefined;
1683
+ costMode?: "max" | "lite" | "normal" | undefined;
1685
1684
  prompt?: string | undefined;
1686
1685
  } | {
1687
1686
  type: "read-files-response";
@@ -1689,15 +1688,14 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1689
1688
  requestId?: string | undefined;
1690
1689
  } | {
1691
1690
  type: "init";
1692
- fingerprintId: string;
1693
1691
  fileContext: {
1694
1692
  currentWorkingDirectory: string;
1695
1693
  fileTree: import("../util/file").FileTreeNode[];
1696
1694
  fileTokenScores: Record<string, Record<string, number>>;
1697
1695
  knowledgeFiles: Record<string, string>;
1698
1696
  gitChanges: {
1699
- diff: string;
1700
1697
  status: string;
1698
+ diff: string;
1701
1699
  diffCached: string;
1702
1700
  lastCommitMessages: string;
1703
1701
  };
@@ -1717,6 +1715,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1717
1715
  }[][];
1718
1716
  userKnowledgeFiles?: Record<string, string> | undefined;
1719
1717
  };
1718
+ fingerprintId: string;
1720
1719
  authToken?: string | undefined;
1721
1720
  } | {
1722
1721
  type: "usage";
@@ -1728,6 +1727,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1728
1727
  stagedChanges: string;
1729
1728
  authToken?: string | undefined;
1730
1729
  };
1730
+ type: "action";
1731
1731
  txid: number;
1732
1732
  }>;
1733
1733
  };
@@ -1797,14 +1797,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1797
1797
  type: "ephemeral";
1798
1798
  }>>;
1799
1799
  }, "strip", z.ZodTypeAny, {
1800
- type: "text";
1801
1800
  text: string;
1801
+ type: "text";
1802
1802
  cache_control?: {
1803
1803
  type: "ephemeral";
1804
1804
  } | undefined;
1805
1805
  }, {
1806
- type: "text";
1807
1806
  text: string;
1807
+ type: "text";
1808
1808
  cache_control?: {
1809
1809
  type: "ephemeral";
1810
1810
  } | undefined;
@@ -1868,13 +1868,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1868
1868
  media_type: z.ZodLiteral<"image/jpeg">;
1869
1869
  data: z.ZodString;
1870
1870
  }, "strip", z.ZodTypeAny, {
1871
+ data: string;
1871
1872
  type: "base64";
1872
1873
  media_type: "image/jpeg";
1873
- data: string;
1874
1874
  }, {
1875
+ data: string;
1875
1876
  type: "base64";
1876
1877
  media_type: "image/jpeg";
1877
- data: string;
1878
1878
  }>;
1879
1879
  cache_control: z.ZodOptional<z.ZodObject<{
1880
1880
  type: z.ZodLiteral<"ephemeral">;
@@ -1886,9 +1886,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1886
1886
  }, "strip", z.ZodTypeAny, {
1887
1887
  type: "image";
1888
1888
  source: {
1889
+ data: string;
1889
1890
  type: "base64";
1890
1891
  media_type: "image/jpeg";
1891
- data: string;
1892
1892
  };
1893
1893
  cache_control?: {
1894
1894
  type: "ephemeral";
@@ -1896,9 +1896,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1896
1896
  }, {
1897
1897
  type: "image";
1898
1898
  source: {
1899
+ data: string;
1899
1900
  type: "base64";
1900
1901
  media_type: "image/jpeg";
1901
- data: string;
1902
1902
  };
1903
1903
  cache_control?: {
1904
1904
  type: "ephemeral";
@@ -1906,8 +1906,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1906
1906
  }>]>, "many">]>;
1907
1907
  }, "strip", z.ZodTypeAny, {
1908
1908
  content: string | ({
1909
- type: "text";
1910
1909
  text: string;
1910
+ type: "text";
1911
1911
  cache_control?: {
1912
1912
  type: "ephemeral";
1913
1913
  } | undefined;
@@ -1929,9 +1929,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1929
1929
  } | {
1930
1930
  type: "image";
1931
1931
  source: {
1932
+ data: string;
1932
1933
  type: "base64";
1933
1934
  media_type: "image/jpeg";
1934
- data: string;
1935
1935
  };
1936
1936
  cache_control?: {
1937
1937
  type: "ephemeral";
@@ -1940,8 +1940,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1940
1940
  role: "user" | "assistant";
1941
1941
  }, {
1942
1942
  content: string | ({
1943
- type: "text";
1944
1943
  text: string;
1944
+ type: "text";
1945
1945
  cache_control?: {
1946
1946
  type: "ephemeral";
1947
1947
  } | undefined;
@@ -1963,9 +1963,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1963
1963
  } | {
1964
1964
  type: "image";
1965
1965
  source: {
1966
+ data: string;
1966
1967
  type: "base64";
1967
1968
  media_type: "image/jpeg";
1968
- data: string;
1969
1969
  };
1970
1970
  cache_control?: {
1971
1971
  type: "ephemeral";
@@ -1985,13 +1985,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1985
1985
  diffCached: z.ZodString;
1986
1986
  lastCommitMessages: z.ZodString;
1987
1987
  }, "strip", z.ZodTypeAny, {
1988
- diff: string;
1989
1988
  status: string;
1989
+ diff: string;
1990
1990
  diffCached: string;
1991
1991
  lastCommitMessages: string;
1992
1992
  }, {
1993
- diff: string;
1994
1993
  status: string;
1994
+ diff: string;
1995
1995
  diffCached: string;
1996
1996
  lastCommitMessages: string;
1997
1997
  }>;
@@ -2035,8 +2035,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2035
2035
  fileTokenScores: Record<string, Record<string, number>>;
2036
2036
  knowledgeFiles: Record<string, string>;
2037
2037
  gitChanges: {
2038
- diff: string;
2039
2038
  status: string;
2039
+ diff: string;
2040
2040
  diffCached: string;
2041
2041
  lastCommitMessages: string;
2042
2042
  };
@@ -2061,8 +2061,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2061
2061
  fileTokenScores: Record<string, Record<string, number>>;
2062
2062
  knowledgeFiles: Record<string, string>;
2063
2063
  gitChanges: {
2064
- diff: string;
2065
2064
  status: string;
2065
+ diff: string;
2066
2066
  diffCached: string;
2067
2067
  lastCommitMessages: string;
2068
2068
  };
@@ -2087,23 +2087,50 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2087
2087
  path: z.ZodString;
2088
2088
  content: z.ZodString;
2089
2089
  }, "strip", z.ZodTypeAny, {
2090
- type: "patch" | "file";
2091
2090
  path: string;
2091
+ type: "file" | "patch";
2092
2092
  content: string;
2093
2093
  }, {
2094
- type: "patch" | "file";
2095
2094
  path: string;
2095
+ type: "file" | "patch";
2096
2096
  content: string;
2097
2097
  }>, "many">;
2098
2098
  costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
2099
2099
  }, "strip", z.ZodTypeAny, {
2100
2100
  type: "user-input";
2101
+ fileContext: {
2102
+ currentWorkingDirectory: string;
2103
+ fileTree: import("../util/file").FileTreeNode[];
2104
+ fileTokenScores: Record<string, Record<string, number>>;
2105
+ knowledgeFiles: Record<string, string>;
2106
+ gitChanges: {
2107
+ status: string;
2108
+ diff: string;
2109
+ diffCached: string;
2110
+ lastCommitMessages: string;
2111
+ };
2112
+ changesSinceLastChat: Record<string, string>;
2113
+ shellConfigFiles: Record<string, string>;
2114
+ systemInfo: {
2115
+ platform: string;
2116
+ shell: string;
2117
+ nodeVersion: string;
2118
+ arch: string;
2119
+ homedir: string;
2120
+ cpus: number;
2121
+ };
2122
+ fileVersions: {
2123
+ path: string;
2124
+ content: string;
2125
+ }[][];
2126
+ userKnowledgeFiles?: Record<string, string> | undefined;
2127
+ };
2101
2128
  fingerprintId: string;
2102
2129
  userInputId: string;
2103
2130
  messages: {
2104
2131
  content: string | ({
2105
- type: "text";
2106
2132
  text: string;
2133
+ type: "text";
2107
2134
  cache_control?: {
2108
2135
  type: "ephemeral";
2109
2136
  } | undefined;
@@ -2125,9 +2152,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2125
2152
  } | {
2126
2153
  type: "image";
2127
2154
  source: {
2155
+ data: string;
2128
2156
  type: "base64";
2129
2157
  media_type: "image/jpeg";
2130
- data: string;
2131
2158
  };
2132
2159
  cache_control?: {
2133
2160
  type: "ephemeral";
@@ -2135,14 +2162,23 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2135
2162
  })[];
2136
2163
  role: "user" | "assistant";
2137
2164
  }[];
2165
+ changesAlreadyApplied: {
2166
+ path: string;
2167
+ type: "file" | "patch";
2168
+ content: string;
2169
+ }[];
2170
+ costMode: "max" | "lite" | "normal";
2171
+ authToken?: string | undefined;
2172
+ }, {
2173
+ type: "user-input";
2138
2174
  fileContext: {
2139
2175
  currentWorkingDirectory: string;
2140
2176
  fileTree: import("../util/file").FileTreeNode[];
2141
2177
  fileTokenScores: Record<string, Record<string, number>>;
2142
2178
  knowledgeFiles: Record<string, string>;
2143
2179
  gitChanges: {
2144
- diff: string;
2145
2180
  status: string;
2181
+ diff: string;
2146
2182
  diffCached: string;
2147
2183
  lastCommitMessages: string;
2148
2184
  };
@@ -2162,21 +2198,12 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2162
2198
  }[][];
2163
2199
  userKnowledgeFiles?: Record<string, string> | undefined;
2164
2200
  };
2165
- changesAlreadyApplied: {
2166
- type: "patch" | "file";
2167
- path: string;
2168
- content: string;
2169
- }[];
2170
- costMode: "lite" | "normal" | "max";
2171
- authToken?: string | undefined;
2172
- }, {
2173
- type: "user-input";
2174
2201
  fingerprintId: string;
2175
2202
  userInputId: string;
2176
2203
  messages: {
2177
2204
  content: string | ({
2178
- type: "text";
2179
2205
  text: string;
2206
+ type: "text";
2180
2207
  cache_control?: {
2181
2208
  type: "ephemeral";
2182
2209
  } | undefined;
@@ -2198,9 +2225,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2198
2225
  } | {
2199
2226
  type: "image";
2200
2227
  source: {
2228
+ data: string;
2201
2229
  type: "base64";
2202
2230
  media_type: "image/jpeg";
2203
- data: string;
2204
2231
  };
2205
2232
  cache_control?: {
2206
2233
  type: "ephemeral";
@@ -2208,40 +2235,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2208
2235
  })[];
2209
2236
  role: "user" | "assistant";
2210
2237
  }[];
2211
- fileContext: {
2212
- currentWorkingDirectory: string;
2213
- fileTree: import("../util/file").FileTreeNode[];
2214
- fileTokenScores: Record<string, Record<string, number>>;
2215
- knowledgeFiles: Record<string, string>;
2216
- gitChanges: {
2217
- diff: string;
2218
- status: string;
2219
- diffCached: string;
2220
- lastCommitMessages: string;
2221
- };
2222
- changesSinceLastChat: Record<string, string>;
2223
- shellConfigFiles: Record<string, string>;
2224
- systemInfo: {
2225
- platform: string;
2226
- shell: string;
2227
- nodeVersion: string;
2228
- arch: string;
2229
- homedir: string;
2230
- cpus: number;
2231
- };
2232
- fileVersions: {
2233
- path: string;
2234
- content: string;
2235
- }[][];
2236
- userKnowledgeFiles?: Record<string, string> | undefined;
2237
- };
2238
2238
  changesAlreadyApplied: {
2239
- type: "patch" | "file";
2240
2239
  path: string;
2240
+ type: "file" | "patch";
2241
2241
  content: string;
2242
2242
  }[];
2243
2243
  authToken?: string | undefined;
2244
- costMode?: "lite" | "normal" | "max" | undefined;
2244
+ costMode?: "max" | "lite" | "normal" | undefined;
2245
2245
  }>, z.ZodObject<{
2246
2246
  type: z.ZodLiteral<"prompt">;
2247
2247
  promptId: z.ZodString;
@@ -2263,13 +2263,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2263
2263
  diffCached: z.ZodString;
2264
2264
  lastCommitMessages: z.ZodString;
2265
2265
  }, "strip", z.ZodTypeAny, {
2266
- diff: string;
2267
2266
  status: string;
2267
+ diff: string;
2268
2268
  diffCached: string;
2269
2269
  lastCommitMessages: string;
2270
2270
  }, {
2271
- diff: string;
2272
2271
  status: string;
2272
+ diff: string;
2273
2273
  diffCached: string;
2274
2274
  lastCommitMessages: string;
2275
2275
  }>;
@@ -2313,8 +2313,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2313
2313
  fileTokenScores: Record<string, Record<string, number>>;
2314
2314
  knowledgeFiles: Record<string, string>;
2315
2315
  gitChanges: {
2316
- diff: string;
2317
2316
  status: string;
2317
+ diff: string;
2318
2318
  diffCached: string;
2319
2319
  lastCommitMessages: string;
2320
2320
  };
@@ -2339,8 +2339,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2339
2339
  fileTokenScores: Record<string, Record<string, number>>;
2340
2340
  knowledgeFiles: Record<string, string>;
2341
2341
  gitChanges: {
2342
- diff: string;
2343
2342
  status: string;
2343
+ diff: string;
2344
2344
  diffCached: string;
2345
2345
  lastCommitMessages: string;
2346
2346
  };
@@ -2373,14 +2373,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2373
2373
  type: "ephemeral";
2374
2374
  }>>;
2375
2375
  }, "strip", z.ZodTypeAny, {
2376
- type: "text";
2377
2376
  text: string;
2377
+ type: "text";
2378
2378
  cache_control?: {
2379
2379
  type: "ephemeral";
2380
2380
  } | undefined;
2381
2381
  }, {
2382
- type: "text";
2383
2382
  text: string;
2383
+ type: "text";
2384
2384
  cache_control?: {
2385
2385
  type: "ephemeral";
2386
2386
  } | undefined;
@@ -2444,13 +2444,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2444
2444
  media_type: z.ZodLiteral<"image/jpeg">;
2445
2445
  data: z.ZodString;
2446
2446
  }, "strip", z.ZodTypeAny, {
2447
+ data: string;
2447
2448
  type: "base64";
2448
2449
  media_type: "image/jpeg";
2449
- data: string;
2450
2450
  }, {
2451
+ data: string;
2451
2452
  type: "base64";
2452
2453
  media_type: "image/jpeg";
2453
- data: string;
2454
2454
  }>;
2455
2455
  cache_control: z.ZodOptional<z.ZodObject<{
2456
2456
  type: z.ZodLiteral<"ephemeral">;
@@ -2462,9 +2462,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2462
2462
  }, "strip", z.ZodTypeAny, {
2463
2463
  type: "image";
2464
2464
  source: {
2465
+ data: string;
2465
2466
  type: "base64";
2466
2467
  media_type: "image/jpeg";
2467
- data: string;
2468
2468
  };
2469
2469
  cache_control?: {
2470
2470
  type: "ephemeral";
@@ -2472,9 +2472,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2472
2472
  }, {
2473
2473
  type: "image";
2474
2474
  source: {
2475
+ data: string;
2475
2476
  type: "base64";
2476
2477
  media_type: "image/jpeg";
2477
- data: string;
2478
2478
  };
2479
2479
  cache_control?: {
2480
2480
  type: "ephemeral";
@@ -2482,8 +2482,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2482
2482
  }>]>, "many">]>;
2483
2483
  }, "strip", z.ZodTypeAny, {
2484
2484
  content: string | ({
2485
- type: "text";
2486
2485
  text: string;
2486
+ type: "text";
2487
2487
  cache_control?: {
2488
2488
  type: "ephemeral";
2489
2489
  } | undefined;
@@ -2505,9 +2505,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2505
2505
  } | {
2506
2506
  type: "image";
2507
2507
  source: {
2508
+ data: string;
2508
2509
  type: "base64";
2509
2510
  media_type: "image/jpeg";
2510
- data: string;
2511
2511
  };
2512
2512
  cache_control?: {
2513
2513
  type: "ephemeral";
@@ -2516,8 +2516,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2516
2516
  role: "user" | "assistant";
2517
2517
  }, {
2518
2518
  content: string | ({
2519
- type: "text";
2520
2519
  text: string;
2520
+ type: "text";
2521
2521
  cache_control?: {
2522
2522
  type: "ephemeral";
2523
2523
  } | undefined;
@@ -2539,9 +2539,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2539
2539
  } | {
2540
2540
  type: "image";
2541
2541
  source: {
2542
+ data: string;
2542
2543
  type: "base64";
2543
2544
  media_type: "image/jpeg";
2544
- data: string;
2545
2545
  };
2546
2546
  cache_control?: {
2547
2547
  type: "ephemeral";
@@ -2550,14 +2550,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2550
2550
  role: "user" | "assistant";
2551
2551
  }>, "many">;
2552
2552
  }, "strip", z.ZodTypeAny, {
2553
+ agentContext: string;
2553
2554
  fileContext: {
2554
2555
  currentWorkingDirectory: string;
2555
2556
  fileTree: import("../util/file").FileTreeNode[];
2556
2557
  fileTokenScores: Record<string, Record<string, number>>;
2557
2558
  knowledgeFiles: Record<string, string>;
2558
2559
  gitChanges: {
2559
- diff: string;
2560
2560
  status: string;
2561
+ diff: string;
2561
2562
  diffCached: string;
2562
2563
  lastCommitMessages: string;
2563
2564
  };
@@ -2577,11 +2578,10 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2577
2578
  }[][];
2578
2579
  userKnowledgeFiles?: Record<string, string> | undefined;
2579
2580
  };
2580
- agentContext: string;
2581
2581
  messageHistory: {
2582
2582
  content: string | ({
2583
- type: "text";
2584
2583
  text: string;
2584
+ type: "text";
2585
2585
  cache_control?: {
2586
2586
  type: "ephemeral";
2587
2587
  } | undefined;
@@ -2603,9 +2603,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2603
2603
  } | {
2604
2604
  type: "image";
2605
2605
  source: {
2606
+ data: string;
2606
2607
  type: "base64";
2607
2608
  media_type: "image/jpeg";
2608
- data: string;
2609
2609
  };
2610
2610
  cache_control?: {
2611
2611
  type: "ephemeral";
@@ -2614,14 +2614,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2614
2614
  role: "user" | "assistant";
2615
2615
  }[];
2616
2616
  }, {
2617
+ agentContext: string;
2617
2618
  fileContext: {
2618
2619
  currentWorkingDirectory: string;
2619
2620
  fileTree: import("../util/file").FileTreeNode[];
2620
2621
  fileTokenScores: Record<string, Record<string, number>>;
2621
2622
  knowledgeFiles: Record<string, string>;
2622
2623
  gitChanges: {
2623
- diff: string;
2624
2624
  status: string;
2625
+ diff: string;
2625
2626
  diffCached: string;
2626
2627
  lastCommitMessages: string;
2627
2628
  };
@@ -2641,11 +2642,10 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2641
2642
  }[][];
2642
2643
  userKnowledgeFiles?: Record<string, string> | undefined;
2643
2644
  };
2644
- agentContext: string;
2645
2645
  messageHistory: {
2646
2646
  content: string | ({
2647
- type: "text";
2648
2647
  text: string;
2648
+ type: "text";
2649
2649
  cache_control?: {
2650
2650
  type: "ephemeral";
2651
2651
  } | undefined;
@@ -2667,9 +2667,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2667
2667
  } | {
2668
2668
  type: "image";
2669
2669
  source: {
2670
+ data: string;
2670
2671
  type: "base64";
2671
2672
  media_type: "image/jpeg";
2672
- data: string;
2673
2673
  };
2674
2674
  cache_control?: {
2675
2675
  type: "ephemeral";
@@ -2694,17 +2694,18 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2694
2694
  }, "strip", z.ZodTypeAny, {
2695
2695
  type: "prompt";
2696
2696
  fingerprintId: string;
2697
- costMode: "lite" | "normal" | "max";
2697
+ costMode: "max" | "lite" | "normal";
2698
2698
  promptId: string;
2699
2699
  agentState: {
2700
+ agentContext: string;
2700
2701
  fileContext: {
2701
2702
  currentWorkingDirectory: string;
2702
2703
  fileTree: import("../util/file").FileTreeNode[];
2703
2704
  fileTokenScores: Record<string, Record<string, number>>;
2704
2705
  knowledgeFiles: Record<string, string>;
2705
2706
  gitChanges: {
2706
- diff: string;
2707
2707
  status: string;
2708
+ diff: string;
2708
2709
  diffCached: string;
2709
2710
  lastCommitMessages: string;
2710
2711
  };
@@ -2724,11 +2725,10 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2724
2725
  }[][];
2725
2726
  userKnowledgeFiles?: Record<string, string> | undefined;
2726
2727
  };
2727
- agentContext: string;
2728
2728
  messageHistory: {
2729
2729
  content: string | ({
2730
- type: "text";
2731
2730
  text: string;
2731
+ type: "text";
2732
2732
  cache_control?: {
2733
2733
  type: "ephemeral";
2734
2734
  } | undefined;
@@ -2750,9 +2750,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2750
2750
  } | {
2751
2751
  type: "image";
2752
2752
  source: {
2753
+ data: string;
2753
2754
  type: "base64";
2754
2755
  media_type: "image/jpeg";
2755
- data: string;
2756
2756
  };
2757
2757
  cache_control?: {
2758
2758
  type: "ephemeral";
@@ -2773,14 +2773,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2773
2773
  fingerprintId: string;
2774
2774
  promptId: string;
2775
2775
  agentState: {
2776
+ agentContext: string;
2776
2777
  fileContext: {
2777
2778
  currentWorkingDirectory: string;
2778
2779
  fileTree: import("../util/file").FileTreeNode[];
2779
2780
  fileTokenScores: Record<string, Record<string, number>>;
2780
2781
  knowledgeFiles: Record<string, string>;
2781
2782
  gitChanges: {
2782
- diff: string;
2783
2783
  status: string;
2784
+ diff: string;
2784
2785
  diffCached: string;
2785
2786
  lastCommitMessages: string;
2786
2787
  };
@@ -2800,11 +2801,10 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2800
2801
  }[][];
2801
2802
  userKnowledgeFiles?: Record<string, string> | undefined;
2802
2803
  };
2803
- agentContext: string;
2804
2804
  messageHistory: {
2805
2805
  content: string | ({
2806
- type: "text";
2807
2806
  text: string;
2807
+ type: "text";
2808
2808
  cache_control?: {
2809
2809
  type: "ephemeral";
2810
2810
  } | undefined;
@@ -2826,9 +2826,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2826
2826
  } | {
2827
2827
  type: "image";
2828
2828
  source: {
2829
+ data: string;
2829
2830
  type: "base64";
2830
2831
  media_type: "image/jpeg";
2831
- data: string;
2832
2832
  };
2833
2833
  cache_control?: {
2834
2834
  type: "ephemeral";
@@ -2843,7 +2843,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2843
2843
  result: string;
2844
2844
  }[];
2845
2845
  authToken?: string | undefined;
2846
- costMode?: "lite" | "normal" | "max" | undefined;
2846
+ costMode?: "max" | "lite" | "normal" | undefined;
2847
2847
  prompt?: string | undefined;
2848
2848
  }>, z.ZodObject<{
2849
2849
  type: z.ZodLiteral<"read-files-response">;
@@ -2873,13 +2873,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2873
2873
  diffCached: z.ZodString;
2874
2874
  lastCommitMessages: z.ZodString;
2875
2875
  }, "strip", z.ZodTypeAny, {
2876
- diff: string;
2877
2876
  status: string;
2877
+ diff: string;
2878
2878
  diffCached: string;
2879
2879
  lastCommitMessages: string;
2880
2880
  }, {
2881
- diff: string;
2882
2881
  status: string;
2882
+ diff: string;
2883
2883
  diffCached: string;
2884
2884
  lastCommitMessages: string;
2885
2885
  }>;
@@ -2923,8 +2923,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2923
2923
  fileTokenScores: Record<string, Record<string, number>>;
2924
2924
  knowledgeFiles: Record<string, string>;
2925
2925
  gitChanges: {
2926
- diff: string;
2927
2926
  status: string;
2927
+ diff: string;
2928
2928
  diffCached: string;
2929
2929
  lastCommitMessages: string;
2930
2930
  };
@@ -2949,8 +2949,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2949
2949
  fileTokenScores: Record<string, Record<string, number>>;
2950
2950
  knowledgeFiles: Record<string, string>;
2951
2951
  gitChanges: {
2952
- diff: string;
2953
2952
  status: string;
2953
+ diff: string;
2954
2954
  diffCached: string;
2955
2955
  lastCommitMessages: string;
2956
2956
  };
@@ -2972,15 +2972,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2972
2972
  }>;
2973
2973
  }, "strip", z.ZodTypeAny, {
2974
2974
  type: "init";
2975
- fingerprintId: string;
2976
2975
  fileContext: {
2977
2976
  currentWorkingDirectory: string;
2978
2977
  fileTree: import("../util/file").FileTreeNode[];
2979
2978
  fileTokenScores: Record<string, Record<string, number>>;
2980
2979
  knowledgeFiles: Record<string, string>;
2981
2980
  gitChanges: {
2982
- diff: string;
2983
2981
  status: string;
2982
+ diff: string;
2984
2983
  diffCached: string;
2985
2984
  lastCommitMessages: string;
2986
2985
  };
@@ -3000,18 +2999,18 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3000
2999
  }[][];
3001
3000
  userKnowledgeFiles?: Record<string, string> | undefined;
3002
3001
  };
3002
+ fingerprintId: string;
3003
3003
  authToken?: string | undefined;
3004
3004
  }, {
3005
3005
  type: "init";
3006
- fingerprintId: string;
3007
3006
  fileContext: {
3008
3007
  currentWorkingDirectory: string;
3009
3008
  fileTree: import("../util/file").FileTreeNode[];
3010
3009
  fileTokenScores: Record<string, Record<string, number>>;
3011
3010
  knowledgeFiles: Record<string, string>;
3012
3011
  gitChanges: {
3013
- diff: string;
3014
3012
  status: string;
3013
+ diff: string;
3015
3014
  diffCached: string;
3016
3015
  lastCommitMessages: string;
3017
3016
  };
@@ -3031,6 +3030,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3031
3030
  }[][];
3032
3031
  userKnowledgeFiles?: Record<string, string> | undefined;
3033
3032
  };
3033
+ fingerprintId: string;
3034
3034
  authToken?: string | undefined;
3035
3035
  }>, z.ZodObject<{
3036
3036
  type: z.ZodLiteral<"usage">;
@@ -3061,15 +3061,41 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3061
3061
  authToken?: string | undefined;
3062
3062
  }>]>;
3063
3063
  }, "strip", z.ZodTypeAny, {
3064
- type: "action";
3065
3064
  data: {
3066
3065
  type: "user-input";
3066
+ fileContext: {
3067
+ currentWorkingDirectory: string;
3068
+ fileTree: import("../util/file").FileTreeNode[];
3069
+ fileTokenScores: Record<string, Record<string, number>>;
3070
+ knowledgeFiles: Record<string, string>;
3071
+ gitChanges: {
3072
+ status: string;
3073
+ diff: string;
3074
+ diffCached: string;
3075
+ lastCommitMessages: string;
3076
+ };
3077
+ changesSinceLastChat: Record<string, string>;
3078
+ shellConfigFiles: Record<string, string>;
3079
+ systemInfo: {
3080
+ platform: string;
3081
+ shell: string;
3082
+ nodeVersion: string;
3083
+ arch: string;
3084
+ homedir: string;
3085
+ cpus: number;
3086
+ };
3087
+ fileVersions: {
3088
+ path: string;
3089
+ content: string;
3090
+ }[][];
3091
+ userKnowledgeFiles?: Record<string, string> | undefined;
3092
+ };
3067
3093
  fingerprintId: string;
3068
3094
  userInputId: string;
3069
3095
  messages: {
3070
3096
  content: string | ({
3071
- type: "text";
3072
3097
  text: string;
3098
+ type: "text";
3073
3099
  cache_control?: {
3074
3100
  type: "ephemeral";
3075
3101
  } | undefined;
@@ -3091,9 +3117,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3091
3117
  } | {
3092
3118
  type: "image";
3093
3119
  source: {
3120
+ data: string;
3094
3121
  type: "base64";
3095
3122
  media_type: "image/jpeg";
3096
- data: string;
3097
3123
  };
3098
3124
  cache_control?: {
3099
3125
  type: "ephemeral";
@@ -3101,54 +3127,28 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3101
3127
  })[];
3102
3128
  role: "user" | "assistant";
3103
3129
  }[];
3104
- fileContext: {
3105
- currentWorkingDirectory: string;
3106
- fileTree: import("../util/file").FileTreeNode[];
3107
- fileTokenScores: Record<string, Record<string, number>>;
3108
- knowledgeFiles: Record<string, string>;
3109
- gitChanges: {
3110
- diff: string;
3111
- status: string;
3112
- diffCached: string;
3113
- lastCommitMessages: string;
3114
- };
3115
- changesSinceLastChat: Record<string, string>;
3116
- shellConfigFiles: Record<string, string>;
3117
- systemInfo: {
3118
- platform: string;
3119
- shell: string;
3120
- nodeVersion: string;
3121
- arch: string;
3122
- homedir: string;
3123
- cpus: number;
3124
- };
3125
- fileVersions: {
3126
- path: string;
3127
- content: string;
3128
- }[][];
3129
- userKnowledgeFiles?: Record<string, string> | undefined;
3130
- };
3131
3130
  changesAlreadyApplied: {
3132
- type: "patch" | "file";
3133
3131
  path: string;
3132
+ type: "file" | "patch";
3134
3133
  content: string;
3135
3134
  }[];
3136
- costMode: "lite" | "normal" | "max";
3135
+ costMode: "max" | "lite" | "normal";
3137
3136
  authToken?: string | undefined;
3138
3137
  } | {
3139
3138
  type: "prompt";
3140
3139
  fingerprintId: string;
3141
- costMode: "lite" | "normal" | "max";
3140
+ costMode: "max" | "lite" | "normal";
3142
3141
  promptId: string;
3143
3142
  agentState: {
3143
+ agentContext: string;
3144
3144
  fileContext: {
3145
3145
  currentWorkingDirectory: string;
3146
3146
  fileTree: import("../util/file").FileTreeNode[];
3147
3147
  fileTokenScores: Record<string, Record<string, number>>;
3148
3148
  knowledgeFiles: Record<string, string>;
3149
3149
  gitChanges: {
3150
- diff: string;
3151
3150
  status: string;
3151
+ diff: string;
3152
3152
  diffCached: string;
3153
3153
  lastCommitMessages: string;
3154
3154
  };
@@ -3168,11 +3168,10 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3168
3168
  }[][];
3169
3169
  userKnowledgeFiles?: Record<string, string> | undefined;
3170
3170
  };
3171
- agentContext: string;
3172
3171
  messageHistory: {
3173
3172
  content: string | ({
3174
- type: "text";
3175
3173
  text: string;
3174
+ type: "text";
3176
3175
  cache_control?: {
3177
3176
  type: "ephemeral";
3178
3177
  } | undefined;
@@ -3194,9 +3193,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3194
3193
  } | {
3195
3194
  type: "image";
3196
3195
  source: {
3196
+ data: string;
3197
3197
  type: "base64";
3198
3198
  media_type: "image/jpeg";
3199
- data: string;
3200
3199
  };
3201
3200
  cache_control?: {
3202
3201
  type: "ephemeral";
@@ -3218,15 +3217,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3218
3217
  requestId?: string | undefined;
3219
3218
  } | {
3220
3219
  type: "init";
3221
- fingerprintId: string;
3222
3220
  fileContext: {
3223
3221
  currentWorkingDirectory: string;
3224
3222
  fileTree: import("../util/file").FileTreeNode[];
3225
3223
  fileTokenScores: Record<string, Record<string, number>>;
3226
3224
  knowledgeFiles: Record<string, string>;
3227
3225
  gitChanges: {
3228
- diff: string;
3229
3226
  status: string;
3227
+ diff: string;
3230
3228
  diffCached: string;
3231
3229
  lastCommitMessages: string;
3232
3230
  };
@@ -3246,6 +3244,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3246
3244
  }[][];
3247
3245
  userKnowledgeFiles?: Record<string, string> | undefined;
3248
3246
  };
3247
+ fingerprintId: string;
3249
3248
  authToken?: string | undefined;
3250
3249
  } | {
3251
3250
  type: "usage";
@@ -3257,56 +3256,19 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3257
3256
  stagedChanges: string;
3258
3257
  authToken?: string | undefined;
3259
3258
  };
3259
+ type: "action";
3260
3260
  txid: number;
3261
3261
  }, {
3262
- type: "action";
3263
3262
  data: {
3264
3263
  type: "user-input";
3265
- fingerprintId: string;
3266
- userInputId: string;
3267
- messages: {
3268
- content: string | ({
3269
- type: "text";
3270
- text: string;
3271
- cache_control?: {
3272
- type: "ephemeral";
3273
- } | undefined;
3274
- } | {
3275
- type: "tool_use";
3276
- name: string;
3277
- id: string;
3278
- input: Record<string, any>;
3279
- cache_control?: {
3280
- type: "ephemeral";
3281
- } | undefined;
3282
- } | {
3283
- type: "tool_result";
3284
- content: string;
3285
- tool_use_id: string;
3286
- cache_control?: {
3287
- type: "ephemeral";
3288
- } | undefined;
3289
- } | {
3290
- type: "image";
3291
- source: {
3292
- type: "base64";
3293
- media_type: "image/jpeg";
3294
- data: string;
3295
- };
3296
- cache_control?: {
3297
- type: "ephemeral";
3298
- } | undefined;
3299
- })[];
3300
- role: "user" | "assistant";
3301
- }[];
3302
3264
  fileContext: {
3303
3265
  currentWorkingDirectory: string;
3304
3266
  fileTree: import("../util/file").FileTreeNode[];
3305
3267
  fileTokenScores: Record<string, Record<string, number>>;
3306
3268
  knowledgeFiles: Record<string, string>;
3307
3269
  gitChanges: {
3308
- diff: string;
3309
3270
  status: string;
3271
+ diff: string;
3310
3272
  diffCached: string;
3311
3273
  lastCommitMessages: string;
3312
3274
  };
@@ -3326,26 +3288,64 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3326
3288
  }[][];
3327
3289
  userKnowledgeFiles?: Record<string, string> | undefined;
3328
3290
  };
3291
+ fingerprintId: string;
3292
+ userInputId: string;
3293
+ messages: {
3294
+ content: string | ({
3295
+ text: string;
3296
+ type: "text";
3297
+ cache_control?: {
3298
+ type: "ephemeral";
3299
+ } | undefined;
3300
+ } | {
3301
+ type: "tool_use";
3302
+ name: string;
3303
+ id: string;
3304
+ input: Record<string, any>;
3305
+ cache_control?: {
3306
+ type: "ephemeral";
3307
+ } | undefined;
3308
+ } | {
3309
+ type: "tool_result";
3310
+ content: string;
3311
+ tool_use_id: string;
3312
+ cache_control?: {
3313
+ type: "ephemeral";
3314
+ } | undefined;
3315
+ } | {
3316
+ type: "image";
3317
+ source: {
3318
+ data: string;
3319
+ type: "base64";
3320
+ media_type: "image/jpeg";
3321
+ };
3322
+ cache_control?: {
3323
+ type: "ephemeral";
3324
+ } | undefined;
3325
+ })[];
3326
+ role: "user" | "assistant";
3327
+ }[];
3329
3328
  changesAlreadyApplied: {
3330
- type: "patch" | "file";
3331
3329
  path: string;
3330
+ type: "file" | "patch";
3332
3331
  content: string;
3333
3332
  }[];
3334
3333
  authToken?: string | undefined;
3335
- costMode?: "lite" | "normal" | "max" | undefined;
3334
+ costMode?: "max" | "lite" | "normal" | undefined;
3336
3335
  } | {
3337
3336
  type: "prompt";
3338
3337
  fingerprintId: string;
3339
3338
  promptId: string;
3340
3339
  agentState: {
3340
+ agentContext: string;
3341
3341
  fileContext: {
3342
3342
  currentWorkingDirectory: string;
3343
3343
  fileTree: import("../util/file").FileTreeNode[];
3344
3344
  fileTokenScores: Record<string, Record<string, number>>;
3345
3345
  knowledgeFiles: Record<string, string>;
3346
3346
  gitChanges: {
3347
- diff: string;
3348
3347
  status: string;
3348
+ diff: string;
3349
3349
  diffCached: string;
3350
3350
  lastCommitMessages: string;
3351
3351
  };
@@ -3365,11 +3365,10 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3365
3365
  }[][];
3366
3366
  userKnowledgeFiles?: Record<string, string> | undefined;
3367
3367
  };
3368
- agentContext: string;
3369
3368
  messageHistory: {
3370
3369
  content: string | ({
3371
- type: "text";
3372
3370
  text: string;
3371
+ type: "text";
3373
3372
  cache_control?: {
3374
3373
  type: "ephemeral";
3375
3374
  } | undefined;
@@ -3391,9 +3390,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3391
3390
  } | {
3392
3391
  type: "image";
3393
3392
  source: {
3393
+ data: string;
3394
3394
  type: "base64";
3395
3395
  media_type: "image/jpeg";
3396
- data: string;
3397
3396
  };
3398
3397
  cache_control?: {
3399
3398
  type: "ephemeral";
@@ -3408,7 +3407,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3408
3407
  result: string;
3409
3408
  }[];
3410
3409
  authToken?: string | undefined;
3411
- costMode?: "lite" | "normal" | "max" | undefined;
3410
+ costMode?: "max" | "lite" | "normal" | undefined;
3412
3411
  prompt?: string | undefined;
3413
3412
  } | {
3414
3413
  type: "read-files-response";
@@ -3416,15 +3415,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3416
3415
  requestId?: string | undefined;
3417
3416
  } | {
3418
3417
  type: "init";
3419
- fingerprintId: string;
3420
3418
  fileContext: {
3421
3419
  currentWorkingDirectory: string;
3422
3420
  fileTree: import("../util/file").FileTreeNode[];
3423
3421
  fileTokenScores: Record<string, Record<string, number>>;
3424
3422
  knowledgeFiles: Record<string, string>;
3425
3423
  gitChanges: {
3426
- diff: string;
3427
3424
  status: string;
3425
+ diff: string;
3428
3426
  diffCached: string;
3429
3427
  lastCommitMessages: string;
3430
3428
  };
@@ -3444,6 +3442,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3444
3442
  }[][];
3445
3443
  userKnowledgeFiles?: Record<string, string> | undefined;
3446
3444
  };
3445
+ fingerprintId: string;
3447
3446
  authToken?: string | undefined;
3448
3447
  } | {
3449
3448
  type: "usage";
@@ -3455,6 +3454,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3455
3454
  stagedChanges: string;
3456
3455
  authToken?: string | undefined;
3457
3456
  };
3457
+ type: "action";
3458
3458
  txid: number;
3459
3459
  }>]>;
3460
3460
  export type ClientMessageType = keyof typeof CLIENT_MESSAGE_SCHEMAS;
@@ -3468,13 +3468,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3468
3468
  }, "strip", z.ZodTypeAny, {
3469
3469
  type: "ack";
3470
3470
  success: boolean;
3471
- txid?: number | undefined;
3472
3471
  error?: string | undefined;
3472
+ txid?: number | undefined;
3473
3473
  }, {
3474
3474
  type: "ack";
3475
3475
  success: boolean;
3476
- txid?: number | undefined;
3477
3476
  error?: string | undefined;
3477
+ txid?: number | undefined;
3478
3478
  }>;
3479
3479
  action: z.ZodObject<{
3480
3480
  type: z.ZodLiteral<"action">;
@@ -3499,12 +3499,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3499
3499
  path: z.ZodString;
3500
3500
  content: z.ZodString;
3501
3501
  }, "strip", z.ZodTypeAny, {
3502
- type: "patch" | "file";
3503
3502
  path: string;
3503
+ type: "file" | "patch";
3504
3504
  content: string;
3505
3505
  }, {
3506
- type: "patch" | "file";
3507
3506
  path: string;
3507
+ type: "file" | "patch";
3508
3508
  content: string;
3509
3509
  }>, "many">;
3510
3510
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
@@ -3512,12 +3512,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3512
3512
  path: z.ZodString;
3513
3513
  content: z.ZodString;
3514
3514
  }, "strip", z.ZodTypeAny, {
3515
- type: "patch" | "file";
3516
3515
  path: string;
3516
+ type: "file" | "patch";
3517
3517
  content: string;
3518
3518
  }, {
3519
- type: "patch" | "file";
3520
3519
  path: string;
3520
+ type: "file" | "patch";
3521
3521
  content: string;
3522
3522
  }>, "many">;
3523
3523
  addedFileVersions: z.ZodArray<z.ZodObject<{
@@ -3542,14 +3542,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3542
3542
  type: "response-complete";
3543
3543
  userInputId: string;
3544
3544
  changesAlreadyApplied: {
3545
- type: "patch" | "file";
3546
3545
  path: string;
3546
+ type: "file" | "patch";
3547
3547
  content: string;
3548
3548
  }[];
3549
3549
  response: string;
3550
3550
  changes: {
3551
- type: "patch" | "file";
3552
3551
  path: string;
3552
+ type: "file" | "patch";
3553
3553
  content: string;
3554
3554
  }[];
3555
3555
  addedFileVersions: {
@@ -3567,14 +3567,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3567
3567
  type: "response-complete";
3568
3568
  userInputId: string;
3569
3569
  changesAlreadyApplied: {
3570
- type: "patch" | "file";
3571
3570
  path: string;
3571
+ type: "file" | "patch";
3572
3572
  content: string;
3573
3573
  }[];
3574
3574
  response: string;
3575
3575
  changes: {
3576
- type: "patch" | "file";
3577
3576
  path: string;
3577
+ type: "file" | "patch";
3578
3578
  content: string;
3579
3579
  }[];
3580
3580
  addedFileVersions: {
@@ -3605,13 +3605,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3605
3605
  diffCached: z.ZodString;
3606
3606
  lastCommitMessages: z.ZodString;
3607
3607
  }, "strip", z.ZodTypeAny, {
3608
- diff: string;
3609
3608
  status: string;
3609
+ diff: string;
3610
3610
  diffCached: string;
3611
3611
  lastCommitMessages: string;
3612
3612
  }, {
3613
- diff: string;
3614
3613
  status: string;
3614
+ diff: string;
3615
3615
  diffCached: string;
3616
3616
  lastCommitMessages: string;
3617
3617
  }>;
@@ -3655,8 +3655,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3655
3655
  fileTokenScores: Record<string, Record<string, number>>;
3656
3656
  knowledgeFiles: Record<string, string>;
3657
3657
  gitChanges: {
3658
- diff: string;
3659
3658
  status: string;
3659
+ diff: string;
3660
3660
  diffCached: string;
3661
3661
  lastCommitMessages: string;
3662
3662
  };
@@ -3681,8 +3681,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3681
3681
  fileTokenScores: Record<string, Record<string, number>>;
3682
3682
  knowledgeFiles: Record<string, string>;
3683
3683
  gitChanges: {
3684
- diff: string;
3685
3684
  status: string;
3685
+ diff: string;
3686
3686
  diffCached: string;
3687
3687
  lastCommitMessages: string;
3688
3688
  };
@@ -3715,14 +3715,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3715
3715
  type: "ephemeral";
3716
3716
  }>>;
3717
3717
  }, "strip", z.ZodTypeAny, {
3718
- type: "text";
3719
3718
  text: string;
3719
+ type: "text";
3720
3720
  cache_control?: {
3721
3721
  type: "ephemeral";
3722
3722
  } | undefined;
3723
3723
  }, {
3724
- type: "text";
3725
3724
  text: string;
3725
+ type: "text";
3726
3726
  cache_control?: {
3727
3727
  type: "ephemeral";
3728
3728
  } | undefined;
@@ -3786,13 +3786,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3786
3786
  media_type: z.ZodLiteral<"image/jpeg">;
3787
3787
  data: z.ZodString;
3788
3788
  }, "strip", z.ZodTypeAny, {
3789
+ data: string;
3789
3790
  type: "base64";
3790
3791
  media_type: "image/jpeg";
3791
- data: string;
3792
3792
  }, {
3793
+ data: string;
3793
3794
  type: "base64";
3794
3795
  media_type: "image/jpeg";
3795
- data: string;
3796
3796
  }>;
3797
3797
  cache_control: z.ZodOptional<z.ZodObject<{
3798
3798
  type: z.ZodLiteral<"ephemeral">;
@@ -3804,9 +3804,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3804
3804
  }, "strip", z.ZodTypeAny, {
3805
3805
  type: "image";
3806
3806
  source: {
3807
+ data: string;
3807
3808
  type: "base64";
3808
3809
  media_type: "image/jpeg";
3809
- data: string;
3810
3810
  };
3811
3811
  cache_control?: {
3812
3812
  type: "ephemeral";
@@ -3814,9 +3814,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3814
3814
  }, {
3815
3815
  type: "image";
3816
3816
  source: {
3817
+ data: string;
3817
3818
  type: "base64";
3818
3819
  media_type: "image/jpeg";
3819
- data: string;
3820
3820
  };
3821
3821
  cache_control?: {
3822
3822
  type: "ephemeral";
@@ -3824,8 +3824,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3824
3824
  }>]>, "many">]>;
3825
3825
  }, "strip", z.ZodTypeAny, {
3826
3826
  content: string | ({
3827
- type: "text";
3828
3827
  text: string;
3828
+ type: "text";
3829
3829
  cache_control?: {
3830
3830
  type: "ephemeral";
3831
3831
  } | undefined;
@@ -3847,9 +3847,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3847
3847
  } | {
3848
3848
  type: "image";
3849
3849
  source: {
3850
+ data: string;
3850
3851
  type: "base64";
3851
3852
  media_type: "image/jpeg";
3852
- data: string;
3853
3853
  };
3854
3854
  cache_control?: {
3855
3855
  type: "ephemeral";
@@ -3858,8 +3858,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3858
3858
  role: "user" | "assistant";
3859
3859
  }, {
3860
3860
  content: string | ({
3861
- type: "text";
3862
3861
  text: string;
3862
+ type: "text";
3863
3863
  cache_control?: {
3864
3864
  type: "ephemeral";
3865
3865
  } | undefined;
@@ -3881,9 +3881,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3881
3881
  } | {
3882
3882
  type: "image";
3883
3883
  source: {
3884
+ data: string;
3884
3885
  type: "base64";
3885
3886
  media_type: "image/jpeg";
3886
- data: string;
3887
3887
  };
3888
3888
  cache_control?: {
3889
3889
  type: "ephemeral";
@@ -3892,14 +3892,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3892
3892
  role: "user" | "assistant";
3893
3893
  }>, "many">;
3894
3894
  }, "strip", z.ZodTypeAny, {
3895
+ agentContext: string;
3895
3896
  fileContext: {
3896
3897
  currentWorkingDirectory: string;
3897
3898
  fileTree: import("../util/file").FileTreeNode[];
3898
3899
  fileTokenScores: Record<string, Record<string, number>>;
3899
3900
  knowledgeFiles: Record<string, string>;
3900
3901
  gitChanges: {
3901
- diff: string;
3902
3902
  status: string;
3903
+ diff: string;
3903
3904
  diffCached: string;
3904
3905
  lastCommitMessages: string;
3905
3906
  };
@@ -3919,11 +3920,10 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3919
3920
  }[][];
3920
3921
  userKnowledgeFiles?: Record<string, string> | undefined;
3921
3922
  };
3922
- agentContext: string;
3923
3923
  messageHistory: {
3924
3924
  content: string | ({
3925
- type: "text";
3926
3925
  text: string;
3926
+ type: "text";
3927
3927
  cache_control?: {
3928
3928
  type: "ephemeral";
3929
3929
  } | undefined;
@@ -3945,9 +3945,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3945
3945
  } | {
3946
3946
  type: "image";
3947
3947
  source: {
3948
+ data: string;
3948
3949
  type: "base64";
3949
3950
  media_type: "image/jpeg";
3950
- data: string;
3951
3951
  };
3952
3952
  cache_control?: {
3953
3953
  type: "ephemeral";
@@ -3956,14 +3956,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3956
3956
  role: "user" | "assistant";
3957
3957
  }[];
3958
3958
  }, {
3959
+ agentContext: string;
3959
3960
  fileContext: {
3960
3961
  currentWorkingDirectory: string;
3961
3962
  fileTree: import("../util/file").FileTreeNode[];
3962
3963
  fileTokenScores: Record<string, Record<string, number>>;
3963
3964
  knowledgeFiles: Record<string, string>;
3964
3965
  gitChanges: {
3965
- diff: string;
3966
3966
  status: string;
3967
+ diff: string;
3967
3968
  diffCached: string;
3968
3969
  lastCommitMessages: string;
3969
3970
  };
@@ -3983,11 +3984,10 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3983
3984
  }[][];
3984
3985
  userKnowledgeFiles?: Record<string, string> | undefined;
3985
3986
  };
3986
- agentContext: string;
3987
3987
  messageHistory: {
3988
3988
  content: string | ({
3989
- type: "text";
3990
3989
  text: string;
3990
+ type: "text";
3991
3991
  cache_control?: {
3992
3992
  type: "ephemeral";
3993
3993
  } | undefined;
@@ -4009,9 +4009,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4009
4009
  } | {
4010
4010
  type: "image";
4011
4011
  source: {
4012
+ data: string;
4012
4013
  type: "base64";
4013
4014
  media_type: "image/jpeg";
4014
- data: string;
4015
4015
  };
4016
4016
  cache_control?: {
4017
4017
  type: "ephemeral";
@@ -4057,14 +4057,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4057
4057
  type: "prompt-response";
4058
4058
  promptId: string;
4059
4059
  agentState: {
4060
+ agentContext: string;
4060
4061
  fileContext: {
4061
4062
  currentWorkingDirectory: string;
4062
4063
  fileTree: import("../util/file").FileTreeNode[];
4063
4064
  fileTokenScores: Record<string, Record<string, number>>;
4064
4065
  knowledgeFiles: Record<string, string>;
4065
4066
  gitChanges: {
4066
- diff: string;
4067
4067
  status: string;
4068
+ diff: string;
4068
4069
  diffCached: string;
4069
4070
  lastCommitMessages: string;
4070
4071
  };
@@ -4084,11 +4085,10 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4084
4085
  }[][];
4085
4086
  userKnowledgeFiles?: Record<string, string> | undefined;
4086
4087
  };
4087
- agentContext: string;
4088
4088
  messageHistory: {
4089
4089
  content: string | ({
4090
- type: "text";
4091
4090
  text: string;
4091
+ type: "text";
4092
4092
  cache_control?: {
4093
4093
  type: "ephemeral";
4094
4094
  } | undefined;
@@ -4110,9 +4110,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4110
4110
  } | {
4111
4111
  type: "image";
4112
4112
  source: {
4113
+ data: string;
4113
4114
  type: "base64";
4114
4115
  media_type: "image/jpeg";
4115
- data: string;
4116
4116
  };
4117
4117
  cache_control?: {
4118
4118
  type: "ephemeral";
@@ -4141,14 +4141,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4141
4141
  type: "prompt-response";
4142
4142
  promptId: string;
4143
4143
  agentState: {
4144
+ agentContext: string;
4144
4145
  fileContext: {
4145
4146
  currentWorkingDirectory: string;
4146
4147
  fileTree: import("../util/file").FileTreeNode[];
4147
4148
  fileTokenScores: Record<string, Record<string, number>>;
4148
4149
  knowledgeFiles: Record<string, string>;
4149
4150
  gitChanges: {
4150
- diff: string;
4151
4151
  status: string;
4152
+ diff: string;
4152
4153
  diffCached: string;
4153
4154
  lastCommitMessages: string;
4154
4155
  };
@@ -4168,11 +4169,10 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4168
4169
  }[][];
4169
4170
  userKnowledgeFiles?: Record<string, string> | undefined;
4170
4171
  };
4171
- agentContext: string;
4172
4172
  messageHistory: {
4173
4173
  content: string | ({
4174
- type: "text";
4175
4174
  text: string;
4175
+ type: "text";
4176
4176
  cache_control?: {
4177
4177
  type: "ephemeral";
4178
4178
  } | undefined;
@@ -4194,9 +4194,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4194
4194
  } | {
4195
4195
  type: "image";
4196
4196
  source: {
4197
+ data: string;
4197
4198
  type: "base64";
4198
4199
  media_type: "image/jpeg";
4199
- data: string;
4200
4200
  };
4201
4201
  cache_control?: {
4202
4202
  type: "ephemeral";
@@ -4255,12 +4255,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4255
4255
  path: z.ZodString;
4256
4256
  content: z.ZodString;
4257
4257
  }, "strip", z.ZodTypeAny, {
4258
- type: "patch" | "file";
4259
4258
  path: string;
4259
+ type: "file" | "patch";
4260
4260
  content: string;
4261
4261
  }, {
4262
- type: "patch" | "file";
4263
4262
  path: string;
4263
+ type: "file" | "patch";
4264
4264
  content: string;
4265
4265
  }>, "many">;
4266
4266
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
@@ -4268,12 +4268,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4268
4268
  path: z.ZodString;
4269
4269
  content: z.ZodString;
4270
4270
  }, "strip", z.ZodTypeAny, {
4271
- type: "patch" | "file";
4272
4271
  path: string;
4272
+ type: "file" | "patch";
4273
4273
  content: string;
4274
4274
  }, {
4275
- type: "patch" | "file";
4276
4275
  path: string;
4276
+ type: "file" | "patch";
4277
4277
  content: string;
4278
4278
  }>, "many">;
4279
4279
  addedFileVersions: z.ZodArray<z.ZodObject<{
@@ -4288,22 +4288,22 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4288
4288
  }>, "many">;
4289
4289
  resetFileVersions: z.ZodBoolean;
4290
4290
  }, "strip", z.ZodTypeAny, {
4291
- type: "tool-call";
4292
- userInputId: string;
4293
4291
  data: {
4294
4292
  name: string;
4295
4293
  id: string;
4296
4294
  input: Record<string, any>;
4297
4295
  };
4296
+ type: "tool-call";
4297
+ userInputId: string;
4298
4298
  changesAlreadyApplied: {
4299
- type: "patch" | "file";
4300
4299
  path: string;
4300
+ type: "file" | "patch";
4301
4301
  content: string;
4302
4302
  }[];
4303
4303
  response: string;
4304
4304
  changes: {
4305
- type: "patch" | "file";
4306
4305
  path: string;
4306
+ type: "file" | "patch";
4307
4307
  content: string;
4308
4308
  }[];
4309
4309
  addedFileVersions: {
@@ -4312,22 +4312,22 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4312
4312
  }[];
4313
4313
  resetFileVersions: boolean;
4314
4314
  }, {
4315
- type: "tool-call";
4316
- userInputId: string;
4317
4315
  data: {
4318
4316
  name: string;
4319
4317
  id: string;
4320
4318
  input: Record<string, any>;
4321
4319
  };
4320
+ type: "tool-call";
4321
+ userInputId: string;
4322
4322
  changesAlreadyApplied: {
4323
- type: "patch" | "file";
4324
4323
  path: string;
4324
+ type: "file" | "patch";
4325
4325
  content: string;
4326
4326
  }[];
4327
4327
  response: string;
4328
4328
  changes: {
4329
- type: "patch" | "file";
4330
4329
  path: string;
4330
+ type: "file" | "patch";
4331
4331
  content: string;
4332
4332
  }[];
4333
4333
  addedFileVersions: {
@@ -4341,12 +4341,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4341
4341
  result: z.ZodString;
4342
4342
  }, "strip", z.ZodTypeAny, {
4343
4343
  type: "terminal-command-result";
4344
- userInputId: string;
4345
4344
  result: string;
4345
+ userInputId: string;
4346
4346
  }, {
4347
4347
  type: "terminal-command-result";
4348
- userInputId: string;
4349
4348
  result: string;
4349
+ userInputId: string;
4350
4350
  }>, z.ZodObject<{
4351
4351
  type: z.ZodLiteral<"npm-version-status">;
4352
4352
  isUpToDate: z.ZodBoolean;
@@ -4413,11 +4413,11 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4413
4413
  type: z.ZodLiteral<"action-error">;
4414
4414
  message: z.ZodString;
4415
4415
  }, "strip", z.ZodTypeAny, {
4416
- type: "action-error";
4417
4416
  message: string;
4418
- }, {
4419
4417
  type: "action-error";
4418
+ }, {
4420
4419
  message: string;
4420
+ type: "action-error";
4421
4421
  }>, z.ZodObject<{
4422
4422
  type: z.ZodLiteral<"commit-message-response">;
4423
4423
  commitMessage: z.ZodString;
@@ -4429,7 +4429,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4429
4429
  commitMessage: string;
4430
4430
  }>]>;
4431
4431
  }, "strip", z.ZodTypeAny, {
4432
- type: "action";
4433
4432
  data: {
4434
4433
  type: "usage-response";
4435
4434
  usage: number;
@@ -4450,14 +4449,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4450
4449
  type: "response-complete";
4451
4450
  userInputId: string;
4452
4451
  changesAlreadyApplied: {
4453
- type: "patch" | "file";
4454
4452
  path: string;
4453
+ type: "file" | "patch";
4455
4454
  content: string;
4456
4455
  }[];
4457
4456
  response: string;
4458
4457
  changes: {
4459
- type: "patch" | "file";
4460
4458
  path: string;
4459
+ type: "file" | "patch";
4461
4460
  content: string;
4462
4461
  }[];
4463
4462
  addedFileVersions: {
@@ -4475,14 +4474,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4475
4474
  type: "prompt-response";
4476
4475
  promptId: string;
4477
4476
  agentState: {
4477
+ agentContext: string;
4478
4478
  fileContext: {
4479
4479
  currentWorkingDirectory: string;
4480
4480
  fileTree: import("../util/file").FileTreeNode[];
4481
4481
  fileTokenScores: Record<string, Record<string, number>>;
4482
4482
  knowledgeFiles: Record<string, string>;
4483
4483
  gitChanges: {
4484
- diff: string;
4485
4484
  status: string;
4485
+ diff: string;
4486
4486
  diffCached: string;
4487
4487
  lastCommitMessages: string;
4488
4488
  };
@@ -4502,11 +4502,10 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4502
4502
  }[][];
4503
4503
  userKnowledgeFiles?: Record<string, string> | undefined;
4504
4504
  };
4505
- agentContext: string;
4506
4505
  messageHistory: {
4507
4506
  content: string | ({
4508
- type: "text";
4509
4507
  text: string;
4508
+ type: "text";
4510
4509
  cache_control?: {
4511
4510
  type: "ephemeral";
4512
4511
  } | undefined;
@@ -4528,9 +4527,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4528
4527
  } | {
4529
4528
  type: "image";
4530
4529
  source: {
4530
+ data: string;
4531
4531
  type: "base64";
4532
4532
  media_type: "image/jpeg";
4533
- data: string;
4534
4533
  };
4535
4534
  cache_control?: {
4536
4535
  type: "ephemeral";
@@ -4564,22 +4563,22 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4564
4563
  requestId: string;
4565
4564
  filePaths: string[];
4566
4565
  } | {
4567
- type: "tool-call";
4568
- userInputId: string;
4569
4566
  data: {
4570
4567
  name: string;
4571
4568
  id: string;
4572
4569
  input: Record<string, any>;
4573
4570
  };
4571
+ type: "tool-call";
4572
+ userInputId: string;
4574
4573
  changesAlreadyApplied: {
4575
- type: "patch" | "file";
4576
4574
  path: string;
4575
+ type: "file" | "patch";
4577
4576
  content: string;
4578
4577
  }[];
4579
4578
  response: string;
4580
4579
  changes: {
4581
- type: "patch" | "file";
4582
4580
  path: string;
4581
+ type: "file" | "patch";
4583
4582
  content: string;
4584
4583
  }[];
4585
4584
  addedFileVersions: {
@@ -4589,21 +4588,21 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4589
4588
  resetFileVersions: boolean;
4590
4589
  } | {
4591
4590
  type: "terminal-command-result";
4592
- userInputId: string;
4593
4591
  result: string;
4592
+ userInputId: string;
4594
4593
  } | {
4595
4594
  type: "npm-version-status";
4596
4595
  isUpToDate: boolean;
4597
4596
  latestVersion: string;
4598
4597
  } | {
4599
- type: "action-error";
4600
4598
  message: string;
4599
+ type: "action-error";
4601
4600
  } | {
4602
4601
  type: "commit-message-response";
4603
4602
  commitMessage: string;
4604
4603
  };
4605
- }, {
4606
4604
  type: "action";
4605
+ }, {
4607
4606
  data: {
4608
4607
  type: "usage-response";
4609
4608
  usage: number;
@@ -4624,14 +4623,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4624
4623
  type: "response-complete";
4625
4624
  userInputId: string;
4626
4625
  changesAlreadyApplied: {
4627
- type: "patch" | "file";
4628
4626
  path: string;
4627
+ type: "file" | "patch";
4629
4628
  content: string;
4630
4629
  }[];
4631
4630
  response: string;
4632
4631
  changes: {
4633
- type: "patch" | "file";
4634
4632
  path: string;
4633
+ type: "file" | "patch";
4635
4634
  content: string;
4636
4635
  }[];
4637
4636
  addedFileVersions: {
@@ -4649,14 +4648,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4649
4648
  type: "prompt-response";
4650
4649
  promptId: string;
4651
4650
  agentState: {
4651
+ agentContext: string;
4652
4652
  fileContext: {
4653
4653
  currentWorkingDirectory: string;
4654
4654
  fileTree: import("../util/file").FileTreeNode[];
4655
4655
  fileTokenScores: Record<string, Record<string, number>>;
4656
4656
  knowledgeFiles: Record<string, string>;
4657
4657
  gitChanges: {
4658
- diff: string;
4659
4658
  status: string;
4659
+ diff: string;
4660
4660
  diffCached: string;
4661
4661
  lastCommitMessages: string;
4662
4662
  };
@@ -4676,11 +4676,10 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4676
4676
  }[][];
4677
4677
  userKnowledgeFiles?: Record<string, string> | undefined;
4678
4678
  };
4679
- agentContext: string;
4680
4679
  messageHistory: {
4681
4680
  content: string | ({
4682
- type: "text";
4683
4681
  text: string;
4682
+ type: "text";
4684
4683
  cache_control?: {
4685
4684
  type: "ephemeral";
4686
4685
  } | undefined;
@@ -4702,9 +4701,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4702
4701
  } | {
4703
4702
  type: "image";
4704
4703
  source: {
4704
+ data: string;
4705
4705
  type: "base64";
4706
4706
  media_type: "image/jpeg";
4707
- data: string;
4708
4707
  };
4709
4708
  cache_control?: {
4710
4709
  type: "ephemeral";
@@ -4738,22 +4737,22 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4738
4737
  requestId: string;
4739
4738
  filePaths: string[];
4740
4739
  } | {
4741
- type: "tool-call";
4742
- userInputId: string;
4743
4740
  data: {
4744
4741
  name: string;
4745
4742
  id: string;
4746
4743
  input: Record<string, any>;
4747
4744
  };
4745
+ type: "tool-call";
4746
+ userInputId: string;
4748
4747
  changesAlreadyApplied: {
4749
- type: "patch" | "file";
4750
4748
  path: string;
4749
+ type: "file" | "patch";
4751
4750
  content: string;
4752
4751
  }[];
4753
4752
  response: string;
4754
4753
  changes: {
4755
- type: "patch" | "file";
4756
4754
  path: string;
4755
+ type: "file" | "patch";
4757
4756
  content: string;
4758
4757
  }[];
4759
4758
  addedFileVersions: {
@@ -4763,19 +4762,20 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4763
4762
  resetFileVersions: boolean;
4764
4763
  } | {
4765
4764
  type: "terminal-command-result";
4766
- userInputId: string;
4767
4765
  result: string;
4766
+ userInputId: string;
4768
4767
  } | {
4769
4768
  type: "npm-version-status";
4770
4769
  isUpToDate: boolean;
4771
4770
  latestVersion: string;
4772
4771
  } | {
4773
- type: "action-error";
4774
4772
  message: string;
4773
+ type: "action-error";
4775
4774
  } | {
4776
4775
  type: "commit-message-response";
4777
4776
  commitMessage: string;
4778
4777
  };
4778
+ type: "action";
4779
4779
  }>;
4780
4780
  };
4781
4781
  export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
@@ -4786,13 +4786,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4786
4786
  }, "strip", z.ZodTypeAny, {
4787
4787
  type: "ack";
4788
4788
  success: boolean;
4789
- txid?: number | undefined;
4790
4789
  error?: string | undefined;
4790
+ txid?: number | undefined;
4791
4791
  }, {
4792
4792
  type: "ack";
4793
4793
  success: boolean;
4794
- txid?: number | undefined;
4795
4794
  error?: string | undefined;
4795
+ txid?: number | undefined;
4796
4796
  }>, z.ZodObject<{
4797
4797
  type: z.ZodLiteral<"action">;
4798
4798
  data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -4816,12 +4816,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4816
4816
  path: z.ZodString;
4817
4817
  content: z.ZodString;
4818
4818
  }, "strip", z.ZodTypeAny, {
4819
- type: "patch" | "file";
4820
4819
  path: string;
4820
+ type: "file" | "patch";
4821
4821
  content: string;
4822
4822
  }, {
4823
- type: "patch" | "file";
4824
4823
  path: string;
4824
+ type: "file" | "patch";
4825
4825
  content: string;
4826
4826
  }>, "many">;
4827
4827
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
@@ -4829,12 +4829,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4829
4829
  path: z.ZodString;
4830
4830
  content: z.ZodString;
4831
4831
  }, "strip", z.ZodTypeAny, {
4832
- type: "patch" | "file";
4833
4832
  path: string;
4833
+ type: "file" | "patch";
4834
4834
  content: string;
4835
4835
  }, {
4836
- type: "patch" | "file";
4837
4836
  path: string;
4837
+ type: "file" | "patch";
4838
4838
  content: string;
4839
4839
  }>, "many">;
4840
4840
  addedFileVersions: z.ZodArray<z.ZodObject<{
@@ -4859,14 +4859,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4859
4859
  type: "response-complete";
4860
4860
  userInputId: string;
4861
4861
  changesAlreadyApplied: {
4862
- type: "patch" | "file";
4863
4862
  path: string;
4863
+ type: "file" | "patch";
4864
4864
  content: string;
4865
4865
  }[];
4866
4866
  response: string;
4867
4867
  changes: {
4868
- type: "patch" | "file";
4869
4868
  path: string;
4869
+ type: "file" | "patch";
4870
4870
  content: string;
4871
4871
  }[];
4872
4872
  addedFileVersions: {
@@ -4884,14 +4884,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4884
4884
  type: "response-complete";
4885
4885
  userInputId: string;
4886
4886
  changesAlreadyApplied: {
4887
- type: "patch" | "file";
4888
4887
  path: string;
4888
+ type: "file" | "patch";
4889
4889
  content: string;
4890
4890
  }[];
4891
4891
  response: string;
4892
4892
  changes: {
4893
- type: "patch" | "file";
4894
4893
  path: string;
4894
+ type: "file" | "patch";
4895
4895
  content: string;
4896
4896
  }[];
4897
4897
  addedFileVersions: {
@@ -4922,13 +4922,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4922
4922
  diffCached: z.ZodString;
4923
4923
  lastCommitMessages: z.ZodString;
4924
4924
  }, "strip", z.ZodTypeAny, {
4925
- diff: string;
4926
4925
  status: string;
4926
+ diff: string;
4927
4927
  diffCached: string;
4928
4928
  lastCommitMessages: string;
4929
4929
  }, {
4930
- diff: string;
4931
4930
  status: string;
4931
+ diff: string;
4932
4932
  diffCached: string;
4933
4933
  lastCommitMessages: string;
4934
4934
  }>;
@@ -4972,8 +4972,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4972
4972
  fileTokenScores: Record<string, Record<string, number>>;
4973
4973
  knowledgeFiles: Record<string, string>;
4974
4974
  gitChanges: {
4975
- diff: string;
4976
4975
  status: string;
4976
+ diff: string;
4977
4977
  diffCached: string;
4978
4978
  lastCommitMessages: string;
4979
4979
  };
@@ -4998,8 +4998,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4998
4998
  fileTokenScores: Record<string, Record<string, number>>;
4999
4999
  knowledgeFiles: Record<string, string>;
5000
5000
  gitChanges: {
5001
- diff: string;
5002
5001
  status: string;
5002
+ diff: string;
5003
5003
  diffCached: string;
5004
5004
  lastCommitMessages: string;
5005
5005
  };
@@ -5032,14 +5032,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5032
5032
  type: "ephemeral";
5033
5033
  }>>;
5034
5034
  }, "strip", z.ZodTypeAny, {
5035
- type: "text";
5036
5035
  text: string;
5036
+ type: "text";
5037
5037
  cache_control?: {
5038
5038
  type: "ephemeral";
5039
5039
  } | undefined;
5040
5040
  }, {
5041
- type: "text";
5042
5041
  text: string;
5042
+ type: "text";
5043
5043
  cache_control?: {
5044
5044
  type: "ephemeral";
5045
5045
  } | undefined;
@@ -5103,13 +5103,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5103
5103
  media_type: z.ZodLiteral<"image/jpeg">;
5104
5104
  data: z.ZodString;
5105
5105
  }, "strip", z.ZodTypeAny, {
5106
+ data: string;
5106
5107
  type: "base64";
5107
5108
  media_type: "image/jpeg";
5108
- data: string;
5109
5109
  }, {
5110
+ data: string;
5110
5111
  type: "base64";
5111
5112
  media_type: "image/jpeg";
5112
- data: string;
5113
5113
  }>;
5114
5114
  cache_control: z.ZodOptional<z.ZodObject<{
5115
5115
  type: z.ZodLiteral<"ephemeral">;
@@ -5121,9 +5121,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5121
5121
  }, "strip", z.ZodTypeAny, {
5122
5122
  type: "image";
5123
5123
  source: {
5124
+ data: string;
5124
5125
  type: "base64";
5125
5126
  media_type: "image/jpeg";
5126
- data: string;
5127
5127
  };
5128
5128
  cache_control?: {
5129
5129
  type: "ephemeral";
@@ -5131,9 +5131,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5131
5131
  }, {
5132
5132
  type: "image";
5133
5133
  source: {
5134
+ data: string;
5134
5135
  type: "base64";
5135
5136
  media_type: "image/jpeg";
5136
- data: string;
5137
5137
  };
5138
5138
  cache_control?: {
5139
5139
  type: "ephemeral";
@@ -5141,8 +5141,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5141
5141
  }>]>, "many">]>;
5142
5142
  }, "strip", z.ZodTypeAny, {
5143
5143
  content: string | ({
5144
- type: "text";
5145
5144
  text: string;
5145
+ type: "text";
5146
5146
  cache_control?: {
5147
5147
  type: "ephemeral";
5148
5148
  } | undefined;
@@ -5164,9 +5164,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5164
5164
  } | {
5165
5165
  type: "image";
5166
5166
  source: {
5167
+ data: string;
5167
5168
  type: "base64";
5168
5169
  media_type: "image/jpeg";
5169
- data: string;
5170
5170
  };
5171
5171
  cache_control?: {
5172
5172
  type: "ephemeral";
@@ -5175,8 +5175,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5175
5175
  role: "user" | "assistant";
5176
5176
  }, {
5177
5177
  content: string | ({
5178
- type: "text";
5179
5178
  text: string;
5179
+ type: "text";
5180
5180
  cache_control?: {
5181
5181
  type: "ephemeral";
5182
5182
  } | undefined;
@@ -5198,9 +5198,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5198
5198
  } | {
5199
5199
  type: "image";
5200
5200
  source: {
5201
+ data: string;
5201
5202
  type: "base64";
5202
5203
  media_type: "image/jpeg";
5203
- data: string;
5204
5204
  };
5205
5205
  cache_control?: {
5206
5206
  type: "ephemeral";
@@ -5209,14 +5209,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5209
5209
  role: "user" | "assistant";
5210
5210
  }>, "many">;
5211
5211
  }, "strip", z.ZodTypeAny, {
5212
+ agentContext: string;
5212
5213
  fileContext: {
5213
5214
  currentWorkingDirectory: string;
5214
5215
  fileTree: import("../util/file").FileTreeNode[];
5215
5216
  fileTokenScores: Record<string, Record<string, number>>;
5216
5217
  knowledgeFiles: Record<string, string>;
5217
5218
  gitChanges: {
5218
- diff: string;
5219
5219
  status: string;
5220
+ diff: string;
5220
5221
  diffCached: string;
5221
5222
  lastCommitMessages: string;
5222
5223
  };
@@ -5236,11 +5237,10 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5236
5237
  }[][];
5237
5238
  userKnowledgeFiles?: Record<string, string> | undefined;
5238
5239
  };
5239
- agentContext: string;
5240
5240
  messageHistory: {
5241
5241
  content: string | ({
5242
- type: "text";
5243
5242
  text: string;
5243
+ type: "text";
5244
5244
  cache_control?: {
5245
5245
  type: "ephemeral";
5246
5246
  } | undefined;
@@ -5262,9 +5262,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5262
5262
  } | {
5263
5263
  type: "image";
5264
5264
  source: {
5265
+ data: string;
5265
5266
  type: "base64";
5266
5267
  media_type: "image/jpeg";
5267
- data: string;
5268
5268
  };
5269
5269
  cache_control?: {
5270
5270
  type: "ephemeral";
@@ -5273,14 +5273,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5273
5273
  role: "user" | "assistant";
5274
5274
  }[];
5275
5275
  }, {
5276
+ agentContext: string;
5276
5277
  fileContext: {
5277
5278
  currentWorkingDirectory: string;
5278
5279
  fileTree: import("../util/file").FileTreeNode[];
5279
5280
  fileTokenScores: Record<string, Record<string, number>>;
5280
5281
  knowledgeFiles: Record<string, string>;
5281
5282
  gitChanges: {
5282
- diff: string;
5283
5283
  status: string;
5284
+ diff: string;
5284
5285
  diffCached: string;
5285
5286
  lastCommitMessages: string;
5286
5287
  };
@@ -5300,11 +5301,10 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5300
5301
  }[][];
5301
5302
  userKnowledgeFiles?: Record<string, string> | undefined;
5302
5303
  };
5303
- agentContext: string;
5304
5304
  messageHistory: {
5305
5305
  content: string | ({
5306
- type: "text";
5307
5306
  text: string;
5307
+ type: "text";
5308
5308
  cache_control?: {
5309
5309
  type: "ephemeral";
5310
5310
  } | undefined;
@@ -5326,9 +5326,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5326
5326
  } | {
5327
5327
  type: "image";
5328
5328
  source: {
5329
+ data: string;
5329
5330
  type: "base64";
5330
5331
  media_type: "image/jpeg";
5331
- data: string;
5332
5332
  };
5333
5333
  cache_control?: {
5334
5334
  type: "ephemeral";
@@ -5374,14 +5374,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5374
5374
  type: "prompt-response";
5375
5375
  promptId: string;
5376
5376
  agentState: {
5377
+ agentContext: string;
5377
5378
  fileContext: {
5378
5379
  currentWorkingDirectory: string;
5379
5380
  fileTree: import("../util/file").FileTreeNode[];
5380
5381
  fileTokenScores: Record<string, Record<string, number>>;
5381
5382
  knowledgeFiles: Record<string, string>;
5382
5383
  gitChanges: {
5383
- diff: string;
5384
5384
  status: string;
5385
+ diff: string;
5385
5386
  diffCached: string;
5386
5387
  lastCommitMessages: string;
5387
5388
  };
@@ -5401,11 +5402,10 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5401
5402
  }[][];
5402
5403
  userKnowledgeFiles?: Record<string, string> | undefined;
5403
5404
  };
5404
- agentContext: string;
5405
5405
  messageHistory: {
5406
5406
  content: string | ({
5407
- type: "text";
5408
5407
  text: string;
5408
+ type: "text";
5409
5409
  cache_control?: {
5410
5410
  type: "ephemeral";
5411
5411
  } | undefined;
@@ -5427,9 +5427,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5427
5427
  } | {
5428
5428
  type: "image";
5429
5429
  source: {
5430
+ data: string;
5430
5431
  type: "base64";
5431
5432
  media_type: "image/jpeg";
5432
- data: string;
5433
5433
  };
5434
5434
  cache_control?: {
5435
5435
  type: "ephemeral";
@@ -5458,14 +5458,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5458
5458
  type: "prompt-response";
5459
5459
  promptId: string;
5460
5460
  agentState: {
5461
+ agentContext: string;
5461
5462
  fileContext: {
5462
5463
  currentWorkingDirectory: string;
5463
5464
  fileTree: import("../util/file").FileTreeNode[];
5464
5465
  fileTokenScores: Record<string, Record<string, number>>;
5465
5466
  knowledgeFiles: Record<string, string>;
5466
5467
  gitChanges: {
5467
- diff: string;
5468
5468
  status: string;
5469
+ diff: string;
5469
5470
  diffCached: string;
5470
5471
  lastCommitMessages: string;
5471
5472
  };
@@ -5485,11 +5486,10 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5485
5486
  }[][];
5486
5487
  userKnowledgeFiles?: Record<string, string> | undefined;
5487
5488
  };
5488
- agentContext: string;
5489
5489
  messageHistory: {
5490
5490
  content: string | ({
5491
- type: "text";
5492
5491
  text: string;
5492
+ type: "text";
5493
5493
  cache_control?: {
5494
5494
  type: "ephemeral";
5495
5495
  } | undefined;
@@ -5511,9 +5511,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5511
5511
  } | {
5512
5512
  type: "image";
5513
5513
  source: {
5514
+ data: string;
5514
5515
  type: "base64";
5515
5516
  media_type: "image/jpeg";
5516
- data: string;
5517
5517
  };
5518
5518
  cache_control?: {
5519
5519
  type: "ephemeral";
@@ -5572,12 +5572,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5572
5572
  path: z.ZodString;
5573
5573
  content: z.ZodString;
5574
5574
  }, "strip", z.ZodTypeAny, {
5575
- type: "patch" | "file";
5576
5575
  path: string;
5576
+ type: "file" | "patch";
5577
5577
  content: string;
5578
5578
  }, {
5579
- type: "patch" | "file";
5580
5579
  path: string;
5580
+ type: "file" | "patch";
5581
5581
  content: string;
5582
5582
  }>, "many">;
5583
5583
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
@@ -5585,12 +5585,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5585
5585
  path: z.ZodString;
5586
5586
  content: z.ZodString;
5587
5587
  }, "strip", z.ZodTypeAny, {
5588
- type: "patch" | "file";
5589
5588
  path: string;
5589
+ type: "file" | "patch";
5590
5590
  content: string;
5591
5591
  }, {
5592
- type: "patch" | "file";
5593
5592
  path: string;
5593
+ type: "file" | "patch";
5594
5594
  content: string;
5595
5595
  }>, "many">;
5596
5596
  addedFileVersions: z.ZodArray<z.ZodObject<{
@@ -5605,22 +5605,22 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5605
5605
  }>, "many">;
5606
5606
  resetFileVersions: z.ZodBoolean;
5607
5607
  }, "strip", z.ZodTypeAny, {
5608
- type: "tool-call";
5609
- userInputId: string;
5610
5608
  data: {
5611
5609
  name: string;
5612
5610
  id: string;
5613
5611
  input: Record<string, any>;
5614
5612
  };
5613
+ type: "tool-call";
5614
+ userInputId: string;
5615
5615
  changesAlreadyApplied: {
5616
- type: "patch" | "file";
5617
5616
  path: string;
5617
+ type: "file" | "patch";
5618
5618
  content: string;
5619
5619
  }[];
5620
5620
  response: string;
5621
5621
  changes: {
5622
- type: "patch" | "file";
5623
5622
  path: string;
5623
+ type: "file" | "patch";
5624
5624
  content: string;
5625
5625
  }[];
5626
5626
  addedFileVersions: {
@@ -5629,22 +5629,22 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5629
5629
  }[];
5630
5630
  resetFileVersions: boolean;
5631
5631
  }, {
5632
- type: "tool-call";
5633
- userInputId: string;
5634
5632
  data: {
5635
5633
  name: string;
5636
5634
  id: string;
5637
5635
  input: Record<string, any>;
5638
5636
  };
5637
+ type: "tool-call";
5638
+ userInputId: string;
5639
5639
  changesAlreadyApplied: {
5640
- type: "patch" | "file";
5641
5640
  path: string;
5641
+ type: "file" | "patch";
5642
5642
  content: string;
5643
5643
  }[];
5644
5644
  response: string;
5645
5645
  changes: {
5646
- type: "patch" | "file";
5647
5646
  path: string;
5647
+ type: "file" | "patch";
5648
5648
  content: string;
5649
5649
  }[];
5650
5650
  addedFileVersions: {
@@ -5658,12 +5658,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5658
5658
  result: z.ZodString;
5659
5659
  }, "strip", z.ZodTypeAny, {
5660
5660
  type: "terminal-command-result";
5661
- userInputId: string;
5662
5661
  result: string;
5662
+ userInputId: string;
5663
5663
  }, {
5664
5664
  type: "terminal-command-result";
5665
- userInputId: string;
5666
5665
  result: string;
5666
+ userInputId: string;
5667
5667
  }>, z.ZodObject<{
5668
5668
  type: z.ZodLiteral<"npm-version-status">;
5669
5669
  isUpToDate: z.ZodBoolean;
@@ -5730,11 +5730,11 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5730
5730
  type: z.ZodLiteral<"action-error">;
5731
5731
  message: z.ZodString;
5732
5732
  }, "strip", z.ZodTypeAny, {
5733
- type: "action-error";
5734
5733
  message: string;
5735
- }, {
5736
5734
  type: "action-error";
5735
+ }, {
5737
5736
  message: string;
5737
+ type: "action-error";
5738
5738
  }>, z.ZodObject<{
5739
5739
  type: z.ZodLiteral<"commit-message-response">;
5740
5740
  commitMessage: z.ZodString;
@@ -5746,7 +5746,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5746
5746
  commitMessage: string;
5747
5747
  }>]>;
5748
5748
  }, "strip", z.ZodTypeAny, {
5749
- type: "action";
5750
5749
  data: {
5751
5750
  type: "usage-response";
5752
5751
  usage: number;
@@ -5767,14 +5766,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5767
5766
  type: "response-complete";
5768
5767
  userInputId: string;
5769
5768
  changesAlreadyApplied: {
5770
- type: "patch" | "file";
5771
5769
  path: string;
5770
+ type: "file" | "patch";
5772
5771
  content: string;
5773
5772
  }[];
5774
5773
  response: string;
5775
5774
  changes: {
5776
- type: "patch" | "file";
5777
5775
  path: string;
5776
+ type: "file" | "patch";
5778
5777
  content: string;
5779
5778
  }[];
5780
5779
  addedFileVersions: {
@@ -5792,14 +5791,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5792
5791
  type: "prompt-response";
5793
5792
  promptId: string;
5794
5793
  agentState: {
5794
+ agentContext: string;
5795
5795
  fileContext: {
5796
5796
  currentWorkingDirectory: string;
5797
5797
  fileTree: import("../util/file").FileTreeNode[];
5798
5798
  fileTokenScores: Record<string, Record<string, number>>;
5799
5799
  knowledgeFiles: Record<string, string>;
5800
5800
  gitChanges: {
5801
- diff: string;
5802
5801
  status: string;
5802
+ diff: string;
5803
5803
  diffCached: string;
5804
5804
  lastCommitMessages: string;
5805
5805
  };
@@ -5819,11 +5819,10 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5819
5819
  }[][];
5820
5820
  userKnowledgeFiles?: Record<string, string> | undefined;
5821
5821
  };
5822
- agentContext: string;
5823
5822
  messageHistory: {
5824
5823
  content: string | ({
5825
- type: "text";
5826
5824
  text: string;
5825
+ type: "text";
5827
5826
  cache_control?: {
5828
5827
  type: "ephemeral";
5829
5828
  } | undefined;
@@ -5845,9 +5844,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5845
5844
  } | {
5846
5845
  type: "image";
5847
5846
  source: {
5847
+ data: string;
5848
5848
  type: "base64";
5849
5849
  media_type: "image/jpeg";
5850
- data: string;
5851
5850
  };
5852
5851
  cache_control?: {
5853
5852
  type: "ephemeral";
@@ -5881,22 +5880,22 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5881
5880
  requestId: string;
5882
5881
  filePaths: string[];
5883
5882
  } | {
5884
- type: "tool-call";
5885
- userInputId: string;
5886
5883
  data: {
5887
5884
  name: string;
5888
5885
  id: string;
5889
5886
  input: Record<string, any>;
5890
5887
  };
5888
+ type: "tool-call";
5889
+ userInputId: string;
5891
5890
  changesAlreadyApplied: {
5892
- type: "patch" | "file";
5893
5891
  path: string;
5892
+ type: "file" | "patch";
5894
5893
  content: string;
5895
5894
  }[];
5896
5895
  response: string;
5897
5896
  changes: {
5898
- type: "patch" | "file";
5899
5897
  path: string;
5898
+ type: "file" | "patch";
5900
5899
  content: string;
5901
5900
  }[];
5902
5901
  addedFileVersions: {
@@ -5906,21 +5905,21 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5906
5905
  resetFileVersions: boolean;
5907
5906
  } | {
5908
5907
  type: "terminal-command-result";
5909
- userInputId: string;
5910
5908
  result: string;
5909
+ userInputId: string;
5911
5910
  } | {
5912
5911
  type: "npm-version-status";
5913
5912
  isUpToDate: boolean;
5914
5913
  latestVersion: string;
5915
5914
  } | {
5916
- type: "action-error";
5917
5915
  message: string;
5916
+ type: "action-error";
5918
5917
  } | {
5919
5918
  type: "commit-message-response";
5920
5919
  commitMessage: string;
5921
5920
  };
5922
- }, {
5923
5921
  type: "action";
5922
+ }, {
5924
5923
  data: {
5925
5924
  type: "usage-response";
5926
5925
  usage: number;
@@ -5941,14 +5940,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5941
5940
  type: "response-complete";
5942
5941
  userInputId: string;
5943
5942
  changesAlreadyApplied: {
5944
- type: "patch" | "file";
5945
5943
  path: string;
5944
+ type: "file" | "patch";
5946
5945
  content: string;
5947
5946
  }[];
5948
5947
  response: string;
5949
5948
  changes: {
5950
- type: "patch" | "file";
5951
5949
  path: string;
5950
+ type: "file" | "patch";
5952
5951
  content: string;
5953
5952
  }[];
5954
5953
  addedFileVersions: {
@@ -5966,14 +5965,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5966
5965
  type: "prompt-response";
5967
5966
  promptId: string;
5968
5967
  agentState: {
5968
+ agentContext: string;
5969
5969
  fileContext: {
5970
5970
  currentWorkingDirectory: string;
5971
5971
  fileTree: import("../util/file").FileTreeNode[];
5972
5972
  fileTokenScores: Record<string, Record<string, number>>;
5973
5973
  knowledgeFiles: Record<string, string>;
5974
5974
  gitChanges: {
5975
- diff: string;
5976
5975
  status: string;
5976
+ diff: string;
5977
5977
  diffCached: string;
5978
5978
  lastCommitMessages: string;
5979
5979
  };
@@ -5993,11 +5993,10 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5993
5993
  }[][];
5994
5994
  userKnowledgeFiles?: Record<string, string> | undefined;
5995
5995
  };
5996
- agentContext: string;
5997
5996
  messageHistory: {
5998
5997
  content: string | ({
5999
- type: "text";
6000
5998
  text: string;
5999
+ type: "text";
6001
6000
  cache_control?: {
6002
6001
  type: "ephemeral";
6003
6002
  } | undefined;
@@ -6019,9 +6018,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
6019
6018
  } | {
6020
6019
  type: "image";
6021
6020
  source: {
6021
+ data: string;
6022
6022
  type: "base64";
6023
6023
  media_type: "image/jpeg";
6024
- data: string;
6025
6024
  };
6026
6025
  cache_control?: {
6027
6026
  type: "ephemeral";
@@ -6055,22 +6054,22 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
6055
6054
  requestId: string;
6056
6055
  filePaths: string[];
6057
6056
  } | {
6058
- type: "tool-call";
6059
- userInputId: string;
6060
6057
  data: {
6061
6058
  name: string;
6062
6059
  id: string;
6063
6060
  input: Record<string, any>;
6064
6061
  };
6062
+ type: "tool-call";
6063
+ userInputId: string;
6065
6064
  changesAlreadyApplied: {
6066
- type: "patch" | "file";
6067
6065
  path: string;
6066
+ type: "file" | "patch";
6068
6067
  content: string;
6069
6068
  }[];
6070
6069
  response: string;
6071
6070
  changes: {
6072
- type: "patch" | "file";
6073
6071
  path: string;
6072
+ type: "file" | "patch";
6074
6073
  content: string;
6075
6074
  }[];
6076
6075
  addedFileVersions: {
@@ -6080,19 +6079,20 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
6080
6079
  resetFileVersions: boolean;
6081
6080
  } | {
6082
6081
  type: "terminal-command-result";
6083
- userInputId: string;
6084
6082
  result: string;
6083
+ userInputId: string;
6085
6084
  } | {
6086
6085
  type: "npm-version-status";
6087
6086
  isUpToDate: boolean;
6088
6087
  latestVersion: string;
6089
6088
  } | {
6090
- type: "action-error";
6091
6089
  message: string;
6090
+ type: "action-error";
6092
6091
  } | {
6093
6092
  type: "commit-message-response";
6094
6093
  commitMessage: string;
6095
6094
  };
6095
+ type: "action";
6096
6096
  }>]>;
6097
6097
  export type ServerMessageType = keyof typeof SERVER_MESSAGE_SCHEMAS;
6098
6098
  export type ServerMessage<T extends ServerMessageType = ServerMessageType> = z.infer<(typeof SERVER_MESSAGE_SCHEMAS)[T]>;