codebuff 1.0.198 → 1.0.200

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 (40) hide show
  1. package/dist/cli.js +4 -1
  2. package/dist/cli.js.map +1 -1
  3. package/dist/client.d.ts +5 -5
  4. package/dist/client.js +13 -15
  5. package/dist/client.js.map +1 -1
  6. package/dist/code-map/tsconfig.tsbuildinfo +1 -1
  7. package/dist/common/actions.d.ts +98 -98
  8. package/dist/common/advanced-analyzer.d.ts +19 -0
  9. package/dist/common/advanced-analyzer.js +140 -0
  10. package/dist/common/advanced-analyzer.js.map +1 -0
  11. package/dist/common/constants.d.ts +3 -1
  12. package/dist/common/constants.js +2 -1
  13. package/dist/common/constants.js.map +1 -1
  14. package/dist/common/message-image-handling.d.ts +41 -0
  15. package/dist/common/message-image-handling.js +57 -0
  16. package/dist/common/message-image-handling.js.map +1 -0
  17. package/dist/common/types/agent-state.d.ts +12 -12
  18. package/dist/common/types/message.d.ts +8 -8
  19. package/dist/common/util/lru-cache.d.ts +23 -2
  20. package/dist/common/util/lru-cache.js +44 -18
  21. package/dist/common/util/lru-cache.js.map +1 -1
  22. package/dist/common/util/messages.d.ts +1 -0
  23. package/dist/common/util/messages.js +15 -0
  24. package/dist/common/util/messages.js.map +1 -1
  25. package/dist/common/util/min-heap.js +2 -2
  26. package/dist/common/util/min-heap.js.map +1 -1
  27. package/dist/common/util/process-stream.d.ts +8 -0
  28. package/dist/common/util/process-stream.js +102 -0
  29. package/dist/common/util/process-stream.js.map +1 -0
  30. package/dist/common/util/referral-credits.d.ts +1 -0
  31. package/dist/common/util/referral-credits.js +48 -0
  32. package/dist/common/util/referral-credits.js.map +1 -0
  33. package/dist/common/websockets/websocket-schema.d.ts +176 -176
  34. package/dist/fingerprint.js +7 -2
  35. package/dist/fingerprint.js.map +1 -1
  36. package/dist/index.js +2 -1
  37. package/dist/index.js.map +1 -1
  38. package/dist/menu.js +1 -1
  39. package/dist/menu.js.map +1 -1
  40. package/package.json +1 -1
@@ -208,16 +208,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
208
208
  }>>;
209
209
  }, "strip", z.ZodTypeAny, {
210
210
  type: "tool_use";
211
- name: string;
212
211
  id: string;
212
+ name: string;
213
213
  input: Record<string, any>;
214
214
  cache_control?: {
215
215
  type: "ephemeral";
216
216
  } | undefined;
217
217
  }, {
218
218
  type: "tool_use";
219
- name: string;
220
219
  id: string;
220
+ name: string;
221
221
  input: Record<string, any>;
222
222
  cache_control?: {
223
223
  type: "ephemeral";
@@ -291,6 +291,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
291
291
  } | undefined;
292
292
  }>]>, "many">]>;
293
293
  }, "strip", z.ZodTypeAny, {
294
+ role: "user" | "assistant";
294
295
  content: string | ({
295
296
  type: "text";
296
297
  text: string;
@@ -299,8 +300,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
299
300
  } | undefined;
300
301
  } | {
301
302
  type: "tool_use";
302
- name: string;
303
303
  id: string;
304
+ name: string;
304
305
  input: Record<string, any>;
305
306
  cache_control?: {
306
307
  type: "ephemeral";
@@ -323,8 +324,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
323
324
  type: "ephemeral";
324
325
  } | undefined;
325
326
  })[];
326
- role: "user" | "assistant";
327
327
  }, {
328
+ role: "user" | "assistant";
328
329
  content: string | ({
329
330
  type: "text";
330
331
  text: string;
@@ -333,8 +334,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
333
334
  } | undefined;
334
335
  } | {
335
336
  type: "tool_use";
336
- name: string;
337
337
  id: string;
338
+ name: string;
338
339
  input: Record<string, any>;
339
340
  cache_control?: {
340
341
  type: "ephemeral";
@@ -357,7 +358,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
357
358
  type: "ephemeral";
358
359
  } | undefined;
359
360
  })[];
360
- role: "user" | "assistant";
361
361
  }>, "many">;
362
362
  lastUserPromptIndex: z.ZodOptional<z.ZodNumber>;
363
363
  }, "strip", z.ZodTypeAny, {
@@ -390,6 +390,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
390
390
  }[][] | undefined;
391
391
  };
392
392
  messageHistory: {
393
+ role: "user" | "assistant";
393
394
  content: string | ({
394
395
  type: "text";
395
396
  text: string;
@@ -398,8 +399,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
398
399
  } | undefined;
399
400
  } | {
400
401
  type: "tool_use";
401
- name: string;
402
402
  id: string;
403
+ name: string;
403
404
  input: Record<string, any>;
404
405
  cache_control?: {
405
406
  type: "ephemeral";
@@ -422,7 +423,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
422
423
  type: "ephemeral";
423
424
  } | undefined;
424
425
  })[];
425
- role: "user" | "assistant";
426
426
  }[];
427
427
  lastUserPromptIndex?: number | undefined;
428
428
  }, {
@@ -455,6 +455,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
455
455
  }[][] | undefined;
456
456
  };
457
457
  messageHistory: {
458
+ role: "user" | "assistant";
458
459
  content: string | ({
459
460
  type: "text";
460
461
  text: string;
@@ -463,8 +464,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
463
464
  } | undefined;
464
465
  } | {
465
466
  type: "tool_use";
466
- name: string;
467
467
  id: string;
468
+ name: string;
468
469
  input: Record<string, any>;
469
470
  cache_control?: {
470
471
  type: "ephemeral";
@@ -487,7 +488,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
487
488
  type: "ephemeral";
488
489
  } | undefined;
489
490
  })[];
490
- role: "user" | "assistant";
491
491
  }[];
492
492
  lastUserPromptIndex?: number | undefined;
493
493
  }>;
@@ -496,12 +496,12 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
496
496
  result: z.ZodString;
497
497
  id: z.ZodString;
498
498
  }, "strip", z.ZodTypeAny, {
499
- name: string;
500
499
  id: string;
500
+ name: string;
501
501
  result: string;
502
502
  }, {
503
- name: string;
504
503
  id: string;
504
+ name: string;
505
505
  result: string;
506
506
  }>, "many">;
507
507
  }, "strip", z.ZodTypeAny, {
@@ -539,6 +539,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
539
539
  }[][] | undefined;
540
540
  };
541
541
  messageHistory: {
542
+ role: "user" | "assistant";
542
543
  content: string | ({
543
544
  type: "text";
544
545
  text: string;
@@ -547,8 +548,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
547
548
  } | undefined;
548
549
  } | {
549
550
  type: "tool_use";
550
- name: string;
551
551
  id: string;
552
+ name: string;
552
553
  input: Record<string, any>;
553
554
  cache_control?: {
554
555
  type: "ephemeral";
@@ -571,13 +572,12 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
571
572
  type: "ephemeral";
572
573
  } | undefined;
573
574
  })[];
574
- role: "user" | "assistant";
575
575
  }[];
576
576
  lastUserPromptIndex?: number | undefined;
577
577
  };
578
578
  toolResults: {
579
- name: string;
580
579
  id: string;
580
+ name: string;
581
581
  result: string;
582
582
  }[];
