codecane 1.0.203 → 1.0.205

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 (49) hide show
  1. package/dist/checkpoints/checkpoint-manager.d.ts +1 -1
  2. package/dist/checkpoints/checkpoint-manager.js +6 -6
  3. package/dist/checkpoints/checkpoint-manager.js.map +1 -1
  4. package/dist/checkpoints/file-manager.d.ts +41 -10
  5. package/dist/checkpoints/file-manager.js +127 -58
  6. package/dist/checkpoints/file-manager.js.map +1 -1
  7. package/dist/cli.d.ts +5 -1
  8. package/dist/cli.js +65 -29
  9. package/dist/cli.js.map +1 -1
  10. package/dist/client.d.ts +94 -5
  11. package/dist/client.js +29 -45
  12. package/dist/client.js.map +1 -1
  13. package/dist/code-map/languages.d.ts +1 -0
  14. package/dist/code-map/languages.js +224 -23
  15. package/dist/code-map/languages.js.map +1 -1
  16. package/dist/code-map/parse.js +0 -1
  17. package/dist/code-map/parse.js.map +1 -1
  18. package/dist/code-map/tsconfig.tsbuildinfo +1 -1
  19. package/dist/common/actions.d.ts +68 -88
  20. package/dist/common/actions.js +0 -1
  21. package/dist/common/actions.js.map +1 -1
  22. package/dist/common/browser-actions.d.ts +44 -44
  23. package/dist/common/types/agent-state.d.ts +28 -28
  24. package/dist/common/types/message.d.ts +8 -8
  25. package/dist/common/util/saxy.js +1 -1
  26. package/dist/common/util/saxy.js.map +1 -1
  27. package/dist/common/util/string.d.ts +4 -0
  28. package/dist/common/util/string.js +8 -1
  29. package/dist/common/util/string.js.map +1 -1
  30. package/dist/common/websockets/websocket-schema.d.ts +132 -164
  31. package/dist/menu.js +1 -1
  32. package/dist/menu.js.map +1 -1
  33. package/dist/project-files.js +2 -0
  34. package/dist/project-files.js.map +1 -1
  35. package/dist/utils/logger.d.ts +2 -0
  36. package/dist/utils/logger.js +33 -0
  37. package/dist/utils/logger.js.map +1 -0
  38. package/dist/utils/terminal.js +1 -1
  39. package/dist/utils/terminal.js.map +1 -1
  40. package/package.json +31 -13
  41. package/dist/common/advanced-analyzer.d.ts +0 -19
  42. package/dist/common/advanced-analyzer.js +0 -140
  43. package/dist/common/advanced-analyzer.js.map +0 -1
  44. package/dist/common/message-image-handling.d.ts +0 -41
  45. package/dist/common/message-image-handling.js +0 -57
  46. package/dist/common/message-image-handling.js.map +0 -1
  47. package/dist/common/util/process-stream.d.ts +0 -8
  48. package/dist/common/util/process-stream.js +0 -102
  49. package/dist/common/util/process-stream.js.map +0 -1
@@ -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";
@@ -193,8 +193,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
193
193
  type: "ephemeral";
194
194
  } | undefined;
195
195
  } | {
196
- type: "tool_result";
197
196
  content: string;
197
+ type: "tool_result";
198
198
  tool_use_id: string;
199
199
  cache_control?: {
200
200
  type: "ephemeral";
@@ -227,8 +227,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
227
227
  type: "ephemeral";
228
228
  } | undefined;
229
229
  } | {
230
- type: "tool_result";
231
230
  content: string;
231
+ type: "tool_result";
232
232
  tool_use_id: string;
233
233
  cache_control?: {
234
234
  type: "ephemeral";
@@ -360,13 +360,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
360
360
  path: z.ZodString;
361
361
  content: z.ZodString;
362
362
  }, "strip", z.ZodTypeAny, {
363
- type: "patch" | "file";
364
363
  path: string;
365
364
  content: string;
365
+ type: "file" | "patch";
366
366
  }, {
367
- type: "patch" | "file";
368
367
  path: string;
369
368
  content: string;
369
+ type: "file" | "patch";
370
370
  }>, "many">;
371
371
  costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
372
372
  }, "strip", z.ZodTypeAny, {
@@ -389,8 +389,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
389
389
  type: "ephemeral";
390
390
  } | undefined;
391
391
  } | {
392
- type: "tool_result";
393
392
  content: string;
393
+ type: "tool_result";
394
394
  tool_use_id: string;
395
395
  cache_control?: {
396
396
  type: "ephemeral";
@@ -436,9 +436,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
436
436
  userKnowledgeFiles?: Record<string, string> | undefined;
437
437
  };
438
438
  changesAlreadyApplied: {
439
- type: "patch" | "file";
440
439
  path: string;
441
440
  content: string;
441
+ type: "file" | "patch";
442
442
  }[];
443
443
  costMode: "max" | "lite" | "normal";
444
444
  authToken?: string | undefined;
@@ -462,8 +462,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
462
462
  type: "ephemeral";
463
463
  } | undefined;
464
464
  } | {
465
- type: "tool_result";
466
465
  content: string;
466
+ type: "tool_result";
467
467
  tool_use_id: string;
468
468
  cache_control?: {
469
469
  type: "ephemeral";
@@ -509,9 +509,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
509
509
  userKnowledgeFiles?: Record<string, string> | undefined;
510
510
  };
511
511
  changesAlreadyApplied: {
512
- type: "patch" | "file";
513
512
  path: string;
514
513
  content: string;
514
+ type: "file" | "patch";
515
515
  }[];
516
516
  authToken?: string | undefined;
517
517
  costMode?: "max" | "lite" | "normal" | undefined;
@@ -697,15 +697,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
697
697
  type: "ephemeral";
698
698
  }>>;
