codebuff 1.0.174 → 1.0.176

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 (57) hide show
  1. package/dist/checkpoint-file-manager.d.ts +17 -5
  2. package/dist/checkpoint-file-manager.js +115 -77
  3. package/dist/checkpoint-file-manager.js.map +1 -1
  4. package/dist/checkpoints.d.ts +3 -2
  5. package/dist/checkpoints.js +20 -32
  6. package/dist/checkpoints.js.map +1 -1
  7. package/dist/cli.d.ts +0 -1
  8. package/dist/cli.js +24 -49
  9. package/dist/cli.js.map +1 -1
  10. package/dist/client.d.ts +13 -12
  11. package/dist/client.js +8 -1
  12. package/dist/client.js.map +1 -1
  13. package/dist/common/actions.d.ts +182 -182
  14. package/dist/common/browser-actions.d.ts +44 -44
  15. package/dist/common/constants.d.ts +0 -1
  16. package/dist/common/constants.js +1 -44
  17. package/dist/common/constants.js.map +1 -1
  18. package/dist/common/logger.d.ts +1 -0
  19. package/dist/common/logger.js +7 -0
  20. package/dist/common/logger.js.map +1 -0
  21. package/dist/common/project-file-tree.d.ts +1 -0
  22. package/dist/common/project-file-tree.js +3 -1
  23. package/dist/common/project-file-tree.js.map +1 -1
  24. package/dist/common/types/agent-state.d.ts +26 -26
  25. package/dist/common/types/message.d.ts +14 -14
  26. package/dist/common/types/usage.d.ts +2 -2
  27. package/dist/common/util/constants.d.ts +1 -0
  28. package/dist/common/util/constants.js +7 -0
  29. package/dist/common/util/constants.js.map +1 -0
  30. package/dist/common/util/credentials.d.ts +2 -2
  31. package/dist/common/util/helpers.d.ts +1 -0
  32. package/dist/common/util/helpers.js +6 -0
  33. package/dist/common/util/helpers.js.map +1 -0
  34. package/dist/common/util/token-counter.d.ts +3 -0
  35. package/dist/common/util/token-counter.js +27 -0
  36. package/dist/common/util/token-counter.js.map +1 -0
  37. package/dist/common/websockets/websocket-schema.d.ts +364 -364
  38. package/dist/index.js +1 -1
  39. package/dist/tool-handlers.d.ts +2 -1
  40. package/dist/tool-handlers.js +3 -3
  41. package/dist/tool-handlers.js.map +1 -1
  42. package/dist/utils/terminal.js +4 -40
  43. package/dist/utils/terminal.js.map +1 -1
  44. package/dist/utils/tool-renderers.js +14 -2
  45. package/dist/utils/tool-renderers.js.map +1 -1
  46. package/dist/worker-script-project-context.js +4 -4
  47. package/dist/worker-script-project-context.js.map +1 -1
  48. package/package.json +1 -1
  49. package/dist/common/advanced-analyzer.d.ts +0 -19
  50. package/dist/common/advanced-analyzer.js +0 -140
  51. package/dist/common/advanced-analyzer.js.map +0 -1
  52. package/dist/common/message-image-handling.d.ts +0 -41
  53. package/dist/common/message-image-handling.js +0 -57
  54. package/dist/common/message-image-handling.js.map +0 -1
  55. package/dist/common/util/process-stream.d.ts +0 -8
  56. package/dist/common/util/process-stream.js +0 -102
  57. package/dist/common/util/process-stream.js.map +0 -1
@@ -95,16 +95,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
95
95
  }>>;
96
96
  }, "strip", z.ZodTypeAny, {
97
97
  type: "tool_use";
98
- id: string;
99
98
  name: string;
99
+ id: string;
100
100
  input: Record<string, any>;
101
101
  cache_control?: {
102
102
  type: "ephemeral";
103
103
  } | undefined;
104
104
  }, {
105
105
  type: "tool_use";
106
- id: string;
107
106
  name: string;
107
+ id: string;
108
108
  input: Record<string, any>;
109
109
  cache_control?: {
110
110
  type: "ephemeral";
@@ -121,15 +121,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
121
121
  type: "ephemeral";
122
122
  }>>;
123
123
  }, "strip", z.ZodTypeAny, {
124
- type: "tool_result";
125
124
  content: string;
125
+ type: "tool_result";
126
126
  tool_use_id: string;
127
127
  cache_control?: {
128
128
  type: "ephemeral";
129
129
  } | undefined;
130
130
  }, {
131
- type: "tool_result";
132
131
  content: string;
132
+ type: "tool_result";
133
133
  tool_use_id: string;
134
134
  cache_control?: {
135
135
  type: "ephemeral";
@@ -178,7 +178,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
178
178
  } | undefined;
179
179
  }>]>, "many">]>;
180
180
  }, "strip", z.ZodTypeAny, {
181
- role: "user" | "assistant";
182
181
  content: string | ({
183
182
  type: "text";
184
183
  text: string;
@@ -187,15 +186,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
187
186
  } | undefined;
188
187
  } | {
189
188
  type: "tool_use";
190
- id: string;
191
189
  name: string;
190
+ id: string;
192
191
  input: Record<string, any>;
193
192
  cache_control?: {
194
193
  type: "ephemeral";
195
194
  } | undefined;
196
195
  } | {
197
- type: "tool_result";
198
196
  content: string;
197
+ type: "tool_result";
199
198
  tool_use_id: string;
200
199
  cache_control?: {
201
200
  type: "ephemeral";
@@ -211,8 +210,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
211
210
  type: "ephemeral";
212
211
  } | undefined;
213
212
  })[];
214
- }, {
215
213
  role: "user" | "assistant";
214
+ }, {
216
215
  content: string | ({
217
216
  type: "text";
218
217
  text: string;
@@ -221,15 +220,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
221
220
  } | undefined;
222
221
  } | {
223
222
  type: "tool_use";
224
- id: string;
225
223
  name: string;
224
+ id: string;
226
225
  input: Record<string, any>;
227
226
  cache_control?: {
228
227
  type: "ephemeral";
229
228
  } | undefined;
230
229
  } | {
231
- type: "tool_result";
232
230
  content: string;
231
+ type: "tool_result";
233
232
  tool_use_id: string;
234
233
  cache_control?: {
235
234
  type: "ephemeral";
@@ -245,6 +244,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
245
244
  type: "ephemeral";
246
245
  } | undefined;
247
246
  })[];
247
+ role: "user" | "assistant";
248
248
  }>, "many">;
249
249
  fileContext: z.ZodObject<{
250
250
  currentWorkingDirectory: z.ZodString;
@@ -258,13 +258,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
258
258
  diffCached: z.ZodString;
259
259
  lastCommitMessages: z.ZodString;
260
260
  }, "strip", z.ZodTypeAny, {
261
- diff: string;
262
261
  status: string;
262
+ diff: string;
263
263
  diffCached: string;
264
264
  lastCommitMessages: string;
265
265
  }, {
266
- diff: string;
267
266
  status: string;
267
+ diff: string;
268
268
  diffCached: string;
269
269
  lastCommitMessages: string;
270
270
  }>;
@@ -308,8 +308,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
308
308
  fileTokenScores: Record<string, Record<string, number>>;
309
309
  knowledgeFiles: Record<string, string>;
310
310
  gitChanges: {
311
- diff: string;
312
311
  status: string;
312
+ diff: string;
313
313
  diffCached: string;
314
314
  lastCommitMessages: string;
315
315
  };
@@ -334,8 +334,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
334
334
  fileTokenScores: Record<string, Record<string, number>>;
335
335
  knowledgeFiles: Record<string, string>;
336
336
  gitChanges: {
337
- diff: string;
338
337
  status: string;
338
+ diff: string;
339
339
  diffCached: string;
340
340
  lastCommitMessages: string;
341
341
  };
@@ -360,13 +360,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
360
360
  path: z.ZodString;
361
361
  content: z.ZodString;
362
362
  }, "strip", z.ZodTypeAny, {
363
- type: "patch" | "file";
364
363
  path: string;
365
364
  content: string;
365
+ type: "file" | "patch";
366
366
  }, {
367
- type: "patch" | "file";
368
367
  path: string;
369
368
  content: string;
369
+ type: "file" | "patch";
370
370
  }>, "many">;
371
371
  costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
372
372
  }, "strip", z.ZodTypeAny, {
@@ -377,8 +377,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
377
377
  fileTokenScores: Record<string, Record<string, number>>;
378
378
  knowledgeFiles: Record<string, string>;
379
379
  gitChanges: {
380
- diff: string;
381
380
  status: string;
381
+ diff: string;
382
382
  diffCached: string;
383
383
  lastCommitMessages: string;
384
384
  };
@@ -401,7 +401,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
401
401
  fingerprintId: string;
402
402
  userInputId: string;
403
403
  messages: {
404
- role: "user" | "assistant";
405
404
  content: string | ({
406
405
  type: "text";
407
406
  text: string;
@@ -410,15 +409,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
410
409
  } | undefined;
411
410
  } | {
412
411
  type: "tool_use";
413
- id: string;
414
412
  name: string;
413
+ id: string;
415
414
  input: Record<string, any>;
416
415
  cache_control?: {
417
416
  type: "ephemeral";
418
417
  } | undefined;
419
418
  } | {
420
- type: "tool_result";
421
419
  content: string;
420
+ type: "tool_result";
422
421
  tool_use_id: string;
423
422
  cache_control?: {
424
423
  type: "ephemeral";
@@ -434,13 +433,14 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
434
433
  type: "ephemeral";
435
434
  } | undefined;
436
435
  })[];
436
+ role: "user" | "assistant";
437
437
  }[];
438
438
  changesAlreadyApplied: {
439
- type: "patch" | "file";
440
439
  path: string;
441
440
  content: string;
441
+ type: "file" | "patch";
442
442
  }[];
443
- costMode: "lite" | "normal" | "max";
443
+ costMode: "max" | "lite" | "normal";
444
444
  authToken?: string | undefined;
445
445
  }, {
446
446
  type: "user-input";
@@ -450,8 +450,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
450
450
  fileTokenScores: Record<string, Record<string, number>>;
451
451
  knowledgeFiles: Record<string, string>;
452
452
  gitChanges: {
453
- diff: string;
454
453
  status: string;
454
+ diff: string;
455
455
  diffCached: string;
456
456
  lastCommitMessages: string;
457
457
  };
@@ -474,7 +474,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
474
474
  fingerprintId: string;
475
475
  userInputId: string;
476
476
  messages: {
477
- role: "user" | "assistant";
478
477
  content: string | ({
479
478
  type: "text";
480
479
  text: string;
@@ -483,15 +482,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
483
482
  } | undefined;
484
483
  } | {
485
484
  type: "tool_use";
486
- id: string;
487
485
  name: string;
486
+ id: string;
488
487
  input: Record<string, any>;
489
488
  cache_control?: {
490
489
  type: "ephemeral";
491
490
  } | undefined;
492
491
  } | {
493
- type: "tool_result";
494
492
  content: string;
493
+ type: "tool_result";
495
494
  tool_use_id: string;
496
495
  cache_control?: {
497
496
  type: "ephemeral";
@@ -507,14 +506,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
507
506
  type: "ephemeral";
508
507
  } | undefined;
509
508
  })[];
509
+ role: "user" | "assistant";
510
510
  }[];
511
511
  changesAlreadyApplied: {
512
- type: "patch" | "file";
513
512
  path: string;
514
513
  content: string;
514
+ type: "file" | "patch";
515
515
  }[];
516
516
  authToken?: string | undefined;
517
- costMode?: "lite" | "normal" | "max" | undefined;
517
+ costMode?: "max" | "lite" | "normal" | undefined;
518
518
  }>, z.ZodObject<{
519
519
  type: z.ZodLiteral<"prompt">;
520
520
  promptId: z.ZodString;
@@ -536,13 +536,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
536
536
  diffCached: z.ZodString;
537
537
  lastCommitMessages: z.ZodString;
538
538
  }, "strip", z.ZodTypeAny, {
539
- diff: string;
540
539
  status: string;
540
+ diff: string;
541
541
  diffCached: string;
542
542
  lastCommitMessages: string;
543
543
  }, {
544
- diff: string;
545
544
  status: string;
545
+ diff: string;
546
546
  diffCached: string;
547
547
  lastCommitMessages: string;
548
548
  }>;
@@ -586,8 +586,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
586
586
  fileTokenScores: Record<string, Record<string, number>>;
587
587
  knowledgeFiles: Record<string, string>;
588
588
  gitChanges: {
589
- diff: string;
590
589
  status: string;
590
+ diff: string;
591
591
  diffCached: string;
592
592
  lastCommitMessages: string;
593
593
  };
@@ -612,8 +612,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
612
612
  fileTokenScores: Record<string, Record<string, number>>;
613
613
  knowledgeFiles: Record<string, string>;
614
614
  gitChanges: {
615
- diff: string;
616
615
  status: string;
616
+ diff: string;
617
617
  diffCached: string;
618
618
  lastCommitMessages: string;
619
619
  };
@@ -671,16 +671,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
671
671
  }>>;
672
672
  }, "strip", z.ZodTypeAny, {
673
673
  type: "tool_use";
674
- id: string;
675
674
  name: string;
675
+ id: string;
676
676
  input: Record<string, any>;
677
677
  cache_control?: {
678
678
  type: "ephemeral";
679
679
  } | undefined;
680
680
  }, {
681
681
  type: "tool_use";
682
- id: string;
683
682
  name: string;
683
+ id: string;
684
684
  input: Record<string, any>;
685
685
  cache_control?: {
686
686
  type: "ephemeral";
@@ -697,15 +697,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
697
697
  type: "ephemeral";
698
698
  }>>;
699
699
  }, "strip", z.ZodTypeAny, {
700
- type: "tool_result";
701
700
  content: string;
701
+ type: "tool_result";
702
702
  tool_use_id: string;
703
703
  cache_control?: {
704
704
  type: "ephemeral";
705
705
  } | undefined;
706
706
  }, {
707
- type: "tool_result";
708
707
  content: string;
708
+ type: "tool_result";
709
709
  tool_use_id: string;
710
710
  cache_control?: {
711
711
  type: "ephemeral";
@@ -754,7 +754,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
754
754
  } | undefined;
755
755
  }>]>, "many">]>;
756
756
  }, "strip", z.ZodTypeAny, {
757
- role: "user" | "assistant";
758
757
  content: string | ({
759
758
  type: "text";
760
759
  text: string;
@@ -763,15 +762,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
763
762
  } | undefined;
764
763
  } | {
765
764
  type: "tool_use";
766
- id: string;
767
765
  name: string;
766
+ id: string;
768
767
  input: Record<string, any>;
769
768
  cache_control?: {
770
769
  type: "ephemeral";
771
770
  } | undefined;
772
771
  } | {
773
- type: "tool_result";
774
772
  content: string;
773
+ type: "tool_result";
775
774
  tool_use_id: string;
776
775
  cache_control?: {
777
776
  type: "ephemeral";
@@ -787,8 +786,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
787
786
  type: "ephemeral";
788
787
  } | undefined;
789
788
  })[];
