codebuff 1.0.211 → 1.0.213

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.d.ts +21 -0
  2. package/dist/background-process-manager.js +9 -0
  3. package/dist/background-process-manager.js.map +1 -0
  4. package/dist/checkpoints/checkpoint-manager.d.ts +4 -2
  5. package/dist/checkpoints/checkpoint-manager.js +4 -2
  6. package/dist/checkpoints/checkpoint-manager.js.map +1 -1
  7. package/dist/cli.js +23 -1
  8. package/dist/cli.js.map +1 -1
  9. package/dist/client.d.ts +6 -6
  10. package/dist/client.js +2 -2
  11. package/dist/client.js.map +1 -1
  12. package/dist/common/actions.d.ts +105 -105
  13. package/dist/common/browser-actions.d.ts +240 -240
  14. package/dist/common/constants/tools.js +1 -1
  15. package/dist/common/constants/tools.js.map +1 -1
  16. package/dist/common/constants.d.ts +1 -1
  17. package/dist/common/constants.js +2 -2
  18. package/dist/common/constants.js.map +1 -1
  19. package/dist/common/logger.d.ts +1 -0
  20. package/dist/common/logger.js +7 -0
  21. package/dist/common/logger.js.map +1 -0
  22. package/dist/common/types/agent-state.d.ts +6 -6
  23. package/dist/common/types/message.d.ts +6 -6
  24. package/dist/common/util/constants.d.ts +1 -0
  25. package/dist/common/util/constants.js +7 -0
  26. package/dist/common/util/constants.js.map +1 -0
  27. package/dist/common/util/credentials.d.ts +2 -2
  28. package/dist/common/util/helpers.d.ts +1 -0
  29. package/dist/common/util/helpers.js +6 -0
  30. package/dist/common/util/helpers.js.map +1 -0
  31. package/dist/common/util/token-counter.d.ts +3 -0
  32. package/dist/common/util/token-counter.js +27 -0
  33. package/dist/common/util/token-counter.js.map +1 -0
  34. package/dist/common/websockets/websocket-schema.d.ts +186 -186
  35. package/dist/index.js +5 -1
  36. package/dist/index.js.map +1 -1
  37. package/dist/menu.js +2 -1
  38. package/dist/menu.js.map +1 -1
  39. package/dist/tool-handlers.d.ts +1 -0
  40. package/dist/tool-handlers.js +10 -10
  41. package/dist/tool-handlers.js.map +1 -1
  42. package/dist/utils/terminal.d.ts +1 -1
  43. package/dist/utils/terminal.js +98 -7
  44. package/dist/utils/terminal.js.map +1 -1
  45. package/package.json +1 -1
  46. package/dist/common/actions.d.ts.map +0 -1
  47. package/dist/common/api-keys/constants.d.ts.map +0 -1
  48. package/dist/common/api-keys/crypto.d.ts.map +0 -1
  49. package/dist/common/billing/quota-manager.d.ts.map +0 -1
  50. package/dist/common/browser-actions.d.ts.map +0 -1
  51. package/dist/common/constants/tools.d.ts.map +0 -1
  52. package/dist/common/constants.d.ts.map +0 -1
  53. package/dist/common/db/drizzle.config.d.ts.map +0 -1
  54. package/dist/common/db/env.d.mts.map +0 -1
  55. package/dist/common/db/index.d.ts.map +0 -1
  56. package/dist/common/db/schema.d.ts.map +0 -1
  57. package/dist/common/env.d.mts.map +0 -1
  58. package/dist/common/project-file-tree.d.ts.map +0 -1
  59. package/dist/common/types/agent-state.d.ts.map +0 -1
  60. package/dist/common/types/message.d.ts.map +0 -1
  61. package/dist/common/types/plan.d.ts.map +0 -1
  62. package/dist/common/types/referral.d.ts.map +0 -1
  63. package/dist/common/types/tools.d.ts.map +0 -1
  64. package/dist/common/types/usage.d.ts.map +0 -1
  65. package/dist/common/util/__tests__/messages.test.d.ts.map +0 -1
  66. package/dist/common/util/__tests__/string.test.d.ts.map +0 -1
  67. package/dist/common/util/array.d.ts.map +0 -1
  68. package/dist/common/util/changes.d.ts.map +0 -1
  69. package/dist/common/util/credentials.d.ts.map +0 -1
  70. package/dist/common/util/crypto.d.ts +0 -27
  71. package/dist/common/util/crypto.js +0 -174
  72. package/dist/common/util/crypto.js.map +0 -1
  73. package/dist/common/util/dates.d.ts.map +0 -1
  74. package/dist/common/util/file.d.ts.map +0 -1
  75. package/dist/common/util/git.d.ts.map +0 -1
  76. package/dist/common/util/logger.d.ts.map +0 -1
  77. package/dist/common/util/lru-cache.d.ts.map +0 -1
  78. package/dist/common/util/messages.d.ts.map +0 -1
  79. package/dist/common/util/min-heap.d.ts.map +0 -1
  80. package/dist/common/util/object.d.ts.map +0 -1
  81. package/dist/common/util/patch.d.ts.map +0 -1
  82. package/dist/common/util/promise.d.ts.map +0 -1
  83. package/dist/common/util/referral.d.ts.map +0 -1
  84. package/dist/common/util/saxy.d.ts.map +0 -1
  85. package/dist/common/util/server/referral.d.ts.map +0 -1
  86. package/dist/common/util/string.d.ts.map +0 -1
  87. package/dist/common/util/stripe.d.ts.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
@@ -58,7 +58,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
58
58
  prompt: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
59
59
  fingerprintId: z.ZodString;
60
60
  authToken: z.ZodOptional<z.ZodString>;
