codebuff 1.0.173 → 1.0.174

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.
@@ -95,16 +95,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
95
95
  }>>;
96
96
  }, "strip", z.ZodTypeAny, {
97
97
  type: "tool_use";
98
- name: string;
99
98
  id: string;
99
+ name: string;
100
100
  input: Record<string, any>;
101
101
  cache_control?: {
102
102
  type: "ephemeral";
103
103
  } | undefined;
104
104
  }, {
105
105
  type: "tool_use";
106
- name: string;
107
106
  id: string;
107
+ name: string;
108
108
  input: Record<string, any>;
109
109
  cache_control?: {
110
110
  type: "ephemeral";
@@ -142,12 +142,12 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
142
142
  data: z.ZodString;
143
143
  }, "strip", z.ZodTypeAny, {
144
144
  type: "base64";
145
- data: string;
146
145
  media_type: "image/jpeg";
146
+ data: string;
147
147
  }, {
148
148
  type: "base64";
149
- data: string;
150
149
  media_type: "image/jpeg";
150
+ data: string;
151
151
  }>;
152
152
  cache_control: z.ZodOptional<z.ZodObject<{
153
153
  type: z.ZodLiteral<"ephemeral">;
@@ -160,8 +160,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
160
160
  type: "image";
161
161
  source: {
162
162
  type: "base64";
163
- data: string;
164
163
  media_type: "image/jpeg";
164
+ data: string;
165
165
  };
166
166
  cache_control?: {
167
167
  type: "ephemeral";
@@ -170,14 +170,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
170
170
  type: "image";
171
171
  source: {
172
172
  type: "base64";
173
- data: string;
174
173
  media_type: "image/jpeg";
174
+ data: string;
175
175
  };
176
176
  cache_control?: {
177
177
  type: "ephemeral";
178
178
  } | undefined;
179
179
  }>]>, "many">]>;
180
180
  }, "strip", z.ZodTypeAny, {
181
+ role: "user" | "assistant";
181
182
  content: string | ({
182
183
  type: "text";
183
184
  text: string;
@@ -186,8 +187,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
186
187
  } | undefined;
187
188
  } | {
188
189
  type: "tool_use";
189
- name: string;
190
190
  id: string;
191
+ name: string;
191
192
  input: Record<string, any>;
192
193
  cache_control?: {
193
194
  type: "ephemeral";
@@ -203,15 +204,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
203
204
  type: "image";
204
205
  source: {
205
206
  type: "base64";
206
- data: string;
207
207
  media_type: "image/jpeg";
208
+ data: string;
208
209
  };
209
210
  cache_control?: {
210
211
  type: "ephemeral";
211
212
  } | undefined;
212
213
  })[];
213
- role: "user" | "assistant";
214
214
  }, {
215
+ role: "user" | "assistant";
215
216
  content: string | ({
216
217
  type: "text";
217
218
  text: string;
@@ -220,8 +221,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
220
221
  } | undefined;
221
222
  } | {
222
223
  type: "tool_use";
223
- name: string;
224
224
  id: string;
225
+ name: string;
225
226
  input: Record<string, any>;
226
227
  cache_control?: {
227
228
  type: "ephemeral";
@@ -237,14 +238,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
237
238
  type: "image";
238
239
  source: {
239
240
  type: "base64";
240
- data: string;
241
241
  media_type: "image/jpeg";
242
+ data: string;
242
243
  };
243
244
  cache_control?: {
244
245
  type: "ephemeral";
245
246
  } | undefined;
246
247
  })[];
247
- role: "user" | "assistant";
248
248
  }>, "many">;
249
249
  fileContext: z.ZodObject<{
250
250
  currentWorkingDirectory: z.ZodString;
@@ -371,9 +371,37 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
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
+ diff: string;
381
+ status: 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: {
404
+ role: "user" | "assistant";
377
405
  content: string | ({
378
406
  type: "text";
379
407
  text: string;
@@ -382,8 +410,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
382
410
  } | undefined;
383
411
  } | {
384
412
  type: "tool_use";
385
- name: string;
386
413
  id: string;
414
+ name: string;
387
415
  input: Record<string, any>;
388
416
  cache_control?: {
389
417
  type: "ephemeral";
@@ -399,15 +427,23 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
399
427
  type: "image";
400
428
  source: {
401
429
  type: "base64";
402
- data: string;
403
430
  media_type: "image/jpeg";
431
+ data: string;
404
432
  };
405
433
  cache_control?: {
406
434
  type: "ephemeral";
407
435
  } | undefined;
408
436
  })[];
409
- role: "user" | "assistant";
410
437
  }[];
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";
411
447
  fileContext: {
412
448
  currentWorkingDirectory: string;
413
449
  fileTree: import("../util/file").FileTreeNode[];
@@ -435,18 +471,10 @@ 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: {
477
+ role: "user" | "assistant";
450
478
  content: string | ({
451
479
  type: "text";
452
480
  text: string;
@@ -455,8 +483,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
455
483
  } | undefined;
456
484
  } | {
457
485
  type: "tool_use";
458
- name: string;
459
486
  id: string;
487
+ name: string;
460
488
  input: Record<string, any>;
461
489
  cache_control?: {
462
490
  type: "ephemeral";
@@ -472,42 +500,14 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
472
500
  type: "image";
473
501
  source: {
474
502
  type: "base64";
475
- data: string;
476
503
  media_type: "image/jpeg";
504
+ data: string;
477
505
  };
478
506
  cache_control?: {
479
507
  type: "ephemeral";
480
508
  } | undefined;
481
509
  })[];
482
- 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
512
  type: "patch" | "file";
513
513
  path: string;
@@ -671,16 +671,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
671
671
  }>>;
672
672
  }, "strip", z.ZodTypeAny, {
673
673
  type: "tool_use";
674
- name: string;
675
674
  id: string;
675
+ name: string;
676
676
  input: Record<string, any>;
677
677
  cache_control?: {
678
678
  type: "ephemeral";
679
679
  } | undefined;
680
680
  }, {
681
681
  type: "tool_use";
682
- name: string;
683
682
  id: string;
683
+ name: string;
684
684
  input: Record<string, any>;
685
685
  cache_control?: {
686
686
  type: "ephemeral";
@@ -718,12 +718,12 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
718
718
  data: z.ZodString;
719
719
  }, "strip", z.ZodTypeAny, {
720
720
  type: "base64";
721
- data: string;
722
721
  media_type: "image/jpeg";
722
+ data: string;
723
723
  }, {
724
724
  type: "base64";
725
- data: string;
726
725
  media_type: "image/jpeg";
726
+ data: string;
727
727
  }>;
728
728
  cache_control: z.ZodOptional<z.ZodObject<{
729
729
  type: z.ZodLiteral<"ephemeral">;
@@ -736,8 +736,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
736
736
  type: "image";
737
737
  source: {
738
738
  type: "base64";
739
- data: string;
740
739
  media_type: "image/jpeg";
740
+ data: string;
741
741
  };
742
742
  cache_control?: {
743
743
  type: "ephemeral";
@@ -746,14 +746,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
746
746
  type: "image";
747
747
  source: {
748
748
  type: "base64";
749
- data: string;
750
749
  media_type: "image/jpeg";
750
+ data: string;
751
751
  };
752
752
  cache_control?: {
753
753
  type: "ephemeral";
754
754
  } | undefined;
755
755
  }>]>, "many">]>;
756
756
  }, "strip", z.ZodTypeAny, {
757
+ role: "user" | "assistant";
757
758
  content: string | ({
758
759
  type: "text";
759
760
  text: string;
@@ -762,8 +763,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
762
763
  } | undefined;
763
764
  } | {
764
765
  type: "tool_use";
765
- name: string;
766
766
  id: string;
767
+ name: string;
767
768
  input: Record<string, any>;
768
769
  cache_control?: {
769
770
  type: "ephemeral";
@@ -779,15 +780,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
779
780
  type: "image";
780
781
  source: {
781
782
  type: "base64";
782
- data: string;
783
783
  media_type: "image/jpeg";
784
+ data: string;
784
785
  };
785
786
  cache_control?: {
786
787
  type: "ephemeral";
787
788
  } | undefined;
788
789
  })[];
789
- role: "user" | "assistant";
790
790
  }, {
791
+ role: "user" | "assistant";
791
792
  content: string | ({
792
793
  type: "text";
793
794
  text: string;
@@ -796,8 +797,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
796
797
  } | undefined;
797
798
  } | {
798
799
  type: "tool_use";
799
- name: string;
800
800
  id: string;
801
+ name: string;
801
802
  input: Record<string, any>;
802
803
  cache_control?: {
803
804
  type: "ephemeral";
@@ -813,16 +814,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
813
814
  type: "image";
814
815
  source: {
815
816
  type: "base64";
816
- data: string;
817
817
  media_type: "image/jpeg";
818
+ data: string;
818
819
  };
819
820
  cache_control?: {
820
821
  type: "ephemeral";
821
822
  } | undefined;
822
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[];
@@ -850,8 +851,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
850
851
  }[][];
851
852
  userKnowledgeFiles?: Record<string, string> | undefined;
852
853
  };
853
- agentContext: string;
854
854
  messageHistory: {
855
+ role: "user" | "assistant";
855
856
  content: string | ({
856
857
  type: "text";
857
858
  text: string;
@@ -860,8 +861,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
860
861
  } | undefined;
861
862
  } | {
862
863
  type: "tool_use";
863
- name: string;
864
864
  id: string;
865
+ name: string;
865
866
  input: Record<string, any>;
866
867
  cache_control?: {
867
868
  type: "ephemeral";
@@ -877,16 +878,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
877
878
  type: "image";
878
879
  source: {
879
880
  type: "base64";
880
- data: string;
881
881
  media_type: "image/jpeg";
882
+ data: string;
882
883
  };
883
884
  cache_control?: {
884
885
  type: "ephemeral";
885
886
  } | undefined;
886
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[];
@@ -914,8 +915,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
914
915
  }[][];
915
916
  userKnowledgeFiles?: Record<string, string> | undefined;
916
917
  };
917
- agentContext: string;
918
918
  messageHistory: {
919
+ role: "user" | "assistant";
919
920
  content: string | ({
920
921
  type: "text";
921
922
  text: string;
@@ -924,8 +925,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
924
925
  } | undefined;
925
926
  } | {
926
927
  type: "tool_use";
927
- name: string;
928
928
  id: string;
929
+ name: string;
929
930
  input: Record<string, any>;
930
931
  cache_control?: {
931
932
  type: "ephemeral";
@@ -941,14 +942,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
941
942
  type: "image";
942
943
  source: {
943
944
  type: "base64";
944
- data: string;
945
945
  media_type: "image/jpeg";
946
+ data: string;
946
947
  };
947
948
  cache_control?: {
948
949
  type: "ephemeral";
949
950
  } | undefined;
950
951
  })[];
951
- role: "user" | "assistant";
952
952
  }[];
953
953
  }>;
954
954
  toolResults: z.ZodArray<z.ZodObject<{
@@ -956,12 +956,12 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
956
956
  result: z.ZodString;
957
957
  id: z.ZodString;
958
958
  }, "strip", z.ZodTypeAny, {
959
- name: string;
960
959
  id: string;
960
+ name: string;
961
961
  result: string;
962
962
  }, {
963
- name: string;
964
963
  id: string;
964
+ name: string;
965
965
  result: string;
966
966
  }>, "many">;
967
967
  }, "strip", z.ZodTypeAny, {
@@ -970,6 +970,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
970
970
  costMode: "lite" | "normal" | "max";
971
971
  promptId: string;
972
972
  agentState: {
973
+ agentContext: string;
973
974
  fileContext: {
974
975
  currentWorkingDirectory: string;
975
976
  fileTree: import("../util/file").FileTreeNode[];
@@ -997,8 +998,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
997
998
  }[][];
998
999
  userKnowledgeFiles?: Record<string, string> | undefined;
999
1000
  };
1000
- agentContext: string;
1001
1001
  messageHistory: {
1002
+ role: "user" | "assistant";
1002
1003
  content: string | ({
1003
1004
  type: "text";
1004
1005
  text: string;
@@ -1007,8 +1008,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1007
1008
  } | undefined;
1008
1009
  } | {
1009
1010
  type: "tool_use";
1010
- name: string;
1011
1011
  id: string;
1012
+ name: string;
1012
1013
  input: Record<string, any>;
1013
1014
  cache_control?: {
1014
1015
  type: "ephemeral";
@@ -1024,19 +1025,18 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1024
1025
  type: "image";
1025
1026
  source: {
1026
1027
  type: "base64";
1027
- data: string;
1028
1028
  media_type: "image/jpeg";
1029
+ data: string;
1029
1030
  };
1030
1031
  cache_control?: {
1031
1032
  type: "ephemeral";
1032
1033
  } | undefined;
1033
1034
  })[];
1034
- role: "user" | "assistant";
1035
1035
  }[];
1036
1036
  };
