codebuff 1.0.269 → 1.0.270

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 (50) hide show
  1. package/dist/cli-handlers/api-key.d.ts +1 -1
  2. package/dist/cli-handlers/api-key.js +1 -1
  3. package/dist/cli-handlers/api-key.js.map +1 -1
  4. package/dist/client.d.ts +2 -2
  5. package/dist/common/actions.d.ts +66 -66
  6. package/dist/common/browser-actions.d.ts +46 -46
  7. package/dist/common/constants.d.ts +1 -1
  8. package/dist/common/constants.js +18 -7
  9. package/dist/common/constants.js.map +1 -1
  10. package/dist/common/json-config/constants.d.ts +6 -6
  11. package/dist/common/types/message.d.ts +16 -16
  12. package/dist/common/util/__tests__/saxy.test.js +137 -11
  13. package/dist/common/util/__tests__/saxy.test.js.map +1 -1
  14. package/dist/common/util/credentials.d.ts +4 -4
  15. package/dist/common/util/process-stream.d.ts +7 -0
  16. package/dist/common/util/process-stream.js +162 -0
  17. package/dist/common/util/process-stream.js.map +1 -0
  18. package/dist/common/util/saxy.d.ts +1 -0
  19. package/dist/common/util/saxy.js +42 -10
  20. package/dist/common/util/saxy.js.map +1 -1
  21. package/dist/common/websockets/websocket-schema.d.ts +124 -124
  22. package/dist/index.js +0 -6
  23. package/dist/index.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/__tests__/xml-stream-parser.test.js +26 -0
  32. package/dist/utils/__tests__/xml-stream-parser.test.js.map +1 -1
  33. package/dist/utils/detect-shell.js +1 -1
  34. package/dist/utils/detect-shell.js.map +1 -1
  35. package/dist/utils/file-paths.d.ts +9 -0
  36. package/dist/utils/file-paths.js +24 -0
  37. package/dist/utils/file-paths.js.map +1 -0
  38. package/dist/utils/logger.d.ts +1 -1
  39. package/dist/utils/logger.js +3 -6
  40. package/dist/utils/logger.js.map +1 -1
  41. package/dist/utils/path.d.ts +9 -0
  42. package/dist/utils/path.js +27 -0
  43. package/dist/utils/path.js.map +1 -0
  44. package/dist/utils/spinner.js.map +1 -1
  45. package/dist/utils/system-info.js +2 -2
  46. package/dist/utils/system-info.js.map +1 -1
  47. package/dist/utils/xml-stream-parser.js.map +1 -1
  48. package/dist/workers/project-context.js +1 -1
  49. package/dist/workers/project-context.js.map +1 -1
  50. package/package.json +2 -1
@@ -237,15 +237,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
237
237
  type: "ephemeral";
238
238
  }>>;
239
239
  }, "strip", z.ZodTypeAny, {
240
- content: string;
241
240
  type: "tool_result";
241
+ content: string;
242
242
  tool_use_id: string;
243
243
  cache_control?: {
244
244
  type: "ephemeral";
245
245
  } | undefined;
246
246
  }, {
247
- content: string;
248
247
  type: "tool_result";
248
+ content: string;
249
249
  tool_use_id: string;
250
250
  cache_control?: {
251
251
  type: "ephemeral";
@@ -309,8 +309,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
309
309
  type: "ephemeral";
310
310
  } | undefined;
311
311
  } | {
312
- content: string;
313
312
  type: "tool_result";
313
+ content: string;
314
314
  tool_use_id: string;
315
315
  cache_control?: {
316
316
  type: "ephemeral";
@@ -343,8 +343,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
343
343
  type: "ephemeral";
344
344
  } | undefined;
345
345
  } | {
346
- content: string;
347
346
  type: "tool_result";
347
+ content: string;
348
348
  tool_use_id: string;
349
349
  cache_control?: {
350
350
  type: "ephemeral";
@@ -409,8 +409,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
409
409
  type: "ephemeral";
410
410
  } | undefined;
411
411
  } | {
412
- content: string;
413
412
  type: "tool_result";
413
+ content: string;
414
414
  tool_use_id: string;
415
415
  cache_control?: {
416
416
  type: "ephemeral";
@@ -475,8 +475,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
475
475
  type: "ephemeral";
476
476
  } | undefined;
477
477
  } | {
478
- content: string;
479
478
  type: "tool_result";
479
+ content: string;
480
480
  tool_use_id: string;
481
481
  cache_control?: {
482
482
  type: "ephemeral";
@@ -515,7 +515,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
515
515
  type: "prompt";
516
516
  promptId: string;
517
517
  fingerprintId: string;
518
- costMode: "max" | "lite" | "normal" | "experimental";
518
+ costMode: "lite" | "normal" | "max" | "experimental";
519
519
  agentState: {
520
520
  agentContext: string;
521
521
  fileContext: {
@@ -562,8 +562,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
562
562
  type: "ephemeral";
563
563
  } | undefined;
564
564
  } | {
565
- content: string;
566
565
  type: "tool_result";
566
+ content: string;
567
567
  tool_use_id: string;
568
568
  cache_control?: {
569
569
  type: "ephemeral";
@@ -642,8 +642,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
642
642
  type: "ephemeral";
643
643
  } | undefined;
644
644
  } | {
645
- content: string;
646
645
  type: "tool_result";
646
+ content: string;
647
647
  tool_use_id: string;
648
648
  cache_control?: {
649
649
  type: "ephemeral";
@@ -670,7 +670,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
670
670
  }[];
671
671
  prompt?: string | undefined;
672
672
  authToken?: string | undefined;
673
- costMode?: "max" | "lite" | "normal" | "experimental" | undefined;
673
+ costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
674
674
  model?: string | undefined;
675
675
  cwd?: string | undefined;
676
676
  }>, z.ZodObject<{
@@ -803,6 +803,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
803
803
  }>;
804
804
  }, "strip", z.ZodTypeAny, {
805
805
  type: "init";
806
+ fingerprintId: string;
806
807
  fileContext: {
807
808
  currentWorkingDirectory: string;
808
809
  fileTree: import("../util/file").FileTreeNode[];
@@ -831,10 +832,10 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
831
832
  content: string;
832
833
  }[][] | undefined;
833
834
  };
834
- fingerprintId: string;
835
835
  authToken?: string | undefined;
836
836
  }, {
837
837
  type: "init";
838
+ fingerprintId: string;
838
839
  fileContext: {
839
840
  currentWorkingDirectory: string;
840
841
  fileTree: import("../util/file").FileTreeNode[];
@@ -863,7 +864,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
863
864
  content: string;
864
865
  }[][] | undefined;
865
866
  };