583
583
  prompt?: string | undefined;
@@ -616,6 +616,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
616
616
  }[][] | undefined;
617
617
  };
618
618
  messageHistory: {
619
+ role: "user" | "assistant";
619
620
  content: string | ({
620
621
  type: "text";
621
622
  text: string;
@@ -624,8 +625,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
624
625
  } | undefined;
625
626
  } | {
626
627
  type: "tool_use";
627
- name: string;
628
628
  id: string;
629
+ name: string;
629
630
  input: Record<string, any>;
630
631
  cache_control?: {
631
632
  type: "ephemeral";
@@ -648,13 +649,12 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
648
649
  type: "ephemeral";
649
650
  } | undefined;
650
651
  })[];
651
- role: "user" | "assistant";
652
652
  }[];
653
653
  lastUserPromptIndex?: number | undefined;
654
654
  };
655
655
  toolResults: {
656
- name: string;
657
656
  id: string;
657
+ name: string;
658
658
  result: string;
659
659
  }[];
660
660
  prompt?: string | undefined;
@@ -900,6 +900,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
900
900
  }[][] | undefined;
901
901
  };
902
902
  messageHistory: {
903
+ role: "user" | "assistant";
903
904
  content: string | ({
904
905
  type: "text";
905
906
  text: string;
@@ -908,8 +909,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
908
909
  } | undefined;
909
910
  } | {
910
911
  type: "tool_use";
911
- name: string;
912
912
  id: string;
913
+ name: string;
913
914
  input: Record<string, any>;
914
915
  cache_control?: {
915
916
  type: "ephemeral";
@@ -932,13 +933,12 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
932
933
  type: "ephemeral";
933
934
  } | undefined;
934
935
  })[];
935
- role: "user" | "assistant";
936
936
  }[];
937
937
  lastUserPromptIndex?: number | undefined;
938
938
  };
939
939
  toolResults: {
940
- name: string;
941
940
  id: string;
941
+ name: string;
942
942
  result: string;
943
943
  }[];
944
944
  prompt?: string | undefined;
@@ -1021,6 +1021,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1021
1021
  }[][] | undefined;
1022
1022
  };
1023
1023
  messageHistory: {
1024
+ role: "user" | "assistant";
1024
1025
  content: string | ({
1025
1026
  type: "text";
1026
1027
  text: string;
@@ -1029,8 +1030,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1029
1030
  } | undefined;
1030
1031
  } | {
1031
1032
  type: "tool_use";
1032
- name: string;
1033
1033
  id: string;
1034
+ name: string;
1034
1035
  input: Record<string, any>;
1035
1036
  cache_control?: {
1036
1037
  type: "ephemeral";
@@ -1053,13 +1054,12 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1053
1054
  type: "ephemeral";
1054
1055
  } | undefined;
1055
1056
  })[];
1056
- role: "user" | "assistant";
1057
1057
  }[];
1058
1058
  lastUserPromptIndex?: number | undefined;
1059
1059
  };
1060
1060
  toolResults: {
1061
- name: string;
1062
1061
  id: string;
1062
+ name: string;
1063
1063
  result: string;
1064
1064
  }[];
1065
1065
  prompt?: string | undefined;
@@ -1313,16 +1313,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1313
1313
  }>>;
1314
1314
  }, "strip", z.ZodTypeAny, {
1315
1315
  type: "tool_use";
1316
- name: string;
1317
1316
  id: string;
1317
+ name: string;
1318
1318
  input: Record<string, any>;
1319
1319
  cache_control?: {
1320
1320
  type: "ephemeral";
1321
1321
  } | undefined;
1322
1322
  }, {
1323
1323
  type: "tool_use";
1324
- name: string;
1325
1324
  id: string;
1325
+ name: string;
1326
1326
  input: Record<string, any>;
1327
1327
  cache_control?: {
1328
1328
  type: "ephemeral";
@@ -1396,6 +1396,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1396
1396
  } | undefined;
1397
1397
  }>]>, "many">]>;
1398
1398
  }, "strip", z.ZodTypeAny, {
1399
+ role: "user" | "assistant";
1399
1400
  content: string | ({
1400
1401
  type: "text";
1401
1402
  text: string;
@@ -1404,8 +1405,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1404
1405
  } | undefined;
1405
1406
  } | {
1406
1407
  type: "tool_use";
1407
- name: string;
1408
1408
  id: string;
1409
+ name: string;
1409
1410
  input: Record<string, any>;
1410
1411
  cache_control?: {
1411
1412
  type: "ephemeral";
@@ -1428,8 +1429,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1428
1429
  type: "ephemeral";
1429
1430
  } | undefined;
1430
1431
  })[];
1431
- role: "user" | "assistant";
1432
1432
  }, {
1433
+ role: "user" | "assistant";
1433
1434
  content: string | ({
1434
1435
  type: "text";
1435
1436
  text: string;
@@ -1438,8 +1439,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1438
1439
  } | undefined;
1439
1440
  } | {
1440
1441
  type: "tool_use";
1441
- name: string;
1442
1442
  id: string;
1443
+ name: string;
1443
1444
  input: Record<string, any>;
1444
1445
  cache_control?: {
1445
1446
  type: "ephemeral";
@@ -1462,7 +1463,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1462
1463
  type: "ephemeral";
1463
1464
  } | undefined;
1464
1465
  })[];
1465
- role: "user" | "assistant";
1466
1466
  }>, "many">;
1467
1467
  lastUserPromptIndex: z.ZodOptional<z.ZodNumber>;
1468
1468
  }, "strip", z.ZodTypeAny, {
@@ -1495,6 +1495,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1495
1495
  }[][] | undefined;
1496
1496
  };
1497
1497
  messageHistory: {
1498
+ role: "user" | "assistant";
1498
1499
  content: string | ({
1499
1500
  type: "text";
1500
1501
  text: string;
@@ -1503,8 +1504,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1503
1504
  } | undefined;
1504
1505
  } | {
1505
1506
  type: "tool_use";
1506
- name: string;
1507
1507
  id: string;
1508
+ name: string;
1508
1509
  input: Record<string, any>;
1509
1510
  cache_control?: {
1510
1511
  type: "ephemeral";
@@ -1527,7 +1528,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1527
1528
  type: "ephemeral";
1528
1529
  } | undefined;
1529
1530
  })[];
1530
- role: "user" | "assistant";
1531
1531
  }[];
1532
1532
  lastUserPromptIndex?: number | undefined;
1533
1533
  }, {
@@ -1560,6 +1560,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1560
1560
  }[][] | undefined;
1561
1561
  };
1562
1562
  messageHistory: {
1563
+ role: "user" | "assistant";
1563
1564
  content: string | ({
1564
1565
  type: "text";
1565
1566
  text: string;
@@ -1568,8 +1569,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1568
1569
  } | undefined;
1569
1570
  } | {
1570
1571
  type: "tool_use";
1571
- name: string;
1572
1572
  id: string;
1573
+ name: string;
1573
1574
  input: Record<string, any>;
1574
1575
  cache_control?: {
1575
1576
  type: "ephemeral";
@@ -1592,7 +1593,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1592
1593
  type: "ephemeral";
1593
1594
  } | undefined;
1594
1595
  })[];
1595
- role: "user" | "assistant";
1596
1596
  }[];
1597
1597
  lastUserPromptIndex?: number | undefined;
1598
1598
  }>;
@@ -1601,12 +1601,12 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1601
1601
  result: z.ZodString;
1602
1602
  id: z.ZodString;