61
- costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
61
+ costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max", "experimental"]>>>;
62
62
  agentState: z.ZodObject<{
63
63
  agentContext: z.ZodString;
64
64
  fileContext: z.ZodObject<{
@@ -207,17 +207,17 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
207
207
  type: "ephemeral";
208
208
  }>>;
209
209
  }, "strip", z.ZodTypeAny, {
210
- id: string;
211
210
  type: "tool_use";
212
211
  name: string;
212
+ id: string;
213
213
  input: Record<string, any>;
214
214
  cache_control?: {
215
215
  type: "ephemeral";
216
216
  } | undefined;
217
217
  }, {
218
- id: string;
219
218
  type: "tool_use";
220
219
  name: string;
220
+ id: string;
221
221
  input: Record<string, any>;
222
222
  cache_control?: {
223
223
  type: "ephemeral";
@@ -234,15 +234,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
234
234
  type: "ephemeral";
235
235
  }>>;
236
236
  }, "strip", z.ZodTypeAny, {
237
- content: string;
238
237
  type: "tool_result";
238
+ content: string;
239
239
  tool_use_id: string;
240
240
  cache_control?: {
241
241
  type: "ephemeral";
242
242
  } | undefined;
243
243
  }, {
244
- content: string;
245
244
  type: "tool_result";
245
+ content: string;
246
246
  tool_use_id: string;
247
247
  cache_control?: {
248
248
  type: "ephemeral";
@@ -298,16 +298,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
298
298
  type: "ephemeral";
299
299
  } | undefined;
300
300
  } | {
301
- id: string;
302
301
  type: "tool_use";
303
302
  name: string;
303
+ id: string;
304
304
  input: Record<string, any>;
305
305
  cache_control?: {
306
306
  type: "ephemeral";
307
307
  } | undefined;
308
308
  } | {
309
- content: string;
310
309
  type: "tool_result";
310
+ content: string;
311
311
  tool_use_id: string;
312
312
  cache_control?: {
313
313
  type: "ephemeral";
@@ -332,16 +332,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
332
332
  type: "ephemeral";
333
333
  } | undefined;
334
334
  } | {
335
- id: string;
336
335
  type: "tool_use";
337
336
  name: string;
337
+ id: string;
338
338
  input: Record<string, any>;
339
339
  cache_control?: {
340
340
  type: "ephemeral";
341
341
  } | undefined;
342
342
  } | {
343
- content: string;
344
343
  type: "tool_result";
344
+ content: string;
345
345
  tool_use_id: string;
346
346
  cache_control?: {
347
347
  type: "ephemeral";
@@ -397,16 +397,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
397
397
  type: "ephemeral";
398
398
  } | undefined;
399
399
  } | {
400
- id: string;
401
400
  type: "tool_use";
402
401
  name: string;
402
+ id: string;
403
403
  input: Record<string, any>;
404
404
  cache_control?: {
405
405
  type: "ephemeral";
406
406
  } | undefined;
407
407
  } | {
408
- content: string;
409
408
  type: "tool_result";
409
+ content: string;
410
410
  tool_use_id: string;
411
411
  cache_control?: {
412
412
  type: "ephemeral";
@@ -462,16 +462,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
462
462
  type: "ephemeral";
463
463
  } | undefined;
464
464
  } | {
465
- id: string;
466
465
  type: "tool_use";
467
466
  name: string;
467
+ id: string;
468
468
  input: Record<string, any>;
469
469
  cache_control?: {
470
470
  type: "ephemeral";
471
471
  } | undefined;
472
472
  } | {
473
- content: string;
474
473
  type: "tool_result";
474
+ content: string;
475
475
  tool_use_id: string;
476
476
  cache_control?: {
477
477
  type: "ephemeral";
@@ -496,19 +496,19 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
496
496
  result: z.ZodString;
497
497
  id: z.ZodString;
498
498
  }, "strip", z.ZodTypeAny, {
499
- id: string;
500
499
  name: string;
500
+ id: string;
501
501
  result: string;
502
502
  }, {
503
- id: string;
504
503
  name: string;
504
+ id: string;
505
505
  result: string;
506
506
  }>, "many">;
507
507
  }, "strip", z.ZodTypeAny, {
508
508
  type: "prompt";
509
509
  promptId: string;
510
510
  fingerprintId: string;
511
- costMode: "lite" | "normal" | "max";
511
+ costMode: "lite" | "normal" | "max" | "experimental";
512
512
  agentState: {
513
513
  agentContext: string;
514
514
  fileContext: {
@@ -546,16 +546,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
546
546
  type: "ephemeral";
547
547
  } | undefined;
548
548
  } | {
549
- id: string;
550
549
  type: "tool_use";
551
550
  name: string;
551
+ id: string;
552
552
  input: Record<string, any>;
553
553
  cache_control?: {
554
554
  type: "ephemeral";
555
555
  } | undefined;
556
556
  } | {
557
- content: string;
558
557
  type: "tool_result";
558
+ content: string;
559
559
  tool_use_id: string;
560
560
  cache_control?: {
561
561
  type: "ephemeral";
@@ -576,8 +576,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
576
576
  lastUserPromptIndex?: number | undefined;
577
577
  };
578
578
  toolResults: {
579
- id: string;
580
579
  name: string;
580
+ id: string;
581
581
  result: string;
582
582
  }[];
583
583
  prompt?: string | undefined;
@@ -623,16 +623,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
623
623
  type: "ephemeral";
624
624
  } | undefined;
625
625
  } | {
626
- id: string;
627
626
  type: "tool_use";
628
627
  name: string;
628
+ id: string;
629
629
  input: Record<string, any>;
630
630
  cache_control?: {
631
631
  type: "ephemeral";
632
632
  } | undefined;
633
633
  } | {
634
- content: string;
635
634
  type: "tool_result";
635
+ content: string;
636
636
  tool_use_id: string;
637
637
  cache_control?: {
638
638
  type: "ephemeral";
@@ -653,13 +653,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
653
653
  lastUserPromptIndex?: number | undefined;
654
654
  };
655
655
  toolResults: {
656
- id: string;
657
656
  name: string;
657
+ id: string;
658
658
  result: string;
659
659
  }[];
660
660
  prompt?: string | undefined;
661
661
  authToken?: string | undefined;
662
- costMode?: "lite" | "normal" | "max" | undefined;
662
+ costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
663
663
  }>, z.ZodObject<{
664
664
  type: z.ZodLiteral<"read-files-response">;
665
665
  files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
@@ -869,7 +869,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
869
869
  type: "prompt";
870
870
  promptId: string;
871
871
  fingerprintId: string;
872
- costMode: "lite" | "normal" | "max";
872
+ costMode: "lite" | "normal" | "max" | "experimental";
873
873
  agentState: {
874
874
  agentContext: string;
875
875
  fileContext: {
@@ -907,16 +907,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
907
907
  type: "ephemeral";
908
908
  } | undefined;
909
909
  } | {
910
- id: string;
911
910
  type: "tool_use";
912
911
  name: string;
912
+ id: string;
913
913
  input: Record<string, any>;
914
914
  cache_control?: {
915
915
  type: "ephemeral";
916
916
  } | undefined;
917
917
  } | {
918
- content: string;
919
918
  type: "tool_result";
919
+ content: string;
920
920
  tool_use_id: string;
921
921
  cache_control?: {
922
922
  type: "ephemeral";
@@ -937,8 +937,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
937
937
  lastUserPromptIndex?: number | undefined;
938
938
  };
939
939
  toolResults: {
940
- id: string;
941
940
  name: string;
941
+ id: string;
942
942
  result: string;
943
943
  }[];
944
944
  prompt?: string | undefined;
@@ -1028,16 +1028,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1028
1028
  type: "ephemeral";
1029
1029
  } | undefined;
1030
1030
  } | {
1031
- id: string;
1032
1031
  type: "tool_use";
1033
1032
  name: string;
1033
+ id: string;
1034
1034
  input: Record<string, any>;
1035
1035
  cache_control?: {
1036
1036
  type: "ephemeral";
1037
1037
  } | undefined;
1038
1038
  } | {
1039
- content: string;
1040
1039
  type: "tool_result";
1040
+ content: string;
1041
1041
  tool_use_id: string;
1042
1042
  cache_control?: {
1043
1043
  type: "ephemeral";
@@ -1058,13 +1058,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1058
1058
  lastUserPromptIndex?: number | undefined;
1059
1059
  };
1060
1060
  toolResults: {
1061
- id: string;
1062
1061
  name: string;
1062
+ id: string;
1063
1063
  result: string;
1064
1064
  }[];
1065
1065
  prompt?: string | undefined;
1066
1066
  authToken?: string | undefined;
1067
- costMode?: "lite" | "normal" | "max" | undefined;
1067
+ costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
1068
1068
  } | {
1069
1069
  type: "read-files-response";
1070
1070
  files: Record<string, string | null>;
@@ -1163,7 +1163,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1163
1163
  prompt: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
1164
1164
  fingerprintId: z.ZodString;
1165
1165
  authToken: z.ZodOptional<z.ZodString>;
1166
- costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
1166
+ costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max", "experimental"]>>>;
1167
1167
  agentState: z.ZodObject<{
1168
1168
  agentContext: z.ZodString;
1169
1169
  fileContext: z.ZodObject<{
@@ -1312,17 +1312,17 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1312
1312
  type: "ephemeral";
1313
1313
  }>>;
1314
1314
  }, "strip", z.ZodTypeAny, {
1315
- id: string;
1316
1315
  type: "tool_use";
1317
1316
  name: string;
1317
+ id: string;
1318
1318
  input: Record<string, any>;
1319
1319
  cache_control?: {
1320
1320
  type: "ephemeral";
1321
1321
  } | undefined;
1322
1322
  }, {
1323
- id: string;
1324
1323
  type: "tool_use";
1325
1324
  name: string;
1325
+ id: string;
1326
1326
  input: Record<string, any>;
1327
1327
  cache_control?: {
1328
1328
  type: "ephemeral";
@@ -1339,15 +1339,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1339
1339
  type: "ephemeral";
1340
1340
  }>>;
1341
1341
  }, "strip", z.ZodTypeAny, {
1342
- content: string;
1343
1342
  type: "tool_result";
1343
+ content: string;
1344
1344
  tool_use_id: string;
1345
1345
  cache_control?: {
1346
1346
  type: "ephemeral";
1347
1347
  } | undefined;
1348
1348
  }, {
1349
- content: string;
1350
1349
  type: "tool_result";
1350
+ content: string;
1351
1351
  tool_use_id: string;
1352
1352
  cache_control?: {
1353
1353
  type: "ephemeral";
@@ -1403,16 +1403,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1403
1403
  type: "ephemeral";
1404
1404
  } | undefined;
1405
1405
  } | {
1406
- id: string;
1407
1406
  type: "tool_use";
1408
1407
  name: string;
1408
+ id: string;
1409
1409
  input: Record<string, any>;
1410
1410
  cache_control?: {
1411
1411
  type: "ephemeral";
1412
1412
  } | undefined;
1413
1413
  } | {
1414
- content: string;
1415
1414
  type: "tool_result";
1415
+ content: string;
1416
1416
  tool_use_id: string;
1417
1417
  cache_control?: {
1418
1418
  type: "ephemeral";
@@ -1437,16 +1437,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1437
1437
  type: "ephemeral";
1438
1438
  } | undefined;
1439
1439
  } | {
1440
- id: string;
1441
1440
  type: "tool_use";
1442
1441
  name: string;
1442
+ id: string;
1443
1443
  input: Record<string, any>;
1444
1444
  cache_control?: {
1445
1445
  type: "ephemeral";
1446
1446
  } | undefined;
1447
1447
  } | {
1448
- content: string;
1449
1448
  type: "tool_result";
1449
+ content: string;
1450
1450
  tool_use_id: string;
1451
1451
  cache_control?: {
1452
1452
  type: "ephemeral";
@@ -1502,16 +1502,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1502
1502
  type: "ephemeral";
1503
1503
  } | undefined;
1504
1504
  } | {
1505
- id: string;
1506
1505
  type: "tool_use";
1507
1506
  name: string;
1507
+ id: string;
1508
1508
  input: Record<string, any>;
1509
1509
  cache_control?: {
1510
1510
  type: "ephemeral";
1511
1511
  } | undefined;
1512
1512
  } | {
1513
- content: string;
1514
1513
  type: "tool_result";
1514
+ content: string;
1515
1515
  tool_use_id: string;
1516
1516
  cache_control?: {
1517
1517
  type: "ephemeral";
@@ -1567,16 +1567,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1567
1567
  type: "ephemeral";
1568
1568
  } | undefined;
1569
1569
  } | {
1570
- id: string;
1571
1570
  type: "tool_use";
1572
1571
  name: string;
1572
+ id: string;
1573
1573
  input: Record<string, any>;
1574
1574
  cache_control?: {
1575
1575
  type: "ephemeral";
1576
1576
  } | undefined;
1577
1577
  } | {
1578
- content: string;
1579
1578
  type: "tool_result";
1579
+ content: string;
1580
1580
  tool_use_id: string;
1581
1581
  cache_control?: {
1582
1582
  type: "ephemeral";
@@ -1601,19 +1601,19 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1601
1601
  result: z.ZodString;
1602
1602
  id: z.ZodString;
1603
1603
  }, "strip", z.ZodTypeAny, {
1604
- id: string;
1605
1604
  name: string;
1605
+ id: string;
1606
1606
  result: string;
1607
1607
  }, {
1608
- id: string;
1609
1608
  name: string;
1609
+ id: string;
1610
1610
  result: string;
1611
1611
  }>, "many">;
1612
1612
  }, "strip", z.ZodTypeAny, {
1613
1613
  type: "prompt";
1614
1614
  promptId: string;
1615
1615
  fingerprintId: string;
1616
- costMode: "lite" | "normal" | "max";
1616
+ costMode: "lite" | "normal" | "max" | "experimental";
1617
1617
  agentState: {
1618
1618
  agentContext: string;
1619
1619
  fileContext: {
@@ -1651,16 +1651,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1651
1651
  type: "ephemeral";
1652
1652
  } | undefined;
1653
1653
  } | {
1654
- id: string;
1655
1654
  type: "tool_use";
1656
1655
  name: string;
1656
+ id: string;
1657
1657
  input: Record<string, any>;
1658
1658
  cache_control?: {
1659
1659
  type: "ephemeral";
1660
1660
  } | undefined;
1661
1661
  } | {
1662
- content: string;
1663
1662
  type: "tool_result";
1663
+ content: string;
1664
1664
  tool_use_id: string;
1665
1665
  cache_control?: {
1666
1666
  type: "ephemeral";
@@ -1681,8 +1681,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1681
1681
  lastUserPromptIndex?: number | undefined;
1682
1682
  };
1683
1683
  toolResults: {
1684
- id: string;
1685
1684
  name: string;
1685
+ id: string;
1686
1686
  result: string;
1687
1687
  }[];
1688
1688
  prompt?: string | undefined;
@@ -1728,16 +1728,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1728
1728
  type: "ephemeral";
1729
1729
  } | undefined;
1730
1730
  } | {
1731
- id: string;
1732
1731
  type: "tool_use";
1733
1732
  name: string;
1733
+ id: string;
1734
1734
  input: Record<string, any>;
1735
1735
  cache_control?: {
1736
1736
  type: "ephemeral";
1737
1737
  } | undefined;
1738
1738
  } | {
1739
- content: string;
1740
1739
  type: "tool_result";
1740
+ content: string;
1741
1741
  tool_use_id: string;
1742
1742
  cache_control?: {
1743
1743
  type: "ephemeral";
@@ -1758,13 +1758,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1758
1758
  lastUserPromptIndex?: number | undefined;
1759
1759
  };
1760
1760
  toolResults: {
1761
- id: string;
1762
1761
  name: string;
1762
+ id: string;
1763
1763
  result: string;
1764
1764
  }[];
1765
1765
  prompt?: string | undefined;
1766
1766
  authToken?: string | undefined;
1767
- costMode?: "lite" | "normal" | "max" | undefined;
1767
+ costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
1768
1768
  }>, z.ZodObject<{
1769
1769
  type: z.ZodLiteral<"read-files-response">;
1770
1770
  files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
@@ -1974,7 +1974,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1974
1974
  type: "prompt";
1975
1975
  promptId: string;
1976
1976
  fingerprintId: string;
1977
- costMode: "lite" | "normal" | "max";
1977
+ costMode: "lite" | "normal" | "max" | "experimental";
1978
1978
  agentState: {
1979
1979
  agentContext: string;
1980
1980
  fileContext: {
@@ -2012,16 +2012,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2012
2012
  type: "ephemeral";
2013
2013
  } | undefined;
2014
2014
  } | {
2015
- id: string;
2016
2015
  type: "tool_use";
2017
2016
  name: string;
2017
+ id: string;
2018
2018
  input: Record<string, any>;
2019
2019
  cache_control?: {
2020
2020
  type: "ephemeral";
2021
2021
  } | undefined;
2022
2022
  } | {
2023
- content: string;
2024
2023
  type: "tool_result";
2024
+ content: string;
2025
2025
  tool_use_id: string;
2026
2026
  cache_control?: {
2027
2027
  type: "ephemeral";
@@ -2042,8 +2042,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2042
2042
  lastUserPromptIndex?: number | undefined;
2043
2043
  };
2044
2044
  toolResults: {
2045
- id: string;
2046
2045
  name: string;
2046
+ id: string;
2047
2047
  result: string;
2048
2048
  }[];
2049
2049
  prompt?: string | undefined;
@@ -2133,16 +2133,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2133
2133
  type: "ephemeral";
2134
2134
  } | undefined;
2135
2135
  } | {
2136
- id: string;
2137
2136
  type: "tool_use";
2138
2137
  name: string;
2138
+ id: string;
2139
2139
  input: Record<string, any>;
2140
2140
  cache_control?: {
2141
2141
  type: "ephemeral";
2142
2142
  } | undefined;
2143
2143
  } | {
2144
- content: string;
2145
2144
  type: "tool_result";
2145
+ content: string;
2146
2146
  tool_use_id: string;
2147
2147
  cache_control?: {
2148
2148
  type: "ephemeral";
@@ -2163,13 +2163,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2163
2163
  lastUserPromptIndex?: number | undefined;
2164
2164
  };
2165
2165
  toolResults: {
2166
- id: string;
2167
2166
  name: string;
2167
+ id: string;
2168
2168
  result: string;
2169
2169
  }[];
2170
2170
  prompt?: string | undefined;
2171
2171
  authToken?: string | undefined;
2172
- costMode?: "lite" | "normal" | "max" | undefined;
2172
+ costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
2173
2173
  } | {
2174
2174
  type: "read-files-response";
2175
2175
  files: Record<string, string | null>;
@@ -2255,26 +2255,26 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2255
2255
  path: z.ZodString;
2256
2256
  content: z.ZodString;
2257
2257
  }, "strip", z.ZodTypeAny, {
2258
+ type: "patch" | "file";
2258
2259
  path: string;
2259
2260
  content: string;
2260
- type: "patch" | "file";
2261
2261
  }, {
2262
+ type: "patch" | "file";
2262
2263
  path: string;
2263
2264
  content: string;
2264
- type: "patch" | "file";
2265
2265
  }>, "many">;
2266
2266
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
2267
2267
  type: z.ZodEnum<["patch", "file"]>;
2268
2268
  path: z.ZodString;
2269
2269
  content: z.ZodString;
2270
2270
  }, "strip", z.ZodTypeAny, {
2271
+ type: "patch" | "file";
2271
2272
  path: string;
2272
2273
  content: string;
2273
- type: "patch" | "file";
2274
2274
  }, {
2275
+ type: "patch" | "file";
2275
2276
  path: string;
2276
2277
  content: string;
2277
- type: "patch" | "file";
2278
2278
  }>, "many">;
