codebuff 1.0.281 → 1.0.282

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 (130) 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 +2 -2
  25. package/dist/client.js +5 -6
  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.test.d.ts +2 -0
  72. package/dist/code-map/parse.test.d.ts.map +1 -0
  73. package/dist/code-map/parse.test.js +218 -0
  74. package/dist/code-map/parse.test.js.map +1 -0
  75. package/dist/code-map/scripts/tree-sitter-test.cjs +27 -0
  76. package/dist/code-map/scripts/tree-sitter-test.cjs.map +1 -0
  77. package/dist/code-map/scripts/tree-sitter-test.d.cts +2 -0
  78. package/dist/code-map/scripts/tree-sitter-test.d.cts.map +1 -0
  79. package/dist/code-map/scripts/tree-sitter-test.d.ts +2 -0
  80. package/dist/code-map/scripts/tree-sitter-test.d.ts.map +1 -0
  81. package/dist/code-map/scripts/tree-sitter-test.js +54 -0
  82. package/dist/code-map/scripts/tree-sitter-test.js.map +1 -0
  83. package/dist/code-map/test-parser.d.ts +2 -0
  84. package/dist/code-map/test-parser.d.ts.map +1 -0
  85. package/dist/code-map/test-parser.js +42 -0
  86. package/dist/code-map/test-parser.js.map +1 -0
  87. package/dist/code-map/tsconfig.tsbuildinfo +1 -1
  88. package/dist/common/actions.d.ts +66 -66
  89. package/dist/common/bigquery/client.d.ts +15 -0
  90. package/dist/common/bigquery/client.js +265 -0
  91. package/dist/common/bigquery/client.js.map +1 -0
  92. package/dist/common/bigquery/schema.d.ts +55 -0
  93. package/dist/common/bigquery/schema.js +24 -0
  94. package/dist/common/bigquery/schema.js.map +1 -0
  95. package/dist/common/constants/tools.d.ts +0 -2
  96. package/dist/common/constants/tools.js +0 -3
  97. package/dist/common/constants/tools.js.map +1 -1
  98. package/dist/common/types/agent-state.d.ts +12 -12
  99. package/dist/common/util/file-metadata.d.ts +9 -0
  100. package/dist/common/util/file-metadata.js +24 -0
  101. package/dist/common/util/file-metadata.js.map +1 -0
  102. package/dist/common/util/saxy.js +3 -1
  103. package/dist/common/util/saxy.js.map +1 -1
  104. package/dist/common/websockets/websocket-schema.d.ts +124 -124
  105. package/dist/index.js +2 -56
  106. package/dist/tool-handlers.js +0 -6
  107. package/dist/tool-handlers.js.map +1 -1
  108. package/dist/utils/tool-renderers.js +0 -6
  109. package/dist/utils/tool-renderers.js.map +1 -1
  110. package/package.json +1 -1
  111. package/dist/common/__tests__/project-file-tree.test.d.ts +0 -1
  112. package/dist/common/__tests__/project-file-tree.test.js +0 -251
  113. package/dist/common/__tests__/project-file-tree.test.js.map +0 -1
  114. package/dist/common/json-config/__tests__/__snapshots__/stringify-schema.test.js.snap +0 -119
  115. package/dist/common/util/process-stream.d.ts +0 -7
  116. package/dist/common/util/process-stream.js +0 -162
  117. package/dist/common/util/process-stream.js.map +0 -1
  118. package/dist/utils/__tests__/__snapshots__/background-process-manager.test.js.snap +0 -137
  119. package/dist/utils/__tests__/file-paths.test.d.ts +0 -1
  120. package/dist/utils/__tests__/file-paths.test.js +0 -37
  121. package/dist/utils/__tests__/file-paths.test.js.map +0 -1
  122. package/dist/utils/__tests__/path.test.d.ts +0 -1
  123. package/dist/utils/__tests__/path.test.js +0 -37
  124. package/dist/utils/__tests__/path.test.js.map +0 -1
  125. package/dist/utils/file-paths.d.ts +0 -9
  126. package/dist/utils/file-paths.js +0 -24
  127. package/dist/utils/file-paths.js.map +0 -1
  128. package/dist/utils/path.d.ts +0 -9
  129. package/dist/utils/path.js +0 -27
  130. package/dist/utils/path.js.map +0 -1
@@ -210,16 +210,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
210
210
  type: "ephemeral";
