codebuff 1.0.281 → 1.0.283

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 (149) hide show
  1. package/dist/cli-handlers/initialization-flow.d.ts +1 -0
  2. package/dist/cli-handlers/initialization-flow.js +24 -0
  3. package/dist/cli-handlers/initialization-flow.js.map +1 -0
  4. package/dist/cli-modules/command-processor.d.ts +2 -0
  5. package/dist/cli-modules/command-processor.js +112 -0
  6. package/dist/cli-modules/command-processor.js.map +1 -0
  7. package/dist/cli-modules/input-handler.d.ts +4 -0
  8. package/dist/cli-modules/input-handler.js +75 -0
  9. package/dist/cli-modules/input-handler.js.map +1 -0
  10. package/dist/cli-modules/readline-handler.d.ts +11 -0
  11. package/dist/cli-modules/readline-handler.js +158 -0
  12. package/dist/cli-modules/readline-handler.js.map +1 -0
  13. package/dist/cli-modules/signal-handler.d.ts +7 -0
  14. package/dist/cli-modules/signal-handler.js +128 -0
  15. package/dist/cli-modules/signal-handler.js.map +1 -0
  16. package/dist/cli-modules/types.d.ts +51 -0
  17. package/dist/cli-modules/types.js +3 -0
  18. package/dist/cli-modules/types.js.map +1 -0
  19. package/dist/cli-modules/websocket-handler.d.ts +16 -0
  20. package/dist/cli-modules/websocket-handler.js +53 -0
  21. package/dist/cli-modules/websocket-handler.js.map +1 -0
  22. package/dist/cli.js +8 -6
  23. package/dist/cli.js.map +1 -1
  24. package/dist/client.d.ts +1 -1
  25. package/dist/client.js +5 -1
  26. package/dist/client.js.map +1 -1
  27. package/dist/code-map/__mocks__/tree-sitter-typescript.d.ts +12 -0
  28. package/dist/code-map/__mocks__/tree-sitter-typescript.d.ts.map +1 -0
  29. package/dist/code-map/__mocks__/tree-sitter-typescript.js +14 -0
  30. package/dist/code-map/__mocks__/tree-sitter-typescript.js.map +1 -0
  31. package/dist/code-map/__mocks__/wasm-mock.d.ts +2 -0
  32. package/dist/code-map/__mocks__/wasm-mock.d.ts.map +1 -0
  33. package/dist/code-map/__mocks__/wasm-mock.js +3 -0
  34. package/dist/code-map/__mocks__/wasm-mock.js.map +1 -0
  35. package/dist/code-map/__tests__/parse.test.d.ts +2 -0
  36. package/dist/code-map/__tests__/parse.test.d.ts.map +1 -0
  37. package/dist/code-map/__tests__/parse.test.js +231 -0
  38. package/dist/code-map/__tests__/parse.test.js.map +1 -0
  39. package/dist/code-map/__tests__/test-langs/consumer.d.ts +2 -0
  40. package/dist/code-map/__tests__/test-langs/consumer.d.ts.map +1 -0
  41. package/dist/code-map/__tests__/test-langs/consumer.js +6 -0
  42. package/dist/code-map/__tests__/test-langs/consumer.js.map +1 -0
  43. package/dist/code-map/__tests__/test-langs/empty.d.ts +1 -0
  44. package/dist/code-map/__tests__/test-langs/empty.d.ts.map +1 -0
  45. package/dist/code-map/__tests__/test-langs/empty.js +2 -0
  46. package/dist/code-map/__tests__/test-langs/empty.js.map +1 -0
  47. package/dist/code-map/__tests__/test-langs/test.d.ts +12 -0
  48. package/dist/code-map/__tests__/test-langs/test.d.ts.map +1 -0
  49. package/dist/code-map/__tests__/test-langs/test.js +23 -0
  50. package/dist/code-map/__tests__/test-langs/test.js.map +1 -0
  51. package/dist/code-map/__tests__/test-langs/unused.d.ts +2 -0
  52. package/dist/code-map/__tests__/test-langs/unused.d.ts.map +1 -0
  53. package/dist/code-map/__tests__/test-langs/unused.js +7 -0
  54. package/dist/code-map/__tests__/test-langs/unused.js.map +1 -0
  55. package/dist/code-map/__tests__/test-langs/utils1.d.ts +2 -0
  56. package/dist/code-map/__tests__/test-langs/utils1.d.ts.map +1 -0
  57. package/dist/code-map/__tests__/test-langs/utils1.js +7 -0
  58. package/dist/code-map/__tests__/test-langs/utils1.js.map +1 -0
  59. package/dist/code-map/__tests__/test-langs/utils2.d.ts +2 -0
  60. package/dist/code-map/__tests__/test-langs/utils2.d.ts.map +1 -0
  61. package/dist/code-map/__tests__/test-langs/utils2.js +8 -0
  62. package/dist/code-map/__tests__/test-langs/utils2.js.map +1 -0
  63. package/dist/code-map/__tests__/tree-sitter-minimal.test.d.ts +2 -0
  64. package/dist/code-map/__tests__/tree-sitter-minimal.test.d.ts.map +1 -0
  65. package/dist/code-map/__tests__/tree-sitter-minimal.test.js +79 -0
  66. package/dist/code-map/__tests__/tree-sitter-minimal.test.js.map +1 -0
  67. package/dist/code-map/jest.config.d.ts +4 -0
  68. package/dist/code-map/jest.config.d.ts.map +1 -0
  69. package/dist/code-map/jest.config.js +18 -0
  70. package/dist/code-map/jest.config.js.map +1 -0
  71. package/dist/code-map/parse.d.ts.map +1 -1
  72. package/dist/code-map/parse.js.map +1 -1
  73. package/dist/code-map/parse.test.d.ts +2 -0
  74. package/dist/code-map/parse.test.d.ts.map +1 -0
  75. package/dist/code-map/parse.test.js +218 -0
  76. package/dist/code-map/parse.test.js.map +1 -0
  77. package/dist/code-map/scripts/tree-sitter-test.cjs +27 -0
  78. package/dist/code-map/scripts/tree-sitter-test.cjs.map +1 -0
  79. package/dist/code-map/scripts/tree-sitter-test.d.cts +2 -0
  80. package/dist/code-map/scripts/tree-sitter-test.d.cts.map +1 -0
  81. package/dist/code-map/scripts/tree-sitter-test.d.ts +2 -0
  82. package/dist/code-map/scripts/tree-sitter-test.d.ts.map +1 -0
  83. package/dist/code-map/scripts/tree-sitter-test.js +54 -0
  84. package/dist/code-map/scripts/tree-sitter-test.js.map +1 -0
  85. package/dist/code-map/test-parser.d.ts +2 -0
  86. package/dist/code-map/test-parser.d.ts.map +1 -0
  87. package/dist/code-map/test-parser.js +42 -0
  88. package/dist/code-map/test-parser.js.map +1 -0
  89. package/dist/code-map/tsconfig.tsbuildinfo +1 -1
  90. package/dist/common/actions.d.ts +82 -82
  91. package/dist/common/bigquery/client.d.ts +15 -0
  92. package/dist/common/bigquery/client.js +265 -0
  93. package/dist/common/bigquery/client.js.map +1 -0
  94. package/dist/common/bigquery/schema.d.ts +55 -0
  95. package/dist/common/bigquery/schema.js +24 -0
  96. package/dist/common/bigquery/schema.js.map +1 -0
  97. package/dist/common/constants/analytics-events.d.ts +2 -1
  98. package/dist/common/constants/analytics-events.js +2 -1
  99. package/dist/common/constants/analytics-events.js.map +1 -1
  100. package/dist/common/constants/tools.d.ts +0 -1
  101. package/dist/common/constants/tools.js +1 -3
  102. package/dist/common/constants/tools.js.map +1 -1
  103. package/dist/common/db/schema.d.ts +4 -4
  104. package/dist/common/types/agent-state.d.ts +12 -12
  105. package/dist/common/types/grant.d.ts +1 -1
  106. package/dist/common/types/grant.js.map +1 -1
  107. package/dist/common/types/usage.d.ts +7 -7
  108. package/dist/common/types/usage.js +2 -1
  109. package/dist/common/types/usage.js.map +1 -1
  110. package/dist/common/util/__tests__/saxy.test.js +182 -48
  111. package/dist/common/util/__tests__/saxy.test.js.map +1 -1
  112. package/dist/common/util/file-metadata.d.ts +9 -0
  113. package/dist/common/util/file-metadata.js +24 -0
  114. package/dist/common/util/file-metadata.js.map +1 -0
  115. package/dist/common/util/saxy.d.ts +0 -1
  116. package/dist/common/util/saxy.js +5 -15
  117. package/dist/common/util/saxy.js.map +1 -1
  118. package/dist/common/websockets/websocket-schema.d.ts +150 -150
  119. package/dist/display.js.map +1 -1
  120. package/dist/index.js +2 -56
  121. package/dist/tool-handlers.js +1 -6
  122. package/dist/tool-handlers.js.map +1 -1
  123. package/dist/utils/__tests__/tool-renderers.test.js +4 -6
  124. package/dist/utils/__tests__/tool-renderers.test.js.map +1 -1
  125. package/dist/utils/terminal.js +1 -1
  126. package/dist/utils/terminal.js.map +1 -1
  127. package/dist/utils/tool-renderers.js +3 -6
  128. package/dist/utils/tool-renderers.js.map +1 -1
  129. package/package.json +1 -1
  130. package/dist/common/__tests__/project-file-tree.test.d.ts +0 -1
  131. package/dist/common/__tests__/project-file-tree.test.js +0 -251
  132. package/dist/common/__tests__/project-file-tree.test.js.map +0 -1
  133. package/dist/common/json-config/__tests__/__snapshots__/stringify-schema.test.js.snap +0 -119
  134. package/dist/common/util/process-stream.d.ts +0 -7
  135. package/dist/common/util/process-stream.js +0 -162
  136. package/dist/common/util/process-stream.js.map +0 -1
  137. package/dist/utils/__tests__/__snapshots__/background-process-manager.test.js.snap +0 -137
  138. package/dist/utils/__tests__/file-paths.test.d.ts +0 -1
  139. package/dist/utils/__tests__/file-paths.test.js +0 -37
  140. package/dist/utils/__tests__/file-paths.test.js.map +0 -1
  141. package/dist/utils/__tests__/path.test.d.ts +0 -1
  142. package/dist/utils/__tests__/path.test.js +0 -37
  143. package/dist/utils/__tests__/path.test.js.map +0 -1
  144. package/dist/utils/file-paths.d.ts +0 -9
  145. package/dist/utils/file-paths.js +0 -24
  146. package/dist/utils/file-paths.js.map +0 -1
  147. package/dist/utils/path.d.ts +0 -9
  148. package/dist/utils/path.js +0 -27
  149. package/dist/utils/path.js.map +0 -1