1603
1603
  }, "strip", z.ZodTypeAny, {
1604
- name: string;
1605
1604
  id: string;
1605
+ name: string;
1606
1606
  result: string;
1607
1607
  }, {
1608
- name: string;
1609
1608
  id: string;
1609
+ name: string;
1610
1610
  result: string;
1611
1611
  }>, "many">;
1612
1612
  }, "strip", z.ZodTypeAny, {
@@ -1644,6 +1644,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1644
1644
  }[][] | undefined;
1645
1645
  };
1646
1646
  messageHistory: {
1647
+ role: "user" | "assistant";
1647
1648
  content: string | ({
1648
1649
  type: "text";
1649
1650
  text: string;
@@ -1652,8 +1653,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1652
1653
  } | undefined;
1653
1654
  } | {
1654
1655
  type: "tool_use";
1655
- name: string;
1656
1656
  id: string;
1657
+ name: string;
1657
1658
  input: Record<string, any>;
1658
1659
  cache_control?: {
1659
1660
  type: "ephemeral";
@@ -1676,13 +1677,12 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1676
1677
  type: "ephemeral";
1677
1678
  } | undefined;
1678
1679
  })[];
1679
- role: "user" | "assistant";
1680
1680
  }[];
1681
1681
  lastUserPromptIndex?: number | undefined;
1682
1682
  };
1683
1683
  toolResults: {
1684
- name: string;
1685
1684
  id: string;
1685
+ name: string;
1686
1686
  result: string;
1687
1687
  }[];
1688
1688
  prompt?: string | undefined;
@@ -1721,6 +1721,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1721
1721
  }[][] | undefined;
1722
1722
  };
1723
1723
  messageHistory: {
1724
+ role: "user" | "assistant";
1724
1725
  content: string | ({
1725
1726
  type: "text";
1726
1727
  text: string;
@@ -1729,8 +1730,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1729
1730
  } | undefined;
1730
1731
  } | {
1731
1732
  type: "tool_use";
1732
- name: string;
1733
1733
  id: string;
1734
+ name: string;
1734
1735
  input: Record<string, any>;
1735
1736
  cache_control?: {
1736
1737
  type: "ephemeral";
@@ -1753,13 +1754,12 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1753
1754
  type: "ephemeral";
1754
1755
  } | undefined;
1755
1756
  })[];
1756
- role: "user" | "assistant";
1757
1757
  }[];
1758
1758
  lastUserPromptIndex?: number | undefined;
1759
1759
  };
1760
1760
  toolResults: {
1761
- name: string;
1762
1761
  id: string;
1762
+ name: string;
1763
1763
  result: string;
1764
1764
  }[];
1765
1765
  prompt?: string | undefined;
@@ -2005,6 +2005,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2005
2005
  }[][] | undefined;
2006
2006
  };
2007
2007
  messageHistory: {
2008
+ role: "user" | "assistant";
2008
2009
  content: string | ({
2009
2010
  type: "text";
2010
2011
  text: string;
@@ -2013,8 +2014,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2013
2014
  } | undefined;
2014
2015
  } | {
2015
2016
  type: "tool_use";
2016
- name: string;
2017
2017
  id: string;
2018
+ name: string;
2018
2019
  input: Record<string, any>;
2019
2020
  cache_control?: {
2020
2021
  type: "ephemeral";
@@ -2037,13 +2038,12 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2037
2038
  type: "ephemeral";
2038
2039
  } | undefined;
2039
2040
  })[];
2040
- role: "user" | "assistant";
2041
2041
  }[];
2042
2042
  lastUserPromptIndex?: number | undefined;
2043
2043
  };
2044
2044
  toolResults: {
2045
- name: string;
2046
2045
  id: string;
2046
+ name: string;
2047
2047
  result: string;
2048
2048
  }[];
2049
2049
  prompt?: string | undefined;
@@ -2126,6 +2126,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2126
2126
  }[][] | undefined;
2127
2127
  };
2128
2128
  messageHistory: {
2129
+ role: "user" | "assistant";
2129
2130
  content: string | ({
2130
2131
  type: "text";
2131
2132
  text: string;
@@ -2134,8 +2135,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2134
2135
  } | undefined;
2135
2136
  } | {
2136
2137
  type: "tool_use";
2137
- name: string;
2138
2138
  id: string;
2139
+ name: string;
2139
2140
  input: Record<string, any>;
2140
2141
  cache_control?: {
2141
2142
  type: "ephemeral";
@@ -2158,13 +2159,12 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2158
2159
  type: "ephemeral";
2159
2160
  } | undefined;
2160
2161
  })[];
2161
- role: "user" | "assistant";
2162
2162
  }[];
2163
2163
  lastUserPromptIndex?: number | undefined;
2164
2164
  };
2165
2165
  toolResults: {
2166
- name: string;
2167
2166
  id: string;
2167
+ name: string;
2168
2168
  result: string;
2169
2169
  }[];
2170
2170
  prompt?: string | undefined;
@@ -2255,12 +2255,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2255
2255
  path: z.ZodString;
2256
2256
  content: z.ZodString;
2257
2257
  }, "strip", z.ZodTypeAny, {
2258
- type: "file" | "patch";
2259
2258
  path: string;
2259
+ type: "patch" | "file";
2260
2260
  content: string;
2261
2261
  }, {
2262
- type: "file" | "patch";
2263
2262
  path: string;
2263
+ type: "patch" | "file";
2264
2264
  content: string;
2265
2265
  }>, "many">;
2266
2266
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
@@ -2268,12 +2268,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2268
2268
  path: z.ZodString;
2269
2269
  content: z.ZodString;
2270
2270
  }, "strip", z.ZodTypeAny, {
2271
- type: "file" | "patch";
2272
2271
  path: string;
2272
+ type: "patch" | "file";
2273
2273
  content: string;
2274
2274
  }, {
2275
- type: "file" | "patch";
2276
2275
  path: string;
2276
+ type: "patch" | "file";
2277
2277
  content: string;
2278
2278
  }>, "many">;
2279
2279
  addedFileVersions: z.ZodArray<z.ZodObject<{
@@ -2299,13 +2299,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2299
2299
  userInputId: string;
2300
2300
  response: string;
2301
2301
  changes: {
2302
- type: "file" | "patch";
2303
2302
  path: string;
2303
+ type: "patch" | "file";
2304
2304
  content: string;
2305
2305
  }[];
2306
2306
  changesAlreadyApplied: {
2307
- type: "file" | "patch";
2308
2307
  path: string;
2308
+ type: "patch" | "file";
2309
2309
  content: string;
2310
2310
  }[];
2311
2311
  addedFileVersions: {
@@ -2324,13 +2324,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2324
2324
  userInputId: string;
2325
2325
  response: string;
2326
2326
  changes: {
2327
- type: "file" | "patch";
2328
2327
  path: string;
2328
+ type: "patch" | "file";
2329
2329
  content: string;
2330
2330
  }[];
2331
2331
  changesAlreadyApplied: {
2332
- type: "file" | "patch";
2333
2332
  path: string;
2333
+ type: "patch" | "file";
2334
2334
  content: string;
2335
2335
  }[];
2336
2336
  addedFileVersions: {
@@ -2496,16 +2496,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2496
2496
  }>>;
2497
2497
  }, "strip", z.ZodTypeAny, {
2498
2498
  type: "tool_use";
2499
- name: string;
2500
2499
  id: string;
2500
+ name: string;
2501
2501
  input: Record<string, any>;
2502
2502
  cache_control?: {
2503
2503
  type: "ephemeral";
2504
2504
  } | undefined;
2505
2505
  }, {
2506
2506
  type: "tool_use";
2507
- name: string;
2508
2507
  id: string;
2508
+ name: string;
2509
2509
  input: Record<string, any>;
2510
2510
  cache_control?: {
2511
2511
  type: "ephemeral";
@@ -2579,6 +2579,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2579
2579
  } | undefined;
2580
2580
  }>]>, "many">]>;
