codebuff 1.0.172 → 1.0.174

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 (70) hide show
  1. package/dist/browser-runner.js +7 -17
  2. package/dist/browser-runner.js.map +1 -1
  3. package/dist/chat-storage.js +7 -17
  4. package/dist/chat-storage.js.map +1 -1
  5. package/dist/checkpoint-file-manager.d.ts +14 -3
  6. package/dist/checkpoint-file-manager.js +72 -58
  7. package/dist/checkpoint-file-manager.js.map +1 -1
  8. package/dist/checkpoints.d.ts +2 -0
  9. package/dist/checkpoints.js +22 -19
  10. package/dist/checkpoints.js.map +1 -1
  11. package/dist/cli.d.ts +1 -1
  12. package/dist/cli.js +13 -18
  13. package/dist/cli.js.map +1 -1
  14. package/dist/client.d.ts +12 -12
  15. package/dist/client.js +11 -22
  16. package/dist/client.js.map +1 -1
  17. package/dist/code-map/languages.js +7 -17
  18. package/dist/code-map/languages.js.map +1 -1
  19. package/dist/code-map/parse.js +7 -17
  20. package/dist/code-map/parse.js.map +1 -1
  21. package/dist/code-map/tsconfig.tsbuildinfo +1 -1
  22. package/dist/common/actions.d.ts +168 -168
  23. package/dist/common/advanced-analyzer.d.ts +19 -0
  24. package/dist/common/advanced-analyzer.js +140 -0
  25. package/dist/common/advanced-analyzer.js.map +1 -0
  26. package/dist/common/browser-actions.d.ts +44 -44
  27. package/dist/common/constants.d.ts +3 -3
  28. package/dist/common/constants.js +1 -8
  29. package/dist/common/constants.js.map +1 -1
  30. package/dist/common/message-image-handling.d.ts +41 -0
  31. package/dist/common/message-image-handling.js +57 -0
  32. package/dist/common/message-image-handling.js.map +1 -0
  33. package/dist/common/types/agent-state.d.ts +26 -26
  34. package/dist/common/types/message.d.ts +14 -14
  35. package/dist/common/util/credentials.d.ts +2 -2
  36. package/dist/common/util/process-stream.d.ts +8 -0
  37. package/dist/common/util/process-stream.js +102 -0
  38. package/dist/common/util/process-stream.js.map +1 -0
  39. package/dist/common/websockets/websocket-schema.d.ts +451 -451
  40. package/dist/create-template-project.js +7 -17
  41. package/dist/create-template-project.js.map +1 -1
  42. package/dist/index.js +2 -4
  43. package/dist/index.js.map +1 -1
  44. package/dist/menu.js +7 -17
  45. package/dist/menu.js.map +1 -1
  46. package/dist/project-files.js +7 -17
  47. package/dist/project-files.js.map +1 -1
  48. package/dist/tool-handlers.js +7 -17
  49. package/dist/tool-handlers.js.map +1 -1
  50. package/dist/utils/spinner.js +7 -17
  51. package/dist/utils/spinner.js.map +1 -1
  52. package/dist/utils/terminal.js +7 -17
  53. package/dist/utils/terminal.js.map +1 -1
  54. package/dist/web-scraper.js +4 -8
  55. package/dist/web-scraper.js.map +1 -1
  56. package/dist/worker-script-project-context.js +5 -1
  57. package/dist/worker-script-project-context.js.map +1 -1
  58. package/package.json +2 -3
  59. package/dist/common/logger.d.ts +0 -1
  60. package/dist/common/logger.js +0 -7
  61. package/dist/common/logger.js.map +0 -1
  62. package/dist/common/util/constants.d.ts +0 -1
  63. package/dist/common/util/constants.js +0 -7
  64. package/dist/common/util/constants.js.map +0 -1
  65. package/dist/common/util/helpers.d.ts +0 -1
  66. package/dist/common/util/helpers.js +0 -6
  67. package/dist/common/util/helpers.js.map +0 -1
  68. package/dist/common/util/token-counter.d.ts +0 -3
  69. package/dist/common/util/token-counter.js +0 -27
  70. package/dist/common/util/token-counter.js.map +0 -1
@@ -32,12 +32,12 @@ export declare const ToolCallSchema: z.ZodObject<{
32
32
  id: z.ZodString;
33
33
  input: z.ZodRecord<z.ZodString, z.ZodAny>;
34
34
  }, "strip", z.ZodTypeAny, {
35
- name: string;
36
35
  id: string;
36
+ name: string;
37
37
  input: Record<string, any>;
38
38
  }, {
39
- name: string;
40
39
  id: string;
40
+ name: string;
41
41
  input: Record<string, any>;
42
42
  }>;
43
43
  export type ToolCall = z.infer<typeof ToolCallSchema>;
@@ -84,16 +84,16 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
84
84
  }>>;
85
85
  }, "strip", z.ZodTypeAny, {
86
86
  type: "tool_use";
87
- name: string;
88
87
  id: string;
88
+ name: string;
89
89
  input: Record<string, any>;
90
90
  cache_control?: {
91
91
  type: "ephemeral";
92
92
  } | undefined;
93
93
  }, {
94
94
  type: "tool_use";
95
- name: string;
96
95
  id: string;
96
+ name: string;
97
97
  input: Record<string, any>;
98
98
  cache_control?: {
99
99
  type: "ephemeral";
@@ -131,12 +131,12 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
131
131
  data: z.ZodString;
132
132
  }, "strip", z.ZodTypeAny, {
133
133
  type: "base64";
134
- data: string;
135
134
  media_type: "image/jpeg";
135
+ data: string;
136
136
  }, {
137
137
  type: "base64";
138
- data: string;
139
138
  media_type: "image/jpeg";
139
+ data: string;
140
140
  }>;
141
141
  cache_control: z.ZodOptional<z.ZodObject<{
142
142
  type: z.ZodLiteral<"ephemeral">;
@@ -149,8 +149,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
149
149
  type: "image";
150
150
  source: {
151
151
  type: "base64";
152
- data: string;
153
152
  media_type: "image/jpeg";
153
+ data: string;
154
154
  };
155
155
  cache_control?: {
156
156
  type: "ephemeral";
@@ -159,14 +159,15 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
159
159
  type: "image";
160
160
  source: {
161
161
  type: "base64";
162
- data: string;
163
162
  media_type: "image/jpeg";
163
+ data: string;
164
164
  };
165
165
  cache_control?: {
166
166
  type: "ephemeral";
167
167
  } | undefined;
168
168
  }>]>, "many">]>;