790
- }, {
791
789
  role: "user" | "assistant";
790
+ }, {
792
791
  content: string | ({
793
792
  type: "text";
794
793
  text: string;
@@ -797,15 +796,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
797
796
  } | undefined;
798
797
  } | {
799
798
  type: "tool_use";
800
- id: string;
801
799
  name: string;
800
+ id: string;
802
801
  input: Record<string, any>;
803
802
  cache_control?: {
804
803
  type: "ephemeral";
805
804
  } | undefined;
806
805
  } | {
807
- type: "tool_result";
808
806
  content: string;
807
+ type: "tool_result";
809
808
  tool_use_id: string;
810
809
  cache_control?: {
811
810
  type: "ephemeral";
@@ -821,6 +820,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
821
820
  type: "ephemeral";
822
821
  } | undefined;
823
822
  })[];
823
+ role: "user" | "assistant";
824
824
  }>, "many">;
825
825
  }, "strip", z.ZodTypeAny, {
826
826
  agentContext: string;
@@ -830,8 +830,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
830
830
  fileTokenScores: Record<string, Record<string, number>>;
831
831
  knowledgeFiles: Record<string, string>;
832
832
  gitChanges: {
833
- diff: string;
834
833
  status: string;
834
+ diff: string;
835
835
  diffCached: string;
836
836
  lastCommitMessages: string;
837
837
  };
@@ -852,7 +852,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
852
852
  userKnowledgeFiles?: Record<string, string> | undefined;
853
853
  };
854
854
  messageHistory: {
855
- role: "user" | "assistant";
856
855
  content: string | ({
857
856
  type: "text";
858
857
  text: string;
@@ -861,15 +860,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
861
860
  } | undefined;
862
861
  } | {
863
862
  type: "tool_use";
864
- id: string;
865
863
  name: string;
864
+ id: string;
866
865
  input: Record<string, any>;
867
866
  cache_control?: {
868
867
  type: "ephemeral";
869
868
  } | undefined;
870
869
  } | {
871
- type: "tool_result";
872
870
  content: string;
871
+ type: "tool_result";
873
872
  tool_use_id: string;
874
873
  cache_control?: {
875
874
  type: "ephemeral";
@@ -885,6 +884,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
885
884
  type: "ephemeral";
886
885
  } | undefined;
887
886
  })[];
887
+ role: "user" | "assistant";
888
888
  }[];
889
889
  }, {
890
890
  agentContext: string;
@@ -894,8 +894,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
894
894
  fileTokenScores: Record<string, Record<string, number>>;
895
895
  knowledgeFiles: Record<string, string>;
896
896
  gitChanges: {
897
- diff: string;
898
897
  status: string;
898
+ diff: string;
899
899
  diffCached: string;
900
900
  lastCommitMessages: string;
901
901
  };
@@ -916,7 +916,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
916
916
  userKnowledgeFiles?: Record<string, string> | undefined;
917
917
  };
918
918
  messageHistory: {
919
- role: "user" | "assistant";
920
919
  content: string | ({
921
920
  type: "text";
922
921
  text: string;
@@ -925,15 +924,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
925
924
  } | undefined;
926
925
  } | {
927
926
  type: "tool_use";
928
- id: string;
929
927
  name: string;
928
+ id: string;
930
929
  input: Record<string, any>;
931
930
  cache_control?: {
932
931
  type: "ephemeral";
933
932
  } | undefined;
934
933
  } | {
935
- type: "tool_result";
936
934
  content: string;
935
+ type: "tool_result";
937
936
  tool_use_id: string;
938
937
  cache_control?: {
939
938
  type: "ephemeral";
@@ -949,6 +948,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
949
948
  type: "ephemeral";
950
949
  } | undefined;
951
950
  })[];
951
+ role: "user" | "assistant";
952
952
  }[];
953
953
  }>;
954
954
  toolResults: z.ZodArray<z.ZodObject<{
@@ -956,18 +956,18 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
956
956
  result: z.ZodString;
957
957
  id: z.ZodString;
958
958
  }, "strip", z.ZodTypeAny, {
959
- id: string;
960
959
  name: string;
960
+ id: string;
961
961
  result: string;
962
962
  }, {
963
- id: string;
964
963
  name: string;
964
+ id: string;
965
965
  result: string;
966
966
  }>, "many">;
967
967
  }, "strip", z.ZodTypeAny, {
968
968
  type: "prompt";
969
969
  fingerprintId: string;
970
- costMode: "lite" | "normal" | "max";
970
+ costMode: "max" | "lite" | "normal";
971
971
  promptId: string;
972
972
  agentState: {
973
973
  agentContext: string;
@@ -977,8 +977,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
977
977
  fileTokenScores: Record<string, Record<string, number>>;
978
978
  knowledgeFiles: Record<string, string>;
979
979
  gitChanges: {
980
- diff: string;
981
980
  status: string;
981
+ diff: string;
982
982
  diffCached: string;
983
983
  lastCommitMessages: string;
984
984
  };
@@ -999,7 +999,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
999
999
  userKnowledgeFiles?: Record<string, string> | undefined;
1000
1000
  };
1001
1001
  messageHistory: {
1002
- role: "user" | "assistant";
1003
1002
  content: string | ({
1004
1003
  type: "text";
1005
1004
  text: string;
@@ -1008,15 +1007,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1008
1007
  } | undefined;
1009
1008
  } | {
1010
1009
  type: "tool_use";
1011
- id: string;
1012
1010
  name: string;
1011
+ id: string;
1013
1012
  input: Record<string, any>;
1014
1013
  cache_control?: {
1015
1014
  type: "ephemeral";
1016
1015
  } | undefined;
1017
1016
  } | {
1018
- type: "tool_result";
1019
1017
  content: string;
1018
+ type: "tool_result";
1020
1019
  tool_use_id: string;
1021
1020
  cache_control?: {
1022
1021
  type: "ephemeral";
@@ -1032,11 +1031,12 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1032
1031
  type: "ephemeral";
1033
1032
  } | undefined;
1034
1033
  })[];
1034
+ role: "user" | "assistant";
1035
1035
  }[];
1036
1036
  };
1037
1037
  toolResults: {
1038
- id: string;
1039
1038
  name: string;
1039
+ id: string;
1040
1040
  result: string;
1041
1041
  }[];
1042
1042
  authToken?: string | undefined;
@@ -1053,8 +1053,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1053
1053
  fileTokenScores: Record<string, Record<string, number>>;
1054
1054
  knowledgeFiles: Record<string, string>;
1055
1055
  gitChanges: {
1056
- diff: string;
1057
1056
  status: string;
1057
+ diff: string;
1058
1058
  diffCached: string;
1059
1059
  lastCommitMessages: string;
1060
1060
  };
@@ -1075,7 +1075,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1075
1075
  userKnowledgeFiles?: Record<string, string> | undefined;
1076
1076
  };
1077
1077
  messageHistory: {
1078
- role: "user" | "assistant";
1079
1078
  content: string | ({
1080
1079
  type: "text";
1081
1080
  text: string;
@@ -1084,15 +1083,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1084
1083
  } | undefined;
1085
1084
  } | {
1086
1085
  type: "tool_use";
1087
- id: string;
1088
1086
  name: string;
1087
+ id: string;
1089
1088
  input: Record<string, any>;
1090
1089
  cache_control?: {
1091
1090
  type: "ephemeral";
1092
1091
  } | undefined;
1093
1092
  } | {
1094
- type: "tool_result";
1095
1093
  content: string;
1094
+ type: "tool_result";
1096
1095
  tool_use_id: string;
1097
1096
  cache_control?: {
1098
1097
  type: "ephemeral";
@@ -1108,15 +1107,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1108
1107
  type: "ephemeral";
1109
1108
  } | undefined;
1110
1109
  })[];
1110
+ role: "user" | "assistant";
1111
1111
  }[];
1112
1112
  };
1113
1113
  toolResults: {
1114
- id: string;
1115
1114
  name: string;
1115
+ id: string;
1116
1116
  result: string;
1117
1117
  }[];
1118
1118
  authToken?: string | undefined;
1119
- costMode?: "lite" | "normal" | "max" | undefined;
1119
+ costMode?: "max" | "lite" | "normal" | undefined;
1120
1120
  prompt?: string | undefined;
1121
1121
  }>, z.ZodObject<{
1122
1122
  type: z.ZodLiteral<"read-files-response">;
@@ -1146,13 +1146,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1146
1146
  diffCached: z.ZodString;
1147
1147
  lastCommitMessages: z.ZodString;
1148
1148
  }, "strip", z.ZodTypeAny, {
1149
- diff: string;
1150
1149
  status: string;
1150
+ diff: string;
1151
1151
  diffCached: string;
1152
1152
  lastCommitMessages: string;
1153
1153
  }, {
1154
- diff: string;
1155
1154
  status: string;
1155
+ diff: string;
1156
1156
  diffCached: string;
1157
1157
  lastCommitMessages: string;
1158
1158
  }>;
@@ -1196,8 +1196,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1196
1196
  fileTokenScores: Record<string, Record<string, number>>;
1197
1197
  knowledgeFiles: Record<string, string>;
1198
1198
  gitChanges: {
1199
- diff: string;
1200
1199
  status: string;
1200
+ diff: string;
1201
1201
  diffCached: string;
1202
1202
  lastCommitMessages: string;
1203
1203
  };
@@ -1222,8 +1222,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1222
1222
  fileTokenScores: Record<string, Record<string, number>>;
1223
1223
  knowledgeFiles: Record<string, string>;
1224
1224
  gitChanges: {
1225
- diff: string;
1226
1225
  status: string;
1226
+ diff: string;
1227
1227
  diffCached: string;
1228
1228
  lastCommitMessages: string;
1229
1229
  };
@@ -1251,8 +1251,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1251
1251
  fileTokenScores: Record<string, Record<string, number>>;
1252
1252
  knowledgeFiles: Record<string, string>;
1253
1253
  gitChanges: {
1254
- diff: string;
1255
1254
  status: string;
1255
+ diff: string;
1256
1256
  diffCached: string;
1257
1257
  lastCommitMessages: string;
1258
1258
  };
@@ -1282,8 +1282,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1282
1282
  fileTokenScores: Record<string, Record<string, number>>;
1283
1283
  knowledgeFiles: Record<string, string>;
1284
1284
  gitChanges: {
1285
- diff: string;
1286
1285
  status: string;
1286
+ diff: string;
1287
1287
  diffCached: string;
1288
1288
  lastCommitMessages: string;
1289
1289
  };
@@ -1343,8 +1343,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1343
1343
  fileTokenScores: Record<string, Record<string, number>>;
1344
1344
  knowledgeFiles: Record<string, string>;
1345
1345
  gitChanges: {
1346
- diff: string;
1347
1346
  status: string;
1347
+ diff: string;
1348
1348
  diffCached: string;
1349
1349
  lastCommitMessages: string;
1350
1350
  };
@@ -1367,7 +1367,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1367
1367
  fingerprintId: string;
1368
1368
  userInputId: string;
1369
1369
  messages: {
1370
- role: "user" | "assistant";
1371
1370
  content: string | ({
1372
1371
  type: "text";
1373
1372
  text: string;
@@ -1376,15 +1375,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1376
1375
  } | undefined;
1377
1376
  } | {
1378
1377
  type: "tool_use";
1379
- id: string;
1380
1378
  name: string;
1379
+ id: string;
1381
1380
  input: Record<string, any>;
1382
1381
  cache_control?: {
1383
1382
  type: "ephemeral";
1384
1383
  } | undefined;
1385
1384
  } | {
1386
- type: "tool_result";
1387
1385
  content: string;
1386
+ type: "tool_result";
1388
1387
  tool_use_id: string;
1389
1388
  cache_control?: {
1390
1389
  type: "ephemeral";
@@ -1400,18 +1399,19 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1400
1399
  type: "ephemeral";
1401
1400
  } | undefined;
1402
1401
  })[];
1402
+ role: "user" | "assistant";
1403
1403
  }[];
1404
1404
  changesAlreadyApplied: {
1405
- type: "patch" | "file";
1406
1405
  path: string;
1407
1406
  content: string;
1407
+ type: "file" | "patch";
1408
1408
  }[];
1409
- costMode: "lite" | "normal" | "max";
1409
+ costMode: "max" | "lite" | "normal";
1410
1410
  authToken?: string | undefined;
1411
1411
  } | {
1412
1412
  type: "prompt";
1413
1413
  fingerprintId: string;
1414
- costMode: "lite" | "normal" | "max";
1414
+ costMode: "max" | "lite" | "normal";
1415
1415
  promptId: string;
1416
1416
  agentState: {
1417
1417
  agentContext: string;
@@ -1421,8 +1421,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1421
1421
  fileTokenScores: Record<string, Record<string, number>>;
1422
1422
  knowledgeFiles: Record<string, string>;
1423
1423
  gitChanges: {
1424
- diff: string;
1425
1424
  status: string;
1425
+ diff: string;
1426
1426
  diffCached: string;
1427
1427
  lastCommitMessages: string;
1428
1428
  };
@@ -1443,7 +1443,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1443
1443
  userKnowledgeFiles?: Record<string, string> | undefined;
1444
1444
  };
1445
1445
  messageHistory: {
1446
- role: "user" | "assistant";
1447
1446
  content: string | ({
1448
1447
  type: "text";
1449
1448
  text: string;
@@ -1452,15 +1451,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1452
1451
  } | undefined;
1453
1452
  } | {
1454
1453
  type: "tool_use";
1455
- id: string;
1456
1454
  name: string;
1455
+ id: string;
1457
1456
  input: Record<string, any>;
1458
1457
  cache_control?: {
1459
1458
  type: "ephemeral";
1460
1459
  } | undefined;
1461
1460
  } | {
1462
- type: "tool_result";
1463
1461
  content: string;
1462
+ type: "tool_result";
1464
1463
  tool_use_id: string;
1465
1464
  cache_control?: {
1466
1465
  type: "ephemeral";
@@ -1476,11 +1475,12 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1476
1475
  type: "ephemeral";
1477
1476
  } | undefined;
1478
1477
  })[];
1478
+ role: "user" | "assistant";
1479
1479
  }[];
1480
1480
  };
1481
1481
  toolResults: {
1482
- id: string;
1483
1482
  name: string;
1483
+ id: string;
1484
1484
  result: string;
1485
1485
  }[];
1486
1486
  authToken?: string | undefined;
@@ -1497,8 +1497,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1497
1497
  fileTokenScores: Record<string, Record<string, number>>;
1498
1498
  knowledgeFiles: Record<string, string>;
1499
1499
  gitChanges: {
1500
- diff: string;
1501
1500
  status: string;
1501
+ diff: string;
1502
1502
  diffCached: string;
1503
1503
  lastCommitMessages: string;
1504
1504
  };
@@ -1541,8 +1541,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1541
1541
  fileTokenScores: Record<string, Record<string, number>>;
1542
1542
  knowledgeFiles: Record<string, string>;
1543
1543
  gitChanges: {
1544
- diff: string;
1545
1544
  status: string;
1545
+ diff: string;
1546
1546
  diffCached: string;
1547
1547
  lastCommitMessages: string;
1548
1548
  };
@@ -1565,7 +1565,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1565
1565
  fingerprintId: string;
1566
1566
  userInputId: string;