1037
1037
  toolResults: {
1038
- name: string;
1039
1038
  id: string;
1039
+ name: string;
1040
1040
  result: string;
1041
1041
  }[];
1042
1042
  authToken?: string | undefined;
@@ -1046,6 +1046,7 @@ 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[];
@@ -1073,8 +1074,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1073
1074
  }[][];
1074
1075
  userKnowledgeFiles?: Record<string, string> | undefined;
1075
1076
  };
1076
- agentContext: string;
1077
1077
  messageHistory: {
1078
+ role: "user" | "assistant";
1078
1079
  content: string | ({
1079
1080
  type: "text";
1080
1081
  text: string;
@@ -1083,8 +1084,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1083
1084
  } | undefined;
1084
1085
  } | {
1085
1086
  type: "tool_use";
1086
- name: string;
1087
1087
  id: string;
1088
+ name: string;
1088
1089
  input: Record<string, any>;
1089
1090
  cache_control?: {
1090
1091
  type: "ephemeral";
@@ -1100,19 +1101,18 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1100
1101
  type: "image";
1101
1102
  source: {
1102
1103
  type: "base64";
1103
- data: string;
1104
1104
  media_type: "image/jpeg";
1105
+ data: string;
1105
1106
  };
1106
1107
  cache_control?: {
1107
1108
  type: "ephemeral";
1108
1109
  } | undefined;
1109
1110
  })[];
1110
- role: "user" | "assistant";
1111
1111
  }[];
1112
1112
  };
1113
1113
  toolResults: {
1114
- name: string;
1115
1114
  id: string;
1115
+ name: string;
1116
1116
  result: string;
1117
1117
  }[];
1118
1118
  authToken?: string | undefined;
@@ -1245,7 +1245,6 @@ 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[];
@@ -1273,10 +1272,10 @@ 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[];
@@ -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">;
@@ -1337,9 +1337,37 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1337
1337
  type: "action";
1338
1338
  data: {
1339
1339
  type: "user-input";
1340
+ fileContext: {
1341
+ currentWorkingDirectory: string;
1342
+ fileTree: import("../util/file").FileTreeNode[];
1343
+ fileTokenScores: Record<string, Record<string, number>>;
1344
+ knowledgeFiles: Record<string, string>;
1345
+ gitChanges: {
1346
+ diff: string;
1347
+ status: string;
1348
+ diffCached: string;
1349
+ lastCommitMessages: string;
1350
+ };
1351
+ changesSinceLastChat: Record<string, string>;
1352
+ shellConfigFiles: Record<string, string>;
1353
+ systemInfo: {
1354
+ platform: string;
1355
+ shell: string;
1356
+ nodeVersion: string;
1357
+ arch: string;
1358
+ homedir: string;
1359
+ cpus: number;
1360
+ };
1361
+ fileVersions: {
1362
+ path: string;
1363
+ content: string;
1364
+ }[][];
1365
+ userKnowledgeFiles?: Record<string, string> | undefined;
1366
+ };
1340
1367
  fingerprintId: string;
1341
1368
  userInputId: string;
1342
1369
  messages: {
1370
+ role: "user" | "assistant";
1343
1371
  content: string | ({
1344
1372
  type: "text";
1345
1373
  text: string;
@@ -1348,8 +1376,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1348
1376
  } | undefined;
1349
1377
  } | {
1350
1378
  type: "tool_use";
1351
- name: string;
1352
1379
  id: string;
1380
+ name: string;
1353
1381
  input: Record<string, any>;
1354
1382
  cache_control?: {
1355
1383
  type: "ephemeral";
@@ -1365,42 +1393,14 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1365
1393
  type: "image";
1366
1394
  source: {
1367
1395
  type: "base64";
1368
- data: string;
1369
1396
  media_type: "image/jpeg";
1397
+ data: string;
1370
1398
  };
1371
1399
  cache_control?: {
1372
1400
  type: "ephemeral";
1373
1401
  } | undefined;
1374
1402
  })[];
1375
- role: "user" | "assistant";
1376
1403
  }[];
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
1404
  changesAlreadyApplied: {
1405
1405
  type: "patch" | "file";
1406
1406
  path: string;
@@ -1414,6 +1414,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1414
1414
  costMode: "lite" | "normal" | "max";
1415
1415
  promptId: string;
1416
1416
  agentState: {
1417
+ agentContext: string;
1417
1418
  fileContext: {
1418
1419
  currentWorkingDirectory: string;
1419
1420
  fileTree: import("../util/file").FileTreeNode[];
@@ -1441,8 +1442,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1441
1442
  }[][];
1442
1443
  userKnowledgeFiles?: Record<string, string> | undefined;
1443
1444
  };
1444
- agentContext: string;
1445
1445
  messageHistory: {
1446
+ role: "user" | "assistant";
1446
1447
  content: string | ({
1447
1448
  type: "text";
1448
1449
  text: string;
@@ -1451,8 +1452,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1451
1452
  } | undefined;
1452
1453
  } | {
1453
1454
  type: "tool_use";
1454
- name: string;
1455
1455
  id: string;
1456
+ name: string;
1456
1457
  input: Record<string, any>;
1457
1458
  cache_control?: {
1458
1459
  type: "ephemeral";
@@ -1468,19 +1469,18 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1468
1469
  type: "image";
1469
1470
  source: {
1470
1471
  type: "base64";
1471
- data: string;
1472
1472
  media_type: "image/jpeg";
1473
+ data: string;
1473
1474
  };
1474
1475
  cache_control?: {
1475
1476
  type: "ephemeral";
1476
1477
  } | undefined;
1477
1478
  })[];
1478
- role: "user" | "assistant";
1479
1479
  }[];
1480
1480
  };
1481
1481
  toolResults: {
1482
- name: string;
1483
1482
  id: string;
1483
+ name: string;
1484
1484
  result: string;
1485
1485
  }[];
1486
1486
  authToken?: string | undefined;
@@ -1491,7 +1491,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1491
1491
  requestId?: string | undefined;
1492
1492
  } | {
1493
1493
  type: "init";
1494
- fingerprintId: string;
1495
1494
  fileContext: {
1496
1495
  currentWorkingDirectory: string;
1497
1496
  fileTree: import("../util/file").FileTreeNode[];
@@ -1519,6 +1518,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1519
1518
  }[][];
1520
1519
  userKnowledgeFiles?: Record<string, string> | undefined;
1521
1520
  };
1521
+ fingerprintId: string;
1522
1522
  authToken?: string | undefined;
