codebuff 1.0.104 → 1.0.108

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.
@@ -121,15 +121,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
121
121
  type: "ephemeral";
122
122
  }>>;
123
123
  }, "strip", z.ZodTypeAny, {
124
- content: string;
125
124
  type: "tool_result";
125
+ content: string;
126
126
  tool_use_id: string;
127
127
  cache_control?: {
128
128
  type: "ephemeral";
129
129
  } | undefined;
130
130
  }, {
131
- content: string;
132
131
  type: "tool_result";
132
+ content: string;
133
133
  tool_use_id: string;
134
134
  cache_control?: {
135
135
  type: "ephemeral";
@@ -151,8 +151,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
151
151
  type: "ephemeral";
152
152
  } | undefined;
153
153
  } | {
154
- content: string;
155
154
  type: "tool_result";
155
+ content: string;
156
156
  tool_use_id: string;
157
157
  cache_control?: {
158
158
  type: "ephemeral";
@@ -175,8 +175,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
175
175
  type: "ephemeral";
176
176
  } | undefined;
177
177
  } | {
178
- content: string;
179
178
  type: "tool_result";
179
+ content: string;
180
180
  tool_use_id: string;
181
181
  cache_control?: {
182
182
  type: "ephemeral";
@@ -257,13 +257,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
257
257
  filePath: z.ZodString;
258
258
  content: z.ZodString;
259
259
  }, "strip", z.ZodTypeAny, {
260
- content: string;
261
- type: "file" | "patch";
260
+ type: "patch" | "file";
262
261
  filePath: string;
263
- }, {
264
262
  content: string;
265
- type: "file" | "patch";
263
+ }, {
264
+ type: "patch" | "file";
266
265
  filePath: string;
266
+ content: string;
267
267
  }>, "many">;
268
268
  }, "strip", z.ZodTypeAny, {
269
269
  type: "user-input";
@@ -285,8 +285,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
285
285
  type: "ephemeral";
286
286
  } | undefined;
287
287
  } | {
288
- content: string;
289
288
  type: "tool_result";
289
+ content: string;
290
290
  tool_use_id: string;
291
291
  cache_control?: {
292
292
  type: "ephemeral";
@@ -313,9 +313,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
313
313
  }[][];
314
314
  };
315
315
  previousChanges: {
316
- content: string;
317
- type: "file" | "patch";
316
+ type: "patch" | "file";
318
317
  filePath: string;
318
+ content: string;
319
319
  }[];
320
320
  authToken?: string | undefined;
321
321
  }, {
@@ -338,8 +338,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
338
338
  type: "ephemeral";
339
339
  } | undefined;
340
340
  } | {
341
- content: string;
342
341
  type: "tool_result";
342
+ content: string;
343
343
  tool_use_id: string;
344
344
  cache_control?: {
345
345
  type: "ephemeral";
@@ -366,9 +366,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
366
366
  }[][];
367
367
  };
368
368
  previousChanges: {
369
- content: string;
370
- type: "file" | "patch";
369
+ type: "patch" | "file";
371
370
  filePath: string;
371
+ content: string;
372
372
  }[];
373
373
  authToken?: string | undefined;
374
374
  }>, z.ZodObject<{
@@ -588,8 +588,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
588
588
  type: "ephemeral";
589
589
  } | undefined;
590
590
  } | {
591
- content: string;
592
591
  type: "tool_result";
592
+ content: string;
593
593
  tool_use_id: string;
594
594
  cache_control?: {
595
595
  type: "ephemeral";
@@ -616,9 +616,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
616
616
  }[][];
617
617
  };
618
618
  previousChanges: {
619
- content: string;
620
- type: "file" | "patch";
619
+ type: "patch" | "file";
621
620
  filePath: string;
621
+ content: string;
622
622
  }[];
623
623
  authToken?: string | undefined;
624
624
  } | {
@@ -693,8 +693,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
693
693
  type: "ephemeral";
694
694
  } | undefined;
695
695
  } | {
696
- content: string;
697
696
  type: "tool_result";
697
+ content: string;
698
698
  tool_use_id: string;
699
699
  cache_control?: {
700
700
  type: "ephemeral";
@@ -721,9 +721,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
721
721
  }[][];
722
722
  };
723
723
  previousChanges: {
724
- content: string;
725
- type: "file" | "patch";
724
+ type: "patch" | "file";
726
725
  filePath: string;
726
+ content: string;
727
727
  }[];
728
728
  authToken?: string | undefined;
729
729
  } | {
@@ -895,15 +895,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
895
895
  type: "ephemeral";
896
896
  }>>;