2581
2581
  }, "strip", z.ZodTypeAny, {
2582
+ role: "user" | "assistant";
2582
2583
  content: string | ({
2583
2584
  type: "text";
2584
2585
  text: string;
@@ -2587,8 +2588,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2587
2588
  } | undefined;
2588
2589
  } | {
2589
2590
  type: "tool_use";
2590
- name: string;
2591
2591
  id: string;
2592
+ name: string;
2592
2593
  input: Record<string, any>;
2593
2594
  cache_control?: {
2594
2595
  type: "ephemeral";
@@ -2611,8 +2612,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2611
2612
  type: "ephemeral";
2612
2613
  } | undefined;
2613
2614
  })[];
2614
- role: "user" | "assistant";
2615
2615
  }, {
2616
+ role: "user" | "assistant";
2616
2617
  content: string | ({
2617
2618
  type: "text";
2618
2619
  text: string;
@@ -2621,8 +2622,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2621
2622
  } | undefined;
2622
2623
  } | {
2623
2624
  type: "tool_use";
2624
- name: string;
2625
2625
  id: string;
2626
+ name: string;
2626
2627
  input: Record<string, any>;
2627
2628
  cache_control?: {
2628
2629
  type: "ephemeral";
@@ -2645,7 +2646,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2645
2646
  type: "ephemeral";
2646
2647
  } | undefined;
2647
2648
  })[];
2648
- role: "user" | "assistant";
2649
2649
  }>, "many">;
2650
2650
  lastUserPromptIndex: z.ZodOptional<z.ZodNumber>;
2651
2651
  }, "strip", z.ZodTypeAny, {
@@ -2678,6 +2678,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2678
2678
  }[][] | undefined;
2679
2679
  };
2680
2680
  messageHistory: {
2681
+ role: "user" | "assistant";
2681
2682
  content: string | ({
2682
2683
  type: "text";
2683
2684
  text: string;
@@ -2686,8 +2687,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2686
2687
  } | undefined;
2687
2688
  } | {
2688
2689
  type: "tool_use";
2689
- name: string;
2690
2690
  id: string;
2691
+ name: string;
2691
2692
  input: Record<string, any>;
2692
2693
  cache_control?: {
2693
2694
  type: "ephemeral";
@@ -2710,7 +2711,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2710
2711
  type: "ephemeral";
2711
2712
  } | undefined;
2712
2713
  })[];
2713
- role: "user" | "assistant";
2714
2714
  }[];
2715
2715
  lastUserPromptIndex?: number | undefined;
2716
2716
  }, {
@@ -2743,6 +2743,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2743
2743
  }[][] | undefined;
2744
2744
  };
2745
2745
  messageHistory: {
2746
+ role: "user" | "assistant";
2746
2747
  content: string | ({
2747
2748
  type: "text";
2748
2749
  text: string;
@@ -2751,8 +2752,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2751
2752
  } | undefined;
2752
2753
  } | {
2753
2754
  type: "tool_use";
2754
- name: string;
2755
2755
  id: string;
2756
+ name: string;
2756
2757
  input: Record<string, any>;
2757
2758
  cache_control?: {
2758
2759
  type: "ephemeral";
@@ -2775,7 +2776,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2775
2776
  type: "ephemeral";
2776
2777
  } | undefined;
2777
2778
  })[];
2778
- role: "user" | "assistant";
2779
2779
  }[];
2780
2780
  lastUserPromptIndex?: number | undefined;
2781
2781
  }>;
@@ -2784,12 +2784,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2784
2784
  parameters: z.ZodRecord<z.ZodString, z.ZodString>;
2785
2785
  id: z.ZodString;
2786
2786
  }, "strip", z.ZodTypeAny, {
2787
- name: string;
2788
2787
  id: string;
2788
+ name: string;
2789
2789
  parameters: Record<string, string>;
2790
2790
  }, {
2791
- name: string;
2792
2791
  id: string;
2792
+ name: string;
2793
2793
  parameters: Record<string, string>;
2794
2794
  }>, "many">;
2795
2795
  toolResults: z.ZodArray<z.ZodObject<{
@@ -2797,12 +2797,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2797
2797
  result: z.ZodString;
2798
2798
  id: z.ZodString;
2799
2799
  }, "strip", z.ZodTypeAny, {
2800
- name: string;
2801
2800
  id: string;
2801
+ name: string;
2802
2802
  result: string;
2803
2803
  }, {
2804
- name: string;
2805
2804
  id: string;
2805
+ name: string;
2806
2806
  result: string;
2807
2807
  }>, "many">;
2808
2808
  }, "strip", z.ZodTypeAny, {
@@ -2838,6 +2838,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2838
2838
  }[][] | undefined;
2839
2839
  };
2840
2840
  messageHistory: {
2841
+ role: "user" | "assistant";
2841
2842
  content: string | ({
2842
2843
  type: "text";
2843
2844
  text: string;
@@ -2846,8 +2847,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2846
2847
  } | undefined;
2847
2848
  } | {
2848
2849
  type: "tool_use";
2849
- name: string;
2850
2850
  id: string;
2851
+ name: string;
2851
2852
  input: Record<string, any>;
2852
2853
  cache_control?: {
2853
2854
  type: "ephemeral";
@@ -2870,18 +2871,17 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2870
2871
  type: "ephemeral";
2871
2872
  } | undefined;
2872
2873
  })[];
2873
- role: "user" | "assistant";
2874
2874
  }[];
2875
2875
  lastUserPromptIndex?: number | undefined;
2876
2876
  };
2877
2877
  toolResults: {
2878
- name: string;
2879
2878
  id: string;
2879
+ name: string;
2880
2880
  result: string;
2881
2881
  }[];
2882
2882
  toolCalls: {
2883
- name: string;
2884
2883
  id: string;
2884
+ name: string;
2885
2885
  parameters: Record<string, string>;
2886
2886
  }[];
2887
2887
  }, {
@@ -2917,6 +2917,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2917
2917
  }[][] | undefined;
2918
2918
  };
2919
2919
  messageHistory: {
2920
+ role: "user" | "assistant";
2920
2921
  content: string | ({
2921
2922
  type: "text";
2922
2923
  text: string;
@@ -2925,8 +2926,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2925
2926
  } | undefined;
2926
2927
  } | {
2927
2928
  type: "tool_use";
2928
- name: string;
2929
2929
  id: string;
2930
+ name: string;
2930
2931
  input: Record<string, any>;
2931
2932
  cache_control?: {
2932
2933
  type: "ephemeral";
@@ -2949,18 +2950,17 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2949
2950
  type: "ephemeral";
2950
2951
  } | undefined;
2951
2952
  })[];
2952
- role: "user" | "assistant";
2953
2953
  }[];
2954
2954
  lastUserPromptIndex?: number | undefined;
2955
2955
  };
2956
2956
  toolResults: {
2957
- name: string;
2958
2957
  id: string;
2958
+ name: string;
2959
2959
  result: string;
2960
2960
  }[];
2961
2961
  toolCalls: {
2962
- name: string;
2963
2962
  id: string;
2963
+ name: string;
2964
2964
  parameters: Record<string, string>;
2965
2965
  }[];