1567
1567
  messages: {
1568
- role: "user" | "assistant";
1569
1568
  content: string | ({
1570
1569
  type: "text";
1571
1570
  text: string;
@@ -1574,15 +1573,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1574
1573
  } | undefined;
1575
1574
  } | {
1576
1575
  type: "tool_use";
1577
- id: string;
1578
1576
  name: string;
1577
+ id: string;
1579
1578
  input: Record<string, any>;
1580
1579
  cache_control?: {
1581
1580
  type: "ephemeral";
1582
1581
  } | undefined;
1583
1582
  } | {
1584
- type: "tool_result";
1585
1583
  content: string;
1584
+ type: "tool_result";
1586
1585
  tool_use_id: string;
1587
1586
  cache_control?: {
1588
1587
  type: "ephemeral";
@@ -1598,14 +1597,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1598
1597
  type: "ephemeral";
1599
1598
  } | undefined;
1600
1599
  })[];
1600
+ role: "user" | "assistant";
1601
1601
  }[];
1602
1602
  changesAlreadyApplied: {
1603
- type: "patch" | "file";
1604
1603
  path: string;
1605
1604
  content: string;
1605
+ type: "file" | "patch";
1606
1606
  }[];
1607
1607
  authToken?: string | undefined;
1608
- costMode?: "lite" | "normal" | "max" | undefined;
1608
+ costMode?: "max" | "lite" | "normal" | undefined;
1609
1609
  } | {
1610
1610
  type: "prompt";
1611
1611
  fingerprintId: string;
@@ -1618,8 +1618,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1618
1618
  fileTokenScores: Record<string, Record<string, number>>;
1619
1619
  knowledgeFiles: Record<string, string>;
1620
1620
  gitChanges: {
1621
- diff: string;
1622
1621
  status: string;
1622
+ diff: string;
1623
1623
  diffCached: string;
1624
1624
  lastCommitMessages: string;
1625
1625
  };
@@ -1640,7 +1640,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1640
1640
  userKnowledgeFiles?: Record<string, string> | undefined;
1641
1641
  };
1642
1642
  messageHistory: {
1643
- role: "user" | "assistant";
1644
1643
  content: string | ({
1645
1644
  type: "text";
1646
1645
  text: string;
@@ -1649,15 +1648,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1649
1648
  } | undefined;
1650
1649
  } | {
1651
1650
  type: "tool_use";
1652
- id: string;
1653
1651
  name: string;
1652
+ id: string;
1654
1653
  input: Record<string, any>;
1655
1654
  cache_control?: {
1656
1655
  type: "ephemeral";
1657
1656
  } | undefined;
1658
1657
  } | {
1659
- type: "tool_result";
1660
1658
  content: string;
1659
+ type: "tool_result";
1661
1660
  tool_use_id: string;
1662
1661
  cache_control?: {
1663
1662
  type: "ephemeral";
@@ -1673,15 +1672,16 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1673
1672
  type: "ephemeral";
1674
1673
  } | undefined;
1675
1674
  })[];
1675
+ role: "user" | "assistant";
1676
1676
  }[];
1677
1677
  };
1678
1678
  toolResults: {
1679
- id: string;
1680
1679
  name: string;
1680
+ id: string;
1681
1681
  result: string;
1682
1682
  }[];
1683
1683
  authToken?: string | undefined;
1684
- costMode?: "lite" | "normal" | "max" | undefined;
1684
+ costMode?: "max" | "lite" | "normal" | undefined;
1685
1685
  prompt?: string | undefined;
1686
1686
  } | {
1687
1687
  type: "read-files-response";
@@ -1695,8 +1695,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
1695
1695
  fileTokenScores: Record<string, Record<string, number>>;
1696
1696
  knowledgeFiles: Record<string, string>;
1697
1697
  gitChanges: {
1698
- diff: string;
1699
1698
  status: string;
1699
+ diff: string;
1700
1700
  diffCached: string;
1701
1701
  lastCommitMessages: string;
1702
1702
  };
@@ -1822,16 +1822,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1822
1822
  }>>;
1823
1823
  }, "strip", z.ZodTypeAny, {
1824
1824
  type: "tool_use";
1825
- id: string;
1826
1825
  name: string;
1826
+ id: string;
1827
1827
  input: Record<string, any>;
1828
1828
  cache_control?: {
1829
1829
  type: "ephemeral";
1830
1830
  } | undefined;
1831
1831
  }, {
1832
1832
  type: "tool_use";
1833
- id: string;
1834
1833
  name: string;
1834
+ id: string;
1835
1835
  input: Record<string, any>;
1836
1836
  cache_control?: {
1837
1837
  type: "ephemeral";
@@ -1848,15 +1848,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1848
1848
  type: "ephemeral";
1849
1849
  }>>;
1850
1850
  }, "strip", z.ZodTypeAny, {
1851
- type: "tool_result";
1852
1851
  content: string;
1852
+ type: "tool_result";
1853
1853
  tool_use_id: string;
1854
1854
  cache_control?: {
1855
1855
  type: "ephemeral";
1856
1856
  } | undefined;
1857
1857
  }, {
1858
- type: "tool_result";
1859
1858
  content: string;
1859
+ type: "tool_result";
1860
1860
  tool_use_id: string;
1861
1861
  cache_control?: {
1862
1862
  type: "ephemeral";
@@ -1905,7 +1905,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1905
1905
  } | undefined;
1906
1906
  }>]>, "many">]>;
1907
1907
  }, "strip", z.ZodTypeAny, {
1908
- role: "user" | "assistant";
1909
1908
  content: string | ({
1910
1909
  type: "text";
1911
1910
  text: string;
@@ -1914,15 +1913,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1914
1913
  } | undefined;
1915
1914
  } | {
1916
1915
  type: "tool_use";
1917
- id: string;
1918
1916
  name: string;
1917
+ id: string;
1919
1918
  input: Record<string, any>;
1920
1919
  cache_control?: {
1921
1920
  type: "ephemeral";
1922
1921
  } | undefined;
1923
1922
  } | {
1924
- type: "tool_result";
1925
1923
  content: string;
1924
+ type: "tool_result";
1926
1925
  tool_use_id: string;
1927
1926
  cache_control?: {
1928
1927
  type: "ephemeral";
@@ -1938,8 +1937,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1938
1937
  type: "ephemeral";
1939
1938
  } | undefined;
1940
1939
  })[];
1941
- }, {
1942
1940
  role: "user" | "assistant";
1941
+ }, {
1943
1942
  content: string | ({
1944
1943
  type: "text";
1945
1944
  text: string;
@@ -1948,15 +1947,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1948
1947
  } | undefined;
1949
1948
  } | {
1950
1949
  type: "tool_use";
1951
- id: string;
1952
1950
  name: string;
1951
+ id: string;
1953
1952
  input: Record<string, any>;
1954
1953
  cache_control?: {
1955
1954
  type: "ephemeral";
1956
1955
  } | undefined;
1957
1956
  } | {
1958
- type: "tool_result";
1959
1957
  content: string;
1958
+ type: "tool_result";
1960
1959
  tool_use_id: string;
1961
1960
  cache_control?: {
1962
1961
  type: "ephemeral";
@@ -1972,6 +1971,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1972
1971
  type: "ephemeral";
1973
1972
  } | undefined;
1974
1973
  })[];
1974
+ role: "user" | "assistant";
1975
1975
  }>, "many">;
1976
1976
  fileContext: z.ZodObject<{
1977
1977
  currentWorkingDirectory: z.ZodString;
@@ -1985,13 +1985,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
1985
1985
  diffCached: z.ZodString;
1986
1986
  lastCommitMessages: z.ZodString;
1987
1987
  }, "strip", z.ZodTypeAny, {
1988
- diff: string;
1989
1988
  status: string;
1989
+ diff: string;
1990
1990
  diffCached: string;
1991
1991
  lastCommitMessages: string;
1992
1992
  }, {
1993
- diff: string;
1994
1993
  status: string;
1994
+ diff: string;
1995
1995
  diffCached: string;
1996
1996
  lastCommitMessages: string;
1997
1997
  }>;
@@ -2035,8 +2035,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2035
2035
  fileTokenScores: Record<string, Record<string, number>>;
2036
2036
  knowledgeFiles: Record<string, string>;
2037
2037
  gitChanges: {
2038
- diff: string;
2039
2038
  status: string;
2039
+ diff: string;
2040
2040
  diffCached: string;
2041
2041
  lastCommitMessages: string;
2042
2042
  };
@@ -2061,8 +2061,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2061
2061
  fileTokenScores: Record<string, Record<string, number>>;
2062
2062
  knowledgeFiles: Record<string, string>;
2063
2063
  gitChanges: {
2064
- diff: string;
2065
2064
  status: string;
2065
+ diff: string;
2066
2066
  diffCached: string;
2067
2067
  lastCommitMessages: string;
2068
2068
  };
@@ -2087,13 +2087,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2087
2087
  path: z.ZodString;
2088
2088
  content: z.ZodString;
2089
2089
  }, "strip", z.ZodTypeAny, {
2090
- type: "patch" | "file";
2091
2090
  path: string;
2092
2091
  content: string;
2092
+ type: "file" | "patch";
2093
2093
  }, {
2094
- type: "patch" | "file";
2095
2094
  path: string;
2096
2095
  content: string;
2096
+ type: "file" | "patch";
2097
2097
  }>, "many">;
2098
2098
  costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
2099
2099
  }, "strip", z.ZodTypeAny, {
@@ -2104,8 +2104,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2104
2104
  fileTokenScores: Record<string, Record<string, number>>;
2105
2105
  knowledgeFiles: Record<string, string>;
2106
2106
  gitChanges: {
2107
- diff: string;
2108
2107
  status: string;
2108
+ diff: string;
2109
2109
  diffCached: string;
2110
2110
  lastCommitMessages: string;
2111
2111
  };
@@ -2128,7 +2128,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2128
2128
  fingerprintId: string;
2129
2129
  userInputId: string;
2130
2130
  messages: {
2131
- role: "user" | "assistant";
2132
2131
  content: string | ({
2133
2132
  type: "text";
2134
2133
  text: string;
@@ -2137,15 +2136,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2137
2136
  } | undefined;
2138
2137
  } | {
2139
2138
  type: "tool_use";
2140
- id: string;
2141
2139
  name: string;
2140
+ id: string;
2142
2141
  input: Record<string, any>;
2143
2142
  cache_control?: {
2144
2143
  type: "ephemeral";
2145
2144
  } | undefined;
2146
2145
  } | {
2147
- type: "tool_result";
2148
2146
  content: string;
2147
+ type: "tool_result";
2149
2148
  tool_use_id: string;
2150
2149
  cache_control?: {
2151
2150
  type: "ephemeral";
@@ -2161,13 +2160,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2161
2160
  type: "ephemeral";
2162
2161
  } | undefined;
2163
2162
  })[];
2163
+ role: "user" | "assistant";
2164
2164
  }[];
2165
2165
  changesAlreadyApplied: {
2166
- type: "patch" | "file";
2167
2166
  path: string;
2168
2167
  content: string;
2168
+ type: "file" | "patch";
2169
2169
  }[];
2170
- costMode: "lite" | "normal" | "max";
2170
+ costMode: "max" | "lite" | "normal";
2171
2171
  authToken?: string | undefined;
2172
2172
  }, {
2173
2173
  type: "user-input";
@@ -2177,8 +2177,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2177
2177
  fileTokenScores: Record<string, Record<string, number>>;
2178
2178
  knowledgeFiles: Record<string, string>;
2179
2179
  gitChanges: {
2180
- diff: string;
2181
2180
  status: string;
2181
+ diff: string;
2182
2182
  diffCached: string;
2183
2183
  lastCommitMessages: string;
2184
2184
  };
@@ -2201,7 +2201,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2201
2201
  fingerprintId: string;
2202
2202
  userInputId: string;
2203
2203
  messages: {
2204
- role: "user" | "assistant";
2205
2204
  content: string | ({
2206
2205
  type: "text";
2207
2206
  text: string;
@@ -2210,15 +2209,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2210
2209
  } | undefined;
2211
2210
  } | {
2212
2211
  type: "tool_use";
2213
- id: string;
2214
2212
  name: string;
2213
+ id: string;
2215
2214
  input: Record<string, any>;
2216
2215
  cache_control?: {
2217
2216
  type: "ephemeral";
2218
2217
  } | undefined;
2219
2218
  } | {
2220
- type: "tool_result";
2221
2219
  content: string;
2220
+ type: "tool_result";
2222
2221
  tool_use_id: string;
2223
2222
  cache_control?: {
2224
2223
  type: "ephemeral";
@@ -2234,14 +2233,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2234
2233
  type: "ephemeral";
2235
2234
  } | undefined;
2236
2235
  })[];
2236
+ role: "user" | "assistant";
2237
2237
  }[];
2238
2238
  changesAlreadyApplied: {
2239
- type: "patch" | "file";
2240
2239
  path: string;
2241
2240
  content: string;
2241
+ type: "file" | "patch";
2242
2242
  }[];
2243
2243
  authToken?: string | undefined;
2244
- costMode?: "lite" | "normal" | "max" | undefined;
2244
+ costMode?: "max" | "lite" | "normal" | undefined;
2245
2245
  }>, z.ZodObject<{
2246
2246
  type: z.ZodLiteral<"prompt">;
2247
2247
  promptId: z.ZodString;
@@ -2263,13 +2263,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2263
2263
  diffCached: z.ZodString;
2264
2264
  lastCommitMessages: z.ZodString;
2265
2265
  }, "strip", z.ZodTypeAny, {
2266
- diff: string;
2267
2266
  status: string;
2267
+ diff: string;
2268
2268
  diffCached: string;
2269
2269
  lastCommitMessages: string;
2270
2270
  }, {
2271
- diff: string;
2272
2271
  status: string;
2272
+ diff: string;
2273
2273
  diffCached: string;
2274
2274
  lastCommitMessages: string;
2275
2275
  }>;
@@ -2313,8 +2313,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2313
2313
  fileTokenScores: Record<string, Record<string, number>>;
2314
2314
  knowledgeFiles: Record<string, string>;
2315
2315
  gitChanges: {
2316
- diff: string;
2317
2316
  status: string;
2317
+ diff: string;
2318
2318
  diffCached: string;
2319
2319
  lastCommitMessages: string;
2320
2320
  };
@@ -2339,8 +2339,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2339
2339
  fileTokenScores: Record<string, Record<string, number>>;
2340
2340
  knowledgeFiles: Record<string, string>;
2341
2341
  gitChanges: {
2342
- diff: string;
2343
2342
  status: string;
2343
+ diff: string;
2344
2344
  diffCached: string;
2345
2345
  lastCommitMessages: string;
2346
2346
  };
@@ -2398,16 +2398,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2398
2398
  }>>;
2399
2399
  }, "strip", z.ZodTypeAny, {
2400
2400
  type: "tool_use";
2401
- id: string;
2402
2401
  name: string;
2402
+ id: string;
2403
2403
  input: Record<string, any>;
2404
2404
  cache_control?: {
2405
2405
  type: "ephemeral";
2406
2406
  } | undefined;
2407
2407
  }, {
2408
2408
  type: "tool_use";
2409
- id: string;
2410
2409
  name: string;
2410
+ id: string;
2411
2411
  input: Record<string, any>;
2412
2412
  cache_control?: {
2413
2413
  type: "ephemeral";
@@ -2424,15 +2424,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2424
2424
  type: "ephemeral";
2425
2425
  }>>;
2426
2426
  }, "strip", z.ZodTypeAny, {
2427
- type: "tool_result";
2428
2427
  content: string;
2428
+ type: "tool_result";
2429
2429
  tool_use_id: string;
2430
2430
  cache_control?: {
2431
2431
  type: "ephemeral";
2432
2432
  } | undefined;
2433
2433
  }, {
2434
- type: "tool_result";
2435
2434
  content: string;
2435
+ type: "tool_result";
2436
2436
  tool_use_id: string;
2437
2437
  cache_control?: {
2438
2438
  type: "ephemeral";
@@ -2481,7 +2481,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2481
2481
  } | undefined;
2482
2482
  }>]>, "many">]>;