@@ -258,12 +258,12 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
258
258
  data: z.ZodString;
259
259
  }, "strip", z.ZodTypeAny, {
260
260
  type: "base64";
261
- media_type: "image/jpeg";
262
261
  data: string;
262
+ media_type: "image/jpeg";
263
263
  }, {
264
264
  type: "base64";
265
- media_type: "image/jpeg";
266
265
  data: string;
266
+ media_type: "image/jpeg";
267
267
  }>;
268
268
  cache_control: z.ZodOptional<z.ZodObject<{
269
269
  type: z.ZodLiteral<"ephemeral">;
@@ -276,8 +276,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
276
276
  type: "image";
277
277
  source: {
278
278
  type: "base64";
279
- media_type: "image/jpeg";
280
279
  data: string;
280
+ media_type: "image/jpeg";
281
281
  };
282
282
  cache_control?: {
283
283
  type: "ephemeral";
@@ -286,8 +286,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
286
286
  type: "image";
287
287
  source: {
288
288
  type: "base64";
289
- media_type: "image/jpeg";
290
289
  data: string;
290
+ media_type: "image/jpeg";
291
291
  };
292
292
  cache_control?: {
293
293
  type: "ephemeral";
@@ -319,8 +319,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
319
319
  type: "image";
320
320
  source: {
321
321
  type: "base64";
322
- media_type: "image/jpeg";
323
322
  data: string;
323
+ media_type: "image/jpeg";
324
324
  };
325
325
  cache_control?: {
326
326
  type: "ephemeral";
@@ -353,8 +353,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
353
353
  type: "image";
354
354
  source: {
355
355
  type: "base64";
356
- media_type: "image/jpeg";
357
356
  data: string;
357
+ media_type: "image/jpeg";
358
358
  };
359
359
  cache_control?: {
360
360
  type: "ephemeral";
@@ -419,8 +419,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
419
419
  type: "image";
420
420
  source: {
421
421
  type: "base64";
422
- media_type: "image/jpeg";
423
422
  data: string;
423
+ media_type: "image/jpeg";
424
424
  };
425
425
  cache_control?: {
426
426
  type: "ephemeral";
@@ -485,8 +485,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
485
485
  type: "image";
486
486
  source: {
487
487
  type: "base64";
488
- media_type: "image/jpeg";
489
488
  data: string;
489
+ media_type: "image/jpeg";
490
490
  };
491
491
  cache_control?: {
492
492
  type: "ephemeral";
@@ -515,7 +515,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
515
515
  type: "prompt";
516
516
  promptId: string;
517
517
  fingerprintId: string;
518
- costMode: "lite" | "normal" | "max" | "experimental";
518
+ costMode: "max" | "lite" | "normal" | "experimental";
519
519
  agentState: {
520
520
  agentContext: string;
521
521
  fileContext: {
@@ -572,8 +572,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
572
572
  type: "image";
573
573
  source: {
574
574
  type: "base64";
575
- media_type: "image/jpeg";
576
575
  data: string;
576
+ media_type: "image/jpeg";
577
577
  };
578
578
  cache_control?: {
579
579
  type: "ephemeral";
@@ -652,8 +652,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
652
652
  type: "image";
653
653
  source: {
654
654
  type: "base64";
655
- media_type: "image/jpeg";
656
655
  data: string;
656
+ media_type: "image/jpeg";
657
657
  };
658
658
  cache_control?: {
659
659
  type: "ephemeral";
@@ -670,7 +670,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
670
670
  }[];
671
671
  prompt?: string | undefined;
672
672
  authToken?: string | undefined;
673
- costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
673
+ costMode?: "max" | "lite" | "normal" | "experimental" | undefined;
674
674
  model?: string | undefined;
675
675
  cwd?: string | undefined;
676
676
  }>, z.ZodObject<{
@@ -887,7 +887,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
887
887
  type: "prompt";
888
888
  promptId: string;
889
889
  fingerprintId: string;
890
- costMode: "lite" | "normal" | "max" | "experimental";
890
+ costMode: "max" | "lite" | "normal" | "experimental";
891
891
  agentState: {
892
892
  agentContext: string;
893
893
  fileContext: {
@@ -944,8 +944,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
944
944
  type: "image";
945
945
  source: {
946
946
  type: "base64";
947
- media_type: "image/jpeg";
948
947
  data: string;
948
+ media_type: "image/jpeg";
949
949
  };
950
950
  cache_control?: {
951
951
  type: "ephemeral";
@@ -1069,8 +1069,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1069
1069
  type: "image";
1070
1070
  source: {
1071
1071
  type: "base64";
1072
- media_type: "image/jpeg";
1073
1072
  data: string;
1073
+ media_type: "image/jpeg";
1074
1074
  };
1075
1075
  cache_control?: {
1076
1076
  type: "ephemeral";
@@ -1087,7 +1087,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1087
1087
  }[];
1088
1088
  prompt?: string | undefined;
1089
1089
  authToken?: string | undefined;
1090
- costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
1090
+ costMode?: "max" | "lite" | "normal" | "experimental" | undefined;
1091
1091
  model?: string | undefined;
1092
1092
  cwd?: string | undefined;
1093
1093
  } | {
@@ -1389,12 +1389,12 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1389
1389
  data: z.ZodString;
1390
1390
  }, "strip", z.ZodTypeAny, {
1391
1391
  type: "base64";
1392
- media_type: "image/jpeg";
1393
1392
  data: string;
1393
+ media_type: "image/jpeg";
1394
1394
  }, {
1395
1395
  type: "base64";
1396
- media_type: "image/jpeg";
1397
1396
  data: string;
1397
+ media_type: "image/jpeg";
1398
1398
  }>;
1399
1399
  cache_control: z.ZodOptional<z.ZodObject<{
1400
1400
  type: z.ZodLiteral<"ephemeral">;
@@ -1407,8 +1407,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1407
1407
  type: "image";
1408
1408
  source: {
1409
1409
  type: "base64";
1410
- media_type: "image/jpeg";
1411
1410
  data: string;
1411
+ media_type: "image/jpeg";
1412
1412
  };
1413
1413
  cache_control?: {
1414
1414
  type: "ephemeral";
@@ -1417,8 +1417,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1417
1417
  type: "image";
1418
1418
  source: {
1419
1419
  type: "base64";
1420
- media_type: "image/jpeg";
1421
1420
  data: string;
1421
+ media_type: "image/jpeg";
1422
1422
  };
1423
1423
  cache_control?: {
1424
1424
  type: "ephemeral";
@@ -1450,8 +1450,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1450
1450
  type: "image";
1451
1451
  source: {
1452
1452
  type: "base64";
1453
- media_type: "image/jpeg";
1454
1453
  data: string;
1454
+ media_type: "image/jpeg";
1455
1455
  };
1456
1456
  cache_control?: {
1457
1457
  type: "ephemeral";
@@ -1484,8 +1484,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1484
1484
  type: "image";
1485
1485
  source: {
1486
1486
  type: "base64";
1487
- media_type: "image/jpeg";
1488
1487
  data: string;
1488
+ media_type: "image/jpeg";
1489
1489
  };
1490
1490
  cache_control?: {
1491
1491
  type: "ephemeral";
@@ -1550,8 +1550,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1550
1550
  type: "image";
1551
1551
  source: {
1552
1552
  type: "base64";
1553
- media_type: "image/jpeg";
1554
1553
  data: string;
1554
+ media_type: "image/jpeg";
1555
1555
  };
1556
1556
  cache_control?: {
1557
1557
  type: "ephemeral";
@@ -1616,8 +1616,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1616
1616
  type: "image";
1617
1617
  source: {
1618
1618
  type: "base64";
1619
- media_type: "image/jpeg";
1620
1619
  data: string;
1620
+ media_type: "image/jpeg";
1621
1621
  };
1622
1622
  cache_control?: {
1623
1623
  type: "ephemeral";
@@ -1646,7 +1646,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1646
1646
  type: "prompt";
1647
1647
  promptId: string;
1648
1648
  fingerprintId: string;
1649
- costMode: "lite" | "normal" | "max" | "experimental";
1649
+ costMode: "max" | "lite" | "normal" | "experimental";
1650
1650
  agentState: {
1651
1651
  agentContext: string;
1652
1652
  fileContext: {
@@ -1703,8 +1703,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1703
1703
  type: "image";
1704
1704
  source: {
1705
1705
  type: "base64";
1706
- media_type: "image/jpeg";
1707
1706
  data: string;
1707
+ media_type: "image/jpeg";
1708
1708
  };
1709
1709
  cache_control?: {
1710
1710
  type: "ephemeral";
@@ -1783,8 +1783,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1783
1783
  type: "image";
1784
1784
  source: {
1785
1785
  type: "base64";
1786
- media_type: "image/jpeg";
1787
1786
  data: string;
1787
+ media_type: "image/jpeg";
1788
1788
  };
1789
1789
  cache_control?: {
1790
1790
  type: "ephemeral";
@@ -1801,7 +1801,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1801
1801
  }[];
1802
1802
  prompt?: string | undefined;
1803
1803
  authToken?: string | undefined;
1804
- costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
1804
+ costMode?: "max" | "lite" | "normal" | "experimental" | undefined;
1805
1805
  model?: string | undefined;
1806
1806
  cwd?: string | undefined;
1807
1807
  }>, z.ZodObject<{
@@ -2018,7 +2018,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2018
2018
  type: "prompt";
2019
2019
  promptId: string;
2020
2020
  fingerprintId: string;
2021
- costMode: "lite" | "normal" | "max" | "experimental";
2021
+ costMode: "max" | "lite" | "normal" | "experimental";
2022
2022
  agentState: {
2023
2023
  agentContext: string;
2024
2024
  fileContext: {
@@ -2075,8 +2075,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2075
2075
  type: "image";
2076
2076
  source: {
2077
2077
  type: "base64";
2078
- media_type: "image/jpeg";
2079
2078
  data: string;
2079
+ media_type: "image/jpeg";
2080
2080
  };
2081
2081
  cache_control?: {
2082
2082
  type: "ephemeral";
@@ -2200,8 +2200,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2200
2200
  type: "image";
2201
2201
  source: {
2202
2202
  type: "base64";
2203
- media_type: "image/jpeg";
2204
2203
  data: string;
2204
+ media_type: "image/jpeg";
2205
2205
  };
2206
2206
  cache_control?: {
2207
2207
  type: "ephemeral";
@@ -2218,7 +2218,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2218
2218
  }[];
2219
2219
  prompt?: string | undefined;
2220
2220
  authToken?: string | undefined;
2221
- costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
2221
+ costMode?: "max" | "lite" | "normal" | "experimental" | undefined;
2222
2222
  model?: string | undefined;
2223
2223
  cwd?: string | undefined;
2224
2224
  } | {
@@ -2307,12 +2307,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2307
2307
  path: z.ZodString;
2308
2308
  content: z.ZodString;
2309
2309
  }, "strip", z.ZodTypeAny, {
2310
- type: "patch" | "file";
2311
2310
  path: string;
2311
+ type: "patch" | "file";
2312
2312
  content: string;
2313
2313
  }, {
2314
- type: "patch" | "file";
2315
2314
  path: string;
2315
+ type: "patch" | "file";
2316
2316
  content: string;
2317
2317
  }>, "many">;
2318
2318
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
@@ -2320,12 +2320,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2320
2320
  path: z.ZodString;
2321
2321
  content: z.ZodString;
2322
2322
  }, "strip", z.ZodTypeAny, {
2323
- type: "patch" | "file";
2324
2323
  path: string;
2324
+ type: "patch" | "file";
2325
2325
  content: string;
2326
2326
  }, {
2327
- type: "patch" | "file";
2328
2327
  path: string;
2328
+ type: "patch" | "file";
2329
2329
  content: string;
2330
2330
  }>, "many">;
2331
2331
  addedFileVersions: z.ZodArray<z.ZodObject<{
@@ -2342,7 +2342,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2342
2342
  }, {
2343
2343
  usage: z.ZodOptional<z.ZodNumber>;
2344
2344
  remainingBalance: z.ZodOptional<z.ZodNumber>;
2345
- balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<[import("../types/grant").GrantType, ...import("../types/grant").GrantType[]]>, z.ZodNumber>>>;
2345
+ balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin")[]]>, z.ZodNumber>>>;
2346
2346
  next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2347
2347
  autoTopupAdded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
2348
2348
  }>, "strip", z.ZodTypeAny, {
@@ -2350,13 +2350,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2350
2350
  userInputId: string;
2351
2351
  response: string;
2352
2352
  changes: {
2353
- type: "patch" | "file";
2354
2353
  path: string;
2354
+ type: "patch" | "file";
2355
2355
  content: string;
2356
2356
  }[];
2357
2357
  changesAlreadyApplied: {
2358
- type: "patch" | "file";
2359
2358
  path: string;
2359
+ type: "patch" | "file";
2360
2360
  content: string;
2361
2361
  }[];
2362
2362
  addedFileVersions: {
@@ -2366,7 +2366,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2366
2366
  resetFileVersions: boolean;
2367
2367
  usage?: number | undefined;
2368
2368
  remainingBalance?: number | undefined;
2369
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
2369
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
2370
2370
  next_quota_reset?: Date | null | undefined;
2371
2371
  autoTopupAdded?: number | undefined;
2372
2372
  }, {
@@ -2374,13 +2374,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2374
2374
  userInputId: string;
2375
2375
  response: string;
2376
2376
  changes: {
2377
- type: "patch" | "file";
2378
2377
  path: string;
2378
+ type: "patch" | "file";
2379
2379
  content: string;
2380
2380
  }[];
2381
2381
  changesAlreadyApplied: {
2382
- type: "patch" | "file";
2383
2382
  path: string;
2383
+ type: "patch" | "file";
2384
2384
  content: string;
2385
2385
  }[];
2386
2386
  addedFileVersions: {
@@ -2390,7 +2390,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2390
2390
  resetFileVersions: boolean;
2391
2391
  usage?: number | undefined;
2392
2392
  remainingBalance?: number | undefined;
2393
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
2393
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
2394
2394
  next_quota_reset?: Date | null | undefined;
2395
2395
  autoTopupAdded?: number | undefined;
2396
2396
  }>, z.ZodObject<{
@@ -2595,12 +2595,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2595
2595
  data: z.ZodString;
2596
2596
  }, "strip", z.ZodTypeAny, {
2597
2597
  type: "base64";
2598
- media_type: "image/jpeg";
2599
2598
  data: string;
2599
+ media_type: "image/jpeg";
2600
2600
  }, {
2601
2601
  type: "base64";
2602
- media_type: "image/jpeg";
2603
2602
  data: string;
2603
+ media_type: "image/jpeg";
2604
2604
  }>;
2605
2605
  cache_control: z.ZodOptional<z.ZodObject<{
2606
2606
  type: z.ZodLiteral<"ephemeral">;
@@ -2613,8 +2613,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2613
2613
  type: "image";
2614
2614
  source: {
2615
2615
  type: "base64";
2616
- media_type: "image/jpeg";
2617
2616
  data: string;
2617
+ media_type: "image/jpeg";
2618
2618
  };
2619
2619
  cache_control?: {
2620
2620
  type: "ephemeral";
@@ -2623,8 +2623,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2623
2623
  type: "image";
2624
2624
  source: {
2625
2625
  type: "base64";
2626
- media_type: "image/jpeg";
2627
2626
  data: string;
2627
+ media_type: "image/jpeg";
2628
2628
  };
2629
2629
  cache_control?: {
2630
2630
  type: "ephemeral";
@@ -2656,8 +2656,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2656
2656
  type: "image";
2657
2657
  source: {
2658
2658
  type: "base64";
2659
- media_type: "image/jpeg";
2660
2659
  data: string;
2660
+ media_type: "image/jpeg";
2661
2661
  };
2662
2662
  cache_control?: {
2663
2663
  type: "ephemeral";
@@ -2690,8 +2690,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2690
2690
  type: "image";
2691
2691
  source: {
2692
2692
  type: "base64";
2693
- media_type: "image/jpeg";
2694
2693
  data: string;
2694
+ media_type: "image/jpeg";
2695
2695
  };
2696
2696
  cache_control?: {
2697
2697
  type: "ephemeral";
@@ -2756,8 +2756,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2756
2756
  type: "image";
2757
2757
  source: {
2758
2758
  type: "base64";
2759
- media_type: "image/jpeg";
2760
2759
  data: string;
2760
+ media_type: "image/jpeg";
2761
2761
  };
2762
2762
  cache_control?: {
2763
2763
  type: "ephemeral";
@@ -2822,8 +2822,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2822
2822
  type: "image";
2823
2823
  source: {
2824
2824
  type: "base64";
2825
- media_type: "image/jpeg";
2826
2825
  data: string;
2826
+ media_type: "image/jpeg";
2827
2827
  };
2828
2828
  cache_control?: {
2829
2829
  type: "ephemeral";
@@ -2918,8 +2918,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2918
2918
  type: "image";
2919
2919
  source: {
2920
2920
  type: "base64";
2921
- media_type: "image/jpeg";
2922
2921
  data: string;
2922
+ media_type: "image/jpeg";
2923
2923
  };
2924
2924
  cache_control?: {
2925
2925
  type: "ephemeral";
@@ -2998,8 +2998,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2998
2998
  type: "image";
2999
2999
  source: {
3000
3000
  type: "base64";
3001
- media_type: "image/jpeg";
3002
3001
  data: string;
3002
+ media_type: "image/jpeg";
3003
3003
  };
3004
3004
  cache_control?: {
3005
3005
  type: "ephemeral";
@@ -3053,12 +3053,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3053
3053
  path: z.ZodString;
3054
3054
  content: z.ZodString;
3055
3055
  }, "strip", z.ZodTypeAny, {
3056
- type: "patch" | "file";
3057
3056
  path: string;
3057
+ type: "patch" | "file";
3058
3058
  content: string;
3059
3059
  }, {
3060
- type: "patch" | "file";
3061
3060
  path: string;
3061
+ type: "patch" | "file";
3062
3062
  content: string;
3063
3063
  }>, "many">;
3064
3064
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
@@ -3066,12 +3066,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3066
3066
  path: z.ZodString;
3067
3067
  content: z.ZodString;
3068
3068
  }, "strip", z.ZodTypeAny, {
3069
- type: "patch" | "file";
3070
3069
  path: string;
3070
+ type: "patch" | "file";
3071
3071
  content: string;
3072
3072
  }, {
3073
- type: "patch" | "file";
3074
3073
  path: string;
3074
+ type: "patch" | "file";
3075
3075
  content: string;
3076
3076
  }>, "many">;
3077
3077
  addedFileVersions: z.ZodArray<z.ZodObject<{
@@ -3095,13 +3095,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3095
3095
  userInputId: string;
3096
3096
  response: string;
3097
3097
  changes: {
3098
- type: "patch" | "file";
3099
3098
  path: string;
3099
+ type: "patch" | "file";
3100
3100
  content: string;
3101
3101
  }[];
3102
3102
  changesAlreadyApplied: {
3103
- type: "patch" | "file";
3104
3103
  path: string;
3104
+ type: "patch" | "file";
3105
3105
  content: string;
3106
3106
  }[];
3107
3107
  addedFileVersions: {
@@ -3119,13 +3119,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3119
3119
  userInputId: string;
3120
3120
  response: string;
3121
3121
  changes: {
3122
- type: "patch" | "file";
3123
3122
  path: string;
3123
+ type: "patch" | "file";
3124
3124
  content: string;
3125
3125
  }[];
3126
3126
  changesAlreadyApplied: {
3127
- type: "patch" | "file";
3128
3127
  path: string;
3128
+ type: "patch" | "file";
3129
3129
  content: string;
3130
3130
  }[];
3131
3131
  addedFileVersions: {
@@ -3163,7 +3163,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3163
3163
  type: z.ZodLiteral<"usage-response">;
3164
3164
  usage: z.ZodNumber;
3165
3165
  remainingBalance: z.ZodNumber;
3166
- balanceBreakdown: z.ZodOptional<z.ZodRecord<z.ZodEnum<[import("../types/grant").GrantType, ...import("../types/grant").GrantType[]]>, z.ZodNumber>>;
3166
+ balanceBreakdown: z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin")[]]>, z.ZodNumber>>;
3167
3167
  next_quota_reset: z.ZodNullable<z.ZodDate>;
3168
3168
  autoTopupAdded: z.ZodOptional<z.ZodNumber>;
3169
3169
  }, "type">>, "strip", z.ZodTypeAny, {
@@ -3171,20 +3171,20 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3171
3171
  usage: number;
3172
3172
  remainingBalance: number;
3173
3173
  next_quota_reset: Date | null;
3174
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3174
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
3175
3175
  autoTopupAdded?: number | undefined;
3176
3176
  }, {
3177
3177
  type: "init-response";
3178
3178
  usage: number;
3179
3179
  remainingBalance: number;
3180
3180
  next_quota_reset: Date | null;
3181
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3181
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
3182
3182
  autoTopupAdded?: number | undefined;
3183
3183
  }>, z.ZodObject<{
3184
3184
  type: z.ZodLiteral<"usage-response">;
3185
3185
  usage: z.ZodNumber;
3186
3186
  remainingBalance: z.ZodNumber;
3187
- balanceBreakdown: z.ZodOptional<z.ZodRecord<z.ZodEnum<[import("../types/grant").GrantType, ...import("../types/grant").GrantType[]]>, z.ZodNumber>>;
3187
+ balanceBreakdown: z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin")[]]>, z.ZodNumber>>;
3188
3188
  next_quota_reset: z.ZodNullable<z.ZodDate>;
3189
3189
  autoTopupAdded: z.ZodOptional<z.ZodNumber>;
3190
3190
  }, "strip", z.ZodTypeAny, {
@@ -3192,14 +3192,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3192
3192
  usage: number;
3193
3193
  remainingBalance: number;
3194
3194
  next_quota_reset: Date | null;
3195
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3195
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
3196
3196
  autoTopupAdded?: number | undefined;
3197
3197
  }, {
3198
3198
  type: "usage-response";
3199
3199
  usage: number;
3200
3200
  remainingBalance: number;
3201
3201
  next_quota_reset: Date | null;
3202
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3202
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
3203
3203
  autoTopupAdded?: number | undefined;
3204
3204
  }>, z.ZodObject<{
3205
3205
  type: z.ZodLiteral<"message-cost-response">;
@@ -3219,15 +3219,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3219
3219
  error: z.ZodOptional<z.ZodString>;
3220
3220
  remainingBalance: z.ZodOptional<z.ZodNumber>;
3221
3221
  }, "strip", z.ZodTypeAny, {
3222
- type: "action-error";
3223
3222
  message: string;
3224
- remainingBalance?: number | undefined;
3223
+ type: "action-error";
3225
3224
  error?: string | undefined;
3225
+ remainingBalance?: number | undefined;
3226
3226
  }, {
3227
- type: "action-error";
3228
3227
  message: string;
3229
- remainingBalance?: number | undefined;
3228
+ type: "action-error";
3230
3229
  error?: string | undefined;
3230
+ remainingBalance?: number | undefined;
3231
3231
  }>, z.ZodObject<{
3232
3232
  type: z.ZodLiteral<"commit-message-response">;
3233
3233
  commitMessage: z.ZodString;
@@ -3251,27 +3251,27 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3251
3251
  usage: number;
3252
3252
  remainingBalance: number;
3253
3253
  next_quota_reset: Date | null;
3254
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3254
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
3255
3255
  autoTopupAdded?: number | undefined;
3256
3256
  } | {
3257
3257
  type: "init-response";
3258
3258
  usage: number;
3259
3259
  remainingBalance: number;
3260
3260
  next_quota_reset: Date | null;
3261
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3261
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
3262
3262
  autoTopupAdded?: number | undefined;
3263
3263
  } | {
3264
3264
  type: "response-complete";
3265
3265
  userInputId: string;
3266
3266
  response: string;
3267
3267
  changes: {
3268
- type: "patch" | "file";
3269
3268
  path: string;
3269
+ type: "patch" | "file";
3270
3270
  content: string;
3271
3271
  }[];
3272
3272
  changesAlreadyApplied: {
3273
- type: "patch" | "file";
3274
3273
  path: string;
3274
+ type: "patch" | "file";
3275
3275
  content: string;
3276
3276
  }[];
3277
3277
  addedFileVersions: {
@@ -3281,7 +3281,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3281
3281
  resetFileVersions: boolean;
3282
3282
  usage?: number | undefined;
3283
3283
  remainingBalance?: number | undefined;
3284
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3284
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
3285
3285
  next_quota_reset?: Date | null | undefined;
3286
3286
  autoTopupAdded?: number | undefined;
3287
3287
  } | {
@@ -3347,8 +3347,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3347
3347
  type: "image";
3348
3348
  source: {
3349
3349
  type: "base64";
3350
- media_type: "image/jpeg";
3351
3350
  data: string;
3351
+ media_type: "image/jpeg";
3352
3352
  };
3353
3353
  cache_control?: {
3354
3354
  type: "ephemeral";
@@ -3386,13 +3386,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3386
3386
  userInputId: string;
3387
3387
  response: string;
3388
3388
  changes: {
3389
- type: "patch" | "file";
3390
3389
  path: string;
3390
+ type: "patch" | "file";
3391
3391
  content: string;
3392
3392
  }[];
3393
3393
  changesAlreadyApplied: {
3394
- type: "patch" | "file";
3395
3394
  path: string;
3395
+ type: "patch" | "file";
3396
3396
  content: string;
3397
3397
  }[];
3398
3398
  addedFileVersions: {
@@ -3409,10 +3409,10 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3409
3409
  isUpToDate: boolean;
3410
3410
  latestVersion: string;
3411
3411
  } | {
3412
- type: "action-error";
3413
3412
  message: string;
3414
- remainingBalance?: number | undefined;
3413
+ type: "action-error";
3415
3414
  error?: string | undefined;
3415
+ remainingBalance?: number | undefined;
3416
3416
  } | {
3417
3417
  type: "commit-message-response";
3418
3418
  commitMessage: string;
@@ -3426,27 +3426,27 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3426
3426
  usage: number;
3427
3427
  remainingBalance: number;
3428
3428
  next_quota_reset: Date | null;
3429
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3429
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
3430
3430
  autoTopupAdded?: number | undefined;
3431
3431
  } | {
3432
3432
  type: "init-response";
3433
3433
  usage: number;
3434
3434
  remainingBalance: number;
3435
3435
  next_quota_reset: Date | null;
3436
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3436
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
3437
3437
  autoTopupAdded?: number | undefined;
3438
3438
  } | {
3439
3439
  type: "response-complete";
3440
3440
  userInputId: string;
3441
3441
  response: string;
3442
3442
  changes: {
3443
- type: "patch" | "file";
3444
3443
  path: string;
3444
+ type: "patch" | "file";
3445
3445
  content: string;
3446
3446
  }[];
3447
3447
  changesAlreadyApplied: {
3448
- type: "patch" | "file";
3449
3448
  path: string;
3449
+ type: "patch" | "file";
3450
3450
  content: string;
3451
3451
  }[];
3452
3452
  addedFileVersions: {
@@ -3456,7 +3456,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3456
3456
  resetFileVersions: boolean;
3457
3457
  usage?: number | undefined;
3458
3458
  remainingBalance?: number | undefined;
3459
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3459
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
3460
3460
  next_quota_reset?: Date | null | undefined;
3461
3461
  autoTopupAdded?: number | undefined;
3462
3462
  } | {
@@ -3522,8 +3522,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3522
3522
  type: "image";
3523
3523
  source: {
3524
3524
  type: "base64";
3525
- media_type: "image/jpeg";
3526
3525
  data: string;
3526
+ media_type: "image/jpeg";
3527
3527
  };
3528
3528
  cache_control?: {
3529
3529
  type: "ephemeral";
@@ -3561,13 +3561,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3561
3561
  userInputId: string;
3562
3562
  response: string;
3563
3563
  changes: {
3564
- type: "patch" | "file";
3565
3564
  path: string;
3565
+ type: "patch" | "file";
3566
3566
  content: string;
3567
3567
  }[];
3568
3568
  changesAlreadyApplied: {
3569
- type: "patch" | "file";
3570
3569
  path: string;
3570
+ type: "patch" | "file";
3571
3571
  content: string;
3572
3572
  }[];
3573
3573
  addedFileVersions: {
@@ -3584,10 +3584,10 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3584
3584
  isUpToDate: boolean;
3585
3585
  latestVersion: string;
3586
3586
  } | {
3587
- type: "action-error";
3588
3587
  message: string;
3589
- remainingBalance?: number | undefined;
3588
+ type: "action-error";
3590
3589
  error?: string | undefined;
3590
+ remainingBalance?: number | undefined;
3591
3591
  } | {
3592
3592
  type: "commit-message-response";
3593
3593
  commitMessage: string;
@@ -3634,12 +3634,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3634
3634
  path: z.ZodString;
3635
3635
  content: z.ZodString;
3636
3636
  }, "strip", z.ZodTypeAny, {
3637
- type: "patch" | "file";
3638
3637
  path: string;
3638
+ type: "patch" | "file";
3639
3639
  content: string;
3640
3640
  }, {
3641
- type: "patch" | "file";
3642
3641
  path: string;
3642
+ type: "patch" | "file";
3643
3643
  content: string;
3644
3644
  }>, "many">;
3645
3645
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
@@ -3647,12 +3647,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3647
3647
  path: z.ZodString;
3648
3648
  content: z.ZodString;
3649
3649
  }, "strip", z.ZodTypeAny, {
3650
- type: "patch" | "file";
3651
3650
  path: string;
3651
+ type: "patch" | "file";
3652
3652
  content: string;
3653
3653
  }, {
3654
- type: "patch" | "file";
3655
3654
  path: string;
3655
+ type: "patch" | "file";
3656
3656
  content: string;
3657
3657
  }>, "many">;
3658
3658
  addedFileVersions: z.ZodArray<z.ZodObject<{
@@ -3669,7 +3669,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3669
3669
  }, {
3670
3670
  usage: z.ZodOptional<z.ZodNumber>;
3671
3671
  remainingBalance: z.ZodOptional<z.ZodNumber>;
3672
- balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<[import("../types/grant").GrantType, ...import("../types/grant").GrantType[]]>, z.ZodNumber>>>;
3672
+ balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin")[]]>, z.ZodNumber>>>;
3673
3673
  next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
3674
3674
  autoTopupAdded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
3675
3675
  }>, "strip", z.ZodTypeAny, {
@@ -3677,13 +3677,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3677
3677
  userInputId: string;
3678
3678
  response: string;
3679
3679
  changes: {
3680
- type: "patch" | "file";
3681
3680
  path: string;
3681
+ type: "patch" | "file";
3682
3682
  content: string;
3683
3683
  }[];
3684
3684
  changesAlreadyApplied: {
3685
- type: "patch" | "file";
3686
3685
  path: string;
3686
+ type: "patch" | "file";
3687
3687
  content: string;
3688
3688
  }[];
3689
3689
  addedFileVersions: {
@@ -3693,7 +3693,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3693
3693
  resetFileVersions: boolean;
3694
3694
  usage?: number | undefined;
3695
3695
  remainingBalance?: number | undefined;
3696
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3696
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
3697
3697
  next_quota_reset?: Date | null | undefined;
3698
3698
  autoTopupAdded?: number | undefined;
3699
3699
  }, {
@@ -3701,13 +3701,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3701
3701
  userInputId: string;
3702
3702
  response: string;
3703
3703
  changes: {
3704
- type: "patch" | "file";
3705
3704
  path: string;
3705
+ type: "patch" | "file";
3706
3706
  content: string;
3707
3707
  }[];
3708
3708
  changesAlreadyApplied: {
3709
- type: "patch" | "file";
3710
3709
  path: string;
3710
+ type: "patch" | "file";
3711
3711
  content: string;
3712
3712
  }[];
3713
3713
  addedFileVersions: {
@@ -3717,7 +3717,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3717
3717
  resetFileVersions: boolean;
3718
3718
  usage?: number | undefined;
3719
3719
  remainingBalance?: number | undefined;
3720
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3720
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
3721
3721
  next_quota_reset?: Date | null | undefined;
3722
3722
  autoTopupAdded?: number | undefined;
3723
3723
  }>, z.ZodObject<{
@@ -3922,12 +3922,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3922
3922
  data: z.ZodString;
3923
3923
  }, "strip", z.ZodTypeAny, {
3924
3924
  type: "base64";
3925
- media_type: "image/jpeg";
3926
3925
  data: string;
3926
+ media_type: "image/jpeg";
3927
3927
  }, {
3928
3928
  type: "base64";
3929
- media_type: "image/jpeg";
3930
3929
  data: string;
3930
+ media_type: "image/jpeg";
3931
3931
  }>;
3932
3932
  cache_control: z.ZodOptional<z.ZodObject<{
3933
3933
  type: z.ZodLiteral<"ephemeral">;
@@ -3940,8 +3940,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3940
3940
  type: "image";
3941
3941
  source: {
3942
3942
  type: "base64";
3943
- media_type: "image/jpeg";
3944
3943
  data: string;
3944
+ media_type: "image/jpeg";
3945
3945
  };
3946
3946
  cache_control?: {
3947
3947
  type: "ephemeral";
@@ -3950,8 +3950,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3950
3950
  type: "image";
3951
3951
  source: {
3952
3952
  type: "base64";
3953
- media_type: "image/jpeg";
3954
3953
  data: string;
3954
+ media_type: "image/jpeg";
3955
3955
  };
3956
3956
  cache_control?: {
3957
3957
  type: "ephemeral";
@@ -3983,8 +3983,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3983
3983
  type: "image";
3984
3984
  source: {
3985
3985
  type: "base64";
3986
- media_type: "image/jpeg";
3987
3986
  data: string;
3987
+ media_type: "image/jpeg";
3988
3988
  };
3989
3989
  cache_control?: {
3990
3990
  type: "ephemeral";
@@ -4017,8 +4017,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4017
4017
  type: "image";
4018
4018
  source: {
4019
4019
  type: "base64";
4020
- media_type: "image/jpeg";
4021
4020
  data: string;
4021
+ media_type: "image/jpeg";
4022
4022
  };
4023
4023
  cache_control?: {
4024
4024
  type: "ephemeral";
@@ -4083,8 +4083,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4083
4083
  type: "image";
4084
4084
  source: {
4085
4085
  type: "base64";
4086
- media_type: "image/jpeg";
4087
4086
  data: string;
4087
+ media_type: "image/jpeg";
4088
4088
  };
4089
4089
  cache_control?: {
4090
4090
  type: "ephemeral";
@@ -4149,8 +4149,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4149
4149
  type: "image";
4150
4150
  source: {
4151
4151
  type: "base64";
4152
- media_type: "image/jpeg";
4153
4152
  data: string;
4153
+ media_type: "image/jpeg";
4154
4154
  };
4155
4155
  cache_control?: {
4156
4156
  type: "ephemeral";
@@ -4245,8 +4245,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4245
4245
  type: "image";
4246
4246
  source: {
4247
4247
  type: "base64";
4248
- media_type: "image/jpeg";
4249
4248
  data: string;
4249
+ media_type: "image/jpeg";
4250
4250
  };
4251
4251
  cache_control?: {
4252
4252
  type: "ephemeral";
@@ -4325,8 +4325,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4325
4325
  type: "image";
4326
4326
  source: {
4327
4327
  type: "base64";
4328
- media_type: "image/jpeg";
4329
4328
  data: string;
4329
+ media_type: "image/jpeg";
4330
4330
  };
4331
4331
  cache_control?: {
4332
4332
  type: "ephemeral";
@@ -4380,12 +4380,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4380
4380
  path: z.ZodString;
4381
4381
  content: z.ZodString;
4382
4382
  }, "strip", z.ZodTypeAny, {
4383
- type: "patch" | "file";
4384
4383
  path: string;
4384
+ type: "patch" | "file";
4385
4385
  content: string;
4386
4386
  }, {
4387
- type: "patch" | "file";
4388
4387
  path: string;
4388
+ type: "patch" | "file";
4389
4389
  content: string;
4390
4390
  }>, "many">;
4391
4391
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
@@ -4393,12 +4393,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4393
4393
  path: z.ZodString;
4394
4394
  content: z.ZodString;
4395
4395
  }, "strip", z.ZodTypeAny, {
4396
- type: "patch" | "file";
4397
4396
  path: string;
4397
+ type: "patch" | "file";
4398
4398
  content: string;
4399
4399
  }, {
4400
- type: "patch" | "file";
4401
4400
  path: string;
4401
+ type: "patch" | "file";
4402
4402
  content: string;
4403
4403
  }>, "many">;
4404
4404
  addedFileVersions: z.ZodArray<z.ZodObject<{
@@ -4422,13 +4422,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4422
4422
  userInputId: string;
4423
4423
  response: string;
4424
4424
  changes: {
4425
- type: "patch" | "file";
4426
4425
  path: string;
4426
+ type: "patch" | "file";
4427
4427
  content: string;
4428
4428
  }[];
4429
4429
  changesAlreadyApplied: {
4430
- type: "patch" | "file";
4431
4430
  path: string;
4431
+ type: "patch" | "file";
4432
4432
  content: string;
4433
4433
  }[];
4434
4434
  addedFileVersions: {
@@ -4446,13 +4446,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4446
4446
  userInputId: string;
4447
4447
  response: string;
4448
4448
  changes: {
4449
- type: "patch" | "file";
4450
4449
  path: string;
4450
+ type: "patch" | "file";
4451
4451
  content: string;
4452
4452
  }[];
4453
4453
  changesAlreadyApplied: {
4454
- type: "patch" | "file";
4455
4454
  path: string;
4455
+ type: "patch" | "file";
4456
4456
  content: string;
4457
4457
  }[];
4458
4458
  addedFileVersions: {
@@ -4490,7 +4490,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4490
4490
  type: z.ZodLiteral<"usage-response">;
4491
4491
  usage: z.ZodNumber;
4492
4492
  remainingBalance: z.ZodNumber;
4493
- balanceBreakdown: z.ZodOptional<z.ZodRecord<z.ZodEnum<[import("../types/grant").GrantType, ...import("../types/grant").GrantType[]]>, z.ZodNumber>>;
4493
+ balanceBreakdown: z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin")[]]>, z.ZodNumber>>;
4494
4494
  next_quota_reset: z.ZodNullable<z.ZodDate>;
4495
4495
  autoTopupAdded: z.ZodOptional<z.ZodNumber>;
4496
4496
  }, "type">>, "strip", z.ZodTypeAny, {
@@ -4498,20 +4498,20 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4498
4498
  usage: number;
4499
4499
  remainingBalance: number;
4500
4500
  next_quota_reset: Date | null;
4501
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4501
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
4502
4502
  autoTopupAdded?: number | undefined;
4503
4503
  }, {
4504
4504
  type: "init-response";
4505
4505
  usage: number;
4506
4506
  remainingBalance: number;
4507
4507
  next_quota_reset: Date | null;
4508
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4508
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
4509
4509
  autoTopupAdded?: number | undefined;
4510
4510
  }>, z.ZodObject<{
4511
4511
  type: z.ZodLiteral<"usage-response">;
4512
4512
  usage: z.ZodNumber;
4513
4513
  remainingBalance: z.ZodNumber;
4514
- balanceBreakdown: z.ZodOptional<z.ZodRecord<z.ZodEnum<[import("../types/grant").GrantType, ...import("../types/grant").GrantType[]]>, z.ZodNumber>>;
4514
+ balanceBreakdown: z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin")[]]>, z.ZodNumber>>;
4515
4515
  next_quota_reset: z.ZodNullable<z.ZodDate>;
4516
4516
  autoTopupAdded: z.ZodOptional<z.ZodNumber>;
4517
4517
  }, "strip", z.ZodTypeAny, {
@@ -4519,14 +4519,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4519
4519
  usage: number;
4520
4520
  remainingBalance: number;
4521
4521
  next_quota_reset: Date | null;
4522
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4522
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
4523
4523
  autoTopupAdded?: number | undefined;
4524
4524
  }, {
4525
4525
  type: "usage-response";
4526
4526
  usage: number;
4527
4527
  remainingBalance: number;
4528
4528
  next_quota_reset: Date | null;
4529
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4529
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
4530
4530
  autoTopupAdded?: number | undefined;
4531
4531
  }>, z.ZodObject<{
4532
4532
  type: z.ZodLiteral<"message-cost-response">;
@@ -4546,15 +4546,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4546
4546
  error: z.ZodOptional<z.ZodString>;
4547
4547
  remainingBalance: z.ZodOptional<z.ZodNumber>;
4548
4548
  }, "strip", z.ZodTypeAny, {
4549
- type: "action-error";
4550
4549
  message: string;
4551
- remainingBalance?: number | undefined;
4550
+ type: "action-error";
4552
4551
  error?: string | undefined;
4552
+ remainingBalance?: number | undefined;
4553
4553
  }, {
4554
- type: "action-error";
4555
4554
  message: string;
4556
- remainingBalance?: number | undefined;
4555
+ type: "action-error";
4557
4556
  error?: string | undefined;
4557
+ remainingBalance?: number | undefined;
4558
4558
  }>, z.ZodObject<{
4559
4559
  type: z.ZodLiteral<"commit-message-response">;
4560
4560
  commitMessage: z.ZodString;
@@ -4578,27 +4578,27 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4578
4578
  usage: number;
4579
4579
  remainingBalance: number;
4580
4580
  next_quota_reset: Date | null;
4581
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4581
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
4582
4582
  autoTopupAdded?: number | undefined;
4583
4583
  } | {
4584
4584
  type: "init-response";
4585
4585
  usage: number;
4586
4586
  remainingBalance: number;
4587
4587
  next_quota_reset: Date | null;
4588
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4588
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
4589
4589
  autoTopupAdded?: number | undefined;
4590
4590
  } | {
4591
4591
  type: "response-complete";
4592
4592
  userInputId: string;
4593
4593
  response: string;
4594
4594
  changes: {
4595
- type: "patch" | "file";
4596
4595
  path: string;
4596
+ type: "patch" | "file";
4597
4597
  content: string;
4598
4598
  }[];
4599
4599
  changesAlreadyApplied: {
4600
- type: "patch" | "file";
4601
4600
  path: string;
4601
+ type: "patch" | "file";
4602
4602
  content: string;
4603
4603
  }[];
4604
4604
  addedFileVersions: {
@@ -4608,7 +4608,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4608
4608
  resetFileVersions: boolean;
4609
4609
  usage?: number | undefined;
4610
4610
  remainingBalance?: number | undefined;
4611
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4611
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
4612
4612
  next_quota_reset?: Date | null | undefined;
4613
4613
  autoTopupAdded?: number | undefined;
4614
4614
  } | {
@@ -4674,8 +4674,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4674
4674
  type: "image";
4675
4675
  source: {
4676
4676
  type: "base64";
4677
- media_type: "image/jpeg";
4678
4677
  data: string;
4678
+ media_type: "image/jpeg";
4679
4679
  };
4680
4680
  cache_control?: {
4681
4681
  type: "ephemeral";
@@ -4713,13 +4713,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4713
4713
  userInputId: string;
4714
4714
  response: string;
4715
4715
  changes: {
4716
- type: "patch" | "file";
4717
4716
  path: string;
4717
+ type: "patch" | "file";
4718
4718
  content: string;
4719
4719
  }[];
4720
4720
  changesAlreadyApplied: {
4721
- type: "patch" | "file";
4722
4721
  path: string;
4722
+ type: "patch" | "file";
4723
4723
  content: string;
4724
4724
  }[];
4725
4725
  addedFileVersions: {
@@ -4736,10 +4736,10 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4736
4736
  isUpToDate: boolean;
4737
4737
  latestVersion: string;
4738
4738
  } | {
4739
- type: "action-error";
4740
4739
  message: string;
4741
- remainingBalance?: number | undefined;
4740
+ type: "action-error";
4742
4741
  error?: string | undefined;
4742
+ remainingBalance?: number | undefined;
4743
4743
  } | {
4744
4744
  type: "commit-message-response";
4745
4745
  commitMessage: string;
@@ -4753,27 +4753,27 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4753
4753
  usage: number;
4754
4754
  remainingBalance: number;
4755
4755
  next_quota_reset: Date | null;
4756
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4756
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
4757
4757
  autoTopupAdded?: number | undefined;
4758
4758
  } | {
4759
4759
  type: "init-response";
4760
4760
  usage: number;
4761
4761
  remainingBalance: number;
4762
4762
  next_quota_reset: Date | null;
4763
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4763
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
4764
4764
  autoTopupAdded?: number | undefined;
4765
4765
  } | {
4766
4766
  type: "response-complete";
4767
4767
  userInputId: string;
4768
4768
  response: string;
4769
4769
  changes: {
4770
- type: "patch" | "file";
4771
4770
  path: string;
4771
+ type: "patch" | "file";
4772
4772
  content: string;
4773
4773
  }[];
4774
4774
  changesAlreadyApplied: {
4775
- type: "patch" | "file";
4776
4775
  path: string;
4776
+ type: "patch" | "file";
4777
4777
  content: string;
4778
4778
  }[];
4779
4779
  addedFileVersions: {
@@ -4783,7 +4783,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4783
4783
  resetFileVersions: boolean;
4784
4784
  usage?: number | undefined;
4785
4785
  remainingBalance?: number | undefined;
4786
- balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4786
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin", number>> | undefined;
4787
4787
  next_quota_reset?: Date | null | undefined;
4788
4788
  autoTopupAdded?: number | undefined;
4789
4789
  } | {
@@ -4849,8 +4849,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4849
4849
  type: "image";
4850
4850
  source: {
4851
4851
  type: "base64";
4852
- media_type: "image/jpeg";
4853
4852
  data: string;
4853
+ media_type: "image/jpeg";
4854
4854
  };
4855
4855
  cache_control?: {
4856
4856
  type: "ephemeral";
@@ -4888,13 +4888,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4888
4888
  userInputId: string;
4889
4889
  response: string;
4890
4890
  changes: {
4891
- type: "patch" | "file";
4892
4891
  path: string;
4892
+ type: "patch" | "file";
4893
4893
  content: string;
4894
4894
  }[];
4895
4895
  changesAlreadyApplied: {
4896
- type: "patch" | "file";
4897
4896
  path: string;
4897
+ type: "patch" | "file";
4898
4898
  content: string;
4899
4899
  }[];
4900
4900
  addedFileVersions: {
@@ -4911,10 +4911,10 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4911
4911
  isUpToDate: boolean;
4912
4912
  latestVersion: string;
4913
4913
  } | {
4914
- type: "action-error";
4915
4914
  message: string;
4916
- remainingBalance?: number | undefined;
4915
+ type: "action-error";
4917
4916
  error?: string | undefined;
4917
+ remainingBalance?: number | undefined;
4918
4918
  } | {
4919
4919
  type: "commit-message-response";
4920
4920
  commitMessage: string;