169
169
  }, "strip", z.ZodTypeAny, {
170
+ role: "user" | "assistant";
170
171
  content: string | ({
171
172
  type: "text";
172
173
  text: string;
@@ -175,8 +176,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
175
176
  } | undefined;
176
177
  } | {
177
178
  type: "tool_use";
178
- name: string;
179
179
  id: string;
180
+ name: string;
180
181
  input: Record<string, any>;
181
182
  cache_control?: {
182
183
  type: "ephemeral";
@@ -192,15 +193,15 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
192
193
  type: "image";
193
194
  source: {
194
195
  type: "base64";
195
- data: string;
196
196
  media_type: "image/jpeg";
197
+ data: string;
197
198
  };
198
199
  cache_control?: {
199
200
  type: "ephemeral";
200
201
  } | undefined;
201
202
  })[];
202
- role: "user" | "assistant";
203
203
  }, {
204
+ role: "user" | "assistant";
204
205
  content: string | ({
205
206
  type: "text";
206
207
  text: string;
@@ -209,8 +210,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
209
210
  } | undefined;
210
211
  } | {
211
212
  type: "tool_use";
212
- name: string;
213
213
  id: string;
214
+ name: string;
214
215
  input: Record<string, any>;
215
216
  cache_control?: {
216
217
  type: "ephemeral";
@@ -226,14 +227,13 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
226
227
  type: "image";
227
228
  source: {
228
229
  type: "base64";
229
- data: string;
230
230
  media_type: "image/jpeg";
231
+ data: string;
231
232
  };
232
233
  cache_control?: {
233
234
  type: "ephemeral";
234
235
  } | undefined;
235
236
  })[];
236
- role: "user" | "assistant";
237
237
  }>, "many">;
238
238
  fileContext: z.ZodObject<{
239
239
  currentWorkingDirectory: z.ZodString;
@@ -360,9 +360,37 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
360
360
  costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
361
361
  }, "strip", z.ZodTypeAny, {
362
362
  type: "user-input";
363
+ fileContext: {
364
+ currentWorkingDirectory: string;
365
+ fileTree: import("./util/file").FileTreeNode[];
366
+ fileTokenScores: Record<string, Record<string, number>>;
367
+ knowledgeFiles: Record<string, string>;
368
+ gitChanges: {
369
+ diff: string;
370
+ status: string;
371
+ diffCached: string;
372
+ lastCommitMessages: string;
373
+ };
374
+ changesSinceLastChat: Record<string, string>;
375
+ shellConfigFiles: Record<string, string>;
376
+ systemInfo: {
377
+ platform: string;
378
+ shell: string;
379
+ nodeVersion: string;
380
+ arch: string;
381
+ homedir: string;
382
+ cpus: number;
383
+ };
384
+ fileVersions: {
385
+ path: string;
386
+ content: string;
387
+ }[][];
388
+ userKnowledgeFiles?: Record<string, string> | undefined;
389
+ };
363
390
  fingerprintId: string;
364
391
  userInputId: string;
365
392
  messages: {
393
+ role: "user" | "assistant";
366
394
  content: string | ({
367
395
  type: "text";
368
396
  text: string;
@@ -371,8 +399,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
371
399
  } | undefined;
372
400
  } | {
373
401
  type: "tool_use";
374
- name: string;
375
402
  id: string;
403
+ name: string;
376
404
  input: Record<string, any>;
377
405
  cache_control?: {
378
406
  type: "ephemeral";
@@ -388,15 +416,23 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
388
416
  type: "image";
389
417
  source: {
390
418
  type: "base64";
391
- data: string;
392
419
  media_type: "image/jpeg";
420
+ data: string;
393
421
  };
394
422
  cache_control?: {
395
423
  type: "ephemeral";
396
424
  } | undefined;
397
425
  })[];
398
- role: "user" | "assistant";
399
426
  }[];
427
+ changesAlreadyApplied: {
428
+ type: "patch" | "file";
429
+ path: string;
430
+ content: string;
431
+ }[];
432
+ costMode: "lite" | "normal" | "max";
433
+ authToken?: string | undefined;
434
+ }, {
435
+ type: "user-input";
400
436
  fileContext: {
401
437
  currentWorkingDirectory: string;
402
438
  fileTree: import("./util/file").FileTreeNode[];
@@ -424,18 +460,10 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
424
460
  }[][];
425
461
  userKnowledgeFiles?: Record<string, string> | undefined;
426
462
  };
