codebuff 1.0.156 → 1.0.160

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/browser-runner.js +53 -28
  2. package/dist/browser-runner.js.map +1 -1
  3. package/dist/chat-storage.js +0 -1
  4. package/dist/chat-storage.js.map +1 -1
  5. package/dist/cli.d.ts +0 -13
  6. package/dist/cli.js +11 -63
  7. package/dist/cli.js.map +1 -1
  8. package/dist/client.d.ts +2 -2
  9. package/dist/client.js +7 -3
  10. package/dist/client.js.map +1 -1
  11. package/dist/code-map/tsconfig.tsbuildinfo +1 -1
  12. package/dist/common/actions.d.ts +100 -100
  13. package/dist/common/browser-actions.d.ts +219 -159
  14. package/dist/common/browser-actions.js +11 -4
  15. package/dist/common/browser-actions.js.map +1 -1
  16. package/dist/common/constants.d.ts +2 -2
  17. package/dist/common/constants.js +2 -1
  18. package/dist/common/constants.js.map +1 -1
  19. package/dist/common/util/__tests__/messages.test.d.ts +1 -0
  20. package/dist/common/util/__tests__/messages.test.js +70 -0
  21. package/dist/common/util/__tests__/messages.test.js.map +1 -0
  22. package/dist/common/util/credentials.d.ts +4 -4
  23. package/dist/common/util/messages.d.ts +6 -0
  24. package/dist/common/util/messages.js +22 -0
  25. package/dist/common/util/messages.js.map +1 -0
  26. package/dist/common/util/string.d.ts +11 -0
  27. package/dist/common/util/string.js +18 -1
  28. package/dist/common/util/string.js.map +1 -1
  29. package/dist/common/websockets/websocket-schema.d.ts +184 -184
  30. package/dist/project-files.js +2 -3
  31. package/dist/project-files.js.map +1 -1
  32. package/dist/tool-handlers.js +5 -0
  33. package/dist/tool-handlers.js.map +1 -1
  34. package/dist/utils/spinner.d.ts +10 -0
  35. package/dist/utils/spinner.js +76 -0
  36. package/dist/utils/spinner.js.map +1 -0
  37. package/package.json +1 -1
@@ -95,16 +95,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
95
95
  }>>;
