codebuff 1.0.228 → 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 (89) hide show
  1. package/dist/background-process-manager.js +3 -5
  2. package/dist/background-process-manager.js.map +1 -1
  3. package/dist/cli.d.ts +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/cli.js.map +1 -1
  6. package/dist/client.d.ts +4 -4
  7. package/dist/client.js +7 -2
  8. package/dist/client.js.map +1 -1
  9. package/dist/code-map/tsconfig.tsbuildinfo +1 -1
  10. package/dist/common/actions.d.ts +108 -108
  11. package/dist/common/bigquery/client.js +1 -0
  12. package/dist/common/bigquery/client.js.map +1 -1
  13. package/dist/common/billing/balance-calculator.d.ts +3 -0
  14. package/dist/common/billing/balance-calculator.js +6 -2
  15. package/dist/common/billing/balance-calculator.js.map +1 -1
  16. package/dist/common/billing/grant-credits.d.ts +16 -1
  17. package/dist/common/billing/grant-credits.js +67 -2
  18. package/dist/common/billing/grant-credits.js.map +1 -1
  19. package/dist/common/constants.d.ts +1 -0
  20. package/dist/common/constants.js +1 -0
  21. package/dist/common/constants.js.map +1 -1
  22. package/dist/common/db/transaction.d.ts +12 -0
  23. package/dist/common/db/transaction.js +36 -0
  24. package/dist/common/db/transaction.js.map +1 -0
  25. package/dist/common/types/usage.d.ts +4 -4
  26. package/dist/common/util/string.d.ts +3 -2
  27. package/dist/common/util/string.js +14 -4
  28. package/dist/common/util/string.js.map +1 -1
  29. package/dist/common/websockets/websocket-schema.d.ts +202 -202
  30. package/dist/dev-process-manager.js +1 -1
  31. package/dist/dev-process-manager.js.map +1 -1
  32. package/dist/index.js +6 -3
  33. package/dist/index.js.map +1 -1
  34. package/dist/utils/terminal.js +4 -7
  35. package/dist/utils/terminal.js.map +1 -1
  36. package/package.json +1 -1
  37. package/dist/common/actions.d.ts.map +0 -1
  38. package/dist/common/api-keys/constants.d.ts.map +0 -1
  39. package/dist/common/api-keys/crypto.d.ts.map +0 -1
  40. package/dist/common/billing/quota-manager.d.ts +0 -29
  41. package/dist/common/billing/quota-manager.d.ts.map +0 -1
  42. package/dist/common/billing/quota-manager.js +0 -251
  43. package/dist/common/billing/quota-manager.js.map +0 -1
  44. package/dist/common/browser-actions.d.ts.map +0 -1
  45. package/dist/common/constants/tools.d.ts.map +0 -1
  46. package/dist/common/constants.d.ts.map +0 -1
  47. package/dist/common/db/drizzle.config.d.ts.map +0 -1
  48. package/dist/common/db/env.d.mts.map +0 -1
  49. package/dist/common/db/index.d.ts.map +0 -1
  50. package/dist/common/db/schema.d.ts.map +0 -1
  51. package/dist/common/env.d.mts.map +0 -1
  52. package/dist/common/project-file-tree.d.ts.map +0 -1
  53. package/dist/common/types/agent-state.d.ts.map +0 -1
  54. package/dist/common/types/config.d.ts +0 -43
  55. package/dist/common/types/config.js +0 -13
  56. package/dist/common/types/config.js.map +0 -1
  57. package/dist/common/types/message.d.ts.map +0 -1
  58. package/dist/common/types/plan.d.ts.map +0 -1
  59. package/dist/common/types/referral.d.ts.map +0 -1
  60. package/dist/common/types/tools.d.ts.map +0 -1
  61. package/dist/common/types/usage.d.ts.map +0 -1
  62. package/dist/common/util/__tests__/messages.test.d.ts.map +0 -1
  63. package/dist/common/util/__tests__/string.test.d.ts.map +0 -1
  64. package/dist/common/util/array.d.ts.map +0 -1
  65. package/dist/common/util/changes.d.ts.map +0 -1
  66. package/dist/common/util/credentials.d.ts.map +0 -1
  67. package/dist/common/util/crypto.d.ts +0 -27
  68. package/dist/common/util/crypto.js +0 -174
  69. package/dist/common/util/crypto.js.map +0 -1
  70. package/dist/common/util/dates.d.ts.map +0 -1
  71. package/dist/common/util/file.d.ts.map +0 -1
  72. package/dist/common/util/git.d.ts.map +0 -1
  73. package/dist/common/util/logger.d.ts.map +0 -1
  74. package/dist/common/util/lru-cache.d.ts.map +0 -1
  75. package/dist/common/util/messages.d.ts.map +0 -1
  76. package/dist/common/util/min-heap.d.ts.map +0 -1
  77. package/dist/common/util/object.d.ts.map +0 -1
  78. package/dist/common/util/patch.d.ts.map +0 -1
  79. package/dist/common/util/promise.d.ts.map +0 -1
  80. package/dist/common/util/referral.d.ts.map +0 -1
  81. package/dist/common/util/saxy.d.ts.map +0 -1
  82. package/dist/common/util/server/referral.d.ts.map +0 -1
  83. package/dist/common/util/string.d.ts.map +0 -1
  84. package/dist/common/util/stripe.d.ts.map +0 -1
  85. package/dist/common/util/tools.d.ts +0 -2
  86. package/dist/common/util/tools.js +0 -13
  87. package/dist/common/util/tools.js.map +0 -1
  88. package/dist/common/websockets/websocket-client.d.ts.map +0 -1
  89. package/dist/common/websockets/websocket-schema.d.ts.map +0 -1