427
- changesAlreadyApplied: {
428
- type: "patch" | "file";
429
- path: string;
430
- content: string;
431
- }[];
432
- costMode: "lite" | "normal" | "max";
433
- authToken?: string | undefined;
434
- }, {
435
- type: "user-input";
436
463
  fingerprintId: string;
437
464
  userInputId: string;
438
465
  messages: {
466
+ role: "user" | "assistant";
439
467
  content: string | ({
440
468
  type: "text";
441
469
  text: string;
@@ -444,8 +472,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
444
472
  } | undefined;
445
473
  } | {
446
474
  type: "tool_use";
447
- name: string;
448
475
  id: string;
476
+ name: string;
449
477
  input: Record<string, any>;
450
478
  cache_control?: {
451
479
  type: "ephemeral";
@@ -461,42 +489,14 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
461
489
  type: "image";
462
490
  source: {
463
491
  type: "base64";
464
- data: string;
465
492
  media_type: "image/jpeg";
493
+ data: string;
466
494
  };
467
495
  cache_control?: {
468
496
  type: "ephemeral";
469
497
  } | undefined;
470
498
  })[];
471
- role: "user" | "assistant";
472
499
  }[];
473
- fileContext: {
474
- currentWorkingDirectory: string;
475
- fileTree: import("./util/file").FileTreeNode[];
476
- fileTokenScores: Record<string, Record<string, number>>;
477
- knowledgeFiles: Record<string, string>;
478
- gitChanges: {
479
- diff: string;
480
- status: string;
481
- diffCached: string;
482
- lastCommitMessages: string;
483
- };
484
- changesSinceLastChat: Record<string, string>;
485
- shellConfigFiles: Record<string, string>;
486
- systemInfo: {
487
- platform: string;
488
- shell: string;
489
- nodeVersion: string;
490
- arch: string;
491
- homedir: string;
492
- cpus: number;
493
- };
494
- fileVersions: {
495
- path: string;
496
- content: string;
497
- }[][];
498
- userKnowledgeFiles?: Record<string, string> | undefined;
499
- };
500
500
  changesAlreadyApplied: {
501
501
  type: "patch" | "file";
502
502
  path: string;
@@ -660,16 +660,16 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
660
660
  }>>;
661
661
  }, "strip", z.ZodTypeAny, {
662
662
  type: "tool_use";
663
- name: string;
664
663
  id: string;
664
+ name: string;
665
665
  input: Record<string, any>;
666
666
  cache_control?: {
667
667
  type: "ephemeral";
668
668
  } | undefined;
669
669
  }, {
670
670
  type: "tool_use";
671
- name: string;
672
671
  id: string;
672
+ name: string;
673
673
  input: Record<string, any>;
674
674
  cache_control?: {
675
675
  type: "ephemeral";
@@ -707,12 +707,12 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
707
707
  data: z.ZodString;
708
708
  }, "strip", z.ZodTypeAny, {
709
709
  type: "base64";
710
- data: string;
711
710
  media_type: "image/jpeg";
711
+ data: string;
712
712
  }, {
713
713
  type: "base64";
714
- data: string;
715
714
  media_type: "image/jpeg";
715
+ data: string;
716
716
  }>;
717
717
  cache_control: z.ZodOptional<z.ZodObject<{
718
718
  type: z.ZodLiteral<"ephemeral">;
@@ -725,8 +725,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
725
725
  type: "image";
726
726
  source: {
727
727
  type: "base64";
728
- data: string;
729
728
  media_type: "image/jpeg";
729
+ data: string;
730
730
  };
731
731
  cache_control?: {
732
732
  type: "ephemeral";
@@ -735,14 +735,15 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
735
735
  type: "image";
736
736
  source: {
737
737
  type: "base64";
738
- data: string;
739
738
  media_type: "image/jpeg";
739
+ data: string;
740
740
  };
741
741
  cache_control?: {
742
742
  type: "ephemeral";
743
743
  } | undefined;
744
744
  }>]>, "many">]>;
745
745
  }, "strip", z.ZodTypeAny, {
746
+ role: "user" | "assistant";
746
747
  content: string | ({
747
748
  type: "text";
748
749
  text: string;
@@ -751,8 +752,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
751
752
  } | undefined;
752
753
  } | {
753
754
  type: "tool_use";
754
- name: string;
755
755
  id: string;
756
+ name: string;
756
757
  input: Record<string, any>;
757
758
  cache_control?: {
758
759
  type: "ephemeral";
@@ -768,15 +769,15 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
768
769
  type: "image";
769
770
  source: {
770
771
  type: "base64";
771
- data: string;
772
772
  media_type: "image/jpeg";
773
+ data: string;
773
774
  };
774
775
  cache_control?: {
775
776
  type: "ephemeral";
776
777
  } | undefined;
777
778
  })[];
778
- role: "user" | "assistant";
779
779
  }, {
780
+ role: "user" | "assistant";
780
781
  content: string | ({
781
782
  type: "text";
782
783
  text: string;
@@ -785,8 +786,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
785
786
  } | undefined;
786
787
  } | {
787
788
  type: "tool_use";
788
- name: string;
789
789
  id: string;
790
+ name: string;
790
791
  input: Record<string, any>;
791
792
  cache_control?: {
792
793
  type: "ephemeral";
@@ -802,16 +803,16 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
802
803
  type: "image";
803
804
  source: {
804
805
  type: "base64";
805
- data: string;
806
806
  media_type: "image/jpeg";
807
+ data: string;
807
808
  };
808
809
  cache_control?: {
809
810
  type: "ephemeral";
810
811
  } | undefined;
811
812
  })[];
812
- role: "user" | "assistant";
813
813
  }>, "many">;
814
814
  }, "strip", z.ZodTypeAny, {
815
+ agentContext: string;
815
816
  fileContext: {
816
817
  currentWorkingDirectory: string;
817
818
  fileTree: import("./util/file").FileTreeNode[];
@@ -839,8 +840,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
839
840
  }[][];
840
841
  userKnowledgeFiles?: Record<string, string> | undefined;
841
842
  };
842
- agentContext: string;
843
843
  messageHistory: {
844
+ role: "user" | "assistant";
844
845
  content: string | ({
845
846
  type: "text";
846
847
  text: string;
@@ -849,8 +850,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
849
850
  } | undefined;
850
851
  } | {
851
852
  type: "tool_use";
852
- name: string;
853
853
  id: string;
854
+ name: string;
854
855
  input: Record<string, any>;
855
856
  cache_control?: {
856
857
  type: "ephemeral";
@@ -866,16 +867,16 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
866
867
  type: "image";
867
868
  source: {
868
869
  type: "base64";
869
- data: string;
870
870
  media_type: "image/jpeg";
871
+ data: string;
871
872
  };
872
873
  cache_control?: {
873
874
  type: "ephemeral";
874
875
  } | undefined;
875
876
  })[];
876
- role: "user" | "assistant";
877
877
  }[];
878
878
  }, {
879
+ agentContext: string;
879
880
  fileContext: {
880
881
  currentWorkingDirectory: string;
881
882
  fileTree: import("./util/file").FileTreeNode[];
@@ -903,8 +904,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
903
904
  }[][];
904
905
  userKnowledgeFiles?: Record<string, string> | undefined;
905
906
  };
906
- agentContext: string;
907
907
  messageHistory: {
908
+ role: "user" | "assistant";
908
909
  content: string | ({
909
910
  type: "text";
910
911
  text: string;
@@ -913,8 +914,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
913
914
  } | undefined;
914
915
  } | {
915
916
  type: "tool_use";
916
- name: string;
917
917
  id: string;
918
+ name: string;
918
919
  input: Record<string, any>;
919
920
  cache_control?: {
920
921
  type: "ephemeral";
@@ -930,14 +931,13 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
930
931
  type: "image";
931
932
  source: {
932
933
  type: "base64";
933
- data: string;
934
934
  media_type: "image/jpeg";
935
+ data: string;
935
936
  };
936
937
  cache_control?: {
937
938
  type: "ephemeral";
938
939
  } | undefined;
939
940
  })[];
940
- role: "user" | "assistant";
941
941
  }[];