211
211
  }>>;
212
212
  }, "strip", z.ZodTypeAny, {
213
- type: "tool_use";
214
213
  name: string;
214
+ type: "tool_use";
215
215
  id: string;
216
216
  input: Record<string, any>;
217
217
  cache_control?: {
218
218
  type: "ephemeral";
219
219
  } | undefined;
220
220
  }, {
221
- type: "tool_use";
222
221
  name: string;
222
+ type: "tool_use";
223
223
  id: string;
224
224
  input: Record<string, any>;
225
225
  cache_control?: {
@@ -301,8 +301,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
301
301
  type: "ephemeral";
302
302
  } | undefined;
303
303
  } | {
304
- type: "tool_use";
305
304
  name: string;
305
+ type: "tool_use";
306
306
  id: string;
307
307
  input: Record<string, any>;
308
308
  cache_control?: {
@@ -335,8 +335,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
335
335
  type: "ephemeral";
336
336
  } | undefined;
337
337
  } | {
338
- type: "tool_use";
339
338
  name: string;
339
+ type: "tool_use";
340
340
  id: string;
341
341
  input: Record<string, any>;
342
342
  cache_control?: {
@@ -401,8 +401,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
401
401
  type: "ephemeral";
402
402
  } | undefined;
403
403
  } | {
404
- type: "tool_use";
405
404
  name: string;
405
+ type: "tool_use";
406
406
  id: string;
407
407
  input: Record<string, any>;
408
408
  cache_control?: {
@@ -467,8 +467,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
467
467
  type: "ephemeral";
468
468
  } | undefined;
469
469
  } | {
470
- type: "tool_use";
471
470
  name: string;
471
+ type: "tool_use";
472
472
  id: string;
473
473
  input: Record<string, any>;
474
474
  cache_control?: {
@@ -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: {
@@ -554,8 +554,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
554
554
  type: "ephemeral";
555
555
  } | undefined;
556
556
  } | {
557
- type: "tool_use";
558
557
  name: string;
558
+ type: "tool_use";
559
559
  id: string;
560
560
  input: Record<string, any>;
561
561
  cache_control?: {
@@ -634,8 +634,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
634
634
  type: "ephemeral";
635
635
  } | undefined;
636
636
  } | {
637
- type: "tool_use";
638
637
  name: string;
638
+ type: "tool_use";
639
639
  id: string;
640
640
  input: Record<string, any>;
641
641
  cache_control?: {
@@ -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<{
@@ -803,7 +803,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
803
803
  }>;
804
804
  }, "strip", z.ZodTypeAny, {
805
805
  type: "init";
806
- fingerprintId: string;
807
806
  fileContext: {
808
807
  currentWorkingDirectory: string;
809
808
  fileTree: import("../util/file").FileTreeNode[];
@@ -832,10 +831,10 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
832
831
  content: string;
833
832
  }[][] | undefined;
834
833
  };
834
+ fingerprintId: string;
835
835
  authToken?: string | undefined;
836
836
  }, {
837
837
  type: "init";
838
- fingerprintId: string;
839
838
  fileContext: {
840
839
  currentWorkingDirectory: string;
841
840
  fileTree: import("../util/file").FileTreeNode[];
@@ -864,6 +863,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
864
863
  content: string;
865
864
  }[][] | undefined;
866
865
  };
866
+ fingerprintId: string;
867
867
  authToken?: string | undefined;
868
868
  }>, z.ZodObject<{
869
869
  type: z.ZodLiteral<"generate-commit-message">;
@@ -887,7 +887,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
887
887
  type: "prompt";
888
888
  promptId: string;
889
889
  fingerprintId: string;
890
- costMode: "lite" | "normal" | "max" | "experimental";
890
+ costMode: "max" | "lite" | "normal" | "experimental";
891
891
  agentState: {
892
892
  agentContext: string;
893
893
  fileContext: {
@@ -926,8 +926,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
926
926
  type: "ephemeral";
927
927
  } | undefined;
928
928
  } | {
929
- type: "tool_use";
930
929
  name: string;
930
+ type: "tool_use";
931
931
  id: string;
932
932
  input: Record<string, any>;
933
933
  cache_control?: {
@@ -970,7 +970,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
970
970
  requestId?: string | undefined;
971
971
  } | {
972
972
  type: "init";
973
- fingerprintId: string;
974
973
  fileContext: {
975
974
  currentWorkingDirectory: string;
976
975
  fileTree: import("../util/file").FileTreeNode[];
@@ -999,6 +998,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
999
998
  content: string;
1000
999
  }[][] | undefined;
1001
1000
  };
1001
+ fingerprintId: string;
1002
1002
  authToken?: string | undefined;
1003
1003
  } | {
1004
1004
  type: "generate-commit-message";
@@ -1051,8 +1051,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1051
1051
  type: "ephemeral";
1052
1052
  } | undefined;
1053
1053
  } | {
1054
- type: "tool_use";
1055
1054
  name: string;
1055
+ type: "tool_use";
1056
1056
  id: string;
1057
1057
  input: Record<string, any>;
1058
1058
  cache_control?: {
@@ -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
  } | {
@@ -1096,7 +1096,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1096
1096
  requestId?: string | undefined;
1097
1097
  } | {
1098
1098
  type: "init";
1099
- fingerprintId: string;
1100
1099
  fileContext: {
1101
1100
  currentWorkingDirectory: string;
1102
1101
  fileTree: import("../util/file").FileTreeNode[];
@@ -1125,6 +1124,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1125
1124
  content: string;
1126
1125
  }[][] | undefined;
1127
1126
  };
1127
+ fingerprintId: string;
1128
1128
  authToken?: string | undefined;
1129
1129
  } | {
1130
1130
  type: "generate-commit-message";
@@ -1341,16 +1341,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1341
1341
  type: "ephemeral";
1342
1342
  }>>;