866
- fingerprintId: string;
867
867
  authToken?: string | undefined;
868
868
  }>, z.ZodObject<{
869
869
  type: z.ZodLiteral<"generate-commit-message">;
@@ -887,7 +887,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
887
887
  type: "prompt";
888
888
  promptId: string;
889
889
  fingerprintId: string;
890
- costMode: "max" | "lite" | "normal" | "experimental";
890
+ costMode: "lite" | "normal" | "max" | "experimental";
891
891
  agentState: {
892
892
  agentContext: string;
893
893
  fileContext: {
@@ -934,8 +934,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
934
934
  type: "ephemeral";
935
935
  } | undefined;
936
936
  } | {
937
- content: string;
938
937
  type: "tool_result";
938
+ content: string;
939
939
  tool_use_id: string;
940
940
  cache_control?: {
941
941
  type: "ephemeral";
@@ -970,6 +970,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
970
970
  requestId?: string | undefined;
971
971
  } | {
972
972
  type: "init";
973
+ fingerprintId: string;
973
974
  fileContext: {
974
975
  currentWorkingDirectory: string;
975
976
  fileTree: import("../util/file").FileTreeNode[];
@@ -998,7 +999,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
998
999
  content: string;
999
1000
  }[][] | undefined;
1000
1001
  };
1001
- fingerprintId: string;
1002
1002
  authToken?: string | undefined;
1003
1003
  } | {
1004
1004
  type: "generate-commit-message";
@@ -1059,8 +1059,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1059
1059
  type: "ephemeral";
1060
1060
  } | undefined;
1061
1061
  } | {
1062
- content: string;
1063
1062
  type: "tool_result";
1063
+ content: string;
1064
1064
  tool_use_id: string;
1065
1065
  cache_control?: {
1066
1066
  type: "ephemeral";
@@ -1087,7 +1087,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1087
1087
  }[];
1088
1088
  prompt?: string | undefined;
1089
1089
  authToken?: string | undefined;
1090
- costMode?: "max" | "lite" | "normal" | "experimental" | undefined;
1090
+ costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
1091
1091
  model?: string | undefined;
1092
1092
  cwd?: string | undefined;
1093
1093
  } | {
@@ -1096,6 +1096,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1096
1096
  requestId?: string | undefined;
1097
1097
  } | {
1098
1098
  type: "init";
1099
+ fingerprintId: string;
1099
1100
  fileContext: {
1100
1101
  currentWorkingDirectory: string;
1101
1102
  fileTree: import("../util/file").FileTreeNode[];
@@ -1124,7 +1125,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1124
1125
  content: string;
1125
1126
  }[][] | undefined;
1126
1127
  };
1127
- fingerprintId: string;
1128
1128
  authToken?: string | undefined;
1129
1129
  } | {
1130
1130
  type: "generate-commit-message";
@@ -1368,15 +1368,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1368
1368
  type: "ephemeral";
1369
1369
  }>>;