96
96
  }, "strip", z.ZodTypeAny, {
97
97
  type: "tool_use";
98
- id: string;
99
98
  name: string;
99
+ id: string;
100
100
  input: Record<string, any>;
101
101
  cache_control?: {
102
102
  type: "ephemeral";
103
103
  } | undefined;
104
104
  }, {
105
105
  type: "tool_use";
106
- id: string;
107
106
  name: string;
107
+ id: string;
108
108
  input: Record<string, any>;
109
109
  cache_control?: {
110
110
  type: "ephemeral";
@@ -121,15 +121,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
121
121
  type: "ephemeral";
122
122
  }>>;
123
123
  }, "strip", z.ZodTypeAny, {
124
- type: "tool_result";
125
124
  content: string;
125
+ type: "tool_result";
126
126
  tool_use_id: string;
127
127
  cache_control?: {
128
128
  type: "ephemeral";
129
129
  } | undefined;
130
130
  }, {
131
- type: "tool_result";
132
131
  content: string;
132
+ type: "tool_result";
133
133
  tool_use_id: string;
134
134
  cache_control?: {
135
135
  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,15 +170,14 @@ 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";
182
181
  content: string | ({
183
182
  type: "text";
184
183
  text: string;
@@ -187,15 +186,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
187
186
  } | undefined;
188
187
  } | {
189
188
  type: "tool_use";
190
- id: string;
191
189
  name: string;
190
+ id: string;
192
191
  input: Record<string, any>;
193
192
  cache_control?: {
194
193
  type: "ephemeral";
195
194
  } | undefined;
196
195
  } | {
197
- type: "tool_result";
198
196
  content: string;
197
+ type: "tool_result";
199
198
  tool_use_id: string;
200
199
  cache_control?: {
201
200
  type: "ephemeral";
@@ -204,15 +203,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
204
203
  type: "image";
205
204
  source: {
206
205
  type: "base64";
207
- data: string;
208
206
  media_type: "image/jpeg";
207
+ data: string;
209
208
  };
210
209
  cache_control?: {
211
210
  type: "ephemeral";
212
211
  } | undefined;
213
212
  })[];
214
- }, {
215
213
  role: "user" | "assistant";
214
+ }, {
216
215
  content: string | ({
217
216
  type: "text";
218
217
  text: string;
@@ -221,15 +220,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
221
220
  } | undefined;
222
221
  } | {
223
222
  type: "tool_use";
224
- id: string;
225
223
  name: string;
224
+ id: string;
226
225
  input: Record<string, any>;
227
226
  cache_control?: {
228
227
  type: "ephemeral";
229
228
  } | undefined;
230
229
  } | {
231
- type: "tool_result";
232
230
  content: string;
231
+ type: "tool_result";
233
232
  tool_use_id: string;
234
233
  cache_control?: {
235
234
  type: "ephemeral";
@@ -238,13 +237,14 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
238
237
  type: "image";
239
238
  source: {
240
239
  type: "base64";
241
- data: string;
242
240
  media_type: "image/jpeg";
241
+ data: string;
243
242
  };
244
243
  cache_control?: {
245
244
  type: "ephemeral";
246
245
  } | undefined;
247
246
  })[];
247
+ role: "user" | "assistant";
248
248
  }>, "many">;
249
249
  fileContext: z.ZodObject<{
250
250
  currentWorkingDirectory: z.ZodString;
@@ -360,12 +360,12 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
360
360
  filePath: z.ZodString;
361
361
  content: z.ZodString;
362
362
  }, "strip", z.ZodTypeAny, {
363
- type: "file" | "patch";
364
363
  content: string;
364
+ type: "file" | "patch";
365
365
  filePath: string;
366
366
  }, {
367
- type: "file" | "patch";
368
367
  content: string;
368
+ type: "file" | "patch";
369
369
  filePath: string;
370
370
  }>, "many">;
371
371
  costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
@@ -374,7 +374,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
374
374
  fingerprintId: string;
375
375
  userInputId: string;
376
376
  messages: {
377
- role: "user" | "assistant";
378
377
  content: string | ({
379
378
  type: "text";
380
379
  text: string;
@@ -383,15 +382,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
383
382
  } | undefined;
384
383
  } | {
385
384
  type: "tool_use";
386
- id: string;
387
385
  name: string;
386
+ id: string;
388
387
  input: Record<string, any>;
389
388
  cache_control?: {
390
389
  type: "ephemeral";
391
390
  } | undefined;
392
391
  } | {
393
- type: "tool_result";
394
392
  content: string;
393
+ type: "tool_result";
395
394
  tool_use_id: string;
396
395
  cache_control?: {
397
396
  type: "ephemeral";
@@ -400,13 +399,14 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
400
399
  type: "image";
401
400
  source: {
402
401
  type: "base64";
403
- data: string;
404
402
  media_type: "image/jpeg";
403
+ data: string;
405
404
  };
406
405
  cache_control?: {
407
406
  type: "ephemeral";
408
407
  } | undefined;
409
408
  })[];
409
+ role: "user" | "assistant";
410
410
  }[];
411
411
  fileContext: {
412
412
  currentWorkingDirectory: string;
@@ -436,8 +436,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
436
436
  userKnowledgeFiles?: Record<string, string> | undefined;
437
437
  };
438
438
  changesAlreadyApplied: {
439
- type: "file" | "patch";
440
439
  content: string;
440
+ type: "file" | "patch";
441
441
  filePath: string;
442
442
  }[];
443
443
  costMode: "max" | "lite" | "normal";
@@ -447,7 +447,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
447
447
  fingerprintId: string;
448
448
  userInputId: string;
449
449
  messages: {
450
- role: "user" | "assistant";
451
450
  content: string | ({
452
451
  type: "text";
453
452
  text: string;
@@ -456,15 +455,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
456
455
  } | undefined;
457
456
  } | {
458
457
  type: "tool_use";
459
- id: string;
460
458
  name: string;
459
+ id: string;
461
460
  input: Record<string, any>;
462
461
  cache_control?: {
463
462
  type: "ephemeral";
464
463
  } | undefined;
465
464
  } | {
466
- type: "tool_result";
467
465
  content: string;
466
+ type: "tool_result";
468
467
  tool_use_id: string;
469
468
  cache_control?: {
470
469
  type: "ephemeral";
@@ -473,13 +472,14 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
473
472
  type: "image";
474
473
  source: {
475
474
  type: "base64";
476
- data: string;
477
475
  media_type: "image/jpeg";
476
+ data: string;
478
477
  };
479
478
  cache_control?: {
480
479
  type: "ephemeral";
481
480
  } | undefined;
482
481
  })[];
482
+ role: "user" | "assistant";
483
483
  }[];
484
484
  fileContext: {
485
485
  currentWorkingDirectory: string;
@@ -509,8 +509,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
509
509
  userKnowledgeFiles?: Record<string, string> | undefined;
510
510
  };
511
511
  changesAlreadyApplied: {
512
- type: "file" | "patch";
513
512
  content: string;
513
+ type: "file" | "patch";
514
514
  filePath: string;
515
515
  }[];
516
516
  authToken?: string | undefined;
@@ -776,7 +776,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
776
776
  fingerprintId: string;
777
777
  userInputId: string;
778
778
  messages: {
779
- role: "user" | "assistant";
780
779
  content: string | ({
781
780
  type: "text";
782
781
  text: string;
@@ -785,15 +784,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
785
784
  } | undefined;
786
785
  } | {
787
786
  type: "tool_use";
788
- id: string;
789
787
  name: string;
788
+ id: string;
790
789
  input: Record<string, any>;
791
790
  cache_control?: {
792
791
  type: "ephemeral";
793
792
  } | undefined;
794
793
  } | {
795
- type: "tool_result";
796
794
  content: string;
795
+ type: "tool_result";
797
796
  tool_use_id: string;
798
797
  cache_control?: {
799
798
  type: "ephemeral";
@@ -802,13 +801,14 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
802
801
  type: "image";
803
802
  source: {
804
803
  type: "base64";
805
- data: string;
806
804
  media_type: "image/jpeg";
805
+ data: string;
807
806
  };
808
807
  cache_control?: {
809
808
  type: "ephemeral";
810
809
  } | undefined;
811
810
  })[];
811
+ role: "user" | "assistant";
812
812
  }[];
813
813
  fileContext: {
814
814
  currentWorkingDirectory: string;
@@ -838,8 +838,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
838
838
  userKnowledgeFiles?: Record<string, string> | undefined;
839
839
  };
840
840
  changesAlreadyApplied: {
841
- type: "file" | "patch";
842
841
  content: string;
842
+ type: "file" | "patch";
843
843
  filePath: string;
844
844
  }[];
845
845
  costMode: "max" | "lite" | "normal";
@@ -910,7 +910,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
910
910
  fingerprintId: string;
911
911
  userInputId: string;
912
912
  messages: {
913
- role: "user" | "assistant";
914
913
  content: string | ({
915
914
  type: "text";
916
915
  text: string;
@@ -919,15 +918,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
919
918
  } | undefined;
920
919
  } | {
921
920
  type: "tool_use";
922
- id: string;
923
921
  name: string;
922
+ id: string;
924
923
  input: Record<string, any>;
925
924
  cache_control?: {
926
925
  type: "ephemeral";
927
926
  } | undefined;
928
927
  } | {
929
- type: "tool_result";
930
928
  content: string;
929
+ type: "tool_result";
931
930
  tool_use_id: string;
932
931
  cache_control?: {
933
932
  type: "ephemeral";
@@ -936,13 +935,14 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
936
935
  type: "image";
937
936
  source: {
938
937
  type: "base64";
939
- data: string;
940
938
  media_type: "image/jpeg";
939
+ data: string;
941
940
  };
942
941
  cache_control?: {
943
942
  type: "ephemeral";
944
943
  } | undefined;
945
944
  })[];
945
+ role: "user" | "assistant";
946
946
  }[];
947
947
  fileContext: {
948
948
  currentWorkingDirectory: string;
@@ -972,8 +972,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
972
972
  userKnowledgeFiles?: Record<string, string> | undefined;
973
973
  };
974
974
  changesAlreadyApplied: {
975
- type: "file" | "patch";
976
975
  content: string;
976
+ type: "file" | "patch";
977
977
  filePath: string;
978
978
  }[];
979
979
  authToken?: string | undefined;
@@ -1130,16 +1130,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1130
1130
  }>>;