2279
2279
  addedFileVersions: z.ZodArray<z.ZodObject<{
2280
2280
  path: z.ZodString;
@@ -2298,14 +2298,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2298
2298
  userInputId: string;
2299
2299
  response: string;
2300
2300
  changes: {
2301
+ type: "patch" | "file";
2301
2302
  path: string;
2302
2303
  content: string;
2303
- type: "patch" | "file";
2304
2304
  }[];
2305
2305
  changesAlreadyApplied: {
2306
+ type: "patch" | "file";
2306
2307
  path: string;
2307
2308
  content: string;
2308
- type: "patch" | "file";
2309
2309
  }[];
2310
2310
  addedFileVersions: {
2311
2311
  path: string;
@@ -2322,14 +2322,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2322
2322
  userInputId: string;
2323
2323
  response: string;
2324
2324
  changes: {
2325
+ type: "patch" | "file";
2325
2326
  path: string;
2326
2327
  content: string;
2327
- type: "patch" | "file";
2328
2328
  }[];
2329
2329
  changesAlreadyApplied: {
2330
+ type: "patch" | "file";
2330
2331
  path: string;
2331
2332
  content: string;
2332
- type: "patch" | "file";
2333
2333
  }[];
2334
2334
  addedFileVersions: {
2335
2335
  path: string;
@@ -2492,17 +2492,17 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2492
2492
  type: "ephemeral";
2493
2493
  }>>;
2494
2494
  }, "strip", z.ZodTypeAny, {
2495
- id: string;
2496
2495
  type: "tool_use";
2497
2496
  name: string;
2497
+ id: string;
2498
2498
  input: Record<string, any>;
2499
2499
  cache_control?: {
2500
2500
  type: "ephemeral";
2501
2501
  } | undefined;
2502
2502
  }, {
2503
- id: string;
2504
2503
  type: "tool_use";
2505
2504
  name: string;
2505
+ id: string;
2506
2506
  input: Record<string, any>;
2507
2507
  cache_control?: {
2508
2508
  type: "ephemeral";
@@ -2519,15 +2519,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2519
2519
  type: "ephemeral";
2520
2520
  }>>;
2521
2521
  }, "strip", z.ZodTypeAny, {
2522
- content: string;
2523
2522
  type: "tool_result";
2523
+ content: string;
2524
2524
  tool_use_id: string;
2525
2525
  cache_control?: {
2526
2526
  type: "ephemeral";
2527
2527
  } | undefined;
2528
2528
  }, {
2529
- content: string;
2530
2529
  type: "tool_result";
2530
+ content: string;
2531
2531
  tool_use_id: string;
2532
2532
  cache_control?: {
2533
2533
  type: "ephemeral";
@@ -2583,16 +2583,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2583
2583
  type: "ephemeral";
2584
2584
  } | undefined;
2585
2585
  } | {
2586
- id: string;
2587
2586
  type: "tool_use";
2588
2587
  name: string;
2588
+ id: string;
2589
2589
  input: Record<string, any>;
2590
2590
  cache_control?: {
2591
2591
  type: "ephemeral";
2592
2592
  } | undefined;
2593
2593
  } | {
2594
- content: string;
2595
2594
  type: "tool_result";
2595
+ content: string;
2596
2596
  tool_use_id: string;
2597
2597
  cache_control?: {
2598
2598
  type: "ephemeral";
@@ -2617,16 +2617,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2617
2617
  type: "ephemeral";
2618
2618
  } | undefined;
2619
2619
  } | {
2620
- id: string;
2621
2620
  type: "tool_use";
2622
2621
  name: string;
2622
+ id: string;
2623
2623
  input: Record<string, any>;
2624
2624
  cache_control?: {
2625
2625
  type: "ephemeral";
2626
2626
  } | undefined;
2627
2627
  } | {
2628
- content: string;
2629
2628
  type: "tool_result";
2629
+ content: string;
2630
2630
  tool_use_id: string;
2631
2631
  cache_control?: {
2632
2632
  type: "ephemeral";
@@ -2682,16 +2682,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2682
2682
  type: "ephemeral";
2683
2683
  } | undefined;
2684
2684
  } | {
2685
- id: string;
2686
2685
  type: "tool_use";
2687
2686
  name: string;
2687
+ id: string;
2688
2688
  input: Record<string, any>;
2689
2689
  cache_control?: {
2690
2690
  type: "ephemeral";
2691
2691
  } | undefined;
2692
2692
  } | {
2693
- content: string;
2694
2693
  type: "tool_result";
2694
+ content: string;
2695
2695
  tool_use_id: string;
2696
2696
  cache_control?: {
2697
2697
  type: "ephemeral";
@@ -2747,16 +2747,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2747
2747
  type: "ephemeral";
2748
2748
  } | undefined;
2749
2749
  } | {
2750
- id: string;
2751
2750
  type: "tool_use";
2752
2751
  name: string;
2752
+ id: string;
2753
2753
  input: Record<string, any>;
2754
2754
  cache_control?: {
2755
2755
  type: "ephemeral";
2756
2756
  } | undefined;
2757
2757
  } | {
2758
- content: string;
2759
2758
  type: "tool_result";
2759
+ content: string;
2760
2760
  tool_use_id: string;
2761
2761
  cache_control?: {
2762
2762
  type: "ephemeral";
@@ -2781,12 +2781,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2781
2781
  parameters: z.ZodRecord<z.ZodString, z.ZodString>;
2782
2782
  id: z.ZodString;
2783
2783
  }, "strip", z.ZodTypeAny, {
2784
- id: string;
2785
2784
  name: string;
2785
+ id: string;
2786
2786
  parameters: Record<string, string>;
2787
2787
  }, {
2788
- id: string;
2789
2788
  name: string;
2789
+ id: string;
2790
2790
  parameters: Record<string, string>;
2791
2791
  }>, "many">;
2792
2792
  toolResults: z.ZodArray<z.ZodObject<{
@@ -2794,12 +2794,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2794
2794
  result: z.ZodString;
2795
2795
  id: z.ZodString;
2796
2796
  }, "strip", z.ZodTypeAny, {
2797
- id: string;
2798
2797
  name: string;
2798
+ id: string;
2799
2799
  result: string;
2800
2800
  }, {
2801
- id: string;
2802
2801
  name: string;
2802
+ id: string;
2803
2803
  result: string;
2804
2804
  }>, "many">;
2805
2805
  }, "strip", z.ZodTypeAny, {
@@ -2842,16 +2842,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2842
2842
  type: "ephemeral";
2843
2843
  } | undefined;
2844
2844
  } | {
2845
- id: string;
2846
2845
  type: "tool_use";
2847
2846
  name: string;
2847
+ id: string;
2848
2848
  input: Record<string, any>;
2849
2849
  cache_control?: {
2850
2850
  type: "ephemeral";
2851
2851
  } | undefined;
2852
2852
  } | {
2853
- content: string;
2854
2853
  type: "tool_result";
2854
+ content: string;
2855
2855
  tool_use_id: string;
2856
2856
  cache_control?: {
2857
2857
  type: "ephemeral";
@@ -2872,13 +2872,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2872
2872
  lastUserPromptIndex?: number | undefined;
2873
2873
  };
2874
2874
  toolResults: {
2875
- id: string;
2876
2875
  name: string;
2876
+ id: string;
2877
2877
  result: string;
2878
2878
  }[];
2879
2879
  toolCalls: {
2880
- id: string;
2881
2880
  name: string;
2881
+ id: string;
2882
2882
  parameters: Record<string, string>;
2883
2883
  }[];
2884
2884
  }, {
@@ -2921,16 +2921,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2921
2921
  type: "ephemeral";
2922
2922
  } | undefined;