2966
2966
  }>, z.ZodObject<{
@@ -2984,12 +2984,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2984
2984
  id: z.ZodString;
2985
2985
  input: z.ZodRecord<z.ZodString, z.ZodAny>;
2986
2986
  }, "strip", z.ZodTypeAny, {
2987
- name: string;
2988
2987
  id: string;
2988
+ name: string;
2989
2989
  input: Record<string, any>;
2990
2990
  }, {
2991
- name: string;
2992
2991
  id: string;
2992
+ name: string;
2993
2993
  input: Record<string, any>;
2994
2994
  }>;
2995
2995
  changes: z.ZodArray<z.ZodObject<{
@@ -2997,12 +2997,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2997
2997
  path: z.ZodString;
2998
2998
  content: z.ZodString;
2999
2999
  }, "strip", z.ZodTypeAny, {
3000
- type: "file" | "patch";
3001
3000
  path: string;
3001
+ type: "patch" | "file";
3002
3002
  content: string;
3003
3003
  }, {
3004
- type: "file" | "patch";
3005
3004
  path: string;
3005
+ type: "patch" | "file";
3006
3006
  content: string;
3007
3007
  }>, "many">;
3008
3008
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
@@ -3010,12 +3010,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3010
3010
  path: z.ZodString;
3011
3011
  content: z.ZodString;
3012
3012
  }, "strip", z.ZodTypeAny, {
3013
- type: "file" | "patch";
3014
3013
  path: string;
3014
+ type: "patch" | "file";
3015
3015
  content: string;
3016
3016
  }, {
3017
- type: "file" | "patch";
3018
3017
  path: string;
3018
+ type: "patch" | "file";
3019
3019
  content: string;
3020
3020
  }>, "many">;
3021
3021
  addedFileVersions: z.ZodArray<z.ZodObject<{
@@ -3032,20 +3032,20 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3032
3032
  }, "strip", z.ZodTypeAny, {
3033
3033
  type: "tool-call";
3034
3034
  data: {
3035
- name: string;
3036
3035
  id: string;
3036
+ name: string;
3037
3037
  input: Record<string, any>;
3038
3038
  };
3039
3039
  userInputId: string;
3040
3040
  response: string;
3041
3041
  changes: {
3042
- type: "file" | "patch";
3043
3042
  path: string;
3043
+ type: "patch" | "file";
3044
3044
  content: string;
3045
3045
  }[];
3046
3046
  changesAlreadyApplied: {
3047
- type: "file" | "patch";
3048
3047
  path: string;
3048
+ type: "patch" | "file";
3049
3049
  content: string;
3050
3050
  }[];
3051
3051
  addedFileVersions: {
@@ -3056,20 +3056,20 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3056
3056
  }, {
3057
3057
  type: "tool-call";
3058
3058
  data: {
3059
- name: string;
3060
3059
  id: string;
3060
+ name: string;
3061
3061
  input: Record<string, any>;
3062
3062
  };
3063
3063
  userInputId: string;
3064
3064
  response: string;
3065
3065
  changes: {
3066
- type: "file" | "patch";
3067
3066
  path: string;
3067
+ type: "patch" | "file";
3068
3068
  content: string;
3069
3069
  }[];
3070
3070
  changesAlreadyApplied: {
3071
- type: "file" | "patch";
3072
3071
  path: string;
3072
+ type: "patch" | "file";
3073
3073
  content: string;
3074
3074
  }[];
3075
3075
  addedFileVersions: {
@@ -3167,11 +3167,11 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3167
3167
  type: z.ZodLiteral<"action-error">;
3168
3168
  message: z.ZodString;
3169
3169
  }, "strip", z.ZodTypeAny, {
3170
- type: "action-error";
3171
3170
  message: string;
3172
- }, {
3173
3171
  type: "action-error";
3172
+ }, {
3174
3173
  message: string;
3174
+ type: "action-error";
3175
3175
  }>, z.ZodObject<{
3176
3176
  type: z.ZodLiteral<"commit-message-response">;
3177
3177
  commitMessage: z.ZodString;
@@ -3205,13 +3205,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3205
3205
  userInputId: string;
3206
3206
  response: string;
3207
3207
  changes: {
3208
- type: "file" | "patch";
3209
3208
  path: string;
3209
+ type: "patch" | "file";
3210
3210
  content: string;
3211
3211
  }[];
3212
3212
  changesAlreadyApplied: {
3213
- type: "file" | "patch";
3214
3213
  path: string;
3214
+ type: "patch" | "file";
3215
3215
  content: string;
3216
3216
  }[];
3217
3217
  addedFileVersions: {
@@ -3262,6 +3262,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3262
3262
  }[][] | undefined;
3263
3263
  };
3264
3264
  messageHistory: {
3265
+ role: "user" | "assistant";
3265
3266
  content: string | ({
3266
3267
  type: "text";
3267
3268
  text: string;
@@ -3270,8 +3271,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3270
3271
  } | undefined;
3271
3272
  } | {
3272
3273
  type: "tool_use";
3273
- name: string;
3274
3274
  id: string;
3275
+ name: string;
3275
3276
  input: Record<string, any>;
3276
3277
  cache_control?: {
3277
3278
  type: "ephemeral";
@@ -3294,18 +3295,17 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3294
3295
  type: "ephemeral";
3295
3296
  } | undefined;
3296
3297
  })[];
3297
- role: "user" | "assistant";
3298
3298
  }[];
3299
3299
  lastUserPromptIndex?: number | undefined;
3300
3300
  };
3301
3301
  toolResults: {
3302
- name: string;
3303
3302
  id: string;
3303
+ name: string;
3304
3304
  result: string;
3305
3305
  }[];
3306
3306
  toolCalls: {
3307
- name: string;
3308
3307
  id: string;
3308
+ name: string;
3309
3309
  parameters: Record<string, string>;
3310
3310
  }[];
3311
3311
  } | {
@@ -3319,20 +3319,20 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3319
3319
  } | {
3320
3320
  type: "tool-call";
3321
3321
  data: {
3322
- name: string;
3323
3322
  id: string;
3323
+ name: string;
3324
3324
  input: Record<string, any>;
3325
3325
  };
3326
3326
  userInputId: string;
3327
3327
  response: string;
3328
3328
  changes: {
3329
- type: "file" | "patch";
3330
3329
  path: string;
3330
+ type: "patch" | "file";
3331
3331
  content: string;
3332
3332
  }[];
3333
3333
  changesAlreadyApplied: {
3334
- type: "file" | "patch";
3335
3334
  path: string;
3335
+ type: "patch" | "file";
3336
3336
  content: string;
3337
3337
  }[];
3338
3338
  addedFileVersions: {
@@ -3349,8 +3349,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3349
3349
  isUpToDate: boolean;
3350
3350
  latestVersion: string;
3351
3351
  } | {
3352
- type: "action-error";
3353
3352
  message: string;
3353
+ type: "action-error";
3354
3354
  } | {
3355
3355
  type: "commit-message-response";
3356
3356
  commitMessage: string;
@@ -3378,13 +3378,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3378
3378
  userInputId: string;
3379
3379
  response: string;
3380
3380
  changes: {
3381
- type: "file" | "patch";
3382
3381
  path: string;
3382
+ type: "patch" | "file";
3383
3383
  content: string;
3384
3384
  }[];
3385
3385
  changesAlreadyApplied: {
3386
- type: "file" | "patch";
3387
3386
  path: string;
3387
+ type: "patch" | "file";
3388
3388
  content: string;
3389
3389
  }[];
3390
3390
  addedFileVersions: {
@@ -3435,6 +3435,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3435
3435
  }[][] | undefined;
3436
3436
  };
3437
3437
  messageHistory: {
3438
+ role: "user" | "assistant";
3438
3439
  content: string | ({
3439
3440
  type: "text";
3440
3441
  text: string;
@@ -3443,8 +3444,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3443
3444
  } | undefined;
3444
3445
  } | {
3445
3446
  type: "tool_use";
3446
- name: string;
3447
3447
  id: string;
3448
+ name: string;
3448
3449
  input: Record<string, any>;
3449
3450
  cache_control?: {
3450
3451
  type: "ephemeral";
@@ -3467,18 +3468,17 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3467
3468
  type: "ephemeral";
3468
3469
  } | undefined;
3469
3470
  })[];
3470
- role: "user" | "assistant";
3471
3471
  }[];
