codebuff 1.0.329 → 1.0.330

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.
@@ -5,12 +5,12 @@ export declare const FileChangeSchema: z.ZodObject<{
5
5
  content: z.ZodString;
6
6
  }, "strip", z.ZodTypeAny, {
7
7
  path: string;
8
- type: "patch" | "file";
9
8
  content: string;
9
+ type: "file" | "patch";
10
10
  }, {
11
11
  path: string;
12
- type: "patch" | "file";
13
12
  content: string;
13
+ type: "file" | "patch";
14
14
  }>;
15
15
  export type FileChange = z.infer<typeof FileChangeSchema>;
16
16
  export declare const CHANGES: z.ZodArray<z.ZodObject<{
@@ -19,12 +19,12 @@ export declare const CHANGES: z.ZodArray<z.ZodObject<{
19
19
  content: z.ZodString;
20
20
  }, "strip", z.ZodTypeAny, {
21
21
  path: string;
22
- type: "patch" | "file";
23
22
  content: string;
23
+ type: "file" | "patch";
24
24
  }, {
25
25
  path: string;
26
- type: "patch" | "file";
27
26
  content: string;
27
+ type: "file" | "patch";
28
28
  }>, "many">;
29
29
  export type FileChanges = z.infer<typeof CHANGES>;
30
30
  export declare const ToolCallSchema: z.ZodObject<{
@@ -51,7 +51,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
51
51
  agentState: z.ZodObject<{
52
52
  agentContext: z.ZodString;
53
53
  fileContext: z.ZodObject<{
54
- currentWorkingDirectory: z.ZodString;
54
+ projectRoot: z.ZodString;
55
+ cwd: z.ZodString;
55
56
  fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
56
57
  fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
57
58
  tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
@@ -108,7 +109,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
108
109
  content: string;
109
110
  }>, "many">, "many">>;
110
111
  }, "strip", z.ZodTypeAny, {
111
- currentWorkingDirectory: string;
112
+ projectRoot: string;
113
+ cwd: string;
112
114
  fileTree: import("./util/file").FileTreeNode[];
113
115
  fileTokenScores: Record<string, Record<string, number>>;
114
116
  knowledgeFiles: Record<string, string>;
@@ -135,7 +137,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
135
137
  content: string;
136
138
  }[][] | undefined;
137
139
  }, {
138
- currentWorkingDirectory: string;
140
+ projectRoot: string;
141
+ cwd: string;
139
142
  fileTree: import("./util/file").FileTreeNode[];
140
143
  fileTokenScores: Record<string, Record<string, number>>;
141
144
  knowledgeFiles: Record<string, string>;
@@ -169,11 +172,23 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
169
172
  }, {
170
173
  timeToLive?: "agentStep" | "userPrompt" | undefined;
171
174
  }>>, "many">;
175
+ agents: z.ZodDefault<z.ZodArray<z.ZodType<{
176
+ agentId: string;
177
+ agentName: import("./types/agent-state").AgentTemplateName;
178
+ agents: import("./types/agent-state").SubagentState[];
179
+ messageHistory: import("./types/message").CodebuffMessage[];
180
+ }, z.ZodTypeDef, {
181
+ agentId: string;
182
+ agentName: import("./types/agent-state").AgentTemplateName;
183
+ agents: import("./types/agent-state").SubagentState[];
184
+ messageHistory: import("./types/message").CodebuffMessage[];
185
+ }>, "many">>;
172
186
  agentStepsRemaining: z.ZodNumber;
173
187
  }, "strip", z.ZodTypeAny, {
174
188
  agentContext: string;
175
189
  fileContext: {
176
- currentWorkingDirectory: string;
190
+ projectRoot: string;
191
+ cwd: string;
177
192
  fileTree: import("./util/file").FileTreeNode[];
178
193
  fileTokenScores: Record<string, Record<string, number>>;
179
194
  knowledgeFiles: Record<string, string>;
@@ -203,11 +218,18 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
203
218
  messageHistory: (import("ai").CoreMessage & {
204
219
  timeToLive?: "agentStep" | "userPrompt" | undefined;
205
220
  })[];
221
+ agents: {
222
+ agentId: string;
223
+ agentName: import("./types/agent-state").AgentTemplateName;
224
+ agents: import("./types/agent-state").SubagentState[];
225
+ messageHistory: import("./types/message").CodebuffMessage[];
226
+ }[];
206
227
  agentStepsRemaining: number;
207
228
  }, {
208
229
  agentContext: string;
209
230
  fileContext: {
210
- currentWorkingDirectory: string;
231
+ projectRoot: string;
232
+ cwd: string;
211
233
  fileTree: import("./util/file").FileTreeNode[];
212
234
  fileTokenScores: Record<string, Record<string, number>>;
213
235
  knowledgeFiles: Record<string, string>;
@@ -238,6 +260,12 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
238
260
  timeToLive?: "agentStep" | "userPrompt" | undefined;
239
261
  })[];
240
262
  agentStepsRemaining: number;
263
+ agents?: {
264
+ agentId: string;
265
+ agentName: import("./types/agent-state").AgentTemplateName;
266
+ agents: import("./types/agent-state").SubagentState[];
267
+ messageHistory: import("./types/message").CodebuffMessage[];
268
+ }[] | undefined;
241
269
  }>;
242
270
  toolResults: z.ZodArray<z.ZodObject<{
243
271
  name: z.ZodString;
@@ -253,7 +281,6 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
253
281
  result: string;
254
282
  }>, "many">;
255
283
  model: z.ZodOptional<z.ZodString>;
256
- cwd: z.ZodOptional<z.ZodString>;
257
284
  repoUrl: z.ZodOptional<z.ZodString>;