2923
2923
  } | {
2924
- id: string;
2925
2924
  type: "tool_use";
2926
2925
  name: string;
2926
+ id: string;
2927
2927
  input: Record<string, any>;
2928
2928
  cache_control?: {
2929
2929
  type: "ephemeral";
2930
2930
  } | undefined;
2931
2931
  } | {
2932
- content: string;
2933
2932
  type: "tool_result";
2933
+ content: string;
2934
2934
  tool_use_id: string;
2935
2935
  cache_control?: {
2936
2936
  type: "ephemeral";
@@ -2951,13 +2951,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2951
2951
  lastUserPromptIndex?: number | undefined;
2952
2952
  };
2953
2953
  toolResults: {
2954
- id: string;
2955
2954
  name: string;
2955
+ id: string;
2956
2956
  result: string;
2957
2957
  }[];
2958
2958
  toolCalls: {
2959
- id: string;
2960
2959
  name: string;
2960
+ id: string;
2961
2961
  parameters: Record<string, string>;
2962
2962
  }[];
2963
2963
  }>, z.ZodObject<{
@@ -2981,12 +2981,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2981
2981
  id: z.ZodString;
2982
2982
  input: z.ZodRecord<z.ZodString, z.ZodAny>;
2983
2983
  }, "strip", z.ZodTypeAny, {
2984
- id: string;
2985
2984
  name: string;
2985
+ id: string;
2986
2986
  input: Record<string, any>;
2987
2987
  }, {
2988
- id: string;
2989
2988
  name: string;
2989
+ id: string;
2990
2990
  input: Record<string, any>;
2991
2991
  }>;