3472
3472
  lastUserPromptIndex?: number | undefined;
3473
3473
  };
3474
3474
  toolResults: {
3475
- name: string;
3476
3475
  id: string;
3476
+ name: string;
3477
3477
  result: string;
3478
3478
  }[];
3479
3479
  toolCalls: {
3480
- name: string;
3481
3480
  id: string;
3481
+ name: string;
3482
3482
  parameters: Record<string, string>;
3483
3483
  }[];
3484
3484
  } | {
@@ -3492,20 +3492,20 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3492
3492
  } | {
3493
3493
  type: "tool-call";
3494
3494
  data: {
3495
- name: string;
3496
3495
  id: string;
3496
+ name: string;
3497
3497
  input: Record<string, any>;
3498
3498
  };
3499
3499
  userInputId: string;
3500
3500
  response: string;
3501
3501
  changes: {
3502
- type: "file" | "patch";
3503
3502
  path: string;
3503
+ type: "patch" | "file";
3504
3504
  content: string;
3505
3505
  }[];
3506
3506
  changesAlreadyApplied: {
3507
- type: "file" | "patch";
3508
3507
  path: string;
3508
+ type: "patch" | "file";
3509
3509
  content: string;
3510
3510
  }[];
3511
3511
  addedFileVersions: {
@@ -3522,8 +3522,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3522
3522
  isUpToDate: boolean;
3523
3523
  latestVersion: string;
3524
3524
  } | {
3525
- type: "action-error";
3526
3525
  message: string;
3526
+ type: "action-error";
3527
3527
  } | {
3528
3528
  type: "commit-message-response";
3529
3529
  commitMessage: string;
@@ -3568,12 +3568,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3568
3568
  path: z.ZodString;
3569
3569
  content: z.ZodString;
3570
3570
  }, "strip", z.ZodTypeAny, {
3571
- type: "file" | "patch";
3572
3571
  path: string;
3572
+ type: "patch" | "file";
3573
3573
  content: string;
3574
3574
  }, {
3575
- type: "file" | "patch";
3576
3575
  path: string;
3576
+ type: "patch" | "file";
3577
3577
  content: string;
3578
3578
  }>, "many">;
3579
3579
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
@@ -3581,12 +3581,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3581
3581
  path: z.ZodString;
3582
3582
  content: z.ZodString;
3583
3583
  }, "strip", z.ZodTypeAny, {
3584
- type: "file" | "patch";
3585
3584
  path: string;
3585
+ type: "patch" | "file";
3586
3586
  content: string;
3587
3587
  }, {
3588
- type: "file" | "patch";
3589
3588
  path: string;
3589
+ type: "patch" | "file";
3590
3590
  content: string;
3591
3591
  }>, "many">;
3592
3592
  addedFileVersions: z.ZodArray<z.ZodObject<{
@@ -3612,13 +3612,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3612
3612
  userInputId: string;
3613
3613
  response: string;
3614
3614
  changes: {
3615
- type: "file" | "patch";
3616
3615
  path: string;
3616
+ type: "patch" | "file";
3617
3617
  content: string;
3618
3618
  }[];
3619
3619
  changesAlreadyApplied: {
3620
- type: "file" | "patch";
3621
3620
  path: string;
3621
+ type: "patch" | "file";
3622
3622
  content: string;
3623
3623
  }[];
3624
3624
  addedFileVersions: {
@@ -3637,13 +3637,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3637
3637
  userInputId: string;
3638
3638
  response: string;
3639
3639
  changes: {
3640
- type: "file" | "patch";
3641
3640
  path: string;
3641
+ type: "patch" | "file";
3642
3642
  content: string;
3643
3643
  }[];
3644
3644
  changesAlreadyApplied: {
3645
- type: "file" | "patch";
3646
3645
  path: string;
3646
+ type: "patch" | "file";
3647
3647
  content: string;
3648
3648
  }[];
3649
3649
  addedFileVersions: {
@@ -3809,16 +3809,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3809
3809
  }>>;
3810
3810
  }, "strip", z.ZodTypeAny, {
3811
3811
  type: "tool_use";
3812
- name: string;
3813
3812
  id: string;
3813
+ name: string;
3814
3814
  input: Record<string, any>;
3815
3815
  cache_control?: {
3816
3816
  type: "ephemeral";
3817
3817
  } | undefined;
3818
3818
  }, {
3819
3819
  type: "tool_use";
3820
- name: string;
3821
3820
  id: string;
3821
+ name: string;
3822
3822
  input: Record<string, any>;
3823
3823
  cache_control?: {
3824
3824
  type: "ephemeral";
@@ -3892,6 +3892,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3892
3892
  } | undefined;
3893
3893
  }>]>, "many">]>;
3894
3894
  }, "strip", z.ZodTypeAny, {
3895
+ role: "user" | "assistant";
3895
3896
  content: string | ({
3896
3897
  type: "text";
3897
3898
  text: string;
@@ -3900,8 +3901,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3900
3901
  } | undefined;
3901
3902
  } | {
3902
3903
  type: "tool_use";
3903
- name: string;
3904
3904
  id: string;
3905
+ name: string;
3905
3906
  input: Record<string, any>;
3906
3907
  cache_control?: {
3907
3908
  type: "ephemeral";
@@ -3924,8 +3925,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3924
3925
  type: "ephemeral";
3925
3926
  } | undefined;
3926
3927
  })[];
3927
- role: "user" | "assistant";
3928
3928
  }, {
3929
+ role: "user" | "assistant";
3929
3930
  content: string | ({
3930
3931
  type: "text";
3931
3932
  text: string;
@@ -3934,8 +3935,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3934
3935
  } | undefined;
3935
3936
  } | {
3936
3937
  type: "tool_use";
3937
- name: string;
3938
3938
  id: string;
3939
+ name: string;
3939
3940
  input: Record<string, any>;
3940
3941
  cache_control?: {
3941
3942
  type: "ephemeral";
@@ -3958,7 +3959,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3958
3959
  type: "ephemeral";
3959
3960
  } | undefined;
3960
3961
  })[];
3961
- role: "user" | "assistant";
3962
3962
  }>, "many">;
3963
3963
  lastUserPromptIndex: z.ZodOptional<z.ZodNumber>;
3964
3964
  }, "strip", z.ZodTypeAny, {
@@ -3991,6 +3991,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3991
3991
  }[][] | undefined;
3992
3992
  };
3993
3993
  messageHistory: {
3994
+ role: "user" | "assistant";
3994
3995
  content: string | ({
3995
3996
  type: "text";
3996
3997
  text: string;
@@ -3999,8 +4000,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3999
4000
  } | undefined;
4000
4001
  } | {
4001
4002
  type: "tool_use";
4002
- name: string;
4003
4003
  id: string;
4004
+ name: string;
4004
4005
  input: Record<string, any>;
4005
4006
  cache_control?: {
4006
4007
  type: "ephemeral";
@@ -4023,7 +4024,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4023
4024
  type: "ephemeral";
4024
4025
  } | undefined;
4025
4026
  })[];