2483
2483
  }, "strip", z.ZodTypeAny, {
2484
- role: "user" | "assistant";
2485
2484
  content: string | ({
2486
2485
  type: "text";
2487
2486
  text: string;
@@ -2490,15 +2489,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2490
2489
  } | undefined;
2491
2490
  } | {
2492
2491
  type: "tool_use";
2493
- id: string;
2494
2492
  name: string;
2493
+ id: string;
2495
2494
  input: Record<string, any>;
2496
2495
  cache_control?: {
2497
2496
  type: "ephemeral";
2498
2497
  } | undefined;
2499
2498
  } | {
2500
- type: "tool_result";
2501
2499
  content: string;
2500
+ type: "tool_result";
2502
2501
  tool_use_id: string;
2503
2502
  cache_control?: {
2504
2503
  type: "ephemeral";
@@ -2514,8 +2513,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2514
2513
  type: "ephemeral";
2515
2514
  } | undefined;
2516
2515
  })[];
2517
- }, {
2518
2516
  role: "user" | "assistant";
2517
+ }, {
2519
2518
  content: string | ({
2520
2519
  type: "text";
2521
2520
  text: string;
@@ -2524,15 +2523,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2524
2523
  } | undefined;
2525
2524
  } | {
2526
2525
  type: "tool_use";
2527
- id: string;
2528
2526
  name: string;
2527
+ id: string;
2529
2528
  input: Record<string, any>;
2530
2529
  cache_control?: {
2531
2530
  type: "ephemeral";
2532
2531
  } | undefined;
2533
2532
  } | {
2534
- type: "tool_result";
2535
2533
  content: string;
2534
+ type: "tool_result";
2536
2535
  tool_use_id: string;
2537
2536
  cache_control?: {
2538
2537
  type: "ephemeral";
@@ -2548,6 +2547,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2548
2547
  type: "ephemeral";
2549
2548
  } | undefined;
2550
2549
  })[];
2550
+ role: "user" | "assistant";
2551
2551
  }>, "many">;
2552
2552
  }, "strip", z.ZodTypeAny, {
2553
2553
  agentContext: string;
@@ -2557,8 +2557,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2557
2557
  fileTokenScores: Record<string, Record<string, number>>;
2558
2558
  knowledgeFiles: Record<string, string>;
2559
2559
  gitChanges: {
2560
- diff: string;
2561
2560
  status: string;
2561
+ diff: string;
2562
2562
  diffCached: string;
2563
2563
  lastCommitMessages: string;
2564
2564
  };
@@ -2579,7 +2579,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2579
2579
  userKnowledgeFiles?: Record<string, string> | undefined;
2580
2580
  };
2581
2581
  messageHistory: {
2582
- role: "user" | "assistant";
2583
2582
  content: string | ({
2584
2583
  type: "text";
2585
2584
  text: string;
@@ -2588,15 +2587,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2588
2587
  } | undefined;
2589
2588
  } | {
2590
2589
  type: "tool_use";
2591
- id: string;
2592
2590
  name: string;
2591
+ id: string;
2593
2592
  input: Record<string, any>;
2594
2593
  cache_control?: {
2595
2594
  type: "ephemeral";
2596
2595
  } | undefined;
2597
2596
  } | {
2598
- type: "tool_result";
2599
2597
  content: string;
2598
+ type: "tool_result";
2600
2599
  tool_use_id: string;
2601
2600
  cache_control?: {
2602
2601
  type: "ephemeral";
@@ -2612,6 +2611,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2612
2611
  type: "ephemeral";
2613
2612
  } | undefined;
2614
2613
  })[];
2614
+ role: "user" | "assistant";
2615
2615
  }[];
2616
2616
  }, {
2617
2617
  agentContext: string;
@@ -2621,8 +2621,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2621
2621
  fileTokenScores: Record<string, Record<string, number>>;
2622
2622
  knowledgeFiles: Record<string, string>;
2623
2623
  gitChanges: {
2624
- diff: string;
2625
2624
  status: string;
2625
+ diff: string;
2626
2626
  diffCached: string;
2627
2627
  lastCommitMessages: string;
2628
2628
  };
@@ -2643,7 +2643,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2643
2643
  userKnowledgeFiles?: Record<string, string> | undefined;
2644
2644
  };
2645
2645
  messageHistory: {
2646
- role: "user" | "assistant";
2647
2646
  content: string | ({
2648
2647
  type: "text";
2649
2648
  text: string;
@@ -2652,15 +2651,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2652
2651
  } | undefined;
2653
2652
  } | {
2654
2653
  type: "tool_use";
2655
- id: string;
2656
2654
  name: string;
2655
+ id: string;
2657
2656
  input: Record<string, any>;
2658
2657
  cache_control?: {
2659
2658
  type: "ephemeral";
2660
2659
  } | undefined;
2661
2660
  } | {
2662
- type: "tool_result";
2663
2661
  content: string;
2662
+ type: "tool_result";
2664
2663
  tool_use_id: string;
2665
2664
  cache_control?: {
2666
2665
  type: "ephemeral";
@@ -2676,6 +2675,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2676
2675
  type: "ephemeral";
2677
2676
  } | undefined;
2678
2677
  })[];
2678
+ role: "user" | "assistant";
2679
2679
  }[];
2680
2680
  }>;
2681
2681
  toolResults: z.ZodArray<z.ZodObject<{
@@ -2683,18 +2683,18 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2683
2683
  result: z.ZodString;
2684
2684
  id: z.ZodString;
2685
2685
  }, "strip", z.ZodTypeAny, {
2686
- id: string;
2687
2686
  name: string;
2687
+ id: string;
2688
2688
  result: string;
2689
2689
  }, {
2690
- id: string;
2691
2690
  name: string;
2691
+ id: string;
2692
2692
  result: string;
2693
2693
  }>, "many">;
2694
2694
  }, "strip", z.ZodTypeAny, {
2695
2695
  type: "prompt";
2696
2696
  fingerprintId: string;
2697
- costMode: "lite" | "normal" | "max";
2697
+ costMode: "max" | "lite" | "normal";
2698
2698
  promptId: string;
2699
2699
  agentState: {
2700
2700
  agentContext: string;
@@ -2704,8 +2704,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2704
2704
  fileTokenScores: Record<string, Record<string, number>>;
2705
2705
  knowledgeFiles: Record<string, string>;
2706
2706
  gitChanges: {
2707
- diff: string;
2708
2707
  status: string;
2708
+ diff: string;
2709
2709
  diffCached: string;
2710
2710
  lastCommitMessages: string;
2711
2711
  };
@@ -2726,7 +2726,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2726
2726
  userKnowledgeFiles?: Record<string, string> | undefined;
2727
2727
  };
2728
2728
  messageHistory: {
2729
- role: "user" | "assistant";
2730
2729
  content: string | ({
2731
2730
  type: "text";
2732
2731
  text: string;
@@ -2735,15 +2734,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2735
2734
  } | undefined;
2736
2735
  } | {
2737
2736
  type: "tool_use";
2738
- id: string;
2739
2737
  name: string;
2738
+ id: string;
2740
2739
  input: Record<string, any>;
2741
2740
  cache_control?: {
2742
2741
  type: "ephemeral";
2743
2742
  } | undefined;
2744
2743
  } | {
2745
- type: "tool_result";
2746
2744
  content: string;
2745
+ type: "tool_result";
2747
2746
  tool_use_id: string;
2748
2747
  cache_control?: {
2749
2748
  type: "ephemeral";
@@ -2759,11 +2758,12 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2759
2758
  type: "ephemeral";
2760
2759
  } | undefined;
2761
2760
  })[];
2761
+ role: "user" | "assistant";
2762
2762
  }[];
2763
2763
  };
2764
2764
  toolResults: {
2765
- id: string;
2766
2765
  name: string;
2766
+ id: string;
2767
2767
  result: string;
2768
2768
  }[];
2769
2769
  authToken?: string | undefined;
@@ -2780,8 +2780,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2780
2780
  fileTokenScores: Record<string, Record<string, number>>;
2781
2781
  knowledgeFiles: Record<string, string>;
2782
2782
  gitChanges: {
2783
- diff: string;
2784
2783
  status: string;
2784
+ diff: string;
2785
2785
  diffCached: string;
2786
2786
  lastCommitMessages: string;
2787
2787
  };
@@ -2802,7 +2802,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2802
2802
  userKnowledgeFiles?: Record<string, string> | undefined;
2803
2803
  };
2804
2804
  messageHistory: {
2805
- role: "user" | "assistant";
2806
2805
  content: string | ({
2807
2806
  type: "text";
2808
2807
  text: string;
@@ -2811,15 +2810,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2811
2810
  } | undefined;
2812
2811
  } | {
2813
2812
  type: "tool_use";
2814
- id: string;
2815
2813
  name: string;
2814
+ id: string;
2816
2815
  input: Record<string, any>;
2817
2816
  cache_control?: {
2818
2817
  type: "ephemeral";
2819
2818
  } | undefined;
2820
2819
  } | {
2821
- type: "tool_result";
2822
2820
  content: string;
2821
+ type: "tool_result";
2823
2822
  tool_use_id: string;
2824
2823
  cache_control?: {
2825
2824
  type: "ephemeral";
@@ -2835,15 +2834,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2835
2834
  type: "ephemeral";
2836
2835
  } | undefined;
2837
2836
  })[];
2837
+ role: "user" | "assistant";
2838
2838
  }[];
2839
2839
  };
2840
2840
  toolResults: {
2841
- id: string;
2842
2841
  name: string;
2842
+ id: string;
2843
2843
  result: string;
2844
2844
  }[];
2845
2845
  authToken?: string | undefined;
2846
- costMode?: "lite" | "normal" | "max" | undefined;
2846
+ costMode?: "max" | "lite" | "normal" | undefined;
2847
2847
  prompt?: string | undefined;
2848
2848
  }>, z.ZodObject<{
2849
2849
  type: z.ZodLiteral<"read-files-response">;
@@ -2873,13 +2873,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2873
2873
  diffCached: z.ZodString;
2874
2874
  lastCommitMessages: z.ZodString;
2875
2875
  }, "strip", z.ZodTypeAny, {
2876
- diff: string;
2877
2876
  status: string;
2877
+ diff: string;
2878
2878
  diffCached: string;
2879
2879
  lastCommitMessages: string;
2880
2880
  }, {
2881
- diff: string;
2882
2881
  status: string;
2882
+ diff: string;
2883
2883
  diffCached: string;
2884
2884
  lastCommitMessages: string;
2885
2885
  }>;
@@ -2923,8 +2923,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2923
2923
  fileTokenScores: Record<string, Record<string, number>>;
2924
2924
  knowledgeFiles: Record<string, string>;
2925
2925
  gitChanges: {
2926
- diff: string;
2927
2926
  status: string;
2927
+ diff: string;
2928
2928
  diffCached: string;
2929
2929
  lastCommitMessages: string;
2930
2930
  };
@@ -2949,8 +2949,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2949
2949
  fileTokenScores: Record<string, Record<string, number>>;
2950
2950
  knowledgeFiles: Record<string, string>;
2951
2951
  gitChanges: {
2952
- diff: string;
2953
2952
  status: string;
2953
+ diff: string;
2954
2954
  diffCached: string;
2955
2955
  lastCommitMessages: string;
2956
2956
  };
@@ -2978,8 +2978,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
2978
2978
  fileTokenScores: Record<string, Record<string, number>>;
2979
2979
  knowledgeFiles: Record<string, string>;
2980
2980
  gitChanges: {
2981
- diff: string;
2982
2981
  status: string;
2982
+ diff: string;
2983
2983
  diffCached: string;
2984
2984
  lastCommitMessages: string;
2985
2985
  };
@@ -3009,8 +3009,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3009
3009
  fileTokenScores: Record<string, Record<string, number>>;
3010
3010
  knowledgeFiles: Record<string, string>;
3011
3011
  gitChanges: {
3012
- diff: string;
3013
3012
  status: string;
3013
+ diff: string;
3014
3014
  diffCached: string;
3015
3015
  lastCommitMessages: string;
3016
3016
  };
@@ -3070,8 +3070,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3070
3070
  fileTokenScores: Record<string, Record<string, number>>;
3071
3071
  knowledgeFiles: Record<string, string>;
3072
3072
  gitChanges: {
3073
- diff: string;
3074
3073
  status: string;
3074
+ diff: string;
3075
3075
  diffCached: string;
3076
3076
  lastCommitMessages: string;
3077
3077
  };
@@ -3094,7 +3094,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3094
3094
  fingerprintId: string;
3095
3095
  userInputId: string;
3096
3096
  messages: {
3097
- role: "user" | "assistant";
3098
3097
  content: string | ({
3099
3098
  type: "text";
3100
3099
  text: string;
@@ -3103,15 +3102,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3103
3102
  } | undefined;
3104
3103
  } | {
3105
3104
  type: "tool_use";
3106
- id: string;
3107
3105
  name: string;
3106
+ id: string;
3108
3107
  input: Record<string, any>;
3109
3108
  cache_control?: {
3110
3109
  type: "ephemeral";
3111
3110
  } | undefined;
3112
3111
  } | {
3113
- type: "tool_result";
3114
3112
  content: string;
3113
+ type: "tool_result";
3115
3114
  tool_use_id: string;
3116
3115
  cache_control?: {
3117
3116
  type: "ephemeral";
@@ -3127,18 +3126,19 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3127
3126
  type: "ephemeral";
3128
3127
  } | undefined;
3129
3128
  })[];
3129
+ role: "user" | "assistant";
3130
3130
  }[];
3131
3131
  changesAlreadyApplied: {
3132
- type: "patch" | "file";
3133
3132
  path: string;
3134
3133
  content: string;
3134
+ type: "file" | "patch";
3135
3135
  }[];
3136
- costMode: "lite" | "normal" | "max";
3136
+ costMode: "max" | "lite" | "normal";
3137
3137
  authToken?: string | undefined;