942
942
  }>;
943
943
  toolResults: z.ZodArray<z.ZodObject<{
@@ -945,12 +945,12 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
945
945
  result: z.ZodString;
946
946
  id: z.ZodString;
947
947
  }, "strip", z.ZodTypeAny, {
948
- name: string;
949
948
  id: string;
949
+ name: string;
950
950
  result: string;
951
951
  }, {
952
- name: string;
953
952
  id: string;
953
+ name: string;
954
954
  result: string;
955
955
  }>, "many">;
956
956
  }, "strip", z.ZodTypeAny, {
@@ -959,6 +959,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
959
959
  costMode: "lite" | "normal" | "max";
960
960
  promptId: string;
961
961
  agentState: {
962
+ agentContext: string;
962
963
  fileContext: {
963
964
  currentWorkingDirectory: string;
964
965
  fileTree: import("./util/file").FileTreeNode[];
@@ -986,8 +987,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
986
987
  }[][];
987
988
  userKnowledgeFiles?: Record<string, string> | undefined;
988
989
  };
989
- agentContext: string;
990
990
  messageHistory: {
991
+ role: "user" | "assistant";
991
992
  content: string | ({
992
993
  type: "text";
993
994
  text: string;
@@ -996,8 +997,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
996
997
  } | undefined;
997
998
  } | {
998
999
  type: "tool_use";
999
- name: string;
1000
1000
  id: string;
1001
+ name: string;
1001
1002
  input: Record<string, any>;
1002
1003
  cache_control?: {
1003
1004
  type: "ephemeral";
@@ -1013,19 +1014,18 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1013
1014
  type: "image";
1014
1015
  source: {
1015
1016
  type: "base64";
1016
- data: string;
1017
1017
  media_type: "image/jpeg";
1018
+ data: string;
1018
1019
  };
1019
1020
  cache_control?: {
1020
1021
  type: "ephemeral";
1021
1022
  } | undefined;
1022
1023
  })[];
1023
- role: "user" | "assistant";
1024
1024
  }[];
1025
1025
  };
1026
1026
  toolResults: {
1027
- name: string;
1028
1027
  id: string;
1028
+ name: string;
1029
1029
  result: string;
1030
1030
  }[];
1031
1031
  authToken?: string | undefined;
@@ -1035,6 +1035,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1035
1035
  fingerprintId: string;
1036
1036
  promptId: string;
1037
1037
  agentState: {
1038
+ agentContext: string;
1038
1039
  fileContext: {
1039
1040
  currentWorkingDirectory: string;
1040
1041
  fileTree: import("./util/file").FileTreeNode[];
@@ -1062,8 +1063,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1062
1063
  }[][];
1063
1064
  userKnowledgeFiles?: Record<string, string> | undefined;
1064
1065
  };
1065
- agentContext: string;
1066
1066
  messageHistory: {
1067
+ role: "user" | "assistant";
1067
1068
  content: string | ({
1068
1069
  type: "text";
1069
1070
  text: string;
@@ -1072,8 +1073,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1072
1073
  } | undefined;
1073
1074
  } | {
1074
1075
  type: "tool_use";
1075
- name: string;
1076
1076
  id: string;
1077
+ name: string;
1077
1078
  input: Record<string, any>;
1078
1079
  cache_control?: {
1079
1080
  type: "ephemeral";
@@ -1089,19 +1090,18 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1089
1090
  type: "image";
1090
1091
  source: {
1091
1092
  type: "base64";
1092
- data: string;
1093
1093
  media_type: "image/jpeg";
1094
+ data: string;
1094
1095
  };
1095
1096
  cache_control?: {
1096
1097
  type: "ephemeral";
1097
1098
  } | undefined;
1098
1099
  })[];
1099
- role: "user" | "assistant";
1100
1100
  }[];
1101
1101
  };
1102
1102
  toolResults: {
1103
- name: string;
1104
1103
  id: string;
1104
+ name: string;
1105
1105
  result: string;
1106
1106
  }[];
1107
1107
  authToken?: string | undefined;
@@ -1234,7 +1234,6 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1234
1234
  }>;
1235
1235
  }, "strip", z.ZodTypeAny, {
1236
1236
  type: "init";
1237
- fingerprintId: string;
1238
1237
  fileContext: {
1239
1238
  currentWorkingDirectory: string;
1240
1239
  fileTree: import("./util/file").FileTreeNode[];
@@ -1262,10 +1261,10 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1262
1261
  }[][];
1263
1262
  userKnowledgeFiles?: Record<string, string> | undefined;
1264
1263
  };
1264
+ fingerprintId: string;
1265
1265
  authToken?: string | undefined;
1266
1266
  }, {
1267
1267
  type: "init";
1268
- fingerprintId: string;
1269
1268
  fileContext: {
1270
1269
  currentWorkingDirectory: string;
1271
1270
  fileTree: import("./util/file").FileTreeNode[];
@@ -1293,6 +1292,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1293
1292
  }[][];
1294
1293
  userKnowledgeFiles?: Record<string, string> | undefined;
1295
1294
  };
1295
+ fingerprintId: string;
1296
1296
  authToken?: string | undefined;
1297
1297
  }>, z.ZodObject<{
1298
1298
  type: z.ZodLiteral<"usage">;
@@ -1628,16 +1628,16 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
1628
1628
  }>>;