1370
1370
  }, "strip", z.ZodTypeAny, {
1371
- content: string;
1372
1371
  type: "tool_result";
1372
+ content: string;
1373
1373
  tool_use_id: string;
1374
1374
  cache_control?: {
1375
1375
  type: "ephemeral";
1376
1376
  } | undefined;
1377
1377
  }, {
1378
- content: string;
1379
1378
  type: "tool_result";
1379
+ content: string;
1380
1380
  tool_use_id: string;
1381
1381
  cache_control?: {
1382
1382
  type: "ephemeral";
@@ -1440,8 +1440,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1440
1440
  type: "ephemeral";
1441
1441
  } | undefined;
1442
1442
  } | {
1443
- content: string;
1444
1443
  type: "tool_result";
1444
+ content: string;
1445
1445
  tool_use_id: string;
1446
1446
  cache_control?: {
1447
1447
  type: "ephemeral";
@@ -1474,8 +1474,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1474
1474
  type: "ephemeral";
1475
1475
  } | undefined;
1476
1476
  } | {
1477
- content: string;
1478
1477
  type: "tool_result";
1478
+ content: string;
1479
1479
  tool_use_id: string;
1480
1480
  cache_control?: {
1481
1481
  type: "ephemeral";
@@ -1540,8 +1540,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1540
1540
  type: "ephemeral";
1541
1541
  } | undefined;
1542
1542
  } | {
1543
- content: string;
1544
1543
  type: "tool_result";
1544
+ content: string;
1545
1545
  tool_use_id: string;
1546
1546
  cache_control?: {
1547
1547
  type: "ephemeral";
@@ -1606,8 +1606,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1606
1606
  type: "ephemeral";
1607
1607
  } | undefined;
1608
1608
  } | {
1609
- content: string;
1610
1609
  type: "tool_result";
1610
+ content: string;
1611
1611
  tool_use_id: string;
1612
1612
  cache_control?: {
1613
1613
  type: "ephemeral";
@@ -1646,7 +1646,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1646
1646
  type: "prompt";
1647
1647
  promptId: string;
1648
1648
  fingerprintId: string;
1649
- costMode: "max" | "lite" | "normal" | "experimental";
1649
+ costMode: "lite" | "normal" | "max" | "experimental";
1650
1650
  agentState: {
1651
1651
  agentContext: string;
1652
1652
  fileContext: {
@@ -1693,8 +1693,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1693
1693
  type: "ephemeral";
1694
1694
  } | undefined;
1695
1695
  } | {
1696
- content: string;
1697
1696
  type: "tool_result";
1697
+ content: string;
1698
1698
  tool_use_id: string;
1699
1699
  cache_control?: {
1700
1700
  type: "ephemeral";
@@ -1773,8 +1773,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1773
1773
  type: "ephemeral";
1774
1774
  } | undefined;
1775
1775
  } | {
1776
- content: string;
1777
1776
  type: "tool_result";
1777
+ content: string;
1778
1778
  tool_use_id: string;
1779
1779
  cache_control?: {
1780
1780
  type: "ephemeral";
@@ -1801,7 +1801,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1801
1801
  }[];
1802
1802
  prompt?: string | undefined;
1803
1803
  authToken?: string | undefined;
1804
- costMode?: "max" | "lite" | "normal" | "experimental" | undefined;
1804
+ costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
1805
1805
  model?: string | undefined;
1806
1806
  cwd?: string | undefined;
1807
1807
  }>, z.ZodObject<{
@@ -1934,6 +1934,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1934
1934
  }>;
1935
1935
  }, "strip", z.ZodTypeAny, {
1936
1936
  type: "init";
1937
+ fingerprintId: string;
1937
1938
  fileContext: {
1938
1939
  currentWorkingDirectory: string;
1939
1940
  fileTree: import("../util/file").FileTreeNode[];
@@ -1962,10 +1963,10 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1962
1963
  content: string;
1963
1964
  }[][] | undefined;
1964
1965
  };
1965
- fingerprintId: string;
1966
1966
  authToken?: string | undefined;
1967
1967
  }, {
1968
1968
  type: "init";
1969
+ fingerprintId: string;
1969
1970
  fileContext: {
1970
1971
  currentWorkingDirectory: string;
1971
1972
  fileTree: import("../util/file").FileTreeNode[];
@@ -1994,7 +1995,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1994
1995
  content: string;
1995
1996
  }[][] | undefined;
1996
1997
  };
1997
- fingerprintId: string;
1998
1998
  authToken?: string | undefined;
1999
1999
  }>, z.ZodObject<{
2000
2000
  type: z.ZodLiteral<"generate-commit-message">;
@@ -2018,7 +2018,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2018
2018
  type: "prompt";
2019
2019
  promptId: string;
2020
2020
  fingerprintId: string;
2021
- costMode: "max" | "lite" | "normal" | "experimental";
2021
+ costMode: "lite" | "normal" | "max" | "experimental";
2022
2022
  agentState: {
2023
2023
  agentContext: string;
2024
2024
  fileContext: {
@@ -2065,8 +2065,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2065
2065
  type: "ephemeral";
2066
2066
  } | undefined;
2067
2067
  } | {
2068
- content: string;
2069
2068
  type: "tool_result";
2069
+ content: string;
2070
2070
  tool_use_id: string;
2071
2071
  cache_control?: {
2072
2072
  type: "ephemeral";
@@ -2101,6 +2101,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2101
2101
  requestId?: string | undefined;
2102
2102
  } | {
2103
2103
  type: "init";
2104
+ fingerprintId: string;
2104
2105
  fileContext: {
2105
2106
  currentWorkingDirectory: string;
2106
2107
  fileTree: import("../util/file").FileTreeNode[];
@@ -2129,7 +2130,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2129
2130
  content: string;
2130
2131
  }[][] | undefined;
2131
2132
  };
2132
- fingerprintId: string;
2133
2133
  authToken?: string | undefined;
2134
2134
  } | {
2135
2135
  type: "generate-commit-message";
@@ -2190,8 +2190,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2190
2190
  type: "ephemeral";
2191
2191
  } | undefined;
2192
2192
  } | {
2193
- content: string;
2194
2193
  type: "tool_result";
2194
+ content: string;
2195
2195
  tool_use_id: string;
2196
2196
  cache_control?: {
2197
2197
  type: "ephemeral";
@@ -2218,7 +2218,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2218
2218
  }[];
2219
2219
  prompt?: string | undefined;
2220
2220
  authToken?: string | undefined;
2221
- costMode?: "max" | "lite" | "normal" | "experimental" | undefined;
2221
+ costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
2222
2222
  model?: string | undefined;
2223
2223
  cwd?: string | undefined;
2224
2224
  } | {
@@ -2227,6 +2227,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2227
2227
  requestId?: string | undefined;
2228
2228
  } | {
2229
2229
  type: "init";
2230
+ fingerprintId: string;
2230
2231
  fileContext: {
2231
2232
  currentWorkingDirectory: string;
2232
2233
  fileTree: import("../util/file").FileTreeNode[];
@@ -2255,7 +2256,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2255
2256
  content: string;
2256
2257
  }[][] | undefined;
2257
2258
  };
2258
- fingerprintId: string;
2259
2259
  authToken?: string | undefined;