3138
3138
  } | {
3139
3139
  type: "prompt";
3140
3140
  fingerprintId: string;
3141
- costMode: "lite" | "normal" | "max";
3141
+ costMode: "max" | "lite" | "normal";
3142
3142
  promptId: string;
3143
3143
  agentState: {
3144
3144
  agentContext: string;
@@ -3148,8 +3148,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3148
3148
  fileTokenScores: Record<string, Record<string, number>>;
3149
3149
  knowledgeFiles: Record<string, string>;
3150
3150
  gitChanges: {
3151
- diff: string;
3152
3151
  status: string;
3152
+ diff: string;
3153
3153
  diffCached: string;
3154
3154
  lastCommitMessages: string;
3155
3155
  };
@@ -3170,7 +3170,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3170
3170
  userKnowledgeFiles?: Record<string, string> | undefined;
3171
3171
  };
3172
3172
  messageHistory: {
3173
- role: "user" | "assistant";
3174
3173
  content: string | ({
3175
3174
  type: "text";
3176
3175
  text: string;
@@ -3179,15 +3178,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3179
3178
  } | undefined;
3180
3179
  } | {
3181
3180
  type: "tool_use";
3182
- id: string;
3183
3181
  name: string;
3182
+ id: string;
3184
3183
  input: Record<string, any>;
3185
3184
  cache_control?: {
3186
3185
  type: "ephemeral";
3187
3186
  } | undefined;
3188
3187
  } | {
3189
- type: "tool_result";
3190
3188
  content: string;
3189
+ type: "tool_result";
3191
3190
  tool_use_id: string;
3192
3191
  cache_control?: {
3193
3192
  type: "ephemeral";
@@ -3203,11 +3202,12 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3203
3202
  type: "ephemeral";
3204
3203
  } | undefined;
3205
3204
  })[];
3205
+ role: "user" | "assistant";
3206
3206
  }[];
3207
3207
  };
3208
3208
  toolResults: {
3209
- id: string;
3210
3209
  name: string;
3210
+ id: string;
3211
3211
  result: string;
3212
3212
  }[];
3213
3213
  authToken?: string | undefined;
@@ -3224,8 +3224,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3224
3224
  fileTokenScores: Record<string, Record<string, number>>;
3225
3225
  knowledgeFiles: Record<string, string>;
3226
3226
  gitChanges: {
3227
- diff: string;
3228
3227
  status: string;
3228
+ diff: string;
3229
3229
  diffCached: string;
3230
3230
  lastCommitMessages: string;
3231
3231
  };
@@ -3268,8 +3268,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3268
3268
  fileTokenScores: Record<string, Record<string, number>>;
3269
3269
  knowledgeFiles: Record<string, string>;
3270
3270
  gitChanges: {
3271
- diff: string;
3272
3271
  status: string;
3272
+ diff: string;
3273
3273
  diffCached: string;
3274
3274
  lastCommitMessages: string;
3275
3275
  };
@@ -3292,7 +3292,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3292
3292
  fingerprintId: string;
3293
3293
  userInputId: string;
3294
3294
  messages: {
3295
- role: "user" | "assistant";
3296
3295
  content: string | ({
3297
3296
  type: "text";
3298
3297
  text: string;
@@ -3301,15 +3300,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3301
3300
  } | undefined;
3302
3301
  } | {
3303
3302
  type: "tool_use";
3304
- id: string;
3305
3303
  name: string;
3304
+ id: string;
3306
3305
  input: Record<string, any>;
3307
3306
  cache_control?: {
3308
3307
  type: "ephemeral";
3309
3308
  } | undefined;
3310
3309
  } | {
3311
- type: "tool_result";
3312
3310
  content: string;
3311
+ type: "tool_result";
3313
3312
  tool_use_id: string;
3314
3313
  cache_control?: {
3315
3314
  type: "ephemeral";
@@ -3325,14 +3324,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3325
3324
  type: "ephemeral";
3326
3325
  } | undefined;
3327
3326
  })[];
3327
+ role: "user" | "assistant";
3328
3328
  }[];
3329
3329
  changesAlreadyApplied: {
3330
- type: "patch" | "file";
3331
3330
  path: string;
3332
3331
  content: string;
3332
+ type: "file" | "patch";
3333
3333
  }[];
3334
3334
  authToken?: string | undefined;
3335
- costMode?: "lite" | "normal" | "max" | undefined;
3335
+ costMode?: "max" | "lite" | "normal" | undefined;
3336
3336
  } | {
3337
3337
  type: "prompt";
3338
3338
  fingerprintId: string;
@@ -3345,8 +3345,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3345
3345
  fileTokenScores: Record<string, Record<string, number>>;
3346
3346
  knowledgeFiles: Record<string, string>;
3347
3347
  gitChanges: {
3348
- diff: string;
3349
3348
  status: string;
3349
+ diff: string;
3350
3350
  diffCached: string;
3351
3351
  lastCommitMessages: string;
3352
3352
  };
@@ -3367,7 +3367,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3367
3367
  userKnowledgeFiles?: Record<string, string> | undefined;
3368
3368
  };
3369
3369
  messageHistory: {
3370
- role: "user" | "assistant";
3371
3370
  content: string | ({
3372
3371
  type: "text";
3373
3372
  text: string;
@@ -3376,15 +3375,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3376
3375
  } | undefined;
3377
3376
  } | {
3378
3377
  type: "tool_use";
3379
- id: string;
3380
3378
  name: string;
3379
+ id: string;
3381
3380
  input: Record<string, any>;
3382
3381
  cache_control?: {
3383
3382
  type: "ephemeral";
3384
3383
  } | undefined;
3385
3384
  } | {
3386
- type: "tool_result";
3387
3385
  content: string;
3386
+ type: "tool_result";
3388
3387
  tool_use_id: string;
3389
3388
  cache_control?: {
3390
3389
  type: "ephemeral";
@@ -3400,15 +3399,16 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3400
3399
  type: "ephemeral";
3401
3400
  } | undefined;
3402
3401
  })[];
3402
+ role: "user" | "assistant";
3403
3403
  }[];
3404
3404
  };
3405
3405
  toolResults: {
3406
- id: string;
3407
3406
  name: string;
3407
+ id: string;
3408
3408
  result: string;
3409
3409
  }[];
3410
3410
  authToken?: string | undefined;
3411
- costMode?: "lite" | "normal" | "max" | undefined;
3411
+ costMode?: "max" | "lite" | "normal" | undefined;
3412
3412
  prompt?: string | undefined;
3413
3413
  } | {
3414
3414
  type: "read-files-response";
@@ -3422,8 +3422,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
3422
3422
  fileTokenScores: Record<string, Record<string, number>>;
3423
3423
  knowledgeFiles: Record<string, string>;
3424
3424
  gitChanges: {
3425
- diff: string;
3426
3425
  status: string;
3426
+ diff: string;
3427
3427
  diffCached: string;
3428
3428
  lastCommitMessages: string;
3429
3429
  };
@@ -3468,13 +3468,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3468
3468
  }, "strip", z.ZodTypeAny, {
3469
3469
  type: "ack";
3470
3470
  success: boolean;
3471
- txid?: number | undefined;
3472
3471
  error?: string | undefined;
3472
+ txid?: number | undefined;
3473
3473
  }, {
3474
3474
  type: "ack";
3475
3475
  success: boolean;
3476
- txid?: number | undefined;
3477
3476
  error?: string | undefined;
3477
+ txid?: number | undefined;
3478
3478
  }>;
3479
3479
  action: z.ZodObject<{
3480
3480
  type: z.ZodLiteral<"action">;
@@ -3499,26 +3499,26 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3499
3499
  path: z.ZodString;
3500
3500
  content: z.ZodString;
3501
3501
  }, "strip", z.ZodTypeAny, {
3502
- type: "patch" | "file";
3503
3502
  path: string;
3504
3503
  content: string;
3504
+ type: "file" | "patch";
3505
3505
  }, {
3506
- type: "patch" | "file";
3507
3506
  path: string;
3508
3507
  content: string;
3508
+ type: "file" | "patch";
3509
3509
  }>, "many">;
3510
3510
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
3511
3511
  type: z.ZodEnum<["patch", "file"]>;
3512
3512
  path: z.ZodString;
3513
3513
  content: z.ZodString;
3514
3514
  }, "strip", z.ZodTypeAny, {
3515
- type: "patch" | "file";
3516
3515
  path: string;
3517
3516
  content: string;
3517
+ type: "file" | "patch";
3518
3518
  }, {
3519
- type: "patch" | "file";
3520
3519
  path: string;
3521
3520
  content: string;
3521
+ type: "file" | "patch";
3522
3522
  }>, "many">;
3523
3523
  addedFileVersions: z.ZodArray<z.ZodObject<{
3524
3524
  path: z.ZodString;
@@ -3542,15 +3542,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3542
3542
  type: "response-complete";
3543
3543
  userInputId: string;
3544
3544
  changesAlreadyApplied: {
3545
- type: "patch" | "file";
3546
3545
  path: string;
3547
3546
  content: string;
3547
+ type: "file" | "patch";
3548
3548
  }[];
3549
3549
  response: string;
3550
3550
  changes: {
3551
- type: "patch" | "file";
3552
3551
  path: string;
3553
3552
  content: string;
3553
+ type: "file" | "patch";
3554
3554
  }[];
3555
3555
  addedFileVersions: {
3556
3556
  path: string;
@@ -3567,15 +3567,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3567
3567
  type: "response-complete";
3568
3568
  userInputId: string;
3569
3569
  changesAlreadyApplied: {
3570
- type: "patch" | "file";
3571
3570
  path: string;
3572
3571
  content: string;
3572
+ type: "file" | "patch";
3573
3573
  }[];
3574
3574
  response: string;
3575
3575
  changes: {
3576
- type: "patch" | "file";
3577
3576
  path: string;
3578
3577
  content: string;
3578
+ type: "file" | "patch";
3579
3579
  }[];
3580
3580
  addedFileVersions: {
3581
3581
  path: string;
@@ -3605,13 +3605,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3605
3605
  diffCached: z.ZodString;
3606
3606
  lastCommitMessages: z.ZodString;
3607
3607
  }, "strip", z.ZodTypeAny, {
3608
- diff: string;
3609
3608
  status: string;
3609
+ diff: string;
3610
3610
  diffCached: string;
3611
3611
  lastCommitMessages: string;
3612
3612
  }, {
3613
- diff: string;
3614
3613
  status: string;
3614
+ diff: string;
3615
3615
  diffCached: string;
3616
3616
  lastCommitMessages: string;
3617
3617
  }>;
@@ -3655,8 +3655,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3655
3655
  fileTokenScores: Record<string, Record<string, number>>;
3656
3656
  knowledgeFiles: Record<string, string>;
3657
3657
  gitChanges: {
3658
- diff: string;
3659
3658
  status: string;
3659
+ diff: string;
3660
3660
  diffCached: string;
3661
3661
  lastCommitMessages: string;
3662
3662
  };
@@ -3681,8 +3681,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3681
3681
  fileTokenScores: Record<string, Record<string, number>>;
3682
3682
  knowledgeFiles: Record<string, string>;
3683
3683
  gitChanges: {
3684
- diff: string;
3685
3684
  status: string;
3685
+ diff: string;
3686
3686
  diffCached: string;
3687
3687
  lastCommitMessages: string;
3688
3688
  };
@@ -3740,16 +3740,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3740
3740
  }>>;
3741
3741
  }, "strip", z.ZodTypeAny, {
3742
3742
  type: "tool_use";
3743
- id: string;
3744
3743
  name: string;
3744
+ id: string;
3745
3745
  input: Record<string, any>;
3746
3746
  cache_control?: {
3747
3747
  type: "ephemeral";
3748
3748
  } | undefined;
3749
3749
  }, {
3750
3750
  type: "tool_use";
3751
- id: string;
3752
3751
  name: string;
3752
+ id: string;
3753
3753
  input: Record<string, any>;
3754
3754
  cache_control?: {
3755
3755
  type: "ephemeral";
@@ -3766,15 +3766,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3766
3766
  type: "ephemeral";
3767
3767
  }>>;
3768
3768
  }, "strip", z.ZodTypeAny, {
3769
- type: "tool_result";
3770
3769
  content: string;
3770
+ type: "tool_result";
3771
3771
  tool_use_id: string;
3772
3772
  cache_control?: {
3773
3773
  type: "ephemeral";
3774
3774
  } | undefined;
3775
3775
  }, {
3776
- type: "tool_result";
3777
3776
  content: string;
3777
+ type: "tool_result";
3778
3778
  tool_use_id: string;
3779
3779
  cache_control?: {
3780
3780
  type: "ephemeral";
@@ -3823,7 +3823,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3823
3823
  } | undefined;
3824
3824
  }>]>, "many">]>;
3825
3825
  }, "strip", z.ZodTypeAny, {
3826
- role: "user" | "assistant";
3827
3826
  content: string | ({
3828
3827
  type: "text";
3829
3828
  text: string;
@@ -3832,15 +3831,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3832
3831
  } | undefined;
3833
3832
  } | {
3834
3833
  type: "tool_use";
3835
- id: string;
3836
3834
  name: string;
3835
+ id: string;
3837
3836
  input: Record<string, any>;
3838
3837
  cache_control?: {
3839
3838
  type: "ephemeral";
3840
3839
  } | undefined;
3841
3840
  } | {
3842
- type: "tool_result";
3843
3841
  content: string;
3842
+ type: "tool_result";
3844
3843
  tool_use_id: string;
3845
3844
  cache_control?: {
3846
3845
  type: "ephemeral";
@@ -3856,8 +3855,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3856
3855
  type: "ephemeral";
3857
3856
  } | undefined;
3858
3857
  })[];
3859
- }, {
3860
3858
  role: "user" | "assistant";
3859
+ }, {
3861
3860
  content: string | ({
3862
3861
  type: "text";
3863
3862
  text: string;
@@ -3866,15 +3865,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3866
3865
  } | undefined;
3867
3866
  } | {
3868
3867
  type: "tool_use";
3869
- id: string;
3870
3868
  name: string;
3869
+ id: string;
3871
3870
  input: Record<string, any>;
3872
3871
  cache_control?: {
3873
3872
  type: "ephemeral";
3874
3873
  } | undefined;
3875
3874
  } | {
3876
- type: "tool_result";
3877
3875
  content: string;
3876
+ type: "tool_result";
3878
3877
  tool_use_id: string;
3879
3878
  cache_control?: {
3880
3879
  type: "ephemeral";
@@ -3890,6 +3889,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3890
3889
  type: "ephemeral";
3891
3890
  } | undefined;
3892
3891
  })[];
3892
+ role: "user" | "assistant";
3893
3893
  }>, "many">;
3894
3894
  }, "strip", z.ZodTypeAny, {
3895
3895
  agentContext: string;
@@ -3899,8 +3899,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3899
3899
  fileTokenScores: Record<string, Record<string, number>>;
3900
3900
  knowledgeFiles: Record<string, string>;
3901
3901
  gitChanges: {
3902
- diff: string;
3903
3902
  status: string;
3903
+ diff: string;
3904
3904
  diffCached: string;
3905
3905
  lastCommitMessages: string;
3906
3906
  };
@@ -3921,7 +3921,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3921
3921
  userKnowledgeFiles?: Record<string, string> | undefined;
3922
3922
  };
3923
3923
  messageHistory: {
3924
- role: "user" | "assistant";
3925
3924
  content: string | ({
3926
3925
  type: "text";
3927
3926
  text: string;
@@ -3930,15 +3929,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3930
3929
  } | undefined;
3931
3930
  } | {
3932
3931
  type: "tool_use";
3933
- id: string;
3934
3932
  name: string;
3933
+ id: string;
3935
3934
  input: Record<string, any>;
3936
3935
  cache_control?: {
3937
3936
  type: "ephemeral";
3938
3937
  } | undefined;
3939
3938
  } | {
3940
- type: "tool_result";
3941
3939
  content: string;
3940
+ type: "tool_result";
3942
3941
  tool_use_id: string;
3943
3942
  cache_control?: {
3944
3943
  type: "ephemeral";
@@ -3954,6 +3953,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3954
3953
  type: "ephemeral";
3955
3954
  } | undefined;
3956
3955
  })[];
