codebuff 1.0.289 → 1.0.290

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 (41) hide show
  1. package/dist/cli-handlers/checkpoint.d.ts +1 -1
  2. package/dist/cli.d.ts +1 -1
  3. package/dist/cli.js +1 -1
  4. package/dist/client.d.ts +1 -1
  5. package/dist/common/__tests__/project-file-tree.test.d.ts +1 -0
  6. package/dist/common/__tests__/project-file-tree.test.js +251 -0
  7. package/dist/common/__tests__/project-file-tree.test.js.map +1 -0
  8. package/dist/common/actions.d.ts +60 -60
  9. package/dist/common/json-config/__tests__/__snapshots__/stringify-schema.test.js.snap +119 -0
  10. package/dist/common/types/agent-state.d.ts +8 -8
  11. package/dist/common/types/message.d.ts +6 -6
  12. package/dist/common/types/usage.d.ts +2 -2
  13. package/dist/common/util/credentials.d.ts +2 -2
  14. package/dist/common/util/process-stream.d.ts +7 -0
  15. package/dist/common/util/process-stream.js +162 -0
  16. package/dist/common/util/process-stream.js.map +1 -0
  17. package/dist/common/websockets/websocket-schema.d.ts +112 -112
  18. package/dist/index.js +3 -3
  19. package/dist/readline.d.ts +22 -0
  20. package/dist/readline.js +180 -0
  21. package/dist/readline.js.map +1 -0
  22. package/dist/tool-handlers.js +3 -3
  23. package/dist/tool-handlers.js.map +1 -1
  24. package/dist/utils/__tests__/__snapshots__/background-process-manager.test.js.snap +137 -0
  25. package/dist/utils/__tests__/file-paths.test.d.ts +1 -0
  26. package/dist/utils/__tests__/file-paths.test.js +37 -0
  27. package/dist/utils/__tests__/file-paths.test.js.map +1 -0
  28. package/dist/utils/__tests__/path.test.d.ts +1 -0
  29. package/dist/utils/__tests__/path.test.js +37 -0
  30. package/dist/utils/__tests__/path.test.js.map +1 -0
  31. package/dist/utils/file-paths.d.ts +9 -0
  32. package/dist/utils/file-paths.js +24 -0
  33. package/dist/utils/file-paths.js.map +1 -0
  34. package/dist/utils/path.d.ts +9 -0
  35. package/dist/utils/path.js +27 -0
  36. package/dist/utils/path.js.map +1 -0
  37. package/dist/utils/spinner.js +1 -1
  38. package/package.json +1 -1
  39. package/dist/slash-commands.d.ts +0 -7
  40. package/dist/slash-commands.js +0 -21
  41. package/dist/slash-commands.js.map +0 -1
@@ -257,13 +257,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
257
257
  media_type: z.ZodLiteral<"image/jpeg">;
258
258
  data: z.ZodString;
259
259
  }, "strip", z.ZodTypeAny, {
260
- data: string;
261
260
  type: "base64";
262
261
  media_type: "image/jpeg";
263
- }, {
264
262
  data: string;
263
+ }, {
265
264
  type: "base64";
266
265
  media_type: "image/jpeg";
266
+ data: string;
267
267
  }>;