1629
1629
  }, "strip", z.ZodTypeAny, {
1630
1630
  type: "tool_use";
1631
- name: string;
1632
1631
  id: string;
1632
+ name: string;
1633
1633
  input: Record<string, any>;
1634
1634
  cache_control?: {
1635
1635
  type: "ephemeral";
1636
1636
  } | undefined;
1637
1637
  }, {
1638
1638
  type: "tool_use";
1639
- name: string;
1640
1639
  id: string;
1640
+ name: string;
1641
1641
  input: Record<string, any>;
1642
1642
  cache_control?: {
1643
1643
  type: "ephemeral";
@@ -1675,12 +1675,12 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
1675
1675
  data: z.ZodString;
1676
1676
  }, "strip", z.ZodTypeAny, {
1677
1677
  type: "base64";
1678
- data: string;
1679
1678
  media_type: "image/jpeg";
1679
+ data: string;
1680
1680
  }, {
1681
1681
  type: "base64";
1682
- data: string;
1683
1682
  media_type: "image/jpeg";
1683
+ data: string;
1684
1684
  }>;
1685
1685
  cache_control: z.ZodOptional<z.ZodObject<{
1686
1686
  type: z.ZodLiteral<"ephemeral">;
@@ -1693,8 +1693,8 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
1693
1693
  type: "image";
1694
1694
  source: {
1695
1695
  type: "base64";
1696
- data: string;
1697
1696
  media_type: "image/jpeg";
1697
+ data: string;
1698
1698
  };
1699
1699
  cache_control?: {
1700
1700
  type: "ephemeral";
@@ -1703,14 +1703,15 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
1703
1703
  type: "image";
1704
1704
  source: {
1705
1705
  type: "base64";
1706
- data: string;
1707
1706
  media_type: "image/jpeg";
1707
+ data: string;
1708
1708
  };
1709
1709
  cache_control?: {
1710
1710
  type: "ephemeral";
1711
1711
  } | undefined;
1712
1712
  }>]>, "many">]>;
1713
1713
  }, "strip", z.ZodTypeAny, {
1714
+ role: "user" | "assistant";
1714
1715
  content: string | ({
1715
1716
  type: "text";
1716
1717
  text: string;
@@ -1719,8 +1720,8 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
1719
1720
  } | undefined;
1720
1721
  } | {
1721
1722
  type: "tool_use";
1722
- name: string;
1723
1723
  id: string;
1724
+ name: string;
1724
1725
  input: Record<string, any>;
1725
1726
  cache_control?: {
1726
1727
  type: "ephemeral";
@@ -1736,15 +1737,15 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
1736
1737
  type: "image";
1737
1738
  source: {
1738
1739
  type: "base64";
1739
- data: string;
1740
1740
  media_type: "image/jpeg";
1741
+ data: string;
1741
1742
  };
1742
1743
  cache_control?: {
1743
1744
  type: "ephemeral";
1744
1745
  } | undefined;
1745
1746
  })[];
1746
- role: "user" | "assistant";
1747
1747
  }, {
1748
+ role: "user" | "assistant";
1748
1749
  content: string | ({
1749
1750
  type: "text";
1750
1751
  text: string;
@@ -1753,8 +1754,8 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
1753
1754
  } | undefined;
1754
1755
  } | {
1755
1756
  type: "tool_use";
1756
- name: string;
1757
1757
  id: string;
1758
+ name: string;
1758
1759
  input: Record<string, any>;
1759
1760
  cache_control?: {
1760
1761
  type: "ephemeral";
@@ -1770,16 +1771,16 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
1770
1771
  type: "image";
1771
1772
  source: {
1772
1773
  type: "base64";
1773
- data: string;
1774
1774
  media_type: "image/jpeg";
1775
+ data: string;
1775
1776
  };
1776
1777
  cache_control?: {
1777
1778
  type: "ephemeral";
1778
1779
  } | undefined;
1779
1780
  })[];
1780
- role: "user" | "assistant";
1781
1781
  }>, "many">;
1782
1782
  }, "strip", z.ZodTypeAny, {
1783
+ agentContext: string;
1783
1784
  fileContext: {
1784
1785
  currentWorkingDirectory: string;
1785
1786
  fileTree: import("./util/file").FileTreeNode[];
@@ -1807,8 +1808,8 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
1807
1808
  }[][];
1808
1809
  userKnowledgeFiles?: Record<string, string> | undefined;
1809
1810
  };
1810
- agentContext: string;
1811
1811
  messageHistory: {
1812
+ role: "user" | "assistant";
1812
1813
  content: string | ({
1813
1814
  type: "text";
1814
1815
  text: string;
@@ -1817,8 +1818,8 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
1817
1818
  } | undefined;
1818
1819
  } | {
1819
1820
  type: "tool_use";
1820
- name: string;
1821
1821
  id: string;
1822
+ name: string;
1822
1823
  input: Record<string, any>;
1823
1824
  cache_control?: {
1824
1825
  type: "ephemeral";
@@ -1834,16 +1835,16 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
1834
1835
  type: "image";
1835
1836
  source: {
1836
1837
  type: "base64";
1837
- data: string;
1838
1838
  media_type: "image/jpeg";
1839
+ data: string;
1839
1840
  };
1840
1841
  cache_control?: {
1841
1842
  type: "ephemeral";
1842
1843
  } | undefined;
1843
1844
  })[];
1844
- role: "user" | "assistant";
1845
1845
  }[];
1846
1846
  }, {
1847
+ agentContext: string;
1847
1848
  fileContext: {
1848
1849
  currentWorkingDirectory: string;
1849
1850
  fileTree: import("./util/file").FileTreeNode[];
@@ -1871,8 +1872,8 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
1871
1872
  }[][];
1872
1873
  userKnowledgeFiles?: Record<string, string> | undefined;
1873
1874
  };
1874
- agentContext: string;
1875
1875
  messageHistory: {
1876
+ role: "user" | "assistant";
1876
1877
  content: string | ({
1877
1878
  type: "text";
1878
1879
  text: string;
@@ -1881,8 +1882,8 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
1881
1882
  } | undefined;
1882
1883
  } | {
1883
1884
  type: "tool_use";
1884
- name: string;
1885
1885
  id: string;
1886
+ name: string;
1886
1887
  input: Record<string, any>;
1887
1888
  cache_control?: {
1888
1889
  type: "ephemeral";
@@ -1898,14 +1899,13 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
1898
1899
  type: "image";
1899
1900
  source: {
1900
1901
  type: "base64";
1901
- data: string;
1902
1902
  media_type: "image/jpeg";
1903
+ data: string;
1903
1904
  };
1904
1905
  cache_control?: {
1905
1906
  type: "ephemeral";
1906
1907
  } | undefined;
1907
1908
  })[];
1908
- role: "user" | "assistant";
1909
1909
  }[];
1910
1910
  }>;