1523
1523
  } | {
1524
1524
  type: "usage";
@@ -1535,43 +1535,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1535
1535
  type: "action";
1536
1536
  data: {
1537
1537
  type: "user-input";
1538
- fingerprintId: string;
1539
- userInputId: string;
1540
- messages: {
1541
- content: string | ({
1542
- type: "text";
1543
- text: string;
1544
- cache_control?: {
1545
- type: "ephemeral";
1546
- } | undefined;
1547
- } | {
1548
- type: "tool_use";
1549
- name: string;
1550
- id: string;
1551
- input: Record<string, any>;
1552
- cache_control?: {
1553
- type: "ephemeral";
1554
- } | undefined;
1555
- } | {
1556
- type: "tool_result";
1557
- content: string;
1558
- tool_use_id: string;
1559
- cache_control?: {
1560
- type: "ephemeral";
1561
- } | undefined;
1562
- } | {
1563
- type: "image";
1564
- source: {
1565
- type: "base64";
1566
- data: string;
1567
- media_type: "image/jpeg";
1568
- };
1569
- cache_control?: {
1570
- type: "ephemeral";
1571
- } | undefined;
1572
- })[];
1573
- role: "user" | "assistant";
1574
- }[];
1575
1538
  fileContext: {
1576
1539
  currentWorkingDirectory: string;
1577
1540
  fileTree: import("../util/file").FileTreeNode[];
@@ -1599,6 +1562,43 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1599
1562
  }[][];
1600
1563
  userKnowledgeFiles?: Record<string, string> | undefined;
1601
1564
  };
1565
+ fingerprintId: string;
1566
+ userInputId: string;
1567
+ messages: {
1568
+ role: "user" | "assistant";
1569
+ content: string | ({
1570
+ type: "text";
1571
+ text: string;
1572
+ cache_control?: {
1573
+ type: "ephemeral";
1574
+ } | undefined;
1575
+ } | {
1576
+ type: "tool_use";
1577
+ id: string;
1578
+ name: string;
1579
+ input: Record<string, any>;
1580
+ cache_control?: {
1581
+ type: "ephemeral";
1582
+ } | undefined;
1583
+ } | {
1584
+ type: "tool_result";
1585
+ content: string;
1586
+ tool_use_id: string;
1587
+ cache_control?: {
1588
+ type: "ephemeral";
1589
+ } | undefined;
1590
+ } | {
1591
+ type: "image";
1592
+ source: {
1593
+ type: "base64";
1594
+ media_type: "image/jpeg";
1595
+ data: string;
1596
+ };
1597
+ cache_control?: {
1598
+ type: "ephemeral";
1599
+ } | undefined;
1600
+ })[];
1601
+ }[];
1602
1602
  changesAlreadyApplied: {
1603
1603
  type: "patch" | "file";
1604
1604
  path: string;
@@ -1611,6 +1611,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1611
1611
  fingerprintId: string;
1612
1612
  promptId: string;
1613
1613
  agentState: {
1614
+ agentContext: string;
1614
1615
  fileContext: {
1615
1616
  currentWorkingDirectory: string;
1616
1617
  fileTree: import("../util/file").FileTreeNode[];
@@ -1638,8 +1639,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1638
1639
  }[][];
1639
1640
  userKnowledgeFiles?: Record<string, string> | undefined;
1640
1641
  };
1641
- agentContext: string;
1642
1642
  messageHistory: {
1643
+ role: "user" | "assistant";
1643
1644
  content: string | ({
1644
1645
  type: "text";
1645
1646
  text: string;
@@ -1648,8 +1649,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1648
1649
  } | undefined;
1649
1650
  } | {
1650
1651
  type: "tool_use";
1651
- name: string;
1652
1652
  id: string;
1653
+ name: string;
1653
1654
  input: Record<string, any>;
1654
1655
  cache_control?: {
1655
1656
  type: "ephemeral";
@@ -1665,19 +1666,18 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1665
1666
  type: "image";
1666
1667
  source: {
1667
1668
  type: "base64";
1668
- data: string;
1669
1669
  media_type: "image/jpeg";
1670
+ data: string;
1670
1671
  };
1671
1672
  cache_control?: {
1672
1673
  type: "ephemeral";
1673
1674
  } | undefined;
1674
1675
  })[];
1675
- role: "user" | "assistant";
1676
1676
  }[];
1677
1677
  };
1678
1678
  toolResults: {
1679
- name: string;
1680
1679
  id: string;
1680
+ name: string;
1681
1681
  result: string;
1682
1682
  }[];
1683
1683
  authToken?: string | undefined;
@@ -1689,7 +1689,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1689
1689
  requestId?: string | undefined;
1690
1690
  } | {
1691
1691
  type: "init";
1692
- fingerprintId: string;
1693
1692
  fileContext: {
1694
1693
  currentWorkingDirectory: string;
1695
1694
  fileTree: import("../util/file").FileTreeNode[];
@@ -1717,6 +1716,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1717
1716
  }[][];
1718
1717
  userKnowledgeFiles?: Record<string, string> | undefined;
1719
1718
  };
1719
+ fingerprintId: string;
1720
1720
  authToken?: string | undefined;
1721
1721
  } | {
1722
1722
  type: "usage";
@@ -1822,16 +1822,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1822
1822
  }>>;
1823
1823
  }, "strip", z.ZodTypeAny, {
1824
1824
  type: "tool_use";
1825
- name: string;
1826
1825
  id: string;
1826
+ name: string;
1827
1827
  input: Record<string, any>;
1828
1828
  cache_control?: {
1829
1829
  type: "ephemeral";
1830
1830
  } | undefined;
1831
1831
  }, {
1832
1832
  type: "tool_use";
1833
- name: string;
1834
1833
  id: string;
1834
+ name: string;
1835
1835
  input: Record<string, any>;
1836
1836
  cache_control?: {
1837
1837
  type: "ephemeral";
@@ -1869,12 +1869,12 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1869
1869
  data: z.ZodString;
1870
1870
  }, "strip", z.ZodTypeAny, {
1871
1871
  type: "base64";
1872
- data: string;
1873
1872
  media_type: "image/jpeg";
1873
+ data: string;
1874
1874
  }, {
1875
1875
  type: "base64";
1876
- data: string;
1877
1876
  media_type: "image/jpeg";
1877
+ data: string;
1878
1878
  }>;
1879
1879
  cache_control: z.ZodOptional<z.ZodObject<{
1880
1880
  type: z.ZodLiteral<"ephemeral">;
@@ -1887,8 +1887,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1887
1887
  type: "image";
1888
1888
  source: {
1889
1889
  type: "base64";
1890
- data: string;
1891
1890
  media_type: "image/jpeg";
1891
+ data: string;
1892
1892
  };
1893
1893
  cache_control?: {
1894
1894
  type: "ephemeral";
@@ -1897,14 +1897,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1897
1897
  type: "image";
1898
1898
  source: {
1899
1899
  type: "base64";
1900
- data: string;
1901
1900
  media_type: "image/jpeg";
1901
+ data: string;
1902
1902
  };
1903
1903
  cache_control?: {
1904
1904
  type: "ephemeral";
1905
1905
  } | undefined;
1906
1906
  }>]>, "many">]>;
1907
1907
  }, "strip", z.ZodTypeAny, {
1908
+ role: "user" | "assistant";
1908
1909
  content: string | ({
1909
1910
  type: "text";
1910
1911
  text: string;
@@ -1913,8 +1914,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1913
1914
  } | undefined;
1914
1915
  } | {
1915
1916
  type: "tool_use";
1916
- name: string;
1917
1917
  id: string;
1918
+ name: string;
1918
1919
  input: Record<string, any>;
1919
1920
  cache_control?: {
1920
1921
  type: "ephemeral";
@@ -1930,15 +1931,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1930
1931
  type: "image";
1931
1932
  source: {
1932
1933
  type: "base64";
1933
- data: string;
1934
1934
  media_type: "image/jpeg";
1935
+ data: string;
1935
1936
  };
1936
1937
  cache_control?: {
1937
1938
  type: "ephemeral";
1938
1939
  } | undefined;
1939
1940
  })[];
1940
- role: "user" | "assistant";
1941
1941
  }, {
1942
+ role: "user" | "assistant";
1942
1943
  content: string | ({
1943
1944
  type: "text";
1944
1945
  text: string;
@@ -1947,8 +1948,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1947
1948
  } | undefined;
1948
1949
  } | {
1949
1950
  type: "tool_use";
1950
- name: string;
1951
1951
  id: string;
1952
+ name: string;
1952
1953
  input: Record<string, any>;
1953
1954
  cache_control?: {
1954
1955
  type: "ephemeral";
@@ -1964,14 +1965,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1964
1965
  type: "image";
1965
1966
  source: {
1966
1967
  type: "base64";
1967
- data: string;
1968
1968
  media_type: "image/jpeg";
1969
+ data: string;
1969
1970
  };
1970
1971
  cache_control?: {
1971
1972
  type: "ephemeral";
1972
1973
  } | undefined;
1973
1974
  })[];
1974
- role: "user" | "assistant";
1975
1975
  }>, "many">;
