codebuff 1.0.227 → 1.0.229

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 (92) hide show
  1. package/dist/background-process-manager.d.ts +4 -2
  2. package/dist/background-process-manager.js +75 -56
  3. package/dist/background-process-manager.js.map +1 -1
  4. package/dist/cli.d.ts +3 -1
  5. package/dist/cli.js +15 -2
  6. package/dist/cli.js.map +1 -1
  7. package/dist/client.d.ts +7 -5
  8. package/dist/client.js +49 -29
  9. package/dist/client.js.map +1 -1
  10. package/dist/code-map/tsconfig.tsbuildinfo +1 -1
  11. package/dist/common/actions.d.ts +114 -108
  12. package/dist/common/actions.js +5 -1
  13. package/dist/common/actions.js.map +1 -1
  14. package/dist/common/bigquery/client.d.ts +15 -0
  15. package/dist/common/bigquery/client.js +245 -0
  16. package/dist/common/bigquery/client.js.map +1 -0
  17. package/dist/common/bigquery/schema.d.ts +54 -0
  18. package/dist/common/bigquery/schema.js +24 -0
  19. package/dist/common/bigquery/schema.js.map +1 -0
  20. package/dist/common/billing/balance-calculator.d.ts +3 -0
  21. package/dist/common/billing/balance-calculator.js +6 -2
  22. package/dist/common/billing/balance-calculator.js.map +1 -1
  23. package/dist/common/billing/grant-credits.d.ts +16 -1
  24. package/dist/common/billing/grant-credits.js +67 -2
  25. package/dist/common/billing/grant-credits.js.map +1 -1
  26. package/dist/common/constants/tools.d.ts +1 -0
  27. package/dist/common/constants/tools.js +21 -1
  28. package/dist/common/constants/tools.js.map +1 -1
  29. package/dist/common/constants.d.ts +2 -1
  30. package/dist/common/constants.js +2 -5
  31. package/dist/common/constants.js.map +1 -1
  32. package/dist/common/db/transaction.d.ts +12 -0
  33. package/dist/common/db/transaction.js +36 -0
  34. package/dist/common/db/transaction.js.map +1 -0
  35. package/dist/common/json-config/__tests__/stringify-schema.test.d.ts +1 -0
  36. package/dist/common/json-config/__tests__/stringify-schema.test.js +66 -0
  37. package/dist/common/json-config/__tests__/stringify-schema.test.js.map +1 -0
  38. package/dist/common/json-config/constants.d.ts +77 -0
  39. package/dist/common/json-config/constants.js +42 -0
  40. package/dist/common/json-config/constants.js.map +1 -0
  41. package/dist/common/json-config/stringify-schema.d.ts +10 -0
  42. package/dist/common/json-config/stringify-schema.js +87 -0
  43. package/dist/common/json-config/stringify-schema.js.map +1 -0
  44. package/dist/common/types/usage.d.ts +4 -4
  45. package/dist/common/util/__tests__/string.test.js +2 -3
  46. package/dist/common/util/__tests__/string.test.js.map +1 -1
  47. package/dist/common/util/string.d.ts +3 -2
  48. package/dist/common/util/string.js +14 -4
  49. package/dist/common/util/string.js.map +1 -1
  50. package/dist/common/websockets/websocket-client.d.ts +2 -1
  51. package/dist/common/websockets/websocket-client.js +12 -0
  52. package/dist/common/websockets/websocket-client.js.map +1 -1
  53. package/dist/common/websockets/websocket-schema.d.ts +222 -202
  54. package/dist/{json-config/dev-process-manager.d.ts → dev-process-manager.d.ts} +1 -1
  55. package/dist/{json-config/dev-process-manager.js → dev-process-manager.js} +15 -5
  56. package/dist/dev-process-manager.js.map +1 -0
  57. package/dist/index.js +10 -6
  58. package/dist/index.js.map +1 -1
  59. package/dist/utils/__tests__/response-example-4-files.txt +621 -0
  60. package/dist/utils/__tests__/tool-renderers.test.js +16 -8
  61. package/dist/utils/__tests__/tool-renderers.test.js.map +1 -1
  62. package/dist/utils/__tests__/xml-stream-parser.test.js +23 -11
  63. package/dist/utils/__tests__/xml-stream-parser.test.js.map +1 -1
  64. package/dist/utils/terminal.d.ts +10 -3
  65. package/dist/utils/terminal.js +53 -14
  66. package/dist/utils/terminal.js.map +1 -1
  67. package/package.json +2 -2
  68. package/dist/common/billing/quota-manager.d.ts +0 -29
  69. package/dist/common/billing/quota-manager.js +0 -251
  70. package/dist/common/billing/quota-manager.js.map +0 -1
  71. package/dist/common/logger.d.ts +0 -1
  72. package/dist/common/logger.js +0 -7
  73. package/dist/common/logger.js.map +0 -1
  74. package/dist/common/util/constants.d.ts +0 -1
  75. package/dist/common/util/constants.js +0 -7
  76. package/dist/common/util/constants.js.map +0 -1
  77. package/dist/common/util/helpers.d.ts +0 -1
  78. package/dist/common/util/helpers.js +0 -6
  79. package/dist/common/util/helpers.js.map +0 -1
  80. package/dist/common/util/token-counter.d.ts +0 -3
  81. package/dist/common/util/token-counter.js +0 -27
  82. package/dist/common/util/token-counter.js.map +0 -1
  83. package/dist/common/util/tools.d.ts +0 -2
  84. package/dist/common/util/tools.js +0 -13
  85. package/dist/common/util/tools.js.map +0 -1
  86. package/dist/json-config/constants.d.ts +0 -43
  87. package/dist/json-config/constants.js +0 -13
  88. package/dist/json-config/constants.js.map +0 -1
  89. package/dist/json-config/dev-process-manager.js.map +0 -1
  90. /package/dist/{json-config → common/json-config}/parser.d.ts +0 -0
  91. /package/dist/{json-config → common/json-config}/parser.js +0 -0
  92. /package/dist/{json-config → common/json-config}/parser.js.map +0 -0
@@ -208,16 +208,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
208
208
  }>>;