1911
1911
  toolCalls: z.ZodArray<z.ZodObject<{
@@ -1913,12 +1913,12 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
1913
1913
  parameters: z.ZodRecord<z.ZodString, z.ZodString>;
1914
1914
  id: z.ZodString;
1915
1915
  }, "strip", z.ZodTypeAny, {
1916
- name: string;
1917
1916
  id: string;
1917
+ name: string;
1918
1918
  parameters: Record<string, string>;
1919
1919
  }, {
1920
- name: string;
1921
1920
  id: string;
1921
+ name: string;
1922
1922
  parameters: Record<string, string>;
1923
1923
  }>, "many">;
1924
1924
  toolResults: z.ZodArray<z.ZodObject<{
@@ -1926,12 +1926,12 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
1926
1926
  result: z.ZodString;
1927
1927
  id: z.ZodString;
1928
1928
  }, "strip", z.ZodTypeAny, {
1929
- name: string;
1930
1929
  id: string;
1930
+ name: string;
1931
1931
  result: string;
1932
1932
  }, {
1933
- name: string;
1934
1933
  id: string;
1934
+ name: string;
1935
1935
  result: string;
1936
1936
  }>, "many">;
1937
1937
  }, {
@@ -1945,6 +1945,7 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
1945
1945
  type: "prompt-response";
1946
1946
  promptId: string;
1947
1947
  agentState: {
1948
+ agentContext: string;
1948
1949
  fileContext: {
1949
1950
  currentWorkingDirectory: string;
1950
1951
  fileTree: import("./util/file").FileTreeNode[];
@@ -1972,8 +1973,8 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
1972
1973
  }[][];
1973
1974
  userKnowledgeFiles?: Record<string, string> | undefined;
1974
1975
  };
1975
- agentContext: string;
1976
1976
  messageHistory: {
1977
+ role: "user" | "assistant";
1977
1978
  content: string | ({
1978
1979
  type: "text";
1979
1980
  text: string;
@@ -1982,8 +1983,8 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
1982
1983
  } | undefined;
1983
1984
  } | {
1984
1985
  type: "tool_use";
1985
- name: string;
1986
1986
  id: string;
1987
+ name: string;
1987
1988
  input: Record<string, any>;
1988
1989
  cache_control?: {
1989
1990
  type: "ephemeral";
@@ -1999,24 +2000,23 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
1999
2000
  type: "image";
2000
2001
  source: {
2001
2002
  type: "base64";
2002
- data: string;
2003
2003
  media_type: "image/jpeg";
2004
+ data: string;
2004
2005
  };
2005
2006
  cache_control?: {
2006
2007
  type: "ephemeral";
2007
2008
  } | undefined;
2008
2009
  })[];
2009
- role: "user" | "assistant";
2010
2010
  }[];
2011
2011
  };
2012
2012
  toolResults: {
2013
- name: string;
2014
2013
  id: string;
2014
+ name: string;
2015
2015
  result: string;
2016
2016
  }[];
2017
2017
  toolCalls: {
2018
- name: string;
2019
2018
  id: string;
2019
+ name: string;
2020
2020
  parameters: Record<string, string>;
2021
2021
  }[];
2022
2022
  usage?: number | undefined;
@@ -2029,6 +2029,7 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
2029
2029
  type: "prompt-response";
2030
2030
  promptId: string;
2031
2031
  agentState: {
2032
+ agentContext: string;
2032
2033
  fileContext: {
2033
2034
  currentWorkingDirectory: string;
2034
2035
  fileTree: import("./util/file").FileTreeNode[];
@@ -2056,8 +2057,8 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
2056
2057
  }[][];
2057
2058
  userKnowledgeFiles?: Record<string, string> | undefined;
2058
2059
  };
2059
- agentContext: string;
2060
2060
  messageHistory: {
2061
+ role: "user" | "assistant";
2061
2062
  content: string | ({
2062
2063
  type: "text";
2063
2064
  text: string;
@@ -2066,8 +2067,8 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
2066
2067
  } | undefined;
2067
2068
  } | {
2068
2069
  type: "tool_use";
2069
- name: string;
2070
2070
  id: string;
2071
+ name: string;
2071
2072
  input: Record<string, any>;
2072
2073
  cache_control?: {
2073
2074
  type: "ephemeral";
@@ -2083,24 +2084,23 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
2083
2084
  type: "image";
2084
2085
  source: {
2085
2086
  type: "base64";
2086
- data: string;
2087
2087
  media_type: "image/jpeg";
2088
+ data: string;
2088
2089
  };
2089
2090
  cache_control?: {
2090
2091
  type: "ephemeral";
2091
2092
  } | undefined;
2092
2093
  })[];
2093
- role: "user" | "assistant";
2094
2094
  }[];
2095
2095
  };
2096
2096
  toolResults: {
2097
- name: string;
2098
2097
  id: string;
2098
+ name: string;
2099
2099
  result: string;
2100
2100
  }[];
2101
2101
  toolCalls: {
2102
- name: string;
2103
2102
  id: string;
2103
+ name: string;
2104
2104
  parameters: Record<string, string>;
2105
2105
  }[];
2106
2106
  usage?: number | undefined;
@@ -2373,16 +2373,16 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2373
2373
  }>>;
2374
2374
  }, "strip", z.ZodTypeAny, {
2375
2375
  type: "tool_use";
2376
- name: string;
2377
2376
  id: string;
2377
+ name: string;
2378
2378
  input: Record<string, any>;
2379
2379
  cache_control?: {
2380
2380
  type: "ephemeral";
2381
2381
  } | undefined;
2382
2382
  }, {
2383
2383
  type: "tool_use";
2384
- name: string;
2385
2384
  id: string;
2385
+ name: string;
2386
2386
  input: Record<string, any>;
2387
2387
  cache_control?: {
2388
2388
  type: "ephemeral";
@@ -2420,12 +2420,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2420
2420
  data: z.ZodString;
2421
2421
  }, "strip", z.ZodTypeAny, {
2422
2422
  type: "base64";
2423
- data: string;
2424
2423
  media_type: "image/jpeg";
2424
+ data: string;
2425
2425
  }, {
2426
2426
  type: "base64";
2427
- data: string;
2428
2427
  media_type: "image/jpeg";
2428
+ data: string;
2429
2429
  }>;
2430
2430
  cache_control: z.ZodOptional<z.ZodObject<{
2431
2431
  type: z.ZodLiteral<"ephemeral">;
@@ -2438,8 +2438,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2438
2438
  type: "image";
2439
2439
  source: {
2440
2440
  type: "base64";
2441
- data: string;
2442
2441
  media_type: "image/jpeg";
2442
+ data: string;
2443
2443
  };
2444
2444
  cache_control?: {
2445
2445
  type: "ephemeral";
@@ -2448,14 +2448,15 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2448
2448
  type: "image";
2449
2449
  source: {
2450
2450
  type: "base64";
2451
- data: string;
2452
2451
  media_type: "image/jpeg";
2452
+ data: string;
2453
2453
  };
2454
2454
  cache_control?: {
2455
2455
  type: "ephemeral";
2456
2456
  } | undefined;
2457
2457
  }>]>, "many">]>;