1976
1976
  fileContext: z.ZodObject<{
1977
1977
  currentWorkingDirectory: z.ZodString;
@@ -2098,9 +2098,37 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
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
+ diff: string;
2108
+ status: 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: {
2131
+ role: "user" | "assistant";
2104
2132
  content: string | ({
2105
2133
  type: "text";
2106
2134
  text: string;
@@ -2109,8 +2137,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2109
2137
  } | undefined;
2110
2138
  } | {
2111
2139
  type: "tool_use";
2112
- name: string;
2113
2140
  id: string;
2141
+ name: string;
2114
2142
  input: Record<string, any>;
2115
2143
  cache_control?: {
2116
2144
  type: "ephemeral";
@@ -2126,15 +2154,23 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2126
2154
  type: "image";
2127
2155
  source: {
2128
2156
  type: "base64";
2129
- data: string;
2130
2157
  media_type: "image/jpeg";
2158
+ data: string;
2131
2159
  };
2132
2160
  cache_control?: {
2133
2161
  type: "ephemeral";
2134
2162
  } | undefined;
2135
2163
  })[];
2136
- role: "user" | "assistant";
2137
2164
  }[];
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";
2138
2174
  fileContext: {
2139
2175
  currentWorkingDirectory: string;
2140
2176
  fileTree: import("../util/file").FileTreeNode[];
@@ -2162,18 +2198,10 @@ 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: {
2204
+ role: "user" | "assistant";
2177
2205
  content: string | ({
2178
2206
  type: "text";
2179
2207
  text: string;
@@ -2182,8 +2210,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2182
2210
  } | undefined;
2183
2211
  } | {
2184
2212
  type: "tool_use";
2185
- name: string;
2186
2213
  id: string;
2214
+ name: string;
2187
2215
  input: Record<string, any>;
2188
2216
  cache_control?: {
2189
2217
  type: "ephemeral";
@@ -2199,42 +2227,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2199
2227
  type: "image";
2200
2228
  source: {
2201
2229
  type: "base64";
2202
- data: string;
2203
2230
  media_type: "image/jpeg";
2231
+ data: string;
2204
2232
  };
2205
2233
  cache_control?: {
2206
2234
  type: "ephemeral";
2207
2235
  } | undefined;
2208
2236
  })[];
2209
- 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
2239
  type: "patch" | "file";
2240
2240
  path: string;
@@ -2398,16 +2398,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2398
2398
  }>>;
2399
2399
  }, "strip", z.ZodTypeAny, {
2400
2400
  type: "tool_use";
2401
- name: string;
2402
2401
  id: string;
2402
+ name: string;
2403
2403
  input: Record<string, any>;
2404
2404
  cache_control?: {
2405
2405
  type: "ephemeral";
2406
2406
  } | undefined;
2407
2407
  }, {
2408
2408
  type: "tool_use";
2409
- name: string;
2410
2409
  id: string;
2410
+ name: string;
2411
2411
  input: Record<string, any>;
2412
2412
  cache_control?: {
2413
2413
  type: "ephemeral";
@@ -2445,12 +2445,12 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2445
2445
  data: z.ZodString;
2446
2446
  }, "strip", z.ZodTypeAny, {
2447
2447
  type: "base64";
2448
- data: string;
2449
2448
  media_type: "image/jpeg";
2449
+ data: string;
2450
2450
  }, {
2451
2451
  type: "base64";
2452
- data: string;
2453
2452
  media_type: "image/jpeg";
2453
+ data: string;
2454
2454
  }>;
2455
2455
  cache_control: z.ZodOptional<z.ZodObject<{
2456
2456
  type: z.ZodLiteral<"ephemeral">;
@@ -2463,8 +2463,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2463
2463
  type: "image";
2464
2464
  source: {
2465
2465
  type: "base64";
2466
- data: string;
2467
2466
  media_type: "image/jpeg";
2467
+ data: string;
2468
2468
  };
2469
2469
  cache_control?: {
2470
2470
  type: "ephemeral";
@@ -2473,14 +2473,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2473
2473
  type: "image";
2474
2474
  source: {
2475
2475
  type: "base64";
2476
- data: string;
2477
2476
  media_type: "image/jpeg";
2477
+ data: string;
2478
2478
  };
2479
2479
  cache_control?: {
2480
2480
  type: "ephemeral";
2481
2481
  } | undefined;
2482
2482
  }>]>, "many">]>;
2483
2483
  }, "strip", z.ZodTypeAny, {
2484
+ role: "user" | "assistant";
2484
2485
  content: string | ({
2485
2486
  type: "text";
2486
2487
  text: string;
@@ -2489,8 +2490,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2489
2490
  } | undefined;
2490
2491
  } | {
2491
2492
  type: "tool_use";
2492
- name: string;
2493
2493
  id: string;
2494
+ name: string;
2494
2495
  input: Record<string, any>;
2495
2496
  cache_control?: {
2496
2497
  type: "ephemeral";
@@ -2506,15 +2507,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2506
2507
  type: "image";
2507
2508
  source: {
2508
2509
  type: "base64";
2509
- data: string;
2510
2510
  media_type: "image/jpeg";
2511
+ data: string;
2511
2512
  };
2512
2513
  cache_control?: {
2513
2514
  type: "ephemeral";
2514
2515
  } | undefined;
2515
2516
  })[];
2516
- role: "user" | "assistant";
2517
2517
  }, {
2518
+ role: "user" | "assistant";
2518
2519
  content: string | ({
2519
2520
  type: "text";
2520
2521
  text: string;
@@ -2523,8 +2524,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2523
2524
  } | undefined;
2524
2525
  } | {
2525
2526
  type: "tool_use";
2526
- name: string;
2527
2527
  id: string;
2528
+ name: string;
2528
2529
  input: Record<string, any>;
2529
2530
  cache_control?: {
2530
2531
  type: "ephemeral";
@@ -2540,16 +2541,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2540
2541
  type: "image";
2541
2542
  source: {
2542
2543
  type: "base64";
2543
- data: string;
2544
2544
  media_type: "image/jpeg";
2545
+ data: string;
2545
2546
  };
2546
2547
  cache_control?: {
2547
2548
  type: "ephemeral";
2548
2549
  } | undefined;
2549
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[];
@@ -2577,8 +2578,8 @@ 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
+ role: "user" | "assistant";
2582
2583
  content: string | ({
2583
2584
  type: "text";
2584
2585
  text: string;
@@ -2587,8 +2588,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2587
2588
  } | undefined;
2588
2589
  } | {
2589
2590
  type: "tool_use";
2590
- name: string;
2591
2591
  id: string;
2592
+ name: string;
2592
2593
  input: Record<string, any>;
2593
2594
  cache_control?: {
2594
2595
  type: "ephemeral";
@@ -2604,16 +2605,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2604
2605
  type: "image";
2605
2606
  source: {
2606
2607
  type: "base64";
2607
- data: string;
2608
2608
  media_type: "image/jpeg";
2609
+ data: string;
2609
2610
  };
2610
2611
  cache_control?: {
2611
2612
  type: "ephemeral";
2612
2613
  } | undefined;
2613
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[];
@@ -2641,8 +2642,8 @@ 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
+ role: "user" | "assistant";
2646
2647
  content: string | ({
2647
2648
  type: "text";
2648
2649
  text: string;
@@ -2651,8 +2652,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2651
2652
  } | undefined;
2652
2653
  } | {
2653
2654
  type: "tool_use";
2654
- name: string;
2655
2655
  id: string;
2656
+ name: string;
2656
2657
  input: Record<string, any>;
2657
2658
  cache_control?: {
2658
2659
  type: "ephemeral";
@@ -2668,14 +2669,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2668
2669
  type: "image";
2669
2670
  source: {
2670
2671
  type: "base64";
2671
- data: string;
2672
2672
  media_type: "image/jpeg";
2673
+ data: string;
2673
2674
  };
2674
2675
  cache_control?: {
2675
2676
  type: "ephemeral";
2676
2677
  } | undefined;
2677
2678
  })[];
2678
- role: "user" | "assistant";
2679
2679
  }[];
2680
2680
  }>;
2681
2681
  toolResults: z.ZodArray<z.ZodObject<{
@@ -2683,12 +2683,12 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2683
2683
  result: z.ZodString;
2684
2684
  id: z.ZodString;
2685
2685
  }, "strip", z.ZodTypeAny, {
2686
- name: string;
2687
2686
  id: string;
2687
+ name: string;
2688
2688
  result: string;
2689
2689
  }, {
2690
- name: string;
2691
2690
  id: string;
2691
+ name: string;
2692
2692
  result: string;
2693
2693
  }>, "many">;
2694
2694
  }, "strip", z.ZodTypeAny, {
@@ -2697,6 +2697,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2697
2697
  costMode: "lite" | "normal" | "max";
2698
2698
  promptId: string;
2699
2699
  agentState: {
2700
+ agentContext: string;
2700
2701
  fileContext: {
2701
2702
  currentWorkingDirectory: string;
2702
2703
  fileTree: import("../util/file").FileTreeNode[];
@@ -2724,8 +2725,8 @@ 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
+ role: "user" | "assistant";
2729
2730
  content: string | ({
2730
2731
  type: "text";
2731
2732
  text: string;
@@ -2734,8 +2735,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2734
2735
  } | undefined;
2735
2736
  } | {
2736
2737
  type: "tool_use";
2737
- name: string;
2738
2738
  id: string;
2739
+ name: string;
2739
2740
  input: Record<string, any>;
2740
2741
  cache_control?: {
2741
2742
  type: "ephemeral";
@@ -2751,19 +2752,18 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2751
2752
  type: "image";
2752
2753
  source: {
2753
2754
  type: "base64";
2754
- data: string;
2755
2755
  media_type: "image/jpeg";
2756
+ data: string;
2756
2757
  };
2757
2758
  cache_control?: {
2758
2759
  type: "ephemeral";
2759
2760
  } | undefined;
2760
2761
  })[];
2761
- role: "user" | "assistant";
2762
2762
  }[];
2763
2763
  };
2764
2764
  toolResults: {
2765
- name: string;
2766
2765
  id: string;
2766
+ name: string;
2767
2767
  result: string;
2768
2768
  }[];
2769
2769
  authToken?: string | undefined;
@@ -2773,6 +2773,7 @@ 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[];
@@ -2800,8 +2801,8 @@ 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
+ role: "user" | "assistant";
2805
2806
  content: string | ({
2806
2807
  type: "text";
2807
2808
  text: string;
@@ -2810,8 +2811,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2810
2811
  } | undefined;
2811
2812
  } | {
2812
2813
  type: "tool_use";
2813
- name: string;
2814
2814
  id: string;
2815
+ name: string;
2815
2816
  input: Record<string, any>;
2816
2817
  cache_control?: {
2817
2818
  type: "ephemeral";
@@ -2827,19 +2828,18 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2827
2828
  type: "image";
2828
2829
  source: {
2829
2830
  type: "base64";
2830
- data: string;
2831
2831
  media_type: "image/jpeg";
2832
+ data: string;
2832
2833
  };
2833
2834
  cache_control?: {
2834
2835
  type: "ephemeral";
2835
2836
  } | undefined;
2836
2837
  })[];
2837
- role: "user" | "assistant";
2838
2838
  }[];
2839
2839
  };
2840
2840
  toolResults: {
2841
- name: string;
2842
2841
  id: string;
2842
+ name: string;
2843
2843
  result: string;
2844
2844
  }[];
2845
2845
  authToken?: string | undefined;
@@ -2972,7 +2972,6 @@ 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[];
@@ -3000,10 +2999,10 @@ 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[];
@@ -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">;
@@ -3064,9 +3064,37 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3064
3064
  type: "action";
3065
3065
  data: {
3066
3066
  type: "user-input";
3067
+ fileContext: {
3068
+ currentWorkingDirectory: string;
3069
+ fileTree: import("../util/file").FileTreeNode[];
3070
+ fileTokenScores: Record<string, Record<string, number>>;
3071
+ knowledgeFiles: Record<string, string>;
3072
+ gitChanges: {
3073
+ diff: string;
3074
+ status: string;
3075
+ diffCached: string;
3076
+ lastCommitMessages: string;
3077
+ };
3078
+ changesSinceLastChat: Record<string, string>;
3079
+ shellConfigFiles: Record<string, string>;
3080
+ systemInfo: {
3081
+ platform: string;
3082
+ shell: string;
3083
+ nodeVersion: string;
3084
+ arch: string;
3085
+ homedir: string;
3086
+ cpus: number;
3087
+ };
3088
+ fileVersions: {
3089
+ path: string;
3090
+ content: string;
3091
+ }[][];
3092
+ userKnowledgeFiles?: Record<string, string> | undefined;
3093
+ };
3067
3094
  fingerprintId: string;
3068
3095
  userInputId: string;
3069
3096
  messages: {
3097
+ role: "user" | "assistant";
3070
3098
  content: string | ({
3071
3099
  type: "text";
3072
3100
  text: string;
@@ -3075,8 +3103,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3075
3103
  } | undefined;
3076
3104
  } | {
3077
3105
  type: "tool_use";
3078
- name: string;
3079
3106
  id: string;
3107
+ name: string;
3080
3108
  input: Record<string, any>;
3081
3109
  cache_control?: {
3082
3110
  type: "ephemeral";
@@ -3092,42 +3120,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3092
3120
  type: "image";
3093
3121
  source: {
3094
3122
  type: "base64";
3095
- data: string;
3096
3123
  media_type: "image/jpeg";
3124
+ data: string;
3097
3125
  };
3098
3126
  cache_control?: {
3099
3127
  type: "ephemeral";
3100
3128
  } | undefined;
3101
3129
  })[];
3102
- role: "user" | "assistant";
3103
3130
  }[];
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
3131
  changesAlreadyApplied: {
3132
3132
  type: "patch" | "file";
3133
3133
  path: string;
@@ -3141,6 +3141,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3141
3141
  costMode: "lite" | "normal" | "max";
3142
3142
  promptId: string;
3143
3143
  agentState: {
3144
+ agentContext: string;
3144
3145
  fileContext: {
3145
3146
  currentWorkingDirectory: string;
3146
3147
  fileTree: import("../util/file").FileTreeNode[];
@@ -3168,8 +3169,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3168
3169
  }[][];
3169
3170
  userKnowledgeFiles?: Record<string, string> | undefined;
3170
3171
  };
3171
- agentContext: string;
3172
3172
  messageHistory: {
3173
+ role: "user" | "assistant";
3173
3174
  content: string | ({
3174
3175
  type: "text";
3175
3176
  text: string;
@@ -3178,8 +3179,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3178
3179
  } | undefined;
3179
3180
  } | {
3180
3181
  type: "tool_use";
3181
- name: string;
3182
3182
  id: string;
3183
+ name: string;
3183
3184
  input: Record<string, any>;
3184
3185
  cache_control?: {
3185
3186
  type: "ephemeral";
@@ -3195,19 +3196,18 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3195
3196
  type: "image";
3196
3197
  source: {
3197
3198
  type: "base64";
3198
- data: string;
3199
3199
  media_type: "image/jpeg";
3200
+ data: string;
3200
3201
  };
3201
3202
  cache_control?: {
3202
3203
  type: "ephemeral";
3203
3204
  } | undefined;
3204
3205
  })[];
3205
- role: "user" | "assistant";
3206
3206
  }[];
3207
3207
  };
3208
3208
  toolResults: {
3209
- name: string;
3210
3209
  id: string;
3210
+ name: string;
3211
3211
  result: string;
3212
3212
  }[];
3213
3213
  authToken?: string | undefined;
@@ -3218,7 +3218,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3218
3218
  requestId?: string | undefined;
3219
3219
  } | {
3220
3220
  type: "init";
3221
- fingerprintId: string;
3222
3221
  fileContext: {
3223
3222
  currentWorkingDirectory: string;
3224
3223
  fileTree: import("../util/file").FileTreeNode[];
@@ -3246,6 +3245,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3246
3245
  }[][];
3247
3246
  userKnowledgeFiles?: Record<string, string> | undefined;
3248
3247
  };
3248
+ fingerprintId: string;
3249
3249
  authToken?: string | undefined;
3250
3250
  } | {
3251
3251
  type: "usage";
@@ -3262,9 +3262,37 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3262
3262
  type: "action";
3263
3263
  data: {
3264
3264
  type: "user-input";
3265
+ fileContext: {
3266
+ currentWorkingDirectory: string;
3267
+ fileTree: import("../util/file").FileTreeNode[];
3268
+ fileTokenScores: Record<string, Record<string, number>>;
3269
+ knowledgeFiles: Record<string, string>;
3270
+ gitChanges: {
3271
+ diff: string;
3272
+ status: string;
3273
+ diffCached: string;
3274
+ lastCommitMessages: string;
3275
+ };
3276
+ changesSinceLastChat: Record<string, string>;
3277
+ shellConfigFiles: Record<string, string>;
3278
+ systemInfo: {
3279
+ platform: string;
3280
+ shell: string;
3281
+ nodeVersion: string;
3282
+ arch: string;
3283
+ homedir: string;
3284
+ cpus: number;
3285
+ };
3286
+ fileVersions: {
3287
+ path: string;
3288
+ content: string;
3289
+ }[][];
3290
+ userKnowledgeFiles?: Record<string, string> | undefined;
3291
+ };
3265
3292
  fingerprintId: string;
3266
3293
  userInputId: string;
3267
3294
  messages: {
3295
+ role: "user" | "assistant";
3268
3296
  content: string | ({
3269
3297
  type: "text";
3270
3298
  text: string;
@@ -3273,8 +3301,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3273
3301
  } | undefined;
3274
3302
  } | {
3275
3303
  type: "tool_use";
3276
- name: string;
3277
3304
  id: string;
3305
+ name: string;
3278
3306
  input: Record<string, any>;
3279
3307
  cache_control?: {
3280
3308
  type: "ephemeral";
@@ -3290,42 +3318,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3290
3318
  type: "image";
3291
3319
  source: {
3292
3320
  type: "base64";
3293
- data: string;
3294
3321
  media_type: "image/jpeg";
3322
+ data: string;
3295
3323
  };
3296
3324
  cache_control?: {
3297
- type: "ephemeral";
3298
- } | undefined;
3299
- })[];
3300
- role: "user" | "assistant";
3301
- }[];
3302
- fileContext: {
3303
- currentWorkingDirectory: string;
3304
- fileTree: import("../util/file").FileTreeNode[];
3305
- fileTokenScores: Record<string, Record<string, number>>;
3306
- knowledgeFiles: Record<string, string>;
3307
- gitChanges: {
3308
- diff: string;
3309
- status: string;
3310
- diffCached: string;
3311
- lastCommitMessages: string;
3312
- };
3313
- changesSinceLastChat: Record<string, string>;
3314
- shellConfigFiles: Record<string, string>;
3315
- systemInfo: {
3316
- platform: string;
3317
- shell: string;
3318
- nodeVersion: string;
3319
- arch: string;
3320
- homedir: string;
3321
- cpus: number;
3322
- };
3323
- fileVersions: {
3324
- path: string;
3325
- content: string;
3326
- }[][];
3327
- userKnowledgeFiles?: Record<string, string> | undefined;
3328
- };
3325
+ type: "ephemeral";
3326
+ } | undefined;
3327
+ })[];
3328
+ }[];
3329
3329
  changesAlreadyApplied: {
3330
3330
  type: "patch" | "file";
3331
3331
  path: string;
@@ -3338,6 +3338,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3338
3338
  fingerprintId: string;
3339
3339
  promptId: string;
3340
3340
  agentState: {
3341
+ agentContext: string;
3341
3342
  fileContext: {
3342
3343
  currentWorkingDirectory: string;
3343
3344
  fileTree: import("../util/file").FileTreeNode[];
@@ -3365,8 +3366,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3365
3366
  }[][];
3366
3367
  userKnowledgeFiles?: Record<string, string> | undefined;
3367
3368
  };
3368
- agentContext: string;
3369
3369
  messageHistory: {
3370
+ role: "user" | "assistant";
3370
3371
  content: string | ({
3371
3372
  type: "text";
3372
3373
  text: string;
@@ -3375,8 +3376,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3375
3376
  } | undefined;
3376
3377
  } | {
3377
3378
  type: "tool_use";
3378
- name: string;
3379
3379
  id: string;
3380
+ name: string;
3380
3381
  input: Record<string, any>;
3381
3382
  cache_control?: {
3382
3383
  type: "ephemeral";
@@ -3392,19 +3393,18 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3392
3393
  type: "image";
3393
3394
  source: {
3394
3395
  type: "base64";
3395
- data: string;
3396
3396
  media_type: "image/jpeg";
3397
+ data: string;
3397
3398
  };
3398
3399
  cache_control?: {
3399
3400
  type: "ephemeral";
3400
3401
  } | undefined;
3401
3402
  })[];
3402
- role: "user" | "assistant";
3403
3403
  }[];
3404
3404
  };