1131
1131
  }, "strip", z.ZodTypeAny, {
1132
1132
  type: "tool_use";
1133
- id: string;
1134
1133
  name: string;
1134
+ id: string;
1135
1135
  input: Record<string, any>;
1136
1136
  cache_control?: {
1137
1137
  type: "ephemeral";
1138
1138
  } | undefined;
1139
1139
  }, {
1140
1140
  type: "tool_use";
1141
- id: string;
1142
1141
  name: string;
1142
+ id: string;
1143
1143
  input: Record<string, any>;
1144
1144
  cache_control?: {
1145
1145
  type: "ephemeral";
@@ -1156,15 +1156,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1156
1156
  type: "ephemeral";
1157
1157
  }>>;
1158
1158
  }, "strip", z.ZodTypeAny, {
1159
- type: "tool_result";
1160
1159
  content: string;
1160
+ type: "tool_result";
1161
1161
  tool_use_id: string;
1162
1162
  cache_control?: {
1163
1163
  type: "ephemeral";
1164
1164
  } | undefined;
1165
1165
  }, {
1166
- type: "tool_result";
1167
1166
  content: string;
1167
+ type: "tool_result";
1168
1168
  tool_use_id: string;
1169
1169
  cache_control?: {
1170
1170
  type: "ephemeral";
@@ -1177,12 +1177,12 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1177
1177
  data: z.ZodString;
1178
1178
  }, "strip", z.ZodTypeAny, {
1179
1179
  type: "base64";
1180
- data: string;
1181
1180
  media_type: "image/jpeg";
1181
+ data: string;
1182
1182
  }, {
1183
1183
  type: "base64";
1184
- data: string;
1185
1184
  media_type: "image/jpeg";
1185
+ data: string;
1186
1186
  }>;
1187
1187
  cache_control: z.ZodOptional<z.ZodObject<{
1188
1188
  type: z.ZodLiteral<"ephemeral">;
@@ -1195,8 +1195,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1195
1195
  type: "image";
1196
1196
  source: {
1197
1197
  type: "base64";
1198
- data: string;
1199
1198
  media_type: "image/jpeg";
1199
+ data: string;
1200
1200
  };
1201
1201
  cache_control?: {
1202
1202
  type: "ephemeral";
@@ -1205,15 +1205,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1205
1205
  type: "image";
1206
1206
  source: {
1207
1207
  type: "base64";
1208
- data: string;
1209
1208
  media_type: "image/jpeg";
1209
+ data: string;
1210
1210
  };
1211
1211
  cache_control?: {
1212
1212
  type: "ephemeral";
1213
1213
  } | undefined;
1214
1214
  }>]>, "many">]>;
1215
1215
  }, "strip", z.ZodTypeAny, {
1216
- role: "user" | "assistant";
1217
1216
  content: string | ({
1218
1217
  type: "text";
1219
1218
  text: string;
@@ -1222,15 +1221,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1222
1221
  } | undefined;
1223
1222
  } | {
1224
1223
  type: "tool_use";
1225
- id: string;
1226
1224
  name: string;
1225
+ id: string;
1227
1226
  input: Record<string, any>;
1228
1227
  cache_control?: {
1229
1228
  type: "ephemeral";
1230
1229
  } | undefined;
1231
1230
  } | {
1232
- type: "tool_result";
1233
1231
  content: string;
1232
+ type: "tool_result";
1234
1233
  tool_use_id: string;
1235
1234
  cache_control?: {
1236
1235
  type: "ephemeral";
@@ -1239,15 +1238,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1239
1238
  type: "image";
1240
1239
  source: {
1241
1240
  type: "base64";
1242
- data: string;
1243
1241
  media_type: "image/jpeg";
1242
+ data: string;
1244
1243
  };
1245
1244
  cache_control?: {
1246
1245
  type: "ephemeral";
1247
1246
  } | undefined;
1248
1247
  })[];
1249
- }, {
1250
1248
  role: "user" | "assistant";
1249
+ }, {
1251
1250
  content: string | ({
1252
1251
  type: "text";
1253
1252
  text: string;
@@ -1256,15 +1255,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1256
1255
  } | undefined;
1257
1256
  } | {
1258
1257
  type: "tool_use";
1259
- id: string;
1260
1258
  name: string;
1259
+ id: string;
1261
1260
  input: Record<string, any>;
1262
1261
  cache_control?: {
1263
1262
  type: "ephemeral";
1264
1263
  } | undefined;
1265
1264
  } | {
1266
- type: "tool_result";
1267
1265
  content: string;
1266
+ type: "tool_result";
1268
1267
  tool_use_id: string;
1269
1268
  cache_control?: {
1270
1269
  type: "ephemeral";
@@ -1273,13 +1272,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1273
1272
  type: "image";
1274
1273
  source: {
1275
1274
  type: "base64";
1276
- data: string;
1277
1275
  media_type: "image/jpeg";
1276
+ data: string;
1278
1277
  };
1279
1278
  cache_control?: {
1280
1279
  type: "ephemeral";
1281
1280
  } | undefined;
1282
1281
  })[];
1282
+ role: "user" | "assistant";
1283
1283
  }>, "many">;
1284
1284
  fileContext: z.ZodObject<{
1285
1285
  currentWorkingDirectory: z.ZodString;
@@ -1395,12 +1395,12 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1395
1395
  filePath: z.ZodString;
1396
1396
  content: z.ZodString;
1397
1397
  }, "strip", z.ZodTypeAny, {
1398
- type: "file" | "patch";
1399
1398
  content: string;
1399
+ type: "file" | "patch";
1400
1400
  filePath: string;
1401
1401
  }, {
1402
- type: "file" | "patch";
1403
1402
  content: string;
1403
+ type: "file" | "patch";
1404
1404
  filePath: string;
1405
1405
  }>, "many">;
1406
1406
  costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
@@ -1409,7 +1409,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1409
1409
  fingerprintId: string;
1410
1410
  userInputId: string;
1411
1411
  messages: {
1412
- role: "user" | "assistant";
1413
1412
  content: string | ({
1414
1413
  type: "text";
1415
1414
  text: string;
@@ -1418,15 +1417,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1418
1417
  } | undefined;
1419
1418
  } | {
1420
1419
  type: "tool_use";
1421
- id: string;
1422
1420
  name: string;
1421
+ id: string;
1423
1422
  input: Record<string, any>;
1424
1423
  cache_control?: {
1425
1424
  type: "ephemeral";
1426
1425
  } | undefined;
1427
1426
  } | {
1428
- type: "tool_result";
1429
1427
  content: string;
1428
+ type: "tool_result";
1430
1429
  tool_use_id: string;
1431
1430
  cache_control?: {
1432
1431
  type: "ephemeral";
@@ -1435,13 +1434,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1435
1434
  type: "image";
1436
1435
  source: {
1437
1436
  type: "base64";
1438
- data: string;
1439
1437
  media_type: "image/jpeg";
1438
+ data: string;
1440
1439
  };
1441
1440
  cache_control?: {
1442
1441
  type: "ephemeral";
1443
1442
  } | undefined;
1444
1443
  })[];
1444
+ role: "user" | "assistant";
1445
1445
  }[];