699
699
  }, "strip", z.ZodTypeAny, {
700
- type: "tool_result";
701
700
  content: string;
701
+ type: "tool_result";
702
702
  tool_use_id: string;
703
703
  cache_control?: {
704
704
  type: "ephemeral";
705
705
  } | undefined;
706
706
  }, {
707
- type: "tool_result";
708
707
  content: string;
708
+ type: "tool_result";
709
709
  tool_use_id: string;
710
710
  cache_control?: {
711
711
  type: "ephemeral";
@@ -769,8 +769,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
769
769
  type: "ephemeral";
770
770
  } | undefined;
771
771
  } | {
772
- type: "tool_result";
773
772
  content: string;
773
+ type: "tool_result";
774
774
  tool_use_id: string;
775
775
  cache_control?: {
776
776
  type: "ephemeral";
@@ -803,8 +803,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
803
803
  type: "ephemeral";
804
804
  } | undefined;
805
805
  } | {
806
- type: "tool_result";
807
806
  content: string;
807
+ type: "tool_result";
808
808
  tool_use_id: string;
809
809
  cache_control?: {
810
810
  type: "ephemeral";
@@ -867,8 +867,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
867
867
  type: "ephemeral";
868
868
  } | undefined;
869
869
  } | {
870
- type: "tool_result";
871
870
  content: string;
871
+ type: "tool_result";
872
872
  tool_use_id: string;
873
873
  cache_control?: {
874
874
  type: "ephemeral";
@@ -931,8 +931,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
931
931
  type: "ephemeral";
932
932
  } | undefined;
933
933
  } | {
934
- type: "tool_result";
935
934
  content: string;
935
+ type: "tool_result";
936
936
  tool_use_id: string;
937
937
  cache_control?: {
938
938
  type: "ephemeral";
@@ -1014,8 +1014,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1014
1014
  type: "ephemeral";
1015
1015
  } | undefined;
1016
1016
  } | {
1017
- type: "tool_result";
1018
1017
  content: string;
1018
+ type: "tool_result";
1019
1019
  tool_use_id: string;
1020
1020
  cache_control?: {
1021
1021
  type: "ephemeral";
@@ -1090,8 +1090,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1090
1090
  type: "ephemeral";
1091
1091
  } | undefined;
1092
1092
  } | {
1093
- type: "tool_result";
1094
1093
  content: string;
1094
+ type: "tool_result";
1095
1095
  tool_use_id: string;
1096
1096
  cache_control?: {
1097
1097
  type: "ephemeral";
@@ -1355,8 +1355,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1355
1355
  type: "ephemeral";
1356
1356
  } | undefined;
1357
1357
  } | {
1358
- type: "tool_result";
1359
1358
  content: string;
1359
+ type: "tool_result";
1360
1360
  tool_use_id: string;
1361
1361
  cache_control?: {
1362
1362
  type: "ephemeral";
@@ -1402,9 +1402,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1402
1402
  userKnowledgeFiles?: Record<string, string> | undefined;
1403
1403
  };
1404
1404
  changesAlreadyApplied: {
1405
- type: "patch" | "file";
1406
1405
  path: string;
1407
1406
  content: string;
1407
+ type: "file" | "patch";
1408
1408
  }[];
1409
1409
  costMode: "max" | "lite" | "normal";
1410
1410
  authToken?: string | undefined;
@@ -1458,8 +1458,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1458
1458
  type: "ephemeral";
1459
1459
  } | undefined;
1460
1460
  } | {
1461
- type: "tool_result";
1462
1461
  content: string;
1462
+ type: "tool_result";
1463
1463
  tool_use_id: string;
1464
1464
  cache_control?: {
1465
1465
  type: "ephemeral";
@@ -1553,8 +1553,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1553
1553
  type: "ephemeral";
1554
1554
  } | undefined;
1555
1555
  } | {
1556
- type: "tool_result";
1557
1556
  content: string;
1557
+ type: "tool_result";
1558
1558
  tool_use_id: string;
1559
1559
  cache_control?: {
1560
1560
  type: "ephemeral";
@@ -1600,9 +1600,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1600
1600
  userKnowledgeFiles?: Record<string, string> | undefined;
1601
1601
  };
1602
1602
  changesAlreadyApplied: {
1603
- type: "patch" | "file";
1604
1603
  path: string;
1605
1604
  content: string;
1605
+ type: "file" | "patch";
1606
1606
  }[];
1607
1607
  authToken?: string | undefined;
1608
1608
  costMode?: "max" | "lite" | "normal" | undefined;
@@ -1655,8 +1655,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1655
1655
  type: "ephemeral";
1656
1656
  } | undefined;
1657
1657
  } | {
1658
- type: "tool_result";
1659
1658
  content: string;
1659
+ type: "tool_result";
1660
1660
  tool_use_id: string;
1661
1661
  cache_control?: {
1662
1662
  type: "ephemeral";
@@ -1848,15 +1848,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1848
1848
  type: "ephemeral";
1849
1849
  }>>;
1850
1850
  }, "strip", z.ZodTypeAny, {
1851
- type: "tool_result";
1852
1851
  content: string;
1852
+ type: "tool_result";
1853
1853
  tool_use_id: string;
1854
1854
  cache_control?: {
1855
1855
  type: "ephemeral";
1856
1856
  } | undefined;
1857
1857
  }, {
1858
- type: "tool_result";
1859
1858
  content: string;
1859
+ type: "tool_result";
1860
1860
  tool_use_id: string;
1861
1861
  cache_control?: {
1862
1862
  type: "ephemeral";
@@ -1920,8 +1920,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1920
1920
  type: "ephemeral";
1921
1921
  } | undefined;
1922
1922
  } | {
1923
- type: "tool_result";
1924
1923
  content: string;
1924
+ type: "tool_result";
1925
1925
  tool_use_id: string;
1926
1926
  cache_control?: {
1927
1927
  type: "ephemeral";
@@ -1954,8 +1954,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1954
1954
  type: "ephemeral";
1955
1955
  } | undefined;
1956
1956
  } | {
1957
- type: "tool_result";
1958
1957
  content: string;
1958
+ type: "tool_result";
1959
1959
  tool_use_id: string;
1960
1960
  cache_control?: {
1961
1961
  type: "ephemeral";
@@ -2087,13 +2087,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2087
2087
  path: z.ZodString;
2088
2088
  content: z.ZodString;
2089
2089
  }, "strip", z.ZodTypeAny, {
2090
- type: "patch" | "file";
2091
2090
  path: string;
2092
2091
  content: string;
2092
+ type: "file" | "patch";
2093
2093
  }, {
2094
- type: "patch" | "file";
2095
2094
  path: string;
2096
2095
  content: string;
2096
+ type: "file" | "patch";
2097
2097
  }>, "many">;
2098
2098
  costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
2099
2099
  }, "strip", z.ZodTypeAny, {
@@ -2116,8 +2116,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2116
2116
  type: "ephemeral";
2117
2117
  } | undefined;
2118
2118
  } | {
2119
- type: "tool_result";
2120
2119
  content: string;
2120
+ type: "tool_result";
2121
2121
  tool_use_id: string;
2122
2122
  cache_control?: {
2123
2123
  type: "ephemeral";
@@ -2163,9 +2163,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2163
2163
  userKnowledgeFiles?: Record<string, string> | undefined;
2164
2164
  };
2165
2165
  changesAlreadyApplied: {
2166
- type: "patch" | "file";
2167
2166
  path: string;
2168
2167
  content: string;
2168
+ type: "file" | "patch";
2169
2169
  }[];
2170
2170
  costMode: "max" | "lite" | "normal";
2171
2171
  authToken?: string | undefined;
@@ -2189,8 +2189,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2189
2189
  type: "ephemeral";
2190
2190
  } | undefined;
2191
2191
  } | {
2192
- type: "tool_result";
2193
2192
  content: string;
2193
+ type: "tool_result";
2194
2194
  tool_use_id: string;
2195
2195
  cache_control?: {
2196
2196
  type: "ephemeral";
@@ -2236,9 +2236,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2236
2236
  userKnowledgeFiles?: Record<string, string> | undefined;
2237
2237
  };
2238
2238
  changesAlreadyApplied: {
2239
- type: "patch" | "file";
2240
2239
  path: string;
2241
2240
  content: string;
2241
+ type: "file" | "patch";
2242
2242
  }[];
2243
2243
  authToken?: string | undefined;
2244
2244
  costMode?: "max" | "lite" | "normal" | undefined;
@@ -2424,15 +2424,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2424
2424
  type: "ephemeral";
2425
2425
  }>>;