3405
3405
  toolResults: {
3406
- name: string;
3407
3406
  id: string;
3407
+ name: string;
3408
3408
  result: string;
3409
3409
  }[];
3410
3410
  authToken?: string | undefined;
@@ -3416,7 +3416,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3416
3416
  requestId?: string | undefined;
3417
3417
  } | {
3418
3418
  type: "init";
3419
- fingerprintId: string;
3420
3419
  fileContext: {
3421
3420
  currentWorkingDirectory: string;
3422
3421
  fileTree: import("../util/file").FileTreeNode[];
@@ -3444,6 +3443,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3444
3443
  }[][];
3445
3444
  userKnowledgeFiles?: Record<string, string> | undefined;
3446
3445
  };
3446
+ fingerprintId: string;
3447
3447
  authToken?: string | undefined;
3448
3448
  } | {
3449
3449
  type: "usage";
@@ -3468,13 +3468,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3468
3468
  }, "strip", z.ZodTypeAny, {
3469
3469
  type: "ack";
3470
3470
  success: boolean;
3471
- error?: string | undefined;
3472
3471
  txid?: number | undefined;
3472
+ error?: string | undefined;
3473
3473
  }, {
3474
3474
  type: "ack";
3475
3475
  success: boolean;
3476
- error?: string | undefined;
3477
3476
  txid?: number | undefined;
3477
+ error?: string | undefined;
3478
3478
  }>;
3479
3479
  action: z.ZodObject<{
3480
3480
  type: z.ZodLiteral<"action">;
@@ -3740,16 +3740,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3740
3740
  }>>;
3741
3741
  }, "strip", z.ZodTypeAny, {
3742
3742
  type: "tool_use";
3743
- name: string;
3744
3743
  id: string;
3744
+ name: string;
3745
3745
  input: Record<string, any>;
3746
3746
  cache_control?: {
3747
3747
  type: "ephemeral";
3748
3748
  } | undefined;
3749
3749
  }, {
3750
3750
  type: "tool_use";
3751
- name: string;
3752
3751
  id: string;
3752
+ name: string;
3753
3753
  input: Record<string, any>;
3754
3754
  cache_control?: {
3755
3755
  type: "ephemeral";
@@ -3787,12 +3787,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3787
3787
  data: z.ZodString;
3788
3788
  }, "strip", z.ZodTypeAny, {
3789
3789
  type: "base64";
3790
- data: string;
3791
3790
  media_type: "image/jpeg";
3791
+ data: string;
3792
3792
  }, {
3793
3793
  type: "base64";
3794
- data: string;
3795
3794
  media_type: "image/jpeg";
3795
+ data: string;
3796
3796
  }>;
3797
3797
  cache_control: z.ZodOptional<z.ZodObject<{
3798
3798
  type: z.ZodLiteral<"ephemeral">;
@@ -3805,8 +3805,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3805
3805
  type: "image";
3806
3806
  source: {
3807
3807
  type: "base64";
3808
- data: string;
3809
3808
  media_type: "image/jpeg";
3809
+ data: string;
3810
3810
  };
3811
3811
  cache_control?: {
3812
3812
  type: "ephemeral";
@@ -3815,14 +3815,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3815
3815
  type: "image";
3816
3816
  source: {
3817
3817
  type: "base64";
3818
- data: string;
3819
3818
  media_type: "image/jpeg";
3819
+ data: string;
3820
3820
  };
3821
3821
  cache_control?: {
3822
3822
  type: "ephemeral";
3823
3823
  } | undefined;
3824
3824
  }>]>, "many">]>;