258
285
  }, "strip", z.ZodTypeAny, {
259
286
  type: "prompt";
@@ -263,7 +290,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
263
290
  agentState: {
264
291
  agentContext: string;
265
292
  fileContext: {
266
- currentWorkingDirectory: string;
293
+ projectRoot: string;
294
+ cwd: string;
267
295
  fileTree: import("./util/file").FileTreeNode[];
268
296
  fileTokenScores: Record<string, Record<string, number>>;
269
297
  knowledgeFiles: Record<string, string>;
@@ -293,6 +321,12 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
293
321
  messageHistory: (import("ai").CoreMessage & {
294
322
  timeToLive?: "agentStep" | "userPrompt" | undefined;
295
323
  })[];
324
+ agents: {
325
+ agentId: string;
326
+ agentName: import("./types/agent-state").AgentTemplateName;
327
+ agents: import("./types/agent-state").SubagentState[];
328
+ messageHistory: import("./types/message").CodebuffMessage[];
329
+ }[];
296
330
  agentStepsRemaining: number;
297
331
  };
298
332
  toolResults: {
@@ -300,7 +334,6 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
300
334
  id: string;
301
335
  result: string;
302
336
  }[];
303
- cwd?: string | undefined;
304
337
  prompt?: string | undefined;
305
338
  authToken?: string | undefined;
306
339
  model?: string | undefined;
@@ -312,7 +345,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
312
345
  agentState: {
313
346
  agentContext: string;
314
347
  fileContext: {
315
- currentWorkingDirectory: string;
348
+ projectRoot: string;
349
+ cwd: string;
316
350
  fileTree: import("./util/file").FileTreeNode[];
317
351
  fileTokenScores: Record<string, Record<string, number>>;
318
352
  knowledgeFiles: Record<string, string>;
@@ -343,13 +377,18 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
343
377
  timeToLive?: "agentStep" | "userPrompt" | undefined;
344
378
  })[];
345
379
  agentStepsRemaining: number;
380
+ agents?: {
381
+ agentId: string;
382
+ agentName: import("./types/agent-state").AgentTemplateName;
383
+ agents: import("./types/agent-state").SubagentState[];
384
+ messageHistory: import("./types/message").CodebuffMessage[];
385
+ }[] | undefined;
346
386
  };
347
387
  toolResults: {
348
388
  name: string;
349
389
  id: string;
350
390
  result: string;
351
391
  }[];
352
- cwd?: string | undefined;
353
392
  prompt?: string | undefined;
354
393
  authToken?: string | undefined;
355
394
  costMode?: "max" | "lite" | "normal" | "experimental" | "ask" | undefined;
@@ -362,7 +401,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
362
401
  agentState: z.ZodObject<{
363
402
  agentContext: z.ZodString;
364
403
  fileContext: z.ZodObject<{
365
- currentWorkingDirectory: z.ZodString;
404
+ projectRoot: z.ZodString;
405
+ cwd: z.ZodString;
366
406
  fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
367
407
  fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
368
408
  tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
@@ -419,7 +459,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
419
459
  content: string;
420
460
  }>, "many">, "many">>;
421
461
  }, "strip", z.ZodTypeAny, {
422
- currentWorkingDirectory: string;
462
+ projectRoot: string;
463
+ cwd: string;
423
464
  fileTree: import("./util/file").FileTreeNode[];
424
465
  fileTokenScores: Record<string, Record<string, number>>;
425
466
  knowledgeFiles: Record<string, string>;
@@ -446,7 +487,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
446
487
  content: string;
447
488
  }[][] | undefined;
448
489
  }, {
449
- currentWorkingDirectory: string;
490
+ projectRoot: string;
491
+ cwd: string;
450
492
  fileTree: import("./util/file").FileTreeNode[];
451
493
  fileTokenScores: Record<string, Record<string, number>>;
452
494
  knowledgeFiles: Record<string, string>;
@@ -480,11 +522,23 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
480
522
  }, {
481
523
  timeToLive?: "agentStep" | "userPrompt" | undefined;
482
524
  }>>, "many">;
525
+ agents: z.ZodDefault<z.ZodArray<z.ZodType<{
526
+ agentId: string;
527
+ agentName: import("./types/agent-state").AgentTemplateName;
528
+ agents: import("./types/agent-state").SubagentState[];
529
+ messageHistory: import("./types/message").CodebuffMessage[];
530
+ }, z.ZodTypeDef, {
531
+ agentId: string;
532
+ agentName: import("./types/agent-state").AgentTemplateName;
533
+ agents: import("./types/agent-state").SubagentState[];
534
+ messageHistory: import("./types/message").CodebuffMessage[];
535
+ }>, "many">>;
483
536
  agentStepsRemaining: z.ZodNumber;
484
537
  }, "strip", z.ZodTypeAny, {
485
538
  agentContext: string;
486
539
  fileContext: {
487
- currentWorkingDirectory: string;
540
+ projectRoot: string;
541
+ cwd: string;
488
542
  fileTree: import("./util/file").FileTreeNode[];
489
543
  fileTokenScores: Record<string, Record<string, number>>;
490
544
  knowledgeFiles: Record<string, string>;
@@ -514,11 +568,18 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
514
568
  messageHistory: (import("ai").CoreMessage & {
515
569
  timeToLive?: "agentStep" | "userPrompt" | undefined;
516
570
  })[];
571
+ agents: {
572
+ agentId: string;
573
+ agentName: import("./types/agent-state").AgentTemplateName;
574
+ agents: import("./types/agent-state").SubagentState[];
575
+ messageHistory: import("./types/message").CodebuffMessage[];
576
+ }[];
517
577
  agentStepsRemaining: number;
518
578
  }, {
519
579
  agentContext: string;
520
580
  fileContext: {
521
- currentWorkingDirectory: string;
581
+ projectRoot: string;
582
+ cwd: string;
522
583
  fileTree: import("./util/file").FileTreeNode[];
523
584
  fileTokenScores: Record<string, Record<string, number>>;
524
585
  knowledgeFiles: Record<string, string>;
@@ -549,6 +610,12 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
549
610
  timeToLive?: "agentStep" | "userPrompt" | undefined;
550
611
  })[];
551
612
  agentStepsRemaining: number;
613
+ agents?: {
614
+ agentId: string;
615
+ agentName: import("./types/agent-state").AgentTemplateName;
616
+ agents: import("./types/agent-state").SubagentState[];
617
+ messageHistory: import("./types/message").CodebuffMessage[];
618
+ }[] | undefined;
552
619
  }>;