2260
2260
  } | {
2261
2261
  type: "generate-commit-message";
@@ -2307,26 +2307,26 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2307
2307
  path: z.ZodString;
2308
2308
  content: z.ZodString;
2309
2309
  }, "strip", z.ZodTypeAny, {
2310
+ type: "patch" | "file";
2310
2311
  path: string;
2311
2312
  content: string;
2312
- type: "file" | "patch";
2313
2313
  }, {
2314
+ type: "patch" | "file";
2314
2315
  path: string;
2315
2316
  content: string;
2316
- type: "file" | "patch";
2317
2317
  }>, "many">;
2318
2318
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
2319
2319
  type: z.ZodEnum<["patch", "file"]>;
2320
2320
  path: z.ZodString;
2321
2321
  content: z.ZodString;
2322
2322
  }, "strip", z.ZodTypeAny, {
2323
+ type: "patch" | "file";
2323
2324
  path: string;
2324
2325
  content: string;
2325
- type: "file" | "patch";
2326
2326
  }, {
2327
+ type: "patch" | "file";
2327
2328
  path: string;
2328
2329
  content: string;
2329
- type: "file" | "patch";
2330
2330
  }>, "many">;
2331
2331
  addedFileVersions: z.ZodArray<z.ZodObject<{
2332
2332
  path: z.ZodString;
@@ -2350,14 +2350,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2350
2350
  userInputId: string;
2351
2351
  response: string;
2352
2352
  changes: {
2353
+ type: "patch" | "file";
2353
2354
  path: string;
2354
2355
  content: string;
2355
- type: "file" | "patch";
2356
2356
  }[];
2357
2357
  changesAlreadyApplied: {
2358
+ type: "patch" | "file";
2358
2359
  path: string;
2359
2360
  content: string;
2360
- type: "file" | "patch";
2361
2361
  }[];
2362
2362
  addedFileVersions: {
2363
2363
  path: string;
@@ -2374,14 +2374,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2374
2374
  userInputId: string;
2375
2375
  response: string;
2376
2376
  changes: {
2377
+ type: "patch" | "file";
2377
2378
  path: string;
2378
2379
  content: string;
2379
- type: "file" | "patch";
2380
2380
  }[];
2381
2381
  changesAlreadyApplied: {
2382
+ type: "patch" | "file";
2382
2383
  path: string;
2383
2384
  content: string;
2384
- type: "file" | "patch";
2385
2385
  }[];
2386
2386
  addedFileVersions: {
2387
2387
  path: string;
@@ -2574,15 +2574,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2574
2574
  type: "ephemeral";
2575
2575
  }>>;
2576
2576
  }, "strip", z.ZodTypeAny, {
2577
- content: string;
2578
2577
  type: "tool_result";
2578
+ content: string;
2579
2579
  tool_use_id: string;
2580
2580
  cache_control?: {
2581
2581
  type: "ephemeral";
2582
2582
  } | undefined;
2583
2583
  }, {
2584
- content: string;
2585
2584
  type: "tool_result";
2585
+ content: string;
2586
2586
  tool_use_id: string;
2587
2587
  cache_control?: {
2588
2588
  type: "ephemeral";
@@ -2646,8 +2646,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2646
2646
  type: "ephemeral";
2647
2647
  } | undefined;
2648
2648
  } | {
2649
- content: string;
2650
2649
  type: "tool_result";
2650
+ content: string;
2651
2651
  tool_use_id: string;
2652
2652
  cache_control?: {
2653
2653
  type: "ephemeral";
@@ -2680,8 +2680,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2680
2680
  type: "ephemeral";
2681
2681
  } | undefined;
2682
2682
  } | {
2683
- content: string;
2684
2683
  type: "tool_result";
2684
+ content: string;
2685
2685
  tool_use_id: string;
2686
2686
  cache_control?: {
2687
2687
  type: "ephemeral";
@@ -2746,8 +2746,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2746
2746
  type: "ephemeral";
2747
2747
  } | undefined;
2748
2748
  } | {
2749
- content: string;
2750
2749
  type: "tool_result";
2750
+ content: string;
2751
2751
  tool_use_id: string;
2752
2752
  cache_control?: {
2753
2753
  type: "ephemeral";
@@ -2812,8 +2812,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2812
2812
  type: "ephemeral";
2813
2813
  } | undefined;
2814
2814
  } | {
2815
- content: string;
2816
2815
  type: "tool_result";
2816
+ content: string;
2817
2817
  tool_use_id: string;
2818
2818
  cache_control?: {
2819
2819
  type: "ephemeral";
@@ -2839,12 +2839,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2839
2839
  id: z.ZodString;
2840
2840
  }, "strip", z.ZodTypeAny, {
2841
2841
  name: string;
2842
- parameters: Record<string, string>;
2843
2842
  id: string;
2843
+ parameters: Record<string, string>;
2844
2844
  }, {
2845
2845
  name: string;
2846
- parameters: Record<string, string>;
2847
2846
  id: string;
2847
+ parameters: Record<string, string>;
2848
2848
  }>, "many">;
2849
2849
  toolResults: z.ZodArray<z.ZodObject<{
2850
2850
  name: z.ZodString;
@@ -2908,8 +2908,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2908
2908
  type: "ephemeral";
2909
2909
  } | undefined;
2910
2910
  } | {
2911
- content: string;
2912
2911
  type: "tool_result";
2912
+ content: string;
2913
2913
  tool_use_id: string;
2914
2914
  cache_control?: {
2915
2915
  type: "ephemeral";
@@ -2936,8 +2936,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2936
2936
  }[];
2937
2937
  toolCalls: {
2938
2938
  name: string;
2939
- parameters: Record<string, string>;
2940
2939
  id: string;
2940
+ parameters: Record<string, string>;
2941
2941
  }[];
2942
2942
  }, {
2943
2943
  type: "prompt-response";
@@ -2988,8 +2988,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2988
2988
  type: "ephemeral";
2989
2989
  } | undefined;
2990
2990
  } | {
2991
- content: string;
2992
2991
  type: "tool_result";
2992
+ content: string;
2993
2993
  tool_use_id: string;
2994
2994
  cache_control?: {
2995
2995
  type: "ephemeral";
@@ -3016,8 +3016,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3016
3016
  }[];
3017
3017
  toolCalls: {
3018
3018
  name: string;
3019
- parameters: Record<string, string>;
3020
3019
  id: string;
3020
+ parameters: Record<string, string>;
3021
3021
  }[];
3022
3022
  }>, z.ZodObject<{
3023
3023
  type: z.ZodLiteral<"read-files">;
@@ -3053,26 +3053,26 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3053
3053
  path: z.ZodString;
3054
3054
  content: z.ZodString;
3055
3055
  }, "strip", z.ZodTypeAny, {
3056
+ type: "patch" | "file";
3056
3057
  path: string;
3057
3058
  content: string;
3058
- type: "file" | "patch";
3059
3059
  }, {
3060
+ type: "patch" | "file";
3060
3061
  path: string;
3061
3062
  content: string;
3062
- type: "file" | "patch";
3063
3063
  }>, "many">;