897
897
  }, "strip", z.ZodTypeAny, {
898
- content: string;
899
898
  type: "tool_result";
899
+ content: string;
900
900
  tool_use_id: string;
901
901
  cache_control?: {
902
902
  type: "ephemeral";
903
903
  } | undefined;
904
904
  }, {
905
- content: string;
906
905
  type: "tool_result";
906
+ content: string;
907
907
  tool_use_id: string;
908
908
  cache_control?: {
909
909
  type: "ephemeral";
@@ -925,8 +925,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
925
925
  type: "ephemeral";
926
926
  } | undefined;
927
927
  } | {
928
- content: string;
929
928
  type: "tool_result";
929
+ content: string;
930
930
  tool_use_id: string;
931
931
  cache_control?: {
932
932
  type: "ephemeral";
@@ -949,8 +949,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
949
949
  type: "ephemeral";
950
950
  } | undefined;
951
951
  } | {
952
- content: string;
953
952
  type: "tool_result";
953
+ content: string;
954
954
  tool_use_id: string;
955
955
  cache_control?: {
956
956
  type: "ephemeral";
@@ -1031,13 +1031,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1031
1031
  filePath: z.ZodString;
1032
1032
  content: z.ZodString;
1033
1033
  }, "strip", z.ZodTypeAny, {
1034
- content: string;
1035
- type: "file" | "patch";
1034
+ type: "patch" | "file";
1036
1035
  filePath: string;
1037
- }, {
1038
1036
  content: string;
1039
- type: "file" | "patch";
1037
+ }, {
1038
+ type: "patch" | "file";
1040
1039
  filePath: string;
1040
+ content: string;
1041
1041
  }>, "many">;
1042
1042
  }, "strip", z.ZodTypeAny, {
1043
1043
  type: "user-input";
@@ -1059,8 +1059,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1059
1059
  type: "ephemeral";
1060
1060
  } | undefined;
1061
1061
  } | {
1062
- content: string;
1063
1062
  type: "tool_result";
1063
+ content: string;
1064
1064
  tool_use_id: string;
1065
1065
  cache_control?: {
1066
1066
  type: "ephemeral";
@@ -1087,9 +1087,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1087
1087
  }[][];
1088
1088
  };
1089
1089
  previousChanges: {
1090
- content: string;
1091
- type: "file" | "patch";
1090
+ type: "patch" | "file";
1092
1091
  filePath: string;
1092
+ content: string;
1093
1093
  }[];
1094
1094
  authToken?: string | undefined;
1095
1095
  }, {
@@ -1112,8 +1112,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1112
1112
  type: "ephemeral";
1113
1113
  } | undefined;
1114
1114
  } | {
1115
- content: string;
1116
1115
  type: "tool_result";
1116
+ content: string;
1117
1117
  tool_use_id: string;
1118
1118
  cache_control?: {
1119
1119
  type: "ephemeral";
@@ -1140,9 +1140,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1140
1140
  }[][];
1141
1141
  };
1142
1142
  previousChanges: {
1143
- content: string;
1144
- type: "file" | "patch";
1143
+ type: "patch" | "file";
1145
1144
  filePath: string;
1145
+ content: string;
1146
1146
  }[];
1147
1147
  authToken?: string | undefined;
1148
1148
  }>, z.ZodObject<{
@@ -1362,8 +1362,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1362
1362
  type: "ephemeral";
1363
1363
  } | undefined;
1364
1364
  } | {
1365
- content: string;
1366
1365
  type: "tool_result";
1366
+ content: string;
1367
1367
  tool_use_id: string;
1368
1368
  cache_control?: {
1369
1369
  type: "ephemeral";
@@ -1390,9 +1390,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1390
1390
  }[][];
1391
1391
  };
1392
1392
  previousChanges: {
1393
- content: string;
1394
- type: "file" | "patch";
1393
+ type: "patch" | "file";
1395
1394
  filePath: string;
1395
+ content: string;
1396
1396
  }[];
1397
1397
  authToken?: string | undefined;
1398
1398
  } | {
@@ -1467,8 +1467,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1467
1467
  type: "ephemeral";
1468
1468
  } | undefined;
1469
1469
  } | {
1470
- content: string;
1471
1470
  type: "tool_result";
1471
+ content: string;
1472
1472
  tool_use_id: string;
1473
1473
  cache_control?: {
1474
1474
  type: "ephemeral";
@@ -1495,9 +1495,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1495
1495
  }[][];
1496
1496
  };
1497
1497
  previousChanges: {
1498
- content: string;
1499
- type: "file" | "patch";
1498
+ type: "patch" | "file";
1500
1499
  filePath: string;
1500
+ content: string;
1501
1501
  }[];
1502
1502
  authToken?: string | undefined;
1503
1503
  } | {
@@ -1584,7 +1584,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1584
1584
  type: "response-chunk";
1585
1585
  userInputId: string;
1586
1586
  chunk: string;
1587
- }>, z.ZodObject<{
1587
+ }>, z.ZodObject<z.objectUtil.extendShape<{
1588
1588
  type: z.ZodLiteral<"response-complete">;
1589
1589
  userInputId: z.ZodString;
1590
1590
  response: z.ZodString;
@@ -1593,13 +1593,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1593
1593
  filePath: z.ZodString;
1594
1594
  content: z.ZodString;
1595
1595
  }, "strip", z.ZodTypeAny, {
1596
- content: string;
1597
- type: "file" | "patch";
1596
+ type: "patch" | "file";
1598
1597
  filePath: string;
1599
- }, {
1600
1598
  content: string;
1601
- type: "file" | "patch";
1599
+ }, {
1600
+ type: "patch" | "file";
1602
1601
  filePath: string;
1602
+ content: string;
1603
1603
  }>, "many">;
1604
1604
  addedFileVersions: z.ZodArray<z.ZodObject<{
1605
1605
  path: z.ZodString;
@@ -1612,18 +1612,21 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1612
1612
  content: string;
1613
1613
  }>, "many">;
1614
1614
  resetFileVersions: z.ZodBoolean;