209
209
  }, "strip", z.ZodTypeAny, {
210
210
  type: "tool_use";
211
- name: string;
212
211
  id: string;
212
+ name: string;
213
213
  input: Record<string, any>;
214
214
  cache_control?: {
215
215
  type: "ephemeral";
216
216
  } | undefined;
217
217
  }, {
218
218
  type: "tool_use";
219
- name: string;
220
219
  id: string;
220
+ name: string;
221
221
  input: Record<string, any>;
222
222
  cache_control?: {
223
223
  type: "ephemeral";
@@ -255,12 +255,12 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
255
255
  data: z.ZodString;
256
256
  }, "strip", z.ZodTypeAny, {
257
257
  type: "base64";
258
- media_type: "image/jpeg";
259
258
  data: string;
259
+ media_type: "image/jpeg";
260
260
  }, {
261
261
  type: "base64";
262
- media_type: "image/jpeg";
263
262
  data: string;
263
+ media_type: "image/jpeg";
264
264
  }>;
265
265
  cache_control: z.ZodOptional<z.ZodObject<{
266
266
  type: z.ZodLiteral<"ephemeral">;
@@ -273,8 +273,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
273
273
  type: "image";
274
274
  source: {
275
275
  type: "base64";
276
- media_type: "image/jpeg";
277
276
  data: string;
277
+ media_type: "image/jpeg";
278
278
  };
279
279
  cache_control?: {
280
280
  type: "ephemeral";
@@ -283,8 +283,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
283
283
  type: "image";
284
284
  source: {
285
285
  type: "base64";
286
- media_type: "image/jpeg";
287
286
  data: string;
287
+ media_type: "image/jpeg";
288
288
  };
289
289
  cache_control?: {
290
290
  type: "ephemeral";
@@ -299,8 +299,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
299
299
  } | undefined;
300
300
  } | {
301
301
  type: "tool_use";
302
- name: string;
303
302
  id: string;
303
+ name: string;
304
304
  input: Record<string, any>;
305
305
  cache_control?: {
306
306
  type: "ephemeral";
@@ -316,8 +316,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
316
316
  type: "image";
317
317
  source: {
318
318
  type: "base64";
319
- media_type: "image/jpeg";
320
319
  data: string;
320
+ media_type: "image/jpeg";
321
321
  };
322
322
  cache_control?: {
323
323
  type: "ephemeral";
@@ -333,8 +333,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
333
333
  } | undefined;
334
334
  } | {
335
335
  type: "tool_use";
336
- name: string;
337
336
  id: string;
337
+ name: string;
338
338
  input: Record<string, any>;
339
339
  cache_control?: {
340
340
  type: "ephemeral";
@@ -350,8 +350,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
350
350
  type: "image";
351
351
  source: {
352
352
  type: "base64";
353
- media_type: "image/jpeg";
354
353
  data: string;
354
+ media_type: "image/jpeg";
355
355
  };
356
356
  cache_control?: {
357
357
  type: "ephemeral";
@@ -398,8 +398,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
398
398
  } | undefined;
399
399
  } | {
400
400
  type: "tool_use";
401
- name: string;
402
401
  id: string;
402
+ name: string;
403
403
  input: Record<string, any>;
404
404
  cache_control?: {
405
405
  type: "ephemeral";
@@ -415,8 +415,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
415
415
  type: "image";
416
416
  source: {
417
417
  type: "base64";
418
- media_type: "image/jpeg";
419
418
  data: string;
419
+ media_type: "image/jpeg";
420
420
  };
421
421
  cache_control?: {
422
422
  type: "ephemeral";
@@ -463,8 +463,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
463
463
  } | undefined;
464
464
  } | {
465
465
  type: "tool_use";
466
- name: string;
467
466
  id: string;
467
+ name: string;
468
468
  input: Record<string, any>;
469
469
  cache_control?: {
470
470
  type: "ephemeral";
@@ -480,8 +480,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
480
480
  type: "image";
481
481
  source: {
482
482
  type: "base64";
483
- media_type: "image/jpeg";
484
483
  data: string;
484
+ media_type: "image/jpeg";
485
485
  };
486
486
  cache_control?: {
487
487
  type: "ephemeral";
@@ -496,12 +496,12 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
496
496
  result: z.ZodString;
497
497
  id: z.ZodString;
498
498
  }, "strip", z.ZodTypeAny, {
499
- name: string;
500
499
  id: string;
500
+ name: string;
501
501
  result: string;
502
502
  }, {
503
- name: string;
504
503
  id: string;
504
+ name: string;
505
505
  result: string;
506
506
  }>, "many">;
507
507
  model: z.ZodOptional<z.ZodString>;
@@ -548,8 +548,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
548
548
  } | undefined;
549
549
  } | {
550
550
  type: "tool_use";
551
- name: string;
552
551
  id: string;
552
+ name: string;
553
553
  input: Record<string, any>;
554
554
  cache_control?: {
555
555
  type: "ephemeral";
@@ -565,8 +565,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
565
565
  type: "image";
566
566
  source: {
567
567
  type: "base64";
568
- media_type: "image/jpeg";
569
568
  data: string;
569
+ media_type: "image/jpeg";
570
570
  };
571
571
  cache_control?: {
572
572
  type: "ephemeral";
@@ -577,13 +577,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
577
577
  consecutiveAssistantMessages?: number | undefined;
578
578
  };
579
579
  toolResults: {
580
- name: string;
581
580
  id: string;
581
+ name: string;
582
582
  result: string;
583
583
  }[];
584
+ model?: string | undefined;
584
585
  prompt?: string | undefined;
585
586
  authToken?: string | undefined;
586
- model?: string | undefined;
587
587
  }, {
588
588
  type: "prompt";
589
589
  promptId: string;
@@ -626,8 +626,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
626
626
  } | undefined;
627
627
  } | {
628
628
  type: "tool_use";
629
- name: string;
630
629
  id: string;
630
+ name: string;
631
631
  input: Record<string, any>;
632
632
  cache_control?: {
633
633
  type: "ephemeral";
@@ -643,8 +643,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
643
643
  type: "image";
644
644
  source: {
645
645
  type: "base64";
646
- media_type: "image/jpeg";
647
646
  data: string;
647
+ media_type: "image/jpeg";
648
648
  };
649
649
  cache_control?: {
650
650
  type: "ephemeral";
@@ -655,14 +655,14 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
655
655
  consecutiveAssistantMessages?: number | undefined;
656
656
  };
657
657
  toolResults: {
658
- name: string;
659
658
  id: string;
659
+ name: string;
660
660
  result: string;
661
661
  }[];
662
+ model?: string | undefined;
662
663
  prompt?: string | undefined;
663
664
  authToken?: string | undefined;
664
665
  costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
665
- model?: string | undefined;
666
666
  }>, z.ZodObject<{
667
667
  type: z.ZodLiteral<"read-files-response">;
668
668
  files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
@@ -911,8 +911,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
911
911
  } | undefined;
912
912
  } | {
913
913
  type: "tool_use";
914
- name: string;
915
914
  id: string;
915
+ name: string;
916
916
  input: Record<string, any>;
917
917
  cache_control?: {
918
918
  type: "ephemeral";
@@ -928,8 +928,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
928
928
  type: "image";
929
929
  source: {
930
930
  type: "base64";
931
- media_type: "image/jpeg";
932
931
  data: string;
932
+ media_type: "image/jpeg";
933
933
  };
934
934
  cache_control?: {
935
935
  type: "ephemeral";
@@ -940,13 +940,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
940
940
  consecutiveAssistantMessages?: number | undefined;
941
941
  };
942
942
  toolResults: {
943
- name: string;
944
943
  id: string;
944
+ name: string;
945
945
  result: string;
946
946
  }[];
947
+ model?: string | undefined;
947
948
  prompt?: string | undefined;
948
949
  authToken?: string | undefined;
949
- model?: string | undefined;
950
950
  } | {
951
951
  type: "read-files-response";
952
952
  files: Record<string, string | null>;
@@ -1033,8 +1033,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1033
1033
  } | undefined;
1034
1034
  } | {
1035
1035
  type: "tool_use";
1036
- name: string;
1037
1036
  id: string;
1037
+ name: string;
1038
1038
  input: Record<string, any>;
1039
1039
  cache_control?: {
1040
1040
  type: "ephemeral";
@@ -1050,8 +1050,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1050
1050
  type: "image";
1051
1051
  source: {
1052
1052
  type: "base64";
1053
- media_type: "image/jpeg";
1054
1053
  data: string;
1054
+ media_type: "image/jpeg";
1055
1055
  };
1056
1056
  cache_control?: {
1057
1057
  type: "ephemeral";
@@ -1062,14 +1062,14 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1062
1062
  consecutiveAssistantMessages?: number | undefined;
1063
1063
  };
1064
1064
  toolResults: {
1065
- name: string;
1066
1065
  id: string;
1066
+ name: string;
1067
1067
  result: string;
1068
1068
  }[];
1069
+ model?: string | undefined;
1069
1070
  prompt?: string | undefined;
1070
1071
  authToken?: string | undefined;
1071
1072
  costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
1072
- model?: string | undefined;
1073
1073
  } | {
1074
1074
  type: "read-files-response";
1075
1075
  files: Record<string, string | null>;
@@ -1318,16 +1318,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1318
1318
  }>>;
1319
1319
  }, "strip", z.ZodTypeAny, {
1320
1320
  type: "tool_use";
1321
- name: string;
1322
1321
  id: string;
1322
+ name: string;
1323
1323
  input: Record<string, any>;
1324
1324
  cache_control?: {
1325
1325
  type: "ephemeral";
1326
1326
  } | undefined;
1327
1327
  }, {
1328
1328
  type: "tool_use";
1329
- name: string;
1330
1329
  id: string;
1330
+ name: string;
1331
1331
  input: Record<string, any>;
1332
1332
  cache_control?: {
1333
1333
  type: "ephemeral";
@@ -1365,12 +1365,12 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1365
1365
  data: z.ZodString;
1366
1366
  }, "strip", z.ZodTypeAny, {
1367
1367
  type: "base64";
1368
- media_type: "image/jpeg";
1369
1368
  data: string;
1369
+ media_type: "image/jpeg";
1370
1370
  }, {
1371
1371
  type: "base64";
1372
- media_type: "image/jpeg";
1373
1372
  data: string;
1373
+ media_type: "image/jpeg";
1374
1374
  }>;
1375
1375
  cache_control: z.ZodOptional<z.ZodObject<{
1376
1376
  type: z.ZodLiteral<"ephemeral">;
@@ -1383,8 +1383,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1383
1383
  type: "image";
1384
1384
  source: {
1385
1385
  type: "base64";
1386
- media_type: "image/jpeg";
1387
1386
  data: string;
1387
+ media_type: "image/jpeg";
1388
1388
  };
1389
1389
  cache_control?: {
1390
1390
  type: "ephemeral";
@@ -1393,8 +1393,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1393
1393
  type: "image";
1394
1394
  source: {
1395
1395
  type: "base64";
1396
- media_type: "image/jpeg";
1397
1396
  data: string;
1397
+ media_type: "image/jpeg";
1398
1398
  };
1399
1399
  cache_control?: {
1400
1400
  type: "ephemeral";
@@ -1409,8 +1409,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1409
1409
  } | undefined;
1410
1410
  } | {
1411
1411
  type: "tool_use";
1412
- name: string;
1413
1412
  id: string;
1413
+ name: string;
1414
1414
  input: Record<string, any>;
1415
1415
  cache_control?: {
1416
1416
  type: "ephemeral";
@@ -1426,8 +1426,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1426
1426
  type: "image";
1427
1427
  source: {
1428
1428
  type: "base64";
1429
- media_type: "image/jpeg";
1430
1429
  data: string;
1430
+ media_type: "image/jpeg";
1431
1431
  };
1432
1432
  cache_control?: {
1433
1433
  type: "ephemeral";
@@ -1443,8 +1443,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1443
1443
  } | undefined;
1444
1444
  } | {
1445
1445
  type: "tool_use";
1446
- name: string;
1447
1446
  id: string;
1447
+ name: string;
1448
1448
  input: Record<string, any>;
1449
1449
  cache_control?: {
1450
1450
  type: "ephemeral";
@@ -1460,8 +1460,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1460
1460
  type: "image";
1461
1461
  source: {
1462
1462
  type: "base64";
1463
- media_type: "image/jpeg";
1464
1463
  data: string;
1464
+ media_type: "image/jpeg";
1465
1465
  };
1466
1466
  cache_control?: {
1467
1467
  type: "ephemeral";
@@ -1508,8 +1508,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1508
1508
  } | undefined;
1509
1509
  } | {
1510
1510
  type: "tool_use";
1511
- name: string;
1512
1511
  id: string;
1512
+ name: string;
1513
1513
  input: Record<string, any>;
1514
1514
  cache_control?: {
1515
1515
  type: "ephemeral";
@@ -1525,8 +1525,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1525
1525
  type: "image";
1526
1526
  source: {
1527
1527
  type: "base64";
1528
- media_type: "image/jpeg";
1529
1528
  data: string;
1529
+ media_type: "image/jpeg";
1530
1530
  };
1531
1531
  cache_control?: {
1532
1532
  type: "ephemeral";
@@ -1573,8 +1573,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1573
1573
  } | undefined;
1574
1574
  } | {
1575
1575
  type: "tool_use";
1576
- name: string;
1577
1576
  id: string;
1577
+ name: string;
1578
1578
  input: Record<string, any>;
1579
1579
  cache_control?: {
1580
1580
  type: "ephemeral";
@@ -1590,8 +1590,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1590
1590
  type: "image";
1591
1591
  source: {
1592
1592
  type: "base64";
1593
- media_type: "image/jpeg";
1594
1593
  data: string;
1594
+ media_type: "image/jpeg";
1595
1595
  };
1596
1596
  cache_control?: {
1597
1597
  type: "ephemeral";
@@ -1606,12 +1606,12 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1606
1606
  result: z.ZodString;
1607
1607
  id: z.ZodString;
1608
1608
  }, "strip", z.ZodTypeAny, {
1609
- name: string;
1610
1609
  id: string;
1610
+ name: string;
1611
1611
  result: string;
1612
1612
  }, {
1613
- name: string;
1614
1613
  id: string;
1614
+ name: string;
1615
1615
  result: string;
1616
1616
  }>, "many">;
1617
1617
  model: z.ZodOptional<z.ZodString>;
@@ -1658,8 +1658,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1658
1658
  } | undefined;
1659
1659
  } | {
1660
1660
  type: "tool_use";
1661
- name: string;
1662
1661
  id: string;
1662
+ name: string;
1663
1663
  input: Record<string, any>;
1664
1664
  cache_control?: {
1665
1665
  type: "ephemeral";
@@ -1675,8 +1675,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1675
1675
  type: "image";
1676
1676
  source: {
1677
1677
  type: "base64";
1678
- media_type: "image/jpeg";
1679
1678
  data: string;
1679
+ media_type: "image/jpeg";
1680
1680
  };
1681
1681
  cache_control?: {
1682
1682
  type: "ephemeral";
@@ -1687,13 +1687,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1687
1687
  consecutiveAssistantMessages?: number | undefined;
1688
1688
  };
1689
1689
  toolResults: {
1690
- name: string;
1691
1690
  id: string;
1691
+ name: string;
1692
1692
  result: string;
1693
1693
  }[];
1694
+ model?: string | undefined;
1694
1695
  prompt?: string | undefined;
1695
1696
  authToken?: string | undefined;
1696
- model?: string | undefined;
1697
1697
  }, {
1698
1698
  type: "prompt";
1699
1699
  promptId: string;
@@ -1736,8 +1736,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1736
1736
  } | undefined;
1737
1737
  } | {
1738
1738
  type: "tool_use";
1739
- name: string;
1740
1739
  id: string;
1740
+ name: string;
1741
1741
  input: Record<string, any>;
1742
1742
  cache_control?: {
1743
1743
  type: "ephemeral";
@@ -1753,8 +1753,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1753
1753
  type: "image";
1754
1754
  source: {
1755
1755
  type: "base64";
1756
- media_type: "image/jpeg";
1757
1756
  data: string;
1757
+ media_type: "image/jpeg";
1758
1758
  };
1759
1759
  cache_control?: {
1760
1760
  type: "ephemeral";
@@ -1765,14 +1765,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1765
1765
  consecutiveAssistantMessages?: number | undefined;
1766
1766
  };
1767
1767
  toolResults: {
1768
- name: string;
1769
1768
  id: string;
1769
+ name: string;
1770
1770
  result: string;
1771
1771
  }[];
1772
+ model?: string | undefined;
1772
1773
  prompt?: string | undefined;
1773
1774
  authToken?: string | undefined;
1774
1775
  costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
1775
- model?: string | undefined;
1776
1776
  }>, z.ZodObject<{
1777
1777
  type: z.ZodLiteral<"read-files-response">;
1778
1778
  files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
@@ -2021,8 +2021,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2021
2021
  } | undefined;
2022
2022
  } | {
2023
2023
  type: "tool_use";
2024
- name: string;
2025
2024
  id: string;
2025
+ name: string;
2026
2026
  input: Record<string, any>;
2027
2027
  cache_control?: {
2028
2028
  type: "ephemeral";
@@ -2038,8 +2038,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2038
2038
  type: "image";
2039
2039
  source: {
2040
2040
  type: "base64";
2041
- media_type: "image/jpeg";
2042
2041
  data: string;
2042
+ media_type: "image/jpeg";
2043
2043
  };
2044
2044
  cache_control?: {
2045
2045
  type: "ephemeral";
@@ -2050,13 +2050,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2050
2050
  consecutiveAssistantMessages?: number | undefined;
2051
2051
  };
2052
2052
  toolResults: {
2053
- name: string;
2054
2053
  id: string;
2054
+ name: string;
2055
2055
  result: string;
2056
2056
  }[];
2057
+ model?: string | undefined;
2057
2058
  prompt?: string | undefined;
2058
2059
  authToken?: string | undefined;
2059
- model?: string | undefined;
2060
2060
  } | {
2061
2061
  type: "read-files-response";
2062
2062
  files: Record<string, string | null>;
@@ -2143,8 +2143,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2143
2143
  } | undefined;
2144
2144
  } | {
2145
2145
  type: "tool_use";
2146
- name: string;
2147
2146
  id: string;
2147
+ name: string;
2148
2148
  input: Record<string, any>;
2149
2149
  cache_control?: {
2150
2150
  type: "ephemeral";
@@ -2160,8 +2160,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2160
2160
  type: "image";
2161
2161
  source: {
2162
2162
  type: "base64";
2163
- media_type: "image/jpeg";
2164
2163
  data: string;
2164
+ media_type: "image/jpeg";
2165
2165
  };
2166
2166
  cache_control?: {
2167
2167
  type: "ephemeral";
@@ -2172,14 +2172,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2172
2172
  consecutiveAssistantMessages?: number | undefined;
2173
2173
  };
2174
2174
  toolResults: {
2175
- name: string;
2176
2175
  id: string;
2176
+ name: string;
2177
2177
  result: string;
2178
2178
  }[];
2179
+ model?: string | undefined;
2179
2180
  prompt?: string | undefined;
2180
2181
  authToken?: string | undefined;
2181
2182
  costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
2182
- model?: string | undefined;
2183
2183
  } | {
2184
2184
  type: "read-files-response";
2185
2185
  files: Record<string, string | null>;
@@ -2298,16 +2298,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2298
2298
  }>, "many">;
2299
2299
  resetFileVersions: z.ZodBoolean;
2300
2300
  }, {
2301
+ next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2301
2302
  usage: z.ZodOptional<z.ZodNumber>;
2302
2303
  remainingBalance: z.ZodOptional<z.ZodNumber>;
2303
2304
  balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<[import("../types/grant").GrantType, ...import("../types/grant").GrantType[]]>, z.ZodNumber>>>;
2304
- next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
2305
2305
  nextMonthlyGrant: z.ZodOptional<z.ZodNumber>;
2306
2306
  autoTopupAdded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
2307
2307
  }>, "strip", z.ZodTypeAny, {
2308
2308
  type: "response-complete";
2309
- userInputId: string;
2310
2309
  response: string;
2310
+ userInputId: string;
2311
2311
  changes: {
2312
2312
  type: "patch" | "file";
2313
2313
  path: string;
@@ -2323,16 +2323,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2323
2323
  content: string;
2324
2324
  }[];
2325
2325
  resetFileVersions: boolean;
2326
+ next_quota_reset?: Date | null | undefined;
2326
2327
  usage?: number | undefined;
2327
2328
  remainingBalance?: number | undefined;
2328
2329
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
2329
- next_quota_reset?: Date | null | undefined;
2330
2330
  nextMonthlyGrant?: number | undefined;
2331
2331
  autoTopupAdded?: number | undefined;
2332
2332
  }, {
2333
2333
  type: "response-complete";
2334
- userInputId: string;
2335
2334
  response: string;
2335
+ userInputId: string;
2336
2336
  changes: {
2337
2337
  type: "patch" | "file";
2338
2338
  path: string;
@@ -2348,10 +2348,10 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2348
2348
  content: string;
2349
2349
  }[];
2350
2350
  resetFileVersions: boolean;
2351
+ next_quota_reset?: Date | null | undefined;
2351
2352
  usage?: number | undefined;
2352
2353
  remainingBalance?: number | undefined;
2353
2354
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
2354
- next_quota_reset?: Date | null | undefined;
2355
2355
  nextMonthlyGrant?: number | undefined;
2356
2356
  autoTopupAdded?: number | undefined;
2357
2357
  }>, z.ZodObject<{
@@ -2506,16 +2506,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2506
2506
  }>>;
2507
2507
  }, "strip", z.ZodTypeAny, {
2508
2508
  type: "tool_use";
2509
- name: string;
2510
2509
  id: string;
2510
+ name: string;
2511
2511
  input: Record<string, any>;
2512
2512
  cache_control?: {
2513
2513
  type: "ephemeral";
2514
2514
  } | undefined;
2515
2515
  }, {
2516
2516
  type: "tool_use";
2517
- name: string;
2518
2517
  id: string;
2518
+ name: string;
2519
2519
  input: Record<string, any>;
2520
2520
  cache_control?: {
2521
2521
  type: "ephemeral";
@@ -2553,12 +2553,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2553
2553
  data: z.ZodString;
2554
2554
  }, "strip", z.ZodTypeAny, {
2555
2555
  type: "base64";
2556
- media_type: "image/jpeg";
2557
2556
  data: string;
2557
+ media_type: "image/jpeg";
2558
2558
  }, {
2559
2559
  type: "base64";
2560
- media_type: "image/jpeg";
2561
2560
  data: string;
2561
+ media_type: "image/jpeg";
2562
2562
  }>;
2563
2563
  cache_control: z.ZodOptional<z.ZodObject<{
2564
2564
  type: z.ZodLiteral<"ephemeral">;
@@ -2571,8 +2571,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2571
2571
  type: "image";
2572
2572
  source: {
2573
2573
  type: "base64";
2574
- media_type: "image/jpeg";
2575
2574
  data: string;
2575
+ media_type: "image/jpeg";
2576
2576
  };
2577
2577
  cache_control?: {
2578
2578
  type: "ephemeral";
@@ -2581,8 +2581,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2581
2581
  type: "image";
2582
2582
  source: {
2583
2583
  type: "base64";
2584
- media_type: "image/jpeg";
2585
2584
  data: string;
2585
+ media_type: "image/jpeg";
2586
2586
  };
2587
2587
  cache_control?: {
2588
2588
  type: "ephemeral";
@@ -2597,8 +2597,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2597
2597
  } | undefined;
2598
2598
  } | {
2599
2599
  type: "tool_use";
2600
- name: string;
2601
2600
  id: string;
2601
+ name: string;
2602
2602
  input: Record<string, any>;
2603
2603
  cache_control?: {
2604
2604
  type: "ephemeral";
@@ -2614,8 +2614,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2614
2614
  type: "image";
2615
2615
  source: {
2616
2616
  type: "base64";
2617
- media_type: "image/jpeg";
2618
2617
  data: string;
2618
+ media_type: "image/jpeg";
2619
2619
  };
2620
2620
  cache_control?: {
2621
2621
  type: "ephemeral";
@@ -2631,8 +2631,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2631
2631
  } | undefined;
2632
2632
  } | {
2633
2633
  type: "tool_use";
2634
- name: string;
2635
2634
  id: string;
2635
+ name: string;
2636
2636
  input: Record<string, any>;
2637
2637
  cache_control?: {
2638
2638
  type: "ephemeral";
@@ -2648,8 +2648,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2648
2648
  type: "image";
2649
2649
  source: {
2650
2650
  type: "base64";
2651
- media_type: "image/jpeg";
2652
2651
  data: string;
2652
+ media_type: "image/jpeg";
2653
2653
  };
2654
2654
  cache_control?: {
2655
2655
  type: "ephemeral";
@@ -2696,8 +2696,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2696
2696
  } | undefined;
2697
2697
  } | {
2698
2698
  type: "tool_use";
2699
- name: string;
2700
2699
  id: string;
2700
+ name: string;
2701
2701
  input: Record<string, any>;
2702
2702
  cache_control?: {
2703
2703
  type: "ephemeral";
@@ -2713,8 +2713,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2713
2713
  type: "image";
2714
2714
  source: {
2715
2715
  type: "base64";
2716
- media_type: "image/jpeg";
2717
2716
  data: string;
2717
+ media_type: "image/jpeg";
2718
2718
  };
2719
2719
  cache_control?: {
2720
2720
  type: "ephemeral";
@@ -2761,8 +2761,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2761
2761
  } | undefined;
2762
2762
  } | {
2763
2763
  type: "tool_use";
2764
- name: string;
2765
2764
  id: string;
2765
+ name: string;
2766
2766
  input: Record<string, any>;
2767
2767
  cache_control?: {
2768
2768
  type: "ephemeral";
@@ -2778,8 +2778,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2778
2778
  type: "image";
2779
2779
  source: {
2780
2780
  type: "base64";
2781
- media_type: "image/jpeg";
2782
2781
  data: string;
2782
+ media_type: "image/jpeg";
2783
2783
  };
2784
2784
  cache_control?: {
2785
2785
  type: "ephemeral";
@@ -2794,12 +2794,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2794
2794
  parameters: z.ZodRecord<z.ZodString, z.ZodString>;
2795
2795
  id: z.ZodString;
2796
2796
  }, "strip", z.ZodTypeAny, {
2797
- name: string;
2798
2797
  id: string;
2798
+ name: string;
2799
2799
  parameters: Record<string, string>;
2800
2800
  }, {
2801
- name: string;
2802
2801
  id: string;
2802
+ name: string;
2803
2803
  parameters: Record<string, string>;
2804
2804
  }>, "many">;
2805
2805
  toolResults: z.ZodArray<z.ZodObject<{
@@ -2807,12 +2807,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2807
2807
  result: z.ZodString;
2808
2808
  id: z.ZodString;
2809
2809
  }, "strip", z.ZodTypeAny, {
2810
- name: string;
2811
2810
  id: string;
2811
+ name: string;
2812
2812
  result: string;
2813
2813
  }, {
2814
- name: string;
2815
2814
  id: string;
2815
+ name: string;
2816
2816
  result: string;
2817
2817
  }>, "many">;
2818
2818
  }, "strip", z.ZodTypeAny, {
@@ -2856,8 +2856,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2856
2856
  } | undefined;
2857
2857
  } | {
2858
2858
  type: "tool_use";
2859
- name: string;
2860
2859
  id: string;
2860
+ name: string;
2861
2861
  input: Record<string, any>;
2862
2862
  cache_control?: {
2863
2863
  type: "ephemeral";
@@ -2873,8 +2873,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2873
2873
  type: "image";
2874
2874
  source: {
2875
2875
  type: "base64";
2876
- media_type: "image/jpeg";
2877
2876
  data: string;
2877
+ media_type: "image/jpeg";
2878
2878
  };
2879
2879
  cache_control?: {
2880
2880
  type: "ephemeral";
@@ -2885,13 +2885,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2885
2885
  consecutiveAssistantMessages?: number | undefined;
2886
2886
  };
2887
2887
  toolResults: {
2888
- name: string;
2889
2888
  id: string;
2889
+ name: string;
2890
2890
  result: string;
2891
2891
  }[];
2892
2892
  toolCalls: {
2893
- name: string;
2894
2893
  id: string;
2894
+ name: string;
2895
2895
  parameters: Record<string, string>;
2896
2896
  }[];
2897
2897
  }, {
@@ -2935,8 +2935,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2935
2935
  } | undefined;
2936
2936
  } | {
2937
2937
  type: "tool_use";
2938
- name: string;
2939
2938
  id: string;
2939
+ name: string;
2940
2940
  input: Record<string, any>;
2941
2941
  cache_control?: {
2942
2942
  type: "ephemeral";
@@ -2952,8 +2952,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2952
2952
  type: "image";
2953
2953
  source: {
2954
2954
  type: "base64";
2955
- media_type: "image/jpeg";
2956
2955
  data: string;
2956
+ media_type: "image/jpeg";
2957
2957
  };
2958
2958
  cache_control?: {
2959
2959
  type: "ephemeral";
@@ -2964,13 +2964,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2964
2964
  consecutiveAssistantMessages?: number | undefined;
2965
2965
  };
2966
2966
  toolResults: {
2967
- name: string;
2968
2967
  id: string;
2968
+ name: string;
2969
2969
  result: string;
2970
2970
  }[];
2971
2971
  toolCalls: {
2972
- name: string;
2973
2972
  id: string;
2973
+ name: string;
2974
2974
  parameters: Record<string, string>;
2975
2975
  }[];
2976
2976
  }>, z.ZodObject<{
@@ -2994,12 +2994,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2994
2994
  id: z.ZodString;
2995
2995
  input: z.ZodRecord<z.ZodString, z.ZodAny>;
2996
2996
  }, "strip", z.ZodTypeAny, {
2997
- name: string;
2998
2997
  id: string;
2998
+ name: string;
2999
2999
  input: Record<string, any>;
3000
3000
  }, {
3001
- name: string;
3002
3001
  id: string;
3002
+ name: string;
3003
3003
  input: Record<string, any>;
3004
3004
  }>;
3005
3005
  changes: z.ZodArray<z.ZodObject<{
@@ -3042,12 +3042,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3042
3042
  }, "strip", z.ZodTypeAny, {
3043
3043
  type: "tool-call";
3044
3044
  data: {
3045
- name: string;
3046
3045
  id: string;
3046
+ name: string;
3047
3047
  input: Record<string, any>;
3048
3048
  };
3049
- userInputId: string;
3050
3049
  response: string;
3050
+ userInputId: string;
3051
3051
  changes: {
3052
3052
  type: "patch" | "file";
3053
3053
  path: string;
@@ -3066,12 +3066,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3066
3066
  }, {
3067
3067
  type: "tool-call";
3068
3068
  data: {
3069
- name: string;
3070
3069
  id: string;
3070
+ name: string;
3071
3071
  input: Record<string, any>;
3072
3072
  };
3073
- userInputId: string;
3074
3073
  response: string;
3074
+ userInputId: string;
3075
3075
  changes: {
3076
3076
  type: "patch" | "file";
3077
3077
  path: string;
@@ -3123,17 +3123,17 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3123
3123
  autoTopupAdded: z.ZodOptional<z.ZodNumber>;
3124
3124
  }, "type">>, "strip", z.ZodTypeAny, {
3125
3125
  type: "init-response";
3126
+ next_quota_reset: Date | null;
3126
3127
  usage: number;
3127
3128
  remainingBalance: number;
3128
- next_quota_reset: Date | null;
3129
3129
  nextMonthlyGrant: number;
3130
3130
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3131
3131
  autoTopupAdded?: number | undefined;
3132
3132
  }, {
3133
3133
  type: "init-response";
3134
+ next_quota_reset: Date | null;
3134
3135
  usage: number;
3135
3136
  remainingBalance: number;
3136
- next_quota_reset: Date | null;
3137
3137
  nextMonthlyGrant: number;
3138
3138
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3139
3139
  autoTopupAdded?: number | undefined;
@@ -3147,17 +3147,17 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3147
3147
  autoTopupAdded: z.ZodOptional<z.ZodNumber>;
3148
3148
  }, "strip", z.ZodTypeAny, {
3149
3149
  type: "usage-response";
3150
+ next_quota_reset: Date | null;
3150
3151
  usage: number;
3151
3152
  remainingBalance: number;
3152
- next_quota_reset: Date | null;
3153
3153
  nextMonthlyGrant: number;
3154
3154
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3155
3155
  autoTopupAdded?: number | undefined;
3156
3156
  }, {
3157
3157
  type: "usage-response";
3158
+ next_quota_reset: Date | null;
3158
3159
  usage: number;
3159
3160
  remainingBalance: number;
3160
- next_quota_reset: Date | null;
3161
3161
  nextMonthlyGrant: number;
3162
3162
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3163
3163
  autoTopupAdded?: number | undefined;
@@ -3167,12 +3167,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3167
3167
  credits: z.ZodNumber;
3168
3168
  }, "strip", z.ZodTypeAny, {
3169
3169
  type: "message-cost-response";
3170
- promptId: string;
3171
3170
  credits: number;
3171
+ promptId: string;
3172
3172
  }, {
3173
3173
  type: "message-cost-response";
3174
- promptId: string;
3175
3174
  credits: number;
3175
+ promptId: string;
3176
3176
  }>, z.ZodObject<{
3177
3177
  type: z.ZodLiteral<"action-error">;
3178
3178
  message: z.ZodString;
@@ -3181,13 +3181,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3181
3181
  }, "strip", z.ZodTypeAny, {
3182
3182
  type: "action-error";
3183
3183
  message: string;
3184
- remainingBalance?: number | undefined;
3185
3184
  error?: string | undefined;
3185
+ remainingBalance?: number | undefined;
3186
3186
  }, {
3187
3187
  type: "action-error";
3188
3188
  message: string;
3189
- remainingBalance?: number | undefined;
3190
3189
  error?: string | undefined;
3190
+ remainingBalance?: number | undefined;
3191
3191
  }>, z.ZodObject<{
3192
3192
  type: z.ZodLiteral<"commit-message-response">;
3193
3193
  commitMessage: z.ZodString;
@@ -3197,29 +3197,35 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3197
3197
  }, {
3198
3198
  type: "commit-message-response";
3199
3199
  commitMessage: string;
3200
+ }>, z.ZodObject<{
3201
+ type: z.ZodLiteral<"request-reconnect">;
3202
+ }, "strip", z.ZodTypeAny, {
3203
+ type: "request-reconnect";
3204
+ }, {
3205
+ type: "request-reconnect";
3200
3206
  }>]>;
3201
3207
  }, "strip", z.ZodTypeAny, {
3202
3208
  type: "action";
3203
3209
  data: {
3204
3210
  type: "usage-response";
3211
+ next_quota_reset: Date | null;
3205
3212
  usage: number;
3206
3213
  remainingBalance: number;
3207
- next_quota_reset: Date | null;
3208
3214
  nextMonthlyGrant: number;
3209
3215
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3210
3216
  autoTopupAdded?: number | undefined;
3211
3217
  } | {
3212
3218
  type: "init-response";
3219
+ next_quota_reset: Date | null;
3213
3220
  usage: number;
3214
3221
  remainingBalance: number;
3215
- next_quota_reset: Date | null;
3216
3222
  nextMonthlyGrant: number;
3217
3223
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3218
3224
  autoTopupAdded?: number | undefined;
3219
3225
  } | {
3220
3226
  type: "response-complete";
3221
- userInputId: string;
3222
3227
  response: string;
3228
+ userInputId: string;
3223
3229
  changes: {
3224
3230
  type: "patch" | "file";
3225
3231
  path: string;
@@ -3235,16 +3241,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3235
3241
  content: string;
3236
3242
  }[];
3237
3243
  resetFileVersions: boolean;
3244
+ next_quota_reset?: Date | null | undefined;
3238
3245
  usage?: number | undefined;
3239
3246
  remainingBalance?: number | undefined;
3240
3247
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3241
- next_quota_reset?: Date | null | undefined;
3242
3248
  nextMonthlyGrant?: number | undefined;
3243
3249
  autoTopupAdded?: number | undefined;
3244
3250
  } | {
3245
3251
  type: "message-cost-response";
3246
- promptId: string;
3247
3252
  credits: number;
3253
+ promptId: string;
3248
3254
  } | {
3249
3255
  type: "prompt-response";
3250
3256
  promptId: string;
@@ -3286,8 +3292,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3286
3292
  } | undefined;
3287
3293
  } | {
3288
3294
  type: "tool_use";
3289
- name: string;
3290
3295
  id: string;
3296
+ name: string;
3291
3297
  input: Record<string, any>;
3292
3298
  cache_control?: {
3293
3299
  type: "ephemeral";
@@ -3303,8 +3309,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3303
3309
  type: "image";
3304
3310
  source: {
3305
3311
  type: "base64";
3306
- media_type: "image/jpeg";
3307
3312
  data: string;
3313
+ media_type: "image/jpeg";
3308
3314
  };
3309
3315
  cache_control?: {
3310
3316
  type: "ephemeral";
@@ -3315,13 +3321,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3315
3321
  consecutiveAssistantMessages?: number | undefined;
3316
3322
  };
3317
3323
  toolResults: {
3318
- name: string;
3319
3324
  id: string;
3325
+ name: string;
3320
3326
  result: string;
3321
3327
  }[];
3322
3328
  toolCalls: {
3323
- name: string;
3324
3329
  id: string;
3330
+ name: string;
3325
3331
  parameters: Record<string, string>;
3326
3332
  }[];
3327
3333
  } | {
@@ -3335,12 +3341,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3335
3341
  } | {
3336
3342
  type: "tool-call";
3337
3343
  data: {
3338
- name: string;
3339
3344
  id: string;
3345
+ name: string;
3340
3346
  input: Record<string, any>;
3341
3347
  };
3342
- userInputId: string;
3343
3348
  response: string;
3349
+ userInputId: string;
3344
3350
  changes: {
3345
3351
  type: "patch" | "file";
3346
3352
  path: string;
@@ -3367,34 +3373,36 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3367
3373
  } | {
3368
3374
  type: "action-error";
3369
3375
  message: string;
3370
- remainingBalance?: number | undefined;
3371
3376
  error?: string | undefined;
3377
+ remainingBalance?: number | undefined;
3372
3378
  } | {
3373
3379
  type: "commit-message-response";
3374
3380
  commitMessage: string;
3381
+ } | {
3382
+ type: "request-reconnect";
3375
3383
  };
3376
3384
  }, {
3377
3385
  type: "action";
3378
3386
  data: {
3379
3387
  type: "usage-response";
3388
+ next_quota_reset: Date | null;
3380
3389
  usage: number;
3381
3390
  remainingBalance: number;
3382
- next_quota_reset: Date | null;
3383
3391
  nextMonthlyGrant: number;
3384
3392
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3385
3393
  autoTopupAdded?: number | undefined;
3386
3394
  } | {
3387
3395
  type: "init-response";
3396
+ next_quota_reset: Date | null;
3388
3397
  usage: number;
3389
3398
  remainingBalance: number;
3390
- next_quota_reset: Date | null;
3391
3399
  nextMonthlyGrant: number;
3392
3400
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3393
3401
  autoTopupAdded?: number | undefined;
3394
3402
  } | {
3395
3403
  type: "response-complete";
3396
- userInputId: string;
3397
3404
  response: string;
3405
+ userInputId: string;
3398
3406
  changes: {
3399
3407
  type: "patch" | "file";
3400
3408
  path: string;
@@ -3410,16 +3418,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3410
3418
  content: string;
3411
3419
  }[];
3412
3420
  resetFileVersions: boolean;
3421
+ next_quota_reset?: Date | null | undefined;
3413
3422
  usage?: number | undefined;
3414
3423
  remainingBalance?: number | undefined;
3415
3424
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3416
- next_quota_reset?: Date | null | undefined;
3417
3425
  nextMonthlyGrant?: number | undefined;
3418
3426
  autoTopupAdded?: number | undefined;
3419
3427
  } | {
3420
3428
  type: "message-cost-response";
3421
- promptId: string;
3422
3429
  credits: number;
3430
+ promptId: string;
3423
3431
  } | {
3424
3432
  type: "prompt-response";
3425
3433
  promptId: string;
@@ -3461,8 +3469,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3461
3469
  } | undefined;
3462
3470
  } | {
3463
3471
  type: "tool_use";
3464
- name: string;
3465
3472
  id: string;
3473
+ name: string;
3466
3474
  input: Record<string, any>;
3467
3475
  cache_control?: {
3468
3476
  type: "ephemeral";
@@ -3478,8 +3486,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3478
3486
  type: "image";
3479
3487
  source: {
3480
3488
  type: "base64";
3481
- media_type: "image/jpeg";
3482
3489
  data: string;
3490
+ media_type: "image/jpeg";
3483
3491
  };
3484
3492
  cache_control?: {
3485
3493
  type: "ephemeral";
@@ -3490,13 +3498,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3490
3498
  consecutiveAssistantMessages?: number | undefined;
3491
3499
  };
3492
3500
  toolResults: {
3493
- name: string;
3494
3501
  id: string;
3502
+ name: string;
3495
3503
  result: string;
3496
3504
  }[];
3497
3505
  toolCalls: {
3498
- name: string;
3499
3506
  id: string;
3507
+ name: string;
3500
3508
  parameters: Record<string, string>;
3501
3509
  }[];
3502
3510
  } | {
@@ -3510,12 +3518,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3510
3518
  } | {
3511
3519
  type: "tool-call";
3512
3520
  data: {
3513
- name: string;
3514
3521
  id: string;
3522
+ name: string;
3515
3523
  input: Record<string, any>;
3516
3524
  };
3517
- userInputId: string;
3518
3525
  response: string;
3526
+ userInputId: string;
3519
3527
  changes: {
3520
3528
  type: "patch" | "file";
3521
3529
  path: string;
@@ -3542,11 +3550,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3542
3550
  } | {
3543
3551
  type: "action-error";
3544
3552
  message: string;
3545
- remainingBalance?: number | undefined;
3546
3553
  error?: string | undefined;
3554
+ remainingBalance?: number | undefined;
3547
3555
  } | {
3548
3556
  type: "commit-message-response";
3549
3557
  commitMessage: string;
3558
+ } | {
3559
+ type: "request-reconnect";
3550
3560
  };
3551
3561
  }>;
3552
3562
  };
@@ -3621,16 +3631,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3621
3631
  }>, "many">;
3622
3632
  resetFileVersions: z.ZodBoolean;
3623
3633
  }, {
3634
+ next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
3624
3635
  usage: z.ZodOptional<z.ZodNumber>;
3625
3636
  remainingBalance: z.ZodOptional<z.ZodNumber>;
3626
3637
  balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<[import("../types/grant").GrantType, ...import("../types/grant").GrantType[]]>, z.ZodNumber>>>;
3627
- next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
3628
3638
  nextMonthlyGrant: z.ZodOptional<z.ZodNumber>;
3629
3639
  autoTopupAdded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
3630
3640
  }>, "strip", z.ZodTypeAny, {
3631
3641
  type: "response-complete";
3632
- userInputId: string;
3633
3642
  response: string;
3643
+ userInputId: string;
3634
3644
  changes: {
3635
3645
  type: "patch" | "file";
3636
3646
  path: string;
@@ -3646,16 +3656,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3646
3656
  content: string;
3647
3657
  }[];
3648
3658
  resetFileVersions: boolean;
3659
+ next_quota_reset?: Date | null | undefined;
3649
3660
  usage?: number | undefined;
3650
3661
  remainingBalance?: number | undefined;
3651
3662
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3652
- next_quota_reset?: Date | null | undefined;
3653
3663
  nextMonthlyGrant?: number | undefined;
3654
3664
  autoTopupAdded?: number | undefined;
3655
3665
  }, {
3656
3666
  type: "response-complete";
3657
- userInputId: string;
3658
3667
  response: string;
3668
+ userInputId: string;
3659
3669
  changes: {
3660
3670
  type: "patch" | "file";
3661
3671
  path: string;
@@ -3671,10 +3681,10 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3671
3681
  content: string;
3672
3682
  }[];
3673
3683
  resetFileVersions: boolean;
3684
+ next_quota_reset?: Date | null | undefined;
3674
3685
  usage?: number | undefined;
3675
3686
  remainingBalance?: number | undefined;
3676
3687
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3677
- next_quota_reset?: Date | null | undefined;
3678
3688
  nextMonthlyGrant?: number | undefined;
3679
3689
  autoTopupAdded?: number | undefined;
3680
3690
  }>, z.ZodObject<{
@@ -3829,16 +3839,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3829
3839
  }>>;
3830
3840
  }, "strip", z.ZodTypeAny, {
3831
3841
  type: "tool_use";
3832
- name: string;
3833
3842
  id: string;
3843
+ name: string;
3834
3844
  input: Record<string, any>;
3835
3845
  cache_control?: {
3836
3846
  type: "ephemeral";
3837
3847
  } | undefined;
3838
3848
  }, {
3839
3849
  type: "tool_use";
3840
- name: string;
3841
3850
  id: string;
3851
+ name: string;
3842
3852
  input: Record<string, any>;
3843
3853
  cache_control?: {
3844
3854
  type: "ephemeral";
@@ -3876,12 +3886,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3876
3886
  data: z.ZodString;
3877
3887
  }, "strip", z.ZodTypeAny, {
3878
3888
  type: "base64";
3879
- media_type: "image/jpeg";
3880
3889
  data: string;
3890
+ media_type: "image/jpeg";
3881
3891
  }, {
3882
3892
  type: "base64";
3883
- media_type: "image/jpeg";
3884
3893
  data: string;
3894
+ media_type: "image/jpeg";
3885
3895
  }>;
3886
3896
  cache_control: z.ZodOptional<z.ZodObject<{
3887
3897
  type: z.ZodLiteral<"ephemeral">;
@@ -3894,8 +3904,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3894
3904
  type: "image";
3895
3905
  source: {
3896
3906
  type: "base64";
3897
- media_type: "image/jpeg";
3898
3907
  data: string;
3908
+ media_type: "image/jpeg";
3899
3909
  };
3900
3910
  cache_control?: {
3901
3911
  type: "ephemeral";
@@ -3904,8 +3914,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3904
3914
  type: "image";
3905
3915
  source: {
3906
3916
  type: "base64";
3907
- media_type: "image/jpeg";
3908
3917
  data: string;
3918
+ media_type: "image/jpeg";
3909
3919
  };
3910
3920
  cache_control?: {
3911
3921
  type: "ephemeral";
@@ -3920,8 +3930,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3920
3930
  } | undefined;
3921
3931
  } | {
3922
3932
  type: "tool_use";
3923
- name: string;
3924
3933
  id: string;
3934
+ name: string;
3925
3935
  input: Record<string, any>;
3926
3936
  cache_control?: {
3927
3937
  type: "ephemeral";
@@ -3937,8 +3947,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3937
3947
  type: "image";
3938
3948
  source: {
3939
3949
  type: "base64";
3940
- media_type: "image/jpeg";
3941
3950
  data: string;
3951
+ media_type: "image/jpeg";
3942
3952
  };
3943
3953
  cache_control?: {
3944
3954
  type: "ephemeral";
@@ -3954,8 +3964,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3954
3964
  } | undefined;
3955
3965
  } | {
3956
3966
  type: "tool_use";
3957
- name: string;
3958
3967
  id: string;
3968
+ name: string;
3959
3969
  input: Record<string, any>;
3960
3970
  cache_control?: {
3961
3971
  type: "ephemeral";
@@ -3971,8 +3981,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3971
3981
  type: "image";
3972
3982
  source: {
3973
3983
  type: "base64";
3974
- media_type: "image/jpeg";
3975
3984
  data: string;
3985
+ media_type: "image/jpeg";
3976
3986
  };
3977
3987
  cache_control?: {
3978
3988
  type: "ephemeral";
@@ -4019,8 +4029,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4019
4029
  } | undefined;
4020
4030
  } | {
4021
4031
  type: "tool_use";
4022
- name: string;
4023
4032
  id: string;
4033
+ name: string;
4024
4034
  input: Record<string, any>;
4025
4035
  cache_control?: {
4026
4036
  type: "ephemeral";
@@ -4036,8 +4046,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4036
4046
  type: "image";
4037
4047
  source: {
4038
4048
  type: "base64";
4039
- media_type: "image/jpeg";
4040
4049
  data: string;
4050
+ media_type: "image/jpeg";
4041
4051
  };
4042
4052
  cache_control?: {
4043
4053
  type: "ephemeral";
@@ -4084,8 +4094,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4084
4094
  } | undefined;
4085
4095
  } | {
4086
4096
  type: "tool_use";
4087
- name: string;
4088
4097
  id: string;
4098
+ name: string;
4089
4099
  input: Record<string, any>;
4090
4100
  cache_control?: {
4091
4101
  type: "ephemeral";
@@ -4101,8 +4111,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4101
4111
  type: "image";
4102
4112
  source: {
4103
4113
  type: "base64";
4104
- media_type: "image/jpeg";
4105
4114
  data: string;
4115
+ media_type: "image/jpeg";
4106
4116
  };
4107
4117
  cache_control?: {
4108
4118
  type: "ephemeral";
@@ -4117,12 +4127,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4117
4127
  parameters: z.ZodRecord<z.ZodString, z.ZodString>;
4118
4128
  id: z.ZodString;
4119
4129
  }, "strip", z.ZodTypeAny, {
4120
- name: string;
4121
4130
  id: string;
4131
+ name: string;
4122
4132
  parameters: Record<string, string>;
4123
4133
  }, {
4124
- name: string;
4125
4134
  id: string;
4135
+ name: string;
4126
4136
  parameters: Record<string, string>;
4127
4137
  }>, "many">;
4128
4138
  toolResults: z.ZodArray<z.ZodObject<{
@@ -4130,12 +4140,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4130
4140
  result: z.ZodString;
4131
4141
  id: z.ZodString;
4132
4142
  }, "strip", z.ZodTypeAny, {
4133
- name: string;
4134
4143
  id: string;
4144
+ name: string;
4135
4145
  result: string;
4136
4146
  }, {
4137
- name: string;
4138
4147
  id: string;
4148
+ name: string;
4139
4149
  result: string;
4140
4150
  }>, "many">;
4141
4151
  }, "strip", z.ZodTypeAny, {
@@ -4179,8 +4189,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4179
4189
  } | undefined;
4180
4190
  } | {
4181
4191
  type: "tool_use";
4182
- name: string;
4183
4192
  id: string;
4193
+ name: string;
4184
4194
  input: Record<string, any>;
4185
4195
  cache_control?: {
4186
4196
  type: "ephemeral";
@@ -4196,8 +4206,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4196
4206
  type: "image";
4197
4207
  source: {
4198
4208
  type: "base64";
4199
- media_type: "image/jpeg";
4200
4209
  data: string;
4210
+ media_type: "image/jpeg";
4201
4211
  };
4202
4212
  cache_control?: {
4203
4213
  type: "ephemeral";
@@ -4208,13 +4218,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4208
4218
  consecutiveAssistantMessages?: number | undefined;
4209
4219
  };
4210
4220
  toolResults: {
4211
- name: string;
4212
4221
  id: string;
4222
+ name: string;
4213
4223
  result: string;
4214
4224
  }[];
4215
4225
  toolCalls: {
4216
- name: string;
4217
4226
  id: string;
4227
+ name: string;
4218
4228
  parameters: Record<string, string>;
4219
4229
  }[];
4220
4230
  }, {
@@ -4258,8 +4268,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4258
4268
  } | undefined;
4259
4269
  } | {
4260
4270
  type: "tool_use";
4261
- name: string;
4262
4271
  id: string;
4272
+ name: string;
4263
4273
  input: Record<string, any>;
4264
4274
  cache_control?: {
4265
4275
  type: "ephemeral";
@@ -4275,8 +4285,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4275
4285
  type: "image";
4276
4286
  source: {
4277
4287
  type: "base64";
4278
- media_type: "image/jpeg";
4279
4288
  data: string;
4289
+ media_type: "image/jpeg";
4280
4290
  };
4281
4291
  cache_control?: {
4282
4292
  type: "ephemeral";
@@ -4287,13 +4297,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4287
4297
  consecutiveAssistantMessages?: number | undefined;
4288
4298
  };
4289
4299
  toolResults: {
4290
- name: string;
4291
4300
  id: string;
4301
+ name: string;
4292
4302
  result: string;
4293
4303
  }[];
4294
4304
  toolCalls: {
4295
- name: string;
4296
4305
  id: string;
4306
+ name: string;
4297
4307
  parameters: Record<string, string>;
4298
4308
  }[];
4299
4309
  }>, z.ZodObject<{
@@ -4317,12 +4327,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4317
4327
  id: z.ZodString;
4318
4328
  input: z.ZodRecord<z.ZodString, z.ZodAny>;
4319
4329
  }, "strip", z.ZodTypeAny, {
4320
- name: string;
4321
4330
  id: string;
4331
+ name: string;
4322
4332
  input: Record<string, any>;
4323
4333
  }, {
4324
- name: string;
4325
4334
  id: string;
4335
+ name: string;
4326
4336
  input: Record<string, any>;
4327
4337
  }>;
4328
4338
  changes: z.ZodArray<z.ZodObject<{
@@ -4365,12 +4375,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4365
4375
  }, "strip", z.ZodTypeAny, {
4366
4376
  type: "tool-call";
4367
4377
  data: {
4368
- name: string;
4369
4378
  id: string;
4379
+ name: string;
4370
4380
  input: Record<string, any>;
4371
4381
  };
4372
- userInputId: string;
4373
4382
  response: string;
4383
+ userInputId: string;
4374
4384
  changes: {
4375
4385
  type: "patch" | "file";
4376
4386
  path: string;
@@ -4389,12 +4399,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4389
4399
  }, {
4390
4400
  type: "tool-call";
4391
4401
  data: {
4392
- name: string;
4393
4402
  id: string;
4403
+ name: string;
4394
4404
  input: Record<string, any>;
4395
4405
  };
4396
- userInputId: string;
4397
4406
  response: string;
4407
+ userInputId: string;
4398
4408
  changes: {
4399
4409
  type: "patch" | "file";
4400
4410
  path: string;
@@ -4446,17 +4456,17 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4446
4456
  autoTopupAdded: z.ZodOptional<z.ZodNumber>;
4447
4457
  }, "type">>, "strip", z.ZodTypeAny, {
4448
4458
  type: "init-response";
4459
+ next_quota_reset: Date | null;
4449
4460
  usage: number;
4450
4461
  remainingBalance: number;
4451
- next_quota_reset: Date | null;
4452
4462
  nextMonthlyGrant: number;
4453
4463
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4454
4464
  autoTopupAdded?: number | undefined;
4455
4465
  }, {
4456
4466
  type: "init-response";
4467
+ next_quota_reset: Date | null;
4457
4468
  usage: number;
4458
4469
  remainingBalance: number;
4459
- next_quota_reset: Date | null;
4460
4470
  nextMonthlyGrant: number;
4461
4471
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4462
4472
  autoTopupAdded?: number | undefined;
@@ -4470,17 +4480,17 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4470
4480
  autoTopupAdded: z.ZodOptional<z.ZodNumber>;
4471
4481
  }, "strip", z.ZodTypeAny, {
4472
4482
  type: "usage-response";
4483
+ next_quota_reset: Date | null;
4473
4484
  usage: number;
4474
4485
  remainingBalance: number;
4475
- next_quota_reset: Date | null;
4476
4486
  nextMonthlyGrant: number;
4477
4487
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4478
4488
  autoTopupAdded?: number | undefined;
4479
4489
  }, {
4480
4490
  type: "usage-response";
4491
+ next_quota_reset: Date | null;
4481
4492
  usage: number;
4482
4493
  remainingBalance: number;
4483
- next_quota_reset: Date | null;
4484
4494
  nextMonthlyGrant: number;
4485
4495
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4486
4496
  autoTopupAdded?: number | undefined;
@@ -4490,12 +4500,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4490
4500
  credits: z.ZodNumber;
4491
4501
  }, "strip", z.ZodTypeAny, {
4492
4502
  type: "message-cost-response";
4493
- promptId: string;
4494
4503
  credits: number;
4504
+ promptId: string;
4495
4505
  }, {
4496
4506
  type: "message-cost-response";
4497
- promptId: string;
4498
4507
  credits: number;
4508
+ promptId: string;
4499
4509
  }>, z.ZodObject<{
4500
4510
  type: z.ZodLiteral<"action-error">;
4501
4511
  message: z.ZodString;
@@ -4504,13 +4514,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4504
4514
  }, "strip", z.ZodTypeAny, {
4505
4515
  type: "action-error";
4506
4516
  message: string;
4507
- remainingBalance?: number | undefined;
4508
4517
  error?: string | undefined;
4518
+ remainingBalance?: number | undefined;
4509
4519
  }, {
4510
4520
  type: "action-error";
4511
4521
  message: string;
4512
- remainingBalance?: number | undefined;
4513
4522
  error?: string | undefined;
4523
+ remainingBalance?: number | undefined;
4514
4524
  }>, z.ZodObject<{
4515
4525
  type: z.ZodLiteral<"commit-message-response">;
4516
4526
  commitMessage: z.ZodString;
@@ -4520,29 +4530,35 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4520
4530
  }, {
4521
4531
  type: "commit-message-response";
4522
4532
  commitMessage: string;
4533
+ }>, z.ZodObject<{
4534
+ type: z.ZodLiteral<"request-reconnect">;
4535
+ }, "strip", z.ZodTypeAny, {
4536
+ type: "request-reconnect";
4537
+ }, {
4538
+ type: "request-reconnect";
4523
4539
  }>]>;
4524
4540
  }, "strip", z.ZodTypeAny, {
4525
4541
  type: "action";
4526
4542
  data: {
4527
4543
  type: "usage-response";
4544
+ next_quota_reset: Date | null;
4528
4545
  usage: number;
4529
4546
  remainingBalance: number;
4530
- next_quota_reset: Date | null;
4531
4547
  nextMonthlyGrant: number;
4532
4548
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4533
4549
  autoTopupAdded?: number | undefined;
4534
4550
  } | {
4535
4551
  type: "init-response";
4552
+ next_quota_reset: Date | null;
4536
4553
  usage: number;
4537
4554
  remainingBalance: number;
4538
- next_quota_reset: Date | null;
4539
4555
  nextMonthlyGrant: number;
4540
4556
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4541
4557
  autoTopupAdded?: number | undefined;
4542
4558
  } | {
4543
4559
  type: "response-complete";
4544
- userInputId: string;
4545
4560
  response: string;
4561
+ userInputId: string;
4546
4562
  changes: {
4547
4563
  type: "patch" | "file";
4548
4564
  path: string;
@@ -4558,16 +4574,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4558
4574
  content: string;
4559
4575
  }[];
4560
4576
  resetFileVersions: boolean;
4577
+ next_quota_reset?: Date | null | undefined;
4561
4578
  usage?: number | undefined;
4562
4579
  remainingBalance?: number | undefined;
4563
4580
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4564
- next_quota_reset?: Date | null | undefined;
4565
4581
  nextMonthlyGrant?: number | undefined;
4566
4582
  autoTopupAdded?: number | undefined;
4567
4583
  } | {
4568
4584
  type: "message-cost-response";
4569
- promptId: string;
4570
4585
  credits: number;
4586
+ promptId: string;
4571
4587
  } | {
4572
4588
  type: "prompt-response";
4573
4589
  promptId: string;
@@ -4609,8 +4625,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4609
4625
  } | undefined;
4610
4626
  } | {
4611
4627
  type: "tool_use";
4612
- name: string;
4613
4628
  id: string;
4629
+ name: string;
4614
4630
  input: Record<string, any>;
4615
4631
  cache_control?: {
4616
4632
  type: "ephemeral";
@@ -4626,8 +4642,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4626
4642
  type: "image";
4627
4643
  source: {
4628
4644
  type: "base64";
4629
- media_type: "image/jpeg";
4630
4645
  data: string;
4646
+ media_type: "image/jpeg";
4631
4647
  };
4632
4648
  cache_control?: {
4633
4649
  type: "ephemeral";
@@ -4638,13 +4654,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4638
4654
  consecutiveAssistantMessages?: number | undefined;
4639
4655
  };
4640
4656
  toolResults: {
4641
- name: string;
4642
4657
  id: string;
4658
+ name: string;
4643
4659
  result: string;
4644
4660
  }[];
4645
4661
  toolCalls: {
4646
- name: string;
4647
4662
  id: string;
4663
+ name: string;
4648
4664
  parameters: Record<string, string>;
4649
4665
  }[];
4650
4666
  } | {
@@ -4658,12 +4674,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4658
4674
  } | {
4659
4675
  type: "tool-call";
4660
4676
  data: {
4661
- name: string;
4662
4677
  id: string;
4678
+ name: string;
4663
4679
  input: Record<string, any>;
4664
4680
  };
4665
- userInputId: string;
4666
4681
  response: string;
4682
+ userInputId: string;
4667
4683
  changes: {
4668
4684
  type: "patch" | "file";
4669
4685
  path: string;
@@ -4690,34 +4706,36 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4690
4706
  } | {
4691
4707
  type: "action-error";
4692
4708
  message: string;
4693
- remainingBalance?: number | undefined;
4694
4709
  error?: string | undefined;
4710
+ remainingBalance?: number | undefined;
4695
4711
  } | {
4696
4712
  type: "commit-message-response";
4697
4713
  commitMessage: string;
4714
+ } | {
4715
+ type: "request-reconnect";
4698
4716
  };
4699
4717
  }, {
4700
4718
  type: "action";
4701
4719
  data: {
4702
4720
  type: "usage-response";
4721
+ next_quota_reset: Date | null;
4703
4722
  usage: number;
4704
4723
  remainingBalance: number;
4705
- next_quota_reset: Date | null;
4706
4724
  nextMonthlyGrant: number;
4707
4725
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4708
4726
  autoTopupAdded?: number | undefined;
4709
4727
  } | {
4710
4728
  type: "init-response";
4729
+ next_quota_reset: Date | null;
4711
4730
  usage: number;
4712
4731
  remainingBalance: number;
4713
- next_quota_reset: Date | null;
4714
4732
  nextMonthlyGrant: number;
4715
4733
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4716
4734
  autoTopupAdded?: number | undefined;
4717
4735
  } | {
4718
4736
  type: "response-complete";
4719
- userInputId: string;
4720
4737
  response: string;
4738
+ userInputId: string;
4721
4739
  changes: {
4722
4740
  type: "patch" | "file";
4723
4741
  path: string;
@@ -4733,16 +4751,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4733
4751
  content: string;
4734
4752
  }[];
4735
4753
  resetFileVersions: boolean;
4754
+ next_quota_reset?: Date | null | undefined;
4736
4755
  usage?: number | undefined;
4737
4756
  remainingBalance?: number | undefined;
4738
4757
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4739
- next_quota_reset?: Date | null | undefined;
4740
4758
  nextMonthlyGrant?: number | undefined;
4741
4759
  autoTopupAdded?: number | undefined;
4742
4760
  } | {
4743
4761
  type: "message-cost-response";
4744
- promptId: string;
4745
4762
  credits: number;
4763
+ promptId: string;
4746
4764
  } | {
4747
4765
  type: "prompt-response";
4748
4766
  promptId: string;
@@ -4784,8 +4802,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4784
4802
  } | undefined;
4785
4803
  } | {
4786
4804
  type: "tool_use";
4787
- name: string;
4788
4805
  id: string;
4806
+ name: string;
4789
4807
  input: Record<string, any>;
4790
4808
  cache_control?: {
4791
4809
  type: "ephemeral";
@@ -4801,8 +4819,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4801
4819
  type: "image";
4802
4820
  source: {
4803
4821
  type: "base64";
4804
- media_type: "image/jpeg";
4805
4822
  data: string;
4823
+ media_type: "image/jpeg";
4806
4824
  };
4807
4825
  cache_control?: {
4808
4826
  type: "ephemeral";
@@ -4813,13 +4831,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4813
4831
  consecutiveAssistantMessages?: number | undefined;
4814
4832
  };
4815
4833
  toolResults: {
4816
- name: string;
4817
4834
  id: string;
4835
+ name: string;
4818
4836
  result: string;
4819
4837
  }[];
4820
4838
  toolCalls: {
4821
- name: string;
4822
4839
  id: string;
4840
+ name: string;
4823
4841
  parameters: Record<string, string>;
4824
4842
  }[];
4825
4843
  } | {
@@ -4833,12 +4851,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4833
4851
  } | {
4834
4852
  type: "tool-call";
4835
4853
  data: {
4836
- name: string;
4837
4854
  id: string;
4855
+ name: string;
4838
4856
  input: Record<string, any>;
4839
4857
  };
4840
- userInputId: string;
4841
4858
  response: string;
4859
+ userInputId: string;
4842
4860
  changes: {
4843
4861
  type: "patch" | "file";
4844
4862
  path: string;
@@ -4865,11 +4883,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4865
4883
  } | {
4866
4884
  type: "action-error";
4867
4885
  message: string;
4868
- remainingBalance?: number | undefined;
4869
4886
  error?: string | undefined;
4887
+ remainingBalance?: number | undefined;
4870
4888
  } | {
4871
4889
  type: "commit-message-response";
4872
4890
  commitMessage: string;
4891
+ } | {
4892
+ type: "request-reconnect";
4873
4893
  };
4874
4894
  }>]>;
4875
4895
  export type ServerMessageType = keyof typeof SERVER_MESSAGE_SCHEMAS;