1343
1343
  }, "strip", z.ZodTypeAny, {
1344
- type: "tool_use";
1345
1344
  name: string;
1345
+ type: "tool_use";
1346
1346
  id: string;
1347
1347
  input: Record<string, any>;
1348
1348
  cache_control?: {
1349
1349
  type: "ephemeral";
1350
1350
  } | undefined;
1351
1351
  }, {
1352
- type: "tool_use";
1353
1352
  name: string;
1353
+ type: "tool_use";
1354
1354
  id: string;
1355
1355
  input: Record<string, any>;
1356
1356
  cache_control?: {
@@ -1432,8 +1432,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1432
1432
  type: "ephemeral";
1433
1433
  } | undefined;
1434
1434
  } | {
1435
- type: "tool_use";
1436
1435
  name: string;
1436
+ type: "tool_use";
1437
1437
  id: string;
1438
1438
  input: Record<string, any>;
1439
1439
  cache_control?: {
@@ -1466,8 +1466,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1466
1466
  type: "ephemeral";
1467
1467
  } | undefined;
1468
1468
  } | {
1469
- type: "tool_use";
1470
1469
  name: string;
1470
+ type: "tool_use";
1471
1471
  id: string;
1472
1472
  input: Record<string, any>;
1473
1473
  cache_control?: {
@@ -1532,8 +1532,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1532
1532
  type: "ephemeral";
1533
1533
  } | undefined;
1534
1534
  } | {
1535
- type: "tool_use";
1536
1535
  name: string;
1536
+ type: "tool_use";
1537
1537
  id: string;
1538
1538
  input: Record<string, any>;
1539
1539
  cache_control?: {
@@ -1598,8 +1598,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1598
1598
  type: "ephemeral";
1599
1599
  } | undefined;
1600
1600
  } | {
1601
- type: "tool_use";
1602
1601
  name: string;
1602
+ type: "tool_use";
1603
1603
  id: string;
1604
1604
  input: Record<string, any>;
1605
1605
  cache_control?: {
@@ -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: {
@@ -1685,8 +1685,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1685
1685
  type: "ephemeral";
1686
1686
  } | undefined;
1687
1687
  } | {
1688
- type: "tool_use";
1689
1688
  name: string;
1689
+ type: "tool_use";
1690
1690
  id: string;
1691
1691
  input: Record<string, any>;
1692
1692
  cache_control?: {
@@ -1765,8 +1765,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1765
1765
  type: "ephemeral";
1766
1766
  } | undefined;
1767
1767
  } | {
1768
- type: "tool_use";
1769
1768
  name: string;
1769
+ type: "tool_use";
1770
1770
  id: string;
1771
1771
  input: Record<string, any>;
1772
1772
  cache_control?: {
@@ -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<{
@@ -1934,7 +1934,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1934
1934
  }>;
1935
1935
  }, "strip", z.ZodTypeAny, {
1936
1936
  type: "init";
1937
- fingerprintId: string;
1938
1937
  fileContext: {
1939
1938
  currentWorkingDirectory: string;
1940
1939
  fileTree: import("../util/file").FileTreeNode[];
@@ -1963,10 +1962,10 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1963
1962
  content: string;
1964
1963
  }[][] | undefined;
1965
1964
  };
1965
+ fingerprintId: string;
1966
1966
  authToken?: string | undefined;
1967
1967
  }, {
1968
1968
  type: "init";
1969
- fingerprintId: string;
1970
1969
  fileContext: {
1971
1970
  currentWorkingDirectory: string;
1972
1971
  fileTree: import("../util/file").FileTreeNode[];
@@ -1995,6 +1994,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1995
1994
  content: string;
1996
1995
  }[][] | undefined;
1997
1996
  };
1997
+ fingerprintId: string;
1998
1998
  authToken?: string | undefined;
1999
1999
  }>, z.ZodObject<{
2000
2000
  type: z.ZodLiteral<"generate-commit-message">;
@@ -2018,7 +2018,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2018
2018
  type: "prompt";
2019
2019
  promptId: string;
2020
2020
  fingerprintId: string;
2021
- costMode: "lite" | "normal" | "max" | "experimental";
2021
+ costMode: "max" | "lite" | "normal" | "experimental";
2022
2022
  agentState: {
2023
2023
  agentContext: string;
2024
2024
  fileContext: {
@@ -2057,8 +2057,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2057
2057
  type: "ephemeral";
2058
2058
  } | undefined;
2059
2059
  } | {
2060
- type: "tool_use";
2061
2060
  name: string;
2061
+ type: "tool_use";
2062
2062
  id: string;
2063
2063
  input: Record<string, any>;
2064
2064
  cache_control?: {
@@ -2101,7 +2101,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2101
2101
  requestId?: string | undefined;
2102
2102
  } | {
2103
2103
  type: "init";
2104
- fingerprintId: string;
2105
2104
  fileContext: {
2106
2105
  currentWorkingDirectory: string;
2107
2106
  fileTree: import("../util/file").FileTreeNode[];
@@ -2130,6 +2129,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2130
2129
  content: string;
2131
2130
  }[][] | undefined;
2132
2131
  };
2132
+ fingerprintId: string;
2133
2133
  authToken?: string | undefined;
2134
2134
  } | {
2135
2135
  type: "generate-commit-message";
@@ -2182,8 +2182,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2182
2182
  type: "ephemeral";
2183
2183
  } | undefined;
2184
2184
  } | {
2185
- type: "tool_use";
2186
2185
  name: string;
2186
+ type: "tool_use";
2187
2187
  id: string;
2188
2188
  input: Record<string, any>;
2189
2189
  cache_control?: {
@@ -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
  } | {
@@ -2227,7 +2227,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2227
2227
  requestId?: string | undefined;
2228
2228
  } | {
2229
2229
  type: "init";
2230
- fingerprintId: string;
2231
2230
  fileContext: {
2232
2231
  currentWorkingDirectory: string;
2233
2232
  fileTree: import("../util/file").FileTreeNode[];
@@ -2256,6 +2255,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2256
2255
  content: string;
2257
2256
  }[][] | undefined;
2258
2257
  };
2258
+ fingerprintId: string;
2259
2259
  authToken?: string | undefined;
2260
2260
  } | {
2261
2261
  type: "generate-commit-message";
@@ -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<{
@@ -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: {
@@ -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: {
@@ -2547,16 +2547,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2547
2547
  type: "ephemeral";
2548
2548
  }>>;
2549
2549
  }, "strip", z.ZodTypeAny, {
2550
- type: "tool_use";
2551
2550
  name: string;
2551
+ type: "tool_use";
2552
2552
  id: string;
2553
2553
  input: Record<string, any>;
2554
2554
  cache_control?: {
2555
2555
  type: "ephemeral";
2556
2556
  } | undefined;
2557
2557
  }, {
2558
- type: "tool_use";
2559
2558
  name: string;
2559
+ type: "tool_use";
2560
2560
  id: string;
2561
2561
  input: Record<string, any>;
2562
2562
  cache_control?: {
@@ -2638,8 +2638,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2638
2638
  type: "ephemeral";
2639
2639
  } | undefined;
2640
2640
  } | {
2641
- type: "tool_use";
2642
2641
  name: string;
2642
+ type: "tool_use";
2643
2643
  id: string;
2644
2644
  input: Record<string, any>;
2645
2645
  cache_control?: {
@@ -2672,8 +2672,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2672
2672
  type: "ephemeral";
2673
2673
  } | undefined;
2674
2674
  } | {
2675
- type: "tool_use";
2676
2675
  name: string;
2676
+ type: "tool_use";
2677
2677
  id: string;
2678
2678
  input: Record<string, any>;
2679
2679
  cache_control?: {
@@ -2738,8 +2738,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2738
2738
  type: "ephemeral";
2739
2739
  } | undefined;
2740
2740
  } | {
2741
- type: "tool_use";
2742
2741
  name: string;
2742
+ type: "tool_use";
2743
2743
  id: string;
2744
2744
  input: Record<string, any>;
2745
2745
  cache_control?: {
@@ -2804,8 +2804,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2804
2804
  type: "ephemeral";
2805
2805
  } | undefined;
2806
2806
  } | {
2807
- type: "tool_use";
2808
2807
  name: string;
2808
+ type: "tool_use";
2809
2809
  id: string;
2810
2810
  input: Record<string, any>;
2811
2811
  cache_control?: {
@@ -2839,12 +2839,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2839
2839
  id: z.ZodString;
2840
2840
  }, "strip", z.ZodTypeAny, {
2841
2841
  name: string;
2842
- id: string;
2843
2842
  parameters: Record<string, string>;
2843
+ id: string;
2844
2844
  }, {
2845
2845
  name: string;
2846
- id: string;
2847
2846
  parameters: Record<string, string>;
2847
+ id: string;
2848
2848
  }>, "many">;
2849
2849
  toolResults: z.ZodArray<z.ZodObject<{
2850
2850
  name: z.ZodString;
@@ -2900,8 +2900,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2900
2900
  type: "ephemeral";
2901
2901
  } | undefined;
2902
2902
  } | {
2903
- type: "tool_use";
2904
2903
  name: string;
2904
+ type: "tool_use";
2905
2905
  id: string;
2906
2906
  input: Record<string, any>;
2907
2907
  cache_control?: {
@@ -2936,8 +2936,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2936
2936
  }[];
2937
2937
  toolCalls: {
2938
2938
  name: string;
2939
- id: string;
2940
2939
  parameters: Record<string, string>;
2940
+ id: string;
2941
2941
  }[];
2942
2942
  }, {
2943
2943
  type: "prompt-response";
@@ -2980,8 +2980,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2980
2980
  type: "ephemeral";
2981
2981
  } | undefined;
2982
2982
  } | {
2983
- type: "tool_use";
2984
2983
  name: string;
2984
+ type: "tool_use";
2985
2985
  id: string;
2986
2986
  input: Record<string, any>;
2987
2987
  cache_control?: {
@@ -3016,8 +3016,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3016
3016
  }[];
3017
3017
  toolCalls: {
3018
3018
  name: string;
3019
- id: string;
3020
3019
  parameters: Record<string, string>;
3020
+ id: string;
3021
3021
  }[];
3022
3022
  }>, z.ZodObject<{
3023
3023
  type: z.ZodLiteral<"read-files">;
@@ -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: {
@@ -3219,13 +3219,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3219
3219
  error: z.ZodOptional<z.ZodString>;
3220
3220
  remainingBalance: z.ZodOptional<z.ZodNumber>;
3221
3221
  }, "strip", z.ZodTypeAny, {
3222
- type: "action-error";
3223
3222
  message: string;
3223
+ type: "action-error";
3224
3224
  remainingBalance?: number | undefined;
3225
3225
  error?: string | undefined;
3226
3226
  }, {
3227
- type: "action-error";
3228
3227
  message: string;
3228
+ type: "action-error";
3229
3229
  remainingBalance?: number | undefined;
3230
3230
  error?: string | undefined;
3231
3231
  }>, z.ZodObject<{
@@ -3265,13 +3265,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
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: {
@@ -3329,8 +3329,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3329
3329
  type: "ephemeral";
3330
3330
  } | undefined;
3331
3331
  } | {
3332
- type: "tool_use";
3333
3332
  name: string;
3333
+ type: "tool_use";
3334
3334
  id: string;
3335
3335
  input: Record<string, any>;
3336
3336
  cache_control?: {
@@ -3365,8 +3365,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3365
3365
  }[];
3366
3366
  toolCalls: {
3367
3367
  name: string;
3368
- id: string;
3369
3368
  parameters: Record<string, string>;
3369
+ id: string;
3370
3370
  }[];
3371
3371
  } | {
3372
3372
  type: "response-chunk";
@@ -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,8 +3409,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3409
3409
  isUpToDate: boolean;
3410
3410
  latestVersion: string;
3411
3411
  } | {
3412
- type: "action-error";
3413
3412
  message: string;
3413
+ type: "action-error";
3414
3414
  remainingBalance?: number | undefined;
3415
3415
  error?: string | undefined;
3416
3416
  } | {
@@ -3440,13 +3440,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
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: {
@@ -3504,8 +3504,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3504
3504
  type: "ephemeral";
3505
3505
  } | undefined;
3506
3506
  } | {
3507
- type: "tool_use";
3508
3507
  name: string;
3508
+ type: "tool_use";
3509
3509
  id: string;
3510
3510
  input: Record<string, any>;
3511
3511
  cache_control?: {
@@ -3540,8 +3540,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3540
3540
  }[];
3541
3541
  toolCalls: {
3542
3542
  name: string;
3543
- id: string;
3544
3543
  parameters: Record<string, string>;
3544
+ id: string;
3545
3545
  }[];
3546
3546
  } | {
3547
3547
  type: "response-chunk";
@@ -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,8 +3584,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3584
3584
  isUpToDate: boolean;
3585
3585
  latestVersion: string;
3586
3586
  } | {
3587
- type: "action-error";
3588
3587
  message: string;
3588
+ type: "action-error";
3589
3589
  remainingBalance?: number | undefined;
3590
3590
  error?: string | undefined;
3591
3591
  } | {
@@ -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<{
@@ -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: {
@@ -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: {
@@ -3874,16 +3874,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3874
3874
  type: "ephemeral";
3875
3875
  }>>;
3876
3876
  }, "strip", z.ZodTypeAny, {
3877
- type: "tool_use";
3878
3877
  name: string;
3878
+ type: "tool_use";
3879
3879
  id: string;
3880
3880
  input: Record<string, any>;
3881
3881
  cache_control?: {
3882
3882
  type: "ephemeral";
3883
3883
  } | undefined;
3884
3884
  }, {
3885
- type: "tool_use";
3886
3885
  name: string;
3886
+ type: "tool_use";
3887
3887
  id: string;
3888
3888
  input: Record<string, any>;
3889
3889
  cache_control?: {
@@ -3965,8 +3965,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3965
3965
  type: "ephemeral";
3966
3966
  } | undefined;
3967
3967
  } | {
3968
- type: "tool_use";
3969
3968
  name: string;
3969
+ type: "tool_use";
3970
3970
  id: string;
3971
3971
  input: Record<string, any>;
3972
3972
  cache_control?: {
@@ -3999,8 +3999,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3999
3999
  type: "ephemeral";
4000
4000
  } | undefined;
4001
4001
  } | {
4002
- type: "tool_use";
4003
4002
  name: string;
4003
+ type: "tool_use";
4004
4004
  id: string;
4005
4005
  input: Record<string, any>;
4006
4006
  cache_control?: {
@@ -4065,8 +4065,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4065
4065
  type: "ephemeral";
4066
4066
  } | undefined;
4067
4067
  } | {
4068
- type: "tool_use";
4069
4068
  name: string;
4069
+ type: "tool_use";
4070
4070
  id: string;
4071
4071
  input: Record<string, any>;
4072
4072
  cache_control?: {
@@ -4131,8 +4131,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4131
4131
  type: "ephemeral";
4132
4132
  } | undefined;
4133
4133
  } | {
4134
- type: "tool_use";
4135
4134
  name: string;
4135
+ type: "tool_use";
4136
4136
  id: string;
4137
4137
  input: Record<string, any>;
4138
4138
  cache_control?: {
@@ -4166,12 +4166,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4166
4166
  id: z.ZodString;
4167
4167
  }, "strip", z.ZodTypeAny, {
4168
4168
  name: string;
4169
- id: string;
4170
4169
  parameters: Record<string, string>;
4170
+ id: string;
4171
4171
  }, {
4172
4172
  name: string;
4173
- id: string;
4174
4173
  parameters: Record<string, string>;
4174
+ id: string;
4175
4175
  }>, "many">;
4176
4176
  toolResults: z.ZodArray<z.ZodObject<{
4177
4177
  name: z.ZodString;
@@ -4227,8 +4227,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4227
4227
  type: "ephemeral";
4228
4228
  } | undefined;
4229
4229
  } | {
4230
- type: "tool_use";
4231
4230
  name: string;
4231
+ type: "tool_use";
4232
4232
  id: string;
4233
4233
  input: Record<string, any>;
4234
4234
  cache_control?: {
@@ -4263,8 +4263,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4263
4263
  }[];
4264
4264
  toolCalls: {
4265
4265
  name: string;
4266
- id: string;
4267
4266
  parameters: Record<string, string>;
4267
+ id: string;
4268
4268
  }[];
4269
4269
  }, {
4270
4270
  type: "prompt-response";
@@ -4307,8 +4307,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4307
4307
  type: "ephemeral";
4308
4308
  } | undefined;
4309
4309
  } | {
4310
- type: "tool_use";
4311
4310
  name: string;
4311
+ type: "tool_use";
4312
4312
  id: string;
4313
4313
  input: Record<string, any>;
4314
4314
  cache_control?: {
@@ -4343,8 +4343,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4343
4343
  }[];
4344
4344
  toolCalls: {
4345
4345
  name: string;
4346
- id: string;
4347
4346
  parameters: Record<string, string>;
4347
+ id: string;
4348
4348
  }[];
4349
4349
  }>, z.ZodObject<{
4350
4350
  type: z.ZodLiteral<"read-files">;
@@ -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: {
@@ -4546,13 +4546,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4546
4546
  error: z.ZodOptional<z.ZodString>;
4547
4547
  remainingBalance: z.ZodOptional<z.ZodNumber>;
4548
4548
  }, "strip", z.ZodTypeAny, {
4549
- type: "action-error";
4550
4549
  message: string;
4550
+ type: "action-error";
4551
4551
  remainingBalance?: number | undefined;
4552
4552
  error?: string | undefined;
4553
4553
  }, {
4554
- type: "action-error";
4555
4554
  message: string;
4555
+ type: "action-error";
4556
4556
  remainingBalance?: number | undefined;
4557
4557
  error?: string | undefined;
4558
4558
  }>, z.ZodObject<{
@@ -4592,13 +4592,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4592
4592
  userInputId: string;
4593
4593
  response: string;
4594
4594
  changes: {
4595
- type: "patch" | "file";
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: {
@@ -4656,8 +4656,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4656
4656
  type: "ephemeral";
4657
4657
  } | undefined;
4658
4658
  } | {
4659
- type: "tool_use";
4660
4659
  name: string;
4660
+ type: "tool_use";
4661
4661
  id: string;
4662
4662
  input: Record<string, any>;
4663
4663
  cache_control?: {
@@ -4692,8 +4692,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4692
4692
  }[];
4693
4693
  toolCalls: {
4694
4694
  name: string;
4695
- id: string;
4696
4695
  parameters: Record<string, string>;
4696
+ id: string;
4697
4697
  }[];
4698
4698
  } | {
4699
4699
  type: "response-chunk";
@@ -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,8 +4736,8 @@ 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;
4740
+ type: "action-error";
4741
4741
  remainingBalance?: number | undefined;
4742
4742
  error?: string | undefined;
4743
4743
  } | {
@@ -4767,13 +4767,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4767
4767
  userInputId: string;
4768
4768
  response: string;
4769
4769
  changes: {
4770
- type: "patch" | "file";
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: {
@@ -4831,8 +4831,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4831
4831
  type: "ephemeral";
4832
4832
  } | undefined;
4833
4833
  } | {
4834
- type: "tool_use";
4835
4834
  name: string;
4835
+ type: "tool_use";
4836
4836
  id: string;
4837
4837
  input: Record<string, any>;
4838
4838
  cache_control?: {
@@ -4867,8 +4867,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4867
4867
  }[];
4868
4868
  toolCalls: {
4869
4869
  name: string;
4870
- id: string;
4871
4870
  parameters: Record<string, string>;
4871
+ id: string;
4872
4872
  }[];
4873
4873
  } | {
4874
4874
  type: "response-chunk";
@@ -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,8 +4911,8 @@ 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;
4915
+ type: "action-error";
4916
4916
  remainingBalance?: number | undefined;
4917
4917
  error?: string | undefined;
4918
4918
  } | {