2426
2426
  }, "strip", z.ZodTypeAny, {
2427
- type: "tool_result";
2428
2427
  content: string;
2428
+ type: "tool_result";
2429
2429
  tool_use_id: string;
2430
2430
  cache_control?: {
2431
2431
  type: "ephemeral";
2432
2432
  } | undefined;
2433
2433
  }, {
2434
- type: "tool_result";
2435
2434
  content: string;
2435
+ type: "tool_result";
2436
2436
  tool_use_id: string;
2437
2437
  cache_control?: {
2438
2438
  type: "ephemeral";
@@ -2496,8 +2496,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2496
2496
  type: "ephemeral";
2497
2497
  } | undefined;
2498
2498
  } | {
2499
- type: "tool_result";
2500
2499
  content: string;
2500
+ type: "tool_result";
2501
2501
  tool_use_id: string;
2502
2502
  cache_control?: {
2503
2503
  type: "ephemeral";
@@ -2530,8 +2530,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2530
2530
  type: "ephemeral";
2531
2531
  } | undefined;
2532
2532
  } | {
2533
- type: "tool_result";
2534
2533
  content: string;
2534
+ type: "tool_result";
2535
2535
  tool_use_id: string;
2536
2536
  cache_control?: {
2537
2537
  type: "ephemeral";
@@ -2594,8 +2594,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2594
2594
  type: "ephemeral";
2595
2595
  } | undefined;
2596
2596
  } | {
2597
- type: "tool_result";
2598
2597
  content: string;
2598
+ type: "tool_result";
2599
2599
  tool_use_id: string;
2600
2600
  cache_control?: {
2601
2601
  type: "ephemeral";
@@ -2658,8 +2658,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2658
2658
  type: "ephemeral";
2659
2659
  } | undefined;
2660
2660
  } | {
2661
- type: "tool_result";
2662
2661
  content: string;
2662
+ type: "tool_result";
2663
2663
  tool_use_id: string;
2664
2664
  cache_control?: {
2665
2665
  type: "ephemeral";
@@ -2741,8 +2741,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2741
2741
  type: "ephemeral";
2742
2742
  } | undefined;
2743
2743
  } | {
2744
- type: "tool_result";
2745
2744
  content: string;
2745
+ type: "tool_result";
2746
2746
  tool_use_id: string;
2747
2747
  cache_control?: {
2748
2748
  type: "ephemeral";
@@ -2817,8 +2817,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2817
2817
  type: "ephemeral";
2818
2818
  } | undefined;
2819
2819
  } | {
2820
- type: "tool_result";
2821
2820
  content: string;
2821
+ type: "tool_result";
2822
2822
  tool_use_id: string;
2823
2823
  cache_control?: {
2824
2824
  type: "ephemeral";
@@ -3082,8 +3082,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3082
3082
  type: "ephemeral";
3083
3083
  } | undefined;
3084
3084
  } | {
3085
- type: "tool_result";
3086
3085
  content: string;
3086
+ type: "tool_result";
3087
3087
  tool_use_id: string;
3088
3088
  cache_control?: {
3089
3089
  type: "ephemeral";
@@ -3129,9 +3129,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3129
3129
  userKnowledgeFiles?: Record<string, string> | undefined;
3130
3130
  };
3131
3131
  changesAlreadyApplied: {
3132
- type: "patch" | "file";
3133
3132
  path: string;
3134
3133
  content: string;
3134
+ type: "file" | "patch";
3135
3135
  }[];
3136
3136
  costMode: "max" | "lite" | "normal";
3137
3137
  authToken?: string | undefined;
@@ -3185,8 +3185,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3185
3185
  type: "ephemeral";
3186
3186
  } | undefined;
3187
3187
  } | {
3188
- type: "tool_result";
3189
3188
  content: string;
3189
+ type: "tool_result";
3190
3190
  tool_use_id: string;
3191
3191
  cache_control?: {
3192
3192
  type: "ephemeral";
@@ -3280,8 +3280,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3280
3280
  type: "ephemeral";
3281
3281
  } | undefined;
3282
3282
  } | {
3283
- type: "tool_result";
3284
3283
  content: string;
3284
+ type: "tool_result";
3285
3285
  tool_use_id: string;
3286
3286
  cache_control?: {
3287
3287
  type: "ephemeral";
@@ -3327,9 +3327,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3327
3327
  userKnowledgeFiles?: Record<string, string> | undefined;
3328
3328
  };
3329
3329
  changesAlreadyApplied: {
3330
- type: "patch" | "file";
3331
3330
  path: string;
3332
3331
  content: string;
3332
+ type: "file" | "patch";
3333
3333
  }[];
3334
3334
  authToken?: string | undefined;
3335
3335
  costMode?: "max" | "lite" | "normal" | undefined;
@@ -3382,8 +3382,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3382
3382
  type: "ephemeral";
3383
3383
  } | undefined;
3384
3384
  } | {
3385
- type: "tool_result";
3386
3385
  content: string;
3386
+ type: "tool_result";
3387
3387
  tool_use_id: string;
3388
3388
  cache_control?: {
3389
3389
  type: "ephemeral";
@@ -3499,26 +3499,26 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3499
3499
  path: z.ZodString;
3500
3500
  content: z.ZodString;
3501
3501
  }, "strip", z.ZodTypeAny, {
3502
- type: "patch" | "file";
3503
3502
  path: string;
3504
3503
  content: string;
3504
+ type: "file" | "patch";
3505
3505
  }, {
3506
- type: "patch" | "file";
3507
3506
  path: string;
3508
3507
  content: string;
3508
+ type: "file" | "patch";
3509
3509
  }>, "many">;
3510
3510
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
3511
3511
  type: z.ZodEnum<["patch", "file"]>;
3512
3512
  path: z.ZodString;
3513
3513
  content: z.ZodString;
3514
3514
  }, "strip", z.ZodTypeAny, {
3515
- type: "patch" | "file";
3516
3515
  path: string;
3517
3516
  content: string;
3517
+ type: "file" | "patch";
3518
3518
  }, {
3519
- type: "patch" | "file";
3520
3519
  path: string;
3521
3520
  content: string;
3521
+ type: "file" | "patch";
3522
3522
  }>, "many">;
3523
3523
  addedFileVersions: z.ZodArray<z.ZodObject<{
3524
3524
  path: z.ZodString;
@@ -3532,7 +3532,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3532
3532
  }>, "many">;
3533
3533
  resetFileVersions: z.ZodBoolean;
3534
3534
  }, {
3535
- promptId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
3536
3535
  usage: z.ZodOptional<z.ZodNumber>;
3537
3536
  limit: z.ZodOptional<z.ZodNumber>;
3538
3537
  referralLink: z.ZodOptional<z.ZodOptional<z.ZodString>>;
@@ -3543,22 +3542,21 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3543
3542
  type: "response-complete";
3544
3543
  userInputId: string;
3545
3544
  changesAlreadyApplied: {
3546
- type: "patch" | "file";
3547
3545
  path: string;
3548
3546
  content: string;
3547
+ type: "file" | "patch";
3549
3548
  }[];
3550
3549
  response: string;
3551
3550
  changes: {
3552
- type: "patch" | "file";
3553
3551
  path: string;
3554
3552
  content: string;
3553
+ type: "file" | "patch";
3555
3554
  }[];
3556
3555
  addedFileVersions: {
3557
3556
  path: string;
3558
3557
  content: string;
3559
3558
  }[];
3560
3559
  resetFileVersions: boolean;
3561
- promptId?: string | undefined;
3562
3560
  usage?: number | undefined;
3563
3561
  limit?: number | undefined;
3564
3562
  referralLink?: string | undefined;
@@ -3569,22 +3567,21 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3569
3567
  type: "response-complete";
3570
3568
  userInputId: string;
3571
3569
  changesAlreadyApplied: {
3572
- type: "patch" | "file";
3573
3570
  path: string;
3574
3571
  content: string;
3572
+ type: "file" | "patch";
3575
3573
  }[];
3576
3574
  response: string;
3577
3575
  changes: {
3578
- type: "patch" | "file";
3579
3576
  path: string;
3580
3577
  content: string;
3578
+ type: "file" | "patch";
3581
3579
  }[];
3582
3580
  addedFileVersions: {
3583
3581
  path: string;
3584
3582
  content: string;
3585
3583
  }[];
3586
3584
  resetFileVersions: boolean;
3587
- promptId?: string | undefined;
3588
3585
  usage?: number | undefined;
3589
3586
  limit?: number | undefined;
3590
3587
  referralLink?: string | undefined;
@@ -3769,15 +3766,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3769
3766
  type: "ephemeral";
3770
3767
  }>>;