3825
3825
  }, "strip", z.ZodTypeAny, {
3826
+ role: "user" | "assistant";
3826
3827
  content: string | ({
3827
3828
  type: "text";
3828
3829
  text: string;
@@ -3831,8 +3832,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3831
3832
  } | undefined;
3832
3833
  } | {
3833
3834
  type: "tool_use";
3834
- name: string;
3835
3835
  id: string;
3836
+ name: string;
3836
3837
  input: Record<string, any>;
3837
3838
  cache_control?: {
3838
3839
  type: "ephemeral";
@@ -3848,15 +3849,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3848
3849
  type: "image";
3849
3850
  source: {
3850
3851
  type: "base64";
3851
- data: string;
3852
3852
  media_type: "image/jpeg";
3853
+ data: string;
3853
3854
  };
3854
3855
  cache_control?: {
3855
3856
  type: "ephemeral";
3856
3857
  } | undefined;
3857
3858
  })[];
3858
- role: "user" | "assistant";
3859
3859
  }, {
3860
+ role: "user" | "assistant";
3860
3861
  content: string | ({
3861
3862
  type: "text";
3862
3863
  text: string;
@@ -3865,8 +3866,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3865
3866
  } | undefined;
3866
3867
  } | {
3867
3868
  type: "tool_use";
3868
- name: string;
3869
3869
  id: string;
3870
+ name: string;
3870
3871
  input: Record<string, any>;
3871
3872
  cache_control?: {
3872
3873
  type: "ephemeral";
@@ -3882,16 +3883,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3882
3883
  type: "image";
3883
3884
  source: {
3884
3885
  type: "base64";
3885
- data: string;
3886
3886
  media_type: "image/jpeg";
3887
+ data: string;
3887
3888
  };
3888
3889
  cache_control?: {
3889
3890
  type: "ephemeral";
3890
3891
  } | undefined;
3891
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[];
@@ -3919,8 +3920,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3919
3920
  }[][];
3920
3921
  userKnowledgeFiles?: Record<string, string> | undefined;
3921
3922
  };
3922
- agentContext: string;
3923
3923
  messageHistory: {
3924
+ role: "user" | "assistant";
3924
3925
  content: string | ({
3925
3926
  type: "text";
3926
3927
  text: string;
@@ -3929,8 +3930,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3929
3930
  } | undefined;
3930
3931
  } | {
3931
3932
  type: "tool_use";
3932
- name: string;
3933
3933
  id: string;
3934
+ name: string;
3934
3935
  input: Record<string, any>;
3935
3936
  cache_control?: {
3936
3937
  type: "ephemeral";
@@ -3946,16 +3947,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3946
3947
  type: "image";
3947
3948
  source: {
3948
3949
  type: "base64";
3949
- data: string;
3950
3950
  media_type: "image/jpeg";
3951
+ data: string;
3951
3952
  };
3952
3953
  cache_control?: {
3953
3954
  type: "ephemeral";
3954
3955
  } | undefined;
3955
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[];
@@ -3983,8 +3984,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3983
3984
  }[][];
3984
3985
  userKnowledgeFiles?: Record<string, string> | undefined;
3985
3986
  };
3986
- agentContext: string;
3987
3987
  messageHistory: {
3988
+ role: "user" | "assistant";
3988
3989
  content: string | ({
3989
3990
  type: "text";
3990
3991
  text: string;
@@ -3993,8 +3994,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3993
3994
  } | undefined;
3994
3995
  } | {
3995
3996
  type: "tool_use";
3996
- name: string;
3997
3997
  id: string;
3998
+ name: string;
3998
3999
  input: Record<string, any>;
3999
4000
  cache_control?: {
4000
4001
  type: "ephemeral";
@@ -4010,14 +4011,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4010
4011
  type: "image";
4011
4012
  source: {
4012
4013
  type: "base64";
4013
- data: string;
4014
4014
  media_type: "image/jpeg";
4015
+ data: string;
4015
4016
  };
4016
4017
  cache_control?: {
4017
4018
  type: "ephemeral";
4018
4019
  } | undefined;
4019
4020
  })[];
4020
- role: "user" | "assistant";
4021
4021
  }[];
4022
4022
  }>;
4023
4023
  toolCalls: z.ZodArray<z.ZodObject<{
@@ -4025,12 +4025,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4025
4025
  parameters: z.ZodRecord<z.ZodString, z.ZodString>;
4026
4026
  id: z.ZodString;
4027
4027
  }, "strip", z.ZodTypeAny, {
4028
- name: string;
4029
4028
  id: string;
4029
+ name: string;
4030
4030
  parameters: Record<string, string>;
4031
4031
  }, {
4032
- name: string;
4033
4032
  id: string;
4033
+ name: string;
4034
4034
  parameters: Record<string, string>;
4035
4035
  }>, "many">;
4036
4036
  toolResults: z.ZodArray<z.ZodObject<{
@@ -4038,12 +4038,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4038
4038
  result: z.ZodString;
4039
4039
  id: z.ZodString;
4040
4040
  }, "strip", z.ZodTypeAny, {
4041
- name: string;
4042
4041
  id: string;
4042
+ name: string;
4043
4043
  result: string;
4044
4044
  }, {
4045
- name: string;
4046
4045
  id: string;
4046
+ name: string;
4047
4047
  result: string;
4048
4048
  }>, "many">;
4049
4049
  }, {
@@ -4057,6 +4057,7 @@ 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[];
@@ -4084,8 +4085,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4084
4085
  }[][];
4085
4086
  userKnowledgeFiles?: Record<string, string> | undefined;
4086
4087
  };
4087
- agentContext: string;
4088
4088
  messageHistory: {
4089
+ role: "user" | "assistant";
4089
4090
  content: string | ({
4090
4091
  type: "text";
4091
4092
  text: string;
@@ -4094,8 +4095,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4094
4095
  } | undefined;
4095
4096
  } | {
4096
4097
  type: "tool_use";
4097
- name: string;
4098
4098
  id: string;
4099
+ name: string;
4099
4100
  input: Record<string, any>;
4100
4101
  cache_control?: {
4101
4102
  type: "ephemeral";
@@ -4111,24 +4112,23 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4111
4112
  type: "image";
4112
4113
  source: {
4113
4114
  type: "base64";
4114
- data: string;
4115
4115
  media_type: "image/jpeg";
4116
+ data: string;
4116
4117
  };
4117
4118
  cache_control?: {
4118
4119
  type: "ephemeral";
4119
4120
  } | undefined;
4120
4121
  })[];
4121
- role: "user" | "assistant";
4122
4122
  }[];
4123
4123
  };
4124
4124
  toolResults: {
4125
- name: string;
4126
4125
  id: string;
4126
+ name: string;
4127
4127
  result: string;
4128
4128
  }[];
4129
4129
  toolCalls: {
4130
- name: string;
4131
4130
  id: string;
4131
+ name: string;
4132
4132
  parameters: Record<string, string>;
4133
4133
  }[];
4134
4134
  usage?: number | undefined;
@@ -4141,6 +4141,7 @@ 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[];
@@ -4168,8 +4169,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4168
4169
  }[][];
4169
4170
  userKnowledgeFiles?: Record<string, string> | undefined;
4170
4171
  };
4171
- agentContext: string;
4172
4172
  messageHistory: {
4173
+ role: "user" | "assistant";
4173
4174
  content: string | ({
4174
4175
  type: "text";
4175
4176
  text: string;
@@ -4178,8 +4179,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4178
4179
  } | undefined;
4179
4180
  } | {
4180
4181
  type: "tool_use";
4181
- name: string;
4182
4182
  id: string;
4183
+ name: string;
4183
4184
  input: Record<string, any>;
4184
4185
  cache_control?: {
4185
4186
  type: "ephemeral";
@@ -4195,24 +4196,23 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4195
4196
  type: "image";
4196
4197
  source: {
4197
4198
  type: "base64";
4198
- data: string;
4199
4199
  media_type: "image/jpeg";
4200
+ data: string;
4200
4201
  };
4201
4202
  cache_control?: {
4202
4203
  type: "ephemeral";
4203
4204
  } | undefined;
4204
4205
  })[];
4205
- role: "user" | "assistant";
4206
4206
  }[];
4207
4207
  };
4208
4208
  toolResults: {
4209
- name: string;
4210
4209
  id: string;
4210
+ name: string;
4211
4211
  result: string;
4212
4212
  }[];
4213
4213
  toolCalls: {
4214
- name: string;
4215
4214
  id: string;
4215
+ name: string;
4216
4216
  parameters: Record<string, string>;
4217
4217
  }[];
4218
4218
  usage?: number | undefined;
@@ -4242,12 +4242,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4242
4242
  id: z.ZodString;
4243
4243
  input: z.ZodRecord<z.ZodString, z.ZodAny>;
4244
4244
  }, "strip", z.ZodTypeAny, {
4245
- name: string;
4246
4245
  id: string;
4246
+ name: string;
4247
4247
  input: Record<string, any>;
4248
4248
  }, {
4249
- name: string;
4250
4249
  id: string;
4250
+ name: string;
4251
4251
  input: Record<string, any>;
4252
4252
  }>;
4253
4253
  changes: z.ZodArray<z.ZodObject<{
@@ -4290,8 +4290,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4290
4290
  }, "strip", z.ZodTypeAny, {
4291
4291
  type: "tool-call";
4292
4292
  data: {
4293
- name: string;
4294
4293
  id: string;
4294
+ name: string;
4295
4295
  input: Record<string, any>;
4296
4296
  };
4297
4297
  userInputId: string;
@@ -4314,8 +4314,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4314
4314
  }, {
4315
4315
  type: "tool-call";
4316
4316
  data: {
4317
- name: string;
4318
4317
  id: string;
4318
+ name: string;
4319
4319
  input: Record<string, any>;
4320
4320
  };
4321
4321
  userInputId: string;
@@ -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;
@@ -4475,6 +4475,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4475
4475
  type: "prompt-response";
4476
4476
  promptId: string;
4477
4477
  agentState: {
4478
+ agentContext: string;
4478
4479
  fileContext: {
4479
4480
  currentWorkingDirectory: string;
4480
4481
  fileTree: import("../util/file").FileTreeNode[];
@@ -4502,8 +4503,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4502
4503
  }[][];
4503
4504
  userKnowledgeFiles?: Record<string, string> | undefined;
4504
4505
  };
4505
- agentContext: string;
4506
4506
  messageHistory: {
4507
+ role: "user" | "assistant";
4507
4508
  content: string | ({
4508
4509
  type: "text";
4509
4510
  text: string;
@@ -4512,8 +4513,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4512
4513
  } | undefined;
4513
4514
  } | {
4514
4515
  type: "tool_use";
4515
- name: string;
4516
4516
  id: string;
4517
+ name: string;
4517
4518
  input: Record<string, any>;
4518
4519
  cache_control?: {
4519
4520
  type: "ephemeral";
@@ -4529,24 +4530,23 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4529
4530
  type: "image";
4530
4531
  source: {
4531
4532
  type: "base64";
4532
- data: string;
4533
4533
  media_type: "image/jpeg";
4534
+ data: string;
4534
4535
  };
4535
4536
  cache_control?: {
4536
4537
  type: "ephemeral";
4537
4538
  } | undefined;
4538
4539
  })[];
4539
- role: "user" | "assistant";
4540
4540
  }[];
4541
4541
  };