1446
1446
  fileContext: {
1447
1447
  currentWorkingDirectory: string;
@@ -1471,8 +1471,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1471
1471
  userKnowledgeFiles?: Record<string, string> | undefined;
1472
1472
  };
1473
1473
  changesAlreadyApplied: {
1474
- type: "file" | "patch";
1475
1474
  content: string;
1475
+ type: "file" | "patch";
1476
1476
  filePath: string;
1477
1477
  }[];
1478
1478
  costMode: "max" | "lite" | "normal";
@@ -1482,7 +1482,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1482
1482
  fingerprintId: string;
1483
1483
  userInputId: string;
1484
1484
  messages: {
1485
- role: "user" | "assistant";
1486
1485
  content: string | ({
1487
1486
  type: "text";
1488
1487
  text: string;
@@ -1491,15 +1490,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1491
1490
  } | undefined;
1492
1491
  } | {
1493
1492
  type: "tool_use";
1494
- id: string;
1495
1493
  name: string;
1494
+ id: string;
1496
1495
  input: Record<string, any>;
1497
1496
  cache_control?: {
1498
1497
  type: "ephemeral";
1499
1498
  } | undefined;
1500
1499
  } | {
1501
- type: "tool_result";
1502
1500
  content: string;
1501
+ type: "tool_result";
1503
1502
  tool_use_id: string;
1504
1503
  cache_control?: {
1505
1504
  type: "ephemeral";
@@ -1508,13 +1507,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1508
1507
  type: "image";
1509
1508
  source: {
1510
1509
  type: "base64";
1511
- data: string;
1512
1510
  media_type: "image/jpeg";
1511
+ data: string;
1513
1512
  };
1514
1513
  cache_control?: {
1515
1514
  type: "ephemeral";
1516
1515
  } | undefined;
1517
1516
  })[];
1517
+ role: "user" | "assistant";
1518
1518
  }[];
1519
1519
  fileContext: {
1520
1520
  currentWorkingDirectory: string;
@@ -1544,8 +1544,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1544
1544
  userKnowledgeFiles?: Record<string, string> | undefined;
1545
1545
  };
1546
1546
  changesAlreadyApplied: {
1547
- type: "file" | "patch";
1548
1547
  content: string;
1548
+ type: "file" | "patch";
1549
1549
  filePath: string;
1550
1550
  }[];
1551
1551
  authToken?: string | undefined;
@@ -1811,7 +1811,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1811
1811
  fingerprintId: string;
1812
1812
  userInputId: string;
1813
1813
  messages: {
1814
- role: "user" | "assistant";
1815
1814
  content: string | ({
1816
1815
  type: "text";
1817
1816
  text: string;
@@ -1820,15 +1819,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1820
1819
  } | undefined;
1821
1820
  } | {
1822
1821
  type: "tool_use";
1823
- id: string;
1824
1822
  name: string;
1823
+ id: string;
1825
1824
  input: Record<string, any>;
1826
1825
  cache_control?: {
1827
1826
  type: "ephemeral";
1828
1827
  } | undefined;
1829
1828
  } | {
1830
- type: "tool_result";
1831
1829
  content: string;
1830
+ type: "tool_result";
1832
1831
  tool_use_id: string;
1833
1832
  cache_control?: {
1834
1833
  type: "ephemeral";
@@ -1837,13 +1836,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1837
1836
  type: "image";
1838
1837
  source: {
1839
1838
  type: "base64";
1840
- data: string;
1841
1839
  media_type: "image/jpeg";
1840
+ data: string;
1842
1841
  };
1843
1842
  cache_control?: {
1844
1843
  type: "ephemeral";
1845
1844
  } | undefined;
1846
1845
  })[];
1846
+ role: "user" | "assistant";
1847
1847
  }[];
1848
1848
  fileContext: {
1849
1849
  currentWorkingDirectory: string;
@@ -1873,8 +1873,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1873
1873
  userKnowledgeFiles?: Record<string, string> | undefined;
1874
1874
  };
1875
1875
  changesAlreadyApplied: {
1876
- type: "file" | "patch";
1877
1876
  content: string;
1877
+ type: "file" | "patch";
1878
1878
  filePath: string;
1879
1879
  }[];
1880
1880
  costMode: "max" | "lite" | "normal";
@@ -1945,7 +1945,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1945
1945
  fingerprintId: string;
1946
1946
  userInputId: string;
1947
1947
  messages: {
1948
- role: "user" | "assistant";
1949
1948
  content: string | ({
1950
1949
  type: "text";
1951
1950
  text: string;
@@ -1954,15 +1953,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1954
1953
  } | undefined;
1955
1954
  } | {
1956
1955
  type: "tool_use";
1957
- id: string;
1958
1956
  name: string;
1957
+ id: string;
1959
1958
  input: Record<string, any>;
1960
1959
  cache_control?: {
1961
1960
  type: "ephemeral";
1962
1961
  } | undefined;
1963
1962
  } | {
1964
- type: "tool_result";
1965
1963
  content: string;
1964
+ type: "tool_result";
1966
1965
  tool_use_id: string;
1967
1966
  cache_control?: {
1968
1967
  type: "ephemeral";
@@ -1971,13 +1970,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1971
1970
  type: "image";
1972
1971
  source: {
1973
1972
  type: "base64";
1974
- data: string;
1975
1973
  media_type: "image/jpeg";
1974
+ data: string;
1976
1975
  };
1977
1976
  cache_control?: {
1978
1977
  type: "ephemeral";
1979
1978
  } | undefined;
1980
1979
  })[];
1980
+ role: "user" | "assistant";
1981
1981
  }[];
1982
1982
  fileContext: {
1983
1983
  currentWorkingDirectory: string;
@@ -2007,8 +2007,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2007
2007
  userKnowledgeFiles?: Record<string, string> | undefined;
2008
2008
  };
2009
2009
  changesAlreadyApplied: {
2010
- type: "file" | "patch";
2011
2010
  content: string;
2011
+ type: "file" | "patch";
2012
2012
  filePath: string;
2013
2013
  }[];
2014
2014
  authToken?: string | undefined;