2458
2458
  }, "strip", z.ZodTypeAny, {
2459
+ role: "user" | "assistant";
2459
2460
  content: string | ({
2460
2461
  type: "text";
2461
2462
  text: string;
@@ -2464,8 +2465,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2464
2465
  } | undefined;
2465
2466
  } | {
2466
2467
  type: "tool_use";
2467
- name: string;
2468
2468
  id: string;
2469
+ name: string;
2469
2470
  input: Record<string, any>;
2470
2471
  cache_control?: {
2471
2472
  type: "ephemeral";
@@ -2481,15 +2482,15 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2481
2482
  type: "image";
2482
2483
  source: {
2483
2484
  type: "base64";
2484
- data: string;
2485
2485
  media_type: "image/jpeg";
2486
+ data: string;
2486
2487
  };
2487
2488
  cache_control?: {
2488
2489
  type: "ephemeral";
2489
2490
  } | undefined;
2490
2491
  })[];
2491
- role: "user" | "assistant";
2492
2492
  }, {
2493
+ role: "user" | "assistant";
2493
2494
  content: string | ({
2494
2495
  type: "text";
2495
2496
  text: string;
@@ -2498,8 +2499,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2498
2499
  } | undefined;
2499
2500
  } | {
2500
2501
  type: "tool_use";
2501
- name: string;
2502
2502
  id: string;
2503
+ name: string;
2503
2504
  input: Record<string, any>;
2504
2505
  cache_control?: {
2505
2506
  type: "ephemeral";
@@ -2515,16 +2516,16 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2515
2516
  type: "image";
2516
2517
  source: {
2517
2518
  type: "base64";
2518
- data: string;
2519
2519
  media_type: "image/jpeg";
2520
+ data: string;
2520
2521
  };
2521
2522
  cache_control?: {
2522
2523
  type: "ephemeral";
2523
2524
  } | undefined;
2524
2525
  })[];
2525
- role: "user" | "assistant";
2526
2526
  }>, "many">;
2527
2527
  }, "strip", z.ZodTypeAny, {
2528
+ agentContext: string;
2528
2529
  fileContext: {
2529
2530
  currentWorkingDirectory: string;
2530
2531
  fileTree: import("./util/file").FileTreeNode[];
@@ -2552,8 +2553,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2552
2553
  }[][];
2553
2554
  userKnowledgeFiles?: Record<string, string> | undefined;
2554
2555
  };
2555
- agentContext: string;
2556
2556
  messageHistory: {
2557
+ role: "user" | "assistant";
2557
2558
  content: string | ({
2558
2559
  type: "text";
2559
2560
  text: string;
@@ -2562,8 +2563,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2562
2563
  } | undefined;
2563
2564
  } | {
2564
2565
  type: "tool_use";
2565
- name: string;
2566
2566
  id: string;
2567
+ name: string;
2567
2568
  input: Record<string, any>;
2568
2569
  cache_control?: {
2569
2570
  type: "ephemeral";
@@ -2579,16 +2580,16 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2579
2580
  type: "image";
2580
2581
  source: {
2581
2582
  type: "base64";
2582
- data: string;
2583
2583
  media_type: "image/jpeg";
2584
+ data: string;
2584
2585
  };
2585
2586
  cache_control?: {
2586
2587
  type: "ephemeral";
2587
2588
  } | undefined;
2588
2589
  })[];
2589
- role: "user" | "assistant";
2590
2590
  }[];
2591
2591
  }, {
2592
+ agentContext: string;
2592
2593
  fileContext: {
2593
2594
  currentWorkingDirectory: string;
2594
2595
  fileTree: import("./util/file").FileTreeNode[];
@@ -2616,8 +2617,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2616
2617
  }[][];
2617
2618
  userKnowledgeFiles?: Record<string, string> | undefined;
2618
2619
  };
2619
- agentContext: string;
2620
2620
  messageHistory: {
2621
+ role: "user" | "assistant";
2621
2622
  content: string | ({
2622
2623
  type: "text";
2623
2624
  text: string;
@@ -2626,8 +2627,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2626
2627
  } | undefined;
2627
2628
  } | {
2628
2629
  type: "tool_use";
2629
- name: string;
2630
2630
  id: string;
2631
+ name: string;
2631
2632
  input: Record<string, any>;
2632
2633
  cache_control?: {
2633
2634
  type: "ephemeral";
@@ -2643,14 +2644,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2643
2644
  type: "image";
2644
2645
  source: {
2645
2646
  type: "base64";
2646
- data: string;
2647
2647
  media_type: "image/jpeg";
2648
+ data: string;
2648
2649
  };
2649
2650
  cache_control?: {
2650
2651
  type: "ephemeral";
2651
2652
  } | undefined;
2652
2653
  })[];
2653
- role: "user" | "assistant";
2654
2654
  }[];
2655
2655
  }>;
2656
2656
  toolCalls: z.ZodArray<z.ZodObject<{
@@ -2658,12 +2658,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2658
2658
  parameters: z.ZodRecord<z.ZodString, z.ZodString>;
2659
2659
  id: z.ZodString;
2660
2660
  }, "strip", z.ZodTypeAny, {
2661
- name: string;
2662
2661
  id: string;
2662
+ name: string;
2663
2663
  parameters: Record<string, string>;
2664
2664
  }, {
2665
- name: string;
2666
2665
  id: string;
2666
+ name: string;
2667
2667
  parameters: Record<string, string>;
2668
2668
  }>, "many">;