@@ -208,16 +208,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
208
208
  }>>;
209
209
  }, "strip", z.ZodTypeAny, {
210
210
  type: "tool_use";
211
- name: string;
212
211
  id: string;
212
+ name: string;
213
213
  input: Record<string, any>;
214
214
  cache_control?: {
215
215
  type: "ephemeral";
216
216
  } | undefined;
217
217
  }, {
218
218
  type: "tool_use";
219
- name: string;
220
219
  id: string;
220
+ name: string;
221
221
  input: Record<string, any>;
222
222
  cache_control?: {
223
223
  type: "ephemeral";
@@ -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;
@@ -3208,24 +3208,24 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3208
3208
  type: "action";
3209
3209
  data: {
3210
3210
  type: "usage-response";
3211
+ next_quota_reset: Date | null;
3211
3212
  usage: number;
3212
3213
  remainingBalance: number;
3213
- next_quota_reset: Date | null;
3214
3214
  nextMonthlyGrant: number;
3215
3215
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3216
3216
  autoTopupAdded?: number | undefined;
3217
3217
  } | {
3218
3218
  type: "init-response";
3219
+ next_quota_reset: Date | null;
3219
3220
  usage: number;
3220
3221
  remainingBalance: number;
3221
- next_quota_reset: Date | null;
3222
3222
  nextMonthlyGrant: number;
3223
3223
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3224
3224
  autoTopupAdded?: number | undefined;
3225
3225
  } | {
3226
3226
  type: "response-complete";
3227
- userInputId: string;
3228
3227
  response: string;
3228
+ userInputId: string;
3229
3229
  changes: {
3230
3230
  type: "patch" | "file";
3231
3231
  path: string;
@@ -3241,16 +3241,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3241
3241
  content: string;
3242
3242
  }[];
3243
3243
  resetFileVersions: boolean;
3244
+ next_quota_reset?: Date | null | undefined;
3244
3245
  usage?: number | undefined;
3245
3246
  remainingBalance?: number | undefined;
3246
3247
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3247
- next_quota_reset?: Date | null | undefined;
3248
3248
  nextMonthlyGrant?: number | undefined;
3249
3249
  autoTopupAdded?: number | undefined;
3250
3250
  } | {
3251
3251
  type: "message-cost-response";
3252
- promptId: string;
3253
3252
  credits: number;
3253
+ promptId: string;
3254
3254
  } | {
3255
3255
  type: "prompt-response";
3256
3256
  promptId: string;
@@ -3292,8 +3292,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3292
3292
  } | undefined;
3293
3293
  } | {
3294
3294
  type: "tool_use";
3295
- name: string;
3296
3295
  id: string;
3296
+ name: string;
3297
3297
  input: Record<string, any>;
3298
3298
  cache_control?: {
3299
3299
  type: "ephemeral";
@@ -3309,8 +3309,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3309
3309
  type: "image";
3310
3310
  source: {
3311
3311
  type: "base64";
3312
- media_type: "image/jpeg";
3313
3312
  data: string;
3313
+ media_type: "image/jpeg";
3314
3314
  };
3315
3315
  cache_control?: {
3316
3316
  type: "ephemeral";
@@ -3321,13 +3321,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3321
3321
  consecutiveAssistantMessages?: number | undefined;
3322
3322
  };
3323
3323
  toolResults: {
3324
- name: string;
3325
3324
  id: string;
3325
+ name: string;
3326
3326
  result: string;
3327
3327
  }[];
3328
3328
  toolCalls: {
3329
- name: string;
3330
3329
  id: string;
3330
+ name: string;
3331
3331
  parameters: Record<string, string>;
3332
3332
  }[];
3333
3333
  } | {
@@ -3341,12 +3341,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3341
3341
  } | {
3342
3342
  type: "tool-call";
3343
3343
  data: {
3344
- name: string;
3345
3344
  id: string;
3345
+ name: string;
3346
3346
  input: Record<string, any>;
3347
3347
  };
3348
- userInputId: string;
3349
3348
  response: string;
3349
+ userInputId: string;
3350
3350
  changes: {
3351
3351
  type: "patch" | "file";
3352
3352
  path: string;
@@ -3373,8 +3373,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3373
3373
  } | {
3374
3374
  type: "action-error";
3375
3375
  message: string;
3376
- remainingBalance?: number | undefined;
3377
3376
  error?: string | undefined;
3377
+ remainingBalance?: number | undefined;
3378
3378
  } | {
3379
3379
  type: "commit-message-response";
3380
3380
  commitMessage: string;
@@ -3385,24 +3385,24 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3385
3385
  type: "action";
3386
3386
  data: {
3387
3387
  type: "usage-response";
3388
+ next_quota_reset: Date | null;
3388
3389
  usage: number;
3389
3390
  remainingBalance: number;
3390
- next_quota_reset: Date | null;
3391
3391
  nextMonthlyGrant: number;
3392
3392
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3393
3393
  autoTopupAdded?: number | undefined;
3394
3394
  } | {
3395
3395
  type: "init-response";
3396
+ next_quota_reset: Date | null;
3396
3397
  usage: number;
3397
3398
  remainingBalance: number;
3398
- next_quota_reset: Date | null;
3399
3399
  nextMonthlyGrant: number;
3400
3400
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3401
3401
  autoTopupAdded?: number | undefined;
3402
3402
  } | {
3403
3403
  type: "response-complete";
3404
- userInputId: string;
3405
3404
  response: string;
3405
+ userInputId: string;
3406
3406
  changes: {
3407
3407
  type: "patch" | "file";
3408
3408
  path: string;
@@ -3418,16 +3418,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3418
3418
  content: string;
3419
3419
  }[];
3420
3420
  resetFileVersions: boolean;
3421
+ next_quota_reset?: Date | null | undefined;
3421
3422
  usage?: number | undefined;
3422
3423
  remainingBalance?: number | undefined;
3423
3424
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3424
- next_quota_reset?: Date | null | undefined;
3425
3425
  nextMonthlyGrant?: number | undefined;
3426
3426
  autoTopupAdded?: number | undefined;
3427
3427
  } | {
3428
3428
  type: "message-cost-response";
3429
- promptId: string;
3430
3429
  credits: number;
3430
+ promptId: string;
3431
3431
  } | {
3432
3432
  type: "prompt-response";
3433
3433
  promptId: string;
@@ -3469,8 +3469,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3469
3469
  } | undefined;
3470
3470
  } | {
3471
3471
  type: "tool_use";
3472
- name: string;
3473
3472
  id: string;
3473
+ name: string;
3474
3474
  input: Record<string, any>;
3475
3475
  cache_control?: {
3476
3476
  type: "ephemeral";
@@ -3486,8 +3486,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3486
3486
  type: "image";
3487
3487
  source: {
3488
3488
  type: "base64";
3489
- media_type: "image/jpeg";
3490
3489
  data: string;
3490
+ media_type: "image/jpeg";
3491
3491
  };
3492
3492
  cache_control?: {
3493
3493
  type: "ephemeral";
@@ -3498,13 +3498,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3498
3498
  consecutiveAssistantMessages?: number | undefined;
3499
3499
  };
3500
3500
  toolResults: {
3501
- name: string;
3502
3501
  id: string;
3502
+ name: string;
3503
3503
  result: string;
3504
3504
  }[];
3505
3505
  toolCalls: {
3506
- name: string;
3507
3506
  id: string;
3507
+ name: string;
3508
3508
  parameters: Record<string, string>;
3509
3509
  }[];
3510
3510
  } | {
@@ -3518,12 +3518,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3518
3518
  } | {
3519
3519
  type: "tool-call";
3520
3520
  data: {
3521
- name: string;
3522
3521
  id: string;
3522
+ name: string;
3523
3523
  input: Record<string, any>;
3524
3524
  };
3525
- userInputId: string;
3526
3525
  response: string;
3526
+ userInputId: string;
3527
3527
  changes: {
3528
3528
  type: "patch" | "file";
3529
3529
  path: string;
@@ -3550,8 +3550,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3550
3550
  } | {
3551
3551
  type: "action-error";
3552
3552
  message: string;
3553
- remainingBalance?: number | undefined;
3554
3553
  error?: string | undefined;
3554
+ remainingBalance?: number | undefined;
3555
3555
  } | {
3556
3556
  type: "commit-message-response";
3557
3557
  commitMessage: string;
@@ -3631,16 +3631,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3631
3631
  }>, "many">;
3632
3632
  resetFileVersions: z.ZodBoolean;
3633
3633
  }, {
3634
+ next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
3634
3635
  usage: z.ZodOptional<z.ZodNumber>;
3635
3636
  remainingBalance: z.ZodOptional<z.ZodNumber>;
3636
3637
  balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<[import("../types/grant").GrantType, ...import("../types/grant").GrantType[]]>, z.ZodNumber>>>;
3637
- next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
3638
3638
  nextMonthlyGrant: z.ZodOptional<z.ZodNumber>;
3639
3639
  autoTopupAdded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
3640
3640
  }>, "strip", z.ZodTypeAny, {
3641
3641
  type: "response-complete";
3642
- userInputId: string;
3643
3642
  response: string;
3643
+ userInputId: string;
3644
3644
  changes: {
3645
3645
  type: "patch" | "file";
3646
3646
  path: string;
@@ -3656,16 +3656,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3656
3656
  content: string;
3657
3657
  }[];
3658
3658
  resetFileVersions: boolean;
3659
+ next_quota_reset?: Date | null | undefined;
3659
3660
  usage?: number | undefined;
3660
3661
  remainingBalance?: number | undefined;
3661
3662
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3662
- next_quota_reset?: Date | null | undefined;
3663
3663
  nextMonthlyGrant?: number | undefined;
3664
3664
  autoTopupAdded?: number | undefined;
3665
3665
  }, {
3666
3666
  type: "response-complete";
3667
- userInputId: string;
3668
3667
  response: string;
3668
+ userInputId: string;
3669
3669
  changes: {
3670
3670
  type: "patch" | "file";
3671
3671
  path: string;
@@ -3681,10 +3681,10 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3681
3681
  content: string;
3682
3682
  }[];
3683
3683
  resetFileVersions: boolean;
3684
+ next_quota_reset?: Date | null | undefined;
3684
3685
  usage?: number | undefined;
3685
3686
  remainingBalance?: number | undefined;
3686
3687
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
3687
- next_quota_reset?: Date | null | undefined;
3688
3688
  nextMonthlyGrant?: number | undefined;
3689
3689
  autoTopupAdded?: number | undefined;
3690
3690
  }>, z.ZodObject<{
@@ -3839,16 +3839,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3839
3839
  }>>;
3840
3840
  }, "strip", z.ZodTypeAny, {
3841
3841
  type: "tool_use";
3842
- name: string;
3843
3842
  id: string;
3843
+ name: string;
3844
3844
  input: Record<string, any>;
3845
3845
  cache_control?: {
3846
3846
  type: "ephemeral";
3847
3847
  } | undefined;
3848
3848
  }, {
3849
3849
  type: "tool_use";
3850
- name: string;
3851
3850
  id: string;
3851
+ name: string;
3852
3852
  input: Record<string, any>;
3853
3853
  cache_control?: {
3854
3854
  type: "ephemeral";
@@ -3886,12 +3886,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3886
3886
  data: z.ZodString;
3887
3887
  }, "strip", z.ZodTypeAny, {
3888
3888
  type: "base64";
3889
- media_type: "image/jpeg";
3890
3889
  data: string;
3890
+ media_type: "image/jpeg";
3891
3891
  }, {
3892
3892
  type: "base64";
3893
- media_type: "image/jpeg";
3894
3893
  data: string;
3894
+ media_type: "image/jpeg";
3895
3895
  }>;
3896
3896
  cache_control: z.ZodOptional<z.ZodObject<{
3897
3897
  type: z.ZodLiteral<"ephemeral">;
@@ -3904,8 +3904,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3904
3904
  type: "image";
3905
3905
  source: {
3906
3906
  type: "base64";
3907
- media_type: "image/jpeg";
3908
3907
  data: string;
3908
+ media_type: "image/jpeg";
3909
3909
  };
3910
3910
  cache_control?: {
3911
3911
  type: "ephemeral";
@@ -3914,8 +3914,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3914
3914
  type: "image";
3915
3915
  source: {
3916
3916
  type: "base64";
3917
- media_type: "image/jpeg";
3918
3917
  data: string;
3918
+ media_type: "image/jpeg";
3919
3919
  };
3920
3920
  cache_control?: {
3921
3921
  type: "ephemeral";
@@ -3930,8 +3930,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3930
3930
  } | undefined;
3931
3931
  } | {
3932
3932
  type: "tool_use";
3933
- name: string;
3934
3933
  id: string;
3934
+ name: string;
3935
3935
  input: Record<string, any>;
3936
3936
  cache_control?: {
3937
3937
  type: "ephemeral";
@@ -3947,8 +3947,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3947
3947
  type: "image";
3948
3948
  source: {
3949
3949
  type: "base64";
3950
- media_type: "image/jpeg";
3951
3950
  data: string;
3951
+ media_type: "image/jpeg";
3952
3952
  };
3953
3953
  cache_control?: {
3954
3954
  type: "ephemeral";
@@ -3964,8 +3964,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3964
3964
  } | undefined;
3965
3965
  } | {
3966
3966
  type: "tool_use";
3967
- name: string;
3968
3967
  id: string;
3968
+ name: string;
3969
3969
  input: Record<string, any>;
3970
3970
  cache_control?: {
3971
3971
  type: "ephemeral";
@@ -3981,8 +3981,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3981
3981
  type: "image";
3982
3982
  source: {
3983
3983
  type: "base64";
3984
- media_type: "image/jpeg";
3985
3984
  data: string;
3985
+ media_type: "image/jpeg";
3986
3986
  };
3987
3987
  cache_control?: {
3988
3988
  type: "ephemeral";
@@ -4029,8 +4029,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4029
4029
  } | undefined;
4030
4030
  } | {
4031
4031
  type: "tool_use";
4032
- name: string;
4033
4032
  id: string;
4033
+ name: string;
4034
4034
  input: Record<string, any>;
4035
4035
  cache_control?: {
4036
4036
  type: "ephemeral";
@@ -4046,8 +4046,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4046
4046
  type: "image";
4047
4047
  source: {
4048
4048
  type: "base64";
4049
- media_type: "image/jpeg";
4050
4049
  data: string;
4050
+ media_type: "image/jpeg";
4051
4051
  };
4052
4052
  cache_control?: {
4053
4053
  type: "ephemeral";
@@ -4094,8 +4094,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4094
4094
  } | undefined;
4095
4095
  } | {
4096
4096
  type: "tool_use";
4097
- name: string;
4098
4097
  id: string;
4098
+ name: string;
4099
4099
  input: Record<string, any>;
4100
4100
  cache_control?: {
4101
4101
  type: "ephemeral";
@@ -4111,8 +4111,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4111
4111
  type: "image";
4112
4112
  source: {
4113
4113
  type: "base64";
4114
- media_type: "image/jpeg";
4115
4114
  data: string;
4115
+ media_type: "image/jpeg";
4116
4116
  };
4117
4117
  cache_control?: {
4118
4118
  type: "ephemeral";
@@ -4127,12 +4127,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4127
4127
  parameters: z.ZodRecord<z.ZodString, z.ZodString>;
4128
4128
  id: z.ZodString;
4129
4129
  }, "strip", z.ZodTypeAny, {
4130
- name: string;
4131
4130
  id: string;
4131
+ name: string;
4132
4132
  parameters: Record<string, string>;
4133
4133
  }, {
4134
- name: string;
4135
4134
  id: string;
4135
+ name: string;
4136
4136
  parameters: Record<string, string>;
4137
4137
  }>, "many">;
4138
4138
  toolResults: z.ZodArray<z.ZodObject<{
@@ -4140,12 +4140,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4140
4140
  result: z.ZodString;
4141
4141
  id: z.ZodString;
4142
4142
  }, "strip", z.ZodTypeAny, {
4143
- name: string;
4144
4143
  id: string;
4144
+ name: string;
4145
4145
  result: string;
4146
4146
  }, {
4147
- name: string;
4148
4147
  id: string;
4148
+ name: string;
4149
4149
  result: string;
4150
4150
  }>, "many">;
4151
4151
  }, "strip", z.ZodTypeAny, {
@@ -4189,8 +4189,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4189
4189
  } | undefined;
4190
4190
  } | {
4191
4191
  type: "tool_use";
4192
- name: string;
4193
4192
  id: string;
4193
+ name: string;
4194
4194
  input: Record<string, any>;
4195
4195
  cache_control?: {
4196
4196
  type: "ephemeral";
@@ -4206,8 +4206,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4206
4206
  type: "image";
4207
4207
  source: {
4208
4208
  type: "base64";
4209
- media_type: "image/jpeg";
4210
4209
  data: string;
4210
+ media_type: "image/jpeg";
4211
4211
  };
4212
4212
  cache_control?: {
4213
4213
  type: "ephemeral";
@@ -4218,13 +4218,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4218
4218
  consecutiveAssistantMessages?: number | undefined;
4219
4219
  };
4220
4220
  toolResults: {
4221
- name: string;
4222
4221
  id: string;
4222
+ name: string;
4223
4223
  result: string;
4224
4224
  }[];
4225
4225
  toolCalls: {
4226
- name: string;
4227
4226
  id: string;
4227
+ name: string;
4228
4228
  parameters: Record<string, string>;
4229
4229
  }[];
4230
4230
  }, {
@@ -4268,8 +4268,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4268
4268
  } | undefined;
4269
4269
  } | {
4270
4270
  type: "tool_use";
4271
- name: string;
4272
4271
  id: string;
4272
+ name: string;
4273
4273
  input: Record<string, any>;
4274
4274
  cache_control?: {
4275
4275
  type: "ephemeral";
@@ -4285,8 +4285,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4285
4285
  type: "image";
4286
4286
  source: {
4287
4287
  type: "base64";
4288
- media_type: "image/jpeg";
4289
4288
  data: string;
4289
+ media_type: "image/jpeg";
4290
4290
  };
4291
4291
  cache_control?: {
4292
4292
  type: "ephemeral";
@@ -4297,13 +4297,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4297
4297
  consecutiveAssistantMessages?: number | undefined;
4298
4298
  };
4299
4299
  toolResults: {
4300
- name: string;
4301
4300
  id: string;
4301
+ name: string;
4302
4302
  result: string;
4303
4303
  }[];
4304
4304
  toolCalls: {
4305
- name: string;
4306
4305
  id: string;
4306
+ name: string;
4307
4307
  parameters: Record<string, string>;
4308
4308
  }[];
4309
4309
  }>, z.ZodObject<{
@@ -4327,12 +4327,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4327
4327
  id: z.ZodString;
4328
4328
  input: z.ZodRecord<z.ZodString, z.ZodAny>;
4329
4329
  }, "strip", z.ZodTypeAny, {
4330
- name: string;
4331
4330
  id: string;
4331
+ name: string;
4332
4332
  input: Record<string, any>;
4333
4333
  }, {
4334
- name: string;
4335
4334
  id: string;
4335
+ name: string;
4336
4336
  input: Record<string, any>;
4337
4337
  }>;
4338
4338
  changes: z.ZodArray<z.ZodObject<{
@@ -4375,12 +4375,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4375
4375
  }, "strip", z.ZodTypeAny, {
4376
4376
  type: "tool-call";
4377
4377
  data: {
4378
- name: string;
4379
4378
  id: string;
4379
+ name: string;
4380
4380
  input: Record<string, any>;
4381
4381
  };
4382
- userInputId: string;
4383
4382
  response: string;
4383
+ userInputId: string;
4384
4384
  changes: {
4385
4385
  type: "patch" | "file";
4386
4386
  path: string;
@@ -4399,12 +4399,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4399
4399
  }, {
4400
4400
  type: "tool-call";
4401
4401
  data: {
4402
- name: string;
4403
4402
  id: string;
4403
+ name: string;
4404
4404
  input: Record<string, any>;
4405
4405
  };
4406
- userInputId: string;
4407
4406
  response: string;
4407
+ userInputId: string;
4408
4408
  changes: {
4409
4409
  type: "patch" | "file";
4410
4410
  path: string;
@@ -4456,17 +4456,17 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4456
4456
  autoTopupAdded: z.ZodOptional<z.ZodNumber>;
4457
4457
  }, "type">>, "strip", z.ZodTypeAny, {
4458
4458
  type: "init-response";
4459
+ next_quota_reset: Date | null;
4459
4460
  usage: number;
4460
4461
  remainingBalance: number;
4461
- next_quota_reset: Date | null;
4462
4462
  nextMonthlyGrant: number;
4463
4463
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4464
4464
  autoTopupAdded?: number | undefined;
4465
4465
  }, {
4466
4466
  type: "init-response";
4467
+ next_quota_reset: Date | null;
4467
4468
  usage: number;
4468
4469
  remainingBalance: number;
4469
- next_quota_reset: Date | null;
4470
4470
  nextMonthlyGrant: number;
4471
4471
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4472
4472
  autoTopupAdded?: number | undefined;
@@ -4480,17 +4480,17 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4480
4480
  autoTopupAdded: z.ZodOptional<z.ZodNumber>;
4481
4481
  }, "strip", z.ZodTypeAny, {
4482
4482
  type: "usage-response";
4483
+ next_quota_reset: Date | null;
4483
4484
  usage: number;
4484
4485
  remainingBalance: number;
4485
- next_quota_reset: Date | null;
4486
4486
  nextMonthlyGrant: number;
4487
4487
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4488
4488
  autoTopupAdded?: number | undefined;
4489
4489
  }, {
4490
4490
  type: "usage-response";
4491
+ next_quota_reset: Date | null;
4491
4492
  usage: number;
4492
4493
  remainingBalance: number;
4493
- next_quota_reset: Date | null;
4494
4494
  nextMonthlyGrant: number;
4495
4495
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4496
4496
  autoTopupAdded?: number | undefined;
@@ -4500,12 +4500,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4500
4500
  credits: z.ZodNumber;
4501
4501
  }, "strip", z.ZodTypeAny, {
4502
4502
  type: "message-cost-response";
4503
- promptId: string;
4504
4503
  credits: number;
4504
+ promptId: string;
4505
4505
  }, {
4506
4506
  type: "message-cost-response";
4507
- promptId: string;
4508
4507
  credits: number;
4508
+ promptId: string;
4509
4509
  }>, z.ZodObject<{
4510
4510
  type: z.ZodLiteral<"action-error">;
4511
4511
  message: z.ZodString;
@@ -4514,13 +4514,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4514
4514
  }, "strip", z.ZodTypeAny, {
4515
4515
  type: "action-error";
4516
4516
  message: string;
4517
- remainingBalance?: number | undefined;
4518
4517
  error?: string | undefined;
4518
+ remainingBalance?: number | undefined;
4519
4519
  }, {
4520
4520
  type: "action-error";
4521
4521
  message: string;
4522
- remainingBalance?: number | undefined;
4523
4522
  error?: string | undefined;
4523
+ remainingBalance?: number | undefined;
4524
4524
  }>, z.ZodObject<{
4525
4525
  type: z.ZodLiteral<"commit-message-response">;
4526
4526
  commitMessage: z.ZodString;
@@ -4541,24 +4541,24 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4541
4541
  type: "action";
4542
4542
  data: {
4543
4543
  type: "usage-response";
4544
+ next_quota_reset: Date | null;
4544
4545
  usage: number;
4545
4546
  remainingBalance: number;
4546
- next_quota_reset: Date | null;
4547
4547
  nextMonthlyGrant: number;
4548
4548
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4549
4549
  autoTopupAdded?: number | undefined;
4550
4550
  } | {
4551
4551
  type: "init-response";
4552
+ next_quota_reset: Date | null;
4552
4553
  usage: number;
4553
4554
  remainingBalance: number;
4554
- next_quota_reset: Date | null;
4555
4555
  nextMonthlyGrant: number;
4556
4556
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4557
4557
  autoTopupAdded?: number | undefined;
4558
4558
  } | {
4559
4559
  type: "response-complete";
4560
- userInputId: string;
4561
4560
  response: string;
4561
+ userInputId: string;
4562
4562
  changes: {
4563
4563
  type: "patch" | "file";
4564
4564
  path: string;
@@ -4574,16 +4574,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4574
4574
  content: string;
4575
4575
  }[];
4576
4576
  resetFileVersions: boolean;
4577
+ next_quota_reset?: Date | null | undefined;
4577
4578
  usage?: number | undefined;
4578
4579
  remainingBalance?: number | undefined;
4579
4580
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4580
- next_quota_reset?: Date | null | undefined;
4581
4581
  nextMonthlyGrant?: number | undefined;
4582
4582
  autoTopupAdded?: number | undefined;
4583
4583
  } | {
4584
4584
  type: "message-cost-response";
4585
- promptId: string;
4586
4585
  credits: number;
4586
+ promptId: string;
4587
4587
  } | {
4588
4588
  type: "prompt-response";
4589
4589
  promptId: string;
@@ -4625,8 +4625,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4625
4625
  } | undefined;
4626
4626
  } | {
4627
4627
  type: "tool_use";
4628
- name: string;
4629
4628
  id: string;
4629
+ name: string;
4630
4630
  input: Record<string, any>;
4631
4631
  cache_control?: {
4632
4632
  type: "ephemeral";
@@ -4642,8 +4642,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4642
4642
  type: "image";
4643
4643
  source: {
4644
4644
  type: "base64";
4645
- media_type: "image/jpeg";
4646
4645
  data: string;
4646
+ media_type: "image/jpeg";
4647
4647
  };
4648
4648
  cache_control?: {
4649
4649
  type: "ephemeral";
@@ -4654,13 +4654,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4654
4654
  consecutiveAssistantMessages?: number | undefined;
4655
4655
  };
4656
4656
  toolResults: {
4657
- name: string;
4658
4657
  id: string;
4658
+ name: string;
4659
4659
  result: string;
4660
4660
  }[];
4661
4661
  toolCalls: {
4662
- name: string;
4663
4662
  id: string;
4663
+ name: string;
4664
4664
  parameters: Record<string, string>;
4665
4665
  }[];
4666
4666
  } | {
@@ -4674,12 +4674,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4674
4674
  } | {
4675
4675
  type: "tool-call";
4676
4676
  data: {
4677
- name: string;
4678
4677
  id: string;
4678
+ name: string;
4679
4679
  input: Record<string, any>;
4680
4680
  };
4681
- userInputId: string;
4682
4681
  response: string;
4682
+ userInputId: string;
4683
4683
  changes: {
4684
4684
  type: "patch" | "file";
4685
4685
  path: string;
@@ -4706,8 +4706,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4706
4706
  } | {
4707
4707
  type: "action-error";
4708
4708
  message: string;
4709
- remainingBalance?: number | undefined;
4710
4709
  error?: string | undefined;
4710
+ remainingBalance?: number | undefined;
4711
4711
  } | {
4712
4712
  type: "commit-message-response";
4713
4713
  commitMessage: string;
@@ -4718,24 +4718,24 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4718
4718
  type: "action";
4719
4719
  data: {
4720
4720
  type: "usage-response";
4721
+ next_quota_reset: Date | null;
4721
4722
  usage: number;
4722
4723
  remainingBalance: number;
4723
- next_quota_reset: Date | null;
4724
4724
  nextMonthlyGrant: number;
4725
4725
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4726
4726
  autoTopupAdded?: number | undefined;
4727
4727
  } | {
4728
4728
  type: "init-response";
4729
+ next_quota_reset: Date | null;
4729
4730
  usage: number;
4730
4731
  remainingBalance: number;
4731
- next_quota_reset: Date | null;
4732
4732
  nextMonthlyGrant: number;
4733
4733
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4734
4734
  autoTopupAdded?: number | undefined;
4735
4735
  } | {
4736
4736
  type: "response-complete";
4737
- userInputId: string;
4738
4737
  response: string;
4738
+ userInputId: string;
4739
4739
  changes: {
4740
4740
  type: "patch" | "file";
4741
4741
  path: string;
@@ -4751,16 +4751,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4751
4751
  content: string;
4752
4752
  }[];
4753
4753
  resetFileVersions: boolean;
4754
+ next_quota_reset?: Date | null | undefined;
4754
4755
  usage?: number | undefined;
4755
4756
  remainingBalance?: number | undefined;
4756
4757
  balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
4757
- next_quota_reset?: Date | null | undefined;
4758
4758
  nextMonthlyGrant?: number | undefined;
4759
4759
  autoTopupAdded?: number | undefined;
4760
4760
  } | {
4761
4761
  type: "message-cost-response";
4762
- promptId: string;
4763
4762
  credits: number;
4763
+ promptId: string;
4764
4764
  } | {
4765
4765
  type: "prompt-response";
4766
4766
  promptId: string;
@@ -4802,8 +4802,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4802
4802
  } | undefined;
4803
4803
  } | {
4804
4804
  type: "tool_use";
4805
- name: string;
4806
4805
  id: string;
4806
+ name: string;
4807
4807
  input: Record<string, any>;
4808
4808
  cache_control?: {
4809
4809
  type: "ephemeral";
@@ -4819,8 +4819,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4819
4819
  type: "image";
4820
4820
  source: {
4821
4821
  type: "base64";
4822
- media_type: "image/jpeg";
4823
4822
  data: string;
4823
+ media_type: "image/jpeg";
4824
4824
  };
4825
4825
  cache_control?: {
4826
4826
  type: "ephemeral";
@@ -4831,13 +4831,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4831
4831
  consecutiveAssistantMessages?: number | undefined;
4832
4832
  };
4833
4833
  toolResults: {
4834
- name: string;
4835
4834
  id: string;
4835
+ name: string;
4836
4836
  result: string;
4837
4837
  }[];
4838
4838
  toolCalls: {
4839
- name: string;
4840
4839
  id: string;
4840
+ name: string;
4841
4841
  parameters: Record<string, string>;
4842
4842
  }[];
4843
4843
  } | {
@@ -4851,12 +4851,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4851
4851
  } | {
4852
4852
  type: "tool-call";
4853
4853
  data: {
4854
- name: string;
4855
4854
  id: string;
4855
+ name: string;
4856
4856
  input: Record<string, any>;
4857
4857
  };
4858
- userInputId: string;
4859
4858
  response: string;
4859
+ userInputId: string;
4860
4860
  changes: {
4861
4861
  type: "patch" | "file";
4862
4862
  path: string;
@@ -4883,8 +4883,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4883
4883
  } | {
4884
4884
  type: "action-error";
4885
4885
  message: string;
4886
- remainingBalance?: number | undefined;
4887
4886
  error?: string | undefined;
4887
+ remainingBalance?: number | undefined;
4888
4888
  } | {
4889
4889
  type: "commit-message-response";
4890
4890
  commitMessage: string;