codebuff 1.0.328 → 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.
- package/dist/client.js +2 -2
- package/dist/client.js.map +1 -1
- package/dist/common/actions.d.ts +404 -180
- package/dist/common/actions.d.ts.map +1 -1
- package/dist/common/actions.js +0 -1
- package/dist/common/actions.js.map +1 -1
- package/dist/common/analytics.d.ts +1 -1
- package/dist/common/browser-actions.d.ts +277 -277
- package/dist/common/constants.d.ts +5 -0
- package/dist/common/constants.d.ts.map +1 -1
- package/dist/common/constants.js +15 -1
- package/dist/common/constants.js.map +1 -1
- package/dist/common/json-config/default.d.ts +3 -0
- package/dist/common/json-config/default.d.ts.map +1 -0
- package/dist/common/json-config/default.js +12 -0
- package/dist/common/json-config/default.js.map +1 -0
- package/dist/common/types/agent-state.d.ts +46 -11
- package/dist/common/types/agent-state.d.ts.map +1 -1
- package/dist/common/types/agent-state.js +12 -5
- package/dist/common/types/agent-state.js.map +1 -1
- package/dist/common/types/message.d.ts +16 -16
- package/dist/common/util/file.d.ts +6 -3
- package/dist/common/util/file.d.ts.map +1 -1
- package/dist/common/util/file.js +2 -1
- package/dist/common/util/file.js.map +1 -1
- package/dist/common/websockets/websocket-schema.d.ts +790 -394
- package/dist/common/websockets/websocket-schema.d.ts.map +1 -1
- package/dist/index.js +6 -6
- package/dist/json-config/parser.d.ts +1 -1
- package/dist/json-config/parser.js +4 -3
- package/dist/json-config/parser.js.map +1 -1
- package/dist/project-files.d.ts +2 -1
- package/dist/project-files.js +3 -2
- package/dist/project-files.js.map +1 -1
- package/dist/terminal/base.js +1 -1
- package/dist/terminal/base.js.map +1 -1
- package/package.json +1 -1
- package/dist/common/db/env.d.mts +0 -4
- package/dist/common/db/env.mjs +0 -26
- package/dist/common/db/env.mjs.map +0 -1
- package/dist/common/env.d.mts +0 -13
- package/dist/common/env.mjs +0 -43
- package/dist/common/env.mjs.map +0 -1
- package/dist/common/src/actions.d.ts +0 -2673
- package/dist/common/src/actions.d.ts.map +0 -1
- package/dist/common/src/actions.js +0 -167
- package/dist/common/src/actions.js.map +0 -1
- package/dist/common/src/analytics.d.ts +0 -6
- package/dist/common/src/analytics.d.ts.map +0 -1
- package/dist/common/src/analytics.js +0 -60
- package/dist/common/src/analytics.js.map +0 -1
- package/dist/common/src/api-keys/constants.d.ts +0 -9
- package/dist/common/src/api-keys/constants.d.ts.map +0 -1
- package/dist/common/src/api-keys/constants.js +0 -26
- package/dist/common/src/api-keys/constants.js.map +0 -1
- package/dist/common/src/api-keys/crypto.d.ts +0 -25
- package/dist/common/src/api-keys/crypto.d.ts.map +0 -1
- package/dist/common/src/api-keys/crypto.js +0 -186
- package/dist/common/src/api-keys/crypto.js.map +0 -1
- package/dist/common/src/browser-actions.d.ts +0 -4416
- package/dist/common/src/browser-actions.d.ts.map +0 -1
- package/dist/common/src/browser-actions.js +0 -343
- package/dist/common/src/browser-actions.js.map +0 -1
- package/dist/common/src/constants/analytics-events.d.ts +0 -28
- package/dist/common/src/constants/analytics-events.d.ts.map +0 -1
- package/dist/common/src/constants/analytics-events.js +0 -36
- package/dist/common/src/constants/analytics-events.js.map +0 -1
- package/dist/common/src/constants/grant-priorities.d.ts +0 -3
- package/dist/common/src/constants/grant-priorities.d.ts.map +0 -1
- package/dist/common/src/constants/grant-priorities.js +0 -11
- package/dist/common/src/constants/grant-priorities.js.map +0 -1
- package/dist/common/src/constants/tools.d.ts +0 -20
- package/dist/common/src/constants/tools.d.ts.map +0 -1
- package/dist/common/src/constants/tools.js +0 -47
- package/dist/common/src/constants/tools.js.map +0 -1
- package/dist/common/src/constants.d.ts +0 -152
- package/dist/common/src/constants.d.ts.map +0 -1
- package/dist/common/src/constants.js +0 -222
- package/dist/common/src/constants.js.map +0 -1
- package/dist/common/src/db/drizzle.config.d.ts +0 -3
- package/dist/common/src/db/drizzle.config.d.ts.map +0 -1
- package/dist/common/src/db/drizzle.config.js +0 -17
- package/dist/common/src/db/drizzle.config.js.map +0 -1
- package/dist/common/src/db/index.d.ts +0 -7
- package/dist/common/src/db/index.d.ts.map +0 -1
- package/dist/common/src/db/index.js +0 -35
- package/dist/common/src/db/index.js.map +0 -1
- package/dist/common/src/db/schema.d.ts +0 -2289
- package/dist/common/src/db/schema.d.ts.map +0 -1
- package/dist/common/src/db/schema.js +0 -296
- package/dist/common/src/db/schema.js.map +0 -1
- package/dist/common/src/db/transaction.d.ts +0 -13
- package/dist/common/src/db/transaction.d.ts.map +0 -1
- package/dist/common/src/db/transaction.js +0 -36
- package/dist/common/src/db/transaction.js.map +0 -1
- package/dist/common/src/json-config/__tests__/constants.test.d.ts +0 -2
- package/dist/common/src/json-config/__tests__/constants.test.d.ts.map +0 -1
- package/dist/common/src/json-config/__tests__/constants.test.js +0 -273
- package/dist/common/src/json-config/__tests__/constants.test.js.map +0 -1
- package/dist/common/src/json-config/__tests__/stringify-schema.test.d.ts +0 -2
- package/dist/common/src/json-config/__tests__/stringify-schema.test.d.ts.map +0 -1
- package/dist/common/src/json-config/__tests__/stringify-schema.test.js +0 -66
- package/dist/common/src/json-config/__tests__/stringify-schema.test.js.map +0 -1
- package/dist/common/src/json-config/constants.d.ts +0 -138
- package/dist/common/src/json-config/constants.d.ts.map +0 -1
- package/dist/common/src/json-config/constants.js +0 -78
- package/dist/common/src/json-config/constants.js.map +0 -1
- package/dist/common/src/json-config/stringify-schema.d.ts +0 -10
- package/dist/common/src/json-config/stringify-schema.d.ts.map +0 -1
- package/dist/common/src/json-config/stringify-schema.js +0 -131
- package/dist/common/src/json-config/stringify-schema.js.map +0 -1
- package/dist/common/src/project-file-tree.d.ts +0 -12
- package/dist/common/src/project-file-tree.d.ts.map +0 -1
- package/dist/common/src/project-file-tree.js +0 -212
- package/dist/common/src/project-file-tree.js.map +0 -1
- package/dist/common/src/types/agent-state.d.ts +0 -227
- package/dist/common/src/types/agent-state.d.ts.map +0 -1
- package/dist/common/src/types/agent-state.js +0 -34
- package/dist/common/src/types/agent-state.js.map +0 -1
- package/dist/common/src/types/grant.d.ts +0 -3
- package/dist/common/src/types/grant.d.ts.map +0 -1
- package/dist/common/src/types/grant.js +0 -11
- package/dist/common/src/types/grant.js.map +0 -1
- package/dist/common/src/types/message.d.ts +0 -320
- package/dist/common/src/types/message.d.ts.map +0 -1
- package/dist/common/src/types/message.js +0 -60
- package/dist/common/src/types/message.js.map +0 -1
- package/dist/common/src/types/organization.d.ts +0 -106
- package/dist/common/src/types/organization.d.ts.map +0 -1
- package/dist/common/src/types/organization.js +0 -3
- package/dist/common/src/types/organization.js.map +0 -1
- package/dist/common/src/types/referral.d.ts +0 -3
- package/dist/common/src/types/referral.d.ts.map +0 -1
- package/dist/common/src/types/referral.js +0 -5
- package/dist/common/src/types/referral.js.map +0 -1
- package/dist/common/src/types/tools.d.ts +0 -6
- package/dist/common/src/types/tools.d.ts.map +0 -1
- package/dist/common/src/types/tools.js +0 -3
- package/dist/common/src/types/tools.js.map +0 -1
- package/dist/common/src/types/usage.d.ts +0 -41
- package/dist/common/src/types/usage.d.ts.map +0 -1
- package/dist/common/src/types/usage.js +0 -16
- package/dist/common/src/types/usage.js.map +0 -1
- package/dist/common/src/util/__tests__/messages.test.d.ts +0 -2
- package/dist/common/src/util/__tests__/messages.test.d.ts.map +0 -1
- package/dist/common/src/util/__tests__/messages.test.js +0 -70
- package/dist/common/src/util/__tests__/messages.test.js.map +0 -1
- package/dist/common/src/util/__tests__/saxy.test.d.ts +0 -2
- package/dist/common/src/util/__tests__/saxy.test.d.ts.map +0 -1
- package/dist/common/src/util/__tests__/saxy.test.js +0 -906
- package/dist/common/src/util/__tests__/saxy.test.js.map +0 -1
- package/dist/common/src/util/__tests__/string.test.d.ts +0 -2
- package/dist/common/src/util/__tests__/string.test.d.ts.map +0 -1
- package/dist/common/src/util/__tests__/string.test.js +0 -82
- package/dist/common/src/util/__tests__/string.test.js.map +0 -1
- package/dist/common/src/util/array.d.ts +0 -7
- package/dist/common/src/util/array.d.ts.map +0 -1
- package/dist/common/src/util/array.js +0 -32
- package/dist/common/src/util/array.js.map +0 -1
- package/dist/common/src/util/changes.d.ts +0 -9
- package/dist/common/src/util/changes.d.ts.map +0 -1
- package/dist/common/src/util/changes.js +0 -87
- package/dist/common/src/util/changes.js.map +0 -1
- package/dist/common/src/util/credentials.d.ts +0 -26
- package/dist/common/src/util/credentials.d.ts.map +0 -1
- package/dist/common/src/util/credentials.js +0 -24
- package/dist/common/src/util/credentials.js.map +0 -1
- package/dist/common/src/util/currency.d.ts +0 -15
- package/dist/common/src/util/currency.d.ts.map +0 -1
- package/dist/common/src/util/currency.js +0 -23
- package/dist/common/src/util/currency.js.map +0 -1
- package/dist/common/src/util/dates.d.ts +0 -11
- package/dist/common/src/util/dates.d.ts.map +0 -1
- package/dist/common/src/util/dates.js +0 -22
- package/dist/common/src/util/dates.js.map +0 -1
- package/dist/common/src/util/file.d.ts +0 -163
- package/dist/common/src/util/file.d.ts.map +0 -1
- package/dist/common/src/util/file.js +0 -192
- package/dist/common/src/util/file.js.map +0 -1
- package/dist/common/src/util/git.d.ts +0 -7
- package/dist/common/src/util/git.d.ts.map +0 -1
- package/dist/common/src/util/git.js +0 -81
- package/dist/common/src/util/git.js.map +0 -1
- package/dist/common/src/util/logger.d.ts +0 -9
- package/dist/common/src/util/logger.d.ts.map +0 -1
- package/dist/common/src/util/logger.js +0 -52
- package/dist/common/src/util/logger.js.map +0 -1
- package/dist/common/src/util/lru-cache.d.ts +0 -31
- package/dist/common/src/util/lru-cache.d.ts.map +0 -1
- package/dist/common/src/util/lru-cache.js +0 -68
- package/dist/common/src/util/lru-cache.js.map +0 -1
- package/dist/common/src/util/messages.d.ts +0 -12
- package/dist/common/src/util/messages.d.ts.map +0 -1
- package/dist/common/src/util/messages.js +0 -81
- package/dist/common/src/util/messages.js.map +0 -1
- package/dist/common/src/util/min-heap.d.ts +0 -16
- package/dist/common/src/util/min-heap.d.ts.map +0 -1
- package/dist/common/src/util/min-heap.js +0 -73
- package/dist/common/src/util/min-heap.js.map +0 -1
- package/dist/common/src/util/object.d.ts +0 -19
- package/dist/common/src/util/object.d.ts.map +0 -1
- package/dist/common/src/util/object.js +0 -91
- package/dist/common/src/util/object.js.map +0 -1
- package/dist/common/src/util/patch.d.ts +0 -2
- package/dist/common/src/util/patch.d.ts.map +0 -1
- package/dist/common/src/util/patch.js +0 -215
- package/dist/common/src/util/patch.js.map +0 -1
- package/dist/common/src/util/promise.d.ts +0 -17
- package/dist/common/src/util/promise.d.ts.map +0 -1
- package/dist/common/src/util/promise.js +0 -51
- package/dist/common/src/util/promise.js.map +0 -1
- package/dist/common/src/util/random.d.ts +0 -2
- package/dist/common/src/util/random.d.ts.map +0 -1
- package/dist/common/src/util/random.js +0 -17
- package/dist/common/src/util/random.js.map +0 -1
- package/dist/common/src/util/referral.d.ts +0 -2
- package/dist/common/src/util/referral.d.ts.map +0 -1
- package/dist/common/src/util/referral.js +0 -6
- package/dist/common/src/util/referral.js.map +0 -1
- package/dist/common/src/util/saxy.d.ts +0 -179
- package/dist/common/src/util/saxy.d.ts.map +0 -1
- package/dist/common/src/util/saxy.js +0 -548
- package/dist/common/src/util/saxy.js.map +0 -1
- package/dist/common/src/util/string.d.ts +0 -80
- package/dist/common/src/util/string.d.ts.map +0 -1
- package/dist/common/src/util/string.js +0 -264
- package/dist/common/src/util/string.js.map +0 -1
- package/dist/common/src/util/stripe.d.ts +0 -4
- package/dist/common/src/util/stripe.d.ts.map +0 -1
- package/dist/common/src/util/stripe.js +0 -22
- package/dist/common/src/util/stripe.js.map +0 -1
- package/dist/common/src/util/sync-failure.d.ts +0 -2
- package/dist/common/src/util/sync-failure.d.ts.map +0 -1
- package/dist/common/src/util/sync-failure.js +0 -57
- package/dist/common/src/util/sync-failure.js.map +0 -1
- package/dist/common/src/websockets/websocket-client.d.ts +0 -43
- package/dist/common/src/websockets/websocket-client.d.ts.map +0 -1
- package/dist/common/src/websockets/websocket-client.js +0 -216
- package/dist/common/src/websockets/websocket-client.js.map +0 -1
- package/dist/common/src/websockets/websocket-schema.d.ts +0 -5159
- package/dist/common/src/websockets/websocket-schema.d.ts.map +0 -1
- package/dist/common/src/websockets/websocket-schema.js +0 -55
- package/dist/common/src/websockets/websocket-schema.js.map +0 -1
- package/dist/common/tsconfig.tsbuildinfo +0 -1
|
@@ -62,7 +62,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
62
62
|
agentState: z.ZodObject<{
|
|
63
63
|
agentContext: z.ZodString;
|
|
64
64
|
fileContext: z.ZodObject<{
|
|
65
|
-
|
|
65
|
+
projectRoot: z.ZodString;
|
|
66
|
+
cwd: z.ZodString;
|
|
66
67
|
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
67
68
|
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
68
69
|
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
@@ -119,7 +120,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
119
120
|
content: string;
|
|
120
121
|
}>, "many">, "many">>;
|
|
121
122
|
}, "strip", z.ZodTypeAny, {
|
|
122
|
-
|
|
123
|
+
projectRoot: string;
|
|
124
|
+
cwd: string;
|
|
123
125
|
fileTree: import("../util/file").FileTreeNode[];
|
|
124
126
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
125
127
|
knowledgeFiles: Record<string, string>;
|
|
@@ -146,7 +148,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
146
148
|
content: string;
|
|
147
149
|
}[][] | undefined;
|
|
148
150
|
}, {
|
|
149
|
-
|
|
151
|
+
projectRoot: string;
|
|
152
|
+
cwd: string;
|
|
150
153
|
fileTree: import("../util/file").FileTreeNode[];
|
|
151
154
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
152
155
|
knowledgeFiles: Record<string, string>;
|
|
@@ -180,12 +183,23 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
180
183
|
}, {
|
|
181
184
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
182
185
|
}>>, "many">;
|
|
183
|
-
|
|
184
|
-
|
|
186
|
+
agents: z.ZodDefault<z.ZodArray<z.ZodType<{
|
|
187
|
+
agentId: string;
|
|
188
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
189
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
190
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
191
|
+
}, z.ZodTypeDef, {
|
|
192
|
+
agentId: string;
|
|
193
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
194
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
195
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
196
|
+
}>, "many">>;
|
|
197
|
+
agentStepsRemaining: z.ZodNumber;
|
|
185
198
|
}, "strip", z.ZodTypeAny, {
|
|
186
199
|
agentContext: string;
|
|
187
200
|
fileContext: {
|
|
188
|
-
|
|
201
|
+
projectRoot: string;
|
|
202
|
+
cwd: string;
|
|
189
203
|
fileTree: import("../util/file").FileTreeNode[];
|
|
190
204
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
191
205
|
knowledgeFiles: Record<string, string>;
|
|
@@ -215,12 +229,18 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
215
229
|
messageHistory: (import("ai").CoreMessage & {
|
|
216
230
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
217
231
|
})[];
|
|
218
|
-
|
|
219
|
-
|
|
232
|
+
agents: {
|
|
233
|
+
agentId: string;
|
|
234
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
235
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
236
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
237
|
+
}[];
|
|
238
|
+
agentStepsRemaining: number;
|
|
220
239
|
}, {
|
|
221
240
|
agentContext: string;
|
|
222
241
|
fileContext: {
|
|
223
|
-
|
|
242
|
+
projectRoot: string;
|
|
243
|
+
cwd: string;
|
|
224
244
|
fileTree: import("../util/file").FileTreeNode[];
|
|
225
245
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
226
246
|
knowledgeFiles: Record<string, string>;
|
|
@@ -250,8 +270,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
250
270
|
messageHistory: (import("ai").CoreMessage & {
|
|
251
271
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
252
272
|
})[];
|
|
253
|
-
|
|
254
|
-
|
|
273
|
+
agentStepsRemaining: number;
|
|
274
|
+
agents?: {
|
|
275
|
+
agentId: string;
|
|
276
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
277
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
278
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
279
|
+
}[] | undefined;
|
|
255
280
|
}>;
|
|
256
281
|
toolResults: z.ZodArray<z.ZodObject<{
|
|
257
282
|
name: z.ZodString;
|
|
@@ -267,17 +292,17 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
267
292
|
result: string;
|
|
268
293
|
}>, "many">;
|
|
269
294
|
model: z.ZodOptional<z.ZodString>;
|
|
270
|
-
cwd: z.ZodOptional<z.ZodString>;
|
|
271
295
|
repoUrl: z.ZodOptional<z.ZodString>;
|
|
272
296
|
}, "strip", z.ZodTypeAny, {
|
|
273
297
|
type: "prompt";
|
|
274
298
|
promptId: string;
|
|
275
299
|
fingerprintId: string;
|
|
276
|
-
costMode: "
|
|
300
|
+
costMode: "max" | "lite" | "normal" | "experimental" | "ask";
|
|
277
301
|
agentState: {
|
|
278
302
|
agentContext: string;
|
|
279
303
|
fileContext: {
|
|
280
|
-
|
|
304
|
+
projectRoot: string;
|
|
305
|
+
cwd: string;
|
|
281
306
|
fileTree: import("../util/file").FileTreeNode[];
|
|
282
307
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
283
308
|
knowledgeFiles: Record<string, string>;
|
|
@@ -307,18 +332,22 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
307
332
|
messageHistory: (import("ai").CoreMessage & {
|
|
308
333
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
309
334
|
})[];
|
|
310
|
-
|
|
311
|
-
|
|
335
|
+
agents: {
|
|
336
|
+
agentId: string;
|
|
337
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
338
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
339
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
340
|
+
}[];
|
|
341
|
+
agentStepsRemaining: number;
|
|
312
342
|
};
|
|
313
343
|
toolResults: {
|
|
314
344
|
name: string;
|
|
315
345
|
id: string;
|
|
316
346
|
result: string;
|
|
317
347
|
}[];
|
|
318
|
-
model?: string | undefined;
|
|
319
348
|
prompt?: string | undefined;
|
|
320
349
|
authToken?: string | undefined;
|
|
321
|
-
|
|
350
|
+
model?: string | undefined;
|
|
322
351
|
repoUrl?: string | undefined;
|
|
323
352
|
}, {
|
|
324
353
|
type: "prompt";
|
|
@@ -327,7 +356,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
327
356
|
agentState: {
|
|
328
357
|
agentContext: string;
|
|
329
358
|
fileContext: {
|
|
330
|
-
|
|
359
|
+
projectRoot: string;
|
|
360
|
+
cwd: string;
|
|
331
361
|
fileTree: import("../util/file").FileTreeNode[];
|
|
332
362
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
333
363
|
knowledgeFiles: Record<string, string>;
|
|
@@ -357,19 +387,23 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
357
387
|
messageHistory: (import("ai").CoreMessage & {
|
|
358
388
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
359
389
|
})[];
|
|
360
|
-
|
|
361
|
-
|
|
390
|
+
agentStepsRemaining: number;
|
|
391
|
+
agents?: {
|
|
392
|
+
agentId: string;
|
|
393
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
394
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
395
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
396
|
+
}[] | undefined;
|
|
362
397
|
};
|
|
363
398
|
toolResults: {
|
|
364
399
|
name: string;
|
|
365
400
|
id: string;
|
|
366
401
|
result: string;
|
|
367
402
|
}[];
|
|
368
|
-
model?: string | undefined;
|
|
369
403
|
prompt?: string | undefined;
|
|
370
404
|
authToken?: string | undefined;
|
|
371
|
-
costMode?: "
|
|
372
|
-
|
|
405
|
+
costMode?: "max" | "lite" | "normal" | "experimental" | "ask" | undefined;
|
|
406
|
+
model?: string | undefined;
|
|
373
407
|
repoUrl?: string | undefined;
|
|
374
408
|
}>, z.ZodObject<{
|
|
375
409
|
type: z.ZodLiteral<"manager-prompt">;
|
|
@@ -378,7 +412,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
378
412
|
agentState: z.ZodObject<{
|
|
379
413
|
agentContext: z.ZodString;
|
|
380
414
|
fileContext: z.ZodObject<{
|
|
381
|
-
|
|
415
|
+
projectRoot: z.ZodString;
|
|
416
|
+
cwd: z.ZodString;
|
|
382
417
|
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
383
418
|
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
384
419
|
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
@@ -435,7 +470,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
435
470
|
content: string;
|
|
436
471
|
}>, "many">, "many">>;
|
|
437
472
|
}, "strip", z.ZodTypeAny, {
|
|
438
|
-
|
|
473
|
+
projectRoot: string;
|
|
474
|
+
cwd: string;
|
|
439
475
|
fileTree: import("../util/file").FileTreeNode[];
|
|
440
476
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
441
477
|
knowledgeFiles: Record<string, string>;
|
|
@@ -462,7 +498,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
462
498
|
content: string;
|
|
463
499
|
}[][] | undefined;
|
|
464
500
|
}, {
|
|
465
|
-
|
|
501
|
+
projectRoot: string;
|
|
502
|
+
cwd: string;
|
|
466
503
|
fileTree: import("../util/file").FileTreeNode[];
|
|
467
504
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
468
505
|
knowledgeFiles: Record<string, string>;
|
|
@@ -496,12 +533,23 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
496
533
|
}, {
|
|
497
534
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
498
535
|
}>>, "many">;
|
|
499
|
-
|
|
500
|
-
|
|
536
|
+
agents: z.ZodDefault<z.ZodArray<z.ZodType<{
|
|
537
|
+
agentId: string;
|
|
538
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
539
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
540
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
541
|
+
}, z.ZodTypeDef, {
|
|
542
|
+
agentId: string;
|
|
543
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
544
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
545
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
546
|
+
}>, "many">>;
|
|
547
|
+
agentStepsRemaining: z.ZodNumber;
|
|
501
548
|
}, "strip", z.ZodTypeAny, {
|
|
502
549
|
agentContext: string;
|
|
503
550
|
fileContext: {
|
|
504
|
-
|
|
551
|
+
projectRoot: string;
|
|
552
|
+
cwd: string;
|
|
505
553
|
fileTree: import("../util/file").FileTreeNode[];
|
|
506
554
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
507
555
|
knowledgeFiles: Record<string, string>;
|
|
@@ -531,12 +579,18 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
531
579
|
messageHistory: (import("ai").CoreMessage & {
|
|
532
580
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
533
581
|
})[];
|
|
534
|
-
|
|
535
|
-
|
|
582
|
+
agents: {
|
|
583
|
+
agentId: string;
|
|
584
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
585
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
586
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
587
|
+
}[];
|
|
588
|
+
agentStepsRemaining: number;
|
|
536
589
|
}, {
|
|
537
590
|
agentContext: string;
|
|
538
591
|
fileContext: {
|
|
539
|
-
|
|
592
|
+
projectRoot: string;
|
|
593
|
+
cwd: string;
|
|
540
594
|
fileTree: import("../util/file").FileTreeNode[];
|
|
541
595
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
542
596
|
knowledgeFiles: Record<string, string>;
|
|
@@ -566,8 +620,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
566
620
|
messageHistory: (import("ai").CoreMessage & {
|
|
567
621
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
568
622
|
})[];
|
|
569
|
-
|
|
570
|
-
|
|
623
|
+
agentStepsRemaining: number;
|
|
624
|
+
agents?: {
|
|
625
|
+
agentId: string;
|
|
626
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
627
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
628
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
629
|
+
}[] | undefined;
|
|
571
630
|
}>;
|
|
572
631
|
toolResults: z.ZodArray<z.ZodObject<{
|
|
573
632
|
name: z.ZodString;
|
|
@@ -592,11 +651,12 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
592
651
|
type: "manager-prompt";
|
|
593
652
|
promptId: string;
|
|
594
653
|
fingerprintId: string;
|
|
595
|
-
costMode: "
|
|
654
|
+
costMode: "max" | "lite" | "normal" | "experimental" | "ask";
|
|
596
655
|
agentState: {
|
|
597
656
|
agentContext: string;
|
|
598
657
|
fileContext: {
|
|
599
|
-
|
|
658
|
+
projectRoot: string;
|
|
659
|
+
cwd: string;
|
|
600
660
|
fileTree: import("../util/file").FileTreeNode[];
|
|
601
661
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
602
662
|
knowledgeFiles: Record<string, string>;
|
|
@@ -626,18 +686,23 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
626
686
|
messageHistory: (import("ai").CoreMessage & {
|
|
627
687
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
628
688
|
})[];
|
|
629
|
-
|
|
630
|
-
|
|
689
|
+
agents: {
|
|
690
|
+
agentId: string;
|
|
691
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
692
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
693
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
694
|
+
}[];
|
|
695
|
+
agentStepsRemaining: number;
|
|
631
696
|
};
|
|
632
697
|
toolResults: {
|
|
633
698
|
name: string;
|
|
634
699
|
id: string;
|
|
635
700
|
result: string;
|
|
636
701
|
}[];
|
|
637
|
-
|
|
702
|
+
cwd?: string | undefined;
|
|
638
703
|
prompt?: string | undefined;
|
|
639
704
|
authToken?: string | undefined;
|
|
640
|
-
|
|
705
|
+
model?: string | undefined;
|
|
641
706
|
repoName?: string | undefined;
|
|
642
707
|
}, {
|
|
643
708
|
type: "manager-prompt";
|
|
@@ -646,7 +711,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
646
711
|
agentState: {
|
|
647
712
|
agentContext: string;
|
|
648
713
|
fileContext: {
|
|
649
|
-
|
|
714
|
+
projectRoot: string;
|
|
715
|
+
cwd: string;
|
|
650
716
|
fileTree: import("../util/file").FileTreeNode[];
|
|
651
717
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
652
718
|
knowledgeFiles: Record<string, string>;
|
|
@@ -676,19 +742,24 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
676
742
|
messageHistory: (import("ai").CoreMessage & {
|
|
677
743
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
678
744
|
})[];
|
|
679
|
-
|
|
680
|
-
|
|
745
|
+
agentStepsRemaining: number;
|
|
746
|
+
agents?: {
|
|
747
|
+
agentId: string;
|
|
748
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
749
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
750
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
751
|
+
}[] | undefined;
|
|
681
752
|
};
|
|
682
753
|
toolResults: {
|
|
683
754
|
name: string;
|
|
684
755
|
id: string;
|
|
685
756
|
result: string;
|
|
686
757
|
}[];
|
|
687
|
-
|
|
758
|
+
cwd?: string | undefined;
|
|
688
759
|
prompt?: string | undefined;
|
|
689
760
|
authToken?: string | undefined;
|
|
690
|
-
costMode?: "
|
|
691
|
-
|
|
761
|
+
costMode?: "max" | "lite" | "normal" | "experimental" | "ask" | undefined;
|
|
762
|
+
model?: string | undefined;
|
|
692
763
|
repoName?: string | undefined;
|
|
693
764
|
}>, z.ZodObject<{
|
|
694
765
|
type: z.ZodLiteral<"read-files-response">;
|
|
@@ -707,7 +778,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
707
778
|
fingerprintId: z.ZodString;
|
|
708
779
|
authToken: z.ZodOptional<z.ZodString>;
|
|
709
780
|
fileContext: z.ZodObject<{
|
|
710
|
-
|
|
781
|
+
projectRoot: z.ZodString;
|
|
782
|
+
cwd: z.ZodString;
|
|
711
783
|
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
712
784
|
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
713
785
|
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
@@ -764,7 +836,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
764
836
|
content: string;
|
|
765
837
|
}>, "many">, "many">>;
|
|
766
838
|
}, "strip", z.ZodTypeAny, {
|
|
767
|
-
|
|
839
|
+
projectRoot: string;
|
|
840
|
+
cwd: string;
|
|
768
841
|
fileTree: import("../util/file").FileTreeNode[];
|
|
769
842
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
770
843
|
knowledgeFiles: Record<string, string>;
|
|
@@ -791,7 +864,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
791
864
|
content: string;
|
|
792
865
|
}[][] | undefined;
|
|
793
866
|
}, {
|
|
794
|
-
|
|
867
|
+
projectRoot: string;
|
|
868
|
+
cwd: string;
|
|
795
869
|
fileTree: import("../util/file").FileTreeNode[];
|
|
796
870
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
797
871
|
knowledgeFiles: Record<string, string>;
|
|
@@ -823,7 +897,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
823
897
|
type: "init";
|
|
824
898
|
fingerprintId: string;
|
|
825
899
|
fileContext: {
|
|
826
|
-
|
|
900
|
+
projectRoot: string;
|
|
901
|
+
cwd: string;
|
|
827
902
|
fileTree: import("../util/file").FileTreeNode[];
|
|
828
903
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
829
904
|
knowledgeFiles: Record<string, string>;
|
|
@@ -856,7 +931,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
856
931
|
type: "init";
|
|
857
932
|
fingerprintId: string;
|
|
858
933
|
fileContext: {
|
|
859
|
-
|
|
934
|
+
projectRoot: string;
|
|
935
|
+
cwd: string;
|
|
860
936
|
fileTree: import("../util/file").FileTreeNode[];
|
|
861
937
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
862
938
|
knowledgeFiles: Record<string, string>;
|
|
@@ -902,15 +978,17 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
902
978
|
authToken?: string | undefined;
|
|
903
979
|
}>]>;
|
|
904
980
|
}, "strip", z.ZodTypeAny, {
|
|
981
|
+
type: "action";
|
|
905
982
|
data: {
|
|
906
983
|
type: "prompt";
|
|
907
984
|
promptId: string;
|
|
908
985
|
fingerprintId: string;
|
|
909
|
-
costMode: "
|
|
986
|
+
costMode: "max" | "lite" | "normal" | "experimental" | "ask";
|
|
910
987
|
agentState: {
|
|
911
988
|
agentContext: string;
|
|
912
989
|
fileContext: {
|
|
913
|
-
|
|
990
|
+
projectRoot: string;
|
|
991
|
+
cwd: string;
|
|
914
992
|
fileTree: import("../util/file").FileTreeNode[];
|
|
915
993
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
916
994
|
knowledgeFiles: Record<string, string>;
|
|
@@ -940,28 +1018,33 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
940
1018
|
messageHistory: (import("ai").CoreMessage & {
|
|
941
1019
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
942
1020
|
})[];
|
|
943
|
-
|
|
944
|
-
|
|
1021
|
+
agents: {
|
|
1022
|
+
agentId: string;
|
|
1023
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
1024
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
1025
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
1026
|
+
}[];
|
|
1027
|
+
agentStepsRemaining: number;
|
|
945
1028
|
};
|
|
946
1029
|
toolResults: {
|
|
947
1030
|
name: string;
|
|
948
1031
|
id: string;
|
|
949
1032
|
result: string;
|
|
950
1033
|
}[];
|
|
951
|
-
model?: string | undefined;
|
|
952
1034
|
prompt?: string | undefined;
|
|
953
1035
|
authToken?: string | undefined;
|
|
954
|
-
|
|
1036
|
+
model?: string | undefined;
|
|
955
1037
|
repoUrl?: string | undefined;
|
|
956
1038
|
} | {
|
|
957
1039
|
type: "manager-prompt";
|
|
958
1040
|
promptId: string;
|
|
959
1041
|
fingerprintId: string;
|
|
960
|
-
costMode: "
|
|
1042
|
+
costMode: "max" | "lite" | "normal" | "experimental" | "ask";
|
|
961
1043
|
agentState: {
|
|
962
1044
|
agentContext: string;
|
|
963
1045
|
fileContext: {
|
|
964
|
-
|
|
1046
|
+
projectRoot: string;
|
|
1047
|
+
cwd: string;
|
|
965
1048
|
fileTree: import("../util/file").FileTreeNode[];
|
|
966
1049
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
967
1050
|
knowledgeFiles: Record<string, string>;
|
|
@@ -991,18 +1074,23 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
991
1074
|
messageHistory: (import("ai").CoreMessage & {
|
|
992
1075
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
993
1076
|
})[];
|
|
994
|
-
|
|
995
|
-
|
|
1077
|
+
agents: {
|
|
1078
|
+
agentId: string;
|
|
1079
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
1080
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
1081
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
1082
|
+
}[];
|
|
1083
|
+
agentStepsRemaining: number;
|
|
996
1084
|
};
|
|
997
1085
|
toolResults: {
|
|
998
1086
|
name: string;
|
|
999
1087
|
id: string;
|
|
1000
1088
|
result: string;
|
|
1001
1089
|
}[];
|
|
1002
|
-
|
|
1090
|
+
cwd?: string | undefined;
|
|
1003
1091
|
prompt?: string | undefined;
|
|
1004
1092
|
authToken?: string | undefined;
|
|
1005
|
-
|
|
1093
|
+
model?: string | undefined;
|
|
1006
1094
|
repoName?: string | undefined;
|
|
1007
1095
|
} | {
|
|
1008
1096
|
type: "read-files-response";
|
|
@@ -1012,7 +1100,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1012
1100
|
type: "init";
|
|
1013
1101
|
fingerprintId: string;
|
|
1014
1102
|
fileContext: {
|
|
1015
|
-
|
|
1103
|
+
projectRoot: string;
|
|
1104
|
+
cwd: string;
|
|
1016
1105
|
fileTree: import("../util/file").FileTreeNode[];
|
|
1017
1106
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1018
1107
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1047,9 +1136,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1047
1136
|
stagedChanges: string;
|
|
1048
1137
|
authToken?: string | undefined;
|
|
1049
1138
|
};
|
|
1050
|
-
type: "action";
|
|
1051
1139
|
txid: number;
|
|
1052
1140
|
}, {
|
|
1141
|
+
type: "action";
|
|
1053
1142
|
data: {
|
|
1054
1143
|
type: "prompt";
|
|
1055
1144
|
promptId: string;
|
|
@@ -1057,7 +1146,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1057
1146
|
agentState: {
|
|
1058
1147
|
agentContext: string;
|
|
1059
1148
|
fileContext: {
|
|
1060
|
-
|
|
1149
|
+
projectRoot: string;
|
|
1150
|
+
cwd: string;
|
|
1061
1151
|
fileTree: import("../util/file").FileTreeNode[];
|
|
1062
1152
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1063
1153
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1087,19 +1177,23 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1087
1177
|
messageHistory: (import("ai").CoreMessage & {
|
|
1088
1178
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1089
1179
|
})[];
|
|
1090
|
-
|
|
1091
|
-
|
|
1180
|
+
agentStepsRemaining: number;
|
|
1181
|
+
agents?: {
|
|
1182
|
+
agentId: string;
|
|
1183
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
1184
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
1185
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
1186
|
+
}[] | undefined;
|
|
1092
1187
|
};
|
|
1093
1188
|
toolResults: {
|
|
1094
1189
|
name: string;
|
|
1095
1190
|
id: string;
|
|
1096
1191
|
result: string;
|
|
1097
1192
|
}[];
|
|
1098
|
-
model?: string | undefined;
|
|
1099
1193
|
prompt?: string | undefined;
|
|
1100
1194
|
authToken?: string | undefined;
|
|
1101
|
-
costMode?: "
|
|
1102
|
-
|
|
1195
|
+
costMode?: "max" | "lite" | "normal" | "experimental" | "ask" | undefined;
|
|
1196
|
+
model?: string | undefined;
|
|
1103
1197
|
repoUrl?: string | undefined;
|
|
1104
1198
|
} | {
|
|
1105
1199
|
type: "manager-prompt";
|
|
@@ -1108,7 +1202,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1108
1202
|
agentState: {
|
|
1109
1203
|
agentContext: string;
|
|
1110
1204
|
fileContext: {
|
|
1111
|
-
|
|
1205
|
+
projectRoot: string;
|
|
1206
|
+
cwd: string;
|
|
1112
1207
|
fileTree: import("../util/file").FileTreeNode[];
|
|
1113
1208
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1114
1209
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1138,19 +1233,24 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1138
1233
|
messageHistory: (import("ai").CoreMessage & {
|
|
1139
1234
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1140
1235
|
})[];
|
|
1141
|
-
|
|
1142
|
-
|
|
1236
|
+
agentStepsRemaining: number;
|
|
1237
|
+
agents?: {
|
|
1238
|
+
agentId: string;
|
|
1239
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
1240
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
1241
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
1242
|
+
}[] | undefined;
|
|
1143
1243
|
};
|
|
1144
1244
|
toolResults: {
|
|
1145
1245
|
name: string;
|
|
1146
1246
|
id: string;
|
|
1147
1247
|
result: string;
|
|
1148
1248
|
}[];
|
|
1149
|
-
|
|
1249
|
+
cwd?: string | undefined;
|
|
1150
1250
|
prompt?: string | undefined;
|
|
1151
1251
|
authToken?: string | undefined;
|
|
1152
|
-
costMode?: "
|
|
1153
|
-
|
|
1252
|
+
costMode?: "max" | "lite" | "normal" | "experimental" | "ask" | undefined;
|
|
1253
|
+
model?: string | undefined;
|
|
1154
1254
|
repoName?: string | undefined;
|
|
1155
1255
|
} | {
|
|
1156
1256
|
type: "read-files-response";
|
|
@@ -1160,7 +1260,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1160
1260
|
type: "init";
|
|
1161
1261
|
fingerprintId: string;
|
|
1162
1262
|
fileContext: {
|
|
1163
|
-
|
|
1263
|
+
projectRoot: string;
|
|
1264
|
+
cwd: string;
|
|
1164
1265
|
fileTree: import("../util/file").FileTreeNode[];
|
|
1165
1266
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1166
1267
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1195,7 +1296,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1195
1296
|
stagedChanges: string;
|
|
1196
1297
|
authToken?: string | undefined;
|
|
1197
1298
|
};
|
|
1198
|
-
type: "action";
|
|
1199
1299
|
txid: number;
|
|
1200
1300
|
}>;
|
|
1201
1301
|
};
|
|
@@ -1257,7 +1357,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1257
1357
|
agentState: z.ZodObject<{
|
|
1258
1358
|
agentContext: z.ZodString;
|
|
1259
1359
|
fileContext: z.ZodObject<{
|
|
1260
|
-
|
|
1360
|
+
projectRoot: z.ZodString;
|
|
1361
|
+
cwd: z.ZodString;
|
|
1261
1362
|
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
1262
1363
|
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1263
1364
|
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
@@ -1314,7 +1415,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1314
1415
|
content: string;
|
|
1315
1416
|
}>, "many">, "many">>;
|
|
1316
1417
|
}, "strip", z.ZodTypeAny, {
|
|
1317
|
-
|
|
1418
|
+
projectRoot: string;
|
|
1419
|
+
cwd: string;
|
|
1318
1420
|
fileTree: import("../util/file").FileTreeNode[];
|
|
1319
1421
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1320
1422
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1341,7 +1443,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1341
1443
|
content: string;
|
|
1342
1444
|
}[][] | undefined;
|
|
1343
1445
|
}, {
|
|
1344
|
-
|
|
1446
|
+
projectRoot: string;
|
|
1447
|
+
cwd: string;
|
|
1345
1448
|
fileTree: import("../util/file").FileTreeNode[];
|
|
1346
1449
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1347
1450
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1375,12 +1478,23 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1375
1478
|
}, {
|
|
1376
1479
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1377
1480
|
}>>, "many">;
|
|
1378
|
-
|
|
1379
|
-
|
|
1481
|
+
agents: z.ZodDefault<z.ZodArray<z.ZodType<{
|
|
1482
|
+
agentId: string;
|
|
1483
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
1484
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
1485
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
1486
|
+
}, z.ZodTypeDef, {
|
|
1487
|
+
agentId: string;
|
|
1488
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
1489
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
1490
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
1491
|
+
}>, "many">>;
|
|
1492
|
+
agentStepsRemaining: z.ZodNumber;
|
|
1380
1493
|
}, "strip", z.ZodTypeAny, {
|
|
1381
1494
|
agentContext: string;
|
|
1382
1495
|
fileContext: {
|
|
1383
|
-
|
|
1496
|
+
projectRoot: string;
|
|
1497
|
+
cwd: string;
|
|
1384
1498
|
fileTree: import("../util/file").FileTreeNode[];
|
|
1385
1499
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1386
1500
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1410,12 +1524,18 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1410
1524
|
messageHistory: (import("ai").CoreMessage & {
|
|
1411
1525
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1412
1526
|
})[];
|
|
1413
|
-
|
|
1414
|
-
|
|
1527
|
+
agents: {
|
|
1528
|
+
agentId: string;
|
|
1529
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
1530
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
1531
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
1532
|
+
}[];
|
|
1533
|
+
agentStepsRemaining: number;
|
|
1415
1534
|
}, {
|
|
1416
1535
|
agentContext: string;
|
|
1417
1536
|
fileContext: {
|
|
1418
|
-
|
|
1537
|
+
projectRoot: string;
|
|
1538
|
+
cwd: string;
|
|
1419
1539
|
fileTree: import("../util/file").FileTreeNode[];
|
|
1420
1540
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1421
1541
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1445,8 +1565,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1445
1565
|
messageHistory: (import("ai").CoreMessage & {
|
|
1446
1566
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1447
1567
|
})[];
|
|
1448
|
-
|
|
1449
|
-
|
|
1568
|
+
agentStepsRemaining: number;
|
|
1569
|
+
agents?: {
|
|
1570
|
+
agentId: string;
|
|
1571
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
1572
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
1573
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
1574
|
+
}[] | undefined;
|
|
1450
1575
|
}>;
|
|
1451
1576
|
toolResults: z.ZodArray<z.ZodObject<{
|
|
1452
1577
|
name: z.ZodString;
|
|
@@ -1462,17 +1587,17 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1462
1587
|
result: string;
|
|
1463
1588
|
}>, "many">;
|
|
1464
1589
|
model: z.ZodOptional<z.ZodString>;
|
|
1465
|
-
cwd: z.ZodOptional<z.ZodString>;
|
|
1466
1590
|
repoUrl: z.ZodOptional<z.ZodString>;
|
|
1467
1591
|
}, "strip", z.ZodTypeAny, {
|
|
1468
1592
|
type: "prompt";
|
|
1469
1593
|
promptId: string;
|
|
1470
1594
|
fingerprintId: string;
|
|
1471
|
-
costMode: "
|
|
1595
|
+
costMode: "max" | "lite" | "normal" | "experimental" | "ask";
|
|
1472
1596
|
agentState: {
|
|
1473
1597
|
agentContext: string;
|
|
1474
1598
|
fileContext: {
|
|
1475
|
-
|
|
1599
|
+
projectRoot: string;
|
|
1600
|
+
cwd: string;
|
|
1476
1601
|
fileTree: import("../util/file").FileTreeNode[];
|
|
1477
1602
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1478
1603
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1502,18 +1627,22 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1502
1627
|
messageHistory: (import("ai").CoreMessage & {
|
|
1503
1628
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1504
1629
|
})[];
|
|
1505
|
-
|
|
1506
|
-
|
|
1630
|
+
agents: {
|
|
1631
|
+
agentId: string;
|
|
1632
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
1633
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
1634
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
1635
|
+
}[];
|
|
1636
|
+
agentStepsRemaining: number;
|
|
1507
1637
|
};
|
|
1508
1638
|
toolResults: {
|
|
1509
1639
|
name: string;
|
|
1510
1640
|
id: string;
|
|
1511
1641
|
result: string;
|
|
1512
1642
|
}[];
|
|
1513
|
-
model?: string | undefined;
|
|
1514
1643
|
prompt?: string | undefined;
|
|
1515
1644
|
authToken?: string | undefined;
|
|
1516
|
-
|
|
1645
|
+
model?: string | undefined;
|
|
1517
1646
|
repoUrl?: string | undefined;
|
|
1518
1647
|
}, {
|
|
1519
1648
|
type: "prompt";
|
|
@@ -1522,7 +1651,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1522
1651
|
agentState: {
|
|
1523
1652
|
agentContext: string;
|
|
1524
1653
|
fileContext: {
|
|
1525
|
-
|
|
1654
|
+
projectRoot: string;
|
|
1655
|
+
cwd: string;
|
|
1526
1656
|
fileTree: import("../util/file").FileTreeNode[];
|
|
1527
1657
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1528
1658
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1552,19 +1682,23 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1552
1682
|
messageHistory: (import("ai").CoreMessage & {
|
|
1553
1683
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1554
1684
|
})[];
|
|
1555
|
-
|
|
1556
|
-
|
|
1685
|
+
agentStepsRemaining: number;
|
|
1686
|
+
agents?: {
|
|
1687
|
+
agentId: string;
|
|
1688
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
1689
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
1690
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
1691
|
+
}[] | undefined;
|
|
1557
1692
|
};
|
|
1558
1693
|
toolResults: {
|
|
1559
1694
|
name: string;
|
|
1560
1695
|
id: string;
|
|
1561
1696
|
result: string;
|
|
1562
1697
|
}[];
|
|
1563
|
-
model?: string | undefined;
|
|
1564
1698
|
prompt?: string | undefined;
|
|
1565
1699
|
authToken?: string | undefined;
|
|
1566
|
-
costMode?: "
|
|
1567
|
-
|
|
1700
|
+
costMode?: "max" | "lite" | "normal" | "experimental" | "ask" | undefined;
|
|
1701
|
+
model?: string | undefined;
|
|
1568
1702
|
repoUrl?: string | undefined;
|
|
1569
1703
|
}>, z.ZodObject<{
|
|
1570
1704
|
type: z.ZodLiteral<"manager-prompt">;
|
|
@@ -1573,7 +1707,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1573
1707
|
agentState: z.ZodObject<{
|
|
1574
1708
|
agentContext: z.ZodString;
|
|
1575
1709
|
fileContext: z.ZodObject<{
|
|
1576
|
-
|
|
1710
|
+
projectRoot: z.ZodString;
|
|
1711
|
+
cwd: z.ZodString;
|
|
1577
1712
|
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
1578
1713
|
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1579
1714
|
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
@@ -1630,7 +1765,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1630
1765
|
content: string;
|
|
1631
1766
|
}>, "many">, "many">>;
|
|
1632
1767
|
}, "strip", z.ZodTypeAny, {
|
|
1633
|
-
|
|
1768
|
+
projectRoot: string;
|
|
1769
|
+
cwd: string;
|
|
1634
1770
|
fileTree: import("../util/file").FileTreeNode[];
|
|
1635
1771
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1636
1772
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1657,7 +1793,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1657
1793
|
content: string;
|
|
1658
1794
|
}[][] | undefined;
|
|
1659
1795
|
}, {
|
|
1660
|
-
|
|
1796
|
+
projectRoot: string;
|
|
1797
|
+
cwd: string;
|
|
1661
1798
|
fileTree: import("../util/file").FileTreeNode[];
|
|
1662
1799
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1663
1800
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1691,12 +1828,23 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1691
1828
|
}, {
|
|
1692
1829
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1693
1830
|
}>>, "many">;
|
|
1694
|
-
|
|
1695
|
-
|
|
1831
|
+
agents: z.ZodDefault<z.ZodArray<z.ZodType<{
|
|
1832
|
+
agentId: string;
|
|
1833
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
1834
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
1835
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
1836
|
+
}, z.ZodTypeDef, {
|
|
1837
|
+
agentId: string;
|
|
1838
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
1839
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
1840
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
1841
|
+
}>, "many">>;
|
|
1842
|
+
agentStepsRemaining: z.ZodNumber;
|
|
1696
1843
|
}, "strip", z.ZodTypeAny, {
|
|
1697
1844
|
agentContext: string;
|
|
1698
1845
|
fileContext: {
|
|
1699
|
-
|
|
1846
|
+
projectRoot: string;
|
|
1847
|
+
cwd: string;
|
|
1700
1848
|
fileTree: import("../util/file").FileTreeNode[];
|
|
1701
1849
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1702
1850
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1726,12 +1874,18 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1726
1874
|
messageHistory: (import("ai").CoreMessage & {
|
|
1727
1875
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1728
1876
|
})[];
|
|
1729
|
-
|
|
1730
|
-
|
|
1877
|
+
agents: {
|
|
1878
|
+
agentId: string;
|
|
1879
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
1880
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
1881
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
1882
|
+
}[];
|
|
1883
|
+
agentStepsRemaining: number;
|
|
1731
1884
|
}, {
|
|
1732
1885
|
agentContext: string;
|
|
1733
1886
|
fileContext: {
|
|
1734
|
-
|
|
1887
|
+
projectRoot: string;
|
|
1888
|
+
cwd: string;
|
|
1735
1889
|
fileTree: import("../util/file").FileTreeNode[];
|
|
1736
1890
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1737
1891
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1761,8 +1915,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1761
1915
|
messageHistory: (import("ai").CoreMessage & {
|
|
1762
1916
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1763
1917
|
})[];
|
|
1764
|
-
|
|
1765
|
-
|
|
1918
|
+
agentStepsRemaining: number;
|
|
1919
|
+
agents?: {
|
|
1920
|
+
agentId: string;
|
|
1921
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
1922
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
1923
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
1924
|
+
}[] | undefined;
|
|
1766
1925
|
}>;
|
|
1767
1926
|
toolResults: z.ZodArray<z.ZodObject<{
|
|
1768
1927
|
name: z.ZodString;
|
|
@@ -1787,11 +1946,12 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1787
1946
|
type: "manager-prompt";
|
|
1788
1947
|
promptId: string;
|
|
1789
1948
|
fingerprintId: string;
|
|
1790
|
-
costMode: "
|
|
1949
|
+
costMode: "max" | "lite" | "normal" | "experimental" | "ask";
|
|
1791
1950
|
agentState: {
|
|
1792
1951
|
agentContext: string;
|
|
1793
1952
|
fileContext: {
|
|
1794
|
-
|
|
1953
|
+
projectRoot: string;
|
|
1954
|
+
cwd: string;
|
|
1795
1955
|
fileTree: import("../util/file").FileTreeNode[];
|
|
1796
1956
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1797
1957
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1821,18 +1981,23 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1821
1981
|
messageHistory: (import("ai").CoreMessage & {
|
|
1822
1982
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1823
1983
|
})[];
|
|
1824
|
-
|
|
1825
|
-
|
|
1984
|
+
agents: {
|
|
1985
|
+
agentId: string;
|
|
1986
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
1987
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
1988
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
1989
|
+
}[];
|
|
1990
|
+
agentStepsRemaining: number;
|
|
1826
1991
|
};
|
|
1827
1992
|
toolResults: {
|
|
1828
1993
|
name: string;
|
|
1829
1994
|
id: string;
|
|
1830
1995
|
result: string;
|
|
1831
1996
|
}[];
|
|
1832
|
-
|
|
1997
|
+
cwd?: string | undefined;
|
|
1833
1998
|
prompt?: string | undefined;
|
|
1834
1999
|
authToken?: string | undefined;
|
|
1835
|
-
|
|
2000
|
+
model?: string | undefined;
|
|
1836
2001
|
repoName?: string | undefined;
|
|
1837
2002
|
}, {
|
|
1838
2003
|
type: "manager-prompt";
|
|
@@ -1841,7 +2006,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1841
2006
|
agentState: {
|
|
1842
2007
|
agentContext: string;
|
|
1843
2008
|
fileContext: {
|
|
1844
|
-
|
|
2009
|
+
projectRoot: string;
|
|
2010
|
+
cwd: string;
|
|
1845
2011
|
fileTree: import("../util/file").FileTreeNode[];
|
|
1846
2012
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1847
2013
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1871,19 +2037,24 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1871
2037
|
messageHistory: (import("ai").CoreMessage & {
|
|
1872
2038
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1873
2039
|
})[];
|
|
1874
|
-
|
|
1875
|
-
|
|
2040
|
+
agentStepsRemaining: number;
|
|
2041
|
+
agents?: {
|
|
2042
|
+
agentId: string;
|
|
2043
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
2044
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
2045
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
2046
|
+
}[] | undefined;
|
|
1876
2047
|
};
|
|
1877
2048
|
toolResults: {
|
|
1878
2049
|
name: string;
|
|
1879
2050
|
id: string;
|
|
1880
2051
|
result: string;
|
|
1881
2052
|
}[];
|
|
1882
|
-
|
|
2053
|
+
cwd?: string | undefined;
|
|
1883
2054
|
prompt?: string | undefined;
|
|
1884
2055
|
authToken?: string | undefined;
|
|
1885
|
-
costMode?: "
|
|
1886
|
-
|
|
2056
|
+
costMode?: "max" | "lite" | "normal" | "experimental" | "ask" | undefined;
|
|
2057
|
+
model?: string | undefined;
|
|
1887
2058
|
repoName?: string | undefined;
|
|
1888
2059
|
}>, z.ZodObject<{
|
|
1889
2060
|
type: z.ZodLiteral<"read-files-response">;
|
|
@@ -1902,7 +2073,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1902
2073
|
fingerprintId: z.ZodString;
|
|
1903
2074
|
authToken: z.ZodOptional<z.ZodString>;
|
|
1904
2075
|
fileContext: z.ZodObject<{
|
|
1905
|
-
|
|
2076
|
+
projectRoot: z.ZodString;
|
|
2077
|
+
cwd: z.ZodString;
|
|
1906
2078
|
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
1907
2079
|
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1908
2080
|
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
@@ -1959,7 +2131,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1959
2131
|
content: string;
|
|
1960
2132
|
}>, "many">, "many">>;
|
|
1961
2133
|
}, "strip", z.ZodTypeAny, {
|
|
1962
|
-
|
|
2134
|
+
projectRoot: string;
|
|
2135
|
+
cwd: string;
|
|
1963
2136
|
fileTree: import("../util/file").FileTreeNode[];
|
|
1964
2137
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1965
2138
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1986,7 +2159,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1986
2159
|
content: string;
|
|
1987
2160
|
}[][] | undefined;
|
|
1988
2161
|
}, {
|
|
1989
|
-
|
|
2162
|
+
projectRoot: string;
|
|
2163
|
+
cwd: string;
|
|
1990
2164
|
fileTree: import("../util/file").FileTreeNode[];
|
|
1991
2165
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1992
2166
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2018,7 +2192,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2018
2192
|
type: "init";
|
|
2019
2193
|
fingerprintId: string;
|
|
2020
2194
|
fileContext: {
|
|
2021
|
-
|
|
2195
|
+
projectRoot: string;
|
|
2196
|
+
cwd: string;
|
|
2022
2197
|
fileTree: import("../util/file").FileTreeNode[];
|
|
2023
2198
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2024
2199
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2051,7 +2226,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2051
2226
|
type: "init";
|
|
2052
2227
|
fingerprintId: string;
|
|
2053
2228
|
fileContext: {
|
|
2054
|
-
|
|
2229
|
+
projectRoot: string;
|
|
2230
|
+
cwd: string;
|
|
2055
2231
|
fileTree: import("../util/file").FileTreeNode[];
|
|
2056
2232
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2057
2233
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2097,15 +2273,17 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2097
2273
|
authToken?: string | undefined;
|
|
2098
2274
|
}>]>;
|
|
2099
2275
|
}, "strip", z.ZodTypeAny, {
|
|
2276
|
+
type: "action";
|
|
2100
2277
|
data: {
|
|
2101
2278
|
type: "prompt";
|
|
2102
2279
|
promptId: string;
|
|
2103
2280
|
fingerprintId: string;
|
|
2104
|
-
costMode: "
|
|
2281
|
+
costMode: "max" | "lite" | "normal" | "experimental" | "ask";
|
|
2105
2282
|
agentState: {
|
|
2106
2283
|
agentContext: string;
|
|
2107
2284
|
fileContext: {
|
|
2108
|
-
|
|
2285
|
+
projectRoot: string;
|
|
2286
|
+
cwd: string;
|
|
2109
2287
|
fileTree: import("../util/file").FileTreeNode[];
|
|
2110
2288
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2111
2289
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2135,28 +2313,33 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2135
2313
|
messageHistory: (import("ai").CoreMessage & {
|
|
2136
2314
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
2137
2315
|
})[];
|
|
2138
|
-
|
|
2139
|
-
|
|
2316
|
+
agents: {
|
|
2317
|
+
agentId: string;
|
|
2318
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
2319
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
2320
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
2321
|
+
}[];
|
|
2322
|
+
agentStepsRemaining: number;
|
|
2140
2323
|
};
|
|
2141
2324
|
toolResults: {
|
|
2142
2325
|
name: string;
|
|
2143
2326
|
id: string;
|
|
2144
2327
|
result: string;
|
|
2145
2328
|
}[];
|
|
2146
|
-
model?: string | undefined;
|
|
2147
2329
|
prompt?: string | undefined;
|
|
2148
2330
|
authToken?: string | undefined;
|
|
2149
|
-
|
|
2331
|
+
model?: string | undefined;
|
|
2150
2332
|
repoUrl?: string | undefined;
|
|
2151
2333
|
} | {
|
|
2152
2334
|
type: "manager-prompt";
|
|
2153
2335
|
promptId: string;
|
|
2154
2336
|
fingerprintId: string;
|
|
2155
|
-
costMode: "
|
|
2337
|
+
costMode: "max" | "lite" | "normal" | "experimental" | "ask";
|
|
2156
2338
|
agentState: {
|
|
2157
2339
|
agentContext: string;
|
|
2158
2340
|
fileContext: {
|
|
2159
|
-
|
|
2341
|
+
projectRoot: string;
|
|
2342
|
+
cwd: string;
|
|
2160
2343
|
fileTree: import("../util/file").FileTreeNode[];
|
|
2161
2344
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2162
2345
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2186,18 +2369,23 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2186
2369
|
messageHistory: (import("ai").CoreMessage & {
|
|
2187
2370
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
2188
2371
|
})[];
|
|
2189
|
-
|
|
2190
|
-
|
|
2372
|
+
agents: {
|
|
2373
|
+
agentId: string;
|
|
2374
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
2375
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
2376
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
2377
|
+
}[];
|
|
2378
|
+
agentStepsRemaining: number;
|
|
2191
2379
|
};
|
|
2192
2380
|
toolResults: {
|
|
2193
2381
|
name: string;
|
|
2194
2382
|
id: string;
|
|
2195
2383
|
result: string;
|
|
2196
2384
|
}[];
|
|
2197
|
-
|
|
2385
|
+
cwd?: string | undefined;
|
|
2198
2386
|
prompt?: string | undefined;
|
|
2199
2387
|
authToken?: string | undefined;
|
|
2200
|
-
|
|
2388
|
+
model?: string | undefined;
|
|
2201
2389
|
repoName?: string | undefined;
|
|
2202
2390
|
} | {
|
|
2203
2391
|
type: "read-files-response";
|
|
@@ -2207,7 +2395,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2207
2395
|
type: "init";
|
|
2208
2396
|
fingerprintId: string;
|
|
2209
2397
|
fileContext: {
|
|
2210
|
-
|
|
2398
|
+
projectRoot: string;
|
|
2399
|
+
cwd: string;
|
|
2211
2400
|
fileTree: import("../util/file").FileTreeNode[];
|
|
2212
2401
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2213
2402
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2242,9 +2431,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2242
2431
|
stagedChanges: string;
|
|
2243
2432
|
authToken?: string | undefined;
|
|
2244
2433
|
};
|
|
2245
|
-
type: "action";
|
|
2246
2434
|
txid: number;
|
|
2247
2435
|
}, {
|
|
2436
|
+
type: "action";
|
|
2248
2437
|
data: {
|
|
2249
2438
|
type: "prompt";
|
|
2250
2439
|
promptId: string;
|
|
@@ -2252,7 +2441,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2252
2441
|
agentState: {
|
|
2253
2442
|
agentContext: string;
|
|
2254
2443
|
fileContext: {
|
|
2255
|
-
|
|
2444
|
+
projectRoot: string;
|
|
2445
|
+
cwd: string;
|
|
2256
2446
|
fileTree: import("../util/file").FileTreeNode[];
|
|
2257
2447
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2258
2448
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2282,19 +2472,23 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2282
2472
|
messageHistory: (import("ai").CoreMessage & {
|
|
2283
2473
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
2284
2474
|
})[];
|
|
2285
|
-
|
|
2286
|
-
|
|
2475
|
+
agentStepsRemaining: number;
|
|
2476
|
+
agents?: {
|
|
2477
|
+
agentId: string;
|
|
2478
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
2479
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
2480
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
2481
|
+
}[] | undefined;
|
|
2287
2482
|
};
|
|
2288
2483
|
toolResults: {
|
|
2289
2484
|
name: string;
|
|
2290
2485
|
id: string;
|
|
2291
2486
|
result: string;
|
|
2292
2487
|
}[];
|
|
2293
|
-
model?: string | undefined;
|
|
2294
2488
|
prompt?: string | undefined;
|
|
2295
2489
|
authToken?: string | undefined;
|
|
2296
|
-
costMode?: "
|
|
2297
|
-
|
|
2490
|
+
costMode?: "max" | "lite" | "normal" | "experimental" | "ask" | undefined;
|
|
2491
|
+
model?: string | undefined;
|
|
2298
2492
|
repoUrl?: string | undefined;
|
|
2299
2493
|
} | {
|
|
2300
2494
|
type: "manager-prompt";
|
|
@@ -2303,7 +2497,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2303
2497
|
agentState: {
|
|
2304
2498
|
agentContext: string;
|
|
2305
2499
|
fileContext: {
|
|
2306
|
-
|
|
2500
|
+
projectRoot: string;
|
|
2501
|
+
cwd: string;
|
|
2307
2502
|
fileTree: import("../util/file").FileTreeNode[];
|
|
2308
2503
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2309
2504
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2333,19 +2528,24 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2333
2528
|
messageHistory: (import("ai").CoreMessage & {
|
|
2334
2529
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
2335
2530
|
})[];
|
|
2336
|
-
|
|
2337
|
-
|
|
2531
|
+
agentStepsRemaining: number;
|
|
2532
|
+
agents?: {
|
|
2533
|
+
agentId: string;
|
|
2534
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
2535
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
2536
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
2537
|
+
}[] | undefined;
|
|
2338
2538
|
};
|
|
2339
2539
|
toolResults: {
|
|
2340
2540
|
name: string;
|
|
2341
2541
|
id: string;
|
|
2342
2542
|
result: string;
|
|
2343
2543
|
}[];
|
|
2344
|
-
|
|
2544
|
+
cwd?: string | undefined;
|
|
2345
2545
|
prompt?: string | undefined;
|
|
2346
2546
|
authToken?: string | undefined;
|
|
2347
|
-
costMode?: "
|
|
2348
|
-
|
|
2547
|
+
costMode?: "max" | "lite" | "normal" | "experimental" | "ask" | undefined;
|
|
2548
|
+
model?: string | undefined;
|
|
2349
2549
|
repoName?: string | undefined;
|
|
2350
2550
|
} | {
|
|
2351
2551
|
type: "read-files-response";
|
|
@@ -2355,7 +2555,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2355
2555
|
type: "init";
|
|
2356
2556
|
fingerprintId: string;
|
|
2357
2557
|
fileContext: {
|
|
2358
|
-
|
|
2558
|
+
projectRoot: string;
|
|
2559
|
+
cwd: string;
|
|
2359
2560
|
fileTree: import("../util/file").FileTreeNode[];
|
|
2360
2561
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2361
2562
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2390,7 +2591,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2390
2591
|
stagedChanges: string;
|
|
2391
2592
|
authToken?: string | undefined;
|
|
2392
2593
|
};
|
|
2393
|
-
type: "action";
|
|
2394
2594
|
txid: number;
|
|
2395
2595
|
}>]>;
|
|
2396
2596
|
export type ClientMessageType = keyof typeof CLIENT_MESSAGE_SCHEMAS;
|
|
@@ -2435,26 +2635,26 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2435
2635
|
path: z.ZodString;
|
|
2436
2636
|
content: z.ZodString;
|
|
2437
2637
|
}, "strip", z.ZodTypeAny, {
|
|
2438
|
-
type: "patch" | "file";
|
|
2439
2638
|
path: string;
|
|
2440
2639
|
content: string;
|
|
2640
|
+
type: "file" | "patch";
|
|
2441
2641
|
}, {
|
|
2442
|
-
type: "patch" | "file";
|
|
2443
2642
|
path: string;
|
|
2444
2643
|
content: string;
|
|
2644
|
+
type: "file" | "patch";
|
|
2445
2645
|
}>, "many">;
|
|
2446
2646
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
2447
2647
|
type: z.ZodEnum<["patch", "file"]>;
|
|
2448
2648
|
path: z.ZodString;
|
|
2449
2649
|
content: z.ZodString;
|
|
2450
2650
|
}, "strip", z.ZodTypeAny, {
|
|
2451
|
-
type: "patch" | "file";
|
|
2452
2651
|
path: string;
|
|
2453
2652
|
content: string;
|
|
2653
|
+
type: "file" | "patch";
|
|
2454
2654
|
}, {
|
|
2455
|
-
type: "patch" | "file";
|
|
2456
2655
|
path: string;
|
|
2457
2656
|
content: string;
|
|
2657
|
+
type: "file" | "patch";
|
|
2458
2658
|
}>, "many">;
|
|
2459
2659
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
2460
2660
|
path: z.ZodString;
|
|
@@ -2468,58 +2668,58 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2468
2668
|
}>, "many">;
|
|
2469
2669
|
resetFileVersions: z.ZodBoolean;
|
|
2470
2670
|
}, {
|
|
2471
|
-
next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
2472
2671
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
2473
2672
|
remainingBalance: z.ZodOptional<z.ZodNumber>;
|
|
2474
2673
|
balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin" | "organization")[]]>, z.ZodNumber>>>;
|
|
2674
|
+
next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
2475
2675
|
autoTopupAdded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
2476
2676
|
}>, "strip", z.ZodTypeAny, {
|
|
2477
2677
|
type: "response-complete";
|
|
2478
|
-
response: string;
|
|
2479
2678
|
userInputId: string;
|
|
2679
|
+
response: string;
|
|
2480
2680
|
changes: {
|
|
2481
|
-
type: "patch" | "file";
|
|
2482
2681
|
path: string;
|
|
2483
2682
|
content: string;
|
|
2683
|
+
type: "file" | "patch";
|
|
2484
2684
|
}[];
|
|
2485
2685
|
changesAlreadyApplied: {
|
|
2486
|
-
type: "patch" | "file";
|
|
2487
2686
|
path: string;
|
|
2488
2687
|
content: string;
|
|
2688
|
+
type: "file" | "patch";
|
|
2489
2689
|
}[];
|
|
2490
2690
|
addedFileVersions: {
|
|
2491
2691
|
path: string;
|
|
2492
2692
|
content: string;
|
|
2493
2693
|
}[];
|
|
2494
2694
|
resetFileVersions: boolean;
|
|
2495
|
-
next_quota_reset?: Date | null | undefined;
|
|
2496
2695
|
usage?: number | undefined;
|
|
2497
2696
|
remainingBalance?: number | undefined;
|
|
2498
2697
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
2698
|
+
next_quota_reset?: Date | null | undefined;
|
|
2499
2699
|
autoTopupAdded?: number | undefined;
|
|
2500
2700
|
}, {
|
|
2501
2701
|
type: "response-complete";
|
|
2502
|
-
response: string;
|
|
2503
2702
|
userInputId: string;
|
|
2703
|
+
response: string;
|
|
2504
2704
|
changes: {
|
|
2505
|
-
type: "patch" | "file";
|
|
2506
2705
|
path: string;
|
|
2507
2706
|
content: string;
|
|
2707
|
+
type: "file" | "patch";
|
|
2508
2708
|
}[];
|
|
2509
2709
|
changesAlreadyApplied: {
|
|
2510
|
-
type: "patch" | "file";
|
|
2511
2710
|
path: string;
|
|
2512
2711
|
content: string;
|
|
2712
|
+
type: "file" | "patch";
|
|
2513
2713
|
}[];
|
|
2514
2714
|
addedFileVersions: {
|
|
2515
2715
|
path: string;
|
|
2516
2716
|
content: string;
|
|
2517
2717
|
}[];
|
|
2518
2718
|
resetFileVersions: boolean;
|
|
2519
|
-
next_quota_reset?: Date | null | undefined;
|
|
2520
2719
|
usage?: number | undefined;
|
|
2521
2720
|
remainingBalance?: number | undefined;
|
|
2522
2721
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
2722
|
+
next_quota_reset?: Date | null | undefined;
|
|
2523
2723
|
autoTopupAdded?: number | undefined;
|
|
2524
2724
|
}>, z.ZodObject<{
|
|
2525
2725
|
type: z.ZodLiteral<"prompt-response">;
|
|
@@ -2527,7 +2727,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2527
2727
|
agentState: z.ZodObject<{
|
|
2528
2728
|
agentContext: z.ZodString;
|
|
2529
2729
|
fileContext: z.ZodObject<{
|
|
2530
|
-
|
|
2730
|
+
projectRoot: z.ZodString;
|
|
2731
|
+
cwd: z.ZodString;
|
|
2531
2732
|
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
2532
2733
|
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
2533
2734
|
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
@@ -2584,7 +2785,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2584
2785
|
content: string;
|
|
2585
2786
|
}>, "many">, "many">>;
|
|
2586
2787
|
}, "strip", z.ZodTypeAny, {
|
|
2587
|
-
|
|
2788
|
+
projectRoot: string;
|
|
2789
|
+
cwd: string;
|
|
2588
2790
|
fileTree: import("../util/file").FileTreeNode[];
|
|
2589
2791
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2590
2792
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2611,7 +2813,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2611
2813
|
content: string;
|
|
2612
2814
|
}[][] | undefined;
|
|
2613
2815
|
}, {
|
|
2614
|
-
|
|
2816
|
+
projectRoot: string;
|
|
2817
|
+
cwd: string;
|
|
2615
2818
|
fileTree: import("../util/file").FileTreeNode[];
|
|
2616
2819
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2617
2820
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2645,12 +2848,23 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2645
2848
|
}, {
|
|
2646
2849
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
2647
2850
|
}>>, "many">;
|
|
2648
|
-
|
|
2649
|
-
|
|
2851
|
+
agents: z.ZodDefault<z.ZodArray<z.ZodType<{
|
|
2852
|
+
agentId: string;
|
|
2853
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
2854
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
2855
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
2856
|
+
}, z.ZodTypeDef, {
|
|
2857
|
+
agentId: string;
|
|
2858
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
2859
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
2860
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
2861
|
+
}>, "many">>;
|
|
2862
|
+
agentStepsRemaining: z.ZodNumber;
|
|
2650
2863
|
}, "strip", z.ZodTypeAny, {
|
|
2651
2864
|
agentContext: string;
|
|
2652
2865
|
fileContext: {
|
|
2653
|
-
|
|
2866
|
+
projectRoot: string;
|
|
2867
|
+
cwd: string;
|
|
2654
2868
|
fileTree: import("../util/file").FileTreeNode[];
|
|
2655
2869
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2656
2870
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2680,12 +2894,18 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2680
2894
|
messageHistory: (import("ai").CoreMessage & {
|
|
2681
2895
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
2682
2896
|
})[];
|
|
2683
|
-
|
|
2684
|
-
|
|
2897
|
+
agents: {
|
|
2898
|
+
agentId: string;
|
|
2899
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
2900
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
2901
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
2902
|
+
}[];
|
|
2903
|
+
agentStepsRemaining: number;
|
|
2685
2904
|
}, {
|
|
2686
2905
|
agentContext: string;
|
|
2687
2906
|
fileContext: {
|
|
2688
|
-
|
|
2907
|
+
projectRoot: string;
|
|
2908
|
+
cwd: string;
|
|
2689
2909
|
fileTree: import("../util/file").FileTreeNode[];
|
|
2690
2910
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2691
2911
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2715,8 +2935,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2715
2935
|
messageHistory: (import("ai").CoreMessage & {
|
|
2716
2936
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
2717
2937
|
})[];
|
|
2718
|
-
|
|
2719
|
-
|
|
2938
|
+
agentStepsRemaining: number;
|
|
2939
|
+
agents?: {
|
|
2940
|
+
agentId: string;
|
|
2941
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
2942
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
2943
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
2944
|
+
}[] | undefined;
|
|
2720
2945
|
}>;
|
|
2721
2946
|
toolCalls: z.ZodArray<z.ZodObject<{
|
|
2722
2947
|
name: z.ZodString;
|
|
@@ -2750,7 +2975,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2750
2975
|
agentState: {
|
|
2751
2976
|
agentContext: string;
|
|
2752
2977
|
fileContext: {
|
|
2753
|
-
|
|
2978
|
+
projectRoot: string;
|
|
2979
|
+
cwd: string;
|
|
2754
2980
|
fileTree: import("../util/file").FileTreeNode[];
|
|
2755
2981
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2756
2982
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2780,8 +3006,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2780
3006
|
messageHistory: (import("ai").CoreMessage & {
|
|
2781
3007
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
2782
3008
|
})[];
|
|
2783
|
-
|
|
2784
|
-
|
|
3009
|
+
agents: {
|
|
3010
|
+
agentId: string;
|
|
3011
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
3012
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
3013
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
3014
|
+
}[];
|
|
3015
|
+
agentStepsRemaining: number;
|
|
2785
3016
|
};
|
|
2786
3017
|
toolResults: {
|
|
2787
3018
|
name: string;
|
|
@@ -2799,7 +3030,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2799
3030
|
agentState: {
|
|
2800
3031
|
agentContext: string;
|
|
2801
3032
|
fileContext: {
|
|
2802
|
-
|
|
3033
|
+
projectRoot: string;
|
|
3034
|
+
cwd: string;
|
|
2803
3035
|
fileTree: import("../util/file").FileTreeNode[];
|
|
2804
3036
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2805
3037
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2829,8 +3061,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2829
3061
|
messageHistory: (import("ai").CoreMessage & {
|
|
2830
3062
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
2831
3063
|
})[];
|
|
2832
|
-
|
|
2833
|
-
|
|
3064
|
+
agentStepsRemaining: number;
|
|
3065
|
+
agents?: {
|
|
3066
|
+
agentId: string;
|
|
3067
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
3068
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
3069
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
3070
|
+
}[] | undefined;
|
|
2834
3071
|
};
|
|
2835
3072
|
toolResults: {
|
|
2836
3073
|
name: string;
|
|
@@ -2848,7 +3085,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2848
3085
|
agentState: z.ZodObject<{
|
|
2849
3086
|
agentContext: z.ZodString;
|
|
2850
3087
|
fileContext: z.ZodObject<{
|
|
2851
|
-
|
|
3088
|
+
projectRoot: z.ZodString;
|
|
3089
|
+
cwd: z.ZodString;
|
|
2852
3090
|
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
2853
3091
|
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
2854
3092
|
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
@@ -2905,7 +3143,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2905
3143
|
content: string;
|
|
2906
3144
|
}>, "many">, "many">>;
|
|
2907
3145
|
}, "strip", z.ZodTypeAny, {
|
|
2908
|
-
|
|
3146
|
+
projectRoot: string;
|
|
3147
|
+
cwd: string;
|
|
2909
3148
|
fileTree: import("../util/file").FileTreeNode[];
|
|
2910
3149
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2911
3150
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2932,7 +3171,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2932
3171
|
content: string;
|
|
2933
3172
|
}[][] | undefined;
|
|
2934
3173
|
}, {
|
|
2935
|
-
|
|
3174
|
+
projectRoot: string;
|
|
3175
|
+
cwd: string;
|
|
2936
3176
|
fileTree: import("../util/file").FileTreeNode[];
|
|
2937
3177
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2938
3178
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2966,12 +3206,23 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2966
3206
|
}, {
|
|
2967
3207
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
2968
3208
|
}>>, "many">;
|
|
2969
|
-
|
|
2970
|
-
|
|
3209
|
+
agents: z.ZodDefault<z.ZodArray<z.ZodType<{
|
|
3210
|
+
agentId: string;
|
|
3211
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
3212
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
3213
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
3214
|
+
}, z.ZodTypeDef, {
|
|
3215
|
+
agentId: string;
|
|
3216
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
3217
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
3218
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
3219
|
+
}>, "many">>;
|
|
3220
|
+
agentStepsRemaining: z.ZodNumber;
|
|
2971
3221
|
}, "strip", z.ZodTypeAny, {
|
|
2972
3222
|
agentContext: string;
|
|
2973
3223
|
fileContext: {
|
|
2974
|
-
|
|
3224
|
+
projectRoot: string;
|
|
3225
|
+
cwd: string;
|
|
2975
3226
|
fileTree: import("../util/file").FileTreeNode[];
|
|
2976
3227
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2977
3228
|
knowledgeFiles: Record<string, string>;
|
|
@@ -3001,12 +3252,18 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3001
3252
|
messageHistory: (import("ai").CoreMessage & {
|
|
3002
3253
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
3003
3254
|
})[];
|
|
3004
|
-
|
|
3005
|
-
|
|
3255
|
+
agents: {
|
|
3256
|
+
agentId: string;
|
|
3257
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
3258
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
3259
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
3260
|
+
}[];
|
|
3261
|
+
agentStepsRemaining: number;
|
|
3006
3262
|
}, {
|
|
3007
3263
|
agentContext: string;
|
|
3008
3264
|
fileContext: {
|
|
3009
|
-
|
|
3265
|
+
projectRoot: string;
|
|
3266
|
+
cwd: string;
|
|
3010
3267
|
fileTree: import("../util/file").FileTreeNode[];
|
|
3011
3268
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
3012
3269
|
knowledgeFiles: Record<string, string>;
|
|
@@ -3036,8 +3293,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3036
3293
|
messageHistory: (import("ai").CoreMessage & {
|
|
3037
3294
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
3038
3295
|
})[];
|
|
3039
|
-
|
|
3040
|
-
|
|
3296
|
+
agentStepsRemaining: number;
|
|
3297
|
+
agents?: {
|
|
3298
|
+
agentId: string;
|
|
3299
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
3300
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
3301
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
3302
|
+
}[] | undefined;
|
|
3041
3303
|
}>;
|
|
3042
3304
|
toolCalls: z.ZodArray<z.ZodObject<{
|
|
3043
3305
|
name: z.ZodString;
|
|
@@ -3071,7 +3333,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3071
3333
|
agentState: {
|
|
3072
3334
|
agentContext: string;
|
|
3073
3335
|
fileContext: {
|
|
3074
|
-
|
|
3336
|
+
projectRoot: string;
|
|
3337
|
+
cwd: string;
|
|
3075
3338
|
fileTree: import("../util/file").FileTreeNode[];
|
|
3076
3339
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
3077
3340
|
knowledgeFiles: Record<string, string>;
|
|
@@ -3101,8 +3364,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3101
3364
|
messageHistory: (import("ai").CoreMessage & {
|
|
3102
3365
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
3103
3366
|
})[];
|
|
3104
|
-
|
|
3105
|
-
|
|
3367
|
+
agents: {
|
|
3368
|
+
agentId: string;
|
|
3369
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
3370
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
3371
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
3372
|
+
}[];
|
|
3373
|
+
agentStepsRemaining: number;
|
|
3106
3374
|
};
|
|
3107
3375
|
toolResults: {
|
|
3108
3376
|
name: string;
|
|
@@ -3120,7 +3388,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3120
3388
|
agentState: {
|
|
3121
3389
|
agentContext: string;
|
|
3122
3390
|
fileContext: {
|
|
3123
|
-
|
|
3391
|
+
projectRoot: string;
|
|
3392
|
+
cwd: string;
|
|
3124
3393
|
fileTree: import("../util/file").FileTreeNode[];
|
|
3125
3394
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
3126
3395
|
knowledgeFiles: Record<string, string>;
|
|
@@ -3150,8 +3419,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3150
3419
|
messageHistory: (import("ai").CoreMessage & {
|
|
3151
3420
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
3152
3421
|
})[];
|
|
3153
|
-
|
|
3154
|
-
|
|
3422
|
+
agentStepsRemaining: number;
|
|
3423
|
+
agents?: {
|
|
3424
|
+
agentId: string;
|
|
3425
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
3426
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
3427
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
3428
|
+
}[] | undefined;
|
|
3155
3429
|
};
|
|
3156
3430
|
toolResults: {
|
|
3157
3431
|
name: string;
|
|
@@ -3197,26 +3471,26 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3197
3471
|
path: z.ZodString;
|
|
3198
3472
|
content: z.ZodString;
|
|
3199
3473
|
}, "strip", z.ZodTypeAny, {
|
|
3200
|
-
type: "patch" | "file";
|
|
3201
3474
|
path: string;
|
|
3202
3475
|
content: string;
|
|
3476
|
+
type: "file" | "patch";
|
|
3203
3477
|
}, {
|
|
3204
|
-
type: "patch" | "file";
|
|
3205
3478
|
path: string;
|
|
3206
3479
|
content: string;
|
|
3480
|
+
type: "file" | "patch";
|
|
3207
3481
|
}>, "many">;
|
|
3208
3482
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
3209
3483
|
type: z.ZodEnum<["patch", "file"]>;
|
|
3210
3484
|
path: z.ZodString;
|
|
3211
3485
|
content: z.ZodString;
|
|
3212
3486
|
}, "strip", z.ZodTypeAny, {
|
|
3213
|
-
type: "patch" | "file";
|
|
3214
3487
|
path: string;
|
|
3215
3488
|
content: string;
|
|
3489
|
+
type: "file" | "patch";
|
|
3216
3490
|
}, {
|
|
3217
|
-
type: "patch" | "file";
|
|
3218
3491
|
path: string;
|
|
3219
3492
|
content: string;
|
|
3493
|
+
type: "file" | "patch";
|
|
3220
3494
|
}>, "many">;
|
|
3221
3495
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
3222
3496
|
path: z.ZodString;
|
|
@@ -3230,53 +3504,53 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3230
3504
|
}>, "many">;
|
|
3231
3505
|
resetFileVersions: z.ZodBoolean;
|
|
3232
3506
|
}, "strip", z.ZodTypeAny, {
|
|
3233
|
-
data: {
|
|
3234
|
-
name: string;
|
|
3235
|
-
id: string;
|
|
3236
|
-
input: Record<string, any>;
|
|
3237
|
-
};
|
|
3238
3507
|
type: "tool-call";
|
|
3239
|
-
response: string;
|
|
3240
3508
|
userInputId: string;
|
|
3509
|
+
response: string;
|
|
3241
3510
|
changes: {
|
|
3242
|
-
type: "patch" | "file";
|
|
3243
3511
|
path: string;
|
|
3244
3512
|
content: string;
|
|
3513
|
+
type: "file" | "patch";
|
|
3245
3514
|
}[];
|
|
3246
3515
|
changesAlreadyApplied: {
|
|
3247
|
-
type: "patch" | "file";
|
|
3248
3516
|
path: string;
|
|
3249
3517
|
content: string;
|
|
3518
|
+
type: "file" | "patch";
|
|
3250
3519
|
}[];
|
|
3251
3520
|
addedFileVersions: {
|
|
3252
3521
|
path: string;
|
|
3253
3522
|
content: string;
|
|
3254
3523
|
}[];
|
|
3255
3524
|
resetFileVersions: boolean;
|
|
3256
|
-
}, {
|
|
3257
3525
|
data: {
|
|
3258
3526
|
name: string;
|
|
3259
3527
|
id: string;
|
|
3260
3528
|
input: Record<string, any>;
|
|
3261
3529
|
};
|
|
3530
|
+
}, {
|
|
3262
3531
|
type: "tool-call";
|
|
3263
|
-
response: string;
|
|
3264
3532
|
userInputId: string;
|
|
3533
|
+
response: string;
|
|
3265
3534
|
changes: {
|
|
3266
|
-
type: "patch" | "file";
|
|
3267
3535
|
path: string;
|
|
3268
3536
|
content: string;
|
|
3537
|
+
type: "file" | "patch";
|
|
3269
3538
|
}[];
|
|
3270
3539
|
changesAlreadyApplied: {
|
|
3271
|
-
type: "patch" | "file";
|
|
3272
3540
|
path: string;
|
|
3273
3541
|
content: string;
|
|
3542
|
+
type: "file" | "patch";
|
|
3274
3543
|
}[];
|
|
3275
3544
|
addedFileVersions: {
|
|
3276
3545
|
path: string;
|
|
3277
3546
|
content: string;
|
|
3278
3547
|
}[];
|
|
3279
3548
|
resetFileVersions: boolean;
|
|
3549
|
+
data: {
|
|
3550
|
+
name: string;
|
|
3551
|
+
id: string;
|
|
3552
|
+
input: Record<string, any>;
|
|
3553
|
+
};
|
|
3280
3554
|
}>, z.ZodObject<{
|
|
3281
3555
|
type: z.ZodLiteral<"terminal-command-result">;
|
|
3282
3556
|
userInputId: z.ZodString;
|
|
@@ -3311,17 +3585,17 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3311
3585
|
next_quota_reset: z.ZodNullable<z.ZodDate>;
|
|
3312
3586
|
autoTopupAdded: z.ZodOptional<z.ZodNumber>;
|
|
3313
3587
|
}, "type">>, "strip", z.ZodTypeAny, {
|
|
3314
|
-
next_quota_reset: Date | null;
|
|
3315
3588
|
type: "init-response";
|
|
3316
3589
|
usage: number;
|
|
3317
3590
|
remainingBalance: number;
|
|
3591
|
+
next_quota_reset: Date | null;
|
|
3318
3592
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
3319
3593
|
autoTopupAdded?: number | undefined;
|
|
3320
3594
|
}, {
|
|
3321
|
-
next_quota_reset: Date | null;
|
|
3322
3595
|
type: "init-response";
|
|
3323
3596
|
usage: number;
|
|
3324
3597
|
remainingBalance: number;
|
|
3598
|
+
next_quota_reset: Date | null;
|
|
3325
3599
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
3326
3600
|
autoTopupAdded?: number | undefined;
|
|
3327
3601
|
}>, z.ZodObject<{
|
|
@@ -3332,17 +3606,17 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3332
3606
|
next_quota_reset: z.ZodNullable<z.ZodDate>;
|
|
3333
3607
|
autoTopupAdded: z.ZodOptional<z.ZodNumber>;
|
|
3334
3608
|
}, "strip", z.ZodTypeAny, {
|
|
3335
|
-
next_quota_reset: Date | null;
|
|
3336
3609
|
type: "usage-response";
|
|
3337
3610
|
usage: number;
|
|
3338
3611
|
remainingBalance: number;
|
|
3612
|
+
next_quota_reset: Date | null;
|
|
3339
3613
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
3340
3614
|
autoTopupAdded?: number | undefined;
|
|
3341
3615
|
}, {
|
|
3342
|
-
next_quota_reset: Date | null;
|
|
3343
3616
|
type: "usage-response";
|
|
3344
3617
|
usage: number;
|
|
3345
3618
|
remainingBalance: number;
|
|
3619
|
+
next_quota_reset: Date | null;
|
|
3346
3620
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
3347
3621
|
autoTopupAdded?: number | undefined;
|
|
3348
3622
|
}>, z.ZodObject<{
|
|
@@ -3351,25 +3625,25 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3351
3625
|
credits: z.ZodNumber;
|
|
3352
3626
|
}, "strip", z.ZodTypeAny, {
|
|
3353
3627
|
type: "message-cost-response";
|
|
3354
|
-
credits: number;
|
|
3355
3628
|
promptId: string;
|
|
3629
|
+
credits: number;
|
|
3356
3630
|
}, {
|
|
3357
3631
|
type: "message-cost-response";
|
|
3358
|
-
credits: number;
|
|
3359
3632
|
promptId: string;
|
|
3633
|
+
credits: number;
|
|
3360
3634
|
}>, z.ZodObject<{
|
|
3361
3635
|
type: z.ZodLiteral<"action-error">;
|
|
3362
3636
|
message: z.ZodString;
|
|
3363
3637
|
error: z.ZodOptional<z.ZodString>;
|
|
3364
3638
|
remainingBalance: z.ZodOptional<z.ZodNumber>;
|
|
3365
3639
|
}, "strip", z.ZodTypeAny, {
|
|
3366
|
-
type: "action-error";
|
|
3367
3640
|
message: string;
|
|
3641
|
+
type: "action-error";
|
|
3368
3642
|
remainingBalance?: number | undefined;
|
|
3369
3643
|
error?: string | undefined;
|
|
3370
3644
|
}, {
|
|
3371
|
-
type: "action-error";
|
|
3372
3645
|
message: string;
|
|
3646
|
+
type: "action-error";
|
|
3373
3647
|
remainingBalance?: number | undefined;
|
|
3374
3648
|
error?: string | undefined;
|
|
3375
3649
|
}>, z.ZodObject<{
|
|
@@ -3389,55 +3663,57 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3389
3663
|
type: "request-reconnect";
|
|
3390
3664
|
}>]>;
|
|
3391
3665
|
}, "strip", z.ZodTypeAny, {
|
|
3666
|
+
type: "action";
|
|
3392
3667
|
data: {
|
|
3393
|
-
next_quota_reset: Date | null;
|
|
3394
3668
|
type: "usage-response";
|
|
3395
3669
|
usage: number;
|
|
3396
3670
|
remainingBalance: number;
|
|
3671
|
+
next_quota_reset: Date | null;
|
|
3397
3672
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
3398
3673
|
autoTopupAdded?: number | undefined;
|
|
3399
3674
|
} | {
|
|
3400
|
-
next_quota_reset: Date | null;
|
|
3401
3675
|
type: "init-response";
|
|
3402
3676
|
usage: number;
|
|
3403
3677
|
remainingBalance: number;
|
|
3678
|
+
next_quota_reset: Date | null;
|
|
3404
3679
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
3405
3680
|
autoTopupAdded?: number | undefined;
|
|
3406
3681
|
} | {
|
|
3407
3682
|
type: "response-complete";
|
|
3408
|
-
response: string;
|
|
3409
3683
|
userInputId: string;
|
|
3684
|
+
response: string;
|
|
3410
3685
|
changes: {
|
|
3411
|
-
type: "patch" | "file";
|
|
3412
3686
|
path: string;
|
|
3413
3687
|
content: string;
|
|
3688
|
+
type: "file" | "patch";
|
|
3414
3689
|
}[];
|
|
3415
3690
|
changesAlreadyApplied: {
|
|
3416
|
-
type: "patch" | "file";
|
|
3417
3691
|
path: string;
|
|
3418
3692
|
content: string;
|
|
3693
|
+
type: "file" | "patch";
|
|
3419
3694
|
}[];
|
|
3420
3695
|
addedFileVersions: {
|
|
3421
3696
|
path: string;
|
|
3422
3697
|
content: string;
|
|
3423
3698
|
}[];
|
|
3424
3699
|
resetFileVersions: boolean;
|
|
3425
|
-
next_quota_reset?: Date | null | undefined;
|
|
3426
3700
|
usage?: number | undefined;
|
|
3427
3701
|
remainingBalance?: number | undefined;
|
|
3428
3702
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
3703
|
+
next_quota_reset?: Date | null | undefined;
|
|
3429
3704
|
autoTopupAdded?: number | undefined;
|
|
3430
3705
|
} | {
|
|
3431
3706
|
type: "message-cost-response";
|
|
3432
|
-
credits: number;
|
|
3433
3707
|
promptId: string;
|
|
3708
|
+
credits: number;
|
|
3434
3709
|
} | {
|
|
3435
3710
|
type: "prompt-response";
|
|
3436
3711
|
promptId: string;
|
|
3437
3712
|
agentState: {
|
|
3438
3713
|
agentContext: string;
|
|
3439
3714
|
fileContext: {
|
|
3440
|
-
|
|
3715
|
+
projectRoot: string;
|
|
3716
|
+
cwd: string;
|
|
3441
3717
|
fileTree: import("../util/file").FileTreeNode[];
|
|
3442
3718
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
3443
3719
|
knowledgeFiles: Record<string, string>;
|
|
@@ -3467,8 +3743,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3467
3743
|
messageHistory: (import("ai").CoreMessage & {
|
|
3468
3744
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
3469
3745
|
})[];
|
|
3470
|
-
|
|
3471
|
-
|
|
3746
|
+
agents: {
|
|
3747
|
+
agentId: string;
|
|
3748
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
3749
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
3750
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
3751
|
+
}[];
|
|
3752
|
+
agentStepsRemaining: number;
|
|
3472
3753
|
};
|
|
3473
3754
|
toolResults: {
|
|
3474
3755
|
name: string;
|
|
@@ -3486,7 +3767,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3486
3767
|
agentState: {
|
|
3487
3768
|
agentContext: string;
|
|
3488
3769
|
fileContext: {
|
|
3489
|
-
|
|
3770
|
+
projectRoot: string;
|
|
3771
|
+
cwd: string;
|
|
3490
3772
|
fileTree: import("../util/file").FileTreeNode[];
|
|
3491
3773
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
3492
3774
|
knowledgeFiles: Record<string, string>;
|
|
@@ -3516,8 +3798,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3516
3798
|
messageHistory: (import("ai").CoreMessage & {
|
|
3517
3799
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
3518
3800
|
})[];
|
|
3519
|
-
|
|
3520
|
-
|
|
3801
|
+
agents: {
|
|
3802
|
+
agentId: string;
|
|
3803
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
3804
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
3805
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
3806
|
+
}[];
|
|
3807
|
+
agentStepsRemaining: number;
|
|
3521
3808
|
};
|
|
3522
3809
|
toolResults: {
|
|
3523
3810
|
name: string;
|
|
@@ -3538,29 +3825,29 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3538
3825
|
requestId: string;
|
|
3539
3826
|
filePaths: string[];
|
|
3540
3827
|
} | {
|
|
3541
|
-
data: {
|
|
3542
|
-
name: string;
|
|
3543
|
-
id: string;
|
|
3544
|
-
input: Record<string, any>;
|
|
3545
|
-
};
|
|
3546
3828
|
type: "tool-call";
|
|
3547
|
-
response: string;
|
|
3548
3829
|
userInputId: string;
|
|
3830
|
+
response: string;
|
|
3549
3831
|
changes: {
|
|
3550
|
-
type: "patch" | "file";
|
|
3551
3832
|
path: string;
|
|
3552
3833
|
content: string;
|
|
3834
|
+
type: "file" | "patch";
|
|
3553
3835
|
}[];
|
|
3554
3836
|
changesAlreadyApplied: {
|
|
3555
|
-
type: "patch" | "file";
|
|
3556
3837
|
path: string;
|
|
3557
3838
|
content: string;
|
|
3839
|
+
type: "file" | "patch";
|
|
3558
3840
|
}[];
|
|
3559
3841
|
addedFileVersions: {
|
|
3560
3842
|
path: string;
|
|
3561
3843
|
content: string;
|
|
3562
3844
|
}[];
|
|
3563
3845
|
resetFileVersions: boolean;
|
|
3846
|
+
data: {
|
|
3847
|
+
name: string;
|
|
3848
|
+
id: string;
|
|
3849
|
+
input: Record<string, any>;
|
|
3850
|
+
};
|
|
3564
3851
|
} | {
|
|
3565
3852
|
type: "terminal-command-result";
|
|
3566
3853
|
result: string;
|
|
@@ -3570,8 +3857,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3570
3857
|
isUpToDate: boolean;
|
|
3571
3858
|
latestVersion: string;
|
|
3572
3859
|
} | {
|
|
3573
|
-
type: "action-error";
|
|
3574
3860
|
message: string;
|
|
3861
|
+
type: "action-error";
|
|
3575
3862
|
remainingBalance?: number | undefined;
|
|
3576
3863
|
error?: string | undefined;
|
|
3577
3864
|
} | {
|
|
@@ -3580,57 +3867,58 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3580
3867
|
} | {
|
|
3581
3868
|
type: "request-reconnect";
|
|
3582
3869
|
};
|
|
3583
|
-
type: "action";
|
|
3584
3870
|
}, {
|
|
3871
|
+
type: "action";
|
|
3585
3872
|
data: {
|
|
3586
|
-
next_quota_reset: Date | null;
|
|
3587
3873
|
type: "usage-response";
|
|
3588
3874
|
usage: number;
|
|
3589
3875
|
remainingBalance: number;
|
|
3876
|
+
next_quota_reset: Date | null;
|
|
3590
3877
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
3591
3878
|
autoTopupAdded?: number | undefined;
|
|
3592
3879
|
} | {
|
|
3593
|
-
next_quota_reset: Date | null;
|
|
3594
3880
|
type: "init-response";
|
|
3595
3881
|
usage: number;
|
|
3596
3882
|
remainingBalance: number;
|
|
3883
|
+
next_quota_reset: Date | null;
|
|
3597
3884
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
3598
3885
|
autoTopupAdded?: number | undefined;
|
|
3599
3886
|
} | {
|
|
3600
3887
|
type: "response-complete";
|
|
3601
|
-
response: string;
|
|
3602
3888
|
userInputId: string;
|
|
3889
|
+
response: string;
|
|
3603
3890
|
changes: {
|
|
3604
|
-
type: "patch" | "file";
|
|
3605
3891
|
path: string;
|
|
3606
3892
|
content: string;
|
|
3893
|
+
type: "file" | "patch";
|
|
3607
3894
|
}[];
|
|
3608
3895
|
changesAlreadyApplied: {
|
|
3609
|
-
type: "patch" | "file";
|
|
3610
3896
|
path: string;
|
|
3611
3897
|
content: string;
|
|
3898
|
+
type: "file" | "patch";
|
|
3612
3899
|
}[];
|
|
3613
3900
|
addedFileVersions: {
|
|
3614
3901
|
path: string;
|
|
3615
3902
|
content: string;
|
|
3616
3903
|
}[];
|
|
3617
3904
|
resetFileVersions: boolean;
|
|
3618
|
-
next_quota_reset?: Date | null | undefined;
|
|
3619
3905
|
usage?: number | undefined;
|
|
3620
3906
|
remainingBalance?: number | undefined;
|
|
3621
3907
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
3908
|
+
next_quota_reset?: Date | null | undefined;
|
|
3622
3909
|
autoTopupAdded?: number | undefined;
|
|
3623
3910
|
} | {
|
|
3624
3911
|
type: "message-cost-response";
|
|
3625
|
-
credits: number;
|
|
3626
3912
|
promptId: string;
|
|
3913
|
+
credits: number;
|
|
3627
3914
|
} | {
|
|
3628
3915
|
type: "prompt-response";
|
|
3629
3916
|
promptId: string;
|
|
3630
3917
|
agentState: {
|
|
3631
3918
|
agentContext: string;
|
|
3632
3919
|
fileContext: {
|
|
3633
|
-
|
|
3920
|
+
projectRoot: string;
|
|
3921
|
+
cwd: string;
|
|
3634
3922
|
fileTree: import("../util/file").FileTreeNode[];
|
|
3635
3923
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
3636
3924
|
knowledgeFiles: Record<string, string>;
|
|
@@ -3660,8 +3948,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3660
3948
|
messageHistory: (import("ai").CoreMessage & {
|
|
3661
3949
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
3662
3950
|
})[];
|
|
3663
|
-
|
|
3664
|
-
|
|
3951
|
+
agentStepsRemaining: number;
|
|
3952
|
+
agents?: {
|
|
3953
|
+
agentId: string;
|
|
3954
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
3955
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
3956
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
3957
|
+
}[] | undefined;
|
|
3665
3958
|
};
|
|
3666
3959
|
toolResults: {
|
|
3667
3960
|
name: string;
|
|
@@ -3679,7 +3972,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3679
3972
|
agentState: {
|
|
3680
3973
|
agentContext: string;
|
|
3681
3974
|
fileContext: {
|
|
3682
|
-
|
|
3975
|
+
projectRoot: string;
|
|
3976
|
+
cwd: string;
|
|
3683
3977
|
fileTree: import("../util/file").FileTreeNode[];
|
|
3684
3978
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
3685
3979
|
knowledgeFiles: Record<string, string>;
|
|
@@ -3709,8 +4003,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3709
4003
|
messageHistory: (import("ai").CoreMessage & {
|
|
3710
4004
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
3711
4005
|
})[];
|
|
3712
|
-
|
|
3713
|
-
|
|
4006
|
+
agentStepsRemaining: number;
|
|
4007
|
+
agents?: {
|
|
4008
|
+
agentId: string;
|
|
4009
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
4010
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
4011
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
4012
|
+
}[] | undefined;
|
|
3714
4013
|
};
|
|
3715
4014
|
toolResults: {
|
|
3716
4015
|
name: string;
|
|
@@ -3731,29 +4030,29 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3731
4030
|
requestId: string;
|
|
3732
4031
|
filePaths: string[];
|
|
3733
4032
|
} | {
|
|
3734
|
-
data: {
|
|
3735
|
-
name: string;
|
|
3736
|
-
id: string;
|
|
3737
|
-
input: Record<string, any>;
|
|
3738
|
-
};
|
|
3739
4033
|
type: "tool-call";
|
|
3740
|
-
response: string;
|
|
3741
4034
|
userInputId: string;
|
|
4035
|
+
response: string;
|
|
3742
4036
|
changes: {
|
|
3743
|
-
type: "patch" | "file";
|
|
3744
4037
|
path: string;
|
|
3745
4038
|
content: string;
|
|
4039
|
+
type: "file" | "patch";
|
|
3746
4040
|
}[];
|
|
3747
4041
|
changesAlreadyApplied: {
|
|
3748
|
-
type: "patch" | "file";
|
|
3749
4042
|
path: string;
|
|
3750
4043
|
content: string;
|
|
4044
|
+
type: "file" | "patch";
|
|
3751
4045
|
}[];
|
|
3752
4046
|
addedFileVersions: {
|
|
3753
4047
|
path: string;
|
|
3754
4048
|
content: string;
|
|
3755
4049
|
}[];
|
|
3756
4050
|
resetFileVersions: boolean;
|
|
4051
|
+
data: {
|
|
4052
|
+
name: string;
|
|
4053
|
+
id: string;
|
|
4054
|
+
input: Record<string, any>;
|
|
4055
|
+
};
|
|
3757
4056
|
} | {
|
|
3758
4057
|
type: "terminal-command-result";
|
|
3759
4058
|
result: string;
|
|
@@ -3763,8 +4062,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3763
4062
|
isUpToDate: boolean;
|
|
3764
4063
|
latestVersion: string;
|
|
3765
4064
|
} | {
|
|
3766
|
-
type: "action-error";
|
|
3767
4065
|
message: string;
|
|
4066
|
+
type: "action-error";
|
|
3768
4067
|
remainingBalance?: number | undefined;
|
|
3769
4068
|
error?: string | undefined;
|
|
3770
4069
|
} | {
|
|
@@ -3773,7 +4072,6 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3773
4072
|
} | {
|
|
3774
4073
|
type: "request-reconnect";
|
|
3775
4074
|
};
|
|
3776
|
-
type: "action";
|
|
3777
4075
|
}>;
|
|
3778
4076
|
};
|
|
3779
4077
|
export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
@@ -3814,26 +4112,26 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3814
4112
|
path: z.ZodString;
|
|
3815
4113
|
content: z.ZodString;
|
|
3816
4114
|
}, "strip", z.ZodTypeAny, {
|
|
3817
|
-
type: "patch" | "file";
|
|
3818
4115
|
path: string;
|
|
3819
4116
|
content: string;
|
|
4117
|
+
type: "file" | "patch";
|
|
3820
4118
|
}, {
|
|
3821
|
-
type: "patch" | "file";
|
|
3822
4119
|
path: string;
|
|
3823
4120
|
content: string;
|
|
4121
|
+
type: "file" | "patch";
|
|
3824
4122
|
}>, "many">;
|
|
3825
4123
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
3826
4124
|
type: z.ZodEnum<["patch", "file"]>;
|
|
3827
4125
|
path: z.ZodString;
|
|
3828
4126
|
content: z.ZodString;
|
|
3829
4127
|
}, "strip", z.ZodTypeAny, {
|
|
3830
|
-
type: "patch" | "file";
|
|
3831
4128
|
path: string;
|
|
3832
4129
|
content: string;
|
|
4130
|
+
type: "file" | "patch";
|
|
3833
4131
|
}, {
|
|
3834
|
-
type: "patch" | "file";
|
|
3835
4132
|
path: string;
|
|
3836
4133
|
content: string;
|
|
4134
|
+
type: "file" | "patch";
|
|
3837
4135
|
}>, "many">;
|
|
3838
4136
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
3839
4137
|
path: z.ZodString;
|
|
@@ -3847,58 +4145,58 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3847
4145
|
}>, "many">;
|
|
3848
4146
|
resetFileVersions: z.ZodBoolean;
|
|
3849
4147
|
}, {
|
|
3850
|
-
next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
3851
4148
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
3852
4149
|
remainingBalance: z.ZodOptional<z.ZodNumber>;
|
|
3853
4150
|
balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin" | "organization")[]]>, z.ZodNumber>>>;
|
|
4151
|
+
next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
3854
4152
|
autoTopupAdded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
3855
4153
|
}>, "strip", z.ZodTypeAny, {
|
|
3856
4154
|
type: "response-complete";
|
|
3857
|
-
response: string;
|
|
3858
4155
|
userInputId: string;
|
|
4156
|
+
response: string;
|
|
3859
4157
|
changes: {
|
|
3860
|
-
type: "patch" | "file";
|
|
3861
4158
|
path: string;
|
|
3862
4159
|
content: string;
|
|
4160
|
+
type: "file" | "patch";
|
|
3863
4161
|
}[];
|
|
3864
4162
|
changesAlreadyApplied: {
|
|
3865
|
-
type: "patch" | "file";
|
|
3866
4163
|
path: string;
|
|
3867
4164
|
content: string;
|
|
4165
|
+
type: "file" | "patch";
|
|
3868
4166
|
}[];
|
|
3869
4167
|
addedFileVersions: {
|
|
3870
4168
|
path: string;
|
|
3871
4169
|
content: string;
|
|
3872
4170
|
}[];
|
|
3873
4171
|
resetFileVersions: boolean;
|
|
3874
|
-
next_quota_reset?: Date | null | undefined;
|
|
3875
4172
|
usage?: number | undefined;
|
|
3876
4173
|
remainingBalance?: number | undefined;
|
|
3877
4174
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
4175
|
+
next_quota_reset?: Date | null | undefined;
|
|
3878
4176
|
autoTopupAdded?: number | undefined;
|
|
3879
4177
|
}, {
|
|
3880
4178
|
type: "response-complete";
|
|
3881
|
-
response: string;
|
|
3882
4179
|
userInputId: string;
|
|
4180
|
+
response: string;
|
|
3883
4181
|
changes: {
|
|
3884
|
-
type: "patch" | "file";
|
|
3885
4182
|
path: string;
|
|
3886
4183
|
content: string;
|
|
4184
|
+
type: "file" | "patch";
|
|
3887
4185
|
}[];
|
|
3888
4186
|
changesAlreadyApplied: {
|
|
3889
|
-
type: "patch" | "file";
|
|
3890
4187
|
path: string;
|
|
3891
4188
|
content: string;
|
|
4189
|
+
type: "file" | "patch";
|
|
3892
4190
|
}[];
|
|
3893
4191
|
addedFileVersions: {
|
|
3894
4192
|
path: string;
|
|
3895
4193
|
content: string;
|
|
3896
4194
|
}[];
|
|
3897
4195
|
resetFileVersions: boolean;
|
|
3898
|
-
next_quota_reset?: Date | null | undefined;
|
|
3899
4196
|
usage?: number | undefined;
|
|
3900
4197
|
remainingBalance?: number | undefined;
|
|
3901
4198
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
4199
|
+
next_quota_reset?: Date | null | undefined;
|
|
3902
4200
|
autoTopupAdded?: number | undefined;
|
|
3903
4201
|
}>, z.ZodObject<{
|
|
3904
4202
|
type: z.ZodLiteral<"prompt-response">;
|
|
@@ -3906,7 +4204,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3906
4204
|
agentState: z.ZodObject<{
|
|
3907
4205
|
agentContext: z.ZodString;
|
|
3908
4206
|
fileContext: z.ZodObject<{
|
|
3909
|
-
|
|
4207
|
+
projectRoot: z.ZodString;
|
|
4208
|
+
cwd: z.ZodString;
|
|
3910
4209
|
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
3911
4210
|
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
3912
4211
|
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
@@ -3963,7 +4262,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3963
4262
|
content: string;
|
|
3964
4263
|
}>, "many">, "many">>;
|
|
3965
4264
|
}, "strip", z.ZodTypeAny, {
|
|
3966
|
-
|
|
4265
|
+
projectRoot: string;
|
|
4266
|
+
cwd: string;
|
|
3967
4267
|
fileTree: import("../util/file").FileTreeNode[];
|
|
3968
4268
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
3969
4269
|
knowledgeFiles: Record<string, string>;
|
|
@@ -3990,7 +4290,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3990
4290
|
content: string;
|
|
3991
4291
|
}[][] | undefined;
|
|
3992
4292
|
}, {
|
|
3993
|
-
|
|
4293
|
+
projectRoot: string;
|
|
4294
|
+
cwd: string;
|
|
3994
4295
|
fileTree: import("../util/file").FileTreeNode[];
|
|
3995
4296
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
3996
4297
|
knowledgeFiles: Record<string, string>;
|
|
@@ -4024,12 +4325,23 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4024
4325
|
}, {
|
|
4025
4326
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
4026
4327
|
}>>, "many">;
|
|
4027
|
-
|
|
4028
|
-
|
|
4328
|
+
agents: z.ZodDefault<z.ZodArray<z.ZodType<{
|
|
4329
|
+
agentId: string;
|
|
4330
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
4331
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
4332
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
4333
|
+
}, z.ZodTypeDef, {
|
|
4334
|
+
agentId: string;
|
|
4335
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
4336
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
4337
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
4338
|
+
}>, "many">>;
|
|
4339
|
+
agentStepsRemaining: z.ZodNumber;
|
|
4029
4340
|
}, "strip", z.ZodTypeAny, {
|
|
4030
4341
|
agentContext: string;
|
|
4031
4342
|
fileContext: {
|
|
4032
|
-
|
|
4343
|
+
projectRoot: string;
|
|
4344
|
+
cwd: string;
|
|
4033
4345
|
fileTree: import("../util/file").FileTreeNode[];
|
|
4034
4346
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
4035
4347
|
knowledgeFiles: Record<string, string>;
|
|
@@ -4059,12 +4371,18 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4059
4371
|
messageHistory: (import("ai").CoreMessage & {
|
|
4060
4372
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
4061
4373
|
})[];
|
|
4062
|
-
|
|
4063
|
-
|
|
4374
|
+
agents: {
|
|
4375
|
+
agentId: string;
|
|
4376
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
4377
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
4378
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
4379
|
+
}[];
|
|
4380
|
+
agentStepsRemaining: number;
|
|
4064
4381
|
}, {
|
|
4065
4382
|
agentContext: string;
|
|
4066
4383
|
fileContext: {
|
|
4067
|
-
|
|
4384
|
+
projectRoot: string;
|
|
4385
|
+
cwd: string;
|
|
4068
4386
|
fileTree: import("../util/file").FileTreeNode[];
|
|
4069
4387
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
4070
4388
|
knowledgeFiles: Record<string, string>;
|
|
@@ -4094,8 +4412,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4094
4412
|
messageHistory: (import("ai").CoreMessage & {
|
|
4095
4413
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
4096
4414
|
})[];
|
|
4097
|
-
|
|
4098
|
-
|
|
4415
|
+
agentStepsRemaining: number;
|
|
4416
|
+
agents?: {
|
|
4417
|
+
agentId: string;
|
|
4418
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
4419
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
4420
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
4421
|
+
}[] | undefined;
|
|
4099
4422
|
}>;
|
|
4100
4423
|
toolCalls: z.ZodArray<z.ZodObject<{
|
|
4101
4424
|
name: z.ZodString;
|
|
@@ -4129,7 +4452,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4129
4452
|
agentState: {
|
|
4130
4453
|
agentContext: string;
|
|
4131
4454
|
fileContext: {
|
|
4132
|
-
|
|
4455
|
+
projectRoot: string;
|
|
4456
|
+
cwd: string;
|
|
4133
4457
|
fileTree: import("../util/file").FileTreeNode[];
|
|
4134
4458
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
4135
4459
|
knowledgeFiles: Record<string, string>;
|
|
@@ -4159,8 +4483,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4159
4483
|
messageHistory: (import("ai").CoreMessage & {
|
|
4160
4484
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
4161
4485
|
})[];
|
|
4162
|
-
|
|
4163
|
-
|
|
4486
|
+
agents: {
|
|
4487
|
+
agentId: string;
|
|
4488
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
4489
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
4490
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
4491
|
+
}[];
|
|
4492
|
+
agentStepsRemaining: number;
|
|
4164
4493
|
};
|
|
4165
4494
|
toolResults: {
|
|
4166
4495
|
name: string;
|
|
@@ -4178,7 +4507,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4178
4507
|
agentState: {
|
|
4179
4508
|
agentContext: string;
|
|
4180
4509
|
fileContext: {
|
|
4181
|
-
|
|
4510
|
+
projectRoot: string;
|
|
4511
|
+
cwd: string;
|
|
4182
4512
|
fileTree: import("../util/file").FileTreeNode[];
|
|
4183
4513
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
4184
4514
|
knowledgeFiles: Record<string, string>;
|
|
@@ -4208,8 +4538,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4208
4538
|
messageHistory: (import("ai").CoreMessage & {
|
|
4209
4539
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
4210
4540
|
})[];
|
|
4211
|
-
|
|
4212
|
-
|
|
4541
|
+
agentStepsRemaining: number;
|
|
4542
|
+
agents?: {
|
|
4543
|
+
agentId: string;
|
|
4544
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
4545
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
4546
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
4547
|
+
}[] | undefined;
|
|
4213
4548
|
};
|
|
4214
4549
|
toolResults: {
|
|
4215
4550
|
name: string;
|
|
@@ -4227,7 +4562,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4227
4562
|
agentState: z.ZodObject<{
|
|
4228
4563
|
agentContext: z.ZodString;
|
|
4229
4564
|
fileContext: z.ZodObject<{
|
|
4230
|
-
|
|
4565
|
+
projectRoot: z.ZodString;
|
|
4566
|
+
cwd: z.ZodString;
|
|
4231
4567
|
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
4232
4568
|
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
4233
4569
|
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
@@ -4284,7 +4620,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4284
4620
|
content: string;
|
|
4285
4621
|
}>, "many">, "many">>;
|
|
4286
4622
|
}, "strip", z.ZodTypeAny, {
|
|
4287
|
-
|
|
4623
|
+
projectRoot: string;
|
|
4624
|
+
cwd: string;
|
|
4288
4625
|
fileTree: import("../util/file").FileTreeNode[];
|
|
4289
4626
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
4290
4627
|
knowledgeFiles: Record<string, string>;
|
|
@@ -4311,7 +4648,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4311
4648
|
content: string;
|
|
4312
4649
|
}[][] | undefined;
|
|
4313
4650
|
}, {
|
|
4314
|
-
|
|
4651
|
+
projectRoot: string;
|
|
4652
|
+
cwd: string;
|
|
4315
4653
|
fileTree: import("../util/file").FileTreeNode[];
|
|
4316
4654
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
4317
4655
|
knowledgeFiles: Record<string, string>;
|
|
@@ -4345,12 +4683,23 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4345
4683
|
}, {
|
|
4346
4684
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
4347
4685
|
}>>, "many">;
|
|
4348
|
-
|
|
4349
|
-
|
|
4686
|
+
agents: z.ZodDefault<z.ZodArray<z.ZodType<{
|
|
4687
|
+
agentId: string;
|
|
4688
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
4689
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
4690
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
4691
|
+
}, z.ZodTypeDef, {
|
|
4692
|
+
agentId: string;
|
|
4693
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
4694
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
4695
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
4696
|
+
}>, "many">>;
|
|
4697
|
+
agentStepsRemaining: z.ZodNumber;
|
|
4350
4698
|
}, "strip", z.ZodTypeAny, {
|
|
4351
4699
|
agentContext: string;
|
|
4352
4700
|
fileContext: {
|
|
4353
|
-
|
|
4701
|
+
projectRoot: string;
|
|
4702
|
+
cwd: string;
|
|
4354
4703
|
fileTree: import("../util/file").FileTreeNode[];
|
|
4355
4704
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
4356
4705
|
knowledgeFiles: Record<string, string>;
|
|
@@ -4380,12 +4729,18 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4380
4729
|
messageHistory: (import("ai").CoreMessage & {
|
|
4381
4730
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
4382
4731
|
})[];
|
|
4383
|
-
|
|
4384
|
-
|
|
4732
|
+
agents: {
|
|
4733
|
+
agentId: string;
|
|
4734
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
4735
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
4736
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
4737
|
+
}[];
|
|
4738
|
+
agentStepsRemaining: number;
|
|
4385
4739
|
}, {
|
|
4386
4740
|
agentContext: string;
|
|
4387
4741
|
fileContext: {
|
|
4388
|
-
|
|
4742
|
+
projectRoot: string;
|
|
4743
|
+
cwd: string;
|
|
4389
4744
|
fileTree: import("../util/file").FileTreeNode[];
|
|
4390
4745
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
4391
4746
|
knowledgeFiles: Record<string, string>;
|
|
@@ -4415,8 +4770,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4415
4770
|
messageHistory: (import("ai").CoreMessage & {
|
|
4416
4771
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
4417
4772
|
})[];
|
|
4418
|
-
|
|
4419
|
-
|
|
4773
|
+
agentStepsRemaining: number;
|
|
4774
|
+
agents?: {
|
|
4775
|
+
agentId: string;
|
|
4776
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
4777
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
4778
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
4779
|
+
}[] | undefined;
|
|
4420
4780
|
}>;
|
|
4421
4781
|
toolCalls: z.ZodArray<z.ZodObject<{
|
|
4422
4782
|
name: z.ZodString;
|
|
@@ -4450,7 +4810,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4450
4810
|
agentState: {
|
|
4451
4811
|
agentContext: string;
|
|
4452
4812
|
fileContext: {
|
|
4453
|
-
|
|
4813
|
+
projectRoot: string;
|
|
4814
|
+
cwd: string;
|
|
4454
4815
|
fileTree: import("../util/file").FileTreeNode[];
|
|
4455
4816
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
4456
4817
|
knowledgeFiles: Record<string, string>;
|
|
@@ -4480,8 +4841,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4480
4841
|
messageHistory: (import("ai").CoreMessage & {
|
|
4481
4842
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
4482
4843
|
})[];
|
|
4483
|
-
|
|
4484
|
-
|
|
4844
|
+
agents: {
|
|
4845
|
+
agentId: string;
|
|
4846
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
4847
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
4848
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
4849
|
+
}[];
|
|
4850
|
+
agentStepsRemaining: number;
|
|
4485
4851
|
};
|
|
4486
4852
|
toolResults: {
|
|
4487
4853
|
name: string;
|
|
@@ -4499,7 +4865,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4499
4865
|
agentState: {
|
|
4500
4866
|
agentContext: string;
|
|
4501
4867
|
fileContext: {
|
|
4502
|
-
|
|
4868
|
+
projectRoot: string;
|
|
4869
|
+
cwd: string;
|
|
4503
4870
|
fileTree: import("../util/file").FileTreeNode[];
|
|
4504
4871
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
4505
4872
|
knowledgeFiles: Record<string, string>;
|
|
@@ -4529,8 +4896,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4529
4896
|
messageHistory: (import("ai").CoreMessage & {
|
|
4530
4897
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
4531
4898
|
})[];
|
|
4532
|
-
|
|
4533
|
-
|
|
4899
|
+
agentStepsRemaining: number;
|
|
4900
|
+
agents?: {
|
|
4901
|
+
agentId: string;
|
|
4902
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
4903
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
4904
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
4905
|
+
}[] | undefined;
|
|
4534
4906
|
};
|
|
4535
4907
|
toolResults: {
|
|
4536
4908
|
name: string;
|
|
@@ -4576,26 +4948,26 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4576
4948
|
path: z.ZodString;
|
|
4577
4949
|
content: z.ZodString;
|
|
4578
4950
|
}, "strip", z.ZodTypeAny, {
|
|
4579
|
-
type: "patch" | "file";
|
|
4580
4951
|
path: string;
|
|
4581
4952
|
content: string;
|
|
4953
|
+
type: "file" | "patch";
|
|
4582
4954
|
}, {
|
|
4583
|
-
type: "patch" | "file";
|
|
4584
4955
|
path: string;
|
|
4585
4956
|
content: string;
|
|
4957
|
+
type: "file" | "patch";
|
|
4586
4958
|
}>, "many">;
|
|
4587
4959
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
4588
4960
|
type: z.ZodEnum<["patch", "file"]>;
|
|
4589
4961
|
path: z.ZodString;
|
|
4590
4962
|
content: z.ZodString;
|
|
4591
4963
|
}, "strip", z.ZodTypeAny, {
|
|
4592
|
-
type: "patch" | "file";
|
|
4593
4964
|
path: string;
|
|
4594
4965
|
content: string;
|
|
4966
|
+
type: "file" | "patch";
|
|
4595
4967
|
}, {
|
|
4596
|
-
type: "patch" | "file";
|
|
4597
4968
|
path: string;
|
|
4598
4969
|
content: string;
|
|
4970
|
+
type: "file" | "patch";
|
|
4599
4971
|
}>, "many">;
|
|
4600
4972
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
4601
4973
|
path: z.ZodString;
|
|
@@ -4609,53 +4981,53 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4609
4981
|
}>, "many">;
|
|
4610
4982
|
resetFileVersions: z.ZodBoolean;
|
|
4611
4983
|
}, "strip", z.ZodTypeAny, {
|
|
4612
|
-
data: {
|
|
4613
|
-
name: string;
|
|
4614
|
-
id: string;
|
|
4615
|
-
input: Record<string, any>;
|
|
4616
|
-
};
|
|
4617
4984
|
type: "tool-call";
|
|
4618
|
-
response: string;
|
|
4619
4985
|
userInputId: string;
|
|
4986
|
+
response: string;
|
|
4620
4987
|
changes: {
|
|
4621
|
-
type: "patch" | "file";
|
|
4622
4988
|
path: string;
|
|
4623
4989
|
content: string;
|
|
4990
|
+
type: "file" | "patch";
|
|
4624
4991
|
}[];
|
|
4625
4992
|
changesAlreadyApplied: {
|
|
4626
|
-
type: "patch" | "file";
|
|
4627
4993
|
path: string;
|
|
4628
4994
|
content: string;
|
|
4995
|
+
type: "file" | "patch";
|
|
4629
4996
|
}[];
|
|
4630
4997
|
addedFileVersions: {
|
|
4631
4998
|
path: string;
|
|
4632
4999
|
content: string;
|
|
4633
5000
|
}[];
|
|
4634
5001
|
resetFileVersions: boolean;
|
|
4635
|
-
}, {
|
|
4636
5002
|
data: {
|
|
4637
5003
|
name: string;
|
|
4638
5004
|
id: string;
|
|
4639
5005
|
input: Record<string, any>;
|
|
4640
5006
|
};
|
|
5007
|
+
}, {
|
|
4641
5008
|
type: "tool-call";
|
|
4642
|
-
response: string;
|
|
4643
5009
|
userInputId: string;
|
|
5010
|
+
response: string;
|
|
4644
5011
|
changes: {
|
|
4645
|
-
type: "patch" | "file";
|
|
4646
5012
|
path: string;
|
|
4647
5013
|
content: string;
|
|
5014
|
+
type: "file" | "patch";
|
|
4648
5015
|
}[];
|
|
4649
5016
|
changesAlreadyApplied: {
|
|
4650
|
-
type: "patch" | "file";
|
|
4651
5017
|
path: string;
|
|
4652
5018
|
content: string;
|
|
5019
|
+
type: "file" | "patch";
|
|
4653
5020
|
}[];
|
|
4654
5021
|
addedFileVersions: {
|
|
4655
5022
|
path: string;
|
|
4656
5023
|
content: string;
|
|
4657
5024
|
}[];
|
|
4658
5025
|
resetFileVersions: boolean;
|
|
5026
|
+
data: {
|
|
5027
|
+
name: string;
|
|
5028
|
+
id: string;
|
|
5029
|
+
input: Record<string, any>;
|
|
5030
|
+
};
|
|
4659
5031
|
}>, z.ZodObject<{
|
|
4660
5032
|
type: z.ZodLiteral<"terminal-command-result">;
|
|
4661
5033
|
userInputId: z.ZodString;
|
|
@@ -4690,17 +5062,17 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4690
5062
|
next_quota_reset: z.ZodNullable<z.ZodDate>;
|
|
4691
5063
|
autoTopupAdded: z.ZodOptional<z.ZodNumber>;
|
|
4692
5064
|
}, "type">>, "strip", z.ZodTypeAny, {
|
|
4693
|
-
next_quota_reset: Date | null;
|
|
4694
5065
|
type: "init-response";
|
|
4695
5066
|
usage: number;
|
|
4696
5067
|
remainingBalance: number;
|
|
5068
|
+
next_quota_reset: Date | null;
|
|
4697
5069
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
4698
5070
|
autoTopupAdded?: number | undefined;
|
|
4699
5071
|
}, {
|
|
4700
|
-
next_quota_reset: Date | null;
|
|
4701
5072
|
type: "init-response";
|
|
4702
5073
|
usage: number;
|
|
4703
5074
|
remainingBalance: number;
|
|
5075
|
+
next_quota_reset: Date | null;
|
|
4704
5076
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
4705
5077
|
autoTopupAdded?: number | undefined;
|
|
4706
5078
|
}>, z.ZodObject<{
|
|
@@ -4711,17 +5083,17 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4711
5083
|
next_quota_reset: z.ZodNullable<z.ZodDate>;
|
|
4712
5084
|
autoTopupAdded: z.ZodOptional<z.ZodNumber>;
|
|
4713
5085
|
}, "strip", z.ZodTypeAny, {
|
|
4714
|
-
next_quota_reset: Date | null;
|
|
4715
5086
|
type: "usage-response";
|
|
4716
5087
|
usage: number;
|
|
4717
5088
|
remainingBalance: number;
|
|
5089
|
+
next_quota_reset: Date | null;
|
|
4718
5090
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
4719
5091
|
autoTopupAdded?: number | undefined;
|
|
4720
5092
|
}, {
|
|
4721
|
-
next_quota_reset: Date | null;
|
|
4722
5093
|
type: "usage-response";
|
|
4723
5094
|
usage: number;
|
|
4724
5095
|
remainingBalance: number;
|
|
5096
|
+
next_quota_reset: Date | null;
|
|
4725
5097
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
4726
5098
|
autoTopupAdded?: number | undefined;
|
|
4727
5099
|
}>, z.ZodObject<{
|
|
@@ -4730,25 +5102,25 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4730
5102
|
credits: z.ZodNumber;
|
|
4731
5103
|
}, "strip", z.ZodTypeAny, {
|
|
4732
5104
|
type: "message-cost-response";
|
|
4733
|
-
credits: number;
|
|
4734
5105
|
promptId: string;
|
|
5106
|
+
credits: number;
|
|
4735
5107
|
}, {
|
|
4736
5108
|
type: "message-cost-response";
|
|
4737
|
-
credits: number;
|
|
4738
5109
|
promptId: string;
|
|
5110
|
+
credits: number;
|
|
4739
5111
|
}>, z.ZodObject<{
|
|
4740
5112
|
type: z.ZodLiteral<"action-error">;
|
|
4741
5113
|
message: z.ZodString;
|
|
4742
5114
|
error: z.ZodOptional<z.ZodString>;
|
|
4743
5115
|
remainingBalance: z.ZodOptional<z.ZodNumber>;
|
|
4744
5116
|
}, "strip", z.ZodTypeAny, {
|
|
4745
|
-
type: "action-error";
|
|
4746
5117
|
message: string;
|
|
5118
|
+
type: "action-error";
|
|
4747
5119
|
remainingBalance?: number | undefined;
|
|
4748
5120
|
error?: string | undefined;
|
|
4749
5121
|
}, {
|
|
4750
|
-
type: "action-error";
|
|
4751
5122
|
message: string;
|
|
5123
|
+
type: "action-error";
|
|
4752
5124
|
remainingBalance?: number | undefined;
|
|
4753
5125
|
error?: string | undefined;
|
|
4754
5126
|
}>, z.ZodObject<{
|
|
@@ -4768,55 +5140,57 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4768
5140
|
type: "request-reconnect";
|
|
4769
5141
|
}>]>;
|
|
4770
5142
|
}, "strip", z.ZodTypeAny, {
|
|
5143
|
+
type: "action";
|
|
4771
5144
|
data: {
|
|
4772
|
-
next_quota_reset: Date | null;
|
|
4773
5145
|
type: "usage-response";
|
|
4774
5146
|
usage: number;
|
|
4775
5147
|
remainingBalance: number;
|
|
5148
|
+
next_quota_reset: Date | null;
|
|
4776
5149
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
4777
5150
|
autoTopupAdded?: number | undefined;
|
|
4778
5151
|
} | {
|
|
4779
|
-
next_quota_reset: Date | null;
|
|
4780
5152
|
type: "init-response";
|
|
4781
5153
|
usage: number;
|
|
4782
5154
|
remainingBalance: number;
|
|
5155
|
+
next_quota_reset: Date | null;
|
|
4783
5156
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
4784
5157
|
autoTopupAdded?: number | undefined;
|
|
4785
5158
|
} | {
|
|
4786
5159
|
type: "response-complete";
|
|
4787
|
-
response: string;
|
|
4788
5160
|
userInputId: string;
|
|
5161
|
+
response: string;
|
|
4789
5162
|
changes: {
|
|
4790
|
-
type: "patch" | "file";
|
|
4791
5163
|
path: string;
|
|
4792
5164
|
content: string;
|
|
5165
|
+
type: "file" | "patch";
|
|
4793
5166
|
}[];
|
|
4794
5167
|
changesAlreadyApplied: {
|
|
4795
|
-
type: "patch" | "file";
|
|
4796
5168
|
path: string;
|
|
4797
5169
|
content: string;
|
|
5170
|
+
type: "file" | "patch";
|
|
4798
5171
|
}[];
|
|
4799
5172
|
addedFileVersions: {
|
|
4800
5173
|
path: string;
|
|
4801
5174
|
content: string;
|
|
4802
5175
|
}[];
|
|
4803
5176
|
resetFileVersions: boolean;
|
|
4804
|
-
next_quota_reset?: Date | null | undefined;
|
|
4805
5177
|
usage?: number | undefined;
|
|
4806
5178
|
remainingBalance?: number | undefined;
|
|
4807
5179
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
5180
|
+
next_quota_reset?: Date | null | undefined;
|
|
4808
5181
|
autoTopupAdded?: number | undefined;
|
|
4809
5182
|
} | {
|
|
4810
5183
|
type: "message-cost-response";
|
|
4811
|
-
credits: number;
|
|
4812
5184
|
promptId: string;
|
|
5185
|
+
credits: number;
|
|
4813
5186
|
} | {
|
|
4814
5187
|
type: "prompt-response";
|
|
4815
5188
|
promptId: string;
|
|
4816
5189
|
agentState: {
|
|
4817
5190
|
agentContext: string;
|
|
4818
5191
|
fileContext: {
|
|
4819
|
-
|
|
5192
|
+
projectRoot: string;
|
|
5193
|
+
cwd: string;
|
|
4820
5194
|
fileTree: import("../util/file").FileTreeNode[];
|
|
4821
5195
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
4822
5196
|
knowledgeFiles: Record<string, string>;
|
|
@@ -4846,8 +5220,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4846
5220
|
messageHistory: (import("ai").CoreMessage & {
|
|
4847
5221
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
4848
5222
|
})[];
|
|
4849
|
-
|
|
4850
|
-
|
|
5223
|
+
agents: {
|
|
5224
|
+
agentId: string;
|
|
5225
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
5226
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
5227
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
5228
|
+
}[];
|
|
5229
|
+
agentStepsRemaining: number;
|
|
4851
5230
|
};
|
|
4852
5231
|
toolResults: {
|
|
4853
5232
|
name: string;
|
|
@@ -4865,7 +5244,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4865
5244
|
agentState: {
|
|
4866
5245
|
agentContext: string;
|
|
4867
5246
|
fileContext: {
|
|
4868
|
-
|
|
5247
|
+
projectRoot: string;
|
|
5248
|
+
cwd: string;
|
|
4869
5249
|
fileTree: import("../util/file").FileTreeNode[];
|
|
4870
5250
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
4871
5251
|
knowledgeFiles: Record<string, string>;
|
|
@@ -4895,8 +5275,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4895
5275
|
messageHistory: (import("ai").CoreMessage & {
|
|
4896
5276
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
4897
5277
|
})[];
|
|
4898
|
-
|
|
4899
|
-
|
|
5278
|
+
agents: {
|
|
5279
|
+
agentId: string;
|
|
5280
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
5281
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
5282
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
5283
|
+
}[];
|
|
5284
|
+
agentStepsRemaining: number;
|
|
4900
5285
|
};
|
|
4901
5286
|
toolResults: {
|
|
4902
5287
|
name: string;
|
|
@@ -4917,29 +5302,29 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4917
5302
|
requestId: string;
|
|
4918
5303
|
filePaths: string[];
|
|
4919
5304
|
} | {
|
|
4920
|
-
data: {
|
|
4921
|
-
name: string;
|
|
4922
|
-
id: string;
|
|
4923
|
-
input: Record<string, any>;
|
|
4924
|
-
};
|
|
4925
5305
|
type: "tool-call";
|
|
4926
|
-
response: string;
|
|
4927
5306
|
userInputId: string;
|
|
5307
|
+
response: string;
|
|
4928
5308
|
changes: {
|
|
4929
|
-
type: "patch" | "file";
|
|
4930
5309
|
path: string;
|
|
4931
5310
|
content: string;
|
|
5311
|
+
type: "file" | "patch";
|
|
4932
5312
|
}[];
|
|
4933
5313
|
changesAlreadyApplied: {
|
|
4934
|
-
type: "patch" | "file";
|
|
4935
5314
|
path: string;
|
|
4936
5315
|
content: string;
|
|
5316
|
+
type: "file" | "patch";
|
|
4937
5317
|
}[];
|
|
4938
5318
|
addedFileVersions: {
|
|
4939
5319
|
path: string;
|
|
4940
5320
|
content: string;
|
|
4941
5321
|
}[];
|
|
4942
5322
|
resetFileVersions: boolean;
|
|
5323
|
+
data: {
|
|
5324
|
+
name: string;
|
|
5325
|
+
id: string;
|
|
5326
|
+
input: Record<string, any>;
|
|
5327
|
+
};
|
|
4943
5328
|
} | {
|
|
4944
5329
|
type: "terminal-command-result";
|
|
4945
5330
|
result: string;
|
|
@@ -4949,8 +5334,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4949
5334
|
isUpToDate: boolean;
|
|
4950
5335
|
latestVersion: string;
|
|
4951
5336
|
} | {
|
|
4952
|
-
type: "action-error";
|
|
4953
5337
|
message: string;
|
|
5338
|
+
type: "action-error";
|
|
4954
5339
|
remainingBalance?: number | undefined;
|
|
4955
5340
|
error?: string | undefined;
|
|
4956
5341
|
} | {
|
|
@@ -4959,57 +5344,58 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4959
5344
|
} | {
|
|
4960
5345
|
type: "request-reconnect";
|
|
4961
5346
|
};
|
|
4962
|
-
type: "action";
|
|
4963
5347
|
}, {
|
|
5348
|
+
type: "action";
|
|
4964
5349
|
data: {
|
|
4965
|
-
next_quota_reset: Date | null;
|
|
4966
5350
|
type: "usage-response";
|
|
4967
5351
|
usage: number;
|
|
4968
5352
|
remainingBalance: number;
|
|
5353
|
+
next_quota_reset: Date | null;
|
|
4969
5354
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
4970
5355
|
autoTopupAdded?: number | undefined;
|
|
4971
5356
|
} | {
|
|
4972
|
-
next_quota_reset: Date | null;
|
|
4973
5357
|
type: "init-response";
|
|
4974
5358
|
usage: number;
|
|
4975
5359
|
remainingBalance: number;
|
|
5360
|
+
next_quota_reset: Date | null;
|
|
4976
5361
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
4977
5362
|
autoTopupAdded?: number | undefined;
|
|
4978
5363
|
} | {
|
|
4979
5364
|
type: "response-complete";
|
|
4980
|
-
response: string;
|
|
4981
5365
|
userInputId: string;
|
|
5366
|
+
response: string;
|
|
4982
5367
|
changes: {
|
|
4983
|
-
type: "patch" | "file";
|
|
4984
5368
|
path: string;
|
|
4985
5369
|
content: string;
|
|
5370
|
+
type: "file" | "patch";
|
|
4986
5371
|
}[];
|
|
4987
5372
|
changesAlreadyApplied: {
|
|
4988
|
-
type: "patch" | "file";
|
|
4989
5373
|
path: string;
|
|
4990
5374
|
content: string;
|
|
5375
|
+
type: "file" | "patch";
|
|
4991
5376
|
}[];
|
|
4992
5377
|
addedFileVersions: {
|
|
4993
5378
|
path: string;
|
|
4994
5379
|
content: string;
|
|
4995
5380
|
}[];
|
|
4996
5381
|
resetFileVersions: boolean;
|
|
4997
|
-
next_quota_reset?: Date | null | undefined;
|
|
4998
5382
|
usage?: number | undefined;
|
|
4999
5383
|
remainingBalance?: number | undefined;
|
|
5000
5384
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
5385
|
+
next_quota_reset?: Date | null | undefined;
|
|
5001
5386
|
autoTopupAdded?: number | undefined;
|
|
5002
5387
|
} | {
|
|
5003
5388
|
type: "message-cost-response";
|
|
5004
|
-
credits: number;
|
|
5005
5389
|
promptId: string;
|
|
5390
|
+
credits: number;
|
|
5006
5391
|
} | {
|
|
5007
5392
|
type: "prompt-response";
|
|
5008
5393
|
promptId: string;
|
|
5009
5394
|
agentState: {
|
|
5010
5395
|
agentContext: string;
|
|
5011
5396
|
fileContext: {
|
|
5012
|
-
|
|
5397
|
+
projectRoot: string;
|
|
5398
|
+
cwd: string;
|
|
5013
5399
|
fileTree: import("../util/file").FileTreeNode[];
|
|
5014
5400
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
5015
5401
|
knowledgeFiles: Record<string, string>;
|
|
@@ -5039,8 +5425,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5039
5425
|
messageHistory: (import("ai").CoreMessage & {
|
|
5040
5426
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
5041
5427
|
})[];
|
|
5042
|
-
|
|
5043
|
-
|
|
5428
|
+
agentStepsRemaining: number;
|
|
5429
|
+
agents?: {
|
|
5430
|
+
agentId: string;
|
|
5431
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
5432
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
5433
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
5434
|
+
}[] | undefined;
|
|
5044
5435
|
};
|
|
5045
5436
|
toolResults: {
|
|
5046
5437
|
name: string;
|
|
@@ -5058,7 +5449,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5058
5449
|
agentState: {
|
|
5059
5450
|
agentContext: string;
|
|
5060
5451
|
fileContext: {
|
|
5061
|
-
|
|
5452
|
+
projectRoot: string;
|
|
5453
|
+
cwd: string;
|
|
5062
5454
|
fileTree: import("../util/file").FileTreeNode[];
|
|
5063
5455
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
5064
5456
|
knowledgeFiles: Record<string, string>;
|
|
@@ -5088,8 +5480,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5088
5480
|
messageHistory: (import("ai").CoreMessage & {
|
|
5089
5481
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
5090
5482
|
})[];
|
|
5091
|
-
|
|
5092
|
-
|
|
5483
|
+
agentStepsRemaining: number;
|
|
5484
|
+
agents?: {
|
|
5485
|
+
agentId: string;
|
|
5486
|
+
agentName: import("../types/agent-state").AgentTemplateName;
|
|
5487
|
+
agents: import("../types/agent-state").SubagentState[];
|
|
5488
|
+
messageHistory: import("../types/message").CodebuffMessage[];
|
|
5489
|
+
}[] | undefined;
|
|
5093
5490
|
};
|
|
5094
5491
|
toolResults: {
|
|
5095
5492
|
name: string;
|
|
@@ -5110,29 +5507,29 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5110
5507
|
requestId: string;
|
|
5111
5508
|
filePaths: string[];
|
|
5112
5509
|
} | {
|
|
5113
|
-
data: {
|
|
5114
|
-
name: string;
|
|
5115
|
-
id: string;
|
|
5116
|
-
input: Record<string, any>;
|
|
5117
|
-
};
|
|
5118
5510
|
type: "tool-call";
|
|
5119
|
-
response: string;
|
|
5120
5511
|
userInputId: string;
|
|
5512
|
+
response: string;
|
|
5121
5513
|
changes: {
|
|
5122
|
-
type: "patch" | "file";
|
|
5123
5514
|
path: string;
|
|
5124
5515
|
content: string;
|
|
5516
|
+
type: "file" | "patch";
|
|
5125
5517
|
}[];
|
|
5126
5518
|
changesAlreadyApplied: {
|
|
5127
|
-
type: "patch" | "file";
|
|
5128
5519
|
path: string;
|
|
5129
5520
|
content: string;
|
|
5521
|
+
type: "file" | "patch";
|
|
5130
5522
|
}[];
|
|
5131
5523
|
addedFileVersions: {
|
|
5132
5524
|
path: string;
|
|
5133
5525
|
content: string;
|
|
5134
5526
|
}[];
|
|
5135
5527
|
resetFileVersions: boolean;
|
|
5528
|
+
data: {
|
|
5529
|
+
name: string;
|
|
5530
|
+
id: string;
|
|
5531
|
+
input: Record<string, any>;
|
|
5532
|
+
};
|
|
5136
5533
|
} | {
|
|
5137
5534
|
type: "terminal-command-result";
|
|
5138
5535
|
result: string;
|
|
@@ -5142,8 +5539,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5142
5539
|
isUpToDate: boolean;
|
|
5143
5540
|
latestVersion: string;
|
|
5144
5541
|
} | {
|
|
5145
|
-
type: "action-error";
|
|
5146
5542
|
message: string;
|
|
5543
|
+
type: "action-error";
|
|
5147
5544
|
remainingBalance?: number | undefined;
|
|
5148
5545
|
error?: string | undefined;
|
|
5149
5546
|
} | {
|
|
@@ -5152,7 +5549,6 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
5152
5549
|
} | {
|
|
5153
5550
|
type: "request-reconnect";
|
|
5154
5551
|
};
|
|
5155
|
-
type: "action";
|
|
5156
5552
|
}>]>;
|
|
5157
5553
|
export type ServerMessageType = keyof typeof SERVER_MESSAGE_SCHEMAS;
|
|
5158
5554
|
export type ServerMessage<T extends ServerMessageType = ServerMessageType> = z.infer<(typeof SERVER_MESSAGE_SCHEMAS)[T]>;
|