2669
2669
  toolResults: z.ZodArray<z.ZodObject<{
@@ -2671,12 +2671,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2671
2671
  result: z.ZodString;
2672
2672
  id: z.ZodString;
2673
2673
  }, "strip", z.ZodTypeAny, {
2674
- name: string;
2675
2674
  id: string;
2675
+ name: string;
2676
2676
  result: string;
2677
2677
  }, {
2678
- name: string;
2679
2678
  id: string;
2679
+ name: string;
2680
2680
  result: string;
2681
2681
  }>, "many">;
2682
2682
  }, {
@@ -2690,6 +2690,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2690
2690
  type: "prompt-response";
2691
2691
  promptId: string;
2692
2692
  agentState: {
2693
+ agentContext: string;
2693
2694
  fileContext: {
2694
2695
  currentWorkingDirectory: string;
2695
2696
  fileTree: import("./util/file").FileTreeNode[];
@@ -2717,8 +2718,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2717
2718
  }[][];
2718
2719
  userKnowledgeFiles?: Record<string, string> | undefined;
2719
2720
  };
2720
- agentContext: string;
2721
2721
  messageHistory: {
2722
+ role: "user" | "assistant";
2722
2723
  content: string | ({
2723
2724
  type: "text";
2724
2725
  text: string;
@@ -2727,8 +2728,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2727
2728
  } | undefined;
2728
2729
  } | {
2729
2730
  type: "tool_use";
2730
- name: string;
2731
2731
  id: string;
2732
+ name: string;
2732
2733
  input: Record<string, any>;
2733
2734
  cache_control?: {
2734
2735
  type: "ephemeral";
@@ -2744,24 +2745,23 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2744
2745
  type: "image";
2745
2746
  source: {
2746
2747
  type: "base64";
2747
- data: string;
2748
2748
  media_type: "image/jpeg";
2749
+ data: string;
2749
2750
  };
2750
2751
  cache_control?: {
2751
2752
  type: "ephemeral";
2752
2753
  } | undefined;
2753
2754
  })[];
2754
- role: "user" | "assistant";
2755
2755
  }[];
2756
2756
  };
2757
2757
  toolResults: {
2758
- name: string;
2759
2758
  id: string;
2759
+ name: string;
2760
2760
  result: string;
2761
2761
  }[];
2762
2762
  toolCalls: {
2763
- name: string;
2764
2763
  id: string;
2764
+ name: string;
2765
2765
  parameters: Record<string, string>;
2766
2766
  }[];
2767
2767
  usage?: number | undefined;
@@ -2774,6 +2774,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2774
2774
  type: "prompt-response";
2775
2775
  promptId: string;
2776
2776
  agentState: {
2777
+ agentContext: string;
2777
2778
  fileContext: {
2778
2779
  currentWorkingDirectory: string;
2779
2780
  fileTree: import("./util/file").FileTreeNode[];
@@ -2801,8 +2802,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2801
2802
  }[][];
2802
2803
  userKnowledgeFiles?: Record<string, string> | undefined;
2803
2804
  };
2804
- agentContext: string;
2805
2805
  messageHistory: {
2806
+ role: "user" | "assistant";
2806
2807
  content: string | ({
2807
2808
  type: "text";
2808
2809
  text: string;
@@ -2811,8 +2812,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2811
2812
  } | undefined;
2812
2813
  } | {
2813
2814
  type: "tool_use";
2814
- name: string;
2815
2815
  id: string;
2816
+ name: string;
2816
2817
  input: Record<string, any>;
2817
2818
  cache_control?: {
2818
2819
  type: "ephemeral";
@@ -2828,24 +2829,23 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2828
2829
  type: "image";
2829
2830
  source: {
2830
2831
  type: "base64";
2831
- data: string;
2832
2832
  media_type: "image/jpeg";
2833
+ data: string;
2833
2834
  };
2834
2835
  cache_control?: {
2835
2836
  type: "ephemeral";
2836
2837
  } | undefined;
2837
2838
  })[];
2838
- role: "user" | "assistant";
2839
2839
  }[];
2840
2840
  };
2841
2841
  toolResults: {
2842
- name: string;
2843
2842
  id: string;
2843
+ name: string;
2844
2844
  result: string;
2845
2845
  }[];
2846
2846
  toolCalls: {
2847
- name: string;
2848
2847
  id: string;
2848
+ name: string;
2849
2849
  parameters: Record<string, string>;
2850
2850
  }[];
2851
2851
  usage?: number | undefined;
@@ -2875,12 +2875,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2875
2875
  id: z.ZodString;
2876
2876
  input: z.ZodRecord<z.ZodString, z.ZodAny>;
2877
2877
  }, "strip", z.ZodTypeAny, {
2878
- name: string;
2879
2878
  id: string;
2879
+ name: string;
2880
2880
  input: Record<string, any>;
2881
2881
  }, {
2882
- name: string;
2883
2882
  id: string;
2883
+ name: string;
2884
2884
  input: Record<string, any>;
2885
2885
  }>;
2886
2886
  changes: z.ZodArray<z.ZodObject<{
@@ -2923,8 +2923,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2923
2923
  }, "strip", z.ZodTypeAny, {
2924
2924
  type: "tool-call";
2925
2925
  data: {
2926
- name: string;
2927
2926
  id: string;
2927
+ name: string;
2928
2928
  input: Record<string, any>;
2929
2929
  };
2930
2930
  userInputId: string;
@@ -2947,8 +2947,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2947
2947
  }, {
2948
2948
  type: "tool-call";
2949
2949
  data: {
2950
- name: string;
2951
2950
  id: string;
2951
+ name: string;
2952
2952
  input: Record<string, any>;
2953
2953
  };
2954
2954
  userInputId: string;
@@ -2974,12 +2974,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2974
2974
  result: z.ZodString;
2975
2975
  }, "strip", z.ZodTypeAny, {
2976
2976
  type: "terminal-command-result";
2977
- userInputId: string;
2978
2977
  result: string;
2978
+ userInputId: string;
2979
2979
  }, {
2980
2980
  type: "terminal-command-result";
2981
- userInputId: string;
2982
2981
  result: string;
2982
+ userInputId: string;
2983
2983
  }>, z.ZodObject<{
2984
2984
  type: z.ZodLiteral<"npm-version-status">;
2985
2985
  isUpToDate: z.ZodBoolean;