268
268
  cache_control: z.ZodOptional<z.ZodObject<{
269
269
  type: z.ZodLiteral<"ephemeral">;
@@ -275,9 +275,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
275
275
  }, "strip", z.ZodTypeAny, {
276
276
  type: "image";
277
277
  source: {
278
- data: string;
279
278
  type: "base64";
280
279
  media_type: "image/jpeg";
280
+ data: string;
281
281
  };
282
282
  cache_control?: {
283
283
  type: "ephemeral";
@@ -285,9 +285,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
285
285
  }, {
286
286
  type: "image";
287
287
  source: {
288
- data: string;
289
288
  type: "base64";
290
289
  media_type: "image/jpeg";
290
+ data: string;
291
291
  };
292
292
  cache_control?: {
293
293
  type: "ephemeral";
@@ -318,9 +318,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
318
318
  } | {
319
319
  type: "image";
320
320
  source: {
321
- data: string;
322
321
  type: "base64";
323
322
  media_type: "image/jpeg";
323
+ data: string;
324
324
  };
325
325
  cache_control?: {
326
326
  type: "ephemeral";
@@ -352,9 +352,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
352
352
  } | {
353
353
  type: "image";
354
354
  source: {
355
- data: string;
356
355
  type: "base64";
357
356
  media_type: "image/jpeg";
357
+ data: string;
358
358
  };
359
359
  cache_control?: {
360
360
  type: "ephemeral";
@@ -418,9 +418,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
418
418
  } | {
419
419
  type: "image";
420
420
  source: {
421
- data: string;
422
421
  type: "base64";
423
422
  media_type: "image/jpeg";
423
+ data: string;
424
424
  };
425
425
  cache_control?: {
426
426
  type: "ephemeral";
@@ -484,9 +484,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
484
484
  } | {
485
485
  type: "image";
486
486
  source: {
487
- data: string;
488
487
  type: "base64";
489
488
  media_type: "image/jpeg";
489
+ data: string;
490
490
  };
491
491
  cache_control?: {
492
492
  type: "ephemeral";
@@ -571,9 +571,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
571
571
  } | {
572
572
  type: "image";
573
573
  source: {
574
- data: string;
575
574
  type: "base64";
576
575
  media_type: "image/jpeg";
576
+ data: string;
577
577
  };
578
578
  cache_control?: {
579
579
  type: "ephemeral";
@@ -651,9 +651,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
651
651
  } | {
652
652
  type: "image";
653
653
  source: {
654
- data: string;
655
654
  type: "base64";
656
655
  media_type: "image/jpeg";
656
+ data: string;
657
657
  };
658
658
  cache_control?: {
659
659
  type: "ephemeral";
@@ -882,6 +882,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
882
882
  authToken?: string | undefined;
883
883
  }>]>;
884
884
  }, "strip", z.ZodTypeAny, {
885
+ type: "action";
885
886
  data: {
886
887
  type: "prompt";
887
888
  promptId: string;
@@ -942,9 +943,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
942
943
  } | {
943
944
  type: "image";
944
945
  source: {
945
- data: string;
946
946
  type: "base64";
947
947
  media_type: "image/jpeg";
948
+ data: string;
948
949
  };
949
950
  cache_control?: {
950
951
  type: "ephemeral";
@@ -1005,9 +1006,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1005
1006
  stagedChanges: string;
1006
1007
  authToken?: string | undefined;
1007
1008
  };
1008
- type: "action";
1009
1009
  txid: number;
1010
1010
  }, {
1011
+ type: "action";
1011
1012
  data: {
1012
1013
  type: "prompt";
1013
1014
  promptId: string;
@@ -1067,9 +1068,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1067
1068
  } | {
1068
1069
  type: "image";
1069
1070
  source: {
1070
- data: string;
1071
1071
  type: "base64";
1072
1072
  media_type: "image/jpeg";
1073
+ data: string;
1073
1074
  };
1074
1075
  cache_control?: {
1075
1076
  type: "ephemeral";
@@ -1131,7 +1132,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1131
1132
  stagedChanges: string;
1132
1133
  authToken?: string | undefined;
1133
1134
  };
1134
- type: "action";
1135
1135
  txid: number;
1136
1136
  }>;
1137
1137
  };
@@ -1388,13 +1388,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1388
1388
  media_type: z.ZodLiteral<"image/jpeg">;
1389
1389
  data: z.ZodString;
1390
1390
  }, "strip", z.ZodTypeAny, {
1391
- data: string;
1392
1391
  type: "base64";
1393
1392
  media_type: "image/jpeg";
1394
- }, {
1395
1393
  data: string;
1394
+ }, {
1396
1395
  type: "base64";
1397
1396
  media_type: "image/jpeg";
1397
+ data: string;
1398
1398
  }>;
1399
1399
  cache_control: z.ZodOptional<z.ZodObject<{
1400
1400
  type: z.ZodLiteral<"ephemeral">;
@@ -1406,9 +1406,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1406
1406
  }, "strip", z.ZodTypeAny, {
1407
1407
  type: "image";
1408
1408
  source: {
1409
- data: string;
1410
1409
  type: "base64";
1411
1410
  media_type: "image/jpeg";
1411
+ data: string;
1412
1412
  };
1413
1413
  cache_control?: {
1414
1414
  type: "ephemeral";
@@ -1416,9 +1416,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1416
1416
  }, {
1417
1417
  type: "image";
1418
1418
  source: {
1419
- data: string;
1420
1419
  type: "base64";
1421
1420
  media_type: "image/jpeg";
1421
+ data: string;
1422
1422
  };
1423
1423
  cache_control?: {
1424
1424
  type: "ephemeral";
@@ -1449,9 +1449,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1449
1449
  } | {
1450
1450
  type: "image";
1451
1451
  source: {
1452
- data: string;
1453
1452
  type: "base64";
1454
1453
  media_type: "image/jpeg";
1454
+ data: string;
1455
1455
  };
1456
1456
  cache_control?: {
1457
1457
  type: "ephemeral";
@@ -1483,9 +1483,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1483
1483
  } | {
1484
1484
  type: "image";
1485
1485
  source: {
1486
- data: string;
1487
1486
  type: "base64";
1488
1487
  media_type: "image/jpeg";
1488
+ data: string;
1489
1489
  };
1490
1490
  cache_control?: {
1491
1491
  type: "ephemeral";
@@ -1549,9 +1549,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1549
1549
  } | {
1550
1550
  type: "image";
1551
1551
  source: {
1552
- data: string;
1553
1552
  type: "base64";
1554
1553
  media_type: "image/jpeg";
1554
+ data: string;
1555
1555
  };
1556
1556
  cache_control?: {
1557
1557
  type: "ephemeral";
@@ -1615,9 +1615,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1615
1615
  } | {
1616
1616
  type: "image";
1617
1617
  source: {
1618
- data: string;
1619
1618
  type: "base64";
1620
1619
  media_type: "image/jpeg";
1620
+ data: string;
1621
1621
  };
1622
1622
  cache_control?: {
1623
1623
  type: "ephemeral";
@@ -1702,9 +1702,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1702
1702
  } | {
1703
1703
  type: "image";
1704
1704
  source: {
1705
- data: string;
1706
1705
  type: "base64";
1707
1706
  media_type: "image/jpeg";
1707
+ data: string;
1708
1708
  };
1709
1709
  cache_control?: {
1710
1710
  type: "ephemeral";
@@ -1782,9 +1782,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1782
1782
  } | {
1783
1783
  type: "image";
1784
1784
  source: {
1785
- data: string;
1786
1785
  type: "base64";
1787
1786
  media_type: "image/jpeg";
1787
+ data: string;
1788
1788
  };
1789
1789
  cache_control?: {
1790
1790
  type: "ephemeral";
@@ -2013,6 +2013,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2013
2013
  authToken?: string | undefined;
2014
2014
  }>]>;
2015
2015
  }, "strip", z.ZodTypeAny, {
2016
+ type: "action";
2016
2017
  data: {
2017
2018
  type: "prompt";
2018
2019
  promptId: string;
@@ -2073,9 +2074,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2073
2074
  } | {
2074
2075
  type: "image";
2075
2076
  source: {
2076
- data: string;
2077
2077
  type: "base64";
2078
2078
  media_type: "image/jpeg";
2079
+ data: string;
2079
2080
  };
2080
2081
  cache_control?: {
2081
2082
  type: "ephemeral";
@@ -2136,9 +2137,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2136
2137
  stagedChanges: string;
2137
2138
  authToken?: string | undefined;
2138
2139
  };
2139
- type: "action";
2140
2140
  txid: number;
2141
2141
  }, {
2142
+ type: "action";
2142
2143
  data: {
2143
2144
  type: "prompt";
2144
2145
  promptId: string;
@@ -2198,9 +2199,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2198
2199
  } | {
2199
2200
  type: "image";
2200
2201
  source: {
2201
- data: string;
2202
2202
  type: "base64";
2203
2203
  media_type: "image/jpeg";
2204
+ data: string;
2204
2205
  };
2205
2206
  cache_control?: {
2206
2207
  type: "ephemeral";
@@ -2262,7 +2263,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2262
2263
  stagedChanges: string;
2263
2264
  authToken?: string | undefined;
2264
2265
  };
2265
- type: "action";
2266
2266
  txid: number;
2267
2267
  }>]>;
2268
2268
  export type ClientMessageType = keyof typeof CLIENT_MESSAGE_SCHEMAS;
@@ -2308,12 +2308,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2308
2308
  content: z.ZodString;
2309
2309
  }, "strip", z.ZodTypeAny, {
2310
2310
  content: string;
2311
- path: string;
2312
2311
  type: "patch" | "file";
2312
+ path: string;
2313
2313
  }, {
2314
2314
  content: string;
2315
- path: string;
2316
2315
  type: "patch" | "file";
2316
+ path: string;
2317
2317
  }>, "many">;
2318
2318
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
2319
2319
  type: z.ZodEnum<["patch", "file"]>;
@@ -2321,12 +2321,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2321
2321
  content: z.ZodString;
2322
2322
  }, "strip", z.ZodTypeAny, {
2323
2323
  content: string;
2324
- path: string;
2325
2324
  type: "patch" | "file";
2325
+ path: string;
2326
2326
  }, {
2327
2327
  content: string;
2328
- path: string;
2329
2328
  type: "patch" | "file";
2329
+ path: string;
2330
2330
  }>, "many">;
2331
2331
  addedFileVersions: z.ZodArray<z.ZodObject<{
2332
2332
  path: z.ZodString;
@@ -2351,13 +2351,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2351
2351
  response: string;
2352
2352
  changes: {
2353
2353
  content: string;
2354
- path: string;
2355
2354
  type: "patch" | "file";
2355
+ path: string;
2356
2356
  }[];
2357
2357
  changesAlreadyApplied: {
2358
2358
  content: string;
2359
- path: string;
2360
2359
  type: "patch" | "file";
2360
+ path: string;
2361
2361
  }[];
2362
2362
  addedFileVersions: {
2363
2363
  content: string;
@@ -2375,13 +2375,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2375
2375
  response: string;
2376
2376
  changes: {
2377
2377
  content: string;
2378
- path: string;
2379
2378
  type: "patch" | "file";
2379
+ path: string;
2380
2380
  }[];
2381
2381
  changesAlreadyApplied: {
2382
2382
  content: string;
2383
- path: string;
2384
2383
  type: "patch" | "file";
2384
+ path: string;
2385
2385
  }[];
2386
2386
  addedFileVersions: {
2387
2387
  content: string;
@@ -2594,13 +2594,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2594
2594
  media_type: z.ZodLiteral<"image/jpeg">;
2595
2595
  data: z.ZodString;
2596
2596
  }, "strip", z.ZodTypeAny, {
2597
- data: string;
2598
2597
  type: "base64";
2599
2598
  media_type: "image/jpeg";
2600
- }, {
2601
2599
  data: string;
2600
+ }, {
2602
2601
  type: "base64";
2603
2602
  media_type: "image/jpeg";
2603
+ data: string;
2604
2604
  }>;
2605
2605
  cache_control: z.ZodOptional<z.ZodObject<{
2606
2606
  type: z.ZodLiteral<"ephemeral">;
@@ -2612,9 +2612,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2612
2612
  }, "strip", z.ZodTypeAny, {
2613
2613
  type: "image";
2614
2614
  source: {
2615
- data: string;
2616
2615
  type: "base64";
2617
2616
  media_type: "image/jpeg";
2617
+ data: string;
2618
2618
  };
2619
2619
  cache_control?: {
2620
2620
  type: "ephemeral";
@@ -2622,9 +2622,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2622
2622
  }, {
2623
2623
  type: "image";
2624
2624
  source: {
2625
- data: string;
2626
2625
  type: "base64";
2627
2626
  media_type: "image/jpeg";
2627
+ data: string;
2628
2628
  };
2629
2629
  cache_control?: {
2630
2630
  type: "ephemeral";
@@ -2655,9 +2655,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2655
2655
  } | {
2656
2656
  type: "image";
2657
2657
  source: {
2658
- data: string;
2659
2658
  type: "base64";
2660
2659
  media_type: "image/jpeg";
2660
+ data: string;
2661
2661
  };
2662
2662
  cache_control?: {
2663
2663
  type: "ephemeral";
@@ -2689,9 +2689,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2689
2689
  } | {
2690
2690
  type: "image";
2691
2691
  source: {
2692
- data: string;
2693
2692
  type: "base64";
2694
2693
  media_type: "image/jpeg";
2694
+ data: string;
2695
2695
  };
2696
2696
  cache_control?: {
2697
2697
  type: "ephemeral";
@@ -2755,9 +2755,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2755
2755
  } | {
2756
2756
  type: "image";
2757
2757
  source: {
2758
- data: string;
2759
2758
  type: "base64";
2760
2759
  media_type: "image/jpeg";
2760
+ data: string;
2761
2761
  };
2762
2762
  cache_control?: {
2763
2763
  type: "ephemeral";
@@ -2821,9 +2821,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2821
2821
  } | {
2822
2822
  type: "image";
2823
2823
  source: {
2824
- data: string;
2825
2824
  type: "base64";
2826
2825
  media_type: "image/jpeg";
2826
+ data: string;
2827
2827
  };
2828
2828
  cache_control?: {
2829
2829
  type: "ephemeral";
@@ -2917,9 +2917,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2917
2917
  } | {
2918
2918
  type: "image";
2919
2919
  source: {
2920
- data: string;
2921
2920
  type: "base64";
2922
2921
  media_type: "image/jpeg";
2922
+ data: string;
2923
2923
  };
2924
2924
  cache_control?: {
2925
2925
  type: "ephemeral";
@@ -2997,9 +2997,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2997
2997
  } | {
2998
2998
  type: "image";
2999
2999
  source: {
3000
- data: string;
3001
3000
  type: "base64";
3002
3001
  media_type: "image/jpeg";
3002
+ data: string;
3003
3003
  };
3004
3004
  cache_control?: {
3005
3005
  type: "ephemeral";
@@ -3054,12 +3054,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3054
3054
  content: z.ZodString;
3055
3055
  }, "strip", z.ZodTypeAny, {
3056
3056
  content: string;
3057
- path: string;
3058
3057
  type: "patch" | "file";
3058
+ path: string;
3059
3059
  }, {
3060
3060
  content: string;
3061
- path: string;
3062
3061
  type: "patch" | "file";
3062
+ path: string;
3063
3063
  }>, "many">;
3064
3064
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
3065
3065
  type: z.ZodEnum<["patch", "file"]>;
@@ -3067,12 +3067,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3067
3067
  content: z.ZodString;
3068
3068
  }, "strip", z.ZodTypeAny, {
3069
3069
  content: string;
3070
- path: string;
3071
3070
  type: "patch" | "file";
3071
+ path: string;
3072
3072
  }, {
3073
3073
  content: string;
3074
- path: string;
3075
3074
  type: "patch" | "file";
3075
+ path: string;
3076
3076
  }>, "many">;
3077
3077
  addedFileVersions: z.ZodArray<z.ZodObject<{
3078
3078
  path: z.ZodString;
@@ -3086,23 +3086,23 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3086
3086
  }>, "many">;
3087
3087
  resetFileVersions: z.ZodBoolean;
3088
3088
  }, "strip", z.ZodTypeAny, {
3089
+ type: "tool-call";
3089
3090
  data: {
3090
3091
  name: string;
3091
3092
  id: string;
3092
3093
  input: Record<string, any>;
3093
3094
  };
3094
- type: "tool-call";
3095
3095
  userInputId: string;
3096
3096
  response: string;
3097
3097
  changes: {
3098
3098
  content: string;
3099
- path: string;
3100
3099
  type: "patch" | "file";
3100
+ path: string;
3101
3101
  }[];
3102
3102
  changesAlreadyApplied: {
3103
3103
  content: string;
3104
- path: string;
3105
3104
  type: "patch" | "file";
3105
+ path: string;
3106
3106
  }[];
3107
3107
  addedFileVersions: {
3108
3108
  content: string;
@@ -3110,23 +3110,23 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3110
3110
  }[];
3111
3111
  resetFileVersions: boolean;
3112
3112
  }, {
3113
+ type: "tool-call";
3113
3114
  data: {
3114
3115
  name: string;
3115
3116
  id: string;
3116
3117
  input: Record<string, any>;
3117
3118
  };
3118
- type: "tool-call";
3119
3119
  userInputId: string;
3120
3120
  response: string;
3121
3121
  changes: {
3122
3122
  content: string;
3123
- path: string;
3124
3123
  type: "patch" | "file";
3124
+ path: string;
3125
3125
  }[];
3126
3126
  changesAlreadyApplied: {
3127
3127
  content: string;
3128
- path: string;
3129
3128
  type: "patch" | "file";
3129
+ path: string;
3130
3130
  }[];
3131
3131
  addedFileVersions: {
3132
3132
  content: string;
@@ -3245,6 +3245,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3245
3245
  type: "request-reconnect";
3246
3246
  }>]>;
3247
3247
  }, "strip", z.ZodTypeAny, {
3248
+ type: "action";
3248
3249
  data: {
3249
3250
  type: "usage-response";
3250
3251
  usage: number;
@@ -3265,13 +3266,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3265
3266
  response: string;
3266
3267
  changes: {
3267
3268
  content: string;
3268
- path: string;
3269
3269
  type: "patch" | "file";
3270
+ path: string;
3270
3271
  }[];
3271
3272
  changesAlreadyApplied: {
3272
3273
  content: string;
3273
- path: string;
3274
3274
  type: "patch" | "file";
3275
+ path: string;
3275
3276
  }[];
3276
3277
  addedFileVersions: {
3277
3278
  content: string;
@@ -3345,9 +3346,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3345
3346
  } | {
3346
3347
  type: "image";
3347
3348
  source: {
3348
- data: string;
3349
3349
  type: "base64";
3350
3350
  media_type: "image/jpeg";
3351
+ data: string;
3351
3352
  };
3352
3353
  cache_control?: {
3353
3354
  type: "ephemeral";
@@ -3376,23 +3377,23 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3376
3377
  requestId: string;
3377
3378
  filePaths: string[];
3378
3379
  } | {
3380
+ type: "tool-call";
3379
3381
  data: {
3380
3382
  name: string;
3381
3383
  id: string;
3382
3384
  input: Record<string, any>;
3383
3385
  };
3384
- type: "tool-call";
3385
3386
  userInputId: string;
3386
3387
  response: string;
3387
3388
  changes: {
3388
3389
  content: string;
3389
- path: string;
3390
3390
  type: "patch" | "file";
3391
+ path: string;
3391
3392
  }[];
3392
3393
  changesAlreadyApplied: {
3393
3394
  content: string;
3394
- path: string;
3395
3395
  type: "patch" | "file";
3396
+ path: string;
3396
3397
  }[];
3397
3398
  addedFileVersions: {
3398
3399
  content: string;
@@ -3418,8 +3419,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3418
3419
  } | {
3419
3420
  type: "request-reconnect";
3420
3421
  };
3421
- type: "action";
3422
3422
  }, {
3423
+ type: "action";
3423
3424
  data: {
3424
3425
  type: "usage-response";
3425
3426
  usage: number;
@@ -3440,13 +3441,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3440
3441
  response: string;
3441
3442
  changes: {
3442
3443
  content: string;
3443
- path: string;
3444
3444
  type: "patch" | "file";
3445
+ path: string;
3445
3446
  }[];
3446
3447
  changesAlreadyApplied: {
3447
3448
  content: string;
3448
- path: string;
3449
3449
  type: "patch" | "file";
3450
+ path: string;
3450
3451
  }[];
3451
3452
  addedFileVersions: {
3452
3453
  content: string;
@@ -3520,9 +3521,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3520
3521
  } | {
3521
3522
  type: "image";
3522
3523
  source: {
3523
- data: string;
3524
3524
  type: "base64";
3525
3525
  media_type: "image/jpeg";
3526
+ data: string;
3526
3527
  };
3527
3528
  cache_control?: {
3528
3529
  type: "ephemeral";
@@ -3551,23 +3552,23 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3551
3552
  requestId: string;
3552
3553
  filePaths: string[];
3553
3554
  } | {
3555
+ type: "tool-call";
3554
3556
  data: {
3555
3557
  name: string;
3556
3558
  id: string;
3557
3559
  input: Record<string, any>;
3558
3560
  };
3559
- type: "tool-call";
3560
3561
  userInputId: string;
3561
3562
  response: string;
3562
3563
  changes: {
3563
3564
  content: string;
3564
- path: string;
3565
3565
  type: "patch" | "file";
3566
+ path: string;
3566
3567
  }[];
3567
3568
  changesAlreadyApplied: {
3568
3569
  content: string;
3569
- path: string;
3570
3570
  type: "patch" | "file";
3571
+ path: string;
3571
3572
  }[];
3572
3573
  addedFileVersions: {
3573
3574
  content: string;
@@ -3593,7 +3594,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3593
3594
  } | {
3594
3595
  type: "request-reconnect";
3595
3596
  };
3596
- type: "action";
3597
3597
  }>;
3598
3598
  };
3599
3599
  export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
@@ -3635,12 +3635,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3635
3635
  content: z.ZodString;
3636
3636
  }, "strip", z.ZodTypeAny, {
3637
3637
  content: string;
3638
- path: string;
3639
3638
  type: "patch" | "file";
3639
+ path: string;
3640
3640
  }, {
3641
3641
  content: string;
3642
- path: string;
3643
3642
  type: "patch" | "file";
3643
+ path: string;
3644
3644
  }>, "many">;
3645
3645
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
3646
3646
  type: z.ZodEnum<["patch", "file"]>;
@@ -3648,12 +3648,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3648
3648
  content: z.ZodString;
3649
3649
  }, "strip", z.ZodTypeAny, {
3650
3650
  content: string;
3651
- path: string;
3652
3651
  type: "patch" | "file";
3652
+ path: string;
3653
3653
  }, {
3654
3654
  content: string;
3655
- path: string;
3656
3655
  type: "patch" | "file";
3656
+ path: string;
3657
3657
  }>, "many">;
3658
3658
  addedFileVersions: z.ZodArray<z.ZodObject<{
3659
3659
  path: z.ZodString;
@@ -3678,13 +3678,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3678
3678
  response: string;
3679
3679
  changes: {
3680
3680
  content: string;
3681
- path: string;
3682
3681
  type: "patch" | "file";
3682
+ path: string;
3683
3683
  }[];
3684
3684
  changesAlreadyApplied: {
3685
3685
  content: string;
3686
- path: string;
3687
3686
  type: "patch" | "file";
3687
+ path: string;
3688
3688
  }[];
3689
3689
  addedFileVersions: {
3690
3690
  content: string;
@@ -3702,13 +3702,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3702
3702
  response: string;
3703
3703
  changes: {
3704
3704
  content: string;
3705
- path: string;
3706
3705
  type: "patch" | "file";
3706
+ path: string;
3707
3707
  }[];
3708
3708
  changesAlreadyApplied: {
3709
3709
  content: string;
3710
- path: string;
3711
3710
  type: "patch" | "file";
3711
+ path: string;
3712
3712
  }[];
3713
3713
  addedFileVersions: {
3714
3714
  content: string;
@@ -3921,13 +3921,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3921
3921
  media_type: z.ZodLiteral<"image/jpeg">;
3922
3922
  data: z.ZodString;
3923
3923
  }, "strip", z.ZodTypeAny, {
3924
- data: string;
3925
3924
  type: "base64";
3926
3925
  media_type: "image/jpeg";
3927
- }, {
3928
3926
  data: string;
3927
+ }, {
3929
3928
  type: "base64";
3930
3929
  media_type: "image/jpeg";
3930
+ data: string;
3931
3931
  }>;
3932
3932
  cache_control: z.ZodOptional<z.ZodObject<{
3933
3933
  type: z.ZodLiteral<"ephemeral">;
@@ -3939,9 +3939,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3939
3939
  }, "strip", z.ZodTypeAny, {
3940
3940
  type: "image";
3941
3941
  source: {
3942
- data: string;
3943
3942
  type: "base64";
3944
3943
  media_type: "image/jpeg";
3944
+ data: string;
3945
3945
  };
3946
3946
  cache_control?: {
3947
3947
  type: "ephemeral";
@@ -3949,9 +3949,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3949
3949
  }, {
3950
3950
  type: "image";
3951
3951
  source: {
3952
- data: string;
3953
3952
  type: "base64";
3954
3953
  media_type: "image/jpeg";
3954
+ data: string;
3955
3955
  };
3956
3956
  cache_control?: {
3957
3957
  type: "ephemeral";
@@ -3982,9 +3982,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3982
3982
  } | {
3983
3983
  type: "image";
3984
3984
  source: {
3985
- data: string;
3986
3985
  type: "base64";
3987
3986
  media_type: "image/jpeg";
3987
+ data: string;
3988
3988
  };
3989
3989
  cache_control?: {
3990
3990
  type: "ephemeral";
@@ -4016,9 +4016,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4016
4016
  } | {
4017
4017
  type: "image";
4018
4018
  source: {
4019
- data: string;
4020
4019
  type: "base64";
4021
4020
  media_type: "image/jpeg";
4021
+ data: string;
4022
4022
  };
4023
4023
  cache_control?: {
4024
4024
  type: "ephemeral";
@@ -4082,9 +4082,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4082
4082
  } | {
4083
4083
  type: "image";
4084
4084
  source: {
4085
- data: string;
4086
4085
  type: "base64";
4087
4086
  media_type: "image/jpeg";
4087
+ data: string;
4088
4088
  };
4089
4089
  cache_control?: {
4090
4090
  type: "ephemeral";
@@ -4148,9 +4148,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4148
4148
  } | {
4149
4149
  type: "image";
4150
4150
  source: {
4151
- data: string;
4152
4151
  type: "base64";
4153
4152
  media_type: "image/jpeg";
4153
+ data: string;
4154
4154
  };
4155
4155
  cache_control?: {
4156
4156
  type: "ephemeral";
@@ -4244,9 +4244,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4244
4244
  } | {
4245
4245
  type: "image";
4246
4246
  source: {
4247
- data: string;
4248
4247
  type: "base64";
4249
4248
  media_type: "image/jpeg";
4249
+ data: string;
4250
4250
  };
4251
4251
  cache_control?: {
4252
4252
  type: "ephemeral";
@@ -4324,9 +4324,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4324
4324
  } | {
4325
4325
  type: "image";
4326
4326
  source: {
4327
- data: string;
4328
4327
  type: "base64";
4329
4328
  media_type: "image/jpeg";
4329
+ data: string;
4330
4330
  };
4331
4331
  cache_control?: {
4332
4332
  type: "ephemeral";
@@ -4381,12 +4381,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4381
4381
  content: z.ZodString;
4382
4382
  }, "strip", z.ZodTypeAny, {
4383
4383
  content: string;
4384
- path: string;
4385
4384
  type: "patch" | "file";
4385
+ path: string;
4386
4386
  }, {
4387
4387
  content: string;
4388
- path: string;
4389
4388
  type: "patch" | "file";
4389
+ path: string;
4390
4390
  }>, "many">;
4391
4391
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
4392
4392
  type: z.ZodEnum<["patch", "file"]>;
@@ -4394,12 +4394,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4394
4394
  content: z.ZodString;
4395
4395
  }, "strip", z.ZodTypeAny, {
4396
4396
  content: string;
4397
- path: string;
4398
4397
  type: "patch" | "file";
4398
+ path: string;
4399
4399
  }, {
4400
4400
  content: string;
4401
- path: string;
4402
4401
  type: "patch" | "file";
4402
+ path: string;
4403
4403
  }>, "many">;
4404
4404
  addedFileVersions: z.ZodArray<z.ZodObject<{
4405
4405
  path: z.ZodString;
@@ -4413,23 +4413,23 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4413
4413
  }>, "many">;
4414
4414
  resetFileVersions: z.ZodBoolean;
4415
4415
  }, "strip", z.ZodTypeAny, {
4416
+ type: "tool-call";
4416
4417
  data: {
4417
4418
  name: string;
4418
4419
  id: string;
4419
4420
  input: Record<string, any>;
4420
4421
  };
4421
- type: "tool-call";
4422
4422
  userInputId: string;
4423
4423
  response: string;
4424
4424
  changes: {
4425
4425
  content: string;
4426
- path: string;
4427
4426
  type: "patch" | "file";
4427
+ path: string;
4428
4428
  }[];
4429
4429
  changesAlreadyApplied: {
4430
4430
  content: string;
4431
- path: string;
4432
4431
  type: "patch" | "file";
4432
+ path: string;
4433
4433
  }[];
4434
4434
  addedFileVersions: {
4435
4435
  content: string;
@@ -4437,23 +4437,23 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4437
4437
  }[];
4438
4438
  resetFileVersions: boolean;
4439
4439
  }, {
4440
+ type: "tool-call";
4440
4441
  data: {
4441
4442
  name: string;
4442
4443
  id: string;
4443
4444
  input: Record<string, any>;
4444
4445
  };
4445
- type: "tool-call";
4446
4446
  userInputId: string;
4447
4447
  response: string;
4448
4448
  changes: {
4449
4449
  content: string;
4450
- path: string;
4451
4450
  type: "patch" | "file";
4451
+ path: string;
4452
4452
  }[];
4453
4453
  changesAlreadyApplied: {
4454
4454
  content: string;
4455
- path: string;
4456
4455
  type: "patch" | "file";
4456
+ path: string;
4457
4457
  }[];
4458
4458
  addedFileVersions: {
4459
4459
  content: string;
@@ -4572,6 +4572,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4572
4572
  type: "request-reconnect";
4573
4573
  }>]>;
4574
4574
  }, "strip", z.ZodTypeAny, {
4575
+ type: "action";
4575
4576
  data: {
4576
4577
  type: "usage-response";
4577
4578
  usage: number;
@@ -4592,13 +4593,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4592
4593
  response: string;
4593
4594
  changes: {
4594
4595
  content: string;
4595
- path: string;
4596
4596
  type: "patch" | "file";
4597
+ path: string;
4597
4598
  }[];
4598
4599
  changesAlreadyApplied: {
4599
4600
  content: string;
4600
- path: string;
4601
4601
  type: "patch" | "file";
4602
+ path: string;
4602
4603
  }[];
4603
4604
  addedFileVersions: {
4604
4605
  content: string;
@@ -4672,9 +4673,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4672
4673
  } | {
4673
4674
  type: "image";
4674
4675
  source: {
4675
- data: string;
4676
4676
  type: "base64";
4677
4677
  media_type: "image/jpeg";
4678
+ data: string;
4678
4679
  };
4679
4680
  cache_control?: {
4680
4681
  type: "ephemeral";
@@ -4703,23 +4704,23 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4703
4704
  requestId: string;
4704
4705
  filePaths: string[];
4705
4706
  } | {
4707
+ type: "tool-call";
4706
4708
  data: {
4707
4709
  name: string;
4708
4710
  id: string;
4709
4711
  input: Record<string, any>;
4710
4712
  };
4711
- type: "tool-call";
4712
4713
  userInputId: string;
4713
4714
  response: string;
4714
4715
  changes: {
4715
4716
  content: string;
4716
- path: string;
4717
4717
  type: "patch" | "file";
4718
+ path: string;
4718
4719
  }[];
4719
4720
  changesAlreadyApplied: {
4720
4721
  content: string;
4721
- path: string;
4722
4722
  type: "patch" | "file";
4723
+ path: string;
4723
4724
  }[];
4724
4725
  addedFileVersions: {
4725
4726
  content: string;
@@ -4745,8 +4746,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4745
4746
  } | {
4746
4747
  type: "request-reconnect";
4747
4748
  };
4748
- type: "action";
4749
4749
  }, {
4750
+ type: "action";
4750
4751
  data: {
4751
4752
  type: "usage-response";
4752
4753
  usage: number;
@@ -4767,13 +4768,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4767
4768
  response: string;
4768
4769
  changes: {
4769
4770
  content: string;
4770
- path: string;
4771
4771
  type: "patch" | "file";
4772
+ path: string;
4772
4773
  }[];
4773
4774
  changesAlreadyApplied: {
4774
4775
  content: string;
4775
- path: string;
4776
4776
  type: "patch" | "file";
4777
+ path: string;
4777
4778
  }[];
4778
4779
  addedFileVersions: {
4779
4780
  content: string;
@@ -4847,9 +4848,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4847
4848
  } | {
4848
4849
  type: "image";
4849
4850
  source: {
4850
- data: string;
4851
4851
  type: "base64";
4852
4852
  media_type: "image/jpeg";
4853
+ data: string;
4853
4854
  };
4854
4855
  cache_control?: {
4855
4856
  type: "ephemeral";
@@ -4878,23 +4879,23 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4878
4879
  requestId: string;
4879
4880
  filePaths: string[];
4880
4881
  } | {
4882
+ type: "tool-call";
4881
4883
  data: {
4882
4884
  name: string;
4883
4885
  id: string;
4884
4886
  input: Record<string, any>;
4885
4887
  };
4886
- type: "tool-call";
4887
4888
  userInputId: string;
4888
4889
  response: string;
4889
4890
  changes: {
4890
4891
  content: string;
4891
- path: string;
4892
4892
  type: "patch" | "file";
4893
+ path: string;
4893
4894
  }[];
4894
4895
  changesAlreadyApplied: {
4895
4896
  content: string;
4896
- path: string;
4897
4897
  type: "patch" | "file";
4898
+ path: string;
4898
4899
  }[];
4899
4900
  addedFileVersions: {
4900
4901
  content: string;
@@ -4920,7 +4921,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4920
4921
  } | {
4921
4922
  type: "request-reconnect";
4922
4923
  };
4923
- type: "action";
4924
4924
  }>]>;
4925
4925
  export type ServerMessageType = keyof typeof SERVER_MESSAGE_SCHEMAS;
4926
4926
  export type ServerMessage<T extends ServerMessageType = ServerMessageType> = z.infer<(typeof SERVER_MESSAGE_SCHEMAS)[T]>;