4026
- role: "user" | "assistant";
4027
4027
  }[];
4028
4028
  lastUserPromptIndex?: number | undefined;
4029
4029
  }, {
@@ -4056,6 +4056,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4056
4056
  }[][] | undefined;
4057
4057
  };
4058
4058
  messageHistory: {
4059
+ role: "user" | "assistant";
4059
4060
  content: string | ({
4060
4061
  type: "text";
4061
4062
  text: string;
@@ -4064,8 +4065,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4064
4065
  } | undefined;
4065
4066
  } | {
4066
4067
  type: "tool_use";
4067
- name: string;
4068
4068
  id: string;
4069
+ name: string;
4069
4070
  input: Record<string, any>;
4070
4071
  cache_control?: {
4071
4072
  type: "ephemeral";
@@ -4088,7 +4089,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4088
4089
  type: "ephemeral";
4089
4090
  } | undefined;
4090
4091
  })[];
4091
- role: "user" | "assistant";
4092
4092
  }[];
4093
4093
  lastUserPromptIndex?: number | undefined;
4094
4094
  }>;
@@ -4097,12 +4097,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4097
4097
  parameters: z.ZodRecord<z.ZodString, z.ZodString>;
4098
4098
  id: z.ZodString;
4099
4099
  }, "strip", z.ZodTypeAny, {
4100
- name: string;
4101
4100
  id: string;
4101
+ name: string;
4102
4102
  parameters: Record<string, string>;
4103
4103
  }, {
4104
- name: string;
4105
4104
  id: string;
4105
+ name: string;
4106
4106
  parameters: Record<string, string>;
4107
4107
  }>, "many">;
4108
4108
  toolResults: z.ZodArray<z.ZodObject<{
@@ -4110,12 +4110,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4110
4110
  result: z.ZodString;
4111
4111
  id: z.ZodString;
4112
4112
  }, "strip", z.ZodTypeAny, {
4113
- name: string;
4114
4113
  id: string;
4114
+ name: string;
4115
4115
  result: string;
4116
4116
  }, {
4117
- name: string;
4118
4117
  id: string;
4118
+ name: string;
4119
4119
  result: string;
4120
4120
  }>, "many">;
4121
4121
  }, "strip", z.ZodTypeAny, {
@@ -4151,6 +4151,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4151
4151
  }[][] | undefined;
4152
4152
  };
4153
4153
  messageHistory: {
4154
+ role: "user" | "assistant";
4154
4155
  content: string | ({
4155
4156
  type: "text";
4156
4157
  text: string;
@@ -4159,8 +4160,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4159
4160
  } | undefined;
4160
4161
  } | {
4161
4162
  type: "tool_use";
4162
- name: string;
4163
4163
  id: string;
4164
+ name: string;
4164
4165
  input: Record<string, any>;
4165
4166
  cache_control?: {
4166
4167
  type: "ephemeral";
@@ -4183,18 +4184,17 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4183
4184
  type: "ephemeral";
4184
4185
  } | undefined;
4185
4186
  })[];
4186
- role: "user" | "assistant";
4187
4187
  }[];
4188
4188
  lastUserPromptIndex?: number | undefined;
4189
4189
  };
4190
4190
  toolResults: {
4191
- name: string;
4192
4191
  id: string;
4192
+ name: string;
4193
4193
  result: string;
4194
4194
  }[];
4195
4195
  toolCalls: {
4196
- name: string;
4197
4196
  id: string;
4197
+ name: string;
4198
4198
  parameters: Record<string, string>;
4199
4199
  }[];
4200
4200
  }, {
@@ -4230,6 +4230,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4230
4230
  }[][] | undefined;
4231
4231
  };
4232
4232
  messageHistory: {
4233
+ role: "user" | "assistant";
4233
4234
  content: string | ({
4234
4235
  type: "text";
4235
4236
  text: string;
@@ -4238,8 +4239,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4238
4239
  } | undefined;
4239
4240
  } | {
4240
4241
  type: "tool_use";
4241
- name: string;
4242
4242
  id: string;
4243
+ name: string;
4243
4244
  input: Record<string, any>;
4244
4245
  cache_control?: {
4245
4246
  type: "ephemeral";
@@ -4262,18 +4263,17 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4262
4263
  type: "ephemeral";
4263
4264
  } | undefined;
4264
4265
  })[];
4265
- role: "user" | "assistant";
4266
4266
  }[];
4267
4267
  lastUserPromptIndex?: number | undefined;
4268
4268
  };
4269
4269
  toolResults: {
4270
- name: string;
4271
4270
  id: string;
4271
+ name: string;
4272
4272
  result: string;
4273
4273
  }[];
4274
4274
  toolCalls: {
4275
- name: string;
4276
4275
  id: string;
4276
+ name: string;
4277
4277
  parameters: Record<string, string>;
4278
4278
  }[];
4279
4279
  }>, z.ZodObject<{
@@ -4297,12 +4297,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4297
4297
  id: z.ZodString;
4298
4298
  input: z.ZodRecord<z.ZodString, z.ZodAny>;
4299
4299
  }, "strip", z.ZodTypeAny, {
4300
- name: string;
4301
4300
  id: string;
4301
+ name: string;
4302
4302
  input: Record<string, any>;
4303
4303
  }, {
4304
- name: string;
4305
4304
  id: string;
4305
+ name: string;
4306
4306
  input: Record<string, any>;
4307
4307
  }>;
4308
4308
  changes: z.ZodArray<z.ZodObject<{
@@ -4310,12 +4310,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4310
4310
  path: z.ZodString;
4311
4311
  content: z.ZodString;
4312
4312
  }, "strip", z.ZodTypeAny, {
4313
- type: "file" | "patch";
4314
4313
  path: string;
4314
+ type: "patch" | "file";
4315
4315
  content: string;
4316
4316
  }, {
4317
- type: "file" | "patch";
4318
4317
  path: string;
4318
+ type: "patch" | "file";
4319
4319
  content: string;
4320
4320
  }>, "many">;
4321
4321
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
@@ -4323,12 +4323,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4323
4323
  path: z.ZodString;
4324
4324
  content: z.ZodString;
4325
4325
  }, "strip", z.ZodTypeAny, {
4326
- type: "file" | "patch";
4327
4326
  path: string;
4327
+ type: "patch" | "file";
4328
4328
  content: string;
4329
4329
  }, {
4330
- type: "file" | "patch";
4331
4330
  path: string;
4331
+ type: "patch" | "file";
4332
4332
  content: string;
4333
4333
  }>, "many">;