3956
+ role: "user" | "assistant";
3957
3957
  }[];
3958
3958
  }, {
3959
3959
  agentContext: string;
@@ -3963,8 +3963,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3963
3963
  fileTokenScores: Record<string, Record<string, number>>;
3964
3964
  knowledgeFiles: Record<string, string>;
3965
3965
  gitChanges: {
3966
- diff: string;
3967
3966
  status: string;
3967
+ diff: string;
3968
3968
  diffCached: string;
3969
3969
  lastCommitMessages: string;
3970
3970
  };
@@ -3985,7 +3985,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3985
3985
  userKnowledgeFiles?: Record<string, string> | undefined;
3986
3986
  };
3987
3987
  messageHistory: {
3988
- role: "user" | "assistant";
3989
3988
  content: string | ({
3990
3989
  type: "text";
3991
3990
  text: string;
@@ -3994,15 +3993,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
3994
3993
  } | undefined;
3995
3994
  } | {
3996
3995
  type: "tool_use";
3997
- id: string;
3998
3996
  name: string;
3997
+ id: string;
3999
3998
  input: Record<string, any>;
4000
3999
  cache_control?: {
4001
4000
  type: "ephemeral";
4002
4001
  } | undefined;
4003
4002
  } | {
4004
- type: "tool_result";
4005
4003
  content: string;
4004
+ type: "tool_result";
4006
4005
  tool_use_id: string;
4007
4006
  cache_control?: {
4008
4007
  type: "ephemeral";
@@ -4018,6 +4017,7 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4018
4017
  type: "ephemeral";
4019
4018
  } | undefined;
4020
4019
  })[];
4020
+ role: "user" | "assistant";
4021
4021
  }[];
4022
4022
  }>;
4023
4023
  toolCalls: z.ZodArray<z.ZodObject<{
@@ -4025,12 +4025,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4025
4025
  parameters: z.ZodRecord<z.ZodString, z.ZodString>;
4026
4026
  id: z.ZodString;
4027
4027
  }, "strip", z.ZodTypeAny, {
4028
- id: string;
4029
4028
  name: string;
4029
+ id: string;
4030
4030
  parameters: Record<string, string>;
4031
4031
  }, {
4032
- id: string;
4033
4032
  name: string;
4033
+ id: string;
4034
4034
  parameters: Record<string, string>;
4035
4035
  }>, "many">;
4036
4036
  toolResults: z.ZodArray<z.ZodObject<{
@@ -4038,12 +4038,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4038
4038
  result: z.ZodString;
4039
4039
  id: z.ZodString;
4040
4040
  }, "strip", z.ZodTypeAny, {
4041
- id: string;
4042
4041
  name: string;
4042
+ id: string;
4043
4043
  result: string;
4044
4044
  }, {
4045
- id: string;
4046
4045
  name: string;
4046
+ id: string;
4047
4047
  result: string;
4048
4048
  }>, "many">;
4049
4049
  }, {
@@ -4064,8 +4064,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4064
4064
  fileTokenScores: Record<string, Record<string, number>>;
4065
4065
  knowledgeFiles: Record<string, string>;
4066
4066
  gitChanges: {
4067
- diff: string;
4068
4067
  status: string;
4068
+ diff: string;
4069
4069
  diffCached: string;
4070
4070
  lastCommitMessages: string;
4071
4071
  };
@@ -4086,7 +4086,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4086
4086
  userKnowledgeFiles?: Record<string, string> | undefined;
4087
4087
  };
4088
4088
  messageHistory: {
4089
- role: "user" | "assistant";
4090
4089
  content: string | ({
4091
4090
  type: "text";
4092
4091
  text: string;
@@ -4095,15 +4094,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4095
4094
  } | undefined;
4096
4095
  } | {
4097
4096
  type: "tool_use";
4098
- id: string;
4099
4097
  name: string;
4098
+ id: string;
4100
4099
  input: Record<string, any>;
4101
4100
  cache_control?: {
4102
4101
  type: "ephemeral";
4103
4102
  } | undefined;
4104
4103
  } | {
4105
- type: "tool_result";
4106
4104
  content: string;
4105
+ type: "tool_result";
4107
4106
  tool_use_id: string;
4108
4107
  cache_control?: {
4109
4108
  type: "ephemeral";
@@ -4119,16 +4118,17 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4119
4118
  type: "ephemeral";
4120
4119
  } | undefined;
4121
4120
  })[];
4121
+ role: "user" | "assistant";
4122
4122
  }[];
4123
4123
  };
4124
4124
  toolResults: {
4125
- id: string;
4126
4125
  name: string;
4126
+ id: string;
4127
4127
  result: string;
4128
4128
  }[];
4129
4129
  toolCalls: {
4130
- id: string;
4131
4130
  name: string;
4131
+ id: string;
4132
4132
  parameters: Record<string, string>;
4133
4133
  }[];
4134
4134
  usage?: number | undefined;
@@ -4148,8 +4148,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4148
4148
  fileTokenScores: Record<string, Record<string, number>>;
4149
4149
  knowledgeFiles: Record<string, string>;
4150
4150
  gitChanges: {
4151
- diff: string;
4152
4151
  status: string;
4152
+ diff: string;
4153
4153
  diffCached: string;
4154
4154
  lastCommitMessages: string;
4155
4155
  };
@@ -4170,7 +4170,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4170
4170
  userKnowledgeFiles?: Record<string, string> | undefined;
4171
4171
  };
4172
4172
  messageHistory: {
4173
- role: "user" | "assistant";
4174
4173
  content: string | ({
4175
4174
  type: "text";
4176
4175
  text: string;
@@ -4179,15 +4178,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4179
4178
  } | undefined;
4180
4179
  } | {
4181
4180
  type: "tool_use";
4182
- id: string;
4183
4181
  name: string;
4182
+ id: string;
4184
4183
  input: Record<string, any>;
4185
4184
  cache_control?: {
4186
4185
  type: "ephemeral";
4187
4186
  } | undefined;
4188
4187
  } | {
4189
- type: "tool_result";
4190
4188
  content: string;
4189
+ type: "tool_result";
4191
4190
  tool_use_id: string;
4192
4191
  cache_control?: {
4193
4192
  type: "ephemeral";
@@ -4203,16 +4202,17 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4203
4202
  type: "ephemeral";
4204
4203
  } | undefined;
4205
4204
  })[];
4205
+ role: "user" | "assistant";
4206
4206
  }[];
4207
4207
  };
4208
4208
  toolResults: {
4209
- id: string;
4210
4209
  name: string;
4210
+ id: string;
4211
4211
  result: string;
4212
4212
  }[];
4213
4213
  toolCalls: {
4214
- id: string;
4215
4214
  name: string;
4215
+ id: string;
4216
4216
  parameters: Record<string, string>;
4217
4217
  }[];
4218
4218
  usage?: number | undefined;
@@ -4242,12 +4242,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4242
4242
  id: z.ZodString;
4243
4243
  input: z.ZodRecord<z.ZodString, z.ZodAny>;
4244
4244
  }, "strip", z.ZodTypeAny, {
4245
- id: string;
4246
4245
  name: string;
4246
+ id: string;
4247
4247
  input: Record<string, any>;
4248
4248
  }, {
4249
- id: string;
4250
4249
  name: string;
4250
+ id: string;
4251
4251
  input: Record<string, any>;
4252
4252
  }>;
4253
4253
  changes: z.ZodArray<z.ZodObject<{
@@ -4255,26 +4255,26 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4255
4255
  path: z.ZodString;
4256
4256
  content: z.ZodString;
4257
4257
  }, "strip", z.ZodTypeAny, {
4258
- type: "patch" | "file";
4259
4258
  path: string;
4260
4259
  content: string;
4260
+ type: "file" | "patch";
4261
4261
  }, {
4262
- type: "patch" | "file";
4263
4262
  path: string;
4264
4263
  content: string;
4264
+ type: "file" | "patch";
4265
4265
  }>, "many">;
4266
4266
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
4267
4267
  type: z.ZodEnum<["patch", "file"]>;
4268
4268
  path: z.ZodString;
4269
4269
  content: z.ZodString;
4270
4270
  }, "strip", z.ZodTypeAny, {
4271
- type: "patch" | "file";
4272
4271
  path: string;
4273
4272
  content: string;
4273
+ type: "file" | "patch";
4274
4274
  }, {
4275
- type: "patch" | "file";
4276
4275
  path: string;
4277
4276
  content: string;
4277
+ type: "file" | "patch";
4278
4278
  }>, "many">;
4279
4279
  addedFileVersions: z.ZodArray<z.ZodObject<{
4280
4280
  path: z.ZodString;
@@ -4290,21 +4290,21 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4290
4290
  }, "strip", z.ZodTypeAny, {
4291
4291
  type: "tool-call";
4292
4292
  data: {
4293
- id: string;
4294
4293
  name: string;
4294
+ id: string;
4295
4295
  input: Record<string, any>;
4296
4296
  };
4297
4297
  userInputId: string;
4298
4298
  changesAlreadyApplied: {
4299
- type: "patch" | "file";
4300
4299
  path: string;
4301
4300
  content: string;
4301
+ type: "file" | "patch";
4302
4302
  }[];
4303
4303
  response: string;
4304
4304
  changes: {
4305
- type: "patch" | "file";
4306
4305
  path: string;
4307
4306
  content: string;
4307
+ type: "file" | "patch";
4308
4308
  }[];
4309
4309
  addedFileVersions: {
4310
4310
  path: string;
@@ -4314,21 +4314,21 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4314
4314
  }, {
4315
4315
  type: "tool-call";
4316
4316
  data: {
4317
- id: string;
4318
4317
  name: string;
4318
+ id: string;
4319
4319
  input: Record<string, any>;
4320
4320
  };
4321
4321
  userInputId: string;
4322
4322
  changesAlreadyApplied: {
4323
- type: "patch" | "file";
4324
4323
  path: string;
4325
4324
  content: string;
4325
+ type: "file" | "patch";
4326
4326
  }[];
4327
4327
  response: string;
4328
4328
  changes: {
4329
- type: "patch" | "file";
4330
4329
  path: string;
4331
4330
  content: string;
4331
+ type: "file" | "patch";
4332
4332
  }[];
4333
4333
  addedFileVersions: {
4334
4334
  path: string;
@@ -4413,11 +4413,11 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4413
4413
  type: z.ZodLiteral<"action-error">;
4414
4414
  message: z.ZodString;
4415
4415
  }, "strip", z.ZodTypeAny, {
4416
- type: "action-error";
4417
4416
  message: string;
4418
- }, {
4419
4417
  type: "action-error";
4418
+ }, {
4420
4419
  message: string;
4420
+ type: "action-error";
4421
4421
  }>, z.ZodObject<{
4422
4422
  type: z.ZodLiteral<"commit-message-response">;
4423
4423
  commitMessage: z.ZodString;
@@ -4450,15 +4450,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4450
4450
  type: "response-complete";
4451
4451
  userInputId: string;
4452
4452
  changesAlreadyApplied: {
4453
- type: "patch" | "file";
4454
4453
  path: string;
4455
4454
  content: string;
4455
+ type: "file" | "patch";
4456
4456
  }[];
4457
4457
  response: string;
4458
4458
  changes: {
4459
- type: "patch" | "file";
4460
4459
  path: string;
4461
4460
  content: string;
4461
+ type: "file" | "patch";
4462
4462
  }[];
4463
4463
  addedFileVersions: {
4464
4464
  path: string;
@@ -4482,8 +4482,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4482
4482
  fileTokenScores: Record<string, Record<string, number>>;
4483
4483
  knowledgeFiles: Record<string, string>;
4484
4484
  gitChanges: {
4485
- diff: string;
4486
4485
  status: string;
4486
+ diff: string;
4487
4487
  diffCached: string;
4488
4488
  lastCommitMessages: string;
4489
4489
  };
@@ -4504,7 +4504,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4504
4504
  userKnowledgeFiles?: Record<string, string> | undefined;
4505
4505
  };
4506
4506
  messageHistory: {
4507
- role: "user" | "assistant";
4508
4507
  content: string | ({
4509
4508
  type: "text";
4510
4509
  text: string;
@@ -4513,15 +4512,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4513
4512
  } | undefined;
4514
4513
  } | {
4515
4514
  type: "tool_use";
4516
- id: string;
4517
4515
  name: string;
4516
+ id: string;
4518
4517
  input: Record<string, any>;
4519
4518
  cache_control?: {
4520
4519
  type: "ephemeral";
4521
4520
  } | undefined;
4522
4521
  } | {
4523
- type: "tool_result";
4524
4522
  content: string;
4523
+ type: "tool_result";
4525
4524
  tool_use_id: string;
4526
4525
  cache_control?: {
4527
4526
  type: "ephemeral";
@@ -4537,16 +4536,17 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4537
4536
  type: "ephemeral";
4538
4537
  } | undefined;
4539
4538
  })[];
4539
+ role: "user" | "assistant";
4540
4540
  }[];
4541
4541
  };
4542
4542
  toolResults: {
4543
- id: string;
4544
4543
  name: string;
4544
+ id: string;
4545
4545
  result: string;
4546
4546
  }[];
4547
4547
  toolCalls: {
4548
- id: string;
4549
4548
  name: string;
4549
+ id: string;
4550
4550
  parameters: Record<string, string>;
4551
4551
  }[];
4552
4552
  usage?: number | undefined;
@@ -4566,21 +4566,21 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4566
4566
  } | {
4567
4567
  type: "tool-call";
4568
4568
  data: {
4569
- id: string;
4570
4569
  name: string;
4570
+ id: string;
4571
4571
  input: Record<string, any>;
4572
4572
  };
4573
4573
  userInputId: string;
4574
4574
  changesAlreadyApplied: {
4575
- type: "patch" | "file";
4576
4575
  path: string;
4577
4576
  content: string;
4577
+ type: "file" | "patch";
4578
4578
  }[];
4579
4579
  response: string;
4580
4580
  changes: {
4581
- type: "patch" | "file";
4582
4581
  path: string;
4583
4582
  content: string;
4583
+ type: "file" | "patch";
4584
4584
  }[];
4585
4585
  addedFileVersions: {
4586
4586
  path: string;
@@ -4596,8 +4596,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4596
4596
  isUpToDate: boolean;
4597
4597
  latestVersion: string;
4598
4598
  } | {
4599
- type: "action-error";
4600
4599
  message: string;
4600
+ type: "action-error";
4601
4601
  } | {
4602
4602
  type: "commit-message-response";
4603
4603
  commitMessage: string;
@@ -4624,15 +4624,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4624
4624
  type: "response-complete";
4625
4625
  userInputId: string;
4626
4626
  changesAlreadyApplied: {
4627
- type: "patch" | "file";
4628
4627
  path: string;
4629
4628
  content: string;
4629
+ type: "file" | "patch";
4630
4630
  }[];
4631
4631
  response: string;
4632
4632
  changes: {
4633
- type: "patch" | "file";
4634
4633
  path: string;
4635
4634
  content: string;
4635
+ type: "file" | "patch";
4636
4636
  }[];
4637
4637
  addedFileVersions: {
4638
4638
  path: string;
@@ -4656,8 +4656,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4656
4656
  fileTokenScores: Record<string, Record<string, number>>;
4657
4657
  knowledgeFiles: Record<string, string>;
4658
4658
  gitChanges: {
4659
- diff: string;
4660
4659
  status: string;
4660
+ diff: string;
4661
4661
  diffCached: string;
4662
4662
  lastCommitMessages: string;
4663
4663
  };
@@ -4678,7 +4678,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4678
4678
  userKnowledgeFiles?: Record<string, string> | undefined;
4679
4679
  };
4680
4680
  messageHistory: {
4681
- role: "user" | "assistant";
4682
4681
  content: string | ({
4683
4682
  type: "text";
4684
4683
  text: string;
@@ -4687,15 +4686,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4687
4686
  } | undefined;
4688
4687
  } | {
4689
4688
  type: "tool_use";
4690
- id: string;
4691
4689
  name: string;
4690
+ id: string;
4692
4691
  input: Record<string, any>;
4693
4692
  cache_control?: {
4694
4693
  type: "ephemeral";
4695
4694
  } | undefined;
4696
4695
  } | {
4697
- type: "tool_result";
4698
4696
  content: string;
4697
+ type: "tool_result";
4699
4698
  tool_use_id: string;
4700
4699
  cache_control?: {
4701
4700
  type: "ephemeral";
@@ -4711,16 +4710,17 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4711
4710
  type: "ephemeral";
4712
4711
  } | undefined;
4713
4712
  })[];
4713
+ role: "user" | "assistant";
4714
4714
  }[];
4715
4715
  };