@@ -2124,12 +2124,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2124
2124
  filePath: z.ZodString;
2125
2125
  content: z.ZodString;
2126
2126
  }, "strip", z.ZodTypeAny, {
2127
- type: "file" | "patch";
2128
2127
  content: string;
2128
+ type: "file" | "patch";
2129
2129
  filePath: string;
2130
2130
  }, {
2131
- type: "file" | "patch";
2132
2131
  content: string;
2132
+ type: "file" | "patch";
2133
2133
  filePath: string;
2134
2134
  }>, "many">;
2135
2135
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
@@ -2137,12 +2137,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2137
2137
  filePath: z.ZodString;
2138
2138
  content: z.ZodString;
2139
2139
  }, "strip", z.ZodTypeAny, {
2140
- type: "file" | "patch";
2141
2140
  content: string;
2141
+ type: "file" | "patch";
2142
2142
  filePath: string;
2143
2143
  }, {
2144
- type: "file" | "patch";
2145
2144
  content: string;
2145
+ type: "file" | "patch";
2146
2146
  filePath: string;
2147
2147
  }>, "many">;
2148
2148
  addedFileVersions: z.ZodArray<z.ZodObject<{
@@ -2167,14 +2167,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2167
2167
  type: "response-complete";
2168
2168
  userInputId: string;
2169
2169
  changesAlreadyApplied: {
2170
- type: "file" | "patch";
2171
2170
  content: string;
2171
+ type: "file" | "patch";
2172
2172
  filePath: string;
2173
2173
  }[];
2174
2174
  response: string;
2175
2175
  changes: {
2176
- type: "file" | "patch";
2177
2176
  content: string;
2177
+ type: "file" | "patch";
2178
2178
  filePath: string;
2179
2179
  }[];
2180
2180
  addedFileVersions: {
@@ -2192,14 +2192,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2192
2192
  type: "response-complete";
2193
2193
  userInputId: string;
2194
2194
  changesAlreadyApplied: {
2195
- type: "file" | "patch";
2196
2195
  content: string;
2196
+ type: "file" | "patch";
2197
2197
  filePath: string;
2198
2198
  }[];
2199
2199
  response: string;
2200
2200
  changes: {
2201
- type: "file" | "patch";
2202
2201
  content: string;
2202
+ type: "file" | "patch";
2203
2203
  filePath: string;
2204
2204
  }[];
2205
2205
  addedFileVersions: {
@@ -2231,12 +2231,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2231
2231
  id: z.ZodString;
2232
2232
  input: z.ZodRecord<z.ZodString, z.ZodAny>;
2233
2233
  }, "strip", z.ZodTypeAny, {
2234
- id: string;
2235
2234
  name: string;
2235
+ id: string;
2236
2236
  input: Record<string, any>;
2237
2237
  }, {
2238
- id: string;
2239
2238
  name: string;
2239
+ id: string;
2240
2240
  input: Record<string, any>;
2241
2241
  }>;
2242
2242
  changes: z.ZodArray<z.ZodObject<{
@@ -2244,12 +2244,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2244
2244
  filePath: z.ZodString;
2245
2245
  content: z.ZodString;
2246
2246
  }, "strip", z.ZodTypeAny, {
2247
- type: "file" | "patch";
2248
2247
  content: string;
2248
+ type: "file" | "patch";
2249
2249
  filePath: string;
2250
2250
  }, {
2251
- type: "file" | "patch";
2252
2251
  content: string;
2252
+ type: "file" | "patch";
2253
2253
  filePath: string;
2254
2254
  }>, "many">;
2255
2255
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
@@ -2257,12 +2257,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2257
2257
  filePath: z.ZodString;
2258
2258
  content: z.ZodString;
2259
2259
  }, "strip", z.ZodTypeAny, {
2260
- type: "file" | "patch";
2261
2260
  content: string;
2261
+ type: "file" | "patch";
2262
2262
  filePath: string;
2263
2263
  }, {
2264
- type: "file" | "patch";
2265
2264
  content: string;
2265
+ type: "file" | "patch";
2266
2266
  filePath: string;
2267
2267
  }>, "many">;
2268
2268
  addedFileVersions: z.ZodArray<z.ZodObject<{
@@ -2278,21 +2278,21 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2278
2278
  resetFileVersions: z.ZodBoolean;
2279
2279
  }, "strip", z.ZodTypeAny, {
2280
2280
  type: "tool-call";
2281
+ userInputId: string;
2281
2282
  data: {
2282
- id: string;
2283
2283
  name: string;
2284
+ id: string;
2284
2285
  input: Record<string, any>;
2285
2286
  };
2286
- userInputId: string;
2287
2287
  changesAlreadyApplied: {
2288
- type: "file" | "patch";
2289
2288
  content: string;
2289
+ type: "file" | "patch";
2290
2290
  filePath: string;
2291
2291
  }[];
2292
2292
  response: string;
2293
2293
  changes: {
2294
- type: "file" | "patch";
2295
2294
  content: string;
2295
+ type: "file" | "patch";
2296
2296
  filePath: string;
2297
2297
  }[];
2298
2298
  addedFileVersions: {
@@ -2302,21 +2302,21 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2302
2302
  resetFileVersions: boolean;
2303
2303
  }, {
2304
2304
  type: "tool-call";
2305
+ userInputId: string;
2305
2306
  data: {
2306
- id: string;
2307
2307
  name: string;
2308
+ id: string;
2308
2309
  input: Record<string, any>;
2309
2310
  };
2310
- userInputId: string;
2311
2311
  changesAlreadyApplied: {
2312
- type: "file" | "patch";
2313
2312
  content: string;
2313
+ type: "file" | "patch";
2314
2314
  filePath: string;
2315
2315
  }[];
2316
2316
  response: string;
2317
2317
  changes: {
2318
- type: "file" | "patch";
2319
2318
  content: string;
2319
+ type: "file" | "patch";
2320
2320
  filePath: string;
2321
2321
  }[];
2322
2322
  addedFileVersions: {
@@ -2384,39 +2384,39 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2384
2384
  fingerprintId: z.ZodString;
2385
2385
  fingerprintHash: z.ZodString;
2386
2386
  }, "strip", z.ZodTypeAny, {
2387
- id: string;
2388
- name: string | null;
2389
2387
  email: string;
2388
+ name: string | null;
2389
+ id: string;
2390
2390
  authToken: string;
2391
2391
  fingerprintId: string;
2392
2392
  fingerprintHash: string;
2393
2393
  }, {
2394
- id: string;
2395
- name: string | null;
2396
2394
  email: string;
2395
+ name: string | null;
2396
+ id: string;
2397
2397
  authToken: string;
2398
2398
  fingerprintId: string;
2399
2399
  fingerprintHash: string;
2400
2400
  }>>;
2401
2401
  message: z.ZodString;
2402
2402
  }, "strip", z.ZodTypeAny, {
2403
- type: "auth-result";
2404
2403
  message: string;
2404
+ type: "auth-result";
2405
2405
  user?: {
2406
- id: string;
2407
- name: string | null;
2408
2406
  email: string;
2407
+ name: string | null;
2408
+ id: string;
2409
2409
  authToken: string;
2410
2410
  fingerprintId: string;
2411
2411
  fingerprintHash: string;
2412
2412
  } | undefined;
2413
2413
  }, {
2414
- type: "auth-result";
2415
2414
  message: string;
2415
+ type: "auth-result";
2416
2416
  user?: {
2417
- id: string;
2418
- name: string | null;
2419
2417
  email: string;
2418
+ name: string | null;
2419
+ id: string;
2420
2420
  authToken: string;
2421
2421
  fingerprintId: string;
2422
2422
  fingerprintHash: string;
@@ -2464,11 +2464,11 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2464
2464
  type: z.ZodLiteral<"action-error">;
2465
2465
  message: z.ZodString;
2466
2466
  }, "strip", z.ZodTypeAny, {
2467
- type: "action-error";
2468
2467
  message: string;
2469
- }, {
2470
2468
  type: "action-error";
2469
+ }, {
2471
2470
  message: string;
2471
+ type: "action-error";
2472
2472
  }>, z.ZodObject<{
2473
2473
  type: z.ZodLiteral<"commit-message-response">;
2474
2474
  commitMessage: z.ZodString;
@@ -2501,14 +2501,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2501
2501
  type: "response-complete";
2502
2502
  userInputId: string;
2503
2503
  changesAlreadyApplied: {
2504
- type: "file" | "patch";
2505
2504
  content: string;
2505
+ type: "file" | "patch";
2506
2506
  filePath: string;
2507
2507
  }[];
2508
2508
  response: string;
2509
2509
  changes: {
2510
- type: "file" | "patch";
2511
2510
  content: string;
2511
+ type: "file" | "patch";
2512
2512
  filePath: string;
2513
2513
  }[];
2514
2514
  addedFileVersions: {
@@ -2534,21 +2534,21 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2534
2534
  filePaths: string[];
2535
2535
  } | {
2536
2536
  type: "tool-call";
2537
+ userInputId: string;
2537
2538
  data: {
2538
- id: string;
2539
2539
  name: string;
2540
+ id: string;
2540
2541
  input: Record<string, any>;
2541
2542
  };
2542
- userInputId: string;
2543
2543
  changesAlreadyApplied: {
2544
- type: "file" | "patch";
2545
2544
  content: string;
2545
+ type: "file" | "patch";
2546
2546
  filePath: string;
2547
2547
  }[];
2548
2548
  response: string;
2549
2549
  changes: {
2550
- type: "file" | "patch";
2551
2550
  content: string;
2551
+ type: "file" | "patch";
2552
2552
  filePath: string;
2553
2553
  }[];
2554
2554
  addedFileVersions: {
@@ -2565,12 +2565,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2565
2565
  isUpToDate: boolean;
2566
2566
  latestVersion: string;
2567
2567
  } | {
2568
- type: "auth-result";
2569
2568
  message: string;
2569
+ type: "auth-result";
2570
2570
  user?: {
2571
- id: string;
2572
- name: string | null;
2573
2571
  email: string;
2572
+ name: string | null;
2573
+ id: string;
2574
2574
  authToken: string;
2575
2575
  fingerprintId: string;
2576
2576
  fingerprintHash: string;
@@ -2581,8 +2581,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2581
2581
  fingerprintHash: string;
2582
2582
  loginUrl: string;
2583
2583
  } | {
2584
- type: "action-error";
2585
2584
  message: string;
2585
+ type: "action-error";
2586
2586
  } | {
2587
2587
  type: "commit-message-response";
2588
2588
  commitMessage: string;
@@ -2609,14 +2609,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2609
2609
  type: "response-complete";
2610
2610
  userInputId: string;
2611
2611
  changesAlreadyApplied: {
2612
- type: "file" | "patch";
2613
2612
  content: string;
2613
+ type: "file" | "patch";
2614
2614
  filePath: string;
2615
2615
  }[];
2616
2616
  response: string;
2617
2617
  changes: {
2618
- type: "file" | "patch";
2619
2618
  content: string;
2619
+ type: "file" | "patch";
2620
2620
  filePath: string;
2621
2621
  }[];
2622
2622
  addedFileVersions: {
@@ -2642,21 +2642,21 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2642
2642
  filePaths: string[];
2643
2643
  } | {
2644
2644
  type: "tool-call";
2645
+ userInputId: string;
2645
2646
  data: {
2646
- id: string;
2647
2647
  name: string;
2648
+ id: string;
2648
2649
  input: Record<string, any>;
2649
2650
  };
2650
- userInputId: string;
2651
2651
  changesAlreadyApplied: {
2652
- type: "file" | "patch";
2653
2652
  content: string;
2653
+ type: "file" | "patch";
2654
2654
  filePath: string;
2655
2655
  }[];
2656
2656
  response: string;
2657
2657
  changes: {
2658
- type: "file" | "patch";
2659
2658
  content: string;
2659
+ type: "file" | "patch";
2660
2660
  filePath: string;
2661
2661
  }[];
2662
2662
  addedFileVersions: {
@@ -2673,12 +2673,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2673
2673
  isUpToDate: boolean;
2674
2674
  latestVersion: string;
2675
2675
  } | {
2676
- type: "auth-result";
2677
2676
  message: string;
2677
+ type: "auth-result";
2678
2678
  user?: {
2679
- id: string;
2680
- name: string | null;
2681
2679
  email: string;
2680
+ name: string | null;
2681
+ id: string;
2682
2682
  authToken: string;
2683
2683
  fingerprintId: string;
2684
2684
  fingerprintHash: string;
@@ -2689,8 +2689,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2689
2689
  fingerprintHash: string;
2690
2690
  loginUrl: string;
2691
2691
  } | {
2692
- type: "action-error";
2693
2692
  message: string;
2693
+ type: "action-error";
2694
2694
  } | {
2695
2695
  type: "commit-message-response";
2696
2696
  commitMessage: string;
@@ -2744,12 +2744,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2744
2744
  filePath: z.ZodString;
2745
2745
  content: z.ZodString;
2746
2746
  }, "strip", z.ZodTypeAny, {
2747
- type: "file" | "patch";
2748
2747
  content: string;
2748
+ type: "file" | "patch";
2749
2749
  filePath: string;
2750
2750
  }, {
2751
- type: "file" | "patch";
2752
2751
  content: string;
2752
+ type: "file" | "patch";
2753
2753
  filePath: string;
2754
2754
  }>, "many">;
2755
2755
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
@@ -2757,12 +2757,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2757
2757
  filePath: z.ZodString;
2758
2758
  content: z.ZodString;
2759
2759
  }, "strip", z.ZodTypeAny, {
2760
- type: "file" | "patch";
2761
2760
  content: string;
2761
+ type: "file" | "patch";
2762
2762
  filePath: string;
2763
2763
  }, {
2764
- type: "file" | "patch";
2765
2764
  content: string;
2765
+ type: "file" | "patch";
2766
2766
  filePath: string;
2767
2767
  }>, "many">;
2768
2768
  addedFileVersions: z.ZodArray<z.ZodObject<{
@@ -2787,14 +2787,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2787
2787
  type: "response-complete";
2788
2788
  userInputId: string;
2789
2789
  changesAlreadyApplied: {
2790
- type: "file" | "patch";
2791
2790
  content: string;
2791
+ type: "file" | "patch";
2792
2792
  filePath: string;
2793
2793
  }[];
2794
2794
  response: string;
2795
2795
  changes: {
2796
- type: "file" | "patch";
2797
2796
  content: string;
2797
+ type: "file" | "patch";
2798
2798
  filePath: string;
2799
2799
  }[];
2800
2800
  addedFileVersions: {
@@ -2812,14 +2812,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2812
2812
  type: "response-complete";
2813
2813
  userInputId: string;
2814
2814
  changesAlreadyApplied: {
2815
- type: "file" | "patch";
2816
2815
  content: string;
2816
+ type: "file" | "patch";
2817
2817
  filePath: string;
2818
2818
  }[];
2819
2819
  response: string;
2820
2820
  changes: {
2821
- type: "file" | "patch";
2822
2821
  content: string;
2822
+ type: "file" | "patch";
2823
2823
  filePath: string;
2824
2824
  }[];
2825
2825
  addedFileVersions: {
@@ -2851,12 +2851,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2851
2851
  id: z.ZodString;
2852
2852
  input: z.ZodRecord<z.ZodString, z.ZodAny>;
2853
2853
  }, "strip", z.ZodTypeAny, {
2854
- id: string;
2855
2854
  name: string;
2855
+ id: string;
2856
2856
  input: Record<string, any>;
2857
2857
  }, {
2858
- id: string;
2859
2858
  name: string;
2859
+ id: string;
2860
2860
  input: Record<string, any>;
2861
2861
  }>;
2862
2862
  changes: z.ZodArray<z.ZodObject<{
@@ -2864,12 +2864,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2864
2864
  filePath: z.ZodString;
2865
2865
  content: z.ZodString;
2866
2866
  }, "strip", z.ZodTypeAny, {
2867
- type: "file" | "patch";
2868
2867
  content: string;
2868
+ type: "file" | "patch";
2869
2869
  filePath: string;
2870
2870
  }, {
2871
- type: "file" | "patch";
2872
2871
  content: string;
2872
+ type: "file" | "patch";
2873
2873
  filePath: string;
2874
2874
  }>, "many">;
2875
2875
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
@@ -2877,12 +2877,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2877
2877
  filePath: z.ZodString;
2878
2878
  content: z.ZodString;
2879
2879
  }, "strip", z.ZodTypeAny, {
2880
- type: "file" | "patch";
2881
2880
  content: string;
2881
+ type: "file" | "patch";
2882
2882
  filePath: string;
2883
2883
  }, {
2884
- type: "file" | "patch";
2885
2884
  content: string;
2885
+ type: "file" | "patch";
2886
2886
  filePath: string;
2887
2887
  }>, "many">;
2888
2888
  addedFileVersions: z.ZodArray<z.ZodObject<{
@@ -2898,21 +2898,21 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2898
2898
  resetFileVersions: z.ZodBoolean;
2899
2899
  }, "strip", z.ZodTypeAny, {
2900
2900
  type: "tool-call";
2901
+ userInputId: string;
2901
2902
  data: {
2902
- id: string;
2903
2903
  name: string;
2904
+ id: string;
2904
2905
  input: Record<string, any>;
2905
2906
  };
2906
- userInputId: string;
2907
2907
  changesAlreadyApplied: {
2908
- type: "file" | "patch";
2909
2908
  content: string;
2909
+ type: "file" | "patch";
2910
2910
  filePath: string;
2911
2911
  }[];
2912
2912
  response: string;
2913
2913
  changes: {
2914
- type: "file" | "patch";
2915
2914
  content: string;
2915
+ type: "file" | "patch";
2916
2916
  filePath: string;
2917
2917
  }[];
2918
2918
  addedFileVersions: {
@@ -2922,21 +2922,21 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2922
2922
  resetFileVersions: boolean;
2923
2923
  }, {
2924
2924
  type: "tool-call";
2925
+ userInputId: string;
2925
2926
  data: {
2926
- id: string;
2927
2927
  name: string;
2928
+ id: string;
2928
2929
  input: Record<string, any>;
2929
2930
  };
2930
- userInputId: string;
2931
2931
  changesAlreadyApplied: {
2932
- type: "file" | "patch";
2933
2932
  content: string;
2933
+ type: "file" | "patch";
2934
2934
  filePath: string;
2935
2935
  }[];
2936
2936
  response: string;
2937
2937
  changes: {
2938
- type: "file" | "patch";
2939
2938
  content: string;
2939
+ type: "file" | "patch";
2940
2940
  filePath: string;
2941
2941
  }[];
2942
2942
  addedFileVersions: {
@@ -3004,39 +3004,39 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3004
3004
  fingerprintId: z.ZodString;
3005
3005
  fingerprintHash: z.ZodString;
3006
3006
  }, "strip", z.ZodTypeAny, {
3007
- id: string;
3008
- name: string | null;
3009
3007
  email: string;
3008
+ name: string | null;
3009
+ id: string;
3010
3010
  authToken: string;
3011
3011
  fingerprintId: string;
3012
3012
  fingerprintHash: string;
3013
3013
  }, {
3014
- id: string;
3015
- name: string | null;
3016
3014
  email: string;
3015
+ name: string | null;
3016
+ id: string;
3017
3017
  authToken: string;
3018
3018
  fingerprintId: string;
3019
3019
  fingerprintHash: string;
3020
3020
  }>>;
3021
3021
  message: z.ZodString;
3022
3022
  }, "strip", z.ZodTypeAny, {
3023
- type: "auth-result";
3024
3023
  message: string;
3024
+ type: "auth-result";
3025
3025
  user?: {
3026
- id: string;
3027
- name: string | null;
3028
3026
  email: string;
3027
+ name: string | null;
3028
+ id: string;
3029
3029
  authToken: string;
3030
3030
  fingerprintId: string;
3031
3031
  fingerprintHash: string;
3032
3032
  } | undefined;
3033
3033
  }, {
3034
- type: "auth-result";
3035
3034
  message: string;
3035
+ type: "auth-result";
3036
3036
  user?: {
3037
- id: string;
3038
- name: string | null;
3039
3037
  email: string;
3038
+ name: string | null;
3039
+ id: string;
3040
3040
  authToken: string;
3041
3041
  fingerprintId: string;
3042
3042
  fingerprintHash: string;
@@ -3084,11 +3084,11 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3084
3084
  type: z.ZodLiteral<"action-error">;
3085
3085
  message: z.ZodString;
3086
3086
  }, "strip", z.ZodTypeAny, {
3087
- type: "action-error";
3088
3087
  message: string;
3089
- }, {
3090
3088
  type: "action-error";
3089
+ }, {
3091
3090
  message: string;
3091
+ type: "action-error";
3092
3092
  }>, z.ZodObject<{
3093
3093
  type: z.ZodLiteral<"commit-message-response">;
3094
3094
  commitMessage: z.ZodString;
@@ -3121,14 +3121,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3121
3121
  type: "response-complete";
3122
3122
  userInputId: string;
3123
3123
  changesAlreadyApplied: {
3124
- type: "file" | "patch";
3125
3124
  content: string;
3125
+ type: "file" | "patch";
3126
3126
  filePath: string;
3127
3127
  }[];
3128
3128
  response: string;
3129
3129
  changes: {
3130
- type: "file" | "patch";
3131
3130
  content: string;
3131
+ type: "file" | "patch";
3132
3132
  filePath: string;
3133
3133
  }[];
3134
3134
  addedFileVersions: {
@@ -3154,21 +3154,21 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3154
3154
  filePaths: string[];
3155
3155
  } | {
3156
3156
  type: "tool-call";
3157
+ userInputId: string;
3157
3158
  data: {
3158
- id: string;
3159
3159
  name: string;
3160
+ id: string;
3160
3161
  input: Record<string, any>;
3161
3162
  };
3162
- userInputId: string;
3163
3163
  changesAlreadyApplied: {
3164
- type: "file" | "patch";
3165
3164
  content: string;
3165
+ type: "file" | "patch";
3166
3166
  filePath: string;
3167
3167
  }[];
3168
3168
  response: string;
3169
3169
  changes: {
3170
- type: "file" | "patch";
3171
3170
  content: string;
3171
+ type: "file" | "patch";
3172
3172
  filePath: string;
3173
3173
  }[];
3174
3174
  addedFileVersions: {
@@ -3185,12 +3185,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3185
3185
  isUpToDate: boolean;
3186
3186
  latestVersion: string;
3187
3187
  } | {
3188
- type: "auth-result";
3189
3188
  message: string;
3189
+ type: "auth-result";
3190
3190
  user?: {
3191
- id: string;
3192
- name: string | null;
3193
3191
  email: string;
3192
+ name: string | null;
3193
+ id: string;
3194
3194
  authToken: string;
3195
3195
  fingerprintId: string;
3196
3196
  fingerprintHash: string;
@@ -3201,8 +3201,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3201
3201
  fingerprintHash: string;
3202
3202
  loginUrl: string;
3203
3203
  } | {
3204
- type: "action-error";
3205
3204
  message: string;
3205
+ type: "action-error";
3206
3206
  } | {
3207
3207
  type: "commit-message-response";
3208
3208
  commitMessage: string;
@@ -3229,14 +3229,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3229
3229
  type: "response-complete";
3230
3230
  userInputId: string;
3231
3231
  changesAlreadyApplied: {
3232
- type: "file" | "patch";
3233
3232
  content: string;
3233
+ type: "file" | "patch";
3234
3234
  filePath: string;
3235
3235
  }[];
3236
3236
  response: string;
3237
3237
  changes: {
3238
- type: "file" | "patch";
3239
3238
  content: string;
3239
+ type: "file" | "patch";
3240
3240
  filePath: string;
3241
3241
  }[];
3242
3242
  addedFileVersions: {
@@ -3262,21 +3262,21 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3262
3262
  filePaths: string[];
3263
3263
  } | {
3264
3264
  type: "tool-call";
3265
+ userInputId: string;
3265
3266
  data: {
3266
- id: string;
3267
3267
  name: string;
3268
+ id: string;
3268
3269
  input: Record<string, any>;
3269
3270
  };
3270
- userInputId: string;
3271
3271
  changesAlreadyApplied: {
3272
- type: "file" | "patch";
3273
3272
  content: string;
3273
+ type: "file" | "patch";
3274
3274
  filePath: string;
3275
3275
  }[];
3276
3276
  response: string;
3277
3277
  changes: {
3278
- type: "file" | "patch";
3279
3278
  content: string;
3279
+ type: "file" | "patch";
3280
3280
  filePath: string;
3281
3281
  }[];
3282
3282
  addedFileVersions: {
@@ -3293,12 +3293,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3293
3293
  isUpToDate: boolean;
3294
3294
  latestVersion: string;
3295
3295
  } | {
3296
- type: "auth-result";
3297
3296
  message: string;
3297
+ type: "auth-result";
3298
3298
  user?: {
3299
- id: string;
3300
- name: string | null;
3301
3299
  email: string;
3300
+ name: string | null;
3301
+ id: string;
3302
3302
  authToken: string;
3303
3303
  fingerprintId: string;
3304
3304
  fingerprintHash: string;
@@ -3309,8 +3309,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3309
3309
  fingerprintHash: string;
3310
3310
  loginUrl: string;
3311
3311
  } | {
3312
- type: "action-error";
3313
3312
  message: string;
3313
+ type: "action-error";
3314
3314
  } | {
3315
3315
  type: "commit-message-response";
3316
3316
  commitMessage: string;