553
620
  toolResults: z.ZodArray<z.ZodObject<{
554
621
  name: z.ZodString;
@@ -577,7 +644,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
577
644
  agentState: {
578
645
  agentContext: string;
579
646
  fileContext: {
580
- currentWorkingDirectory: string;
647
+ projectRoot: string;
648
+ cwd: string;
581
649
  fileTree: import("./util/file").FileTreeNode[];
582
650
  fileTokenScores: Record<string, Record<string, number>>;
583
651
  knowledgeFiles: Record<string, string>;
@@ -607,6 +675,12 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
607
675
  messageHistory: (import("ai").CoreMessage & {
608
676
  timeToLive?: "agentStep" | "userPrompt" | undefined;
609
677
  })[];
678
+ agents: {
679
+ agentId: string;
680
+ agentName: import("./types/agent-state").AgentTemplateName;
681
+ agents: import("./types/agent-state").SubagentState[];
682
+ messageHistory: import("./types/message").CodebuffMessage[];
683
+ }[];
610
684
  agentStepsRemaining: number;
611
685
  };
612
686
  toolResults: {
@@ -626,7 +700,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
626
700
  agentState: {
627
701
  agentContext: string;
628
702
  fileContext: {
629
- currentWorkingDirectory: string;
703
+ projectRoot: string;
704
+ cwd: string;
630
705
  fileTree: import("./util/file").FileTreeNode[];
631
706
  fileTokenScores: Record<string, Record<string, number>>;
632
707
  knowledgeFiles: Record<string, string>;
@@ -657,6 +732,12 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
657
732
  timeToLive?: "agentStep" | "userPrompt" | undefined;
658
733
  })[];
659
734
  agentStepsRemaining: number;
735
+ agents?: {
736
+ agentId: string;
737
+ agentName: import("./types/agent-state").AgentTemplateName;
738
+ agents: import("./types/agent-state").SubagentState[];
739
+ messageHistory: import("./types/message").CodebuffMessage[];
740
+ }[] | undefined;
660
741
  };
661
742
  toolResults: {
662
743
  name: string;
@@ -686,7 +767,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
686
767
  fingerprintId: z.ZodString;
687
768
  authToken: z.ZodOptional<z.ZodString>;
688
769
  fileContext: z.ZodObject<{
689
- currentWorkingDirectory: z.ZodString;
770
+ projectRoot: z.ZodString;
771
+ cwd: z.ZodString;
690
772
  fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
691
773
  fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
692
774
  tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
@@ -743,7 +825,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
743
825
  content: string;
744
826
  }>, "many">, "many">>;
745
827
  }, "strip", z.ZodTypeAny, {
746
- currentWorkingDirectory: string;
828
+ projectRoot: string;
829
+ cwd: string;
747
830
  fileTree: import("./util/file").FileTreeNode[];
748
831
  fileTokenScores: Record<string, Record<string, number>>;
749
832
  knowledgeFiles: Record<string, string>;
@@ -770,7 +853,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
770
853
  content: string;
771
854
  }[][] | undefined;
772
855
  }, {
773
- currentWorkingDirectory: string;
856
+ projectRoot: string;
857
+ cwd: string;
774
858
  fileTree: import("./util/file").FileTreeNode[];
775
859
  fileTokenScores: Record<string, Record<string, number>>;
776
860
  knowledgeFiles: Record<string, string>;
@@ -800,8 +884,10 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
800
884
  repoUrl: z.ZodOptional<z.ZodString>;
801
885
  }, "strip", z.ZodTypeAny, {
802
886
  type: "init";
887
+ fingerprintId: string;
803
888
  fileContext: {
804
- currentWorkingDirectory: string;
889
+ projectRoot: string;
890
+ cwd: string;
805
891
  fileTree: import("./util/file").FileTreeNode[];
806
892
  fileTokenScores: Record<string, Record<string, number>>;
807
893
  knowledgeFiles: Record<string, string>;
@@ -828,13 +914,14 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
828
914
  content: string;
829
915
  }[][] | undefined;
830
916
  };
831
- fingerprintId: string;
832
917
  authToken?: string | undefined;
833
918
  repoUrl?: string | undefined;
834
919
  }, {
835
920
  type: "init";
921
+ fingerprintId: string;
836
922
  fileContext: {
837
- currentWorkingDirectory: string;
923
+ projectRoot: string;
924
+ cwd: string;
838
925
  fileTree: import("./util/file").FileTreeNode[];
839
926
  fileTokenScores: Record<string, Record<string, number>>;
840
927
  knowledgeFiles: Record<string, string>;
@@ -861,7 +948,6 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
861
948
  content: string;
862
949
  }[][] | undefined;
863
950
  };
864
- fingerprintId: string;
865
951
  authToken?: string | undefined;
866
952
  repoUrl?: string | undefined;
867
953
  }>, z.ZodObject<{
@@ -939,12 +1025,12 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
939
1025
  content: z.ZodString;
940
1026
  }, "strip", z.ZodTypeAny, {
941
1027
  path: string;
942
- type: "patch" | "file";
943
1028
  content: string;
1029
+ type: "file" | "patch";
944
1030
  }, {
945
1031
  path: string;
946
- type: "patch" | "file";
947
1032
  content: string;
1033
+ type: "file" | "patch";
948
1034
  }>, "many">;
949
1035
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
950
1036
  type: z.ZodEnum<["patch", "file"]>;
@@ -952,12 +1038,12 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
952
1038
  content: z.ZodString;
953
1039
  }, "strip", z.ZodTypeAny, {
954
1040
  path: string;
955
- type: "patch" | "file";
956
1041
  content: string;
1042
+ type: "file" | "patch";
957
1043
  }, {
958
1044
  path: string;
959
- type: "patch" | "file";
960
1045
  content: string;
1046
+ type: "file" | "patch";
961
1047
  }>, "many">;