4716
4716
  toolResults: {
4717
- id: string;
4718
4717
  name: string;
4718
+ id: string;
4719
4719
  result: string;
4720
4720
  }[];
4721
4721
  toolCalls: {
4722
- id: string;
4723
4722
  name: string;
4723
+ id: string;
4724
4724
  parameters: Record<string, string>;
4725
4725
  }[];
4726
4726
  usage?: number | undefined;
@@ -4740,21 +4740,21 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4740
4740
  } | {
4741
4741
  type: "tool-call";
4742
4742
  data: {
4743
- id: string;
4744
4743
  name: string;
4744
+ id: string;
4745
4745
  input: Record<string, any>;
4746
4746
  };
4747
4747
  userInputId: string;
4748
4748
  changesAlreadyApplied: {
4749
- type: "patch" | "file";
4750
4749
  path: string;
4751
4750
  content: string;
4751
+ type: "file" | "patch";
4752
4752
  }[];
4753
4753
  response: string;
4754
4754
  changes: {
4755
- type: "patch" | "file";
4756
4755
  path: string;
4757
4756
  content: string;
4757
+ type: "file" | "patch";
4758
4758
  }[];
4759
4759
  addedFileVersions: {
4760
4760
  path: string;
@@ -4770,8 +4770,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
4770
4770
  isUpToDate: boolean;
4771
4771
  latestVersion: string;
4772
4772
  } | {
4773
- type: "action-error";
4774
4773
  message: string;
4774
+ type: "action-error";
4775
4775
  } | {
4776
4776
  type: "commit-message-response";
4777
4777
  commitMessage: string;
@@ -4786,13 +4786,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4786
4786
  }, "strip", z.ZodTypeAny, {
4787
4787
  type: "ack";
4788
4788
  success: boolean;
4789
- txid?: number | undefined;
4790
4789
  error?: string | undefined;
4790
+ txid?: number | undefined;
4791
4791
  }, {
4792
4792
  type: "ack";
4793
4793
  success: boolean;
4794
- txid?: number | undefined;
4795
4794
  error?: string | undefined;
4795
+ txid?: number | undefined;
4796
4796
  }>, z.ZodObject<{
4797
4797
  type: z.ZodLiteral<"action">;
4798
4798
  data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -4816,26 +4816,26 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4816
4816
  path: z.ZodString;
4817
4817
  content: z.ZodString;
4818
4818
  }, "strip", z.ZodTypeAny, {
4819
- type: "patch" | "file";
4820
4819
  path: string;
4821
4820
  content: string;
4821
+ type: "file" | "patch";
4822
4822
  }, {
4823
- type: "patch" | "file";
4824
4823
  path: string;
4825
4824
  content: string;
4825
+ type: "file" | "patch";
4826
4826
  }>, "many">;
4827
4827
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
4828
4828
  type: z.ZodEnum<["patch", "file"]>;
4829
4829
  path: z.ZodString;
4830
4830
  content: z.ZodString;
4831
4831
  }, "strip", z.ZodTypeAny, {
4832
- type: "patch" | "file";
4833
4832
  path: string;
4834
4833
  content: string;
4834
+ type: "file" | "patch";
4835
4835
  }, {
4836
- type: "patch" | "file";
4837
4836
  path: string;
4838
4837
  content: string;
4838
+ type: "file" | "patch";
4839
4839
  }>, "many">;
4840
4840
  addedFileVersions: z.ZodArray<z.ZodObject<{
4841
4841
  path: z.ZodString;
@@ -4859,15 +4859,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4859
4859
  type: "response-complete";
4860
4860
  userInputId: string;
4861
4861
  changesAlreadyApplied: {
4862
- type: "patch" | "file";
4863
4862
  path: string;
4864
4863
  content: string;
4864
+ type: "file" | "patch";
4865
4865
  }[];
4866
4866
  response: string;
4867
4867
  changes: {
4868
- type: "patch" | "file";
4869
4868
  path: string;
4870
4869
  content: string;
4870
+ type: "file" | "patch";
4871
4871
  }[];
4872
4872
  addedFileVersions: {
4873
4873
  path: string;
@@ -4884,15 +4884,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4884
4884
  type: "response-complete";
4885
4885
  userInputId: string;
4886
4886
  changesAlreadyApplied: {
4887
- type: "patch" | "file";
4888
4887
  path: string;
4889
4888
  content: string;
4889
+ type: "file" | "patch";
4890
4890
  }[];
4891
4891
  response: string;
4892
4892
  changes: {
4893
- type: "patch" | "file";
4894
4893
  path: string;
4895
4894
  content: string;
4895
+ type: "file" | "patch";
4896
4896
  }[];
4897
4897
  addedFileVersions: {
4898
4898
  path: string;
@@ -4922,13 +4922,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4922
4922
  diffCached: z.ZodString;
4923
4923
  lastCommitMessages: z.ZodString;
4924
4924
  }, "strip", z.ZodTypeAny, {
4925
- diff: string;
4926
4925
  status: string;
4926
+ diff: string;
4927
4927
  diffCached: string;
4928
4928
  lastCommitMessages: string;
4929
4929
  }, {
4930
- diff: string;
4931
4930
  status: string;
4931
+ diff: string;
4932
4932
  diffCached: string;
4933
4933
  lastCommitMessages: string;
4934
4934
  }>;
@@ -4972,8 +4972,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4972
4972
  fileTokenScores: Record<string, Record<string, number>>;
4973
4973
  knowledgeFiles: Record<string, string>;
4974
4974
  gitChanges: {
4975
- diff: string;
4976
4975
  status: string;
4976
+ diff: string;
4977
4977
  diffCached: string;
4978
4978
  lastCommitMessages: string;
4979
4979
  };
@@ -4998,8 +4998,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
4998
4998
  fileTokenScores: Record<string, Record<string, number>>;
4999
4999
  knowledgeFiles: Record<string, string>;
5000
5000
  gitChanges: {
5001
- diff: string;
5002
5001
  status: string;
5002
+ diff: string;
5003
5003
  diffCached: string;
5004
5004
  lastCommitMessages: string;
5005
5005
  };
@@ -5057,16 +5057,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5057
5057
  }>>;
5058
5058
  }, "strip", z.ZodTypeAny, {
5059
5059
  type: "tool_use";
5060
- id: string;
5061
5060
  name: string;
5061
+ id: string;
5062
5062
  input: Record<string, any>;
5063
5063
  cache_control?: {
5064
5064
  type: "ephemeral";
5065
5065
  } | undefined;
5066
5066
  }, {
5067
5067
  type: "tool_use";
5068
- id: string;
5069
5068
  name: string;
5069
+ id: string;
5070
5070
  input: Record<string, any>;
5071
5071
  cache_control?: {
5072
5072
  type: "ephemeral";
@@ -5083,15 +5083,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5083
5083
  type: "ephemeral";
5084
5084
  }>>;
5085
5085
  }, "strip", z.ZodTypeAny, {
5086
- type: "tool_result";
5087
5086
  content: string;
5087
+ type: "tool_result";
5088
5088
  tool_use_id: string;
5089
5089
  cache_control?: {
5090
5090
  type: "ephemeral";
5091
5091
  } | undefined;
5092
5092
  }, {
5093
- type: "tool_result";
5094
5093
  content: string;
5094
+ type: "tool_result";
5095
5095
  tool_use_id: string;
5096
5096
  cache_control?: {
5097
5097
  type: "ephemeral";
@@ -5140,7 +5140,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5140
5140
  } | undefined;
5141
5141
  }>]>, "many">]>;
5142
5142
  }, "strip", z.ZodTypeAny, {
5143
- role: "user" | "assistant";
5144
5143
  content: string | ({
5145
5144
  type: "text";
5146
5145
  text: string;
@@ -5149,15 +5148,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5149
5148
  } | undefined;
5150
5149
  } | {
5151
5150
  type: "tool_use";
5152
- id: string;
5153
5151
  name: string;
5152
+ id: string;
5154
5153
  input: Record<string, any>;
5155
5154
  cache_control?: {
5156
5155
  type: "ephemeral";
5157
5156
  } | undefined;
5158
5157
  } | {
5159
- type: "tool_result";
5160
5158
  content: string;
5159
+ type: "tool_result";
5161
5160
  tool_use_id: string;
5162
5161
  cache_control?: {
5163
5162
  type: "ephemeral";
@@ -5173,8 +5172,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5173
5172
  type: "ephemeral";
5174
5173
  } | undefined;
5175
5174
  })[];
5176
- }, {
5177
5175
  role: "user" | "assistant";
5176
+ }, {
5178
5177
  content: string | ({
5179
5178
  type: "text";
5180
5179
  text: string;
@@ -5183,15 +5182,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5183
5182
  } | undefined;
5184
5183
  } | {
5185
5184
  type: "tool_use";
5186
- id: string;
5187
5185
  name: string;
5186
+ id: string;
5188
5187
  input: Record<string, any>;
5189
5188
  cache_control?: {
5190
5189
  type: "ephemeral";
5191
5190
  } | undefined;
5192
5191
  } | {
5193
- type: "tool_result";
5194
5192
  content: string;
5193
+ type: "tool_result";
5195
5194
  tool_use_id: string;
5196
5195
  cache_control?: {
5197
5196
  type: "ephemeral";
@@ -5207,6 +5206,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5207
5206
  type: "ephemeral";
5208
5207
  } | undefined;
5209
5208
  })[];
5209
+ role: "user" | "assistant";
5210
5210
  }>, "many">;
5211
5211
  }, "strip", z.ZodTypeAny, {
5212
5212
  agentContext: string;
@@ -5216,8 +5216,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5216
5216
  fileTokenScores: Record<string, Record<string, number>>;
5217
5217
  knowledgeFiles: Record<string, string>;
5218
5218
  gitChanges: {
5219
- diff: string;
5220
5219
  status: string;
5220
+ diff: string;
5221
5221
  diffCached: string;
5222
5222
  lastCommitMessages: string;
5223
5223
  };
@@ -5238,7 +5238,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5238
5238
  userKnowledgeFiles?: Record<string, string> | undefined;
5239
5239
  };
5240
5240
  messageHistory: {
5241
- role: "user" | "assistant";
5242
5241
  content: string | ({
5243
5242
  type: "text";
5244
5243
  text: string;
@@ -5247,15 +5246,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5247
5246
  } | undefined;
5248
5247
  } | {
5249
5248
  type: "tool_use";
5250
- id: string;
5251
5249
  name: string;
5250
+ id: string;
5252
5251
  input: Record<string, any>;
5253
5252
  cache_control?: {
5254
5253
  type: "ephemeral";
5255
5254
  } | undefined;
5256
5255
  } | {
5257
- type: "tool_result";
5258
5256
  content: string;
5257
+ type: "tool_result";
5259
5258
  tool_use_id: string;
5260
5259
  cache_control?: {
5261
5260
  type: "ephemeral";
@@ -5271,6 +5270,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5271
5270
  type: "ephemeral";
5272
5271
  } | undefined;
5273
5272
  })[];
5273
+ role: "user" | "assistant";
5274
5274
  }[];
5275
5275
  }, {
5276
5276
  agentContext: string;
@@ -5280,8 +5280,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5280
5280
  fileTokenScores: Record<string, Record<string, number>>;
5281
5281
  knowledgeFiles: Record<string, string>;
5282
5282
  gitChanges: {
5283
- diff: string;
5284
5283
  status: string;
5284
+ diff: string;
5285
5285
  diffCached: string;
5286
5286
  lastCommitMessages: string;
5287
5287
  };
@@ -5302,7 +5302,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5302
5302
  userKnowledgeFiles?: Record<string, string> | undefined;
5303
5303
  };
5304
5304
  messageHistory: {
5305
- role: "user" | "assistant";
5306
5305
  content: string | ({
5307
5306
  type: "text";
5308
5307
  text: string;
@@ -5311,15 +5310,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5311
5310
  } | undefined;
5312
5311
  } | {
5313
5312
  type: "tool_use";
5314
- id: string;
5315
5313
  name: string;
5314
+ id: string;
5316
5315
  input: Record<string, any>;
5317
5316
  cache_control?: {
5318
5317
  type: "ephemeral";
5319
5318
  } | undefined;
5320
5319
  } | {
5321
- type: "tool_result";
5322
5320
  content: string;
5321
+ type: "tool_result";
5323
5322
  tool_use_id: string;
5324
5323
  cache_control?: {
5325
5324
  type: "ephemeral";
@@ -5335,6 +5334,7 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5335
5334
  type: "ephemeral";
5336
5335
  } | undefined;
5337
5336
  })[];
5337
+ role: "user" | "assistant";
5338
5338
  }[];
5339
5339
  }>;
5340
5340
  toolCalls: z.ZodArray<z.ZodObject<{
@@ -5342,12 +5342,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5342
5342
  parameters: z.ZodRecord<z.ZodString, z.ZodString>;
5343
5343
  id: z.ZodString;
5344
5344
  }, "strip", z.ZodTypeAny, {
5345
- id: string;
5346
5345
  name: string;
5346
+ id: string;
5347
5347
  parameters: Record<string, string>;
5348
5348
  }, {
5349
- id: string;
5350
5349
  name: string;
5350
+ id: string;
5351
5351
  parameters: Record<string, string>;
5352
5352
  }>, "many">;
5353
5353
  toolResults: z.ZodArray<z.ZodObject<{
@@ -5355,12 +5355,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5355
5355
  result: z.ZodString;
5356
5356
  id: z.ZodString;
5357
5357
  }, "strip", z.ZodTypeAny, {
5358
- id: string;
5359
5358
  name: string;
5359
+ id: string;
5360
5360
  result: string;
5361
5361
  }, {
5362
- id: string;
5363
5362
  name: string;
5363
+ id: string;
5364
5364
  result: string;
5365
5365
  }>, "many">;