4542
4542
  toolResults: {
4543
- name: string;
4544
4543
  id: string;
4544
+ name: string;
4545
4545
  result: string;
4546
4546
  }[];
4547
4547
  toolCalls: {
4548
- name: string;
4549
4548
  id: string;
4549
+ name: string;
4550
4550
  parameters: Record<string, string>;
4551
4551
  }[];
4552
4552
  usage?: number | undefined;
@@ -4566,8 +4566,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4566
4566
  } | {
4567
4567
  type: "tool-call";
4568
4568
  data: {
4569
- name: string;
4570
4569
  id: string;
4570
+ name: string;
4571
4571
  input: Record<string, any>;
4572
4572
  };
4573
4573
  userInputId: string;
@@ -4589,8 +4589,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4589
4589
  resetFileVersions: boolean;
4590
4590
  } | {
4591
4591
  type: "terminal-command-result";
4592
- userInputId: string;
4593
4592
  result: string;
4593
+ userInputId: string;
4594
4594
  } | {
4595
4595
  type: "npm-version-status";
4596
4596
  isUpToDate: boolean;
@@ -4649,6 +4649,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4649
4649
  type: "prompt-response";
4650
4650
  promptId: string;
4651
4651
  agentState: {
4652
+ agentContext: string;
4652
4653
  fileContext: {
4653
4654
  currentWorkingDirectory: string;
4654
4655
  fileTree: import("../util/file").FileTreeNode[];
@@ -4676,8 +4677,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4676
4677
  }[][];
4677
4678
  userKnowledgeFiles?: Record<string, string> | undefined;
4678
4679
  };
4679
- agentContext: string;
4680
4680
  messageHistory: {
4681
+ role: "user" | "assistant";
4681
4682
  content: string | ({
4682
4683
  type: "text";
4683
4684
  text: string;
@@ -4686,8 +4687,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4686
4687
  } | undefined;
4687
4688
  } | {
4688
4689
  type: "tool_use";
4689
- name: string;
4690
4690
  id: string;
4691
+ name: string;
4691
4692
  input: Record<string, any>;
4692
4693
  cache_control?: {
4693
4694
  type: "ephemeral";
@@ -4703,24 +4704,23 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4703
4704
  type: "image";
4704
4705
  source: {
4705
4706
  type: "base64";
4706
- data: string;
4707
4707
  media_type: "image/jpeg";
4708
+ data: string;
4708
4709
  };
4709
4710
  cache_control?: {
4710
4711
  type: "ephemeral";
4711
4712
  } | undefined;
4712
4713
  })[];
4713
- role: "user" | "assistant";
4714
4714
  }[];
4715
4715
  };
4716
4716
  toolResults: {
4717
- name: string;
4718
4717
  id: string;
4718
+ name: string;
4719
4719
  result: string;
4720
4720
  }[];
4721
4721
  toolCalls: {
4722
- name: string;
4723
4722
  id: string;
4723
+ name: string;
4724
4724
  parameters: Record<string, string>;
4725
4725
  }[];
4726
4726
  usage?: number | undefined;
@@ -4740,8 +4740,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4740
4740
  } | {
4741
4741
  type: "tool-call";
4742
4742
  data: {
4743
- name: string;
4744
4743
  id: string;
4744
+ name: string;
4745
4745
  input: Record<string, any>;
4746
4746
  };
4747
4747
  userInputId: string;
@@ -4763,8 +4763,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4763
4763
  resetFileVersions: boolean;
4764
4764
  } | {
4765
4765
  type: "terminal-command-result";
4766
- userInputId: string;
4767
4766
  result: string;
4767
+ userInputId: string;
4768
4768
  } | {
4769
4769
  type: "npm-version-status";
4770
4770
  isUpToDate: boolean;
@@ -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
- error?: string | undefined;
4790
4789
  txid?: number | undefined;
4790
+ error?: string | undefined;
4791
4791
  }, {
4792
4792
  type: "ack";
4793
4793
  success: boolean;
4794
- error?: string | undefined;
4795
4794
  txid?: number | undefined;
4795
+ error?: string | undefined;
4796
4796
  }>, z.ZodObject<{
4797
4797
  type: z.ZodLiteral<"action">;
4798
4798
  data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -5057,16 +5057,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5057
5057
  }>>;
5058
5058
  }, "strip", z.ZodTypeAny, {
5059
5059
  type: "tool_use";
5060
- name: string;
5061
5060
  id: string;
5061
+ name: string;
5062
5062
  input: Record<string, any>;
5063
5063
  cache_control?: {
5064
5064
  type: "ephemeral";
5065
5065
  } | undefined;
5066
5066
  }, {
5067
5067
  type: "tool_use";
5068
- name: string;
5069
5068
  id: string;
5069
+ name: string;
5070
5070
  input: Record<string, any>;
5071
5071
  cache_control?: {
5072
5072
  type: "ephemeral";
@@ -5104,12 +5104,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5104
5104
  data: z.ZodString;
5105
5105
  }, "strip", z.ZodTypeAny, {
5106
5106
  type: "base64";
5107
- data: string;
5108
5107
  media_type: "image/jpeg";
5108
+ data: string;
5109
5109
  }, {
5110
5110
  type: "base64";
5111
- data: string;
5112
5111
  media_type: "image/jpeg";
5112
+ data: string;
5113
5113
  }>;
5114
5114
  cache_control: z.ZodOptional<z.ZodObject<{
5115
5115
  type: z.ZodLiteral<"ephemeral">;
@@ -5122,8 +5122,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5122
5122
  type: "image";
5123
5123
  source: {
5124
5124
  type: "base64";
5125
- data: string;
5126
5125
  media_type: "image/jpeg";
5126
+ data: string;
5127
5127
  };
5128
5128
  cache_control?: {
5129
5129
  type: "ephemeral";
@@ -5132,14 +5132,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5132
5132
  type: "image";
5133
5133
  source: {
5134
5134
  type: "base64";
5135
- data: string;
5136
5135
  media_type: "image/jpeg";
5136
+ data: string;
5137
5137
  };
5138
5138
  cache_control?: {
5139
5139
  type: "ephemeral";
5140
5140
  } | undefined;
5141
5141
  }>]>, "many">]>;