2992
2992
  changes: z.ZodArray<z.ZodObject<{
@@ -2994,26 +2994,26 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
2994
2994
  path: z.ZodString;
2995
2995
  content: z.ZodString;
2996
2996
  }, "strip", z.ZodTypeAny, {
2997
+ type: "patch" | "file";
2997
2998
  path: string;
2998
2999
  content: string;
2999
- type: "patch" | "file";
3000
3000
  }, {
3001
+ type: "patch" | "file";
3001
3002
  path: string;
3002
3003
  content: string;
3003
- type: "patch" | "file";
3004
3004
  }>, "many">;
3005
3005
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
3006
3006
  type: z.ZodEnum<["patch", "file"]>;
3007
3007
  path: z.ZodString;
3008
3008
  content: z.ZodString;
3009
3009
  }, "strip", z.ZodTypeAny, {
3010
+ type: "patch" | "file";
3010
3011
  path: string;
3011
3012
  content: string;
3012
- type: "patch" | "file";
3013
3013
  }, {
3014
+ type: "patch" | "file";
3014
3015
  path: string;
3015
3016
  content: string;
3016
- type: "patch" | "file";
3017
3017
  }>, "many">;
3018
3018
  addedFileVersions: z.ZodArray<z.ZodObject<{
3019
3019
  path: z.ZodString;
@@ -3029,21 +3029,21 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3029
3029
  }, "strip", z.ZodTypeAny, {
3030
3030
  type: "tool-call";
3031
3031
  data: {
3032
- id: string;
3033
3032
  name: string;
3033
+ id: string;
3034
3034
  input: Record<string, any>;
3035
3035
  };
3036
3036
  userInputId: string;
3037
3037
  response: string;
3038
3038
  changes: {
3039
+ type: "patch" | "file";
3039
3040
  path: string;
3040
3041
  content: string;
3041
- type: "patch" | "file";
3042
3042
  }[];
3043
3043
  changesAlreadyApplied: {
3044
+ type: "patch" | "file";
3044
3045
  path: string;
3045
3046
  content: string;
3046
- type: "patch" | "file";
3047
3047
  }[];
3048
3048
  addedFileVersions: {
3049
3049
  path: string;
@@ -3053,21 +3053,21 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3053
3053
  }, {
3054
3054
  type: "tool-call";
3055
3055
  data: {
3056
- id: string;
3057
3056
  name: string;
3057
+ id: string;
3058
3058
  input: Record<string, any>;
3059
3059
  };
3060
3060
  userInputId: string;
3061
3061
  response: string;
3062
3062
  changes: {
3063
+ type: "patch" | "file";
3063
3064
  path: string;
3064
3065
  content: string;
3065
- type: "patch" | "file";
3066
3066
  }[];
3067
3067
  changesAlreadyApplied: {
3068
+ type: "patch" | "file";
3068
3069
  path: string;
3069
3070
  content: string;
3070
- type: "patch" | "file";
3071
3071
  }[];
3072
3072
  addedFileVersions: {
3073
3073
  path: string;
@@ -3194,14 +3194,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3194
3194
  userInputId: string;
3195
3195
  response: string;
3196
3196
  changes: {
3197
+ type: "patch" | "file";
3197
3198
  path: string;
3198
3199
  content: string;
3199
- type: "patch" | "file";
3200
3200
  }[];
3201
3201
  changesAlreadyApplied: {
3202
+ type: "patch" | "file";
3202
3203
  path: string;
3203
3204
  content: string;
3204
- type: "patch" | "file";
3205
3205
  }[];
3206
3206
  addedFileVersions: {
3207
3207
  path: string;
@@ -3257,16 +3257,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3257
3257
  type: "ephemeral";
3258
3258
  } | undefined;
3259
3259
  } | {
3260
- id: string;
3261
3260
  type: "tool_use";
3262
3261
  name: string;
3262
+ id: string;
3263
3263
  input: Record<string, any>;
3264
3264
  cache_control?: {
3265
3265
  type: "ephemeral";
3266
3266
  } | undefined;
3267
3267
  } | {
3268
- content: string;
3269
3268
  type: "tool_result";
3269
+ content: string;
3270
3270
  tool_use_id: string;
3271
3271
  cache_control?: {
3272
3272
  type: "ephemeral";
@@ -3287,13 +3287,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3287
3287
  lastUserPromptIndex?: number | undefined;
3288
3288
  };
3289
3289
  toolResults: {
3290
- id: string;
3291
3290
  name: string;
3291
+ id: string;
3292
3292
  result: string;
3293
3293
  }[];
3294
3294
  toolCalls: {
3295
- id: string;
3296
3295
  name: string;
3296
+ id: string;
3297
3297
  parameters: Record<string, string>;
3298
3298
  }[];
3299
3299
  } | {
@@ -3307,21 +3307,21 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3307
3307
  } | {
3308
3308
  type: "tool-call";
3309
3309
  data: {
3310
- id: string;
3311
3310
  name: string;
3311
+ id: string;
3312
3312
  input: Record<string, any>;
3313
3313
  };
3314
3314
  userInputId: string;
3315
3315
  response: string;
3316
3316
  changes: {
3317
+ type: "patch" | "file";
3317
3318
  path: string;
3318
3319
  content: string;
3319
- type: "patch" | "file";
3320
3320
  }[];
3321
3321
  changesAlreadyApplied: {
3322
+ type: "patch" | "file";
3322
3323
  path: string;
3323
3324
  content: string;
3324
- type: "patch" | "file";
3325
3325
  }[];
3326
3326
  addedFileVersions: {
3327
3327
  path: string;
@@ -3364,14 +3364,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3364
3364
  userInputId: string;
3365
3365
  response: string;
3366
3366
  changes: {
3367
+ type: "patch" | "file";
3367
3368
  path: string;
3368
3369
  content: string;
3369
- type: "patch" | "file";
3370
3370
  }[];
3371
3371
  changesAlreadyApplied: {
3372
+ type: "patch" | "file";
3372
3373
  path: string;
3373
3374
  content: string;
3374
- type: "patch" | "file";
3375
3375
  }[];
3376
3376
  addedFileVersions: {
3377
3377
  path: string;
@@ -3427,16 +3427,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3427
3427
  type: "ephemeral";
3428
3428
  } | undefined;
3429
3429
  } | {
3430
- id: string;
3431
3430
  type: "tool_use";
3432
3431
  name: string;
3432
+ id: string;
3433
3433
  input: Record<string, any>;
3434
3434
  cache_control?: {
3435
3435
  type: "ephemeral";
3436
3436
  } | undefined;
3437
3437
  } | {
3438
- content: string;
3439
3438
  type: "tool_result";
3439
+ content: string;
3440
3440
  tool_use_id: string;
3441
3441
  cache_control?: {
3442
3442
  type: "ephemeral";
@@ -3457,13 +3457,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3457
3457
  lastUserPromptIndex?: number | undefined;
3458
3458
  };
3459
3459
  toolResults: {
3460
- id: string;
3461
3460
  name: string;
3461
+ id: string;
3462
3462
  result: string;
3463
3463
  }[];
3464
3464
  toolCalls: {
3465
- id: string;
3466
3465
  name: string;
3466
+ id: string;
3467
3467
  parameters: Record<string, string>;
3468
3468
  }[];
3469
3469
  } | {
@@ -3477,21 +3477,21 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3477
3477
  } | {
3478
3478
  type: "tool-call";
3479
3479
  data: {
3480
- id: string;
3481
3480
  name: string;
3481
+ id: string;
3482
3482
  input: Record<string, any>;
3483
3483
  };
3484
3484
  userInputId: string;
3485
3485
  response: string;
3486
3486
  changes: {
3487
+ type: "patch" | "file";
3487
3488
  path: string;
3488
3489
  content: string;
3489
- type: "patch" | "file";
3490
3490
  }[];
3491
3491
  changesAlreadyApplied: {
3492
+ type: "patch" | "file";
3492
3493
  path: string;
3493
3494
  content: string;
3494
- type: "patch" | "file";
3495
3495
  }[];
3496
3496
  addedFileVersions: {
3497
3497
  path: string;
@@ -3553,26 +3553,26 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3553
3553
  path: z.ZodString;
3554
3554
  content: z.ZodString;
3555
3555
  }, "strip", z.ZodTypeAny, {
3556
+ type: "patch" | "file";
3556
3557
  path: string;
3557
3558
  content: string;
3558
- type: "patch" | "file";
3559
3559
  }, {
3560
+ type: "patch" | "file";
3560
3561
  path: string;
3561
3562
  content: string;
3562
- type: "patch" | "file";
3563
3563
  }>, "many">;
3564
3564
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
3565
3565
  type: z.ZodEnum<["patch", "file"]>;
3566
3566
  path: z.ZodString;
3567
3567
  content: z.ZodString;
3568
3568
  }, "strip", z.ZodTypeAny, {
3569
+ type: "patch" | "file";
3569
3570
  path: string;
3570
3571
  content: string;
3571
- type: "patch" | "file";
3572
3572
  }, {
3573
+ type: "patch" | "file";
3573
3574
  path: string;
3574
3575
  content: string;
3575
- type: "patch" | "file";
3576
3576
  }>, "many">;
3577
3577
  addedFileVersions: z.ZodArray<z.ZodObject<{
3578
3578
  path: z.ZodString;
@@ -3596,14 +3596,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3596
3596
  userInputId: string;
3597
3597
  response: string;
3598
3598
  changes: {
3599
+ type: "patch" | "file";
3599
3600
  path: string;
3600
3601
  content: string;
3601
- type: "patch" | "file";
3602
3602
  }[];
3603
3603
  changesAlreadyApplied: {
3604
+ type: "patch" | "file";
3604
3605
  path: string;
3605
3606
  content: string;
3606
- type: "patch" | "file";
3607
3607
  }[];
3608
3608
  addedFileVersions: {
3609
3609
  path: string;
@@ -3620,14 +3620,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3620
3620
  userInputId: string;
3621
3621
  response: string;
3622
3622
  changes: {
3623
+ type: "patch" | "file";
3623
3624
  path: string;
3624
3625
  content: string;
3625
- type: "patch" | "file";
3626
3626
  }[];
3627
3627
  changesAlreadyApplied: {
3628
+ type: "patch" | "file";
3628
3629
  path: string;
3629
3630
  content: string;
3630
- type: "patch" | "file";
3631
3631
  }[];
3632
3632
  addedFileVersions: {
3633
3633
  path: string;
@@ -3790,17 +3790,17 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3790
3790
  type: "ephemeral";
3791
3791
  }>>;
3792
3792
  }, "strip", z.ZodTypeAny, {
3793
- id: string;
3794
3793
  type: "tool_use";
3795
3794
  name: string;
3795
+ id: string;
3796
3796
  input: Record<string, any>;
3797
3797
  cache_control?: {
3798
3798
  type: "ephemeral";
3799
3799
  } | undefined;
3800
3800
  }, {
3801
- id: string;
3802
3801
  type: "tool_use";
3803
3802
  name: string;
3803
+ id: string;
3804
3804
  input: Record<string, any>;
3805
3805
  cache_control?: {
3806
3806
  type: "ephemeral";
@@ -3817,15 +3817,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3817
3817
  type: "ephemeral";
3818
3818
  }>>;
3819
3819
  }, "strip", z.ZodTypeAny, {
3820
- content: string;
3821
3820
  type: "tool_result";
3821
+ content: string;
3822
3822
  tool_use_id: string;
3823
3823
  cache_control?: {
3824
3824
  type: "ephemeral";
3825
3825
  } | undefined;
3826
3826
  }, {
3827
- content: string;
3828
3827
  type: "tool_result";
3828
+ content: string;
3829
3829
  tool_use_id: string;
3830
3830
  cache_control?: {
3831
3831
  type: "ephemeral";
@@ -3881,16 +3881,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3881
3881
  type: "ephemeral";
3882
3882
  } | undefined;
3883
3883
  } | {
3884
- id: string;
3885
3884
  type: "tool_use";
3886
3885
  name: string;
3886
+ id: string;
3887
3887
  input: Record<string, any>;
3888
3888
  cache_control?: {
3889
3889
  type: "ephemeral";
3890
3890
  } | undefined;
3891
3891
  } | {
3892
- content: string;
3893
3892
  type: "tool_result";
3893
+ content: string;
3894
3894
  tool_use_id: string;
3895
3895
  cache_control?: {
3896
3896
  type: "ephemeral";
@@ -3915,16 +3915,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3915
3915
  type: "ephemeral";
3916
3916
  } | undefined;
3917
3917
  } | {
3918
- id: string;
3919
3918
  type: "tool_use";
3920
3919
  name: string;
3920
+ id: string;
3921
3921
  input: Record<string, any>;
3922
3922
  cache_control?: {
3923
3923
  type: "ephemeral";
3924
3924
  } | undefined;
3925
3925
  } | {
3926
- content: string;
3927
3926
  type: "tool_result";
3927
+ content: string;
3928
3928
  tool_use_id: string;
3929
3929
  cache_control?: {
3930
3930
  type: "ephemeral";
@@ -3980,16 +3980,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3980
3980
  type: "ephemeral";
3981
3981
  } | undefined;
3982
3982
  } | {
3983
- id: string;
3984
3983
  type: "tool_use";
3985
3984
  name: string;
3985
+ id: string;
3986
3986
  input: Record<string, any>;
3987
3987
  cache_control?: {
3988
3988
  type: "ephemeral";
3989
3989
  } | undefined;
3990
3990
  } | {
3991
- content: string;
3992
3991
  type: "tool_result";
3992
+ content: string;
3993
3993
  tool_use_id: string;
3994
3994
  cache_control?: {
3995
3995
  type: "ephemeral";
@@ -4045,16 +4045,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4045
4045
  type: "ephemeral";
4046
4046
  } | undefined;
4047
4047
  } | {
4048
- id: string;
4049
4048
  type: "tool_use";
4050
4049
  name: string;
4050
+ id: string;
4051
4051
  input: Record<string, any>;
4052
4052
  cache_control?: {
4053
4053
  type: "ephemeral";
4054
4054
  } | undefined;
4055
4055
  } | {
4056
- content: string;
4057
4056
  type: "tool_result";
4057
+ content: string;
4058
4058
  tool_use_id: string;
4059
4059
  cache_control?: {
4060
4060
  type: "ephemeral";
@@ -4079,12 +4079,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4079
4079
  parameters: z.ZodRecord<z.ZodString, z.ZodString>;
4080
4080
  id: z.ZodString;
4081
4081
  }, "strip", z.ZodTypeAny, {
4082
- id: string;
4083
4082
  name: string;
4083
+ id: string;
4084
4084
  parameters: Record<string, string>;
4085
4085
  }, {
4086
- id: string;
4087
4086
  name: string;
4087
+ id: string;
4088
4088
  parameters: Record<string, string>;
4089
4089
  }>, "many">;
4090
4090
  toolResults: z.ZodArray<z.ZodObject<{
@@ -4092,12 +4092,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4092
4092
  result: z.ZodString;
4093
4093
  id: z.ZodString;
4094
4094
  }, "strip", z.ZodTypeAny, {
4095
- id: string;
4096
4095
  name: string;
4096
+ id: string;
4097
4097
  result: string;
4098
4098
  }, {
4099
- id: string;
4100
4099
  name: string;
4100
+ id: string;
4101
4101
  result: string;
4102
4102
  }>, "many">;
4103
4103
  }, "strip", z.ZodTypeAny, {
@@ -4140,16 +4140,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4140
4140
  type: "ephemeral";
4141
4141
  } | undefined;
4142
4142
  } | {
4143
- id: string;
4144
4143
  type: "tool_use";
4145
4144
  name: string;
4145
+ id: string;
4146
4146
  input: Record<string, any>;
4147
4147
  cache_control?: {
4148
4148
  type: "ephemeral";
4149
4149
  } | undefined;
4150
4150
  } | {
4151
- content: string;
4152
4151
  type: "tool_result";
4152
+ content: string;
4153
4153
  tool_use_id: string;
4154
4154
  cache_control?: {
4155
4155
  type: "ephemeral";
@@ -4170,13 +4170,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4170
4170
  lastUserPromptIndex?: number | undefined;
4171
4171
  };
4172
4172
  toolResults: {
4173
- id: string;
4174
4173
  name: string;
4174
+ id: string;
4175
4175
  result: string;
4176
4176
  }[];
4177
4177
  toolCalls: {
4178
- id: string;
4179
4178
  name: string;
4179
+ id: string;
4180
4180
  parameters: Record<string, string>;
4181
4181
  }[];
4182
4182
  }, {
@@ -4219,16 +4219,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4219
4219
  type: "ephemeral";
4220
4220
  } | undefined;
4221
4221
  } | {
4222
- id: string;
4223
4222
  type: "tool_use";
4224
4223
  name: string;
4224
+ id: string;
4225
4225
  input: Record<string, any>;
4226
4226
  cache_control?: {
4227
4227
  type: "ephemeral";
4228
4228
  } | undefined;
4229
4229
  } | {
4230
- content: string;
4231
4230
  type: "tool_result";
4231
+ content: string;
4232
4232
  tool_use_id: string;
4233
4233
  cache_control?: {
4234
4234
  type: "ephemeral";
@@ -4249,13 +4249,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4249
4249
  lastUserPromptIndex?: number | undefined;
4250
4250
  };
4251
4251
  toolResults: {
4252
- id: string;
4253
4252
  name: string;
4253
+ id: string;
4254
4254
  result: string;
4255
4255
  }[];
4256
4256
  toolCalls: {
4257
- id: string;
4258
4257
  name: string;
4258
+ id: string;
4259
4259
  parameters: Record<string, string>;
4260
4260
  }[];
4261
4261
  }>, z.ZodObject<{
@@ -4279,12 +4279,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4279
4279
  id: z.ZodString;
4280
4280
  input: z.ZodRecord<z.ZodString, z.ZodAny>;
4281
4281
  }, "strip", z.ZodTypeAny, {
4282
- id: string;
4283
4282
  name: string;
4283
+ id: string;
4284
4284
  input: Record<string, any>;
4285
4285
  }, {
4286
- id: string;
4287
4286
  name: string;
4287
+ id: string;
4288
4288
  input: Record<string, any>;
4289
4289
  }>;
4290
4290
  changes: z.ZodArray<z.ZodObject<{
@@ -4292,26 +4292,26 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4292
4292
  path: z.ZodString;
4293
4293
  content: z.ZodString;
4294
4294
  }, "strip", z.ZodTypeAny, {
4295
+ type: "patch" | "file";
4295
4296
  path: string;
4296
4297
  content: string;
4297
- type: "patch" | "file";
4298
4298
  }, {
4299
+ type: "patch" | "file";
4299
4300
  path: string;
4300
4301
  content: string;
4301
- type: "patch" | "file";
4302
4302
  }>, "many">;
4303
4303
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
4304
4304
  type: z.ZodEnum<["patch", "file"]>;
4305
4305
  path: z.ZodString;
4306
4306
  content: z.ZodString;
4307
4307
  }, "strip", z.ZodTypeAny, {
4308
+ type: "patch" | "file";
4308
4309
  path: string;
4309
4310
  content: string;
4310
- type: "patch" | "file";
4311
4311
  }, {
4312
+ type: "patch" | "file";
4312
4313
  path: string;
4313
4314
  content: string;
4314
- type: "patch" | "file";
4315
4315
  }>, "many">;
4316
4316
  addedFileVersions: z.ZodArray<z.ZodObject<{
4317
4317
  path: z.ZodString;
@@ -4327,21 +4327,21 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4327
4327
  }, "strip", z.ZodTypeAny, {
4328
4328
  type: "tool-call";
4329
4329
  data: {
4330
- id: string;
4331
4330
  name: string;
4331
+ id: string;
4332
4332
  input: Record<string, any>;
4333
4333
  };
4334
4334
  userInputId: string;
4335
4335
  response: string;
4336
4336
  changes: {
4337
+ type: "patch" | "file";
4337
4338
  path: string;
4338
4339
  content: string;
4339
- type: "patch" | "file";
4340
4340
  }[];
4341
4341
  changesAlreadyApplied: {
4342
+ type: "patch" | "file";
4342
4343
  path: string;
4343
4344
  content: string;
4344
- type: "patch" | "file";
4345
4345
  }[];
4346
4346
  addedFileVersions: {
4347
4347
  path: string;
@@ -4351,21 +4351,21 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4351
4351
  }, {
4352
4352
  type: "tool-call";
4353
4353
  data: {
4354
- id: string;
4355
4354
  name: string;
4355
+ id: string;
4356
4356
  input: Record<string, any>;
4357
4357
  };
4358
4358
  userInputId: string;
4359
4359
  response: string;
4360
4360
  changes: {
4361
+ type: "patch" | "file";
4361
4362
  path: string;
4362
4363
  content: string;
4363
- type: "patch" | "file";
4364
4364
  }[];
4365
4365
  changesAlreadyApplied: {
4366
+ type: "patch" | "file";
4366
4367
  path: string;
4367
4368
  content: string;
4368
- type: "patch" | "file";
4369
4369
  }[];
4370
4370
  addedFileVersions: {
4371
4371
  path: string;
@@ -4492,14 +4492,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4492
4492
  userInputId: string;
4493
4493
  response: string;
4494
4494
  changes: {
4495
+ type: "patch" | "file";
4495
4496
  path: string;
4496
4497
  content: string;
4497
- type: "patch" | "file";
4498
4498
  }[];
4499
4499
  changesAlreadyApplied: {
4500
+ type: "patch" | "file";
4500
4501
  path: string;
4501
4502
  content: string;
4502
- type: "patch" | "file";
4503
4503
  }[];
4504
4504
  addedFileVersions: {
4505
4505
  path: string;
@@ -4555,16 +4555,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4555
4555
  type: "ephemeral";
4556
4556
  } | undefined;
4557
4557
  } | {
4558
- id: string;
4559
4558
  type: "tool_use";
4560
4559
  name: string;
4560
+ id: string;
4561
4561
  input: Record<string, any>;
4562
4562
  cache_control?: {
4563
4563
  type: "ephemeral";
4564
4564
  } | undefined;
4565
4565
  } | {
4566
- content: string;
4567
4566
  type: "tool_result";
4567
+ content: string;
4568
4568
  tool_use_id: string;
4569
4569
  cache_control?: {
4570
4570
  type: "ephemeral";
@@ -4585,13 +4585,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4585
4585
  lastUserPromptIndex?: number | undefined;
4586
4586
  };
4587
4587
  toolResults: {
4588
- id: string;
4589
4588
  name: string;
4589
+ id: string;
4590
4590
  result: string;
4591
4591
  }[];
4592
4592
  toolCalls: {
4593
- id: string;
4594
4593
  name: string;
4594
+ id: string;
4595
4595
  parameters: Record<string, string>;
4596
4596
  }[];
4597
4597
  } | {
@@ -4605,21 +4605,21 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4605
4605
  } | {
4606
4606
  type: "tool-call";
4607
4607
  data: {
4608
- id: string;
4609
4608
  name: string;
4609
+ id: string;
4610
4610
  input: Record<string, any>;
4611
4611
  };
4612
4612
  userInputId: string;
4613
4613
  response: string;
4614
4614
  changes: {
4615
+ type: "patch" | "file";
4615
4616
  path: string;
4616
4617
  content: string;
4617
- type: "patch" | "file";
4618
4618
  }[];
4619
4619
  changesAlreadyApplied: {
4620
+ type: "patch" | "file";
4620
4621
  path: string;
4621
4622
  content: string;
4622
- type: "patch" | "file";
4623
4623
  }[];
4624
4624
  addedFileVersions: {
4625
4625
  path: string;
@@ -4662,14 +4662,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4662
4662
  userInputId: string;
4663
4663
  response: string;
4664
4664
  changes: {
4665
+ type: "patch" | "file";
4665
4666
  path: string;
4666
4667
  content: string;
4667
- type: "patch" | "file";
4668
4668
  }[];
4669
4669
  changesAlreadyApplied: {
4670
+ type: "patch" | "file";
4670
4671
  path: string;
4671
4672
  content: string;
4672
- type: "patch" | "file";
4673
4673
  }[];
4674
4674
  addedFileVersions: {
4675
4675
  path: string;
@@ -4725,16 +4725,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4725
4725
  type: "ephemeral";
4726
4726
  } | undefined;
4727
4727
  } | {
4728
- id: string;
4729
4728
  type: "tool_use";
4730
4729
  name: string;
4730
+ id: string;
4731
4731
  input: Record<string, any>;
4732
4732
  cache_control?: {
4733
4733
  type: "ephemeral";
4734
4734
  } | undefined;
4735
4735
  } | {
4736
- content: string;
4737
4736
  type: "tool_result";
4737
+ content: string;
4738
4738
  tool_use_id: string;
4739
4739
  cache_control?: {
4740
4740
  type: "ephemeral";
@@ -4755,13 +4755,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4755
4755
  lastUserPromptIndex?: number | undefined;
4756
4756
  };
4757
4757
  toolResults: {
4758
- id: string;
4759
4758
  name: string;
4759
+ id: string;
4760
4760
  result: string;
4761
4761
  }[];
4762
4762
  toolCalls: {
4763
- id: string;
4764
4763
  name: string;
4764
+ id: string;
4765
4765
  parameters: Record<string, string>;
4766
4766
  }[];
4767
4767
  } | {
@@ -4775,21 +4775,21 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4775
4775
  } | {
4776
4776
  type: "tool-call";
4777
4777
  data: {
4778
- id: string;
4779
4778
  name: string;
4779
+ id: string;
4780
4780
  input: Record<string, any>;
4781
4781
  };
4782
4782
  userInputId: string;
4783
4783
  response: string;
4784
4784
  changes: {
4785
+ type: "patch" | "file";
4785
4786
  path: string;
4786
4787
  content: string;
4787
- type: "patch" | "file";
4788
4788
  }[];
4789
4789
  changesAlreadyApplied: {
4790
+ type: "patch" | "file";
4790
4791
  path: string;
4791
4792
  content: string;
4792
- type: "patch" | "file";
4793
4793
  }[];
4794
4794
  addedFileVersions: {
4795
4795
  path: string;