4334
4334
  addedFileVersions: z.ZodArray<z.ZodObject<{
@@ -4345,20 +4345,20 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4345
4345
  }, "strip", z.ZodTypeAny, {
4346
4346
  type: "tool-call";
4347
4347
  data: {
4348
- name: string;
4349
4348
  id: string;
4349
+ name: string;
4350
4350
  input: Record<string, any>;
4351
4351
  };
4352
4352
  userInputId: string;
4353
4353
  response: string;
4354
4354
  changes: {
4355
- type: "file" | "patch";
4356
4355
  path: string;
4356
+ type: "patch" | "file";
4357
4357
  content: string;
4358
4358
  }[];
4359
4359
  changesAlreadyApplied: {
4360
- type: "file" | "patch";
4361
4360
  path: string;
4361
+ type: "patch" | "file";
4362
4362
  content: string;
4363
4363
  }[];
4364
4364
  addedFileVersions: {
@@ -4369,20 +4369,20 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4369
4369
  }, {
4370
4370
  type: "tool-call";
4371
4371
  data: {
4372
- name: string;
4373
4372
  id: string;
4373
+ name: string;
4374
4374
  input: Record<string, any>;
4375
4375
  };
4376
4376
  userInputId: string;
4377
4377
  response: string;
4378
4378
  changes: {
4379
- type: "file" | "patch";
4380
4379
  path: string;
4380
+ type: "patch" | "file";
4381
4381
  content: string;
4382
4382
  }[];
4383
4383
  changesAlreadyApplied: {
4384
- type: "file" | "patch";
4385
4384
  path: string;
4385
+ type: "patch" | "file";
4386
4386
  content: string;
4387
4387
  }[];
4388
4388
  addedFileVersions: {
@@ -4480,11 +4480,11 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4480
4480
  type: z.ZodLiteral<"action-error">;
4481
4481
  message: z.ZodString;
4482
4482
  }, "strip", z.ZodTypeAny, {
4483
- type: "action-error";
4484
4483
  message: string;
4485
- }, {
4486
4484
  type: "action-error";
4485
+ }, {
4487
4486
  message: string;
4487
+ type: "action-error";
4488
4488
  }>, z.ZodObject<{
4489
4489
  type: z.ZodLiteral<"commit-message-response">;
4490
4490
  commitMessage: z.ZodString;
@@ -4518,13 +4518,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4518
4518
  userInputId: string;
4519
4519
  response: string;
4520
4520
  changes: {
4521
- type: "file" | "patch";
4522
4521
  path: string;
4522
+ type: "patch" | "file";
4523
4523
  content: string;
4524
4524
  }[];
4525
4525
  changesAlreadyApplied: {
4526
- type: "file" | "patch";
4527
4526
  path: string;
4527
+ type: "patch" | "file";
4528
4528
  content: string;
4529
4529
  }[];
4530
4530
  addedFileVersions: {
@@ -4575,6 +4575,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4575
4575
  }[][] | undefined;
4576
4576
  };
4577
4577
  messageHistory: {
4578
+ role: "user" | "assistant";
4578
4579
  content: string | ({
4579
4580
  type: "text";
4580
4581
  text: string;
@@ -4583,8 +4584,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4583
4584
  } | undefined;
4584
4585
  } | {
4585
4586
  type: "tool_use";
4586
- name: string;
4587
4587
  id: string;
4588
+ name: string;
4588
4589
  input: Record<string, any>;
4589
4590
  cache_control?: {
4590
4591
  type: "ephemeral";
@@ -4607,18 +4608,17 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4607
4608
  type: "ephemeral";
4608
4609
  } | undefined;
4609
4610
  })[];
4610
- role: "user" | "assistant";
4611
4611
  }[];
4612
4612
  lastUserPromptIndex?: number | undefined;
4613
4613
  };
4614
4614
  toolResults: {
4615
- name: string;
4616
4615
  id: string;
4616
+ name: string;
4617
4617
  result: string;
4618
4618
  }[];
4619
4619
  toolCalls: {
4620
- name: string;
4621
4620
  id: string;
4621
+ name: string;
4622
4622
  parameters: Record<string, string>;
4623
4623
  }[];
4624
4624
  } | {
@@ -4632,20 +4632,20 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4632
4632
  } | {
4633
4633
  type: "tool-call";
4634
4634
  data: {
4635
- name: string;
4636
4635
  id: string;
4636
+ name: string;
4637
4637
  input: Record<string, any>;
4638
4638
  };
4639
4639
  userInputId: string;
4640
4640
  response: string;
4641
4641
  changes: {
4642
- type: "file" | "patch";
4643
4642
  path: string;
4643
+ type: "patch" | "file";
4644
4644
  content: string;
4645
4645
  }[];
4646
4646
  changesAlreadyApplied: {
4647
- type: "file" | "patch";
4648
4647
  path: string;
4648
+ type: "patch" | "file";
4649
4649
  content: string;
4650
4650
  }[];
4651
4651
  addedFileVersions: {
@@ -4662,8 +4662,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4662
4662
  isUpToDate: boolean;
4663
4663
  latestVersion: string;
4664
4664
  } | {
4665
- type: "action-error";
4666
4665
  message: string;
4666
+ type: "action-error";
4667
4667
  } | {
4668
4668
  type: "commit-message-response";
4669
4669
  commitMessage: string;
@@ -4691,13 +4691,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4691
4691
  userInputId: string;
4692
4692
  response: string;
4693
4693
  changes: {
4694
- type: "file" | "patch";
4695
4694
  path: string;
4695
+ type: "patch" | "file";
4696
4696
  content: string;
4697
4697
  }[];
4698
4698
  changesAlreadyApplied: {
4699
- type: "file" | "patch";
4700
4699
  path: string;
4700
+ type: "patch" | "file";
4701
4701
  content: string;
4702
4702
  }[];
4703
4703
  addedFileVersions: {
@@ -4748,6 +4748,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4748
4748
  }[][] | undefined;
4749
4749
  };
4750
4750
  messageHistory: {
4751
+ role: "user" | "assistant";
4751
4752
  content: string | ({
4752
4753
  type: "text";
4753
4754
  text: string;
@@ -4756,8 +4757,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4756
4757
  } | undefined;
4757
4758
  } | {
4758
4759
  type: "tool_use";
4759
- name: string;
4760
4760
  id: string;
4761
+ name: string;
4761
4762
  input: Record<string, any>;
4762
4763
  cache_control?: {
4763
4764
  type: "ephemeral";
@@ -4780,18 +4781,17 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4780
4781
  type: "ephemeral";
4781
4782
  } | undefined;
4782
4783
  })[];
4783
- role: "user" | "assistant";
4784
4784
  }[];
4785
4785
  lastUserPromptIndex?: number | undefined;
4786
4786
  };
4787
4787
  toolResults: {
4788
- name: string;
4789
4788
  id: string;
4789
+ name: string;
4790
4790
  result: string;
4791
4791
  }[];
4792
4792
  toolCalls: {
4793
- name: string;
4794
4793
  id: string;
4794
+ name: string;
4795
4795
  parameters: Record<string, string>;
4796
4796
  }[];
4797
4797
  } | {
@@ -4805,20 +4805,20 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4805
4805
  } | {
4806
4806
  type: "tool-call";
4807
4807
  data: {
4808
- name: string;
4809
4808
  id: string;
4809
+ name: string;
4810
4810
  input: Record<string, any>;
4811
4811
  };
4812
4812
  userInputId: string;
4813
4813
  response: string;
4814
4814
  changes: {
4815
- type: "file" | "patch";
4816
4815
  path: string;
4816
+ type: "patch" | "file";
4817
4817
  content: string;
4818
4818
  }[];
4819
4819
  changesAlreadyApplied: {
4820
- type: "file" | "patch";
4821
4820
  path: string;
4821
+ type: "patch" | "file";
4822
4822
  content: string;
4823
4823
  }[];
4824
4824
  addedFileVersions: {
@@ -4835,8 +4835,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4835
4835
  isUpToDate: boolean;
4836
4836
  latestVersion: string;
4837
4837
  } | {
4838
- type: "action-error";
4839
4838
  message: string;
4839
+ type: "action-error";
4840
4840
  } | {
4841
4841
  type: "commit-message-response";
4842
4842
  commitMessage: string;