5366
5366
  }, {
@@ -5381,8 +5381,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5381
5381
  fileTokenScores: Record<string, Record<string, number>>;
5382
5382
  knowledgeFiles: Record<string, string>;
5383
5383
  gitChanges: {
5384
- diff: string;
5385
5384
  status: string;
5385
+ diff: string;
5386
5386
  diffCached: string;
5387
5387
  lastCommitMessages: string;
5388
5388
  };
@@ -5403,7 +5403,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5403
5403
  userKnowledgeFiles?: Record<string, string> | undefined;
5404
5404
  };
5405
5405
  messageHistory: {
5406
- role: "user" | "assistant";
5407
5406
  content: string | ({
5408
5407
  type: "text";
5409
5408
  text: string;
@@ -5412,15 +5411,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5412
5411
  } | undefined;
5413
5412
  } | {
5414
5413
  type: "tool_use";
5415
- id: string;
5416
5414
  name: string;
5415
+ id: string;
5417
5416
  input: Record<string, any>;
5418
5417
  cache_control?: {
5419
5418
  type: "ephemeral";
5420
5419
  } | undefined;
5421
5420
  } | {
5422
- type: "tool_result";
5423
5421
  content: string;
5422
+ type: "tool_result";
5424
5423
  tool_use_id: string;
5425
5424
  cache_control?: {
5426
5425
  type: "ephemeral";
@@ -5436,16 +5435,17 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5436
5435
  type: "ephemeral";
5437
5436
  } | undefined;
5438
5437
  })[];
5438
+ role: "user" | "assistant";
5439
5439
  }[];
5440
5440
  };
5441
5441
  toolResults: {
5442
- id: string;
5443
5442
  name: string;
5443
+ id: string;
5444
5444
  result: string;
5445
5445
  }[];
5446
5446
  toolCalls: {
5447
- id: string;
5448
5447
  name: string;
5448
+ id: string;
5449
5449
  parameters: Record<string, string>;
5450
5450
  }[];
5451
5451
  usage?: number | undefined;
@@ -5465,8 +5465,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5465
5465
  fileTokenScores: Record<string, Record<string, number>>;
5466
5466
  knowledgeFiles: Record<string, string>;
5467
5467
  gitChanges: {
5468
- diff: string;
5469
5468
  status: string;
5469
+ diff: string;
5470
5470
  diffCached: string;
5471
5471
  lastCommitMessages: string;
5472
5472
  };
@@ -5487,7 +5487,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5487
5487
  userKnowledgeFiles?: Record<string, string> | undefined;
5488
5488
  };
5489
5489
  messageHistory: {
5490
- role: "user" | "assistant";
5491
5490
  content: string | ({
5492
5491
  type: "text";
5493
5492
  text: string;
@@ -5496,15 +5495,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5496
5495
  } | undefined;
5497
5496
  } | {
5498
5497
  type: "tool_use";
5499
- id: string;
5500
5498
  name: string;
5499
+ id: string;
5501
5500
  input: Record<string, any>;
5502
5501
  cache_control?: {
5503
5502
  type: "ephemeral";
5504
5503
  } | undefined;
5505
5504
  } | {
5506
- type: "tool_result";
5507
5505
  content: string;
5506
+ type: "tool_result";
5508
5507
  tool_use_id: string;
5509
5508
  cache_control?: {
5510
5509
  type: "ephemeral";
@@ -5520,16 +5519,17 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5520
5519
  type: "ephemeral";
5521
5520
  } | undefined;
5522
5521
  })[];
5522
+ role: "user" | "assistant";
5523
5523
  }[];
5524
5524
  };
5525
5525
  toolResults: {
5526
- id: string;
5527
5526
  name: string;
5527
+ id: string;
5528
5528
  result: string;
5529
5529
  }[];
5530
5530
  toolCalls: {
5531
- id: string;
5532
5531
  name: string;
5532
+ id: string;
5533
5533
  parameters: Record<string, string>;
5534
5534
  }[];
5535
5535
  usage?: number | undefined;
@@ -5559,12 +5559,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5559
5559
  id: z.ZodString;
5560
5560
  input: z.ZodRecord<z.ZodString, z.ZodAny>;
5561
5561
  }, "strip", z.ZodTypeAny, {
5562
- id: string;
5563
5562
  name: string;
5563
+ id: string;
5564
5564
  input: Record<string, any>;
5565
5565
  }, {
5566
- id: string;
5567
5566
  name: string;
5567
+ id: string;
5568
5568
  input: Record<string, any>;
5569
5569
  }>;
5570
5570
  changes: z.ZodArray<z.ZodObject<{
@@ -5572,26 +5572,26 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5572
5572
  path: z.ZodString;
5573
5573
  content: z.ZodString;
5574
5574
  }, "strip", z.ZodTypeAny, {
5575
- type: "patch" | "file";
5576
5575
  path: string;
5577
5576
  content: string;
5577
+ type: "file" | "patch";
5578
5578
  }, {
5579
- type: "patch" | "file";
5580
5579
  path: string;
5581
5580
  content: string;
5581
+ type: "file" | "patch";
5582
5582
  }>, "many">;
5583
5583
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
5584
5584
  type: z.ZodEnum<["patch", "file"]>;
5585
5585
  path: z.ZodString;
5586
5586
  content: z.ZodString;
5587
5587
  }, "strip", z.ZodTypeAny, {
5588
- type: "patch" | "file";
5589
5588
  path: string;
5590
5589
  content: string;
5590
+ type: "file" | "patch";
5591
5591
  }, {
5592
- type: "patch" | "file";
5593
5592
  path: string;
5594
5593
  content: string;
5594
+ type: "file" | "patch";
5595
5595
  }>, "many">;
5596
5596
  addedFileVersions: z.ZodArray<z.ZodObject<{
5597
5597
  path: z.ZodString;
@@ -5607,21 +5607,21 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5607
5607
  }, "strip", z.ZodTypeAny, {
5608
5608
  type: "tool-call";
5609
5609
  data: {
5610
- id: string;
5611
5610
  name: string;
5611
+ id: string;
5612
5612
  input: Record<string, any>;
5613
5613
  };
5614
5614
  userInputId: string;
5615
5615
  changesAlreadyApplied: {
5616
- type: "patch" | "file";
5617
5616
  path: string;
5618
5617
  content: string;
5618
+ type: "file" | "patch";
5619
5619
  }[];
5620
5620
  response: string;
5621
5621
  changes: {
5622
- type: "patch" | "file";
5623
5622
  path: string;
5624
5623
  content: string;
5624
+ type: "file" | "patch";
5625
5625
  }[];
5626
5626
  addedFileVersions: {
5627
5627
  path: string;
@@ -5631,21 +5631,21 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5631
5631
  }, {
5632
5632
  type: "tool-call";
5633
5633
  data: {
5634
- id: string;
5635
5634
  name: string;
5635
+ id: string;
5636
5636
  input: Record<string, any>;
5637
5637
  };
5638
5638
  userInputId: string;
5639
5639
  changesAlreadyApplied: {
5640
- type: "patch" | "file";
5641
5640
  path: string;
5642
5641
  content: string;
5642
+ type: "file" | "patch";
5643
5643
  }[];
5644
5644
  response: string;
5645
5645
  changes: {
5646
- type: "patch" | "file";
5647
5646
  path: string;
5648
5647
  content: string;
5648
+ type: "file" | "patch";
5649
5649
  }[];
5650
5650
  addedFileVersions: {
5651
5651
  path: string;
@@ -5730,11 +5730,11 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5730
5730
  type: z.ZodLiteral<"action-error">;
5731
5731
  message: z.ZodString;
5732
5732
  }, "strip", z.ZodTypeAny, {
5733
- type: "action-error";
5734
5733
  message: string;
5735
- }, {
5736
5734
  type: "action-error";
5735
+ }, {
5737
5736
  message: string;
5737
+ type: "action-error";
5738
5738
  }>, z.ZodObject<{
5739
5739
  type: z.ZodLiteral<"commit-message-response">;
5740
5740
  commitMessage: z.ZodString;
@@ -5767,15 +5767,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5767
5767
  type: "response-complete";
5768
5768
  userInputId: string;
5769
5769
  changesAlreadyApplied: {
5770
- type: "patch" | "file";
5771
5770
  path: string;
5772
5771
  content: string;
5772
+ type: "file" | "patch";
5773
5773
  }[];
5774
5774
  response: string;
5775
5775
  changes: {
5776
- type: "patch" | "file";
5777
5776
  path: string;
5778
5777
  content: string;
5778
+ type: "file" | "patch";
5779
5779
  }[];
5780
5780
  addedFileVersions: {
5781
5781
  path: string;
@@ -5799,8 +5799,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5799
5799
  fileTokenScores: Record<string, Record<string, number>>;
5800
5800
  knowledgeFiles: Record<string, string>;
5801
5801
  gitChanges: {
5802
- diff: string;
5803
5802
  status: string;
5803
+ diff: string;
5804
5804
  diffCached: string;
5805
5805
  lastCommitMessages: string;
5806
5806
  };
@@ -5821,7 +5821,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5821
5821
  userKnowledgeFiles?: Record<string, string> | undefined;
5822
5822
  };
5823
5823
  messageHistory: {
5824
- role: "user" | "assistant";
5825
5824
  content: string | ({
5826
5825
  type: "text";
5827
5826
  text: string;
@@ -5830,15 +5829,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5830
5829
  } | undefined;
5831
5830
  } | {
5832
5831
  type: "tool_use";
5833
- id: string;
5834
5832
  name: string;
5833
+ id: string;
5835
5834
  input: Record<string, any>;
5836
5835
  cache_control?: {
5837
5836
  type: "ephemeral";
5838
5837
  } | undefined;
5839
5838
  } | {
5840
- type: "tool_result";
5841
5839
  content: string;
5840
+ type: "tool_result";
5842
5841
  tool_use_id: string;
5843
5842
  cache_control?: {
5844
5843
  type: "ephemeral";
@@ -5854,16 +5853,17 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5854
5853
  type: "ephemeral";
5855
5854
  } | undefined;
5856
5855
  })[];
5856
+ role: "user" | "assistant";
5857
5857
  }[];
5858
5858
  };
5859
5859
  toolResults: {
5860
- id: string;
5861
5860
  name: string;
5861
+ id: string;
5862
5862
  result: string;
5863
5863
  }[];
5864
5864
  toolCalls: {
5865
- id: string;
5866
5865
  name: string;
5866
+ id: string;
5867
5867
  parameters: Record<string, string>;
5868
5868
  }[];
5869
5869
  usage?: number | undefined;
@@ -5883,21 +5883,21 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5883
5883
  } | {
5884
5884
  type: "tool-call";
5885
5885
  data: {
5886
- id: string;
5887
5886
  name: string;
5887
+ id: string;
5888
5888
  input: Record<string, any>;
5889
5889
  };
5890
5890
  userInputId: string;
5891
5891
  changesAlreadyApplied: {
5892
- type: "patch" | "file";
5893
5892
  path: string;
5894
5893
  content: string;
5894
+ type: "file" | "patch";
5895
5895
  }[];
5896
5896
  response: string;
5897
5897
  changes: {
5898
- type: "patch" | "file";
5899
5898
  path: string;
5900
5899
  content: string;
5900
+ type: "file" | "patch";
5901
5901
  }[];
5902
5902
  addedFileVersions: {
5903
5903
  path: string;
@@ -5913,8 +5913,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5913
5913
  isUpToDate: boolean;
5914
5914
  latestVersion: string;
5915
5915
  } | {
5916
- type: "action-error";
5917
5916
  message: string;
5917
+ type: "action-error";
5918
5918
  } | {
5919
5919
  type: "commit-message-response";
5920
5920
  commitMessage: string;
@@ -5941,15 +5941,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5941
5941
  type: "response-complete";
5942
5942
  userInputId: string;
5943
5943
  changesAlreadyApplied: {
5944
- type: "patch" | "file";
5945
5944
  path: string;
5946
5945
  content: string;
5946
+ type: "file" | "patch";
5947
5947
  }[];
5948
5948
  response: string;
5949
5949
  changes: {
5950
- type: "patch" | "file";
5951
5950
  path: string;
5952
5951
  content: string;
5952
+ type: "file" | "patch";
5953
5953
  }[];
5954
5954
  addedFileVersions: {
5955
5955
  path: string;
@@ -5973,8 +5973,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5973
5973
  fileTokenScores: Record<string, Record<string, number>>;
5974
5974
  knowledgeFiles: Record<string, string>;
5975
5975
  gitChanges: {
5976
- diff: string;
5977
5976
  status: string;
5977
+ diff: string;
5978
5978
  diffCached: string;
5979
5979
  lastCommitMessages: string;
5980
5980
  };
@@ -5995,7 +5995,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
5995
5995
  userKnowledgeFiles?: Record<string, string> | undefined;
5996
5996
  };
5997
5997
  messageHistory: {
5998
- role: "user" | "assistant";
5999
5998
  content: string | ({
6000
5999
  type: "text";
6001
6000
  text: string;
@@ -6004,15 +6003,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
6004
6003
  } | undefined;
6005
6004
  } | {
6006
6005
  type: "tool_use";
6007
- id: string;
6008
6006
  name: string;
6007
+ id: string;
6009
6008
  input: Record<string, any>;
6010
6009
  cache_control?: {
6011
6010
  type: "ephemeral";
6012
6011
  } | undefined;
6013
6012
  } | {
6014
- type: "tool_result";
6015
6013
  content: string;
6014
+ type: "tool_result";
6016
6015
  tool_use_id: string;
6017
6016
  cache_control?: {
6018
6017
  type: "ephemeral";
@@ -6028,16 +6027,17 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
6028
6027
  type: "ephemeral";
6029
6028
  } | undefined;
6030
6029
  })[];
6030
+ role: "user" | "assistant";
6031
6031
  }[];
6032
6032
  };
6033
6033
  toolResults: {
6034
- id: string;
6035
6034
  name: string;
6035
+ id: string;
6036
6036
  result: string;
6037
6037
  }[];
6038
6038
  toolCalls: {
6039
- id: string;
6040
6039
  name: string;
6040
+ id: string;
6041
6041
  parameters: Record<string, string>;
6042
6042
  }[];
6043
6043
  usage?: number | undefined;
@@ -6057,21 +6057,21 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
6057
6057
  } | {
6058
6058
  type: "tool-call";
6059
6059
  data: {
6060
- id: string;
6061
6060
  name: string;
6061
+ id: string;
6062
6062
  input: Record<string, any>;
6063
6063
  };
6064
6064
  userInputId: string;
6065
6065
  changesAlreadyApplied: {
6066
- type: "patch" | "file";
6067
6066
  path: string;
6068
6067
  content: string;
6068
+ type: "file" | "patch";
6069
6069
  }[];
6070
6070
  response: string;
6071
6071
  changes: {
6072
- type: "patch" | "file";
6073
6072
  path: string;
6074
6073
  content: string;
6074
+ type: "file" | "patch";
6075
6075
  }[];
6076
6076
  addedFileVersions: {
6077
6077
  path: string;
@@ -6087,8 +6087,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
6087
6087
  isUpToDate: boolean;
6088
6088
  latestVersion: string;
6089
6089
  } | {
6090
- type: "action-error";
6091
6090
  message: string;
6091
+ type: "action-error";
6092
6092
  } | {
6093
6093
  type: "commit-message-response";
6094
6094
  commitMessage: string;