962
1048
  addedFileVersions: z.ZodArray<z.ZodObject<{
963
1049
  path: z.ZodString;
@@ -982,13 +1068,13 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
982
1068
  response: string;
983
1069
  changes: {
984
1070
  path: string;
985
- type: "patch" | "file";
986
1071
  content: string;
1072
+ type: "file" | "patch";
987
1073
  }[];
988
1074
  changesAlreadyApplied: {
989
1075
  path: string;
990
- type: "patch" | "file";
991
1076
  content: string;
1077
+ type: "file" | "patch";
992
1078
  }[];
993
1079
  addedFileVersions: {
994
1080
  path: string;
@@ -1006,13 +1092,13 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
1006
1092
  response: string;
1007
1093
  changes: {
1008
1094
  path: string;
1009
- type: "patch" | "file";
1010
1095
  content: string;
1096
+ type: "file" | "patch";
1011
1097
  }[];
1012
1098
  changesAlreadyApplied: {
1013
1099
  path: string;
1014
- type: "patch" | "file";
1015
1100
  content: string;
1101
+ type: "file" | "patch";
1016
1102
  }[];
1017
1103
  addedFileVersions: {
1018
1104
  path: string;
@@ -1045,7 +1131,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
1045
1131
  agentState: z.ZodObject<{
1046
1132
  agentContext: z.ZodString;
1047
1133
  fileContext: z.ZodObject<{
1048
- currentWorkingDirectory: z.ZodString;
1134
+ projectRoot: z.ZodString;
1135
+ cwd: z.ZodString;
1049
1136
  fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
1050
1137
  fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
1051
1138
  tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
@@ -1102,7 +1189,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
1102
1189
  content: string;
1103
1190
  }>, "many">, "many">>;
1104
1191
  }, "strip", z.ZodTypeAny, {
1105
- currentWorkingDirectory: string;
1192
+ projectRoot: string;
1193
+ cwd: string;
1106
1194
  fileTree: import("./util/file").FileTreeNode[];
1107
1195
  fileTokenScores: Record<string, Record<string, number>>;
1108
1196
  knowledgeFiles: Record<string, string>;
@@ -1129,7 +1217,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
1129
1217
  content: string;
1130
1218
  }[][] | undefined;
1131
1219
  }, {
1132
- currentWorkingDirectory: string;
1220
+ projectRoot: string;
1221
+ cwd: string;
1133
1222
  fileTree: import("./util/file").FileTreeNode[];
1134
1223
  fileTokenScores: Record<string, Record<string, number>>;
1135
1224
  knowledgeFiles: Record<string, string>;
@@ -1163,11 +1252,23 @@ export declare const PromptResponseSchema: z.ZodObject<{
1163
1252
  }, {
1164
1253
  timeToLive?: "agentStep" | "userPrompt" | undefined;
1165
1254
  }>>, "many">;
1255
+ agents: z.ZodDefault<z.ZodArray<z.ZodType<{
1256
+ agentId: string;
1257
+ agentName: import("./types/agent-state").AgentTemplateName;
1258
+ agents: import("./types/agent-state").SubagentState[];
1259
+ messageHistory: import("./types/message").CodebuffMessage[];
1260
+ }, z.ZodTypeDef, {
1261
+ agentId: string;
1262
+ agentName: import("./types/agent-state").AgentTemplateName;
1263
+ agents: import("./types/agent-state").SubagentState[];
1264
+ messageHistory: import("./types/message").CodebuffMessage[];
1265
+ }>, "many">>;
1166
1266
  agentStepsRemaining: z.ZodNumber;
1167
1267
  }, "strip", z.ZodTypeAny, {
1168
1268
  agentContext: string;
1169
1269
  fileContext: {
1170
- currentWorkingDirectory: string;
1270
+ projectRoot: string;
1271
+ cwd: string;
1171
1272
  fileTree: import("./util/file").FileTreeNode[];
1172
1273
  fileTokenScores: Record<string, Record<string, number>>;
1173
1274
  knowledgeFiles: Record<string, string>;
@@ -1197,11 +1298,18 @@ export declare const PromptResponseSchema: z.ZodObject<{
1197
1298
  messageHistory: (import("ai").CoreMessage & {
1198
1299
  timeToLive?: "agentStep" | "userPrompt" | undefined;
1199
1300
  })[];
1301
+ agents: {
1302
+ agentId: string;
1303
+ agentName: import("./types/agent-state").AgentTemplateName;
1304
+ agents: import("./types/agent-state").SubagentState[];
1305
+ messageHistory: import("./types/message").CodebuffMessage[];
1306
+ }[];
1200
1307
  agentStepsRemaining: number;
1201
1308
  }, {
1202
1309
  agentContext: string;
1203
1310
  fileContext: {
1204
- currentWorkingDirectory: string;
1311
+ projectRoot: string;
1312
+ cwd: string;
1205
1313
  fileTree: import("./util/file").FileTreeNode[];
1206
1314
  fileTokenScores: Record<string, Record<string, number>>;
1207
1315
  knowledgeFiles: Record<string, string>;
@@ -1232,6 +1340,12 @@ export declare const PromptResponseSchema: z.ZodObject<{
1232
1340
  timeToLive?: "agentStep" | "userPrompt" | undefined;
1233
1341
  })[];
1234
1342
  agentStepsRemaining: number;
1343
+ agents?: {
1344
+ agentId: string;
1345
+ agentName: import("./types/agent-state").AgentTemplateName;
1346
+ agents: import("./types/agent-state").SubagentState[];
1347
+ messageHistory: import("./types/message").CodebuffMessage[];
1348
+ }[] | undefined;
1235
1349
  }>;
1236
1350
  toolCalls: z.ZodArray<z.ZodObject<{
1237
1351
  name: z.ZodString;
@@ -1239,12 +1353,12 @@ export declare const PromptResponseSchema: z.ZodObject<{
1239
1353
  id: z.ZodString;
1240
1354
  }, "strip", z.ZodTypeAny, {
1241
1355
  name: string;
1242
- parameters: Record<string, string>;
1243
1356
  id: string;
1357
+ parameters: Record<string, string>;
1244
1358
  }, {
1245
1359
  name: string;
1246
- parameters: Record<string, string>;
1247
1360
  id: string;
1361
+ parameters: Record<string, string>;
1248
1362
  }>, "many">;
1249
1363
  toolResults: z.ZodArray<z.ZodObject<{
1250
1364
  name: z.ZodString;
@@ -1265,7 +1379,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
1265
1379
  agentState: {
1266
1380
  agentContext: string;
1267
1381
  fileContext: {
1268
- currentWorkingDirectory: string;
1382
+ projectRoot: string;
1383
+ cwd: string;
1269
1384
  fileTree: import("./util/file").FileTreeNode[];
1270
1385
  fileTokenScores: Record<string, Record<string, number>>;
1271
1386
  knowledgeFiles: Record<string, string>;
@@ -1295,6 +1410,12 @@ export declare const PromptResponseSchema: z.ZodObject<{
1295
1410
  messageHistory: (import("ai").CoreMessage & {
1296
1411
  timeToLive?: "agentStep" | "userPrompt" | undefined;
1297
1412
  })[];
1413
+ agents: {
1414
+ agentId: string;
1415
+ agentName: import("./types/agent-state").AgentTemplateName;
1416
+ agents: import("./types/agent-state").SubagentState[];
1417
+ messageHistory: import("./types/message").CodebuffMessage[];
1418
+ }[];
1298
1419
  agentStepsRemaining: number;
1299
1420
  };
1300
1421
  toolResults: {
@@ -1304,8 +1425,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
1304
1425
  }[];
1305
1426
  toolCalls: {
1306
1427
  name: string;
1307
- parameters: Record<string, string>;
1308
1428
  id: string;
1429
+ parameters: Record<string, string>;
1309
1430
  }[];
1310
1431
  }, {
1311
1432
  type: "prompt-response";
@@ -1313,7 +1434,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
1313
1434
  agentState: {
1314
1435
  agentContext: string;
1315
1436
  fileContext: {
1316
- currentWorkingDirectory: string;
1437
+ projectRoot: string;
1438
+ cwd: string;
1317
1439
  fileTree: import("./util/file").FileTreeNode[];
1318
1440
  fileTokenScores: Record<string, Record<string, number>>;
1319
1441
  knowledgeFiles: Record<string, string>;
@@ -1344,6 +1466,12 @@ export declare const PromptResponseSchema: z.ZodObject<{
1344
1466
  timeToLive?: "agentStep" | "userPrompt" | undefined;
1345
1467
  })[];
1346
1468
  agentStepsRemaining: number;
1469
+ agents?: {
1470
+ agentId: string;
1471
+ agentName: import("./types/agent-state").AgentTemplateName;
1472
+ agents: import("./types/agent-state").SubagentState[];
1473
+ messageHistory: import("./types/message").CodebuffMessage[];
1474
+ }[] | undefined;
1347
1475
  };
1348
1476
  toolResults: {
1349
1477
  name: string;
@@ -1352,8 +1480,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
1352
1480
  }[];
1353
1481
  toolCalls: {
1354
1482
  name: string;
1355
- parameters: Record<string, string>;
1356
1483
  id: string;
1484
+ parameters: Record<string, string>;
1357
1485
  }[];
1358
1486
  }>;
1359
1487
  export type PromptResponse = z.infer<typeof PromptResponseSchema>;
@@ -1363,7 +1491,8 @@ export declare const ManagerPromptResponseSchema: z.ZodObject<{
1363
1491
  agentState: z.ZodObject<{
1364
1492
  agentContext: z.ZodString;
1365
1493
  fileContext: z.ZodObject<{
1366
- currentWorkingDirectory: z.ZodString;
1494
+ projectRoot: z.ZodString;
1495
+ cwd: z.ZodString;
1367
1496
  fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
1368
1497
  fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
1369
1498
  tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
@@ -1420,7 +1549,8 @@ export declare const ManagerPromptResponseSchema: z.ZodObject<{
1420
1549
  content: string;
1421
1550
  }>, "many">, "many">>;
1422
1551
  }, "strip", z.ZodTypeAny, {
1423
- currentWorkingDirectory: string;
1552
+ projectRoot: string;
1553
+ cwd: string;
1424
1554
  fileTree: import("./util/file").FileTreeNode[];
1425
1555
  fileTokenScores: Record<string, Record<string, number>>;
1426
1556
  knowledgeFiles: Record<string, string>;
@@ -1447,7 +1577,8 @@ export declare const ManagerPromptResponseSchema: z.ZodObject<{
1447
1577
  content: string;
1448
1578
  }[][] | undefined;
1449
1579
  }, {
1450
- currentWorkingDirectory: string;
1580
+ projectRoot: string;
1581
+ cwd: string;
1451
1582
  fileTree: import("./util/file").FileTreeNode[];
1452
1583
  fileTokenScores: Record<string, Record<string, number>>;
1453
1584
  knowledgeFiles: Record<string, string>;
@@ -1481,11 +1612,23 @@ export declare const ManagerPromptResponseSchema: z.ZodObject<{
1481
1612
  }, {
1482
1613
  timeToLive?: "agentStep" | "userPrompt" | undefined;
1483
1614
  }>>, "many">;
1615
+ agents: z.ZodDefault<z.ZodArray<z.ZodType<{
1616
+ agentId: string;
1617
+ agentName: import("./types/agent-state").AgentTemplateName;
1618
+ agents: import("./types/agent-state").SubagentState[];
1619
+ messageHistory: import("./types/message").CodebuffMessage[];
1620
+ }, z.ZodTypeDef, {
1621
+ agentId: string;
1622
+ agentName: import("./types/agent-state").AgentTemplateName;
1623
+ agents: import("./types/agent-state").SubagentState[];
1624
+ messageHistory: import("./types/message").CodebuffMessage[];
1625
+ }>, "many">>;
1484
1626
  agentStepsRemaining: z.ZodNumber;
1485
1627
  }, "strip", z.ZodTypeAny, {
1486
1628
  agentContext: string;
1487
1629
  fileContext: {
1488
- currentWorkingDirectory: string;
1630
+ projectRoot: string;
1631
+ cwd: string;
1489
1632
  fileTree: import("./util/file").FileTreeNode[];
1490
1633
  fileTokenScores: Record<string, Record<string, number>>;
1491
1634
  knowledgeFiles: Record<string, string>;
@@ -1515,11 +1658,18 @@ export declare const ManagerPromptResponseSchema: z.ZodObject<{
1515
1658
  messageHistory: (import("ai").CoreMessage & {
1516
1659
  timeToLive?: "agentStep" | "userPrompt" | undefined;
1517
1660
  })[];
1661
+ agents: {
1662
+ agentId: string;
1663
+ agentName: import("./types/agent-state").AgentTemplateName;
1664
+ agents: import("./types/agent-state").SubagentState[];
1665
+ messageHistory: import("./types/message").CodebuffMessage[];
1666
+ }[];
1518
1667
  agentStepsRemaining: number;
1519
1668
  }, {
1520
1669
  agentContext: string;
1521
1670
  fileContext: {
1522
- currentWorkingDirectory: string;
1671
+ projectRoot: string;
1672
+ cwd: string;
1523
1673
  fileTree: import("./util/file").FileTreeNode[];
1524
1674
  fileTokenScores: Record<string, Record<string, number>>;
1525
1675
  knowledgeFiles: Record<string, string>;
@@ -1550,6 +1700,12 @@ export declare const ManagerPromptResponseSchema: z.ZodObject<{
1550
1700
  timeToLive?: "agentStep" | "userPrompt" | undefined;
1551
1701
  })[];
1552
1702
  agentStepsRemaining: number;
1703
+ agents?: {
1704
+ agentId: string;
1705
+ agentName: import("./types/agent-state").AgentTemplateName;
1706
+ agents: import("./types/agent-state").SubagentState[];
1707
+ messageHistory: import("./types/message").CodebuffMessage[];
1708
+ }[] | undefined;
1553
1709
  }>;
1554
1710
  toolCalls: z.ZodArray<z.ZodObject<{
1555
1711
  name: z.ZodString;
@@ -1557,12 +1713,12 @@ export declare const ManagerPromptResponseSchema: z.ZodObject<{
1557
1713
  id: z.ZodString;
1558
1714
  }, "strip", z.ZodTypeAny, {
1559
1715
  name: string;
1560
- parameters: Record<string, string>;
1561
1716
  id: string;
1717
+ parameters: Record<string, string>;
1562
1718
  }, {
1563
1719
  name: string;
1564
- parameters: Record<string, string>;
1565
1720
  id: string;
1721
+ parameters: Record<string, string>;
1566
1722
  }>, "many">;
1567
1723
  toolResults: z.ZodArray<z.ZodObject<{
1568
1724
  name: z.ZodString;
@@ -1583,7 +1739,8 @@ export declare const ManagerPromptResponseSchema: z.ZodObject<{
1583
1739
  agentState: {
1584
1740
  agentContext: string;
1585
1741
  fileContext: {
1586
- currentWorkingDirectory: string;
1742
+ projectRoot: string;
1743
+ cwd: string;
1587
1744
  fileTree: import("./util/file").FileTreeNode[];
1588
1745
  fileTokenScores: Record<string, Record<string, number>>;
1589
1746
  knowledgeFiles: Record<string, string>;
@@ -1613,6 +1770,12 @@ export declare const ManagerPromptResponseSchema: z.ZodObject<{
1613
1770
  messageHistory: (import("ai").CoreMessage & {
1614
1771
  timeToLive?: "agentStep" | "userPrompt" | undefined;
1615
1772
  })[];
1773
+ agents: {
1774
+ agentId: string;
1775
+ agentName: import("./types/agent-state").AgentTemplateName;
1776
+ agents: import("./types/agent-state").SubagentState[];
1777
+ messageHistory: import("./types/message").CodebuffMessage[];
1778
+ }[];
1616
1779
  agentStepsRemaining: number;
1617
1780
  };
1618
1781
  toolResults: {
@@ -1622,8 +1785,8 @@ export declare const ManagerPromptResponseSchema: z.ZodObject<{
1622
1785
  }[];
1623
1786
  toolCalls: {
1624
1787
  name: string;
1625
- parameters: Record<string, string>;
1626
1788
  id: string;
1789
+ parameters: Record<string, string>;
1627
1790
  }[];
1628
1791
  }, {
1629
1792
  type: "manager-prompt-response";
@@ -1631,7 +1794,8 @@ export declare const ManagerPromptResponseSchema: z.ZodObject<{
1631
1794
  agentState: {
1632
1795
  agentContext: string;
1633
1796
  fileContext: {
1634
- currentWorkingDirectory: string;
1797
+ projectRoot: string;
1798
+ cwd: string;
1635
1799
  fileTree: import("./util/file").FileTreeNode[];
1636
1800
  fileTokenScores: Record<string, Record<string, number>>;
1637
1801
  knowledgeFiles: Record<string, string>;
@@ -1662,6 +1826,12 @@ export declare const ManagerPromptResponseSchema: z.ZodObject<{
1662
1826
  timeToLive?: "agentStep" | "userPrompt" | undefined;
1663
1827
  })[];
1664
1828
  agentStepsRemaining: number;
1829
+ agents?: {
1830
+ agentId: string;
1831
+ agentName: import("./types/agent-state").AgentTemplateName;
1832
+ agents: import("./types/agent-state").SubagentState[];
1833
+ messageHistory: import("./types/message").CodebuffMessage[];
1834
+ }[] | undefined;
1665
1835
  };
1666
1836
  toolResults: {
1667
1837
  name: string;
@@ -1670,8 +1840,8 @@ export declare const ManagerPromptResponseSchema: z.ZodObject<{
1670
1840
  }[];
1671
1841
  toolCalls: {
1672
1842
  name: string;
1673
- parameters: Record<string, string>;
1674
1843
  id: string;
1844
+ parameters: Record<string, string>;
1675
1845
  }[];
1676
1846
  }>;
1677
1847
  export type ManagerPromptResponse = z.infer<typeof ManagerPromptResponseSchema>;
@@ -1697,12 +1867,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1697
1867
  content: z.ZodString;
1698
1868
  }, "strip", z.ZodTypeAny, {
1699
1869
  path: string;
1700
- type: "patch" | "file";
1701
1870
  content: string;
1871
+ type: "file" | "patch";
1702
1872
  }, {
1703
1873
  path: string;
1704
- type: "patch" | "file";
1705
1874
  content: string;
1875
+ type: "file" | "patch";
1706
1876
  }>, "many">;
1707
1877
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
1708
1878
  type: z.ZodEnum<["patch", "file"]>;
@@ -1710,12 +1880,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1710
1880
  content: z.ZodString;
1711
1881
  }, "strip", z.ZodTypeAny, {
1712
1882
  path: string;
1713
- type: "patch" | "file";
1714
1883
  content: string;
1884
+ type: "file" | "patch";
1715
1885
  }, {
1716
1886
  path: string;
1717
- type: "patch" | "file";
1718
1887
  content: string;
1888
+ type: "file" | "patch";
1719
1889
  }>, "many">;
1720
1890
  addedFileVersions: z.ZodArray<z.ZodObject<{
1721
1891
  path: z.ZodString;
@@ -1740,13 +1910,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1740
1910
  response: string;
1741
1911
  changes: {
1742
1912
  path: string;
1743
- type: "patch" | "file";
1744
1913
  content: string;
1914
+ type: "file" | "patch";
1745
1915
  }[];
1746
1916
  changesAlreadyApplied: {
1747
1917
  path: string;
1748
- type: "patch" | "file";
1749
1918
  content: string;
1919
+ type: "file" | "patch";
1750
1920
  }[];
1751
1921
  addedFileVersions: {
1752
1922
  path: string;
@@ -1764,13 +1934,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1764
1934
  response: string;
1765
1935
  changes: {
1766
1936
  path: string;
1767
- type: "patch" | "file";
1768
1937
  content: string;
1938
+ type: "file" | "patch";
1769
1939
  }[];
1770
1940
  changesAlreadyApplied: {
1771
1941
  path: string;
1772
- type: "patch" | "file";
1773
1942
  content: string;
1943
+ type: "file" | "patch";
1774
1944
  }[];
1775
1945
  addedFileVersions: {
1776
1946
  path: string;
@@ -1788,7 +1958,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1788
1958
  agentState: z.ZodObject<{
1789
1959
  agentContext: z.ZodString;
1790
1960
  fileContext: z.ZodObject<{
1791
- currentWorkingDirectory: z.ZodString;
1961
+ projectRoot: z.ZodString;
1962
+ cwd: z.ZodString;
1792
1963
  fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
1793
1964
  fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
1794
1965
  tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
@@ -1845,7 +2016,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1845
2016
  content: string;
1846
2017
  }>, "many">, "many">>;
1847
2018
  }, "strip", z.ZodTypeAny, {
1848
- currentWorkingDirectory: string;
2019
+ projectRoot: string;
2020
+ cwd: string;
1849
2021
  fileTree: import("./util/file").FileTreeNode[];
1850
2022
  fileTokenScores: Record<string, Record<string, number>>;
1851
2023
  knowledgeFiles: Record<string, string>;
@@ -1872,7 +2044,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1872
2044
  content: string;
1873
2045
  }[][] | undefined;
1874
2046
  }, {
1875
- currentWorkingDirectory: string;
2047
+ projectRoot: string;
2048
+ cwd: string;
1876
2049
  fileTree: import("./util/file").FileTreeNode[];
1877
2050
  fileTokenScores: Record<string, Record<string, number>>;
1878
2051
  knowledgeFiles: Record<string, string>;
@@ -1906,11 +2079,23 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1906
2079
  }, {
1907
2080
  timeToLive?: "agentStep" | "userPrompt" | undefined;
1908
2081
  }>>, "many">;
2082
+ agents: z.ZodDefault<z.ZodArray<z.ZodType<{
2083
+ agentId: string;
2084
+ agentName: import("./types/agent-state").AgentTemplateName;
2085
+ agents: import("./types/agent-state").SubagentState[];
2086
+ messageHistory: import("./types/message").CodebuffMessage[];
2087
+ }, z.ZodTypeDef, {
2088
+ agentId: string;
2089
+ agentName: import("./types/agent-state").AgentTemplateName;
2090
+ agents: import("./types/agent-state").SubagentState[];
2091
+ messageHistory: import("./types/message").CodebuffMessage[];
2092
+ }>, "many">>;
1909
2093
  agentStepsRemaining: z.ZodNumber;
1910
2094
  }, "strip", z.ZodTypeAny, {
1911
2095
  agentContext: string;
1912
2096
  fileContext: {
1913
- currentWorkingDirectory: string;
2097
+ projectRoot: string;
2098
+ cwd: string;
1914
2099
  fileTree: import("./util/file").FileTreeNode[];
1915
2100
  fileTokenScores: Record<string, Record<string, number>>;
1916
2101
  knowledgeFiles: Record<string, string>;
@@ -1940,11 +2125,18 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1940
2125
  messageHistory: (import("ai").CoreMessage & {
1941
2126
  timeToLive?: "agentStep" | "userPrompt" | undefined;
1942
2127
  })[];
2128
+ agents: {
2129
+ agentId: string;
2130
+ agentName: import("./types/agent-state").AgentTemplateName;
2131
+ agents: import("./types/agent-state").SubagentState[];
2132
+ messageHistory: import("./types/message").CodebuffMessage[];
2133
+ }[];
1943
2134
  agentStepsRemaining: number;
1944
2135
  }, {
1945
2136
  agentContext: string;
1946
2137
  fileContext: {
1947
- currentWorkingDirectory: string;
2138
+ projectRoot: string;
2139
+ cwd: string;
1948
2140
  fileTree: import("./util/file").FileTreeNode[];
1949
2141
  fileTokenScores: Record<string, Record<string, number>>;
1950
2142
  knowledgeFiles: Record<string, string>;
@@ -1975,6 +2167,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1975
2167
  timeToLive?: "agentStep" | "userPrompt" | undefined;
1976
2168
  })[];
1977
2169
  agentStepsRemaining: number;
2170
+ agents?: {
2171
+ agentId: string;
2172
+ agentName: import("./types/agent-state").AgentTemplateName;
2173
+ agents: import("./types/agent-state").SubagentState[];
2174
+ messageHistory: import("./types/message").CodebuffMessage[];
2175
+ }[] | undefined;
1978
2176
  }>;
1979
2177
  toolCalls: z.ZodArray<z.ZodObject<{
1980
2178
  name: z.ZodString;
@@ -1982,12 +2180,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1982
2180
  id: z.ZodString;
1983
2181
  }, "strip", z.ZodTypeAny, {
1984
2182
  name: string;
1985
- parameters: Record<string, string>;
1986
2183
  id: string;
2184
+ parameters: Record<string, string>;
1987
2185
  }, {
1988
2186
  name: string;
1989
- parameters: Record<string, string>;
1990
2187
  id: string;
2188
+ parameters: Record<string, string>;
1991
2189
  }>, "many">;
1992
2190
  toolResults: z.ZodArray<z.ZodObject<{
1993
2191
  name: z.ZodString;
@@ -2008,7 +2206,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2008
2206
  agentState: {
2009
2207
  agentContext: string;
2010
2208
  fileContext: {
2011
- currentWorkingDirectory: string;
2209
+ projectRoot: string;
2210
+ cwd: string;
2012
2211
  fileTree: import("./util/file").FileTreeNode[];
2013
2212
  fileTokenScores: Record<string, Record<string, number>>;
2014
2213
  knowledgeFiles: Record<string, string>;
@@ -2038,6 +2237,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2038
2237
  messageHistory: (import("ai").CoreMessage & {
2039
2238
  timeToLive?: "agentStep" | "userPrompt" | undefined;
2040
2239
  })[];
2240
+ agents: {
2241
+ agentId: string;
2242
+ agentName: import("./types/agent-state").AgentTemplateName;
2243
+ agents: import("./types/agent-state").SubagentState[];
2244
+ messageHistory: import("./types/message").CodebuffMessage[];
2245
+ }[];
2041
2246
  agentStepsRemaining: number;
2042
2247
  };
2043
2248
  toolResults: {
@@ -2047,8 +2252,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2047
2252
  }[];
2048
2253
  toolCalls: {
2049
2254
  name: string;
2050
- parameters: Record<string, string>;
2051
2255
  id: string;
2256
+ parameters: Record<string, string>;
2052
2257
  }[];
2053
2258
  }, {
2054
2259
  type: "prompt-response";
@@ -2056,7 +2261,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2056
2261
  agentState: {
2057
2262
  agentContext: string;
2058
2263
  fileContext: {
2059
- currentWorkingDirectory: string;
2264
+ projectRoot: string;
2265
+ cwd: string;
2060
2266
  fileTree: import("./util/file").FileTreeNode[];
2061
2267
  fileTokenScores: Record<string, Record<string, number>>;
2062
2268
  knowledgeFiles: Record<string, string>;
@@ -2087,6 +2293,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2087
2293
  timeToLive?: "agentStep" | "userPrompt" | undefined;
2088
2294
  })[];
2089
2295
  agentStepsRemaining: number;
2296
+ agents?: {
2297
+ agentId: string;
2298
+ agentName: import("./types/agent-state").AgentTemplateName;
2299
+ agents: import("./types/agent-state").SubagentState[];
2300
+ messageHistory: import("./types/message").CodebuffMessage[];
2301
+ }[] | undefined;
2090
2302
  };
2091
2303
  toolResults: {
2092
2304
  name: string;
@@ -2095,8 +2307,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2095
2307
  }[];
2096
2308
  toolCalls: {
2097
2309
  name: string;
2098
- parameters: Record<string, string>;
2099
2310
  id: string;
2311
+ parameters: Record<string, string>;
2100
2312
  }[];
2101
2313
  }>, z.ZodObject<{
2102
2314
  type: z.ZodLiteral<"manager-prompt-response">;
@@ -2104,7 +2316,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2104
2316
  agentState: z.ZodObject<{
2105
2317
  agentContext: z.ZodString;
2106
2318
  fileContext: z.ZodObject<{
2107
- currentWorkingDirectory: z.ZodString;
2319
+ projectRoot: z.ZodString;
2320
+ cwd: z.ZodString;
2108
2321
  fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
2109
2322
  fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
2110
2323
  tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
@@ -2161,7 +2374,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2161
2374
  content: string;
2162
2375
  }>, "many">, "many">>;
2163
2376
  }, "strip", z.ZodTypeAny, {
2164
- currentWorkingDirectory: string;
2377
+ projectRoot: string;
2378
+ cwd: string;
2165
2379
  fileTree: import("./util/file").FileTreeNode[];
2166
2380
  fileTokenScores: Record<string, Record<string, number>>;
2167
2381
  knowledgeFiles: Record<string, string>;
@@ -2188,7 +2402,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2188
2402
  content: string;
2189
2403
  }[][] | undefined;
2190
2404
  }, {
2191
- currentWorkingDirectory: string;
2405
+ projectRoot: string;
2406
+ cwd: string;
2192
2407
  fileTree: import("./util/file").FileTreeNode[];
2193
2408
  fileTokenScores: Record<string, Record<string, number>>;
2194
2409
  knowledgeFiles: Record<string, string>;
@@ -2222,11 +2437,23 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2222
2437
  }, {
2223
2438
  timeToLive?: "agentStep" | "userPrompt" | undefined;
2224
2439
  }>>, "many">;
2440
+ agents: z.ZodDefault<z.ZodArray<z.ZodType<{
2441
+ agentId: string;
2442
+ agentName: import("./types/agent-state").AgentTemplateName;
2443
+ agents: import("./types/agent-state").SubagentState[];
2444
+ messageHistory: import("./types/message").CodebuffMessage[];
2445
+ }, z.ZodTypeDef, {
2446
+ agentId: string;
2447
+ agentName: import("./types/agent-state").AgentTemplateName;
2448
+ agents: import("./types/agent-state").SubagentState[];
2449
+ messageHistory: import("./types/message").CodebuffMessage[];
2450
+ }>, "many">>;
2225
2451
  agentStepsRemaining: z.ZodNumber;
2226
2452
  }, "strip", z.ZodTypeAny, {
2227
2453
  agentContext: string;
2228
2454
  fileContext: {
2229
- currentWorkingDirectory: string;
2455
+ projectRoot: string;
2456
+ cwd: string;
2230
2457
  fileTree: import("./util/file").FileTreeNode[];
2231
2458
  fileTokenScores: Record<string, Record<string, number>>;
2232
2459
  knowledgeFiles: Record<string, string>;
@@ -2256,11 +2483,18 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2256
2483
  messageHistory: (import("ai").CoreMessage & {
2257
2484
  timeToLive?: "agentStep" | "userPrompt" | undefined;
2258
2485
  })[];
2486
+ agents: {
2487
+ agentId: string;
2488
+ agentName: import("./types/agent-state").AgentTemplateName;
2489
+ agents: import("./types/agent-state").SubagentState[];
2490
+ messageHistory: import("./types/message").CodebuffMessage[];
2491
+ }[];
2259
2492
  agentStepsRemaining: number;
2260
2493
  }, {
2261
2494
  agentContext: string;
2262
2495
  fileContext: {
2263
- currentWorkingDirectory: string;
2496
+ projectRoot: string;
2497
+ cwd: string;
2264
2498
  fileTree: import("./util/file").FileTreeNode[];
2265
2499
  fileTokenScores: Record<string, Record<string, number>>;
2266
2500
  knowledgeFiles: Record<string, string>;
@@ -2291,6 +2525,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2291
2525
  timeToLive?: "agentStep" | "userPrompt" | undefined;
2292
2526
  })[];
2293
2527
  agentStepsRemaining: number;
2528
+ agents?: {
2529
+ agentId: string;
2530
+ agentName: import("./types/agent-state").AgentTemplateName;
2531
+ agents: import("./types/agent-state").SubagentState[];
2532
+ messageHistory: import("./types/message").CodebuffMessage[];
2533
+ }[] | undefined;
2294
2534
  }>;
2295
2535
  toolCalls: z.ZodArray<z.ZodObject<{
2296
2536
  name: z.ZodString;
@@ -2298,12 +2538,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2298
2538
  id: z.ZodString;
2299
2539
  }, "strip", z.ZodTypeAny, {
2300
2540
  name: string;
2301
- parameters: Record<string, string>;
2302
2541
  id: string;
2542
+ parameters: Record<string, string>;
2303
2543
  }, {
2304
2544
  name: string;
2305
- parameters: Record<string, string>;
2306
2545
  id: string;
2546
+ parameters: Record<string, string>;
2307
2547
  }>, "many">;
2308
2548
  toolResults: z.ZodArray<z.ZodObject<{
2309
2549
  name: z.ZodString;
@@ -2324,7 +2564,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2324
2564
  agentState: {
2325
2565
  agentContext: string;
2326
2566
  fileContext: {
2327
- currentWorkingDirectory: string;
2567
+ projectRoot: string;
2568
+ cwd: string;
2328
2569
  fileTree: import("./util/file").FileTreeNode[];
2329
2570
  fileTokenScores: Record<string, Record<string, number>>;
2330
2571
  knowledgeFiles: Record<string, string>;
@@ -2354,6 +2595,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2354
2595
  messageHistory: (import("ai").CoreMessage & {
2355
2596
  timeToLive?: "agentStep" | "userPrompt" | undefined;
2356
2597
  })[];
2598
+ agents: {
2599
+ agentId: string;
2600
+ agentName: import("./types/agent-state").AgentTemplateName;
2601
+ agents: import("./types/agent-state").SubagentState[];
2602
+ messageHistory: import("./types/message").CodebuffMessage[];
2603
+ }[];
2357
2604
  agentStepsRemaining: number;
2358
2605
  };
2359
2606
  toolResults: {
@@ -2363,8 +2610,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2363
2610
  }[];
2364
2611
  toolCalls: {
2365
2612
  name: string;
2366
- parameters: Record<string, string>;
2367
2613
  id: string;
2614
+ parameters: Record<string, string>;
2368
2615
  }[];
2369
2616
  }, {
2370
2617
  type: "manager-prompt-response";
@@ -2372,7 +2619,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2372
2619
  agentState: {
2373
2620
  agentContext: string;
2374
2621
  fileContext: {
2375
- currentWorkingDirectory: string;
2622
+ projectRoot: string;
2623
+ cwd: string;
2376
2624
  fileTree: import("./util/file").FileTreeNode[];
2377
2625
  fileTokenScores: Record<string, Record<string, number>>;
2378
2626
  knowledgeFiles: Record<string, string>;
@@ -2403,6 +2651,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2403
2651
  timeToLive?: "agentStep" | "userPrompt" | undefined;
2404
2652
  })[];
2405
2653
  agentStepsRemaining: number;
2654
+ agents?: {
2655
+ agentId: string;
2656
+ agentName: import("./types/agent-state").AgentTemplateName;
2657
+ agents: import("./types/agent-state").SubagentState[];
2658
+ messageHistory: import("./types/message").CodebuffMessage[];
2659
+ }[] | undefined;
2406
2660
  };
2407
2661
  toolResults: {
2408
2662
  name: string;
@@ -2411,8 +2665,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2411
2665
  }[];
2412
2666
  toolCalls: {
2413
2667
  name: string;
2414
- parameters: Record<string, string>;
2415
2668
  id: string;
2669
+ parameters: Record<string, string>;
2416
2670
  }[];
2417
2671
  }>, z.ZodObject<{
2418
2672
  type: z.ZodLiteral<"read-files">;
@@ -2449,12 +2703,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2449
2703
  content: z.ZodString;
2450
2704
  }, "strip", z.ZodTypeAny, {
2451
2705
  path: string;
2452
- type: "patch" | "file";
2453
2706
  content: string;
2707
+ type: "file" | "patch";
2454
2708
  }, {
2455
2709
  path: string;
2456
- type: "patch" | "file";
2457
2710
  content: string;
2711
+ type: "file" | "patch";
2458
2712
  }>, "many">;
2459
2713
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
2460
2714
  type: z.ZodEnum<["patch", "file"]>;
@@ -2462,12 +2716,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2462
2716
  content: z.ZodString;
2463
2717
  }, "strip", z.ZodTypeAny, {
2464
2718
  path: string;
2465
- type: "patch" | "file";
2466
2719
  content: string;
2720
+ type: "file" | "patch";
2467
2721
  }, {
2468
2722
  path: string;
2469
- type: "patch" | "file";
2470
2723
  content: string;
2724
+ type: "file" | "patch";
2471
2725
  }>, "many">;
2472
2726
  addedFileVersions: z.ZodArray<z.ZodObject<{
2473
2727
  path: z.ZodString;
@@ -2486,13 +2740,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2486
2740
  response: string;
2487
2741
  changes: {
2488
2742
  path: string;
2489
- type: "patch" | "file";
2490
2743
  content: string;
2744
+ type: "file" | "patch";
2491
2745
  }[];
2492
2746
  changesAlreadyApplied: {
2493
2747
  path: string;
2494
- type: "patch" | "file";
2495
2748
  content: string;
2749
+ type: "file" | "patch";
2496
2750
  }[];
2497
2751
  addedFileVersions: {
2498
2752
  path: string;
@@ -2510,13 +2764,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2510
2764
  response: string;
2511
2765
  changes: {
2512
2766
  path: string;
2513
- type: "patch" | "file";
2514
2767
  content: string;
2768
+ type: "file" | "patch";
2515
2769
  }[];
2516
2770
  changesAlreadyApplied: {
2517
2771
  path: string;
2518
- type: "patch" | "file";
2519
2772
  content: string;
2773
+ type: "file" | "patch";
2520
2774
  }[];
2521
2775
  addedFileVersions: {
2522
2776
  path: string;