1615
+ }, {
1615
1616
  usage: z.ZodOptional<z.ZodNumber>;
1616
1617
  limit: z.ZodOptional<z.ZodNumber>;
1618
+ referralLink: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1617
1619
  subscription_active: z.ZodOptional<z.ZodBoolean>;
1618
- referralLink: z.ZodOptional<z.ZodString>;
1619
- }, "strip", z.ZodTypeAny, {
1620
+ next_quota_reset: z.ZodOptional<z.ZodDate>;
1621
+ session_credits_used: z.ZodOptional<z.ZodNumber>;
1622
+ }>, "strip", z.ZodTypeAny, {
1620
1623
  type: "response-complete";
1621
1624
  userInputId: string;
1622
1625
  response: string;
1623
1626
  changes: {
1624
- content: string;
1625
- type: "file" | "patch";
1627
+ type: "patch" | "file";
1626
1628
  filePath: string;
1629
+ content: string;
1627
1630
  }[];
1628
1631
  addedFileVersions: {
1629
1632
  path: string;
@@ -1632,16 +1635,18 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1632
1635
  resetFileVersions: boolean;
1633
1636
  usage?: number | undefined;
1634
1637
  limit?: number | undefined;
1635
- subscription_active?: boolean | undefined;
1636
1638
  referralLink?: string | undefined;
1639
+ subscription_active?: boolean | undefined;
1640
+ next_quota_reset?: Date | undefined;
1641
+ session_credits_used?: number | undefined;
1637
1642
  }, {
1638
1643
  type: "response-complete";
1639
1644
  userInputId: string;
1640
1645
  response: string;
1641
1646
  changes: {
1642
- content: string;
1643
- type: "file" | "patch";
1647
+ type: "patch" | "file";
1644
1648
  filePath: string;
1649
+ content: string;
1645
1650
  }[];
1646
1651
  addedFileVersions: {
1647
1652
  path: string;
@@ -1650,8 +1655,10 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1650
1655
  resetFileVersions: boolean;
1651
1656
  usage?: number | undefined;
1652
1657
  limit?: number | undefined;
1653
- subscription_active?: boolean | undefined;
1654
1658
  referralLink?: string | undefined;
1659
+ subscription_active?: boolean | undefined;
1660
+ next_quota_reset?: Date | undefined;
1661
+ session_credits_used?: number | undefined;
1655
1662
  }>, z.ZodObject<{
1656
1663
  type: z.ZodLiteral<"read-files">;
1657
1664
  filePaths: z.ZodArray<z.ZodString, "many">;
@@ -1683,13 +1690,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1683
1690
  filePath: z.ZodString;
1684
1691
  content: z.ZodString;
1685
1692
  }, "strip", z.ZodTypeAny, {
1686
- content: string;
1687
- type: "file" | "patch";
1693
+ type: "patch" | "file";
1688
1694
  filePath: string;
1689
- }, {
1690
1695
  content: string;
1691
- type: "file" | "patch";
1696
+ }, {
1697
+ type: "patch" | "file";
1692
1698
  filePath: string;
1699
+ content: string;
1693
1700
  }>, "many">;
1694
1701
  addedFileVersions: z.ZodArray<z.ZodObject<{
1695
1702
  path: z.ZodString;
@@ -1707,9 +1714,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1707
1714
  userInputId: string;
1708
1715
  response: string;
1709
1716
  changes: {
1710
- content: string;
1711
- type: "file" | "patch";
1717
+ type: "patch" | "file";
1712
1718
  filePath: string;
1719
+ content: string;
1713
1720
  }[];
1714
1721
  addedFileVersions: {
1715
1722
  path: string;
@@ -1726,9 +1733,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1726
1733
  userInputId: string;
1727
1734
  response: string;
1728
1735
  changes: {
1729
- content: string;
1730
- type: "file" | "patch";
1736
+ type: "patch" | "file";
1731
1737
  filePath: string;
1738
+ content: string;
1732
1739
  }[];
1733
1740
  addedFileVersions: {
1734
1741
  path: string;
@@ -1764,12 +1771,32 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1764
1771
  type: "npm-version-status";
1765
1772
  isUpToDate: boolean;
1766
1773
  latestVersion: string;
1767
- }>, z.ZodObject<{
1774
+ }>, z.ZodObject<z.objectUtil.extendShape<{
1768
1775
  type: z.ZodLiteral<"init-response">;
1769
- }, "strip", z.ZodTypeAny, {
1776
+ }, Omit<{
1777
+ type: z.ZodLiteral<"usage-response">;
1778
+ usage: z.ZodNumber;
1779
+ limit: z.ZodNumber;
1780
+ referralLink: z.ZodOptional<z.ZodString>;
1781
+ subscription_active: z.ZodBoolean;
1782
+ next_quota_reset: z.ZodDate;
1783
+ session_credits_used: z.ZodNumber;
1784
+ }, "type">>, "strip", z.ZodTypeAny, {
1770
1785
  type: "init-response";
1786
+ usage: number;
1787
+ limit: number;
1788
+ subscription_active: boolean;
1789
+ next_quota_reset: Date;
1790
+ session_credits_used: number;
1791
+ referralLink?: string | undefined;
1771
1792
  }, {
1772
1793
  type: "init-response";
1794
+ usage: number;
1795
+ limit: number;
1796
+ subscription_active: boolean;
1797
+ next_quota_reset: Date;
1798
+ session_credits_used: number;
1799
+ referralLink?: string | undefined;
1773
1800
  }>, z.ZodObject<{
1774
1801
  type: z.ZodLiteral<"auth-result">;
1775
1802
  user: z.ZodOptional<z.ZodObject<{
@@ -1780,41 +1807,41 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1780
1807
  fingerprintId: z.ZodString;
1781
1808
  fingerprintHash: z.ZodString;
1782
1809
  }, "strip", z.ZodTypeAny, {
1783
- email: string;
1784
1810
  name: string | null;
1785
1811
  id: string;
1786
1812
  fingerprintId: string;
1787
1813
  authToken: string;
1814
+ email: string;
1788
1815
  fingerprintHash: string;
1789
1816
  }, {
1790
- email: string;
1791
1817
  name: string | null;
1792
1818
  id: string;
1793
1819
  fingerprintId: string;
1794
1820
  authToken: string;
1821
+ email: string;
1795
1822
  fingerprintHash: string;
1796
1823
  }>>;
1797
1824
  message: z.ZodString;
1798
1825
  }, "strip", z.ZodTypeAny, {
1799
- message: string;
1800
1826
  type: "auth-result";
1827
+ message: string;
1801
1828
  user?: {
1802
- email: string;
1803
1829
  name: string | null;
1804
1830
  id: string;
1805
1831
  fingerprintId: string;
1806
1832
  authToken: string;
1833
+ email: string;
1807
1834
  fingerprintHash: string;
1808
1835
  } | undefined;
1809
1836
  }, {
1810
- message: string;
1811
1837
  type: "auth-result";
1838
+ message: string;
1812
1839
  user?: {
1813
- email: string;
1814
1840
  name: string | null;
1815
1841
  id: string;
1816
1842
  fingerprintId: string;
1817
1843
  authToken: string;
1844
+ email: string;
1818
1845
  fingerprintHash: string;
1819
1846
  } | undefined;
1820
1847
  }>, z.ZodObject<{
@@ -1838,27 +1865,33 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1838
1865
  limit: z.ZodNumber;
1839
1866
  referralLink: z.ZodOptional<z.ZodString>;
1840
1867
  subscription_active: z.ZodBoolean;
1868
+ next_quota_reset: z.ZodDate;
1869
+ session_credits_used: z.ZodNumber;
1841
1870
  }, "strip", z.ZodTypeAny, {
1842
1871
  type: "usage-response";
1843
1872
  usage: number;
1844
1873
  limit: number;
1845
1874
  subscription_active: boolean;
1875
+ next_quota_reset: Date;
1876
+ session_credits_used: number;
1846
1877
  referralLink?: string | undefined;
1847
1878
  }, {
1848
1879
  type: "usage-response";
1849
1880
  usage: number;
1850
1881
  limit: number;
1851
1882
  subscription_active: boolean;
1883
+ next_quota_reset: Date;
1884
+ session_credits_used: number;
1852
1885
  referralLink?: string | undefined;
1853
1886
  }>, z.ZodObject<{
1854
1887
  type: z.ZodLiteral<"action-error">;
1855
1888
  message: z.ZodString;
1856
1889
  }, "strip", z.ZodTypeAny, {
1857
- message: string;
1858
1890
  type: "action-error";
1859
- }, {
1860
1891
  message: string;
1892
+ }, {
1861
1893
  type: "action-error";
1894
+ message: string;
1862
1895
  }>, z.ZodObject<{
1863
1896
  type: z.ZodLiteral<"commit-message-response">;
1864
1897
  commitMessage: z.ZodString;
@@ -1872,17 +1905,29 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1872
1905
  }, "strip", z.ZodTypeAny, {
1873
1906
  type: "action";
1874
1907
  data: {
1875
- type: "response-chunk";
1876
- userInputId: string;
1877
- chunk: string;
1908
+ type: "usage-response";
1909
+ usage: number;
1910
+ limit: number;
1911
+ subscription_active: boolean;
1912
+ next_quota_reset: Date;
1913
+ session_credits_used: number;
1914
+ referralLink?: string | undefined;
1915
+ } | {
1916
+ type: "init-response";
1917
+ usage: number;
1918
+ limit: number;
1919
+ subscription_active: boolean;
1920
+ next_quota_reset: Date;
1921
+ session_credits_used: number;
1922
+ referralLink?: string | undefined;
1878
1923
  } | {
1879
1924
  type: "response-complete";
1880
1925
  userInputId: string;
1881
1926
  response: string;
1882
1927
  changes: {
1883
- content: string;
1884
- type: "file" | "patch";
1928
+ type: "patch" | "file";
1885
1929
  filePath: string;
1930
+ content: string;
1886
1931
  }[];
1887
1932
  addedFileVersions: {
1888
1933
  path: string;
@@ -1891,8 +1936,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1891
1936
  resetFileVersions: boolean;
1892
1937
  usage?: number | undefined;
1893
1938
  limit?: number | undefined;
1894
- subscription_active?: boolean | undefined;
1895
1939
  referralLink?: string | undefined;
1940
+ subscription_active?: boolean | undefined;
1941
+ next_quota_reset?: Date | undefined;
1942
+ session_credits_used?: number | undefined;
1943
+ } | {
1944
+ type: "response-chunk";
1945
+ userInputId: string;
1946
+ chunk: string;
1896
1947
  } | {
1897
1948
  type: "read-files";
1898
1949
  filePaths: string[];
@@ -1901,9 +1952,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1901
1952
  userInputId: string;
1902
1953
  response: string;
1903
1954
  changes: {
1904
- content: string;
1905
- type: "file" | "patch";
1955
+ type: "patch" | "file";
1906
1956
  filePath: string;
1957
+ content: string;
1907
1958
  }[];
1908
1959
  addedFileVersions: {
1909
1960
  path: string;
@@ -1924,16 +1975,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1924
1975
  isUpToDate: boolean;
1925
1976
  latestVersion: string;
1926
1977
  } | {
1927
- type: "init-response";
1928
- } | {
1929
- message: string;
1930
1978
  type: "auth-result";
1979
+ message: string;
1931
1980
  user?: {
1932
- email: string;
1933
1981
  name: string | null;
1934
1982
  id: string;
1935
1983
  fingerprintId: string;
1936
1984
  authToken: string;
1985
+ email: string;
1937
1986
  fingerprintHash: string;
1938
1987
  } | undefined;
1939
1988
  } | {
@@ -1942,14 +1991,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1942
1991
  fingerprintHash: string;
1943
1992
  loginUrl: string;
1944
1993
  } | {
1945
- type: "usage-response";
1946
- usage: number;
1947
- limit: number;
1948
- subscription_active: boolean;
1949
- referralLink?: string | undefined;
1950
- } | {
1951
- message: string;
1952
1994
  type: "action-error";
1995
+ message: string;
1953
1996
  } | {
1954
1997
  type: "commit-message-response";
1955
1998
  commitMessage: string;
@@ -1957,17 +2000,29 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1957
2000
  }, {
1958
2001
  type: "action";
1959
2002
  data: {
1960
- type: "response-chunk";
1961
- userInputId: string;
1962
- chunk: string;
2003
+ type: "usage-response";
2004
+ usage: number;
2005
+ limit: number;
2006
+ subscription_active: boolean;
2007
+ next_quota_reset: Date;
2008
+ session_credits_used: number;
2009
+ referralLink?: string | undefined;
2010
+ } | {
2011
+ type: "init-response";
2012
+ usage: number;
2013
+ limit: number;
2014
+ subscription_active: boolean;
2015
+ next_quota_reset: Date;
2016
+ session_credits_used: number;
2017
+ referralLink?: string | undefined;
1963
2018
  } | {
1964
2019
  type: "response-complete";
1965
2020
  userInputId: string;
1966
2021
  response: string;
1967
2022
  changes: {
1968
- content: string;
1969
- type: "file" | "patch";
2023
+ type: "patch" | "file";
1970
2024
  filePath: string;
2025
+ content: string;
1971
2026
  }[];
1972
2027
  addedFileVersions: {
1973
2028
  path: string;
@@ -1976,8 +2031,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1976
2031
  resetFileVersions: boolean;
1977
2032
  usage?: number | undefined;
1978
2033
  limit?: number | undefined;
1979
- subscription_active?: boolean | undefined;
1980
2034
  referralLink?: string | undefined;
2035
+ subscription_active?: boolean | undefined;
2036
+ next_quota_reset?: Date | undefined;
2037
+ session_credits_used?: number | undefined;
2038
+ } | {
2039
+ type: "response-chunk";
2040
+ userInputId: string;
2041
+ chunk: string;
1981
2042
  } | {
1982
2043
  type: "read-files";
1983
2044
  filePaths: string[];
@@ -1986,9 +2047,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
1986
2047
  userInputId: string;
1987
2048
  response: string;
1988
2049
  changes: {
1989
- content: string;
1990
- type: "file" | "patch";
2050
+ type: "patch" | "file";
1991
2051
  filePath: string;
2052
+ content: string;
1992
2053
  }[];
1993
2054
  addedFileVersions: {
1994
2055
  path: string;
@@ -2009,16 +2070,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2009
2070
  isUpToDate: boolean;
2010
2071
  latestVersion: string;
2011
2072
  } | {
2012
- type: "init-response";
2013
- } | {
2014
- message: string;
2015
2073
  type: "auth-result";
2074
+ message: string;
2016
2075
  user?: {
2017
- email: string;
2018
2076
  name: string | null;
2019
2077
  id: string;
2020
2078
  fingerprintId: string;
2021
2079
  authToken: string;
2080
+ email: string;
2022
2081
  fingerprintHash: string;
2023
2082
  } | undefined;
2024
2083
  } | {
@@ -2027,14 +2086,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2027
2086
  fingerprintHash: string;
2028
2087
  loginUrl: string;
2029
2088
  } | {
2030
- type: "usage-response";
2031
- usage: number;
2032
- limit: number;
2033
- subscription_active: boolean;
2034
- referralLink?: string | undefined;
2035
- } | {
2036
- message: string;
2037
2089
  type: "action-error";
2090
+ message: string;
2038
2091
  } | {
2039
2092
  type: "commit-message-response";
2040
2093
  commitMessage: string;
@@ -2070,7 +2123,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2070
2123
  type: "response-chunk";
2071
2124
  userInputId: string;
2072
2125
  chunk: string;
2073
- }>, z.ZodObject<{
2126
+ }>, z.ZodObject<z.objectUtil.extendShape<{
2074
2127
  type: z.ZodLiteral<"response-complete">;
2075
2128
  userInputId: z.ZodString;
2076
2129
  response: z.ZodString;
@@ -2079,13 +2132,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2079
2132
  filePath: z.ZodString;
2080
2133
  content: z.ZodString;
2081
2134
  }, "strip", z.ZodTypeAny, {
2082
- content: string;
2083
- type: "file" | "patch";
2135
+ type: "patch" | "file";
2084
2136
  filePath: string;
2085
- }, {
2086
2137
  content: string;
2087
- type: "file" | "patch";
2138
+ }, {
2139
+ type: "patch" | "file";
2088
2140
  filePath: string;
2141
+ content: string;
2089
2142
  }>, "many">;
2090
2143
  addedFileVersions: z.ZodArray<z.ZodObject<{
2091
2144
  path: z.ZodString;
@@ -2098,18 +2151,21 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2098
2151
  content: string;
2099
2152
  }>, "many">;
2100
2153
  resetFileVersions: z.ZodBoolean;
2154
+ }, {
2101
2155
  usage: z.ZodOptional<z.ZodNumber>;
2102
2156
  limit: z.ZodOptional<z.ZodNumber>;
2157
+ referralLink: z.ZodOptional<z.ZodOptional<z.ZodString>>;
2103
2158
  subscription_active: z.ZodOptional<z.ZodBoolean>;
2104
- referralLink: z.ZodOptional<z.ZodString>;
2105
- }, "strip", z.ZodTypeAny, {
2159
+ next_quota_reset: z.ZodOptional<z.ZodDate>;
2160
+ session_credits_used: z.ZodOptional<z.ZodNumber>;
2161
+ }>, "strip", z.ZodTypeAny, {
2106
2162
  type: "response-complete";
2107
2163
  userInputId: string;
2108
2164
  response: string;
2109
2165
  changes: {
2110
- content: string;
2111
- type: "file" | "patch";
2166
+ type: "patch" | "file";
2112
2167
  filePath: string;
2168
+ content: string;
2113
2169
  }[];
2114
2170
  addedFileVersions: {
2115
2171
  path: string;
@@ -2118,16 +2174,18 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2118
2174
  resetFileVersions: boolean;
2119
2175
  usage?: number | undefined;
2120
2176
  limit?: number | undefined;
2121
- subscription_active?: boolean | undefined;
2122
2177
  referralLink?: string | undefined;
2178
+ subscription_active?: boolean | undefined;
2179
+ next_quota_reset?: Date | undefined;
2180
+ session_credits_used?: number | undefined;
2123
2181
  }, {
2124
2182
  type: "response-complete";
2125
2183
  userInputId: string;
2126
2184
  response: string;
2127
2185
  changes: {
2128
- content: string;
2129
- type: "file" | "patch";
2186
+ type: "patch" | "file";
2130
2187
  filePath: string;
2188
+ content: string;
2131
2189
  }[];
2132
2190
  addedFileVersions: {
2133
2191
  path: string;
@@ -2136,8 +2194,10 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2136
2194
  resetFileVersions: boolean;
2137
2195
  usage?: number | undefined;
2138
2196
  limit?: number | undefined;
2139
- subscription_active?: boolean | undefined;
2140
2197
  referralLink?: string | undefined;
2198
+ subscription_active?: boolean | undefined;
2199
+ next_quota_reset?: Date | undefined;
2200
+ session_credits_used?: number | undefined;
2141
2201
  }>, z.ZodObject<{
2142
2202
  type: z.ZodLiteral<"read-files">;
2143
2203
  filePaths: z.ZodArray<z.ZodString, "many">;
@@ -2169,13 +2229,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2169
2229
  filePath: z.ZodString;
2170
2230
  content: z.ZodString;
2171
2231
  }, "strip", z.ZodTypeAny, {
2172
- content: string;
2173
- type: "file" | "patch";
2232
+ type: "patch" | "file";
2174
2233
  filePath: string;
2175
- }, {
2176
2234
  content: string;
2177
- type: "file" | "patch";
2235
+ }, {
2236
+ type: "patch" | "file";
2178
2237
  filePath: string;
2238
+ content: string;
2179
2239
  }>, "many">;
2180
2240
  addedFileVersions: z.ZodArray<z.ZodObject<{
2181
2241
  path: z.ZodString;
@@ -2193,9 +2253,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2193
2253
  userInputId: string;
2194
2254
  response: string;
2195
2255
  changes: {
2196
- content: string;
2197
- type: "file" | "patch";
2256
+ type: "patch" | "file";
2198
2257
  filePath: string;
2258
+ content: string;
2199
2259
  }[];
2200
2260
  addedFileVersions: {
2201
2261
  path: string;
@@ -2212,9 +2272,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2212
2272
  userInputId: string;
2213
2273
  response: string;
2214
2274
  changes: {
2215
- content: string;
2216
- type: "file" | "patch";
2275
+ type: "patch" | "file";
2217
2276
  filePath: string;
2277
+ content: string;
2218
2278
  }[];
2219
2279
  addedFileVersions: {
2220
2280
  path: string;
@@ -2250,12 +2310,32 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2250
2310
  type: "npm-version-status";
2251
2311
  isUpToDate: boolean;
2252
2312
  latestVersion: string;
2253
- }>, z.ZodObject<{
2313
+ }>, z.ZodObject<z.objectUtil.extendShape<{
2254
2314
  type: z.ZodLiteral<"init-response">;
2255
- }, "strip", z.ZodTypeAny, {
2315
+ }, Omit<{
2316
+ type: z.ZodLiteral<"usage-response">;
2317
+ usage: z.ZodNumber;
2318
+ limit: z.ZodNumber;
2319
+ referralLink: z.ZodOptional<z.ZodString>;
2320
+ subscription_active: z.ZodBoolean;
2321
+ next_quota_reset: z.ZodDate;
2322
+ session_credits_used: z.ZodNumber;
2323
+ }, "type">>, "strip", z.ZodTypeAny, {
2256
2324
  type: "init-response";
2325
+ usage: number;
2326
+ limit: number;
2327
+ subscription_active: boolean;
2328
+ next_quota_reset: Date;
2329
+ session_credits_used: number;
2330
+ referralLink?: string | undefined;
2257
2331
  }, {
2258
2332
  type: "init-response";
2333
+ usage: number;
2334
+ limit: number;
2335
+ subscription_active: boolean;
2336
+ next_quota_reset: Date;
2337
+ session_credits_used: number;
2338
+ referralLink?: string | undefined;
2259
2339
  }>, z.ZodObject<{
2260
2340
  type: z.ZodLiteral<"auth-result">;
2261
2341
  user: z.ZodOptional<z.ZodObject<{
@@ -2266,41 +2346,41 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2266
2346
  fingerprintId: z.ZodString;
2267
2347
  fingerprintHash: z.ZodString;
2268
2348
  }, "strip", z.ZodTypeAny, {
2269
- email: string;
2270
2349
  name: string | null;
2271
2350
  id: string;
2272
2351
  fingerprintId: string;
2273
2352
  authToken: string;
2353
+ email: string;
2274
2354
  fingerprintHash: string;
2275
2355
  }, {
2276
- email: string;
2277
2356
  name: string | null;
2278
2357
  id: string;
2279
2358
  fingerprintId: string;
2280
2359
  authToken: string;
2360
+ email: string;
2281
2361
  fingerprintHash: string;
2282
2362
  }>>;
2283
2363
  message: z.ZodString;
2284
2364
  }, "strip", z.ZodTypeAny, {
2285
- message: string;
2286
2365
  type: "auth-result";
2366
+ message: string;
2287
2367
  user?: {
2288
- email: string;
2289
2368
  name: string | null;
2290
2369
  id: string;
2291
2370
  fingerprintId: string;
2292
2371
  authToken: string;
2372
+ email: string;
2293
2373
  fingerprintHash: string;
2294
2374
  } | undefined;
2295
2375
  }, {
2296
- message: string;
2297
2376
  type: "auth-result";
2377
+ message: string;
2298
2378
  user?: {
2299
- email: string;
2300
2379
  name: string | null;
2301
2380
  id: string;
2302
2381
  fingerprintId: string;
2303
2382
  authToken: string;
2383
+ email: string;
2304
2384
  fingerprintHash: string;
2305
2385
  } | undefined;
2306
2386
  }>, z.ZodObject<{
@@ -2324,27 +2404,33 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2324
2404
  limit: z.ZodNumber;
2325
2405
  referralLink: z.ZodOptional<z.ZodString>;
2326
2406
  subscription_active: z.ZodBoolean;
2407
+ next_quota_reset: z.ZodDate;
2408
+ session_credits_used: z.ZodNumber;
2327
2409
  }, "strip", z.ZodTypeAny, {
2328
2410
  type: "usage-response";
2329
2411
  usage: number;
2330
2412
  limit: number;
2331
2413
  subscription_active: boolean;
2414
+ next_quota_reset: Date;
2415
+ session_credits_used: number;
2332
2416
  referralLink?: string | undefined;
2333
2417
  }, {
2334
2418
  type: "usage-response";
2335
2419
  usage: number;
2336
2420
  limit: number;
2337
2421
  subscription_active: boolean;
2422
+ next_quota_reset: Date;
2423
+ session_credits_used: number;
2338
2424
  referralLink?: string | undefined;
2339
2425
  }>, z.ZodObject<{
2340
2426
  type: z.ZodLiteral<"action-error">;
2341
2427
  message: z.ZodString;
2342
2428
  }, "strip", z.ZodTypeAny, {
2343
- message: string;
2344
2429
  type: "action-error";
2345
- }, {
2346
2430
  message: string;
2431
+ }, {
2347
2432
  type: "action-error";
2433
+ message: string;
2348
2434
  }>, z.ZodObject<{
2349
2435
  type: z.ZodLiteral<"commit-message-response">;
2350
2436
  commitMessage: z.ZodString;
@@ -2358,17 +2444,29 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2358
2444
  }, "strip", z.ZodTypeAny, {
2359
2445
  type: "action";
2360
2446
  data: {
2361
- type: "response-chunk";
2362
- userInputId: string;
2363
- chunk: string;
2447
+ type: "usage-response";
2448
+ usage: number;
2449
+ limit: number;
2450
+ subscription_active: boolean;
2451
+ next_quota_reset: Date;
2452
+ session_credits_used: number;
2453
+ referralLink?: string | undefined;
2454
+ } | {
2455
+ type: "init-response";
2456
+ usage: number;
2457
+ limit: number;
2458
+ subscription_active: boolean;
2459
+ next_quota_reset: Date;
2460
+ session_credits_used: number;
2461
+ referralLink?: string | undefined;
2364
2462
  } | {
2365
2463
  type: "response-complete";
2366
2464
  userInputId: string;
2367
2465
  response: string;
2368
2466
  changes: {
2369
- content: string;
2370
- type: "file" | "patch";
2467
+ type: "patch" | "file";
2371
2468
  filePath: string;
2469
+ content: string;
2372
2470
  }[];
2373
2471
  addedFileVersions: {
2374
2472
  path: string;
@@ -2377,8 +2475,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2377
2475
  resetFileVersions: boolean;
2378
2476
  usage?: number | undefined;
2379
2477
  limit?: number | undefined;
2380
- subscription_active?: boolean | undefined;
2381
2478
  referralLink?: string | undefined;
2479
+ subscription_active?: boolean | undefined;
2480
+ next_quota_reset?: Date | undefined;
2481
+ session_credits_used?: number | undefined;
2482
+ } | {
2483
+ type: "response-chunk";
2484
+ userInputId: string;
2485
+ chunk: string;
2382
2486
  } | {
2383
2487
  type: "read-files";
2384
2488
  filePaths: string[];
@@ -2387,9 +2491,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2387
2491
  userInputId: string;
2388
2492
  response: string;
2389
2493
  changes: {
2390
- content: string;
2391
- type: "file" | "patch";
2494
+ type: "patch" | "file";
2392
2495
  filePath: string;
2496
+ content: string;
2393
2497
  }[];
2394
2498
  addedFileVersions: {
2395
2499
  path: string;
@@ -2410,16 +2514,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2410
2514
  isUpToDate: boolean;
2411
2515
  latestVersion: string;
2412
2516
  } | {
2413
- type: "init-response";
2414
- } | {
2415
- message: string;
2416
2517
  type: "auth-result";
2518
+ message: string;
2417
2519
  user?: {
2418
- email: string;
2419
2520
  name: string | null;
2420
2521
  id: string;
2421
2522
  fingerprintId: string;
2422
2523
  authToken: string;
2524
+ email: string;
2423
2525
  fingerprintHash: string;
2424
2526
  } | undefined;
2425
2527
  } | {
@@ -2428,14 +2530,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2428
2530
  fingerprintHash: string;
2429
2531
  loginUrl: string;
2430
2532
  } | {
2431
- type: "usage-response";
2432
- usage: number;
2433
- limit: number;
2434
- subscription_active: boolean;
2435
- referralLink?: string | undefined;
2436
- } | {
2437
- message: string;
2438
2533
  type: "action-error";
2534
+ message: string;
2439
2535
  } | {
2440
2536
  type: "commit-message-response";
2441
2537
  commitMessage: string;
@@ -2443,17 +2539,29 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2443
2539
  }, {
2444
2540
  type: "action";
2445
2541
  data: {
2446
- type: "response-chunk";
2447
- userInputId: string;
2448
- chunk: string;
2542
+ type: "usage-response";
2543
+ usage: number;
2544
+ limit: number;
2545
+ subscription_active: boolean;
2546
+ next_quota_reset: Date;
2547
+ session_credits_used: number;
2548
+ referralLink?: string | undefined;
2549
+ } | {
2550
+ type: "init-response";
2551
+ usage: number;
2552
+ limit: number;
2553
+ subscription_active: boolean;
2554
+ next_quota_reset: Date;
2555
+ session_credits_used: number;
2556
+ referralLink?: string | undefined;
2449
2557
  } | {
2450
2558
  type: "response-complete";
2451
2559
  userInputId: string;
2452
2560
  response: string;
2453
2561
  changes: {
2454
- content: string;
2455
- type: "file" | "patch";
2562
+ type: "patch" | "file";
2456
2563
  filePath: string;
2564
+ content: string;
2457
2565
  }[];
2458
2566
  addedFileVersions: {
2459
2567
  path: string;
@@ -2462,8 +2570,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2462
2570
  resetFileVersions: boolean;
2463
2571
  usage?: number | undefined;
2464
2572
  limit?: number | undefined;
2465
- subscription_active?: boolean | undefined;
2466
2573
  referralLink?: string | undefined;
2574
+ subscription_active?: boolean | undefined;
2575
+ next_quota_reset?: Date | undefined;
2576
+ session_credits_used?: number | undefined;
2577
+ } | {
2578
+ type: "response-chunk";
2579
+ userInputId: string;
2580
+ chunk: string;
2467
2581
  } | {
2468
2582
  type: "read-files";
2469
2583
  filePaths: string[];
@@ -2472,9 +2586,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2472
2586
  userInputId: string;
2473
2587
  response: string;
2474
2588
  changes: {
2475
- content: string;
2476
- type: "file" | "patch";
2589
+ type: "patch" | "file";
2477
2590
  filePath: string;
2591
+ content: string;
2478
2592
  }[];
2479
2593
  addedFileVersions: {
2480
2594
  path: string;
@@ -2495,16 +2609,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2495
2609
  isUpToDate: boolean;
2496
2610
  latestVersion: string;
2497
2611
  } | {
2498
- type: "init-response";
2499
- } | {
2500
- message: string;
2501
2612
  type: "auth-result";
2613
+ message: string;
2502
2614
  user?: {
2503
- email: string;
2504
2615
  name: string | null;
2505
2616
  id: string;
2506
2617
  fingerprintId: string;
2507
2618
  authToken: string;
2619
+ email: string;
2508
2620
  fingerprintHash: string;
2509
2621
  } | undefined;
2510
2622
  } | {
@@ -2513,14 +2625,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2513
2625
  fingerprintHash: string;
2514
2626
  loginUrl: string;
2515
2627
  } | {
2516
- type: "usage-response";
2517
- usage: number;
2518
- limit: number;
2519
- subscription_active: boolean;
2520
- referralLink?: string | undefined;
2521
- } | {
2522
- message: string;
2523
2628
  type: "action-error";
2629
+ message: string;
2524
2630
  } | {
2525
2631
  type: "commit-message-response";
2526
2632
  commitMessage: string;