5142
5142
  }, "strip", z.ZodTypeAny, {
5143
+ role: "user" | "assistant";
5143
5144
  content: string | ({
5144
5145
  type: "text";
5145
5146
  text: string;
@@ -5148,8 +5149,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5148
5149
  } | undefined;
5149
5150
  } | {
5150
5151
  type: "tool_use";
5151
- name: string;
5152
5152
  id: string;
5153
+ name: string;
5153
5154
  input: Record<string, any>;
5154
5155
  cache_control?: {
5155
5156
  type: "ephemeral";
@@ -5165,15 +5166,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5165
5166
  type: "image";
5166
5167
  source: {
5167
5168
  type: "base64";
5168
- data: string;
5169
5169
  media_type: "image/jpeg";
5170
+ data: string;
5170
5171
  };
5171
5172
  cache_control?: {
5172
5173
  type: "ephemeral";
5173
5174
  } | undefined;
5174
5175
  })[];
5175
- role: "user" | "assistant";
5176
5176
  }, {
5177
+ role: "user" | "assistant";
5177
5178
  content: string | ({
5178
5179
  type: "text";
5179
5180
  text: string;
@@ -5182,8 +5183,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5182
5183
  } | undefined;
5183
5184
  } | {
5184
5185
  type: "tool_use";
5185
- name: string;
5186
5186
  id: string;
5187
+ name: string;
5187
5188
  input: Record<string, any>;
5188
5189
  cache_control?: {
5189
5190
  type: "ephemeral";
@@ -5199,16 +5200,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5199
5200
  type: "image";
5200
5201
  source: {
5201
5202
  type: "base64";
5202
- data: string;
5203
5203
  media_type: "image/jpeg";
5204
+ data: string;
5204
5205
  };
5205
5206
  cache_control?: {
5206
5207
  type: "ephemeral";
5207
5208
  } | undefined;
5208
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[];
@@ -5236,8 +5237,8 @@ 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
+ role: "user" | "assistant";
5241
5242
  content: string | ({
5242
5243
  type: "text";
5243
5244
  text: string;
@@ -5246,8 +5247,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5246
5247
  } | undefined;
5247
5248
  } | {
5248
5249
  type: "tool_use";
5249
- name: string;
5250
5250
  id: string;
5251
+ name: string;
5251
5252
  input: Record<string, any>;
5252
5253
  cache_control?: {
5253
5254
  type: "ephemeral";
@@ -5263,16 +5264,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5263
5264
  type: "image";
5264
5265
  source: {
5265
5266
  type: "base64";
5266
- data: string;
5267
5267
  media_type: "image/jpeg";
5268
+ data: string;
5268
5269
  };
5269
5270
  cache_control?: {
5270
5271
  type: "ephemeral";
5271
5272
  } | undefined;
5272
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[];
@@ -5300,8 +5301,8 @@ 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
+ role: "user" | "assistant";
5305
5306
  content: string | ({
5306
5307
  type: "text";
5307
5308
  text: string;
@@ -5310,8 +5311,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5310
5311
  } | undefined;
5311
5312
  } | {
5312
5313
  type: "tool_use";
5313
- name: string;
5314
5314
  id: string;
5315
+ name: string;
5315
5316
  input: Record<string, any>;
5316
5317
  cache_control?: {
5317
5318
  type: "ephemeral";
@@ -5327,14 +5328,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5327
5328
  type: "image";
5328
5329
  source: {
5329
5330
  type: "base64";
5330
- data: string;
5331
5331
  media_type: "image/jpeg";
5332
+ data: string;
5332
5333
  };
5333
5334
  cache_control?: {
5334
5335
  type: "ephemeral";
5335
5336
  } | undefined;
5336
5337
  })[];
5337
- role: "user" | "assistant";
5338
5338
  }[];
5339
5339
  }>;
5340
5340
  toolCalls: z.ZodArray<z.ZodObject<{
@@ -5342,12 +5342,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5342
5342
  parameters: z.ZodRecord<z.ZodString, z.ZodString>;
5343
5343
  id: z.ZodString;
5344
5344
  }, "strip", z.ZodTypeAny, {
5345
- name: string;
5346
5345
  id: string;
5346
+ name: string;
5347
5347
  parameters: Record<string, string>;
5348
5348
  }, {
5349
- name: string;
5350
5349
  id: string;
5350
+ name: string;
5351
5351
  parameters: Record<string, string>;
5352
5352
  }>, "many">;
5353
5353
  toolResults: z.ZodArray<z.ZodObject<{
@@ -5355,12 +5355,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5355
5355
  result: z.ZodString;
5356
5356
  id: z.ZodString;
5357
5357
  }, "strip", z.ZodTypeAny, {
5358
- name: string;
5359
5358
  id: string;
5359
+ name: string;
5360
5360
  result: string;
5361
5361
  }, {
5362
- name: string;
5363
5362
  id: string;
5363
+ name: string;
5364
5364
  result: string;
5365
5365
  }>, "many">;
5366
5366
  }, {
@@ -5374,6 +5374,7 @@ 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[];
@@ -5401,8 +5402,8 @@ 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
+ role: "user" | "assistant";
5406
5407
  content: string | ({
5407
5408
  type: "text";
5408
5409
  text: string;
@@ -5411,8 +5412,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5411
5412
  } | undefined;
5412
5413
  } | {
5413
5414
  type: "tool_use";
5414
- name: string;
5415
5415
  id: string;
5416
+ name: string;
5416
5417
  input: Record<string, any>;
5417
5418
  cache_control?: {
5418
5419
  type: "ephemeral";
@@ -5428,24 +5429,23 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5428
5429
  type: "image";
5429
5430
  source: {
5430
5431
  type: "base64";
5431
- data: string;
5432
5432
  media_type: "image/jpeg";
5433
+ data: string;
5433
5434
  };
5434
5435
  cache_control?: {
5435
5436
  type: "ephemeral";
5436
5437
  } | undefined;
5437
5438
  })[];
5438
- role: "user" | "assistant";
5439
5439
  }[];
5440
5440
  };
5441
5441
  toolResults: {
5442
- name: string;
5443
5442
  id: string;
5443
+ name: string;
5444
5444
  result: string;
5445
5445
  }[];
5446
5446
  toolCalls: {
5447
- name: string;
5448
5447
  id: string;
5448
+ name: string;
5449
5449
  parameters: Record<string, string>;
5450
5450
  }[];
5451
5451
  usage?: number | undefined;
@@ -5458,6 +5458,7 @@ 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[];
@@ -5485,8 +5486,8 @@ 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
+ role: "user" | "assistant";
5490
5491
  content: string | ({
5491
5492
  type: "text";
5492
5493
  text: string;
@@ -5495,8 +5496,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5495
5496
  } | undefined;
5496
5497
  } | {
5497
5498
  type: "tool_use";
5498
- name: string;
5499
5499
  id: string;
5500
+ name: string;
5500
5501
  input: Record<string, any>;
5501
5502
  cache_control?: {
5502
5503
  type: "ephemeral";
@@ -5512,24 +5513,23 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5512
5513
  type: "image";
5513
5514
  source: {
5514
5515
  type: "base64";
5515
- data: string;
5516
5516
  media_type: "image/jpeg";
5517
+ data: string;
5517
5518
  };
5518
5519
  cache_control?: {
5519
5520
  type: "ephemeral";
5520
5521
  } | undefined;
5521
5522
  })[];
5522
- role: "user" | "assistant";
5523
5523
  }[];
5524
5524
  };
5525
5525
  toolResults: {
5526
- name: string;
5527
5526
  id: string;
5527
+ name: string;
5528
5528
  result: string;
5529
5529
  }[];
5530
5530
  toolCalls: {
5531
- name: string;
5532
5531
  id: string;
5532
+ name: string;
5533
5533
  parameters: Record<string, string>;
5534
5534
  }[];
5535
5535
  usage?: number | undefined;
@@ -5559,12 +5559,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5559
5559
  id: z.ZodString;
5560
5560
  input: z.ZodRecord<z.ZodString, z.ZodAny>;
5561
5561
  }, "strip", z.ZodTypeAny, {
5562
- name: string;
5563
5562
  id: string;
5563
+ name: string;
5564
5564
  input: Record<string, any>;
5565
5565
  }, {
5566
- name: string;
5567
5566
  id: string;
5567
+ name: string;
5568
5568
  input: Record<string, any>;
5569
5569
  }>;
5570
5570
  changes: z.ZodArray<z.ZodObject<{
@@ -5607,8 +5607,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5607
5607
  }, "strip", z.ZodTypeAny, {
5608
5608
  type: "tool-call";
5609
5609
  data: {
5610
- name: string;
5611
5610
  id: string;
5611
+ name: string;
5612
5612
  input: Record<string, any>;
5613
5613
  };
5614
5614
  userInputId: string;
@@ -5631,8 +5631,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5631
5631
  }, {
5632
5632
  type: "tool-call";
5633
5633
  data: {
5634
- name: string;
5635
5634
  id: string;
5635
+ name: string;
5636
5636
  input: Record<string, any>;
5637
5637
  };
5638
5638
  userInputId: string;
@@ -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;
@@ -5792,6 +5792,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5792
5792
  type: "prompt-response";
5793
5793
  promptId: string;
5794
5794
  agentState: {
5795
+ agentContext: string;
5795
5796
  fileContext: {
5796
5797
  currentWorkingDirectory: string;
5797
5798
  fileTree: import("../util/file").FileTreeNode[];
@@ -5819,8 +5820,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5819
5820
  }[][];
5820
5821
  userKnowledgeFiles?: Record<string, string> | undefined;
5821
5822
  };
5822
- agentContext: string;
5823
5823
  messageHistory: {
5824
+ role: "user" | "assistant";
5824
5825
  content: string | ({
5825
5826
  type: "text";
5826
5827
  text: string;
@@ -5829,8 +5830,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5829
5830
  } | undefined;
5830
5831
  } | {
5831
5832
  type: "tool_use";
5832
- name: string;
5833
5833
  id: string;
5834
+ name: string;
5834
5835
  input: Record<string, any>;
5835
5836
  cache_control?: {
5836
5837
  type: "ephemeral";
@@ -5846,24 +5847,23 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5846
5847
  type: "image";
5847
5848
  source: {
5848
5849
  type: "base64";
5849
- data: string;
5850
5850
  media_type: "image/jpeg";
5851
+ data: string;
5851
5852
  };
5852
5853
  cache_control?: {
5853
5854
  type: "ephemeral";
5854
5855
  } | undefined;
5855
5856
  })[];
5856
- role: "user" | "assistant";
5857
5857
  }[];
5858
5858
  };
5859
5859
  toolResults: {
5860
- name: string;
5861
5860
  id: string;
5861
+ name: string;
5862
5862
  result: string;
5863
5863
  }[];
5864
5864
  toolCalls: {
5865
- name: string;
5866
5865
  id: string;
5866
+ name: string;
5867
5867
  parameters: Record<string, string>;
5868
5868
  }[];
5869
5869
  usage?: number | undefined;
@@ -5883,8 +5883,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5883
5883
  } | {
5884
5884
  type: "tool-call";
5885
5885
  data: {
5886
- name: string;
5887
5886
  id: string;
5887
+ name: string;
5888
5888
  input: Record<string, any>;
5889
5889
  };
5890
5890
  userInputId: string;
@@ -5906,8 +5906,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5906
5906
  resetFileVersions: boolean;
5907
5907
  } | {
5908
5908
  type: "terminal-command-result";
5909
- userInputId: string;
5910
5909
  result: string;
5910
+ userInputId: string;
5911
5911
  } | {
5912
5912
  type: "npm-version-status";
5913
5913
  isUpToDate: boolean;
@@ -5966,6 +5966,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5966
5966
  type: "prompt-response";
5967
5967
  promptId: string;
5968
5968
  agentState: {
5969
+ agentContext: string;
5969
5970
  fileContext: {
5970
5971
  currentWorkingDirectory: string;
5971
5972
  fileTree: import("../util/file").FileTreeNode[];
@@ -5993,8 +5994,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5993
5994
  }[][];
5994
5995
  userKnowledgeFiles?: Record<string, string> | undefined;
5995
5996
  };
5996
- agentContext: string;
5997
5997
  messageHistory: {
5998
+ role: "user" | "assistant";
5998
5999
  content: string | ({
5999
6000
  type: "text";
6000
6001
  text: string;
@@ -6003,8 +6004,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
6003
6004
  } | undefined;
6004
6005
  } | {
6005
6006
  type: "tool_use";
6006
- name: string;
6007
6007
  id: string;
6008
+ name: string;
6008
6009
  input: Record<string, any>;
6009
6010
  cache_control?: {
6010
6011
  type: "ephemeral";
@@ -6020,24 +6021,23 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
6020
6021
  type: "image";
6021
6022
  source: {
6022
6023
  type: "base64";
6023
- data: string;
6024
6024
  media_type: "image/jpeg";
6025
+ data: string;
6025
6026
  };
6026
6027
  cache_control?: {
6027
6028
  type: "ephemeral";
6028
6029
  } | undefined;
6029
6030
  })[];
6030
- role: "user" | "assistant";
6031
6031
  }[];
6032
6032
  };
6033
6033
  toolResults: {
6034
- name: string;
6035
6034
  id: string;
6035
+ name: string;
6036
6036
  result: string;
6037
6037
  }[];
6038
6038
  toolCalls: {
6039
- name: string;
6040
6039
  id: string;
6040
+ name: string;
6041
6041
  parameters: Record<string, string>;
6042
6042
  }[];
6043
6043
  usage?: number | undefined;
@@ -6057,8 +6057,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
6057
6057
  } | {
6058
6058
  type: "tool-call";
6059
6059
  data: {
6060
- name: string;
6061
6060
  id: string;
6061
+ name: string;
6062
6062
  input: Record<string, any>;
6063
6063
  };
6064
6064
  userInputId: string;
@@ -6080,8 +6080,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
6080
6080
  resetFileVersions: boolean;
6081
6081
  } | {
6082
6082
  type: "terminal-command-result";
6083
- userInputId: string;
6084
6083
  result: string;
6084
+ userInputId: string;
6085
6085
  } | {
6086
6086
  type: "npm-version-status";
6087
6087
  isUpToDate: boolean;