3064
3064
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
3065
3065
  type: z.ZodEnum<["patch", "file"]>;
3066
3066
  path: z.ZodString;
3067
3067
  content: z.ZodString;
3068
3068
  }, "strip", z.ZodTypeAny, {
3069
+ type: "patch" | "file";
3069
3070
  path: string;
3070
3071
  content: string;
3071
- type: "file" | "patch";
3072
3072
  }, {
3073
+ type: "patch" | "file";
3073
3074
  path: string;
3074
3075
  content: string;
3075
- type: "file" | "patch";
3076
3076
  }>, "many">;
3077
3077
  addedFileVersions: z.ZodArray<z.ZodObject<{
3078
3078
  path: z.ZodString;
@@ -3095,14 +3095,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3095
3095
  userInputId: string;
3096
3096
  response: string;
3097
3097
  changes: {
3098
+ type: "patch" | "file";
3098
3099
  path: string;
3099
3100
  content: string;
3100
- type: "file" | "patch";
3101
3101
  }[];
3102
3102
  changesAlreadyApplied: {
3103
+ type: "patch" | "file";
3103
3104
  path: string;
3104
3105
  content: string;
3105
- type: "file" | "patch";
3106
3106
  }[];
3107
3107
  addedFileVersions: {
3108
3108
  path: string;
@@ -3119,14 +3119,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3119
3119
  userInputId: string;
3120
3120
  response: string;
3121
3121
  changes: {
3122
+ type: "patch" | "file";
3122
3123
  path: string;
3123
3124
  content: string;
3124
- type: "file" | "patch";
3125
3125
  }[];
3126
3126
  changesAlreadyApplied: {
3127
+ type: "patch" | "file";
3127
3128
  path: string;
3128
3129
  content: string;
3129
- type: "file" | "patch";
3130
3130
  }[];
3131
3131
  addedFileVersions: {
3132
3132
  path: string;
@@ -3219,13 +3219,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3219
3219
  error: z.ZodOptional<z.ZodString>;
3220
3220
  remainingBalance: z.ZodOptional<z.ZodNumber>;
3221
3221
  }, "strip", z.ZodTypeAny, {
3222
- message: string;
3223
3222
  type: "action-error";
3223
+ message: string;
3224
3224
  remainingBalance?: number | undefined;
3225
3225
  error?: string | undefined;
3226
3226
  }, {
3227
- message: string;
3228
3227
  type: "action-error";
3228
+ message: string;
3229
3229
  remainingBalance?: number | undefined;
3230
3230
  error?: string | undefined;
3231
3231
  }>, z.ZodObject<{
@@ -3265,14 +3265,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3265
3265
  userInputId: string;
3266
3266
  response: string;
3267
3267
  changes: {
3268
+ type: "patch" | "file";
3268
3269
  path: string;
3269
3270
  content: string;
3270
- type: "file" | "patch";
3271
3271
  }[];
3272
3272
  changesAlreadyApplied: {
3273
+ type: "patch" | "file";
3273
3274
  path: string;
3274
3275
  content: string;
3275
- type: "file" | "patch";
3276
3276
  }[];
3277
3277
  addedFileVersions: {
3278
3278
  path: string;
@@ -3337,8 +3337,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3337
3337
  type: "ephemeral";
3338
3338
  } | undefined;
3339
3339
  } | {
3340
- content: string;
3341
3340
  type: "tool_result";
3341
+ content: string;
3342
3342
  tool_use_id: string;
3343
3343
  cache_control?: {
3344
3344
  type: "ephemeral";
@@ -3365,8 +3365,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3365
3365
  }[];
3366
3366
  toolCalls: {
3367
3367
  name: string;
3368
- parameters: Record<string, string>;
3369
3368
  id: string;
3369
+ parameters: Record<string, string>;
3370
3370
  }[];
3371
3371
  } | {
3372
3372
  type: "response-chunk";
@@ -3386,14 +3386,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3386
3386
  userInputId: string;
3387
3387
  response: string;
3388
3388
  changes: {
3389
+ type: "patch" | "file";
3389
3390
  path: string;
3390
3391
  content: string;
3391
- type: "file" | "patch";
3392
3392
  }[];
3393
3393
  changesAlreadyApplied: {
3394
+ type: "patch" | "file";
3394
3395
  path: string;
3395
3396
  content: string;
3396
- type: "file" | "patch";
3397
3397
  }[];
3398
3398
  addedFileVersions: {
3399
3399
  path: string;
@@ -3409,8 +3409,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3409
3409
  isUpToDate: boolean;
3410
3410
  latestVersion: string;
3411
3411
  } | {
3412
- message: string;
3413
3412
  type: "action-error";
3413
+ message: string;
3414
3414
  remainingBalance?: number | undefined;
3415
3415
  error?: string | undefined;
3416
3416
  } | {
@@ -3440,14 +3440,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3440
3440
  userInputId: string;
3441
3441
  response: string;
3442
3442
  changes: {
3443
+ type: "patch" | "file";
3443
3444
  path: string;
3444
3445
  content: string;
3445
- type: "file" | "patch";
3446
3446
  }[];
3447
3447
  changesAlreadyApplied: {
3448
+ type: "patch" | "file";
3448
3449
  path: string;
3449
3450
  content: string;
3450
- type: "file" | "patch";
3451
3451
  }[];
3452
3452
  addedFileVersions: {
3453
3453
  path: string;
@@ -3512,8 +3512,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3512
3512
  type: "ephemeral";
3513
3513
  } | undefined;
3514
3514
  } | {
3515
- content: string;
3516
3515
  type: "tool_result";
3516
+ content: string;
3517
3517
  tool_use_id: string;
3518
3518
  cache_control?: {
3519
3519
  type: "ephemeral";
@@ -3540,8 +3540,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3540
3540
  }[];
3541
3541
  toolCalls: {
3542
3542
  name: string;
3543
- parameters: Record<string, string>;
3544
3543
  id: string;
3544
+ parameters: Record<string, string>;
3545
3545
  }[];
3546
3546
  } | {
3547
3547
  type: "response-chunk";
@@ -3561,14 +3561,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3561
3561
  userInputId: string;
3562
3562
  response: string;
3563
3563
  changes: {
3564
+ type: "patch" | "file";
3564
3565
  path: string;
3565
3566
  content: string;
3566
- type: "file" | "patch";
3567
3567
  }[];
3568
3568
  changesAlreadyApplied: {
3569
+ type: "patch" | "file";
3569
3570
  path: string;
3570
3571
  content: string;
3571
- type: "file" | "patch";
3572
3572
  }[];
3573
3573
  addedFileVersions: {
3574
3574
  path: string;
@@ -3584,8 +3584,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3584
3584
  isUpToDate: boolean;
3585
3585
  latestVersion: string;
3586
3586
  } | {
3587
- message: string;
3588
3587
  type: "action-error";
3588
+ message: string;
3589
3589
  remainingBalance?: number | undefined;
3590
3590
  error?: string | undefined;
3591
3591
  } | {
@@ -3634,26 +3634,26 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3634
3634
  path: z.ZodString;
3635
3635
  content: z.ZodString;
3636
3636
  }, "strip", z.ZodTypeAny, {
3637
+ type: "patch" | "file";
3637
3638
  path: string;
3638
3639
  content: string;
3639
- type: "file" | "patch";
3640
3640
  }, {
3641
+ type: "patch" | "file";
3641
3642
  path: string;
3642
3643
  content: string;
3643
- type: "file" | "patch";
3644
3644
  }>, "many">;
3645
3645
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
3646
3646
  type: z.ZodEnum<["patch", "file"]>;
3647
3647
  path: z.ZodString;
3648
3648
  content: z.ZodString;
3649
3649
  }, "strip", z.ZodTypeAny, {
3650
+ type: "patch" | "file";
3650
3651
  path: string;
3651
3652
  content: string;
3652
- type: "file" | "patch";
3653
3653
  }, {
3654
+ type: "patch" | "file";
3654
3655
  path: string;
3655
3656
  content: string;
3656
- type: "file" | "patch";
3657
3657
  }>, "many">;
3658
3658
  addedFileVersions: z.ZodArray<z.ZodObject<{
3659
3659
  path: z.ZodString;
@@ -3677,14 +3677,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3677
3677
  userInputId: string;
3678
3678
  response: string;
3679
3679
  changes: {
3680
+ type: "patch" | "file";
3680
3681
  path: string;
3681
3682
  content: string;
3682
- type: "file" | "patch";
3683
3683
  }[];
3684
3684
  changesAlreadyApplied: {
3685
+ type: "patch" | "file";
3685
3686
  path: string;
3686
3687
  content: string;
3687
- type: "file" | "patch";
3688
3688
  }[];
3689
3689
  addedFileVersions: {
3690
3690
  path: string;
@@ -3701,14 +3701,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3701
3701
  userInputId: string;
3702
3702
  response: string;
3703
3703
  changes: {
3704
+ type: "patch" | "file";
3704
3705
  path: string;
3705
3706
  content: string;
3706
- type: "file" | "patch";
3707
3707
  }[];
3708
3708
  changesAlreadyApplied: {
3709
+ type: "patch" | "file";
3709
3710
  path: string;
3710
3711
  content: string;
3711
- type: "file" | "patch";
3712
3712
  }[];
3713
3713
  addedFileVersions: {
3714
3714
  path: string;
@@ -3901,15 +3901,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3901
3901
  type: "ephemeral";
3902
3902
  }>>;
3903
3903
  }, "strip", z.ZodTypeAny, {
3904
- content: string;
3905
3904
  type: "tool_result";
3905
+ content: string;
3906
3906
  tool_use_id: string;
3907
3907
  cache_control?: {
3908
3908
  type: "ephemeral";
3909
3909
  } | undefined;
3910
3910
  }, {
3911
- content: string;
3912
3911
  type: "tool_result";
3912
+ content: string;
3913
3913
  tool_use_id: string;
3914
3914
  cache_control?: {
3915
3915
  type: "ephemeral";
@@ -3973,8 +3973,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3973
3973
  type: "ephemeral";
3974
3974
  } | undefined;
3975
3975
  } | {
3976
- content: string;
3977
3976
  type: "tool_result";
3977
+ content: string;
3978
3978
  tool_use_id: string;
3979
3979
  cache_control?: {
3980
3980
  type: "ephemeral";
@@ -4007,8 +4007,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4007
4007
  type: "ephemeral";
4008
4008
  } | undefined;
4009
4009
  } | {
4010
- content: string;
4011
4010
  type: "tool_result";
4011
+ content: string;
4012
4012
  tool_use_id: string;
4013
4013
  cache_control?: {
4014
4014
  type: "ephemeral";
@@ -4073,8 +4073,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4073
4073
  type: "ephemeral";
4074
4074
  } | undefined;
4075
4075
  } | {
4076
- content: string;
4077
4076
  type: "tool_result";
4077
+ content: string;
4078
4078
  tool_use_id: string;
4079
4079
  cache_control?: {
4080
4080
  type: "ephemeral";
@@ -4139,8 +4139,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4139
4139
  type: "ephemeral";
4140
4140
  } | undefined;
4141
4141
  } | {
4142
- content: string;
4143
4142
  type: "tool_result";
4143
+ content: string;
4144
4144
  tool_use_id: string;
4145
4145
  cache_control?: {
4146
4146
  type: "ephemeral";
@@ -4166,12 +4166,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4166
4166
  id: z.ZodString;
4167
4167
  }, "strip", z.ZodTypeAny, {
4168
4168
  name: string;
4169
- parameters: Record<string, string>;
4170
4169
  id: string;
4170
+ parameters: Record<string, string>;
4171
4171
  }, {
4172
4172
  name: string;
4173
- parameters: Record<string, string>;
4174
4173
  id: string;
4174
+ parameters: Record<string, string>;
4175
4175
  }>, "many">;
4176
4176
  toolResults: z.ZodArray<z.ZodObject<{
4177
4177
  name: z.ZodString;
@@ -4235,8 +4235,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4235
4235
  type: "ephemeral";
4236
4236
  } | undefined;
4237
4237
  } | {
4238
- content: string;
4239
4238
  type: "tool_result";
4239
+ content: string;
4240
4240
  tool_use_id: string;
4241
4241
  cache_control?: {
4242
4242
  type: "ephemeral";
@@ -4263,8 +4263,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4263
4263
  }[];
4264
4264
  toolCalls: {
4265
4265
  name: string;
4266
- parameters: Record<string, string>;
4267
4266
  id: string;
4267
+ parameters: Record<string, string>;
4268
4268
  }[];
4269
4269
  }, {
4270
4270
  type: "prompt-response";
@@ -4315,8 +4315,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4315
4315
  type: "ephemeral";
4316
4316
  } | undefined;
4317
4317
  } | {
4318
- content: string;
4319
4318
  type: "tool_result";
4319
+ content: string;
4320
4320
  tool_use_id: string;
4321
4321
  cache_control?: {
4322
4322
  type: "ephemeral";
@@ -4343,8 +4343,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4343
4343
  }[];
4344
4344
  toolCalls: {
4345
4345
  name: string;
4346
- parameters: Record<string, string>;
4347
4346
  id: string;
4347
+ parameters: Record<string, string>;
4348
4348
  }[];
4349
4349
  }>, z.ZodObject<{
4350
4350
  type: z.ZodLiteral<"read-files">;
@@ -4380,26 +4380,26 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4380
4380
  path: z.ZodString;
4381
4381
  content: z.ZodString;
4382
4382
  }, "strip", z.ZodTypeAny, {
4383
+ type: "patch" | "file";
4383
4384
  path: string;
4384
4385
  content: string;
4385
- type: "file" | "patch";
4386
4386
  }, {
4387
+ type: "patch" | "file";
4387
4388
  path: string;
4388
4389
  content: string;
4389
- type: "file" | "patch";
4390
4390
  }>, "many">;
4391
4391
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
4392
4392
  type: z.ZodEnum<["patch", "file"]>;
4393
4393
  path: z.ZodString;
4394
4394
  content: z.ZodString;
4395
4395
  }, "strip", z.ZodTypeAny, {
4396
+ type: "patch" | "file";
4396
4397
  path: string;
4397
4398
  content: string;
4398
- type: "file" | "patch";
4399
4399
  }, {
4400
+ type: "patch" | "file";
4400
4401
  path: string;
4401
4402
  content: string;
4402
- type: "file" | "patch";
4403
4403
  }>, "many">;
4404
4404
  addedFileVersions: z.ZodArray<z.ZodObject<{
4405
4405
  path: z.ZodString;
@@ -4422,14 +4422,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4422
4422
  userInputId: string;
4423
4423
  response: string;
4424
4424
  changes: {
4425
+ type: "patch" | "file";
4425
4426
  path: string;
4426
4427
  content: string;
4427
- type: "file" | "patch";
4428
4428
  }[];
4429
4429
  changesAlreadyApplied: {
4430
+ type: "patch" | "file";
4430
4431
  path: string;
4431
4432
  content: string;
4432
- type: "file" | "patch";
4433
4433
  }[];
4434
4434
  addedFileVersions: {
4435
4435
  path: string;
@@ -4446,14 +4446,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4446
4446
  userInputId: string;
4447
4447
  response: string;
4448
4448
  changes: {
4449
+ type: "patch" | "file";
4449
4450
  path: string;
4450
4451
  content: string;
4451
- type: "file" | "patch";
4452
4452
  }[];
4453
4453
  changesAlreadyApplied: {
4454
+ type: "patch" | "file";
4454
4455
  path: string;
4455
4456
  content: string;
4456
- type: "file" | "patch";
4457
4457
  }[];
4458
4458
  addedFileVersions: {
4459
4459
  path: string;
@@ -4546,13 +4546,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4546
4546
  error: z.ZodOptional<z.ZodString>;
4547
4547
  remainingBalance: z.ZodOptional<z.ZodNumber>;
4548
4548
  }, "strip", z.ZodTypeAny, {
4549
- message: string;
4550
4549
  type: "action-error";
4550
+ message: string;
4551
4551
  remainingBalance?: number | undefined;
4552
4552
  error?: string | undefined;
4553
4553
  }, {
4554
- message: string;
4555
4554
  type: "action-error";
4555
+ message: string;
4556
4556
  remainingBalance?: number | undefined;
4557
4557
  error?: string | undefined;
4558
4558
  }>, z.ZodObject<{
@@ -4592,14 +4592,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4592
4592
  userInputId: string;
4593
4593
  response: string;
4594
4594
  changes: {
4595
+ type: "patch" | "file";
4595
4596
  path: string;
4596
4597
  content: string;
4597
- type: "file" | "patch";
4598
4598
  }[];
4599
4599
  changesAlreadyApplied: {
4600
+ type: "patch" | "file";
4600
4601
  path: string;
4601
4602
  content: string;
4602
- type: "file" | "patch";
4603
4603
  }[];
4604
4604
  addedFileVersions: {
4605
4605
  path: string;
@@ -4664,8 +4664,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4664
4664
  type: "ephemeral";
4665
4665
  } | undefined;
4666
4666
  } | {
4667
- content: string;
4668
4667
  type: "tool_result";
4668
+ content: string;
4669
4669
  tool_use_id: string;
4670
4670
  cache_control?: {
4671
4671
  type: "ephemeral";
@@ -4692,8 +4692,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4692
4692
  }[];
4693
4693
  toolCalls: {
4694
4694
  name: string;
4695
- parameters: Record<string, string>;
4696
4695
  id: string;
4696
+ parameters: Record<string, string>;
4697
4697
  }[];
4698
4698
  } | {
4699
4699
  type: "response-chunk";
@@ -4713,14 +4713,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4713
4713
  userInputId: string;
4714
4714
  response: string;
4715
4715
  changes: {
4716
+ type: "patch" | "file";
4716
4717
  path: string;
4717
4718
  content: string;
4718
- type: "file" | "patch";
4719
4719
  }[];
4720
4720
  changesAlreadyApplied: {
4721
+ type: "patch" | "file";
4721
4722
  path: string;
4722
4723
  content: string;
4723
- type: "file" | "patch";
4724
4724
  }[];
4725
4725
  addedFileVersions: {
4726
4726
  path: string;
@@ -4736,8 +4736,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4736
4736
  isUpToDate: boolean;
4737
4737
  latestVersion: string;
4738
4738
  } | {
4739
- message: string;
4740
4739
  type: "action-error";
4740
+ message: string;
4741
4741
  remainingBalance?: number | undefined;
4742
4742
  error?: string | undefined;
4743
4743
  } | {
@@ -4767,14 +4767,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4767
4767
  userInputId: string;
4768
4768
  response: string;
4769
4769
  changes: {
4770
+ type: "patch" | "file";
4770
4771
  path: string;
4771
4772
  content: string;
4772
- type: "file" | "patch";
4773
4773
  }[];
4774
4774
  changesAlreadyApplied: {
4775
+ type: "patch" | "file";
4775
4776
  path: string;
4776
4777
  content: string;
4777
- type: "file" | "patch";
4778
4778
  }[];
4779
4779
  addedFileVersions: {
4780
4780
  path: string;
@@ -4839,8 +4839,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4839
4839
  type: "ephemeral";
4840
4840
  } | undefined;
4841
4841
  } | {
4842
- content: string;
4843
4842
  type: "tool_result";
4843
+ content: string;
4844
4844
  tool_use_id: string;
4845
4845
  cache_control?: {
4846
4846
  type: "ephemeral";
@@ -4867,8 +4867,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4867
4867
  }[];
4868
4868
  toolCalls: {
4869
4869
  name: string;
4870
- parameters: Record<string, string>;
4871
4870
  id: string;
4871
+ parameters: Record<string, string>;
4872
4872
  }[];
4873
4873
  } | {
4874
4874
  type: "response-chunk";
@@ -4888,14 +4888,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4888
4888
  userInputId: string;
4889
4889
  response: string;
4890
4890
  changes: {
4891
+ type: "patch" | "file";
4891
4892
  path: string;
4892
4893
  content: string;
4893
- type: "file" | "patch";
4894
4894
  }[];
4895
4895
  changesAlreadyApplied: {
4896
+ type: "patch" | "file";
4896
4897
  path: string;
4897
4898
  content: string;
4898
- type: "file" | "patch";
4899
4899
  }[];
4900
4900
  addedFileVersions: {
4901
4901
  path: string;
@@ -4911,8 +4911,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4911
4911
  isUpToDate: boolean;
4912
4912
  latestVersion: string;
4913
4913
  } | {
4914
- message: string;
4915
4914
  type: "action-error";
4915
+ message: string;
4916
4916
  remainingBalance?: number | undefined;
4917
4917
  error?: string | undefined;
4918
4918
  } | {