3771
3768
  }, "strip", z.ZodTypeAny, {
3772
- type: "tool_result";
3773
3769
  content: string;
3770
+ type: "tool_result";
3774
3771
  tool_use_id: string;
3775
3772
  cache_control?: {
3776
3773
  type: "ephemeral";
3777
3774
  } | undefined;
3778
3775
  }, {
3779
- type: "tool_result";
3780
3776
  content: string;
3777
+ type: "tool_result";
3781
3778
  tool_use_id: string;
3782
3779
  cache_control?: {
3783
3780
  type: "ephemeral";
@@ -3841,8 +3838,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3841
3838
  type: "ephemeral";
3842
3839
  } | undefined;
3843
3840
  } | {
3844
- type: "tool_result";
3845
3841
  content: string;
3842
+ type: "tool_result";
3846
3843
  tool_use_id: string;
3847
3844
  cache_control?: {
3848
3845
  type: "ephemeral";
@@ -3875,8 +3872,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3875
3872
  type: "ephemeral";
3876
3873
  } | undefined;
3877
3874
  } | {
3878
- type: "tool_result";
3879
3875
  content: string;
3876
+ type: "tool_result";
3880
3877
  tool_use_id: string;
3881
3878
  cache_control?: {
3882
3879
  type: "ephemeral";
@@ -3939,8 +3936,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3939
3936
  type: "ephemeral";
3940
3937
  } | undefined;
3941
3938
  } | {
3942
- type: "tool_result";
3943
3939
  content: string;
3940
+ type: "tool_result";
3944
3941
  tool_use_id: string;
3945
3942
  cache_control?: {
3946
3943
  type: "ephemeral";
@@ -4003,8 +4000,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4003
4000
  type: "ephemeral";
4004
4001
  } | undefined;
4005
4002
  } | {
4006
- type: "tool_result";
4007
4003
  content: string;
4004
+ type: "tool_result";
4008
4005
  tool_use_id: string;
4009
4006
  cache_control?: {
4010
4007
  type: "ephemeral";
@@ -4050,7 +4047,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4050
4047
  result: string;
4051
4048
  }>, "many">;
4052
4049
  }, {
4053
- promptId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
4054
4050
  usage: z.ZodOptional<z.ZodNumber>;
4055
4051
  limit: z.ZodOptional<z.ZodNumber>;
4056
4052
  referralLink: z.ZodOptional<z.ZodOptional<z.ZodString>>;
@@ -4059,6 +4055,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4059
4055
  session_credits_used: z.ZodOptional<z.ZodNumber>;
4060
4056
  }>, "strip", z.ZodTypeAny, {
4061
4057
  type: "prompt-response";
4058
+ promptId: string;
4062
4059
  agentState: {
4063
4060
  fileContext: {
4064
4061
  currentWorkingDirectory: string;
@@ -4104,8 +4101,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4104
4101
  type: "ephemeral";
4105
4102
  } | undefined;
4106
4103
  } | {
4107
- type: "tool_result";
4108
4104
  content: string;
4105
+ type: "tool_result";
4109
4106
  tool_use_id: string;
4110
4107
  cache_control?: {
4111
4108
  type: "ephemeral";
@@ -4134,7 +4131,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4134
4131
  id: string;
4135
4132
  parameters: Record<string, string>;
4136
4133
  }[];
4137
- promptId?: string | undefined;
4138
4134
  usage?: number | undefined;
4139
4135
  limit?: number | undefined;
4140
4136
  referralLink?: string | undefined;
@@ -4143,6 +4139,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4143
4139
  session_credits_used?: number | undefined;
4144
4140
  }, {
4145
4141
  type: "prompt-response";
4142
+ promptId: string;
4146
4143
  agentState: {
4147
4144
  fileContext: {
4148
4145
  currentWorkingDirectory: string;
@@ -4188,8 +4185,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4188
4185
  type: "ephemeral";
4189
4186
  } | undefined;
4190
4187
  } | {
4191
- type: "tool_result";
4192
4188
  content: string;
4189
+ type: "tool_result";
4193
4190
  tool_use_id: string;
4194
4191
  cache_control?: {
4195
4192
  type: "ephemeral";
@@ -4218,7 +4215,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4218
4215
  id: string;
4219
4216
  parameters: Record<string, string>;
4220
4217
  }[];
4221
- promptId?: string | undefined;
4222
4218
  usage?: number | undefined;
4223
4219
  limit?: number | undefined;
4224
4220
  referralLink?: string | undefined;
@@ -4259,26 +4255,26 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4259
4255
  path: z.ZodString;
4260
4256
  content: z.ZodString;
4261
4257
  }, "strip", z.ZodTypeAny, {
4262
- type: "patch" | "file";
4263
4258
  path: string;
4264
4259
  content: string;
4260
+ type: "file" | "patch";
4265
4261
  }, {
4266
- type: "patch" | "file";
4267
4262
  path: string;
4268
4263
  content: string;
4264
+ type: "file" | "patch";
4269
4265
  }>, "many">;
4270
4266
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
4271
4267
  type: z.ZodEnum<["patch", "file"]>;
4272
4268
  path: z.ZodString;
4273
4269
  content: z.ZodString;
4274
4270
  }, "strip", z.ZodTypeAny, {
4275
- type: "patch" | "file";
4276
4271
  path: string;
4277
4272
  content: string;
4273
+ type: "file" | "patch";
4278
4274
  }, {
4279
- type: "patch" | "file";
4280
4275
  path: string;
4281
4276
  content: string;
4277
+ type: "file" | "patch";
4282
4278
  }>, "many">;
4283
4279
  addedFileVersions: z.ZodArray<z.ZodObject<{
4284
4280
  path: z.ZodString;
@@ -4300,15 +4296,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4300
4296
  input: Record<string, any>;
4301
4297
  };
4302
4298
  changesAlreadyApplied: {
4303
- type: "patch" | "file";
4304
4299
  path: string;
4305
4300
  content: string;
4301
+ type: "file" | "patch";
4306
4302
  }[];
4307
4303
  response: string;
4308
4304
  changes: {
4309
- type: "patch" | "file";
4310
4305
  path: string;
4311
4306
  content: string;
4307
+ type: "file" | "patch";
4312
4308
  }[];
4313
4309
  addedFileVersions: {
4314
4310
  path: string;
@@ -4324,15 +4320,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4324
4320
  input: Record<string, any>;
4325
4321
  };
4326
4322
  changesAlreadyApplied: {
4327
- type: "patch" | "file";
4328
4323
  path: string;
4329
4324
  content: string;
4325
+ type: "file" | "patch";
4330
4326
  }[];
4331
4327
  response: string;
4332
4328
  changes: {
4333
- type: "patch" | "file";
4334
4329
  path: string;
4335
4330
  content: string;
4331
+ type: "file" | "patch";
4336
4332
  }[];
4337
4333
  addedFileVersions: {
4338
4334
  path: string;
@@ -4367,7 +4363,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4367
4363
  type: z.ZodLiteral<"init-response">;
4368
4364
  }, Omit<{
4369
4365
  type: z.ZodLiteral<"usage-response">;
4370
- promptId: z.ZodOptional<z.ZodString>;
4371
4366
  usage: z.ZodNumber;
4372
4367
  limit: z.ZodNumber;
4373
4368
  referralLink: z.ZodOptional<z.ZodString>;
@@ -4381,7 +4376,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4381
4376
  subscription_active: boolean;
4382
4377
  next_quota_reset: Date;
4383
4378
  session_credits_used: number;
4384
- promptId?: string | undefined;
4385
4379
  referralLink?: string | undefined;
4386
4380
  }, {
4387
4381
  type: "init-response";
@@ -4390,11 +4384,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4390
4384
  subscription_active: boolean;
4391
4385
  next_quota_reset: Date;
4392
4386
  session_credits_used: number;
4393
- promptId?: string | undefined;
4394
4387
  referralLink?: string | undefined;
4395
4388
  }>, z.ZodObject<{
4396
4389
  type: z.ZodLiteral<"usage-response">;
4397
- promptId: z.ZodOptional<z.ZodString>;
4398
4390
  usage: z.ZodNumber;
4399
4391
  limit: z.ZodNumber;
4400
4392
  referralLink: z.ZodOptional<z.ZodString>;
@@ -4408,7 +4400,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4408
4400
  subscription_active: boolean;
4409
4401
  next_quota_reset: Date;
4410
4402
  session_credits_used: number;
4411
- promptId?: string | undefined;
4412
4403
  referralLink?: string | undefined;
4413
4404
  }, {
4414
4405
  type: "usage-response";
@@ -4417,17 +4408,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4417
4408
  subscription_active: boolean;
4418
4409
  next_quota_reset: Date;
4419
4410
  session_credits_used: number;
4420
- promptId?: string | undefined;
4421
4411
  referralLink?: string | undefined;
4422
4412
  }>, z.ZodObject<{
4423
4413
  type: z.ZodLiteral<"action-error">;
4424
4414
  message: z.ZodString;
4425
4415
  }, "strip", z.ZodTypeAny, {
4426
- type: "action-error";
4427
4416
  message: string;
4428
- }, {
4429
4417
  type: "action-error";
4418
+ }, {
4430
4419
  message: string;
4420
+ type: "action-error";
4431
4421
  }>, z.ZodObject<{
4432
4422
  type: z.ZodLiteral<"commit-message-response">;
4433
4423
  commitMessage: z.ZodString;
@@ -4447,7 +4437,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4447
4437
  subscription_active: boolean;
4448
4438
  next_quota_reset: Date;
4449
4439
  session_credits_used: number;
4450
- promptId?: string | undefined;
4451
4440
  referralLink?: string | undefined;
4452
4441
  } | {
4453
4442
  type: "init-response";
@@ -4456,28 +4445,26 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4456
4445
  subscription_active: boolean;
4457
4446
  next_quota_reset: Date;
4458
4447
  session_credits_used: number;
4459
- promptId?: string | undefined;
4460
4448
  referralLink?: string | undefined;
4461
4449
  } | {
4462
4450
  type: "response-complete";
4463
4451
  userInputId: string;
4464
4452
  changesAlreadyApplied: {
4465
- type: "patch" | "file";
4466
4453
  path: string;
4467
4454
  content: string;
4455
+ type: "file" | "patch";
4468
4456
  }[];
4469
4457
  response: string;
4470
4458
  changes: {
4471
- type: "patch" | "file";
4472
4459
  path: string;
4473
4460
  content: string;
4461
+ type: "file" | "patch";
4474
4462
  }[];
4475
4463
  addedFileVersions: {
4476
4464
  path: string;
4477
4465
  content: string;
4478
4466
  }[];
4479
4467
  resetFileVersions: boolean;
4480
- promptId?: string | undefined;
4481
4468
  usage?: number | undefined;
4482
4469
  limit?: number | undefined;
4483
4470
  referralLink?: string | undefined;
@@ -4486,6 +4473,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4486
4473
  session_credits_used?: number | undefined;
4487
4474
  } | {
4488
4475
  type: "prompt-response";
4476
+ promptId: string;
4489
4477
  agentState: {
4490
4478
  fileContext: {
4491
4479
  currentWorkingDirectory: string;
@@ -4531,8 +4519,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4531
4519
  type: "ephemeral";
4532
4520
  } | undefined;
4533
4521
  } | {
4534
- type: "tool_result";
4535
4522
  content: string;
4523
+ type: "tool_result";
4536
4524
  tool_use_id: string;
4537
4525
  cache_control?: {
4538
4526
  type: "ephemeral";
@@ -4561,7 +4549,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4561
4549
  id: string;
4562
4550
  parameters: Record<string, string>;
4563
4551
  }[];
4564
- promptId?: string | undefined;
4565
4552
  usage?: number | undefined;
4566
4553
  limit?: number | undefined;
4567
4554
  referralLink?: string | undefined;
@@ -4585,15 +4572,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4585
4572
  input: Record<string, any>;
4586
4573
  };
4587
4574
  changesAlreadyApplied: {
4588
- type: "patch" | "file";
4589
4575
  path: string;
4590
4576
  content: string;
4577
+ type: "file" | "patch";
4591
4578
  }[];
4592
4579
  response: string;
4593
4580
  changes: {
4594
- type: "patch" | "file";
4595
4581
  path: string;
4596
4582
  content: string;
4583
+ type: "file" | "patch";
4597
4584
  }[];
4598
4585
  addedFileVersions: {
4599
4586
  path: string;
@@ -4609,8 +4596,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4609
4596
  isUpToDate: boolean;
4610
4597
  latestVersion: string;
4611
4598
  } | {
4612
- type: "action-error";
4613
4599
  message: string;
4600
+ type: "action-error";
4614
4601
  } | {
4615
4602
  type: "commit-message-response";
4616
4603
  commitMessage: string;
@@ -4624,7 +4611,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4624
4611
  subscription_active: boolean;
4625
4612
  next_quota_reset: Date;
4626
4613
  session_credits_used: number;
4627
- promptId?: string | undefined;
4628
4614
  referralLink?: string | undefined;
4629
4615
  } | {
4630
4616
  type: "init-response";
@@ -4633,28 +4619,26 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4633
4619
  subscription_active: boolean;
4634
4620
  next_quota_reset: Date;
4635
4621
  session_credits_used: number;
4636
- promptId?: string | undefined;
4637
4622
  referralLink?: string | undefined;
4638
4623
  } | {
4639
4624
  type: "response-complete";
4640
4625
  userInputId: string;
4641
4626
  changesAlreadyApplied: {
4642
- type: "patch" | "file";
4643
4627
  path: string;
4644
4628
  content: string;
4629
+ type: "file" | "patch";
4645
4630
  }[];
4646
4631
  response: string;
4647
4632
  changes: {
4648
- type: "patch" | "file";
4649
4633
  path: string;
4650
4634
  content: string;
4635
+ type: "file" | "patch";
4651
4636
  }[];
4652
4637
  addedFileVersions: {
4653
4638
  path: string;
4654
4639
  content: string;
4655
4640
  }[];
4656
4641
  resetFileVersions: boolean;
4657
- promptId?: string | undefined;
4658
4642
  usage?: number | undefined;
4659
4643
  limit?: number | undefined;
4660
4644
  referralLink?: string | undefined;
@@ -4663,6 +4647,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4663
4647
  session_credits_used?: number | undefined;
4664
4648
  } | {
4665
4649
  type: "prompt-response";
4650
+ promptId: string;
4666
4651
  agentState: {
4667
4652
  fileContext: {
4668
4653
  currentWorkingDirectory: string;
@@ -4708,8 +4693,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4708
4693
  type: "ephemeral";
4709
4694
  } | undefined;
4710
4695
  } | {
4711
- type: "tool_result";
4712
4696
  content: string;
4697
+ type: "tool_result";
4713
4698
  tool_use_id: string;
4714
4699
  cache_control?: {
4715
4700
  type: "ephemeral";
@@ -4738,7 +4723,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4738
4723
  id: string;
4739
4724
  parameters: Record<string, string>;
4740
4725
  }[];
4741
- promptId?: string | undefined;
4742
4726
  usage?: number | undefined;
4743
4727
  limit?: number | undefined;
4744
4728
  referralLink?: string | undefined;
@@ -4762,15 +4746,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4762
4746
  input: Record<string, any>;
4763
4747
  };
4764
4748
  changesAlreadyApplied: {
4765
- type: "patch" | "file";
4766
4749
  path: string;
4767
4750
  content: string;
4751
+ type: "file" | "patch";
4768
4752
  }[];
4769
4753
  response: string;
4770
4754
  changes: {
4771
- type: "patch" | "file";
4772
4755
  path: string;
4773
4756
  content: string;
4757
+ type: "file" | "patch";
4774
4758
  }[];
4775
4759
  addedFileVersions: {
4776
4760
  path: string;
@@ -4786,8 +4770,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4786
4770
  isUpToDate: boolean;
4787
4771
  latestVersion: string;
4788
4772
  } | {
4789
- type: "action-error";
4790
4773
  message: string;
4774
+ type: "action-error";
4791
4775
  } | {
4792
4776
  type: "commit-message-response";
4793
4777
  commitMessage: string;
@@ -4832,26 +4816,26 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4832
4816
  path: z.ZodString;
4833
4817
  content: z.ZodString;
4834
4818
  }, "strip", z.ZodTypeAny, {
4835
- type: "patch" | "file";
4836
4819
  path: string;
4837
4820
  content: string;
4821
+ type: "file" | "patch";
4838
4822
  }, {
4839
- type: "patch" | "file";
4840
4823
  path: string;
4841
4824
  content: string;
4825
+ type: "file" | "patch";
4842
4826
  }>, "many">;
4843
4827
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
4844
4828
  type: z.ZodEnum<["patch", "file"]>;
4845
4829
  path: z.ZodString;
4846
4830
  content: z.ZodString;
4847
4831
  }, "strip", z.ZodTypeAny, {
4848
- type: "patch" | "file";
4849
4832
  path: string;
4850
4833
  content: string;
4834
+ type: "file" | "patch";
4851
4835
  }, {
4852
- type: "patch" | "file";
4853
4836
  path: string;
4854
4837
  content: string;
4838
+ type: "file" | "patch";
4855
4839
  }>, "many">;
4856
4840
  addedFileVersions: z.ZodArray<z.ZodObject<{
4857
4841
  path: z.ZodString;
@@ -4865,7 +4849,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4865
4849
  }>, "many">;
4866
4850
  resetFileVersions: z.ZodBoolean;
4867
4851
  }, {
4868
- promptId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
4869
4852
  usage: z.ZodOptional<z.ZodNumber>;
4870
4853
  limit: z.ZodOptional<z.ZodNumber>;
4871
4854
  referralLink: z.ZodOptional<z.ZodOptional<z.ZodString>>;
@@ -4876,22 +4859,21 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4876
4859
  type: "response-complete";
4877
4860
  userInputId: string;
4878
4861
  changesAlreadyApplied: {
4879
- type: "patch" | "file";
4880
4862
  path: string;
4881
4863
  content: string;
4864
+ type: "file" | "patch";
4882
4865
  }[];
4883
4866
  response: string;
4884
4867
  changes: {
4885
- type: "patch" | "file";
4886
4868
  path: string;
4887
4869
  content: string;
4870
+ type: "file" | "patch";
4888
4871
  }[];
4889
4872
  addedFileVersions: {
4890
4873
  path: string;
4891
4874
  content: string;
4892
4875
  }[];
4893
4876
  resetFileVersions: boolean;
4894
- promptId?: string | undefined;
4895
4877
  usage?: number | undefined;
4896
4878
  limit?: number | undefined;
4897
4879
  referralLink?: string | undefined;
@@ -4902,22 +4884,21 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4902
4884
  type: "response-complete";
4903
4885
  userInputId: string;
4904
4886
  changesAlreadyApplied: {
4905
- type: "patch" | "file";
4906
4887
  path: string;
4907
4888
  content: string;
4889
+ type: "file" | "patch";
4908
4890
  }[];
4909
4891
  response: string;
4910
4892
  changes: {
4911
- type: "patch" | "file";
4912
4893
  path: string;
4913
4894
  content: string;
4895
+ type: "file" | "patch";
4914
4896
  }[];
4915
4897
  addedFileVersions: {
4916
4898
  path: string;
4917
4899
  content: string;
4918
4900
  }[];
4919
4901
  resetFileVersions: boolean;
4920
- promptId?: string | undefined;
4921
4902
  usage?: number | undefined;
4922
4903
  limit?: number | undefined;
4923
4904
  referralLink?: string | undefined;
@@ -5102,15 +5083,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5102
5083
  type: "ephemeral";
5103
5084
  }>>;
5104
5085
  }, "strip", z.ZodTypeAny, {
5105
- type: "tool_result";
5106
5086
  content: string;
5087
+ type: "tool_result";
5107
5088
  tool_use_id: string;
5108
5089
  cache_control?: {
5109
5090
  type: "ephemeral";
5110
5091
  } | undefined;
5111
5092
  }, {
5112
- type: "tool_result";
5113
5093
  content: string;
5094
+ type: "tool_result";
5114
5095
  tool_use_id: string;
5115
5096
  cache_control?: {
5116
5097
  type: "ephemeral";
@@ -5174,8 +5155,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5174
5155
  type: "ephemeral";
5175
5156
  } | undefined;
5176
5157
  } | {
5177
- type: "tool_result";
5178
5158
  content: string;
5159
+ type: "tool_result";
5179
5160
  tool_use_id: string;
5180
5161
  cache_control?: {
5181
5162
  type: "ephemeral";
@@ -5208,8 +5189,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5208
5189
  type: "ephemeral";
5209
5190
  } | undefined;
5210
5191
  } | {
5211
- type: "tool_result";
5212
5192
  content: string;
5193
+ type: "tool_result";
5213
5194
  tool_use_id: string;
5214
5195
  cache_control?: {
5215
5196
  type: "ephemeral";
@@ -5272,8 +5253,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5272
5253
  type: "ephemeral";
5273
5254
  } | undefined;
5274
5255
  } | {
5275
- type: "tool_result";
5276
5256
  content: string;
5257
+ type: "tool_result";
5277
5258
  tool_use_id: string;
5278
5259
  cache_control?: {
5279
5260
  type: "ephemeral";
@@ -5336,8 +5317,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5336
5317
  type: "ephemeral";
5337
5318
  } | undefined;
5338
5319
  } | {
5339
- type: "tool_result";
5340
5320
  content: string;
5321
+ type: "tool_result";
5341
5322
  tool_use_id: string;
5342
5323
  cache_control?: {
5343
5324
  type: "ephemeral";
@@ -5383,7 +5364,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5383
5364
  result: string;
5384
5365
  }>, "many">;
5385
5366
  }, {
5386
- promptId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
5387
5367
  usage: z.ZodOptional<z.ZodNumber>;
5388
5368
  limit: z.ZodOptional<z.ZodNumber>;
5389
5369
  referralLink: z.ZodOptional<z.ZodOptional<z.ZodString>>;
@@ -5392,6 +5372,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5392
5372
  session_credits_used: z.ZodOptional<z.ZodNumber>;
5393
5373
  }>, "strip", z.ZodTypeAny, {
5394
5374
  type: "prompt-response";
5375
+ promptId: string;
5395
5376
  agentState: {
5396
5377
  fileContext: {
5397
5378
  currentWorkingDirectory: string;
@@ -5437,8 +5418,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5437
5418
  type: "ephemeral";
5438
5419
  } | undefined;
5439
5420
  } | {
5440
- type: "tool_result";
5441
5421
  content: string;
5422
+ type: "tool_result";
5442
5423
  tool_use_id: string;
5443
5424
  cache_control?: {
5444
5425
  type: "ephemeral";
@@ -5467,7 +5448,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5467
5448
  id: string;
5468
5449
  parameters: Record<string, string>;
5469
5450
  }[];
5470
- promptId?: string | undefined;
5471
5451
  usage?: number | undefined;
5472
5452
  limit?: number | undefined;
5473
5453
  referralLink?: string | undefined;
@@ -5476,6 +5456,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5476
5456
  session_credits_used?: number | undefined;
5477
5457
  }, {
5478
5458
  type: "prompt-response";
5459
+ promptId: string;
5479
5460
  agentState: {
5480
5461
  fileContext: {
5481
5462
  currentWorkingDirectory: string;
@@ -5521,8 +5502,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5521
5502
  type: "ephemeral";
5522
5503
  } | undefined;
5523
5504
  } | {
5524
- type: "tool_result";
5525
5505
  content: string;
5506
+ type: "tool_result";
5526
5507
  tool_use_id: string;
5527
5508
  cache_control?: {
5528
5509
  type: "ephemeral";
@@ -5551,7 +5532,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5551
5532
  id: string;
5552
5533
  parameters: Record<string, string>;
5553
5534
  }[];
5554
- promptId?: string | undefined;
5555
5535
  usage?: number | undefined;
5556
5536
  limit?: number | undefined;
5557
5537
  referralLink?: string | undefined;
@@ -5592,26 +5572,26 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5592
5572
  path: z.ZodString;
5593
5573
  content: z.ZodString;
5594
5574
  }, "strip", z.ZodTypeAny, {
5595
- type: "patch" | "file";
5596
5575
  path: string;
5597
5576
  content: string;
5577
+ type: "file" | "patch";
5598
5578
  }, {
5599
- type: "patch" | "file";
5600
5579
  path: string;
5601
5580
  content: string;
5581
+ type: "file" | "patch";
5602
5582
  }>, "many">;
5603
5583
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
5604
5584
  type: z.ZodEnum<["patch", "file"]>;
5605
5585
  path: z.ZodString;
5606
5586
  content: z.ZodString;
5607
5587
  }, "strip", z.ZodTypeAny, {
5608
- type: "patch" | "file";
5609
5588
  path: string;
5610
5589
  content: string;
5590
+ type: "file" | "patch";
5611
5591
  }, {
5612
- type: "patch" | "file";
5613
5592
  path: string;
5614
5593
  content: string;
5594
+ type: "file" | "patch";
5615
5595
  }>, "many">;
5616
5596
  addedFileVersions: z.ZodArray<z.ZodObject<{
5617
5597
  path: z.ZodString;
@@ -5633,15 +5613,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5633
5613
  input: Record<string, any>;
5634
5614
  };
5635
5615
  changesAlreadyApplied: {
5636
- type: "patch" | "file";
5637
5616
  path: string;
5638
5617
  content: string;
5618
+ type: "file" | "patch";
5639
5619
  }[];
5640
5620
  response: string;
5641
5621
  changes: {
5642
- type: "patch" | "file";
5643
5622
  path: string;
5644
5623
  content: string;
5624
+ type: "file" | "patch";
5645
5625
  }[];
5646
5626
  addedFileVersions: {
5647
5627
  path: string;
@@ -5657,15 +5637,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5657
5637
  input: Record<string, any>;
5658
5638
  };
5659
5639
  changesAlreadyApplied: {
5660
- type: "patch" | "file";
5661
5640
  path: string;
5662
5641
  content: string;
5642
+ type: "file" | "patch";
5663
5643
  }[];
5664
5644
  response: string;
5665
5645
  changes: {
5666
- type: "patch" | "file";
5667
5646
  path: string;
5668
5647
  content: string;
5648
+ type: "file" | "patch";
5669
5649
  }[];
5670
5650
  addedFileVersions: {
5671
5651
  path: string;
@@ -5700,7 +5680,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5700
5680
  type: z.ZodLiteral<"init-response">;
5701
5681
  }, Omit<{
5702
5682
  type: z.ZodLiteral<"usage-response">;
5703
- promptId: z.ZodOptional<z.ZodString>;
5704
5683
  usage: z.ZodNumber;
5705
5684
  limit: z.ZodNumber;
5706
5685
  referralLink: z.ZodOptional<z.ZodString>;
@@ -5714,7 +5693,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5714
5693
  subscription_active: boolean;
5715
5694
  next_quota_reset: Date;
5716
5695
  session_credits_used: number;
5717
- promptId?: string | undefined;
5718
5696
  referralLink?: string | undefined;
5719
5697
  }, {
5720
5698
  type: "init-response";
@@ -5723,11 +5701,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5723
5701
  subscription_active: boolean;
5724
5702
  next_quota_reset: Date;
5725
5703
  session_credits_used: number;
5726
- promptId?: string | undefined;
5727
5704
  referralLink?: string | undefined;
5728
5705
  }>, z.ZodObject<{
5729
5706
  type: z.ZodLiteral<"usage-response">;
5730
- promptId: z.ZodOptional<z.ZodString>;
5731
5707
  usage: z.ZodNumber;
5732
5708
  limit: z.ZodNumber;
5733
5709
  referralLink: z.ZodOptional<z.ZodString>;
@@ -5741,7 +5717,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5741
5717
  subscription_active: boolean;
5742
5718
  next_quota_reset: Date;
5743
5719
  session_credits_used: number;
5744
- promptId?: string | undefined;
5745
5720
  referralLink?: string | undefined;
5746
5721
  }, {
5747
5722
  type: "usage-response";
@@ -5750,17 +5725,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5750
5725
  subscription_active: boolean;
5751
5726
  next_quota_reset: Date;
5752
5727
  session_credits_used: number;
5753
- promptId?: string | undefined;
5754
5728
  referralLink?: string | undefined;
5755
5729
  }>, z.ZodObject<{
5756
5730
  type: z.ZodLiteral<"action-error">;
5757
5731
  message: z.ZodString;
5758
5732
  }, "strip", z.ZodTypeAny, {
5759
- type: "action-error";
5760
5733
  message: string;
5761
- }, {
5762
5734
  type: "action-error";
5735
+ }, {
5763
5736
  message: string;
5737
+ type: "action-error";
5764
5738
  }>, z.ZodObject<{
5765
5739
  type: z.ZodLiteral<"commit-message-response">;
5766
5740
  commitMessage: z.ZodString;
@@ -5780,7 +5754,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5780
5754
  subscription_active: boolean;
5781
5755
  next_quota_reset: Date;
5782
5756
  session_credits_used: number;
5783
- promptId?: string | undefined;
5784
5757
  referralLink?: string | undefined;
5785
5758
  } | {
5786
5759
  type: "init-response";
@@ -5789,28 +5762,26 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5789
5762
  subscription_active: boolean;
5790
5763
  next_quota_reset: Date;
5791
5764
  session_credits_used: number;
5792
- promptId?: string | undefined;
5793
5765
  referralLink?: string | undefined;
5794
5766
  } | {
5795
5767
  type: "response-complete";
5796
5768
  userInputId: string;
5797
5769
  changesAlreadyApplied: {
5798
- type: "patch" | "file";
5799
5770
  path: string;
5800
5771
  content: string;
5772
+ type: "file" | "patch";
5801
5773
  }[];
5802
5774
  response: string;
5803
5775
  changes: {
5804
- type: "patch" | "file";
5805
5776
  path: string;
5806
5777
  content: string;
5778
+ type: "file" | "patch";
5807
5779
  }[];
5808
5780
  addedFileVersions: {
5809
5781
  path: string;
5810
5782
  content: string;
5811
5783
  }[];
5812
5784
  resetFileVersions: boolean;
5813
- promptId?: string | undefined;
5814
5785
  usage?: number | undefined;
5815
5786
  limit?: number | undefined;
5816
5787
  referralLink?: string | undefined;
@@ -5819,6 +5790,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5819
5790
  session_credits_used?: number | undefined;
5820
5791
  } | {
5821
5792
  type: "prompt-response";
5793
+ promptId: string;
5822
5794
  agentState: {
5823
5795
  fileContext: {
5824
5796
  currentWorkingDirectory: string;
@@ -5864,8 +5836,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5864
5836
  type: "ephemeral";
5865
5837
  } | undefined;
5866
5838
  } | {
5867
- type: "tool_result";
5868
5839
  content: string;
5840
+ type: "tool_result";
5869
5841
  tool_use_id: string;
5870
5842
  cache_control?: {
5871
5843
  type: "ephemeral";
@@ -5894,7 +5866,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5894
5866
  id: string;
5895
5867
  parameters: Record<string, string>;
5896
5868
  }[];
5897
- promptId?: string | undefined;
5898
5869
  usage?: number | undefined;
5899
5870
  limit?: number | undefined;
5900
5871
  referralLink?: string | undefined;
@@ -5918,15 +5889,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5918
5889
  input: Record<string, any>;
5919
5890
  };
5920
5891
  changesAlreadyApplied: {
5921
- type: "patch" | "file";
5922
5892
  path: string;
5923
5893
  content: string;
5894
+ type: "file" | "patch";
5924
5895
  }[];
5925
5896
  response: string;
5926
5897
  changes: {
5927
- type: "patch" | "file";
5928
5898
  path: string;
5929
5899
  content: string;
5900
+ type: "file" | "patch";
5930
5901
  }[];
5931
5902
  addedFileVersions: {
5932
5903
  path: string;
@@ -5942,8 +5913,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5942
5913
  isUpToDate: boolean;
5943
5914
  latestVersion: string;
5944
5915
  } | {
5945
- type: "action-error";
5946
5916
  message: string;
5917
+ type: "action-error";
5947
5918
  } | {
5948
5919
  type: "commit-message-response";
5949
5920
  commitMessage: string;
@@ -5957,7 +5928,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5957
5928
  subscription_active: boolean;
5958
5929
  next_quota_reset: Date;
5959
5930
  session_credits_used: number;
5960
- promptId?: string | undefined;
5961
5931
  referralLink?: string | undefined;
5962
5932
  } | {
5963
5933
  type: "init-response";
@@ -5966,28 +5936,26 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5966
5936
  subscription_active: boolean;
5967
5937
  next_quota_reset: Date;
5968
5938
  session_credits_used: number;
5969
- promptId?: string | undefined;
5970
5939
  referralLink?: string | undefined;
5971
5940
  } | {
5972
5941
  type: "response-complete";
5973
5942
  userInputId: string;
5974
5943
  changesAlreadyApplied: {
5975
- type: "patch" | "file";
5976
5944
  path: string;
5977
5945
  content: string;
5946
+ type: "file" | "patch";
5978
5947
  }[];
5979
5948
  response: string;
5980
5949
  changes: {
5981
- type: "patch" | "file";
5982
5950
  path: string;
5983
5951
  content: string;
5952
+ type: "file" | "patch";
5984
5953
  }[];
5985
5954
  addedFileVersions: {
5986
5955
  path: string;
5987
5956
  content: string;
5988
5957
  }[];
5989
5958
  resetFileVersions: boolean;
5990
- promptId?: string | undefined;
5991
5959
  usage?: number | undefined;
5992
5960
  limit?: number | undefined;
5993
5961
  referralLink?: string | undefined;
@@ -5996,6 +5964,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5996
5964
  session_credits_used?: number | undefined;
5997
5965
  } | {
5998
5966
  type: "prompt-response";
5967
+ promptId: string;
5999
5968
  agentState: {
6000
5969
  fileContext: {
6001
5970
  currentWorkingDirectory: string;
@@ -6041,8 +6010,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
6041
6010
  type: "ephemeral";
6042
6011
  } | undefined;
6043
6012
  } | {
6044
- type: "tool_result";
6045
6013
  content: string;
6014
+ type: "tool_result";
6046
6015
  tool_use_id: string;
6047
6016
  cache_control?: {
6048
6017
  type: "ephemeral";
@@ -6071,7 +6040,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
6071
6040
  id: string;
6072
6041
  parameters: Record<string, string>;
6073
6042
  }[];
6074
- promptId?: string | undefined;
6075
6043
  usage?: number | undefined;
6076
6044
  limit?: number | undefined;
6077
6045
  referralLink?: string | undefined;
@@ -6095,15 +6063,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
6095
6063
  input: Record<string, any>;
6096
6064
  };
6097
6065
  changesAlreadyApplied: {
6098
- type: "patch" | "file";
6099
6066
  path: string;
6100
6067
  content: string;
6068
+ type: "file" | "patch";
6101
6069
  }[];
6102
6070
  response: string;
6103
6071
  changes: {
6104
- type: "patch" | "file";
6105
6072
  path: string;
6106
6073
  content: string;
6074
+ type: "file" | "patch";
6107
6075
  }[];
6108
6076
  addedFileVersions: {
6109
6077
  path: string;
@@ -6119,8 +6087,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
6119
6087
  isUpToDate: boolean;
6120
6088
  latestVersion: string;
6121
6089
  } | {
6122
- type: "action-error";
6123
6090
  message: string;
6091
+ type: "action-error";
6124
6092
  } | {
6125
6093
  type: "commit-message-response";
6126
6094
  commitMessage: string;