codebuff 1.0.329 → 1.0.331
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/background-process-manager.js +2 -2
- package/dist/background-process-manager.js.map +1 -1
- package/dist/cli-definitions.js +0 -6
- package/dist/cli-definitions.js.map +1 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +2 -5
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +2 -2
- package/dist/client.js +23 -236
- package/dist/client.js.map +1 -1
- package/dist/common/actions.d.ts +556 -1390
- package/dist/common/actions.d.ts.map +1 -1
- package/dist/common/actions.js +5 -32
- package/dist/common/actions.js.map +1 -1
- package/dist/common/constants/tools.d.ts +0 -2
- package/dist/common/constants/tools.d.ts.map +1 -1
- package/dist/common/constants/tools.js +0 -3
- package/dist/common/constants/tools.js.map +1 -1
- package/dist/common/constants.d.ts +0 -5
- package/dist/common/constants.d.ts.map +1 -1
- package/dist/common/constants.js +1 -15
- package/dist/common/constants.js.map +1 -1
- package/dist/common/types/agent-state.d.ts +65 -24
- package/dist/common/types/agent-state.d.ts.map +1 -1
- package/dist/common/types/agent-state.js +24 -8
- package/dist/common/types/agent-state.js.map +1 -1
- 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 +2006 -3430
- package/dist/common/websockets/websocket-schema.d.ts.map +1 -1
- package/dist/index.js +7 -12
- package/dist/index.js.map +1 -1
- package/dist/json-config/hooks.js +2 -2
- package/dist/json-config/hooks.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.d.ts +1 -8
- package/dist/terminal/base.js +4 -118
- package/dist/terminal/base.js.map +1 -1
- package/dist/tool-handlers.d.ts +5 -9
- package/dist/tool-handlers.js +8 -36
- package/dist/tool-handlers.js.map +1 -1
- package/dist/types.d.ts +0 -1
- package/dist/utils/tool-renderers.js +0 -6
- package/dist/utils/tool-renderers.js.map +1 -1
- package/package.json +1 -2
package/dist/common/actions.d.ts
CHANGED
|
@@ -27,20 +27,6 @@ export declare const CHANGES: z.ZodArray<z.ZodObject<{
|
|
|
27
27
|
content: string;
|
|
28
28
|
}>, "many">;
|
|
29
29
|
export type FileChanges = z.infer<typeof CHANGES>;
|
|
30
|
-
export declare const ToolCallSchema: z.ZodObject<{
|
|
31
|
-
name: z.ZodString;
|
|
32
|
-
id: z.ZodString;
|
|
33
|
-
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
34
|
-
}, "strip", z.ZodTypeAny, {
|
|
35
|
-
name: string;
|
|
36
|
-
id: string;
|
|
37
|
-
input: Record<string, any>;
|
|
38
|
-
}, {
|
|
39
|
-
name: string;
|
|
40
|
-
id: string;
|
|
41
|
-
input: Record<string, any>;
|
|
42
|
-
}>;
|
|
43
|
-
export type ToolCall = z.infer<typeof ToolCallSchema>;
|
|
44
30
|
export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
45
31
|
type: z.ZodLiteral<"prompt">;
|
|
46
32
|
promptId: z.ZodString;
|
|
@@ -51,7 +37,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
51
37
|
agentState: z.ZodObject<{
|
|
52
38
|
agentContext: z.ZodString;
|
|
53
39
|
fileContext: z.ZodObject<{
|
|
54
|
-
|
|
40
|
+
projectRoot: z.ZodString;
|
|
41
|
+
cwd: z.ZodString;
|
|
55
42
|
fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
|
|
56
43
|
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
57
44
|
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
@@ -108,7 +95,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
108
95
|
content: string;
|
|
109
96
|
}>, "many">, "many">>;
|
|
110
97
|
}, "strip", z.ZodTypeAny, {
|
|
111
|
-
|
|
98
|
+
projectRoot: string;
|
|
99
|
+
cwd: string;
|
|
112
100
|
fileTree: import("./util/file").FileTreeNode[];
|
|
113
101
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
114
102
|
knowledgeFiles: Record<string, string>;
|
|
@@ -135,7 +123,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
135
123
|
content: string;
|
|
136
124
|
}[][] | undefined;
|
|
137
125
|
}, {
|
|
138
|
-
|
|
126
|
+
projectRoot: string;
|
|
127
|
+
cwd: string;
|
|
139
128
|
fileTree: import("./util/file").FileTreeNode[];
|
|
140
129
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
141
130
|
knowledgeFiles: Record<string, string>;
|
|
@@ -169,11 +158,23 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
169
158
|
}, {
|
|
170
159
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
171
160
|
}>>, "many">;
|
|
161
|
+
agents: z.ZodDefault<z.ZodArray<z.ZodType<{
|
|
162
|
+
agentId: string;
|
|
163
|
+
agentName: import("./types/agent-state").AgentTemplateName;
|
|
164
|
+
agents: import("./types/agent-state").SubagentState[];
|
|
165
|
+
messageHistory: import("./types/message").CodebuffMessage[];
|
|
166
|
+
}, z.ZodTypeDef, {
|
|
167
|
+
agentId: string;
|
|
168
|
+
agentName: import("./types/agent-state").AgentTemplateName;
|
|
169
|
+
agents: import("./types/agent-state").SubagentState[];
|
|
170
|
+
messageHistory: import("./types/message").CodebuffMessage[];
|
|
171
|
+
}>, "many">>;
|
|
172
172
|
agentStepsRemaining: z.ZodNumber;
|
|
173
173
|
}, "strip", z.ZodTypeAny, {
|
|
174
174
|
agentContext: string;
|
|
175
175
|
fileContext: {
|
|
176
|
-
|
|
176
|
+
projectRoot: string;
|
|
177
|
+
cwd: string;
|
|
177
178
|
fileTree: import("./util/file").FileTreeNode[];
|
|
178
179
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
179
180
|
knowledgeFiles: Record<string, string>;
|
|
@@ -203,11 +204,18 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
203
204
|
messageHistory: (import("ai").CoreMessage & {
|
|
204
205
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
205
206
|
})[];
|
|
207
|
+
agents: {
|
|
208
|
+
agentId: string;
|
|
209
|
+
agentName: import("./types/agent-state").AgentTemplateName;
|
|
210
|
+
agents: import("./types/agent-state").SubagentState[];
|
|
211
|
+
messageHistory: import("./types/message").CodebuffMessage[];
|
|
212
|
+
}[];
|
|
206
213
|
agentStepsRemaining: number;
|
|
207
214
|
}, {
|
|
208
215
|
agentContext: string;
|
|
209
216
|
fileContext: {
|
|
210
|
-
|
|
217
|
+
projectRoot: string;
|
|
218
|
+
cwd: string;
|
|
211
219
|
fileTree: import("./util/file").FileTreeNode[];
|
|
212
220
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
213
221
|
knowledgeFiles: Record<string, string>;
|
|
@@ -238,22 +246,27 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
238
246
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
239
247
|
})[];
|
|
240
248
|
agentStepsRemaining: number;
|
|
249
|
+
agents?: {
|
|
250
|
+
agentId: string;
|
|
251
|
+
agentName: import("./types/agent-state").AgentTemplateName;
|
|
252
|
+
agents: import("./types/agent-state").SubagentState[];
|
|
253
|
+
messageHistory: import("./types/message").CodebuffMessage[];
|
|
254
|
+
}[] | undefined;
|
|
241
255
|
}>;
|
|
242
256
|
toolResults: z.ZodArray<z.ZodObject<{
|
|
243
|
-
|
|
257
|
+
toolName: z.ZodString;
|
|
258
|
+
toolCallId: z.ZodString;
|
|
244
259
|
result: z.ZodString;
|
|
245
|
-
id: z.ZodString;
|
|
246
260
|
}, "strip", z.ZodTypeAny, {
|
|
247
|
-
|
|
248
|
-
|
|
261
|
+
toolName: string;
|
|
262
|
+
toolCallId: string;
|
|
249
263
|
result: string;
|
|
250
264
|
}, {
|
|
251
|
-
|
|
252
|
-
|
|
265
|
+
toolName: string;
|
|
266
|
+
toolCallId: string;
|
|
253
267
|
result: string;
|
|
254
268
|
}>, "many">;
|
|
255
269
|
model: z.ZodOptional<z.ZodString>;
|
|
256
|
-
cwd: z.ZodOptional<z.ZodString>;
|
|
257
270
|
repoUrl: z.ZodOptional<z.ZodString>;
|
|
258
271
|
}, "strip", z.ZodTypeAny, {
|
|
259
272
|
type: "prompt";
|
|
@@ -263,7 +276,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
263
276
|
agentState: {
|
|
264
277
|
agentContext: string;
|
|
265
278
|
fileContext: {
|
|
266
|
-
|
|
279
|
+
projectRoot: string;
|
|
280
|
+
cwd: string;
|
|
267
281
|
fileTree: import("./util/file").FileTreeNode[];
|
|
268
282
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
269
283
|
knowledgeFiles: Record<string, string>;
|
|
@@ -293,14 +307,19 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
293
307
|
messageHistory: (import("ai").CoreMessage & {
|
|
294
308
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
295
309
|
})[];
|
|
310
|
+
agents: {
|
|
311
|
+
agentId: string;
|
|
312
|
+
agentName: import("./types/agent-state").AgentTemplateName;
|
|
313
|
+
agents: import("./types/agent-state").SubagentState[];
|
|
314
|
+
messageHistory: import("./types/message").CodebuffMessage[];
|
|
315
|
+
}[];
|
|
296
316
|
agentStepsRemaining: number;
|
|
297
317
|
};
|
|
298
318
|
toolResults: {
|
|
299
|
-
|
|
300
|
-
|
|
319
|
+
toolName: string;
|
|
320
|
+
toolCallId: string;
|
|
301
321
|
result: string;
|
|
302
322
|
}[];
|
|
303
|
-
cwd?: string | undefined;
|
|
304
323
|
prompt?: string | undefined;
|
|
305
324
|
authToken?: string | undefined;
|
|
306
325
|
model?: string | undefined;
|
|
@@ -312,7 +331,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
312
331
|
agentState: {
|
|
313
332
|
agentContext: string;
|
|
314
333
|
fileContext: {
|
|
315
|
-
|
|
334
|
+
projectRoot: string;
|
|
335
|
+
cwd: string;
|
|
316
336
|
fileTree: import("./util/file").FileTreeNode[];
|
|
317
337
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
318
338
|
knowledgeFiles: Record<string, string>;
|
|
@@ -343,434 +363,128 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
343
363
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
344
364
|
})[];
|
|
345
365
|
agentStepsRemaining: number;
|
|
366
|
+
agents?: {
|
|
367
|
+
agentId: string;
|
|
368
|
+
agentName: import("./types/agent-state").AgentTemplateName;
|
|
369
|
+
agents: import("./types/agent-state").SubagentState[];
|
|
370
|
+
messageHistory: import("./types/message").CodebuffMessage[];
|
|
371
|
+
}[] | undefined;
|
|
346
372
|
};
|
|
347
373
|
toolResults: {
|
|
348
|
-
|
|
349
|
-
|
|
374
|
+
toolName: string;
|
|
375
|
+
toolCallId: string;
|
|
350
376
|
result: string;
|
|
351
377
|
}[];
|
|
352
|
-
cwd?: string | undefined;
|
|
353
378
|
prompt?: string | undefined;
|
|
354
379
|
authToken?: string | undefined;
|
|
355
380
|
costMode?: "max" | "lite" | "normal" | "experimental" | "ask" | undefined;
|
|
356
381
|
model?: string | undefined;
|
|
357
382
|
repoUrl?: string | undefined;
|
|
358
383
|
}>, z.ZodObject<{
|
|
359
|
-
type: z.ZodLiteral<"
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
388
|
-
shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
389
|
-
systemInfo: z.ZodObject<{
|
|
390
|
-
platform: z.ZodString;
|
|
391
|
-
shell: z.ZodString;
|
|
392
|
-
nodeVersion: z.ZodString;
|
|
393
|
-
arch: z.ZodString;
|
|
394
|
-
homedir: z.ZodString;
|
|
395
|
-
cpus: z.ZodNumber;
|
|
396
|
-
}, "strip", z.ZodTypeAny, {
|
|
397
|
-
platform: string;
|
|
398
|
-
shell: string;
|
|
399
|
-
nodeVersion: string;
|
|
400
|
-
arch: string;
|
|
401
|
-
homedir: string;
|
|
402
|
-
cpus: number;
|
|
403
|
-
}, {
|
|
404
|
-
platform: string;
|
|
405
|
-
shell: string;
|
|
406
|
-
nodeVersion: string;
|
|
407
|
-
arch: string;
|
|
408
|
-
homedir: string;
|
|
409
|
-
cpus: number;
|
|
410
|
-
}>;
|
|
411
|
-
fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
412
|
-
path: z.ZodString;
|
|
413
|
-
content: z.ZodString;
|
|
414
|
-
}, "strip", z.ZodTypeAny, {
|
|
415
|
-
path: string;
|
|
416
|
-
content: string;
|
|
417
|
-
}, {
|
|
418
|
-
path: string;
|
|
419
|
-
content: string;
|
|
420
|
-
}>, "many">, "many">>;
|
|
384
|
+
type: z.ZodLiteral<"read-files-response">;
|
|
385
|
+
files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
386
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
387
|
+
}, "strip", z.ZodTypeAny, {
|
|
388
|
+
type: "read-files-response";
|
|
389
|
+
files: Record<string, string | null>;
|
|
390
|
+
requestId?: string | undefined;
|
|
391
|
+
}, {
|
|
392
|
+
type: "read-files-response";
|
|
393
|
+
files: Record<string, string | null>;
|
|
394
|
+
requestId?: string | undefined;
|
|
395
|
+
}>, z.ZodObject<{
|
|
396
|
+
type: z.ZodLiteral<"init">;
|
|
397
|
+
fingerprintId: z.ZodString;
|
|
398
|
+
authToken: z.ZodOptional<z.ZodString>;
|
|
399
|
+
fileContext: z.ZodObject<{
|
|
400
|
+
projectRoot: z.ZodString;
|
|
401
|
+
cwd: z.ZodString;
|
|
402
|
+
fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
|
|
403
|
+
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
404
|
+
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
405
|
+
knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
406
|
+
userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
407
|
+
gitChanges: z.ZodObject<{
|
|
408
|
+
status: z.ZodString;
|
|
409
|
+
diff: z.ZodString;
|
|
410
|
+
diffCached: z.ZodString;
|
|
411
|
+
lastCommitMessages: z.ZodString;
|
|
421
412
|
}, "strip", z.ZodTypeAny, {
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
gitChanges: {
|
|
427
|
-
status: string;
|
|
428
|
-
diff: string;
|
|
429
|
-
diffCached: string;
|
|
430
|
-
lastCommitMessages: string;
|
|
431
|
-
};
|
|
432
|
-
changesSinceLastChat: Record<string, string>;
|
|
433
|
-
shellConfigFiles: Record<string, string>;
|
|
434
|
-
systemInfo: {
|
|
435
|
-
platform: string;
|
|
436
|
-
shell: string;
|
|
437
|
-
nodeVersion: string;
|
|
438
|
-
arch: string;
|
|
439
|
-
homedir: string;
|
|
440
|
-
cpus: number;
|
|
441
|
-
};
|
|
442
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
443
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
444
|
-
fileVersions?: {
|
|
445
|
-
path: string;
|
|
446
|
-
content: string;
|
|
447
|
-
}[][] | undefined;
|
|
413
|
+
status: string;
|
|
414
|
+
diff: string;
|
|
415
|
+
diffCached: string;
|
|
416
|
+
lastCommitMessages: string;
|
|
448
417
|
}, {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
gitChanges: {
|
|
454
|
-
status: string;
|
|
455
|
-
diff: string;
|
|
456
|
-
diffCached: string;
|
|
457
|
-
lastCommitMessages: string;
|
|
458
|
-
};
|
|
459
|
-
changesSinceLastChat: Record<string, string>;
|
|
460
|
-
shellConfigFiles: Record<string, string>;
|
|
461
|
-
systemInfo: {
|
|
462
|
-
platform: string;
|
|
463
|
-
shell: string;
|
|
464
|
-
nodeVersion: string;
|
|
465
|
-
arch: string;
|
|
466
|
-
homedir: string;
|
|
467
|
-
cpus: number;
|
|
468
|
-
};
|
|
469
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
470
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
471
|
-
fileVersions?: {
|
|
472
|
-
path: string;
|
|
473
|
-
content: string;
|
|
474
|
-
}[][] | undefined;
|
|
418
|
+
status: string;
|
|
419
|
+
diff: string;
|
|
420
|
+
diffCached: string;
|
|
421
|
+
lastCommitMessages: string;
|
|
475
422
|
}>;
|
|
476
|
-
|
|
477
|
-
|
|
423
|
+
changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
424
|
+
shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
425
|
+
systemInfo: z.ZodObject<{
|
|
426
|
+
platform: z.ZodString;
|
|
427
|
+
shell: z.ZodString;
|
|
428
|
+
nodeVersion: z.ZodString;
|
|
429
|
+
arch: z.ZodString;
|
|
430
|
+
homedir: z.ZodString;
|
|
431
|
+
cpus: z.ZodNumber;
|
|
478
432
|
}, "strip", z.ZodTypeAny, {
|
|
479
|
-
|
|
433
|
+
platform: string;
|
|
434
|
+
shell: string;
|
|
435
|
+
nodeVersion: string;
|
|
436
|
+
arch: string;
|
|
437
|
+
homedir: string;
|
|
438
|
+
cpus: number;
|
|
480
439
|
}, {
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
440
|
+
platform: string;
|
|
441
|
+
shell: string;
|
|
442
|
+
nodeVersion: string;
|
|
443
|
+
arch: string;
|
|
444
|
+
homedir: string;
|
|
445
|
+
cpus: number;
|
|
446
|
+
}>;
|
|
447
|
+
fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
448
|
+
path: z.ZodString;
|
|
449
|
+
content: z.ZodString;
|
|
450
|
+
}, "strip", z.ZodTypeAny, {
|
|
451
|
+
path: string;
|
|
452
|
+
content: string;
|
|
453
|
+
}, {
|
|
454
|
+
path: string;
|
|
455
|
+
content: string;
|
|
456
|
+
}>, "many">, "many">>;
|
|
484
457
|
}, "strip", z.ZodTypeAny, {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
lastCommitMessages: string;
|
|
496
|
-
};
|
|
497
|
-
changesSinceLastChat: Record<string, string>;
|
|
498
|
-
shellConfigFiles: Record<string, string>;
|
|
499
|
-
systemInfo: {
|
|
500
|
-
platform: string;
|
|
501
|
-
shell: string;
|
|
502
|
-
nodeVersion: string;
|
|
503
|
-
arch: string;
|
|
504
|
-
homedir: string;
|
|
505
|
-
cpus: number;
|
|
506
|
-
};
|
|
507
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
508
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
509
|
-
fileVersions?: {
|
|
510
|
-
path: string;
|
|
511
|
-
content: string;
|
|
512
|
-
}[][] | undefined;
|
|
458
|
+
projectRoot: string;
|
|
459
|
+
cwd: string;
|
|
460
|
+
fileTree: import("./util/file").FileTreeNode[];
|
|
461
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
462
|
+
knowledgeFiles: Record<string, string>;
|
|
463
|
+
gitChanges: {
|
|
464
|
+
status: string;
|
|
465
|
+
diff: string;
|
|
466
|
+
diffCached: string;
|
|
467
|
+
lastCommitMessages: string;
|
|
513
468
|
};
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
469
|
+
changesSinceLastChat: Record<string, string>;
|
|
470
|
+
shellConfigFiles: Record<string, string>;
|
|
471
|
+
systemInfo: {
|
|
472
|
+
platform: string;
|
|
473
|
+
shell: string;
|
|
474
|
+
nodeVersion: string;
|
|
475
|
+
arch: string;
|
|
476
|
+
homedir: string;
|
|
477
|
+
cpus: number;
|
|
478
|
+
};
|
|
479
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
480
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
481
|
+
fileVersions?: {
|
|
482
|
+
path: string;
|
|
483
|
+
content: string;
|
|
484
|
+
}[][] | undefined;
|
|
518
485
|
}, {
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
currentWorkingDirectory: string;
|
|
522
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
523
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
524
|
-
knowledgeFiles: Record<string, string>;
|
|
525
|
-
gitChanges: {
|
|
526
|
-
status: string;
|
|
527
|
-
diff: string;
|
|
528
|
-
diffCached: string;
|
|
529
|
-
lastCommitMessages: string;
|
|
530
|
-
};
|
|
531
|
-
changesSinceLastChat: Record<string, string>;
|
|
532
|
-
shellConfigFiles: Record<string, string>;
|
|
533
|
-
systemInfo: {
|
|
534
|
-
platform: string;
|
|
535
|
-
shell: string;
|
|
536
|
-
nodeVersion: string;
|
|
537
|
-
arch: string;
|
|
538
|
-
homedir: string;
|
|
539
|
-
cpus: number;
|
|
540
|
-
};
|
|
541
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
542
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
543
|
-
fileVersions?: {
|
|
544
|
-
path: string;
|
|
545
|
-
content: string;
|
|
546
|
-
}[][] | undefined;
|
|
547
|
-
};
|
|
548
|
-
messageHistory: (import("ai").CoreMessage & {
|
|
549
|
-
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
550
|
-
})[];
|
|
551
|
-
agentStepsRemaining: number;
|
|
552
|
-
}>;
|
|
553
|
-
toolResults: z.ZodArray<z.ZodObject<{
|
|
554
|
-
name: z.ZodString;
|
|
555
|
-
result: z.ZodString;
|
|
556
|
-
id: z.ZodString;
|
|
557
|
-
}, "strip", z.ZodTypeAny, {
|
|
558
|
-
name: string;
|
|
559
|
-
id: string;
|
|
560
|
-
result: string;
|
|
561
|
-
}, {
|
|
562
|
-
name: string;
|
|
563
|
-
id: string;
|
|
564
|
-
result: string;
|
|
565
|
-
}>, "many">;
|
|
566
|
-
fingerprintId: z.ZodString;
|
|
567
|
-
authToken: z.ZodOptional<z.ZodString>;
|
|
568
|
-
costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max", "experimental", "ask"]>>>;
|
|
569
|
-
model: z.ZodOptional<z.ZodString>;
|
|
570
|
-
cwd: z.ZodOptional<z.ZodString>;
|
|
571
|
-
repoName: z.ZodOptional<z.ZodString>;
|
|
572
|
-
}, "strip", z.ZodTypeAny, {
|
|
573
|
-
type: "manager-prompt";
|
|
574
|
-
promptId: string;
|
|
575
|
-
fingerprintId: string;
|
|
576
|
-
costMode: "max" | "lite" | "normal" | "experimental" | "ask";
|
|
577
|
-
agentState: {
|
|
578
|
-
agentContext: string;
|
|
579
|
-
fileContext: {
|
|
580
|
-
currentWorkingDirectory: string;
|
|
581
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
582
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
583
|
-
knowledgeFiles: Record<string, string>;
|
|
584
|
-
gitChanges: {
|
|
585
|
-
status: string;
|
|
586
|
-
diff: string;
|
|
587
|
-
diffCached: string;
|
|
588
|
-
lastCommitMessages: string;
|
|
589
|
-
};
|
|
590
|
-
changesSinceLastChat: Record<string, string>;
|
|
591
|
-
shellConfigFiles: Record<string, string>;
|
|
592
|
-
systemInfo: {
|
|
593
|
-
platform: string;
|
|
594
|
-
shell: string;
|
|
595
|
-
nodeVersion: string;
|
|
596
|
-
arch: string;
|
|
597
|
-
homedir: string;
|
|
598
|
-
cpus: number;
|
|
599
|
-
};
|
|
600
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
601
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
602
|
-
fileVersions?: {
|
|
603
|
-
path: string;
|
|
604
|
-
content: string;
|
|
605
|
-
}[][] | undefined;
|
|
606
|
-
};
|
|
607
|
-
messageHistory: (import("ai").CoreMessage & {
|
|
608
|
-
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
609
|
-
})[];
|
|
610
|
-
agentStepsRemaining: number;
|
|
611
|
-
};
|
|
612
|
-
toolResults: {
|
|
613
|
-
name: string;
|
|
614
|
-
id: string;
|
|
615
|
-
result: string;
|
|
616
|
-
}[];
|
|
617
|
-
cwd?: string | undefined;
|
|
618
|
-
prompt?: string | undefined;
|
|
619
|
-
authToken?: string | undefined;
|
|
620
|
-
model?: string | undefined;
|
|
621
|
-
repoName?: string | undefined;
|
|
622
|
-
}, {
|
|
623
|
-
type: "manager-prompt";
|
|
624
|
-
promptId: string;
|
|
625
|
-
fingerprintId: string;
|
|
626
|
-
agentState: {
|
|
627
|
-
agentContext: string;
|
|
628
|
-
fileContext: {
|
|
629
|
-
currentWorkingDirectory: string;
|
|
630
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
631
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
632
|
-
knowledgeFiles: Record<string, string>;
|
|
633
|
-
gitChanges: {
|
|
634
|
-
status: string;
|
|
635
|
-
diff: string;
|
|
636
|
-
diffCached: string;
|
|
637
|
-
lastCommitMessages: string;
|
|
638
|
-
};
|
|
639
|
-
changesSinceLastChat: Record<string, string>;
|
|
640
|
-
shellConfigFiles: Record<string, string>;
|
|
641
|
-
systemInfo: {
|
|
642
|
-
platform: string;
|
|
643
|
-
shell: string;
|
|
644
|
-
nodeVersion: string;
|
|
645
|
-
arch: string;
|
|
646
|
-
homedir: string;
|
|
647
|
-
cpus: number;
|
|
648
|
-
};
|
|
649
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
650
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
651
|
-
fileVersions?: {
|
|
652
|
-
path: string;
|
|
653
|
-
content: string;
|
|
654
|
-
}[][] | undefined;
|
|
655
|
-
};
|
|
656
|
-
messageHistory: (import("ai").CoreMessage & {
|
|
657
|
-
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
658
|
-
})[];
|
|
659
|
-
agentStepsRemaining: number;
|
|
660
|
-
};
|
|
661
|
-
toolResults: {
|
|
662
|
-
name: string;
|
|
663
|
-
id: string;
|
|
664
|
-
result: string;
|
|
665
|
-
}[];
|
|
666
|
-
cwd?: string | undefined;
|
|
667
|
-
prompt?: string | undefined;
|
|
668
|
-
authToken?: string | undefined;
|
|
669
|
-
costMode?: "max" | "lite" | "normal" | "experimental" | "ask" | undefined;
|
|
670
|
-
model?: string | undefined;
|
|
671
|
-
repoName?: string | undefined;
|
|
672
|
-
}>, z.ZodObject<{
|
|
673
|
-
type: z.ZodLiteral<"read-files-response">;
|
|
674
|
-
files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
675
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
676
|
-
}, "strip", z.ZodTypeAny, {
|
|
677
|
-
type: "read-files-response";
|
|
678
|
-
files: Record<string, string | null>;
|
|
679
|
-
requestId?: string | undefined;
|
|
680
|
-
}, {
|
|
681
|
-
type: "read-files-response";
|
|
682
|
-
files: Record<string, string | null>;
|
|
683
|
-
requestId?: string | undefined;
|
|
684
|
-
}>, z.ZodObject<{
|
|
685
|
-
type: z.ZodLiteral<"init">;
|
|
686
|
-
fingerprintId: z.ZodString;
|
|
687
|
-
authToken: z.ZodOptional<z.ZodString>;
|
|
688
|
-
fileContext: z.ZodObject<{
|
|
689
|
-
currentWorkingDirectory: z.ZodString;
|
|
690
|
-
fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
|
|
691
|
-
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
692
|
-
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
693
|
-
knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
694
|
-
userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
695
|
-
gitChanges: z.ZodObject<{
|
|
696
|
-
status: z.ZodString;
|
|
697
|
-
diff: z.ZodString;
|
|
698
|
-
diffCached: z.ZodString;
|
|
699
|
-
lastCommitMessages: z.ZodString;
|
|
700
|
-
}, "strip", z.ZodTypeAny, {
|
|
701
|
-
status: string;
|
|
702
|
-
diff: string;
|
|
703
|
-
diffCached: string;
|
|
704
|
-
lastCommitMessages: string;
|
|
705
|
-
}, {
|
|
706
|
-
status: string;
|
|
707
|
-
diff: string;
|
|
708
|
-
diffCached: string;
|
|
709
|
-
lastCommitMessages: string;
|
|
710
|
-
}>;
|
|
711
|
-
changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
712
|
-
shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
713
|
-
systemInfo: z.ZodObject<{
|
|
714
|
-
platform: z.ZodString;
|
|
715
|
-
shell: z.ZodString;
|
|
716
|
-
nodeVersion: z.ZodString;
|
|
717
|
-
arch: z.ZodString;
|
|
718
|
-
homedir: z.ZodString;
|
|
719
|
-
cpus: z.ZodNumber;
|
|
720
|
-
}, "strip", z.ZodTypeAny, {
|
|
721
|
-
platform: string;
|
|
722
|
-
shell: string;
|
|
723
|
-
nodeVersion: string;
|
|
724
|
-
arch: string;
|
|
725
|
-
homedir: string;
|
|
726
|
-
cpus: number;
|
|
727
|
-
}, {
|
|
728
|
-
platform: string;
|
|
729
|
-
shell: string;
|
|
730
|
-
nodeVersion: string;
|
|
731
|
-
arch: string;
|
|
732
|
-
homedir: string;
|
|
733
|
-
cpus: number;
|
|
734
|
-
}>;
|
|
735
|
-
fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
736
|
-
path: z.ZodString;
|
|
737
|
-
content: z.ZodString;
|
|
738
|
-
}, "strip", z.ZodTypeAny, {
|
|
739
|
-
path: string;
|
|
740
|
-
content: string;
|
|
741
|
-
}, {
|
|
742
|
-
path: string;
|
|
743
|
-
content: string;
|
|
744
|
-
}>, "many">, "many">>;
|
|
745
|
-
}, "strip", z.ZodTypeAny, {
|
|
746
|
-
currentWorkingDirectory: string;
|
|
747
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
748
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
749
|
-
knowledgeFiles: Record<string, string>;
|
|
750
|
-
gitChanges: {
|
|
751
|
-
status: string;
|
|
752
|
-
diff: string;
|
|
753
|
-
diffCached: string;
|
|
754
|
-
lastCommitMessages: string;
|
|
755
|
-
};
|
|
756
|
-
changesSinceLastChat: Record<string, string>;
|
|
757
|
-
shellConfigFiles: Record<string, string>;
|
|
758
|
-
systemInfo: {
|
|
759
|
-
platform: string;
|
|
760
|
-
shell: string;
|
|
761
|
-
nodeVersion: string;
|
|
762
|
-
arch: string;
|
|
763
|
-
homedir: string;
|
|
764
|
-
cpus: number;
|
|
765
|
-
};
|
|
766
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
767
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
768
|
-
fileVersions?: {
|
|
769
|
-
path: string;
|
|
770
|
-
content: string;
|
|
771
|
-
}[][] | undefined;
|
|
772
|
-
}, {
|
|
773
|
-
currentWorkingDirectory: string;
|
|
486
|
+
projectRoot: string;
|
|
487
|
+
cwd: string;
|
|
774
488
|
fileTree: import("./util/file").FileTreeNode[];
|
|
775
489
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
776
490
|
knowledgeFiles: Record<string, string>;
|
|
@@ -801,40 +515,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
801
515
|
}, "strip", z.ZodTypeAny, {
|
|
802
516
|
type: "init";
|
|
803
517
|
fileContext: {
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
807
|
-
knowledgeFiles: Record<string, string>;
|
|
808
|
-
gitChanges: {
|
|
809
|
-
status: string;
|
|
810
|
-
diff: string;
|
|
811
|
-
diffCached: string;
|
|
812
|
-
lastCommitMessages: string;
|
|
813
|
-
};
|
|
814
|
-
changesSinceLastChat: Record<string, string>;
|
|
815
|
-
shellConfigFiles: Record<string, string>;
|
|
816
|
-
systemInfo: {
|
|
817
|
-
platform: string;
|
|
818
|
-
shell: string;
|
|
819
|
-
nodeVersion: string;
|
|
820
|
-
arch: string;
|
|
821
|
-
homedir: string;
|
|
822
|
-
cpus: number;
|
|
823
|
-
};
|
|
824
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
825
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
826
|
-
fileVersions?: {
|
|
827
|
-
path: string;
|
|
828
|
-
content: string;
|
|
829
|
-
}[][] | undefined;
|
|
830
|
-
};
|
|
831
|
-
fingerprintId: string;
|
|
832
|
-
authToken?: string | undefined;
|
|
833
|
-
repoUrl?: string | undefined;
|
|
834
|
-
}, {
|
|
835
|
-
type: "init";
|
|
836
|
-
fileContext: {
|
|
837
|
-
currentWorkingDirectory: string;
|
|
518
|
+
projectRoot: string;
|
|
519
|
+
cwd: string;
|
|
838
520
|
fileTree: import("./util/file").FileTreeNode[];
|
|
839
521
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
840
522
|
knowledgeFiles: Record<string, string>;
|
|
@@ -852,842 +534,118 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
852
534
|
nodeVersion: string;
|
|
853
535
|
arch: string;
|
|
854
536
|
homedir: string;
|
|
855
|
-
cpus: number;
|
|
856
|
-
};
|
|
857
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
858
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
859
|
-
fileVersions?: {
|
|
860
|
-
path: string;
|
|
861
|
-
content: string;
|
|
862
|
-
}[][] | undefined;
|
|
863
|
-
};
|
|
864
|
-
fingerprintId: string;
|
|
865
|
-
authToken?: string | undefined;
|
|
866
|
-
repoUrl?: string | undefined;
|
|
867
|
-
}>, z.ZodObject<{
|
|
868
|
-
type: z.ZodLiteral<"generate-commit-message">;
|
|
869
|
-
fingerprintId: z.ZodString;
|
|
870
|
-
authToken: z.ZodOptional<z.ZodString>;
|
|
871
|
-
stagedChanges: z.ZodString;
|
|
872
|
-
}, "strip", z.ZodTypeAny, {
|
|
873
|
-
type: "generate-commit-message";
|
|
874
|
-
fingerprintId: string;
|
|
875
|
-
stagedChanges: string;
|
|
876
|
-
authToken?: string | undefined;
|
|
877
|
-
}, {
|
|
878
|
-
type: "generate-commit-message";
|
|
879
|
-
fingerprintId: string;
|
|
880
|
-
stagedChanges: string;
|
|
881
|
-
authToken?: string | undefined;
|
|
882
|
-
}>]>;
|
|
883
|
-
export type ClientAction = z.infer<typeof CLIENT_ACTION_SCHEMA>;
|
|
884
|
-
export declare const UsageReponseSchema: z.ZodObject<{
|
|
885
|
-
type: z.ZodLiteral<"usage-response">;
|
|
886
|
-
usage: z.ZodNumber;
|
|
887
|
-
remainingBalance: z.ZodNumber;
|
|
888
|
-
balanceBreakdown: z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin" | "organization")[]]>, z.ZodNumber>>;
|
|
889
|
-
next_quota_reset: z.ZodNullable<z.ZodDate>;
|
|
890
|
-
autoTopupAdded: z.ZodOptional<z.ZodNumber>;
|
|
891
|
-
}, "strip", z.ZodTypeAny, {
|
|
892
|
-
type: "usage-response";
|
|
893
|
-
usage: number;
|
|
894
|
-
remainingBalance: number;
|
|
895
|
-
next_quota_reset: Date | null;
|
|
896
|
-
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
897
|
-
autoTopupAdded?: number | undefined;
|
|
898
|
-
}, {
|
|
899
|
-
type: "usage-response";
|
|
900
|
-
usage: number;
|
|
901
|
-
remainingBalance: number;
|
|
902
|
-
next_quota_reset: Date | null;
|
|
903
|
-
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
904
|
-
autoTopupAdded?: number | undefined;
|
|
905
|
-
}>;
|
|
906
|
-
export type UsageResponse = z.infer<typeof UsageReponseSchema>;
|
|
907
|
-
export declare const InitResponseSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
908
|
-
type: z.ZodLiteral<"init-response">;
|
|
909
|
-
}, Omit<{
|
|
910
|
-
type: z.ZodLiteral<"usage-response">;
|
|
911
|
-
usage: z.ZodNumber;
|
|
912
|
-
remainingBalance: z.ZodNumber;
|
|
913
|
-
balanceBreakdown: z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin" | "organization")[]]>, z.ZodNumber>>;
|
|
914
|
-
next_quota_reset: z.ZodNullable<z.ZodDate>;
|
|
915
|
-
autoTopupAdded: z.ZodOptional<z.ZodNumber>;
|
|
916
|
-
}, "type">>, "strip", z.ZodTypeAny, {
|
|
917
|
-
type: "init-response";
|
|
918
|
-
usage: number;
|
|
919
|
-
remainingBalance: number;
|
|
920
|
-
next_quota_reset: Date | null;
|
|
921
|
-
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
922
|
-
autoTopupAdded?: number | undefined;
|
|
923
|
-
}, {
|
|
924
|
-
type: "init-response";
|
|
925
|
-
usage: number;
|
|
926
|
-
remainingBalance: number;
|
|
927
|
-
next_quota_reset: Date | null;
|
|
928
|
-
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
929
|
-
autoTopupAdded?: number | undefined;
|
|
930
|
-
}>;
|
|
931
|
-
export type InitResponse = z.infer<typeof InitResponseSchema>;
|
|
932
|
-
export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
933
|
-
type: z.ZodLiteral<"response-complete">;
|
|
934
|
-
userInputId: z.ZodString;
|
|
935
|
-
response: z.ZodString;
|
|
936
|
-
changes: z.ZodArray<z.ZodObject<{
|
|
937
|
-
type: z.ZodEnum<["patch", "file"]>;
|
|
938
|
-
path: z.ZodString;
|
|
939
|
-
content: z.ZodString;
|
|
940
|
-
}, "strip", z.ZodTypeAny, {
|
|
941
|
-
path: string;
|
|
942
|
-
type: "patch" | "file";
|
|
943
|
-
content: string;
|
|
944
|
-
}, {
|
|
945
|
-
path: string;
|
|
946
|
-
type: "patch" | "file";
|
|
947
|
-
content: string;
|
|
948
|
-
}>, "many">;
|
|
949
|
-
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
950
|
-
type: z.ZodEnum<["patch", "file"]>;
|
|
951
|
-
path: z.ZodString;
|
|
952
|
-
content: z.ZodString;
|
|
953
|
-
}, "strip", z.ZodTypeAny, {
|
|
954
|
-
path: string;
|
|
955
|
-
type: "patch" | "file";
|
|
956
|
-
content: string;
|
|
957
|
-
}, {
|
|
958
|
-
path: string;
|
|
959
|
-
type: "patch" | "file";
|
|
960
|
-
content: string;
|
|
961
|
-
}>, "many">;
|
|
962
|
-
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
963
|
-
path: z.ZodString;
|
|
964
|
-
content: z.ZodString;
|
|
965
|
-
}, "strip", z.ZodTypeAny, {
|
|
966
|
-
path: string;
|
|
967
|
-
content: string;
|
|
968
|
-
}, {
|
|
969
|
-
path: string;
|
|
970
|
-
content: string;
|
|
971
|
-
}>, "many">;
|
|
972
|
-
resetFileVersions: z.ZodBoolean;
|
|
973
|
-
}, {
|
|
974
|
-
usage: z.ZodOptional<z.ZodNumber>;
|
|
975
|
-
remainingBalance: z.ZodOptional<z.ZodNumber>;
|
|
976
|
-
balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin" | "organization")[]]>, z.ZodNumber>>>;
|
|
977
|
-
next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
978
|
-
autoTopupAdded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
979
|
-
}>, "strip", z.ZodTypeAny, {
|
|
980
|
-
type: "response-complete";
|
|
981
|
-
userInputId: string;
|
|
982
|
-
response: string;
|
|
983
|
-
changes: {
|
|
984
|
-
path: string;
|
|
985
|
-
type: "patch" | "file";
|
|
986
|
-
content: string;
|
|
987
|
-
}[];
|
|
988
|
-
changesAlreadyApplied: {
|
|
989
|
-
path: string;
|
|
990
|
-
type: "patch" | "file";
|
|
991
|
-
content: string;
|
|
992
|
-
}[];
|
|
993
|
-
addedFileVersions: {
|
|
994
|
-
path: string;
|
|
995
|
-
content: string;
|
|
996
|
-
}[];
|
|
997
|
-
resetFileVersions: boolean;
|
|
998
|
-
usage?: number | undefined;
|
|
999
|
-
remainingBalance?: number | undefined;
|
|
1000
|
-
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
1001
|
-
next_quota_reset?: Date | null | undefined;
|
|
1002
|
-
autoTopupAdded?: number | undefined;
|
|
1003
|
-
}, {
|
|
1004
|
-
type: "response-complete";
|
|
1005
|
-
userInputId: string;
|
|
1006
|
-
response: string;
|
|
1007
|
-
changes: {
|
|
1008
|
-
path: string;
|
|
1009
|
-
type: "patch" | "file";
|
|
1010
|
-
content: string;
|
|
1011
|
-
}[];
|
|
1012
|
-
changesAlreadyApplied: {
|
|
1013
|
-
path: string;
|
|
1014
|
-
type: "patch" | "file";
|
|
1015
|
-
content: string;
|
|
1016
|
-
}[];
|
|
1017
|
-
addedFileVersions: {
|
|
1018
|
-
path: string;
|
|
1019
|
-
content: string;
|
|
1020
|
-
}[];
|
|
1021
|
-
resetFileVersions: boolean;
|
|
1022
|
-
usage?: number | undefined;
|
|
1023
|
-
remainingBalance?: number | undefined;
|
|
1024
|
-
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
1025
|
-
next_quota_reset?: Date | null | undefined;
|
|
1026
|
-
autoTopupAdded?: number | undefined;
|
|
1027
|
-
}>;
|
|
1028
|
-
export declare const MessageCostResponseSchema: z.ZodObject<{
|
|
1029
|
-
type: z.ZodLiteral<"message-cost-response">;
|
|
1030
|
-
promptId: z.ZodString;
|
|
1031
|
-
credits: z.ZodNumber;
|
|
1032
|
-
}, "strip", z.ZodTypeAny, {
|
|
1033
|
-
type: "message-cost-response";
|
|
1034
|
-
promptId: string;
|
|
1035
|
-
credits: number;
|
|
1036
|
-
}, {
|
|
1037
|
-
type: "message-cost-response";
|
|
1038
|
-
promptId: string;
|
|
1039
|
-
credits: number;
|
|
1040
|
-
}>;
|
|
1041
|
-
export type MessageCostResponse = z.infer<typeof MessageCostResponseSchema>;
|
|
1042
|
-
export declare const PromptResponseSchema: z.ZodObject<{
|
|
1043
|
-
type: z.ZodLiteral<"prompt-response">;
|
|
1044
|
-
promptId: z.ZodString;
|
|
1045
|
-
agentState: z.ZodObject<{
|
|
1046
|
-
agentContext: z.ZodString;
|
|
1047
|
-
fileContext: z.ZodObject<{
|
|
1048
|
-
currentWorkingDirectory: z.ZodString;
|
|
1049
|
-
fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
|
|
1050
|
-
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1051
|
-
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
1052
|
-
knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1053
|
-
userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1054
|
-
gitChanges: z.ZodObject<{
|
|
1055
|
-
status: z.ZodString;
|
|
1056
|
-
diff: z.ZodString;
|
|
1057
|
-
diffCached: z.ZodString;
|
|
1058
|
-
lastCommitMessages: z.ZodString;
|
|
1059
|
-
}, "strip", z.ZodTypeAny, {
|
|
1060
|
-
status: string;
|
|
1061
|
-
diff: string;
|
|
1062
|
-
diffCached: string;
|
|
1063
|
-
lastCommitMessages: string;
|
|
1064
|
-
}, {
|
|
1065
|
-
status: string;
|
|
1066
|
-
diff: string;
|
|
1067
|
-
diffCached: string;
|
|
1068
|
-
lastCommitMessages: string;
|
|
1069
|
-
}>;
|
|
1070
|
-
changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1071
|
-
shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1072
|
-
systemInfo: z.ZodObject<{
|
|
1073
|
-
platform: z.ZodString;
|
|
1074
|
-
shell: z.ZodString;
|
|
1075
|
-
nodeVersion: z.ZodString;
|
|
1076
|
-
arch: z.ZodString;
|
|
1077
|
-
homedir: z.ZodString;
|
|
1078
|
-
cpus: z.ZodNumber;
|
|
1079
|
-
}, "strip", z.ZodTypeAny, {
|
|
1080
|
-
platform: string;
|
|
1081
|
-
shell: string;
|
|
1082
|
-
nodeVersion: string;
|
|
1083
|
-
arch: string;
|
|
1084
|
-
homedir: string;
|
|
1085
|
-
cpus: number;
|
|
1086
|
-
}, {
|
|
1087
|
-
platform: string;
|
|
1088
|
-
shell: string;
|
|
1089
|
-
nodeVersion: string;
|
|
1090
|
-
arch: string;
|
|
1091
|
-
homedir: string;
|
|
1092
|
-
cpus: number;
|
|
1093
|
-
}>;
|
|
1094
|
-
fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
1095
|
-
path: z.ZodString;
|
|
1096
|
-
content: z.ZodString;
|
|
1097
|
-
}, "strip", z.ZodTypeAny, {
|
|
1098
|
-
path: string;
|
|
1099
|
-
content: string;
|
|
1100
|
-
}, {
|
|
1101
|
-
path: string;
|
|
1102
|
-
content: string;
|
|
1103
|
-
}>, "many">, "many">>;
|
|
1104
|
-
}, "strip", z.ZodTypeAny, {
|
|
1105
|
-
currentWorkingDirectory: string;
|
|
1106
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
1107
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1108
|
-
knowledgeFiles: Record<string, string>;
|
|
1109
|
-
gitChanges: {
|
|
1110
|
-
status: string;
|
|
1111
|
-
diff: string;
|
|
1112
|
-
diffCached: string;
|
|
1113
|
-
lastCommitMessages: string;
|
|
1114
|
-
};
|
|
1115
|
-
changesSinceLastChat: Record<string, string>;
|
|
1116
|
-
shellConfigFiles: Record<string, string>;
|
|
1117
|
-
systemInfo: {
|
|
1118
|
-
platform: string;
|
|
1119
|
-
shell: string;
|
|
1120
|
-
nodeVersion: string;
|
|
1121
|
-
arch: string;
|
|
1122
|
-
homedir: string;
|
|
1123
|
-
cpus: number;
|
|
1124
|
-
};
|
|
1125
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
1126
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1127
|
-
fileVersions?: {
|
|
1128
|
-
path: string;
|
|
1129
|
-
content: string;
|
|
1130
|
-
}[][] | undefined;
|
|
1131
|
-
}, {
|
|
1132
|
-
currentWorkingDirectory: string;
|
|
1133
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
1134
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1135
|
-
knowledgeFiles: Record<string, string>;
|
|
1136
|
-
gitChanges: {
|
|
1137
|
-
status: string;
|
|
1138
|
-
diff: string;
|
|
1139
|
-
diffCached: string;
|
|
1140
|
-
lastCommitMessages: string;
|
|
1141
|
-
};
|
|
1142
|
-
changesSinceLastChat: Record<string, string>;
|
|
1143
|
-
shellConfigFiles: Record<string, string>;
|
|
1144
|
-
systemInfo: {
|
|
1145
|
-
platform: string;
|
|
1146
|
-
shell: string;
|
|
1147
|
-
nodeVersion: string;
|
|
1148
|
-
arch: string;
|
|
1149
|
-
homedir: string;
|
|
1150
|
-
cpus: number;
|
|
1151
|
-
};
|
|
1152
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
1153
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1154
|
-
fileVersions?: {
|
|
1155
|
-
path: string;
|
|
1156
|
-
content: string;
|
|
1157
|
-
}[][] | undefined;
|
|
1158
|
-
}>;
|
|
1159
|
-
messageHistory: z.ZodArray<z.ZodIntersection<z.ZodType<import("ai").CoreMessage, z.ZodTypeDef, import("ai").CoreMessage>, z.ZodObject<{
|
|
1160
|
-
timeToLive: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"agentStep">, z.ZodLiteral<"userPrompt">]>>;
|
|
1161
|
-
}, "strip", z.ZodTypeAny, {
|
|
1162
|
-
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1163
|
-
}, {
|
|
1164
|
-
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1165
|
-
}>>, "many">;
|
|
1166
|
-
agentStepsRemaining: z.ZodNumber;
|
|
1167
|
-
}, "strip", z.ZodTypeAny, {
|
|
1168
|
-
agentContext: string;
|
|
1169
|
-
fileContext: {
|
|
1170
|
-
currentWorkingDirectory: string;
|
|
1171
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
1172
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1173
|
-
knowledgeFiles: Record<string, string>;
|
|
1174
|
-
gitChanges: {
|
|
1175
|
-
status: string;
|
|
1176
|
-
diff: string;
|
|
1177
|
-
diffCached: string;
|
|
1178
|
-
lastCommitMessages: string;
|
|
1179
|
-
};
|
|
1180
|
-
changesSinceLastChat: Record<string, string>;
|
|
1181
|
-
shellConfigFiles: Record<string, string>;
|
|
1182
|
-
systemInfo: {
|
|
1183
|
-
platform: string;
|
|
1184
|
-
shell: string;
|
|
1185
|
-
nodeVersion: string;
|
|
1186
|
-
arch: string;
|
|
1187
|
-
homedir: string;
|
|
1188
|
-
cpus: number;
|
|
1189
|
-
};
|
|
1190
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
1191
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1192
|
-
fileVersions?: {
|
|
1193
|
-
path: string;
|
|
1194
|
-
content: string;
|
|
1195
|
-
}[][] | undefined;
|
|
1196
|
-
};
|
|
1197
|
-
messageHistory: (import("ai").CoreMessage & {
|
|
1198
|
-
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1199
|
-
})[];
|
|
1200
|
-
agentStepsRemaining: number;
|
|
1201
|
-
}, {
|
|
1202
|
-
agentContext: string;
|
|
1203
|
-
fileContext: {
|
|
1204
|
-
currentWorkingDirectory: string;
|
|
1205
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
1206
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1207
|
-
knowledgeFiles: Record<string, string>;
|
|
1208
|
-
gitChanges: {
|
|
1209
|
-
status: string;
|
|
1210
|
-
diff: string;
|
|
1211
|
-
diffCached: string;
|
|
1212
|
-
lastCommitMessages: string;
|
|
1213
|
-
};
|
|
1214
|
-
changesSinceLastChat: Record<string, string>;
|
|
1215
|
-
shellConfigFiles: Record<string, string>;
|
|
1216
|
-
systemInfo: {
|
|
1217
|
-
platform: string;
|
|
1218
|
-
shell: string;
|
|
1219
|
-
nodeVersion: string;
|
|
1220
|
-
arch: string;
|
|
1221
|
-
homedir: string;
|
|
1222
|
-
cpus: number;
|
|
1223
|
-
};
|
|
1224
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
1225
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1226
|
-
fileVersions?: {
|
|
1227
|
-
path: string;
|
|
1228
|
-
content: string;
|
|
1229
|
-
}[][] | undefined;
|
|
1230
|
-
};
|
|
1231
|
-
messageHistory: (import("ai").CoreMessage & {
|
|
1232
|
-
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1233
|
-
})[];
|
|
1234
|
-
agentStepsRemaining: number;
|
|
1235
|
-
}>;
|
|
1236
|
-
toolCalls: z.ZodArray<z.ZodObject<{
|
|
1237
|
-
name: z.ZodString;
|
|
1238
|
-
parameters: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1239
|
-
id: z.ZodString;
|
|
1240
|
-
}, "strip", z.ZodTypeAny, {
|
|
1241
|
-
name: string;
|
|
1242
|
-
parameters: Record<string, string>;
|
|
1243
|
-
id: string;
|
|
1244
|
-
}, {
|
|
1245
|
-
name: string;
|
|
1246
|
-
parameters: Record<string, string>;
|
|
1247
|
-
id: string;
|
|
1248
|
-
}>, "many">;
|
|
1249
|
-
toolResults: z.ZodArray<z.ZodObject<{
|
|
1250
|
-
name: z.ZodString;
|
|
1251
|
-
result: z.ZodString;
|
|
1252
|
-
id: z.ZodString;
|
|
1253
|
-
}, "strip", z.ZodTypeAny, {
|
|
1254
|
-
name: string;
|
|
1255
|
-
id: string;
|
|
1256
|
-
result: string;
|
|
1257
|
-
}, {
|
|
1258
|
-
name: string;
|
|
1259
|
-
id: string;
|
|
1260
|
-
result: string;
|
|
1261
|
-
}>, "many">;
|
|
1262
|
-
}, "strip", z.ZodTypeAny, {
|
|
1263
|
-
type: "prompt-response";
|
|
1264
|
-
promptId: string;
|
|
1265
|
-
agentState: {
|
|
1266
|
-
agentContext: string;
|
|
1267
|
-
fileContext: {
|
|
1268
|
-
currentWorkingDirectory: string;
|
|
1269
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
1270
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1271
|
-
knowledgeFiles: Record<string, string>;
|
|
1272
|
-
gitChanges: {
|
|
1273
|
-
status: string;
|
|
1274
|
-
diff: string;
|
|
1275
|
-
diffCached: string;
|
|
1276
|
-
lastCommitMessages: string;
|
|
1277
|
-
};
|
|
1278
|
-
changesSinceLastChat: Record<string, string>;
|
|
1279
|
-
shellConfigFiles: Record<string, string>;
|
|
1280
|
-
systemInfo: {
|
|
1281
|
-
platform: string;
|
|
1282
|
-
shell: string;
|
|
1283
|
-
nodeVersion: string;
|
|
1284
|
-
arch: string;
|
|
1285
|
-
homedir: string;
|
|
1286
|
-
cpus: number;
|
|
1287
|
-
};
|
|
1288
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
1289
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1290
|
-
fileVersions?: {
|
|
1291
|
-
path: string;
|
|
1292
|
-
content: string;
|
|
1293
|
-
}[][] | undefined;
|
|
1294
|
-
};
|
|
1295
|
-
messageHistory: (import("ai").CoreMessage & {
|
|
1296
|
-
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1297
|
-
})[];
|
|
1298
|
-
agentStepsRemaining: number;
|
|
1299
|
-
};
|
|
1300
|
-
toolResults: {
|
|
1301
|
-
name: string;
|
|
1302
|
-
id: string;
|
|
1303
|
-
result: string;
|
|
1304
|
-
}[];
|
|
1305
|
-
toolCalls: {
|
|
1306
|
-
name: string;
|
|
1307
|
-
parameters: Record<string, string>;
|
|
1308
|
-
id: string;
|
|
1309
|
-
}[];
|
|
1310
|
-
}, {
|
|
1311
|
-
type: "prompt-response";
|
|
1312
|
-
promptId: string;
|
|
1313
|
-
agentState: {
|
|
1314
|
-
agentContext: string;
|
|
1315
|
-
fileContext: {
|
|
1316
|
-
currentWorkingDirectory: string;
|
|
1317
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
1318
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1319
|
-
knowledgeFiles: Record<string, string>;
|
|
1320
|
-
gitChanges: {
|
|
1321
|
-
status: string;
|
|
1322
|
-
diff: string;
|
|
1323
|
-
diffCached: string;
|
|
1324
|
-
lastCommitMessages: string;
|
|
1325
|
-
};
|
|
1326
|
-
changesSinceLastChat: Record<string, string>;
|
|
1327
|
-
shellConfigFiles: Record<string, string>;
|
|
1328
|
-
systemInfo: {
|
|
1329
|
-
platform: string;
|
|
1330
|
-
shell: string;
|
|
1331
|
-
nodeVersion: string;
|
|
1332
|
-
arch: string;
|
|
1333
|
-
homedir: string;
|
|
1334
|
-
cpus: number;
|
|
1335
|
-
};
|
|
1336
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
1337
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1338
|
-
fileVersions?: {
|
|
1339
|
-
path: string;
|
|
1340
|
-
content: string;
|
|
1341
|
-
}[][] | undefined;
|
|
1342
|
-
};
|
|
1343
|
-
messageHistory: (import("ai").CoreMessage & {
|
|
1344
|
-
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1345
|
-
})[];
|
|
1346
|
-
agentStepsRemaining: number;
|
|
1347
|
-
};
|
|
1348
|
-
toolResults: {
|
|
1349
|
-
name: string;
|
|
1350
|
-
id: string;
|
|
1351
|
-
result: string;
|
|
1352
|
-
}[];
|
|
1353
|
-
toolCalls: {
|
|
1354
|
-
name: string;
|
|
1355
|
-
parameters: Record<string, string>;
|
|
1356
|
-
id: string;
|
|
1357
|
-
}[];
|
|
1358
|
-
}>;
|
|
1359
|
-
export type PromptResponse = z.infer<typeof PromptResponseSchema>;
|
|
1360
|
-
export declare const ManagerPromptResponseSchema: z.ZodObject<{
|
|
1361
|
-
type: z.ZodLiteral<"manager-prompt-response">;
|
|
1362
|
-
promptId: z.ZodString;
|
|
1363
|
-
agentState: z.ZodObject<{
|
|
1364
|
-
agentContext: z.ZodString;
|
|
1365
|
-
fileContext: z.ZodObject<{
|
|
1366
|
-
currentWorkingDirectory: z.ZodString;
|
|
1367
|
-
fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
|
|
1368
|
-
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1369
|
-
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
1370
|
-
knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1371
|
-
userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1372
|
-
gitChanges: z.ZodObject<{
|
|
1373
|
-
status: z.ZodString;
|
|
1374
|
-
diff: z.ZodString;
|
|
1375
|
-
diffCached: z.ZodString;
|
|
1376
|
-
lastCommitMessages: z.ZodString;
|
|
1377
|
-
}, "strip", z.ZodTypeAny, {
|
|
1378
|
-
status: string;
|
|
1379
|
-
diff: string;
|
|
1380
|
-
diffCached: string;
|
|
1381
|
-
lastCommitMessages: string;
|
|
1382
|
-
}, {
|
|
1383
|
-
status: string;
|
|
1384
|
-
diff: string;
|
|
1385
|
-
diffCached: string;
|
|
1386
|
-
lastCommitMessages: string;
|
|
1387
|
-
}>;
|
|
1388
|
-
changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1389
|
-
shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1390
|
-
systemInfo: z.ZodObject<{
|
|
1391
|
-
platform: z.ZodString;
|
|
1392
|
-
shell: z.ZodString;
|
|
1393
|
-
nodeVersion: z.ZodString;
|
|
1394
|
-
arch: z.ZodString;
|
|
1395
|
-
homedir: z.ZodString;
|
|
1396
|
-
cpus: z.ZodNumber;
|
|
1397
|
-
}, "strip", z.ZodTypeAny, {
|
|
1398
|
-
platform: string;
|
|
1399
|
-
shell: string;
|
|
1400
|
-
nodeVersion: string;
|
|
1401
|
-
arch: string;
|
|
1402
|
-
homedir: string;
|
|
1403
|
-
cpus: number;
|
|
1404
|
-
}, {
|
|
1405
|
-
platform: string;
|
|
1406
|
-
shell: string;
|
|
1407
|
-
nodeVersion: string;
|
|
1408
|
-
arch: string;
|
|
1409
|
-
homedir: string;
|
|
1410
|
-
cpus: number;
|
|
1411
|
-
}>;
|
|
1412
|
-
fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
1413
|
-
path: z.ZodString;
|
|
1414
|
-
content: z.ZodString;
|
|
1415
|
-
}, "strip", z.ZodTypeAny, {
|
|
1416
|
-
path: string;
|
|
1417
|
-
content: string;
|
|
1418
|
-
}, {
|
|
1419
|
-
path: string;
|
|
1420
|
-
content: string;
|
|
1421
|
-
}>, "many">, "many">>;
|
|
1422
|
-
}, "strip", z.ZodTypeAny, {
|
|
1423
|
-
currentWorkingDirectory: string;
|
|
1424
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
1425
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1426
|
-
knowledgeFiles: Record<string, string>;
|
|
1427
|
-
gitChanges: {
|
|
1428
|
-
status: string;
|
|
1429
|
-
diff: string;
|
|
1430
|
-
diffCached: string;
|
|
1431
|
-
lastCommitMessages: string;
|
|
1432
|
-
};
|
|
1433
|
-
changesSinceLastChat: Record<string, string>;
|
|
1434
|
-
shellConfigFiles: Record<string, string>;
|
|
1435
|
-
systemInfo: {
|
|
1436
|
-
platform: string;
|
|
1437
|
-
shell: string;
|
|
1438
|
-
nodeVersion: string;
|
|
1439
|
-
arch: string;
|
|
1440
|
-
homedir: string;
|
|
1441
|
-
cpus: number;
|
|
1442
|
-
};
|
|
1443
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
1444
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1445
|
-
fileVersions?: {
|
|
1446
|
-
path: string;
|
|
1447
|
-
content: string;
|
|
1448
|
-
}[][] | undefined;
|
|
1449
|
-
}, {
|
|
1450
|
-
currentWorkingDirectory: string;
|
|
1451
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
1452
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1453
|
-
knowledgeFiles: Record<string, string>;
|
|
1454
|
-
gitChanges: {
|
|
1455
|
-
status: string;
|
|
1456
|
-
diff: string;
|
|
1457
|
-
diffCached: string;
|
|
1458
|
-
lastCommitMessages: string;
|
|
1459
|
-
};
|
|
1460
|
-
changesSinceLastChat: Record<string, string>;
|
|
1461
|
-
shellConfigFiles: Record<string, string>;
|
|
1462
|
-
systemInfo: {
|
|
1463
|
-
platform: string;
|
|
1464
|
-
shell: string;
|
|
1465
|
-
nodeVersion: string;
|
|
1466
|
-
arch: string;
|
|
1467
|
-
homedir: string;
|
|
1468
|
-
cpus: number;
|
|
1469
|
-
};
|
|
1470
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
1471
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1472
|
-
fileVersions?: {
|
|
1473
|
-
path: string;
|
|
1474
|
-
content: string;
|
|
1475
|
-
}[][] | undefined;
|
|
1476
|
-
}>;
|
|
1477
|
-
messageHistory: z.ZodArray<z.ZodIntersection<z.ZodType<import("ai").CoreMessage, z.ZodTypeDef, import("ai").CoreMessage>, z.ZodObject<{
|
|
1478
|
-
timeToLive: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"agentStep">, z.ZodLiteral<"userPrompt">]>>;
|
|
1479
|
-
}, "strip", z.ZodTypeAny, {
|
|
1480
|
-
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1481
|
-
}, {
|
|
1482
|
-
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1483
|
-
}>>, "many">;
|
|
1484
|
-
agentStepsRemaining: z.ZodNumber;
|
|
1485
|
-
}, "strip", z.ZodTypeAny, {
|
|
1486
|
-
agentContext: string;
|
|
1487
|
-
fileContext: {
|
|
1488
|
-
currentWorkingDirectory: string;
|
|
1489
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
1490
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1491
|
-
knowledgeFiles: Record<string, string>;
|
|
1492
|
-
gitChanges: {
|
|
1493
|
-
status: string;
|
|
1494
|
-
diff: string;
|
|
1495
|
-
diffCached: string;
|
|
1496
|
-
lastCommitMessages: string;
|
|
1497
|
-
};
|
|
1498
|
-
changesSinceLastChat: Record<string, string>;
|
|
1499
|
-
shellConfigFiles: Record<string, string>;
|
|
1500
|
-
systemInfo: {
|
|
1501
|
-
platform: string;
|
|
1502
|
-
shell: string;
|
|
1503
|
-
nodeVersion: string;
|
|
1504
|
-
arch: string;
|
|
1505
|
-
homedir: string;
|
|
1506
|
-
cpus: number;
|
|
1507
|
-
};
|
|
1508
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
1509
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1510
|
-
fileVersions?: {
|
|
1511
|
-
path: string;
|
|
1512
|
-
content: string;
|
|
1513
|
-
}[][] | undefined;
|
|
1514
|
-
};
|
|
1515
|
-
messageHistory: (import("ai").CoreMessage & {
|
|
1516
|
-
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1517
|
-
})[];
|
|
1518
|
-
agentStepsRemaining: number;
|
|
1519
|
-
}, {
|
|
1520
|
-
agentContext: string;
|
|
1521
|
-
fileContext: {
|
|
1522
|
-
currentWorkingDirectory: string;
|
|
1523
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
1524
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1525
|
-
knowledgeFiles: Record<string, string>;
|
|
1526
|
-
gitChanges: {
|
|
1527
|
-
status: string;
|
|
1528
|
-
diff: string;
|
|
1529
|
-
diffCached: string;
|
|
1530
|
-
lastCommitMessages: string;
|
|
1531
|
-
};
|
|
1532
|
-
changesSinceLastChat: Record<string, string>;
|
|
1533
|
-
shellConfigFiles: Record<string, string>;
|
|
1534
|
-
systemInfo: {
|
|
1535
|
-
platform: string;
|
|
1536
|
-
shell: string;
|
|
1537
|
-
nodeVersion: string;
|
|
1538
|
-
arch: string;
|
|
1539
|
-
homedir: string;
|
|
1540
|
-
cpus: number;
|
|
1541
|
-
};
|
|
1542
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
1543
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1544
|
-
fileVersions?: {
|
|
1545
|
-
path: string;
|
|
1546
|
-
content: string;
|
|
1547
|
-
}[][] | undefined;
|
|
1548
|
-
};
|
|
1549
|
-
messageHistory: (import("ai").CoreMessage & {
|
|
1550
|
-
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1551
|
-
})[];
|
|
1552
|
-
agentStepsRemaining: number;
|
|
1553
|
-
}>;
|
|
1554
|
-
toolCalls: z.ZodArray<z.ZodObject<{
|
|
1555
|
-
name: z.ZodString;
|
|
1556
|
-
parameters: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1557
|
-
id: z.ZodString;
|
|
1558
|
-
}, "strip", z.ZodTypeAny, {
|
|
1559
|
-
name: string;
|
|
1560
|
-
parameters: Record<string, string>;
|
|
1561
|
-
id: string;
|
|
1562
|
-
}, {
|
|
1563
|
-
name: string;
|
|
1564
|
-
parameters: Record<string, string>;
|
|
1565
|
-
id: string;
|
|
1566
|
-
}>, "many">;
|
|
1567
|
-
toolResults: z.ZodArray<z.ZodObject<{
|
|
1568
|
-
name: z.ZodString;
|
|
1569
|
-
result: z.ZodString;
|
|
1570
|
-
id: z.ZodString;
|
|
1571
|
-
}, "strip", z.ZodTypeAny, {
|
|
1572
|
-
name: string;
|
|
1573
|
-
id: string;
|
|
1574
|
-
result: string;
|
|
1575
|
-
}, {
|
|
1576
|
-
name: string;
|
|
1577
|
-
id: string;
|
|
1578
|
-
result: string;
|
|
1579
|
-
}>, "many">;
|
|
1580
|
-
}, "strip", z.ZodTypeAny, {
|
|
1581
|
-
type: "manager-prompt-response";
|
|
1582
|
-
promptId: string;
|
|
1583
|
-
agentState: {
|
|
1584
|
-
agentContext: string;
|
|
1585
|
-
fileContext: {
|
|
1586
|
-
currentWorkingDirectory: string;
|
|
1587
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
1588
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1589
|
-
knowledgeFiles: Record<string, string>;
|
|
1590
|
-
gitChanges: {
|
|
1591
|
-
status: string;
|
|
1592
|
-
diff: string;
|
|
1593
|
-
diffCached: string;
|
|
1594
|
-
lastCommitMessages: string;
|
|
1595
|
-
};
|
|
1596
|
-
changesSinceLastChat: Record<string, string>;
|
|
1597
|
-
shellConfigFiles: Record<string, string>;
|
|
1598
|
-
systemInfo: {
|
|
1599
|
-
platform: string;
|
|
1600
|
-
shell: string;
|
|
1601
|
-
nodeVersion: string;
|
|
1602
|
-
arch: string;
|
|
1603
|
-
homedir: string;
|
|
1604
|
-
cpus: number;
|
|
1605
|
-
};
|
|
1606
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
1607
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1608
|
-
fileVersions?: {
|
|
1609
|
-
path: string;
|
|
1610
|
-
content: string;
|
|
1611
|
-
}[][] | undefined;
|
|
1612
|
-
};
|
|
1613
|
-
messageHistory: (import("ai").CoreMessage & {
|
|
1614
|
-
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1615
|
-
})[];
|
|
1616
|
-
agentStepsRemaining: number;
|
|
1617
|
-
};
|
|
1618
|
-
toolResults: {
|
|
1619
|
-
name: string;
|
|
1620
|
-
id: string;
|
|
1621
|
-
result: string;
|
|
1622
|
-
}[];
|
|
1623
|
-
toolCalls: {
|
|
1624
|
-
name: string;
|
|
1625
|
-
parameters: Record<string, string>;
|
|
1626
|
-
id: string;
|
|
1627
|
-
}[];
|
|
1628
|
-
}, {
|
|
1629
|
-
type: "manager-prompt-response";
|
|
1630
|
-
promptId: string;
|
|
1631
|
-
agentState: {
|
|
1632
|
-
agentContext: string;
|
|
1633
|
-
fileContext: {
|
|
1634
|
-
currentWorkingDirectory: string;
|
|
1635
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
1636
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
1637
|
-
knowledgeFiles: Record<string, string>;
|
|
1638
|
-
gitChanges: {
|
|
1639
|
-
status: string;
|
|
1640
|
-
diff: string;
|
|
1641
|
-
diffCached: string;
|
|
1642
|
-
lastCommitMessages: string;
|
|
1643
|
-
};
|
|
1644
|
-
changesSinceLastChat: Record<string, string>;
|
|
1645
|
-
shellConfigFiles: Record<string, string>;
|
|
1646
|
-
systemInfo: {
|
|
1647
|
-
platform: string;
|
|
1648
|
-
shell: string;
|
|
1649
|
-
nodeVersion: string;
|
|
1650
|
-
arch: string;
|
|
1651
|
-
homedir: string;
|
|
1652
|
-
cpus: number;
|
|
1653
|
-
};
|
|
1654
|
-
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
1655
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1656
|
-
fileVersions?: {
|
|
1657
|
-
path: string;
|
|
1658
|
-
content: string;
|
|
1659
|
-
}[][] | undefined;
|
|
537
|
+
cpus: number;
|
|
1660
538
|
};
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
539
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
540
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
541
|
+
fileVersions?: {
|
|
542
|
+
path: string;
|
|
543
|
+
content: string;
|
|
544
|
+
}[][] | undefined;
|
|
1665
545
|
};
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
546
|
+
fingerprintId: string;
|
|
547
|
+
authToken?: string | undefined;
|
|
548
|
+
repoUrl?: string | undefined;
|
|
549
|
+
}, {
|
|
550
|
+
type: "init";
|
|
551
|
+
fileContext: {
|
|
552
|
+
projectRoot: string;
|
|
553
|
+
cwd: string;
|
|
554
|
+
fileTree: import("./util/file").FileTreeNode[];
|
|
555
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
556
|
+
knowledgeFiles: Record<string, string>;
|
|
557
|
+
gitChanges: {
|
|
558
|
+
status: string;
|
|
559
|
+
diff: string;
|
|
560
|
+
diffCached: string;
|
|
561
|
+
lastCommitMessages: string;
|
|
562
|
+
};
|
|
563
|
+
changesSinceLastChat: Record<string, string>;
|
|
564
|
+
shellConfigFiles: Record<string, string>;
|
|
565
|
+
systemInfo: {
|
|
566
|
+
platform: string;
|
|
567
|
+
shell: string;
|
|
568
|
+
nodeVersion: string;
|
|
569
|
+
arch: string;
|
|
570
|
+
homedir: string;
|
|
571
|
+
cpus: number;
|
|
572
|
+
};
|
|
573
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
574
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
575
|
+
fileVersions?: {
|
|
576
|
+
path: string;
|
|
577
|
+
content: string;
|
|
578
|
+
}[][] | undefined;
|
|
579
|
+
};
|
|
580
|
+
fingerprintId: string;
|
|
581
|
+
authToken?: string | undefined;
|
|
582
|
+
repoUrl?: string | undefined;
|
|
583
|
+
}>, z.ZodObject<{
|
|
584
|
+
type: z.ZodLiteral<"generate-commit-message">;
|
|
585
|
+
fingerprintId: z.ZodString;
|
|
586
|
+
authToken: z.ZodOptional<z.ZodString>;
|
|
587
|
+
stagedChanges: z.ZodString;
|
|
1682
588
|
}, "strip", z.ZodTypeAny, {
|
|
1683
|
-
type: "
|
|
1684
|
-
|
|
1685
|
-
|
|
589
|
+
type: "generate-commit-message";
|
|
590
|
+
fingerprintId: string;
|
|
591
|
+
stagedChanges: string;
|
|
592
|
+
authToken?: string | undefined;
|
|
1686
593
|
}, {
|
|
1687
|
-
type: "
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
594
|
+
type: "generate-commit-message";
|
|
595
|
+
fingerprintId: string;
|
|
596
|
+
stagedChanges: string;
|
|
597
|
+
authToken?: string | undefined;
|
|
598
|
+
}>]>;
|
|
599
|
+
export type ClientAction = z.infer<typeof CLIENT_ACTION_SCHEMA>;
|
|
600
|
+
export declare const UsageReponseSchema: z.ZodObject<{
|
|
601
|
+
type: z.ZodLiteral<"usage-response">;
|
|
602
|
+
usage: z.ZodNumber;
|
|
603
|
+
remainingBalance: z.ZodNumber;
|
|
604
|
+
balanceBreakdown: z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin" | "organization")[]]>, z.ZodNumber>>;
|
|
605
|
+
next_quota_reset: z.ZodNullable<z.ZodDate>;
|
|
606
|
+
autoTopupAdded: z.ZodOptional<z.ZodNumber>;
|
|
607
|
+
}, "strip", z.ZodTypeAny, {
|
|
608
|
+
type: "usage-response";
|
|
609
|
+
usage: number;
|
|
610
|
+
remainingBalance: number;
|
|
611
|
+
next_quota_reset: Date | null;
|
|
612
|
+
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
613
|
+
autoTopupAdded?: number | undefined;
|
|
614
|
+
}, {
|
|
615
|
+
type: "usage-response";
|
|
616
|
+
usage: number;
|
|
617
|
+
remainingBalance: number;
|
|
618
|
+
next_quota_reset: Date | null;
|
|
619
|
+
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
620
|
+
autoTopupAdded?: number | undefined;
|
|
621
|
+
}>;
|
|
622
|
+
export type UsageResponse = z.infer<typeof UsageReponseSchema>;
|
|
623
|
+
export declare const InitResponseSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
624
|
+
type: z.ZodLiteral<"init-response">;
|
|
625
|
+
}, Omit<{
|
|
626
|
+
type: z.ZodLiteral<"usage-response">;
|
|
627
|
+
usage: z.ZodNumber;
|
|
628
|
+
remainingBalance: z.ZodNumber;
|
|
629
|
+
balanceBreakdown: z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin" | "organization")[]]>, z.ZodNumber>>;
|
|
630
|
+
next_quota_reset: z.ZodNullable<z.ZodDate>;
|
|
631
|
+
autoTopupAdded: z.ZodOptional<z.ZodNumber>;
|
|
632
|
+
}, "type">>, "strip", z.ZodTypeAny, {
|
|
633
|
+
type: "init-response";
|
|
634
|
+
usage: number;
|
|
635
|
+
remainingBalance: number;
|
|
636
|
+
next_quota_reset: Date | null;
|
|
637
|
+
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
638
|
+
autoTopupAdded?: number | undefined;
|
|
639
|
+
}, {
|
|
640
|
+
type: "init-response";
|
|
641
|
+
usage: number;
|
|
642
|
+
remainingBalance: number;
|
|
643
|
+
next_quota_reset: Date | null;
|
|
644
|
+
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
645
|
+
autoTopupAdded?: number | undefined;
|
|
646
|
+
}>;
|
|
647
|
+
export type InitResponse = z.infer<typeof InitResponseSchema>;
|
|
648
|
+
export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
1691
649
|
type: z.ZodLiteral<"response-complete">;
|
|
1692
650
|
userInputId: z.ZodString;
|
|
1693
651
|
response: z.ZodString;
|
|
@@ -1782,13 +740,29 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1782
740
|
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
1783
741
|
next_quota_reset?: Date | null | undefined;
|
|
1784
742
|
autoTopupAdded?: number | undefined;
|
|
1785
|
-
}
|
|
743
|
+
}>;
|
|
744
|
+
export declare const MessageCostResponseSchema: z.ZodObject<{
|
|
745
|
+
type: z.ZodLiteral<"message-cost-response">;
|
|
746
|
+
promptId: z.ZodString;
|
|
747
|
+
credits: z.ZodNumber;
|
|
748
|
+
}, "strip", z.ZodTypeAny, {
|
|
749
|
+
type: "message-cost-response";
|
|
750
|
+
promptId: string;
|
|
751
|
+
credits: number;
|
|
752
|
+
}, {
|
|
753
|
+
type: "message-cost-response";
|
|
754
|
+
promptId: string;
|
|
755
|
+
credits: number;
|
|
756
|
+
}>;
|
|
757
|
+
export type MessageCostResponse = z.infer<typeof MessageCostResponseSchema>;
|
|
758
|
+
export declare const PromptResponseSchema: z.ZodObject<{
|
|
1786
759
|
type: z.ZodLiteral<"prompt-response">;
|
|
1787
760
|
promptId: z.ZodString;
|
|
1788
761
|
agentState: z.ZodObject<{
|
|
1789
762
|
agentContext: z.ZodString;
|
|
1790
763
|
fileContext: z.ZodObject<{
|
|
1791
|
-
|
|
764
|
+
projectRoot: z.ZodString;
|
|
765
|
+
cwd: z.ZodString;
|
|
1792
766
|
fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
|
|
1793
767
|
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1794
768
|
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
@@ -1845,7 +819,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1845
819
|
content: string;
|
|
1846
820
|
}>, "many">, "many">>;
|
|
1847
821
|
}, "strip", z.ZodTypeAny, {
|
|
1848
|
-
|
|
822
|
+
projectRoot: string;
|
|
823
|
+
cwd: string;
|
|
1849
824
|
fileTree: import("./util/file").FileTreeNode[];
|
|
1850
825
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1851
826
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1872,7 +847,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1872
847
|
content: string;
|
|
1873
848
|
}[][] | undefined;
|
|
1874
849
|
}, {
|
|
1875
|
-
|
|
850
|
+
projectRoot: string;
|
|
851
|
+
cwd: string;
|
|
1876
852
|
fileTree: import("./util/file").FileTreeNode[];
|
|
1877
853
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1878
854
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1906,11 +882,23 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1906
882
|
}, {
|
|
1907
883
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1908
884
|
}>>, "many">;
|
|
885
|
+
agents: z.ZodDefault<z.ZodArray<z.ZodType<{
|
|
886
|
+
agentId: string;
|
|
887
|
+
agentName: import("./types/agent-state").AgentTemplateName;
|
|
888
|
+
agents: import("./types/agent-state").SubagentState[];
|
|
889
|
+
messageHistory: import("./types/message").CodebuffMessage[];
|
|
890
|
+
}, z.ZodTypeDef, {
|
|
891
|
+
agentId: string;
|
|
892
|
+
agentName: import("./types/agent-state").AgentTemplateName;
|
|
893
|
+
agents: import("./types/agent-state").SubagentState[];
|
|
894
|
+
messageHistory: import("./types/message").CodebuffMessage[];
|
|
895
|
+
}>, "many">>;
|
|
1909
896
|
agentStepsRemaining: z.ZodNumber;
|
|
1910
897
|
}, "strip", z.ZodTypeAny, {
|
|
1911
898
|
agentContext: string;
|
|
1912
899
|
fileContext: {
|
|
1913
|
-
|
|
900
|
+
projectRoot: string;
|
|
901
|
+
cwd: string;
|
|
1914
902
|
fileTree: import("./util/file").FileTreeNode[];
|
|
1915
903
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1916
904
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1940,11 +928,18 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1940
928
|
messageHistory: (import("ai").CoreMessage & {
|
|
1941
929
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1942
930
|
})[];
|
|
931
|
+
agents: {
|
|
932
|
+
agentId: string;
|
|
933
|
+
agentName: import("./types/agent-state").AgentTemplateName;
|
|
934
|
+
agents: import("./types/agent-state").SubagentState[];
|
|
935
|
+
messageHistory: import("./types/message").CodebuffMessage[];
|
|
936
|
+
}[];
|
|
1943
937
|
agentStepsRemaining: number;
|
|
1944
938
|
}, {
|
|
1945
939
|
agentContext: string;
|
|
1946
940
|
fileContext: {
|
|
1947
|
-
|
|
941
|
+
projectRoot: string;
|
|
942
|
+
cwd: string;
|
|
1948
943
|
fileTree: import("./util/file").FileTreeNode[];
|
|
1949
944
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1950
945
|
knowledgeFiles: Record<string, string>;
|
|
@@ -1975,31 +970,37 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1975
970
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
1976
971
|
})[];
|
|
1977
972
|
agentStepsRemaining: number;
|
|
973
|
+
agents?: {
|
|
974
|
+
agentId: string;
|
|
975
|
+
agentName: import("./types/agent-state").AgentTemplateName;
|
|
976
|
+
agents: import("./types/agent-state").SubagentState[];
|
|
977
|
+
messageHistory: import("./types/message").CodebuffMessage[];
|
|
978
|
+
}[] | undefined;
|
|
1978
979
|
}>;
|
|
1979
980
|
toolCalls: z.ZodArray<z.ZodObject<{
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
981
|
+
toolName: z.ZodString;
|
|
982
|
+
args: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
983
|
+
toolCallId: z.ZodString;
|
|
1983
984
|
}, "strip", z.ZodTypeAny, {
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
985
|
+
toolName: string;
|
|
986
|
+
args: Record<string, string>;
|
|
987
|
+
toolCallId: string;
|
|
1987
988
|
}, {
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
989
|
+
toolName: string;
|
|
990
|
+
args: Record<string, string>;
|
|
991
|
+
toolCallId: string;
|
|
1991
992
|
}>, "many">;
|
|
1992
993
|
toolResults: z.ZodArray<z.ZodObject<{
|
|
1993
|
-
|
|
994
|
+
toolName: z.ZodString;
|
|
995
|
+
toolCallId: z.ZodString;
|
|
1994
996
|
result: z.ZodString;
|
|
1995
|
-
id: z.ZodString;
|
|
1996
997
|
}, "strip", z.ZodTypeAny, {
|
|
1997
|
-
|
|
1998
|
-
|
|
998
|
+
toolName: string;
|
|
999
|
+
toolCallId: string;
|
|
1999
1000
|
result: string;
|
|
2000
1001
|
}, {
|
|
2001
|
-
|
|
2002
|
-
|
|
1002
|
+
toolName: string;
|
|
1003
|
+
toolCallId: string;
|
|
2003
1004
|
result: string;
|
|
2004
1005
|
}>, "many">;
|
|
2005
1006
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -2008,7 +1009,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2008
1009
|
agentState: {
|
|
2009
1010
|
agentContext: string;
|
|
2010
1011
|
fileContext: {
|
|
2011
|
-
|
|
1012
|
+
projectRoot: string;
|
|
1013
|
+
cwd: string;
|
|
2012
1014
|
fileTree: import("./util/file").FileTreeNode[];
|
|
2013
1015
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2014
1016
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2038,17 +1040,23 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2038
1040
|
messageHistory: (import("ai").CoreMessage & {
|
|
2039
1041
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
2040
1042
|
})[];
|
|
1043
|
+
agents: {
|
|
1044
|
+
agentId: string;
|
|
1045
|
+
agentName: import("./types/agent-state").AgentTemplateName;
|
|
1046
|
+
agents: import("./types/agent-state").SubagentState[];
|
|
1047
|
+
messageHistory: import("./types/message").CodebuffMessage[];
|
|
1048
|
+
}[];
|
|
2041
1049
|
agentStepsRemaining: number;
|
|
2042
1050
|
};
|
|
2043
1051
|
toolResults: {
|
|
2044
|
-
|
|
2045
|
-
|
|
1052
|
+
toolName: string;
|
|
1053
|
+
toolCallId: string;
|
|
2046
1054
|
result: string;
|
|
2047
1055
|
}[];
|
|
2048
1056
|
toolCalls: {
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
1057
|
+
toolName: string;
|
|
1058
|
+
args: Record<string, string>;
|
|
1059
|
+
toolCallId: string;
|
|
2052
1060
|
}[];
|
|
2053
1061
|
}, {
|
|
2054
1062
|
type: "prompt-response";
|
|
@@ -2056,7 +1064,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2056
1064
|
agentState: {
|
|
2057
1065
|
agentContext: string;
|
|
2058
1066
|
fileContext: {
|
|
2059
|
-
|
|
1067
|
+
projectRoot: string;
|
|
1068
|
+
cwd: string;
|
|
2060
1069
|
fileTree: import("./util/file").FileTreeNode[];
|
|
2061
1070
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2062
1071
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2087,24 +1096,140 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2087
1096
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
2088
1097
|
})[];
|
|
2089
1098
|
agentStepsRemaining: number;
|
|
1099
|
+
agents?: {
|
|
1100
|
+
agentId: string;
|
|
1101
|
+
agentName: import("./types/agent-state").AgentTemplateName;
|
|
1102
|
+
agents: import("./types/agent-state").SubagentState[];
|
|
1103
|
+
messageHistory: import("./types/message").CodebuffMessage[];
|
|
1104
|
+
}[] | undefined;
|
|
2090
1105
|
};
|
|
2091
1106
|
toolResults: {
|
|
2092
|
-
|
|
2093
|
-
|
|
1107
|
+
toolName: string;
|
|
1108
|
+
toolCallId: string;
|
|
2094
1109
|
result: string;
|
|
2095
1110
|
}[];
|
|
2096
1111
|
toolCalls: {
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
1112
|
+
toolName: string;
|
|
1113
|
+
args: Record<string, string>;
|
|
1114
|
+
toolCallId: string;
|
|
1115
|
+
}[];
|
|
1116
|
+
}>;
|
|
1117
|
+
export type PromptResponse = z.infer<typeof PromptResponseSchema>;
|
|
1118
|
+
export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1119
|
+
type: z.ZodLiteral<"response-chunk">;
|
|
1120
|
+
userInputId: z.ZodString;
|
|
1121
|
+
chunk: z.ZodString;
|
|
1122
|
+
}, "strip", z.ZodTypeAny, {
|
|
1123
|
+
type: "response-chunk";
|
|
1124
|
+
userInputId: string;
|
|
1125
|
+
chunk: string;
|
|
1126
|
+
}, {
|
|
1127
|
+
type: "response-chunk";
|
|
1128
|
+
userInputId: string;
|
|
1129
|
+
chunk: string;
|
|
1130
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
1131
|
+
type: z.ZodLiteral<"response-complete">;
|
|
1132
|
+
userInputId: z.ZodString;
|
|
1133
|
+
response: z.ZodString;
|
|
1134
|
+
changes: z.ZodArray<z.ZodObject<{
|
|
1135
|
+
type: z.ZodEnum<["patch", "file"]>;
|
|
1136
|
+
path: z.ZodString;
|
|
1137
|
+
content: z.ZodString;
|
|
1138
|
+
}, "strip", z.ZodTypeAny, {
|
|
1139
|
+
path: string;
|
|
1140
|
+
type: "patch" | "file";
|
|
1141
|
+
content: string;
|
|
1142
|
+
}, {
|
|
1143
|
+
path: string;
|
|
1144
|
+
type: "patch" | "file";
|
|
1145
|
+
content: string;
|
|
1146
|
+
}>, "many">;
|
|
1147
|
+
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
1148
|
+
type: z.ZodEnum<["patch", "file"]>;
|
|
1149
|
+
path: z.ZodString;
|
|
1150
|
+
content: z.ZodString;
|
|
1151
|
+
}, "strip", z.ZodTypeAny, {
|
|
1152
|
+
path: string;
|
|
1153
|
+
type: "patch" | "file";
|
|
1154
|
+
content: string;
|
|
1155
|
+
}, {
|
|
1156
|
+
path: string;
|
|
1157
|
+
type: "patch" | "file";
|
|
1158
|
+
content: string;
|
|
1159
|
+
}>, "many">;
|
|
1160
|
+
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
1161
|
+
path: z.ZodString;
|
|
1162
|
+
content: z.ZodString;
|
|
1163
|
+
}, "strip", z.ZodTypeAny, {
|
|
1164
|
+
path: string;
|
|
1165
|
+
content: string;
|
|
1166
|
+
}, {
|
|
1167
|
+
path: string;
|
|
1168
|
+
content: string;
|
|
1169
|
+
}>, "many">;
|
|
1170
|
+
resetFileVersions: z.ZodBoolean;
|
|
1171
|
+
}, {
|
|
1172
|
+
usage: z.ZodOptional<z.ZodNumber>;
|
|
1173
|
+
remainingBalance: z.ZodOptional<z.ZodNumber>;
|
|
1174
|
+
balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin" | "organization")[]]>, z.ZodNumber>>>;
|
|
1175
|
+
next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
1176
|
+
autoTopupAdded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
1177
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1178
|
+
type: "response-complete";
|
|
1179
|
+
userInputId: string;
|
|
1180
|
+
response: string;
|
|
1181
|
+
changes: {
|
|
1182
|
+
path: string;
|
|
1183
|
+
type: "patch" | "file";
|
|
1184
|
+
content: string;
|
|
1185
|
+
}[];
|
|
1186
|
+
changesAlreadyApplied: {
|
|
1187
|
+
path: string;
|
|
1188
|
+
type: "patch" | "file";
|
|
1189
|
+
content: string;
|
|
1190
|
+
}[];
|
|
1191
|
+
addedFileVersions: {
|
|
1192
|
+
path: string;
|
|
1193
|
+
content: string;
|
|
1194
|
+
}[];
|
|
1195
|
+
resetFileVersions: boolean;
|
|
1196
|
+
usage?: number | undefined;
|
|
1197
|
+
remainingBalance?: number | undefined;
|
|
1198
|
+
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
1199
|
+
next_quota_reset?: Date | null | undefined;
|
|
1200
|
+
autoTopupAdded?: number | undefined;
|
|
1201
|
+
}, {
|
|
1202
|
+
type: "response-complete";
|
|
1203
|
+
userInputId: string;
|
|
1204
|
+
response: string;
|
|
1205
|
+
changes: {
|
|
1206
|
+
path: string;
|
|
1207
|
+
type: "patch" | "file";
|
|
1208
|
+
content: string;
|
|
1209
|
+
}[];
|
|
1210
|
+
changesAlreadyApplied: {
|
|
1211
|
+
path: string;
|
|
1212
|
+
type: "patch" | "file";
|
|
1213
|
+
content: string;
|
|
1214
|
+
}[];
|
|
1215
|
+
addedFileVersions: {
|
|
1216
|
+
path: string;
|
|
1217
|
+
content: string;
|
|
2100
1218
|
}[];
|
|
1219
|
+
resetFileVersions: boolean;
|
|
1220
|
+
usage?: number | undefined;
|
|
1221
|
+
remainingBalance?: number | undefined;
|
|
1222
|
+
balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
|
|
1223
|
+
next_quota_reset?: Date | null | undefined;
|
|
1224
|
+
autoTopupAdded?: number | undefined;
|
|
2101
1225
|
}>, z.ZodObject<{
|
|
2102
|
-
type: z.ZodLiteral<"
|
|
1226
|
+
type: z.ZodLiteral<"prompt-response">;
|
|
2103
1227
|
promptId: z.ZodString;
|
|
2104
1228
|
agentState: z.ZodObject<{
|
|
2105
1229
|
agentContext: z.ZodString;
|
|
2106
1230
|
fileContext: z.ZodObject<{
|
|
2107
|
-
|
|
1231
|
+
projectRoot: z.ZodString;
|
|
1232
|
+
cwd: z.ZodString;
|
|
2108
1233
|
fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
|
|
2109
1234
|
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
2110
1235
|
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
@@ -2161,7 +1286,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2161
1286
|
content: string;
|
|
2162
1287
|
}>, "many">, "many">>;
|
|
2163
1288
|
}, "strip", z.ZodTypeAny, {
|
|
2164
|
-
|
|
1289
|
+
projectRoot: string;
|
|
1290
|
+
cwd: string;
|
|
2165
1291
|
fileTree: import("./util/file").FileTreeNode[];
|
|
2166
1292
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2167
1293
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2188,7 +1314,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2188
1314
|
content: string;
|
|
2189
1315
|
}[][] | undefined;
|
|
2190
1316
|
}, {
|
|
2191
|
-
|
|
1317
|
+
projectRoot: string;
|
|
1318
|
+
cwd: string;
|
|
2192
1319
|
fileTree: import("./util/file").FileTreeNode[];
|
|
2193
1320
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2194
1321
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2222,11 +1349,23 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2222
1349
|
}, {
|
|
2223
1350
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
2224
1351
|
}>>, "many">;
|
|
1352
|
+
agents: z.ZodDefault<z.ZodArray<z.ZodType<{
|
|
1353
|
+
agentId: string;
|
|
1354
|
+
agentName: import("./types/agent-state").AgentTemplateName;
|
|
1355
|
+
agents: import("./types/agent-state").SubagentState[];
|
|
1356
|
+
messageHistory: import("./types/message").CodebuffMessage[];
|
|
1357
|
+
}, z.ZodTypeDef, {
|
|
1358
|
+
agentId: string;
|
|
1359
|
+
agentName: import("./types/agent-state").AgentTemplateName;
|
|
1360
|
+
agents: import("./types/agent-state").SubagentState[];
|
|
1361
|
+
messageHistory: import("./types/message").CodebuffMessage[];
|
|
1362
|
+
}>, "many">>;
|
|
2225
1363
|
agentStepsRemaining: z.ZodNumber;
|
|
2226
1364
|
}, "strip", z.ZodTypeAny, {
|
|
2227
1365
|
agentContext: string;
|
|
2228
1366
|
fileContext: {
|
|
2229
|
-
|
|
1367
|
+
projectRoot: string;
|
|
1368
|
+
cwd: string;
|
|
2230
1369
|
fileTree: import("./util/file").FileTreeNode[];
|
|
2231
1370
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2232
1371
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2256,11 +1395,18 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2256
1395
|
messageHistory: (import("ai").CoreMessage & {
|
|
2257
1396
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
2258
1397
|
})[];
|
|
1398
|
+
agents: {
|
|
1399
|
+
agentId: string;
|
|
1400
|
+
agentName: import("./types/agent-state").AgentTemplateName;
|
|
1401
|
+
agents: import("./types/agent-state").SubagentState[];
|
|
1402
|
+
messageHistory: import("./types/message").CodebuffMessage[];
|
|
1403
|
+
}[];
|
|
2259
1404
|
agentStepsRemaining: number;
|
|
2260
1405
|
}, {
|
|
2261
1406
|
agentContext: string;
|
|
2262
1407
|
fileContext: {
|
|
2263
|
-
|
|
1408
|
+
projectRoot: string;
|
|
1409
|
+
cwd: string;
|
|
2264
1410
|
fileTree: import("./util/file").FileTreeNode[];
|
|
2265
1411
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2266
1412
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2291,40 +1437,47 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2291
1437
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
2292
1438
|
})[];
|
|
2293
1439
|
agentStepsRemaining: number;
|
|
1440
|
+
agents?: {
|
|
1441
|
+
agentId: string;
|
|
1442
|
+
agentName: import("./types/agent-state").AgentTemplateName;
|
|
1443
|
+
agents: import("./types/agent-state").SubagentState[];
|
|
1444
|
+
messageHistory: import("./types/message").CodebuffMessage[];
|
|
1445
|
+
}[] | undefined;
|
|
2294
1446
|
}>;
|
|
2295
1447
|
toolCalls: z.ZodArray<z.ZodObject<{
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
1448
|
+
toolName: z.ZodString;
|
|
1449
|
+
args: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1450
|
+
toolCallId: z.ZodString;
|
|
2299
1451
|
}, "strip", z.ZodTypeAny, {
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
1452
|
+
toolName: string;
|
|
1453
|
+
args: Record<string, string>;
|
|
1454
|
+
toolCallId: string;
|
|
2303
1455
|
}, {
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
1456
|
+
toolName: string;
|
|
1457
|
+
args: Record<string, string>;
|
|
1458
|
+
toolCallId: string;
|
|
2307
1459
|
}>, "many">;
|
|
2308
1460
|
toolResults: z.ZodArray<z.ZodObject<{
|
|
2309
|
-
|
|
1461
|
+
toolName: z.ZodString;
|
|
1462
|
+
toolCallId: z.ZodString;
|
|
2310
1463
|
result: z.ZodString;
|
|
2311
|
-
id: z.ZodString;
|
|
2312
1464
|
}, "strip", z.ZodTypeAny, {
|
|
2313
|
-
|
|
2314
|
-
|
|
1465
|
+
toolName: string;
|
|
1466
|
+
toolCallId: string;
|
|
2315
1467
|
result: string;
|
|
2316
1468
|
}, {
|
|
2317
|
-
|
|
2318
|
-
|
|
1469
|
+
toolName: string;
|
|
1470
|
+
toolCallId: string;
|
|
2319
1471
|
result: string;
|
|
2320
1472
|
}>, "many">;
|
|
2321
1473
|
}, "strip", z.ZodTypeAny, {
|
|
2322
|
-
type: "
|
|
1474
|
+
type: "prompt-response";
|
|
2323
1475
|
promptId: string;
|
|
2324
1476
|
agentState: {
|
|
2325
1477
|
agentContext: string;
|
|
2326
1478
|
fileContext: {
|
|
2327
|
-
|
|
1479
|
+
projectRoot: string;
|
|
1480
|
+
cwd: string;
|
|
2328
1481
|
fileTree: import("./util/file").FileTreeNode[];
|
|
2329
1482
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2330
1483
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2354,25 +1507,32 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2354
1507
|
messageHistory: (import("ai").CoreMessage & {
|
|
2355
1508
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
2356
1509
|
})[];
|
|
1510
|
+
agents: {
|
|
1511
|
+
agentId: string;
|
|
1512
|
+
agentName: import("./types/agent-state").AgentTemplateName;
|
|
1513
|
+
agents: import("./types/agent-state").SubagentState[];
|
|
1514
|
+
messageHistory: import("./types/message").CodebuffMessage[];
|
|
1515
|
+
}[];
|
|
2357
1516
|
agentStepsRemaining: number;
|
|
2358
1517
|
};
|
|
2359
1518
|
toolResults: {
|
|
2360
|
-
|
|
2361
|
-
|
|
1519
|
+
toolName: string;
|
|
1520
|
+
toolCallId: string;
|
|
2362
1521
|
result: string;
|
|
2363
1522
|
}[];
|
|
2364
1523
|
toolCalls: {
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
1524
|
+
toolName: string;
|
|
1525
|
+
args: Record<string, string>;
|
|
1526
|
+
toolCallId: string;
|
|
2368
1527
|
}[];
|
|
2369
1528
|
}, {
|
|
2370
|
-
type: "
|
|
1529
|
+
type: "prompt-response";
|
|
2371
1530
|
promptId: string;
|
|
2372
1531
|
agentState: {
|
|
2373
1532
|
agentContext: string;
|
|
2374
1533
|
fileContext: {
|
|
2375
|
-
|
|
1534
|
+
projectRoot: string;
|
|
1535
|
+
cwd: string;
|
|
2376
1536
|
fileTree: import("./util/file").FileTreeNode[];
|
|
2377
1537
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
2378
1538
|
knowledgeFiles: Record<string, string>;
|
|
@@ -2403,16 +1563,22 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2403
1563
|
timeToLive?: "agentStep" | "userPrompt" | undefined;
|
|
2404
1564
|
})[];
|
|
2405
1565
|
agentStepsRemaining: number;
|
|
1566
|
+
agents?: {
|
|
1567
|
+
agentId: string;
|
|
1568
|
+
agentName: import("./types/agent-state").AgentTemplateName;
|
|
1569
|
+
agents: import("./types/agent-state").SubagentState[];
|
|
1570
|
+
messageHistory: import("./types/message").CodebuffMessage[];
|
|
1571
|
+
}[] | undefined;
|
|
2406
1572
|
};
|
|
2407
1573
|
toolResults: {
|
|
2408
|
-
|
|
2409
|
-
|
|
1574
|
+
toolName: string;
|
|
1575
|
+
toolCallId: string;
|
|
2410
1576
|
result: string;
|
|
2411
1577
|
}[];
|
|
2412
1578
|
toolCalls: {
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
1579
|
+
toolName: string;
|
|
1580
|
+
args: Record<string, string>;
|
|
1581
|
+
toolCallId: string;
|
|
2416
1582
|
}[];
|
|
2417
1583
|
}>, z.ZodObject<{
|
|
2418
1584
|
type: z.ZodLiteral<"read-files">;
|
|
@@ -2431,17 +1597,17 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2431
1597
|
userInputId: z.ZodString;
|
|
2432
1598
|
response: z.ZodString;
|
|
2433
1599
|
data: z.ZodObject<{
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
1600
|
+
toolName: z.ZodString;
|
|
1601
|
+
args: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1602
|
+
toolCallId: z.ZodString;
|
|
2437
1603
|
}, "strip", z.ZodTypeAny, {
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
1604
|
+
toolName: string;
|
|
1605
|
+
args: Record<string, string>;
|
|
1606
|
+
toolCallId: string;
|
|
2441
1607
|
}, {
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
1608
|
+
toolName: string;
|
|
1609
|
+
args: Record<string, string>;
|
|
1610
|
+
toolCallId: string;
|
|
2445
1611
|
}>;
|
|
2446
1612
|
changes: z.ZodArray<z.ZodObject<{
|
|
2447
1613
|
type: z.ZodEnum<["patch", "file"]>;
|
|
@@ -2500,9 +1666,9 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2500
1666
|
}[];
|
|
2501
1667
|
resetFileVersions: boolean;
|
|
2502
1668
|
data: {
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
1669
|
+
toolName: string;
|
|
1670
|
+
args: Record<string, string>;
|
|
1671
|
+
toolCallId: string;
|
|
2506
1672
|
};
|
|
2507
1673
|
}, {
|
|
2508
1674
|
type: "tool-call";
|
|
@@ -2524,9 +1690,9 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2524
1690
|
}[];
|
|
2525
1691
|
resetFileVersions: boolean;
|
|
2526
1692
|
data: {
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
1693
|
+
toolName: string;
|
|
1694
|
+
args: Record<string, string>;
|
|
1695
|
+
toolCallId: string;
|
|
2530
1696
|
};
|
|
2531
1697
|
}>, z.ZodObject<{
|
|
2532
1698
|
type: z.ZodLiteral<"terminal-command-result">;
|