codebuff 1.0.169 → 1.0.170
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/browser-runner.js +17 -7
- package/dist/browser-runner.js.map +1 -1
- package/dist/chat-storage.d.ts +2 -27
- package/dist/chat-storage.js +73 -139
- package/dist/chat-storage.js.map +1 -1
- package/dist/checkpoint-file-manager.d.ts +8 -0
- package/dist/checkpoint-file-manager.js +125 -0
- package/dist/checkpoint-file-manager.js.map +1 -0
- package/dist/checkpoints.d.ts +61 -0
- package/dist/checkpoints.js +171 -0
- package/dist/checkpoints.js.map +1 -0
- package/dist/cli.d.ts +7 -8
- package/dist/cli.js +127 -155
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +179 -28
- package/dist/client.js +154 -150
- package/dist/client.js.map +1 -1
- package/dist/code-map/languages.js +17 -7
- package/dist/code-map/languages.js.map +1 -1
- package/dist/code-map/parse.js +17 -7
- package/dist/code-map/parse.js.map +1 -1
- package/dist/code-map/tsconfig.tsbuildinfo +1 -1
- package/dist/common/actions.d.ts +2121 -560
- package/dist/common/actions.js +58 -81
- package/dist/common/actions.js.map +1 -1
- package/dist/common/constants/tools.d.ts +13 -0
- package/dist/common/constants/tools.js +22 -0
- package/dist/common/constants/tools.js.map +1 -0
- package/dist/common/constants.d.ts +0 -1
- package/dist/common/constants.js +3 -3
- package/dist/common/constants.js.map +1 -1
- package/dist/common/logger.d.ts +1 -0
- package/dist/common/logger.js +7 -0
- package/dist/common/logger.js.map +1 -0
- package/dist/common/types/agent-state.d.ts +461 -0
- package/dist/common/types/agent-state.js +30 -0
- package/dist/common/types/agent-state.js.map +1 -0
- package/dist/common/types/message.d.ts +311 -0
- package/dist/common/types/message.js +54 -0
- package/dist/common/types/message.js.map +1 -0
- package/dist/common/types/tools.d.ts +5 -0
- package/dist/common/types/tools.js +3 -0
- package/dist/common/types/tools.js.map +1 -0
- package/dist/common/util/changes.js +3 -3
- package/dist/common/util/changes.js.map +1 -1
- package/dist/common/util/constants.d.ts +1 -0
- package/dist/common/util/constants.js +7 -0
- package/dist/common/util/constants.js.map +1 -0
- package/dist/common/util/credentials.d.ts +4 -4
- package/dist/common/util/file.d.ts +6 -2
- package/dist/common/util/file.js +25 -24
- package/dist/common/util/file.js.map +1 -1
- package/dist/common/util/git.js +1 -1
- package/dist/common/util/git.js.map +1 -1
- package/dist/common/util/helpers.d.ts +1 -0
- package/dist/common/util/helpers.js +6 -0
- package/dist/common/util/helpers.js.map +1 -0
- package/dist/common/util/messages.d.ts +1 -1
- package/dist/common/util/promise.d.ts +8 -0
- package/dist/common/util/promise.js +25 -2
- package/dist/common/util/promise.js.map +1 -1
- package/dist/common/util/saxy.d.ts +158 -0
- package/dist/common/util/saxy.js +450 -0
- package/dist/common/util/saxy.js.map +1 -0
- package/dist/common/util/string.d.ts +13 -0
- package/dist/common/util/string.js +21 -1
- package/dist/common/util/string.js.map +1 -1
- package/dist/common/util/token-counter.d.ts +3 -0
- package/dist/common/util/token-counter.js +27 -0
- package/dist/common/util/token-counter.js.map +1 -0
- package/dist/common/websockets/websocket-schema.d.ts +3646 -530
- package/dist/create-template-project.js +17 -7
- package/dist/create-template-project.js.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/menu.js +31 -19
- package/dist/menu.js.map +1 -1
- package/dist/project-files.d.ts +40 -2
- package/dist/project-files.js +94 -34
- package/dist/project-files.js.map +1 -1
- package/dist/tool-handlers.d.ts +21 -7
- package/dist/tool-handlers.js +99 -37
- package/dist/tool-handlers.js.map +1 -1
- package/dist/utils/__tests__/xml-stream-parser.test.js +221 -0
- package/dist/utils/__tests__/xml-stream-parser.test.js.map +1 -0
- package/dist/utils/spinner.d.ts +1 -0
- package/dist/utils/spinner.js +28 -7
- package/dist/utils/spinner.js.map +1 -1
- package/dist/utils/terminal.d.ts +23 -3
- package/dist/utils/terminal.js +68 -45
- package/dist/utils/terminal.js.map +1 -1
- package/dist/utils/tool-renderers.d.ts +16 -0
- package/dist/utils/tool-renderers.js +105 -0
- package/dist/utils/tool-renderers.js.map +1 -0
- package/dist/utils/xml-stream-parser.d.ts +9 -0
- package/dist/utils/xml-stream-parser.js +128 -0
- package/dist/utils/xml-stream-parser.js.map +1 -0
- package/dist/worker-script-project-context.js +1 -1
- package/dist/worker-script-project-context.js.map +1 -1
- package/package.json +2 -1
- package/dist/__tests__/browser-runner.test.js +0 -15
- package/dist/__tests__/browser-runner.test.js.map +0 -1
- /package/dist/{__tests__/browser-runner.test.d.ts → utils/__tests__/xml-stream-parser.test.d.ts} +0 -0
|
@@ -142,12 +142,12 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
142
142
|
data: z.ZodString;
|
|
143
143
|
}, "strip", z.ZodTypeAny, {
|
|
144
144
|
type: "base64";
|
|
145
|
-
media_type: "image/jpeg";
|
|
146
145
|
data: string;
|
|
146
|
+
media_type: "image/jpeg";
|
|
147
147
|
}, {
|
|
148
148
|
type: "base64";
|
|
149
|
-
media_type: "image/jpeg";
|
|
150
149
|
data: string;
|
|
150
|
+
media_type: "image/jpeg";
|
|
151
151
|
}>;
|
|
152
152
|
cache_control: z.ZodOptional<z.ZodObject<{
|
|
153
153
|
type: z.ZodLiteral<"ephemeral">;
|
|
@@ -160,8 +160,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
160
160
|
type: "image";
|
|
161
161
|
source: {
|
|
162
162
|
type: "base64";
|
|
163
|
-
media_type: "image/jpeg";
|
|
164
163
|
data: string;
|
|
164
|
+
media_type: "image/jpeg";
|
|
165
165
|
};
|
|
166
166
|
cache_control?: {
|
|
167
167
|
type: "ephemeral";
|
|
@@ -170,8 +170,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
170
170
|
type: "image";
|
|
171
171
|
source: {
|
|
172
172
|
type: "base64";
|
|
173
|
-
media_type: "image/jpeg";
|
|
174
173
|
data: string;
|
|
174
|
+
media_type: "image/jpeg";
|
|
175
175
|
};
|
|
176
176
|
cache_control?: {
|
|
177
177
|
type: "ephemeral";
|
|
@@ -203,8 +203,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
203
203
|
type: "image";
|
|
204
204
|
source: {
|
|
205
205
|
type: "base64";
|
|
206
|
-
media_type: "image/jpeg";
|
|
207
206
|
data: string;
|
|
207
|
+
media_type: "image/jpeg";
|
|
208
208
|
};
|
|
209
209
|
cache_control?: {
|
|
210
210
|
type: "ephemeral";
|
|
@@ -237,8 +237,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
237
237
|
type: "image";
|
|
238
238
|
source: {
|
|
239
239
|
type: "base64";
|
|
240
|
-
media_type: "image/jpeg";
|
|
241
240
|
data: string;
|
|
241
|
+
media_type: "image/jpeg";
|
|
242
242
|
};
|
|
243
243
|
cache_control?: {
|
|
244
244
|
type: "ephemeral";
|
|
@@ -258,13 +258,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
258
258
|
diffCached: z.ZodString;
|
|
259
259
|
lastCommitMessages: z.ZodString;
|
|
260
260
|
}, "strip", z.ZodTypeAny, {
|
|
261
|
-
status: string;
|
|
262
261
|
diff: string;
|
|
262
|
+
status: string;
|
|
263
263
|
diffCached: string;
|
|
264
264
|
lastCommitMessages: string;
|
|
265
265
|
}, {
|
|
266
|
-
status: string;
|
|
267
266
|
diff: string;
|
|
267
|
+
status: string;
|
|
268
268
|
diffCached: string;
|
|
269
269
|
lastCommitMessages: string;
|
|
270
270
|
}>;
|
|
@@ -308,8 +308,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
308
308
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
309
309
|
knowledgeFiles: Record<string, string>;
|
|
310
310
|
gitChanges: {
|
|
311
|
-
status: string;
|
|
312
311
|
diff: string;
|
|
312
|
+
status: string;
|
|
313
313
|
diffCached: string;
|
|
314
314
|
lastCommitMessages: string;
|
|
315
315
|
};
|
|
@@ -334,8 +334,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
334
334
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
335
335
|
knowledgeFiles: Record<string, string>;
|
|
336
336
|
gitChanges: {
|
|
337
|
-
status: string;
|
|
338
337
|
diff: string;
|
|
338
|
+
status: string;
|
|
339
339
|
diffCached: string;
|
|
340
340
|
lastCommitMessages: string;
|
|
341
341
|
};
|
|
@@ -357,15 +357,15 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
357
357
|
}>;
|
|
358
358
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
359
359
|
type: z.ZodEnum<["patch", "file"]>;
|
|
360
|
-
|
|
360
|
+
path: z.ZodString;
|
|
361
361
|
content: z.ZodString;
|
|
362
362
|
}, "strip", z.ZodTypeAny, {
|
|
363
|
-
type: "
|
|
364
|
-
|
|
363
|
+
type: "patch" | "file";
|
|
364
|
+
path: string;
|
|
365
365
|
content: string;
|
|
366
366
|
}, {
|
|
367
|
-
type: "
|
|
368
|
-
|
|
367
|
+
type: "patch" | "file";
|
|
368
|
+
path: string;
|
|
369
369
|
content: string;
|
|
370
370
|
}>, "many">;
|
|
371
371
|
costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
|
|
@@ -373,11 +373,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
373
373
|
type: "user-input";
|
|
374
374
|
fingerprintId: string;
|
|
375
375
|
userInputId: string;
|
|
376
|
-
changesAlreadyApplied: {
|
|
377
|
-
type: "file" | "patch";
|
|
378
|
-
filePath: string;
|
|
379
|
-
content: string;
|
|
380
|
-
}[];
|
|
381
376
|
messages: {
|
|
382
377
|
content: string | ({
|
|
383
378
|
type: "text";
|
|
@@ -404,8 +399,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
404
399
|
type: "image";
|
|
405
400
|
source: {
|
|
406
401
|
type: "base64";
|
|
407
|
-
media_type: "image/jpeg";
|
|
408
402
|
data: string;
|
|
403
|
+
media_type: "image/jpeg";
|
|
409
404
|
};
|
|
410
405
|
cache_control?: {
|
|
411
406
|
type: "ephemeral";
|
|
@@ -419,8 +414,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
419
414
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
420
415
|
knowledgeFiles: Record<string, string>;
|
|
421
416
|
gitChanges: {
|
|
422
|
-
status: string;
|
|
423
417
|
diff: string;
|
|
418
|
+
status: string;
|
|
424
419
|
diffCached: string;
|
|
425
420
|
lastCommitMessages: string;
|
|
426
421
|
};
|
|
@@ -440,17 +435,17 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
440
435
|
}[][];
|
|
441
436
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
442
437
|
};
|
|
443
|
-
|
|
438
|
+
changesAlreadyApplied: {
|
|
439
|
+
type: "patch" | "file";
|
|
440
|
+
path: string;
|
|
441
|
+
content: string;
|
|
442
|
+
}[];
|
|
443
|
+
costMode: "lite" | "normal" | "max";
|
|
444
444
|
authToken?: string | undefined;
|
|
445
445
|
}, {
|
|
446
446
|
type: "user-input";
|
|
447
447
|
fingerprintId: string;
|
|
448
448
|
userInputId: string;
|
|
449
|
-
changesAlreadyApplied: {
|
|
450
|
-
type: "file" | "patch";
|
|
451
|
-
filePath: string;
|
|
452
|
-
content: string;
|
|
453
|
-
}[];
|
|
454
449
|
messages: {
|
|
455
450
|
content: string | ({
|
|
456
451
|
type: "text";
|
|
@@ -477,8 +472,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
477
472
|
type: "image";
|
|
478
473
|
source: {
|
|
479
474
|
type: "base64";
|
|
480
|
-
media_type: "image/jpeg";
|
|
481
475
|
data: string;
|
|
476
|
+
media_type: "image/jpeg";
|
|
482
477
|
};
|
|
483
478
|
cache_control?: {
|
|
484
479
|
type: "ephemeral";
|
|
@@ -492,8 +487,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
492
487
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
493
488
|
knowledgeFiles: Record<string, string>;
|
|
494
489
|
gitChanges: {
|
|
495
|
-
status: string;
|
|
496
490
|
diff: string;
|
|
491
|
+
status: string;
|
|
497
492
|
diffCached: string;
|
|
498
493
|
lastCommitMessages: string;
|
|
499
494
|
};
|
|
@@ -513,8 +508,616 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
513
508
|
}[][];
|
|
514
509
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
515
510
|
};
|
|
511
|
+
changesAlreadyApplied: {
|
|
512
|
+
type: "patch" | "file";
|
|
513
|
+
path: string;
|
|
514
|
+
content: string;
|
|
515
|
+
}[];
|
|
516
|
+
authToken?: string | undefined;
|
|
517
|
+
costMode?: "lite" | "normal" | "max" | undefined;
|
|
518
|
+
}>, z.ZodObject<{
|
|
519
|
+
type: z.ZodLiteral<"prompt">;
|
|
520
|
+
promptId: z.ZodString;
|
|
521
|
+
prompt: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
|
|
522
|
+
fingerprintId: z.ZodString;
|
|
523
|
+
authToken: z.ZodOptional<z.ZodString>;
|
|
524
|
+
costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
|
|
525
|
+
agentState: z.ZodObject<{
|
|
526
|
+
agentContext: z.ZodString;
|
|
527
|
+
fileContext: z.ZodObject<{
|
|
528
|
+
currentWorkingDirectory: z.ZodString;
|
|
529
|
+
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
530
|
+
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
531
|
+
knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
532
|
+
userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
533
|
+
gitChanges: z.ZodObject<{
|
|
534
|
+
status: z.ZodString;
|
|
535
|
+
diff: z.ZodString;
|
|
536
|
+
diffCached: z.ZodString;
|
|
537
|
+
lastCommitMessages: z.ZodString;
|
|
538
|
+
}, "strip", z.ZodTypeAny, {
|
|
539
|
+
diff: string;
|
|
540
|
+
status: string;
|
|
541
|
+
diffCached: string;
|
|
542
|
+
lastCommitMessages: string;
|
|
543
|
+
}, {
|
|
544
|
+
diff: string;
|
|
545
|
+
status: string;
|
|
546
|
+
diffCached: string;
|
|
547
|
+
lastCommitMessages: string;
|
|
548
|
+
}>;
|
|
549
|
+
changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
550
|
+
shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
551
|
+
systemInfo: z.ZodObject<{
|
|
552
|
+
platform: z.ZodString;
|
|
553
|
+
shell: z.ZodString;
|
|
554
|
+
nodeVersion: z.ZodString;
|
|
555
|
+
arch: z.ZodString;
|
|
556
|
+
homedir: z.ZodString;
|
|
557
|
+
cpus: z.ZodNumber;
|
|
558
|
+
}, "strip", z.ZodTypeAny, {
|
|
559
|
+
platform: string;
|
|
560
|
+
shell: string;
|
|
561
|
+
nodeVersion: string;
|
|
562
|
+
arch: string;
|
|
563
|
+
homedir: string;
|
|
564
|
+
cpus: number;
|
|
565
|
+
}, {
|
|
566
|
+
platform: string;
|
|
567
|
+
shell: string;
|
|
568
|
+
nodeVersion: string;
|
|
569
|
+
arch: string;
|
|
570
|
+
homedir: string;
|
|
571
|
+
cpus: number;
|
|
572
|
+
}>;
|
|
573
|
+
fileVersions: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
574
|
+
path: z.ZodString;
|
|
575
|
+
content: z.ZodString;
|
|
576
|
+
}, "strip", z.ZodTypeAny, {
|
|
577
|
+
path: string;
|
|
578
|
+
content: string;
|
|
579
|
+
}, {
|
|
580
|
+
path: string;
|
|
581
|
+
content: string;
|
|
582
|
+
}>, "many">, "many">;
|
|
583
|
+
}, "strip", z.ZodTypeAny, {
|
|
584
|
+
currentWorkingDirectory: string;
|
|
585
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
586
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
587
|
+
knowledgeFiles: Record<string, string>;
|
|
588
|
+
gitChanges: {
|
|
589
|
+
diff: string;
|
|
590
|
+
status: string;
|
|
591
|
+
diffCached: string;
|
|
592
|
+
lastCommitMessages: string;
|
|
593
|
+
};
|
|
594
|
+
changesSinceLastChat: Record<string, string>;
|
|
595
|
+
shellConfigFiles: Record<string, string>;
|
|
596
|
+
systemInfo: {
|
|
597
|
+
platform: string;
|
|
598
|
+
shell: string;
|
|
599
|
+
nodeVersion: string;
|
|
600
|
+
arch: string;
|
|
601
|
+
homedir: string;
|
|
602
|
+
cpus: number;
|
|
603
|
+
};
|
|
604
|
+
fileVersions: {
|
|
605
|
+
path: string;
|
|
606
|
+
content: string;
|
|
607
|
+
}[][];
|
|
608
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
609
|
+
}, {
|
|
610
|
+
currentWorkingDirectory: string;
|
|
611
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
612
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
613
|
+
knowledgeFiles: Record<string, string>;
|
|
614
|
+
gitChanges: {
|
|
615
|
+
diff: string;
|
|
616
|
+
status: string;
|
|
617
|
+
diffCached: string;
|
|
618
|
+
lastCommitMessages: string;
|
|
619
|
+
};
|
|
620
|
+
changesSinceLastChat: Record<string, string>;
|
|
621
|
+
shellConfigFiles: Record<string, string>;
|
|
622
|
+
systemInfo: {
|
|
623
|
+
platform: string;
|
|
624
|
+
shell: string;
|
|
625
|
+
nodeVersion: string;
|
|
626
|
+
arch: string;
|
|
627
|
+
homedir: string;
|
|
628
|
+
cpus: number;
|
|
629
|
+
};
|
|
630
|
+
fileVersions: {
|
|
631
|
+
path: string;
|
|
632
|
+
content: string;
|
|
633
|
+
}[][];
|
|
634
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
635
|
+
}>;
|
|
636
|
+
messageHistory: z.ZodArray<z.ZodObject<{
|
|
637
|
+
role: z.ZodUnion<[z.ZodLiteral<"user">, z.ZodLiteral<"assistant">]>;
|
|
638
|
+
content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
639
|
+
type: z.ZodLiteral<"text">;
|
|
640
|
+
text: z.ZodString;
|
|
641
|
+
cache_control: z.ZodOptional<z.ZodObject<{
|
|
642
|
+
type: z.ZodLiteral<"ephemeral">;
|
|
643
|
+
}, "strip", z.ZodTypeAny, {
|
|
644
|
+
type: "ephemeral";
|
|
645
|
+
}, {
|
|
646
|
+
type: "ephemeral";
|
|
647
|
+
}>>;
|
|
648
|
+
}, "strip", z.ZodTypeAny, {
|
|
649
|
+
type: "text";
|
|
650
|
+
text: string;
|
|
651
|
+
cache_control?: {
|
|
652
|
+
type: "ephemeral";
|
|
653
|
+
} | undefined;
|
|
654
|
+
}, {
|
|
655
|
+
type: "text";
|
|
656
|
+
text: string;
|
|
657
|
+
cache_control?: {
|
|
658
|
+
type: "ephemeral";
|
|
659
|
+
} | undefined;
|
|
660
|
+
}>, z.ZodObject<{
|
|
661
|
+
type: z.ZodLiteral<"tool_use">;
|
|
662
|
+
id: z.ZodString;
|
|
663
|
+
name: z.ZodString;
|
|
664
|
+
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
665
|
+
cache_control: z.ZodOptional<z.ZodObject<{
|
|
666
|
+
type: z.ZodLiteral<"ephemeral">;
|
|
667
|
+
}, "strip", z.ZodTypeAny, {
|
|
668
|
+
type: "ephemeral";
|
|
669
|
+
}, {
|
|
670
|
+
type: "ephemeral";
|
|
671
|
+
}>>;
|
|
672
|
+
}, "strip", z.ZodTypeAny, {
|
|
673
|
+
type: "tool_use";
|
|
674
|
+
name: string;
|
|
675
|
+
id: string;
|
|
676
|
+
input: Record<string, any>;
|
|
677
|
+
cache_control?: {
|
|
678
|
+
type: "ephemeral";
|
|
679
|
+
} | undefined;
|
|
680
|
+
}, {
|
|
681
|
+
type: "tool_use";
|
|
682
|
+
name: string;
|
|
683
|
+
id: string;
|
|
684
|
+
input: Record<string, any>;
|
|
685
|
+
cache_control?: {
|
|
686
|
+
type: "ephemeral";
|
|
687
|
+
} | undefined;
|
|
688
|
+
}>, z.ZodObject<{
|
|
689
|
+
type: z.ZodLiteral<"tool_result">;
|
|
690
|
+
tool_use_id: z.ZodString;
|
|
691
|
+
content: z.ZodString;
|
|
692
|
+
cache_control: z.ZodOptional<z.ZodObject<{
|
|
693
|
+
type: z.ZodLiteral<"ephemeral">;
|
|
694
|
+
}, "strip", z.ZodTypeAny, {
|
|
695
|
+
type: "ephemeral";
|
|
696
|
+
}, {
|
|
697
|
+
type: "ephemeral";
|
|
698
|
+
}>>;
|
|
699
|
+
}, "strip", z.ZodTypeAny, {
|
|
700
|
+
type: "tool_result";
|
|
701
|
+
content: string;
|
|
702
|
+
tool_use_id: string;
|
|
703
|
+
cache_control?: {
|
|
704
|
+
type: "ephemeral";
|
|
705
|
+
} | undefined;
|
|
706
|
+
}, {
|
|
707
|
+
type: "tool_result";
|
|
708
|
+
content: string;
|
|
709
|
+
tool_use_id: string;
|
|
710
|
+
cache_control?: {
|
|
711
|
+
type: "ephemeral";
|
|
712
|
+
} | undefined;
|
|
713
|
+
}>, z.ZodObject<{
|
|
714
|
+
type: z.ZodLiteral<"image">;
|
|
715
|
+
source: z.ZodObject<{
|
|
716
|
+
type: z.ZodLiteral<"base64">;
|
|
717
|
+
media_type: z.ZodLiteral<"image/jpeg">;
|
|
718
|
+
data: z.ZodString;
|
|
719
|
+
}, "strip", z.ZodTypeAny, {
|
|
720
|
+
type: "base64";
|
|
721
|
+
data: string;
|
|
722
|
+
media_type: "image/jpeg";
|
|
723
|
+
}, {
|
|
724
|
+
type: "base64";
|
|
725
|
+
data: string;
|
|
726
|
+
media_type: "image/jpeg";
|
|
727
|
+
}>;
|
|
728
|
+
cache_control: z.ZodOptional<z.ZodObject<{
|
|
729
|
+
type: z.ZodLiteral<"ephemeral">;
|
|
730
|
+
}, "strip", z.ZodTypeAny, {
|
|
731
|
+
type: "ephemeral";
|
|
732
|
+
}, {
|
|
733
|
+
type: "ephemeral";
|
|
734
|
+
}>>;
|
|
735
|
+
}, "strip", z.ZodTypeAny, {
|
|
736
|
+
type: "image";
|
|
737
|
+
source: {
|
|
738
|
+
type: "base64";
|
|
739
|
+
data: string;
|
|
740
|
+
media_type: "image/jpeg";
|
|
741
|
+
};
|
|
742
|
+
cache_control?: {
|
|
743
|
+
type: "ephemeral";
|
|
744
|
+
} | undefined;
|
|
745
|
+
}, {
|
|
746
|
+
type: "image";
|
|
747
|
+
source: {
|
|
748
|
+
type: "base64";
|
|
749
|
+
data: string;
|
|
750
|
+
media_type: "image/jpeg";
|
|
751
|
+
};
|
|
752
|
+
cache_control?: {
|
|
753
|
+
type: "ephemeral";
|
|
754
|
+
} | undefined;
|
|
755
|
+
}>]>, "many">]>;
|
|
756
|
+
}, "strip", z.ZodTypeAny, {
|
|
757
|
+
content: string | ({
|
|
758
|
+
type: "text";
|
|
759
|
+
text: string;
|
|
760
|
+
cache_control?: {
|
|
761
|
+
type: "ephemeral";
|
|
762
|
+
} | undefined;
|
|
763
|
+
} | {
|
|
764
|
+
type: "tool_use";
|
|
765
|
+
name: string;
|
|
766
|
+
id: string;
|
|
767
|
+
input: Record<string, any>;
|
|
768
|
+
cache_control?: {
|
|
769
|
+
type: "ephemeral";
|
|
770
|
+
} | undefined;
|
|
771
|
+
} | {
|
|
772
|
+
type: "tool_result";
|
|
773
|
+
content: string;
|
|
774
|
+
tool_use_id: string;
|
|
775
|
+
cache_control?: {
|
|
776
|
+
type: "ephemeral";
|
|
777
|
+
} | undefined;
|
|
778
|
+
} | {
|
|
779
|
+
type: "image";
|
|
780
|
+
source: {
|
|
781
|
+
type: "base64";
|
|
782
|
+
data: string;
|
|
783
|
+
media_type: "image/jpeg";
|
|
784
|
+
};
|
|
785
|
+
cache_control?: {
|
|
786
|
+
type: "ephemeral";
|
|
787
|
+
} | undefined;
|
|
788
|
+
})[];
|
|
789
|
+
role: "user" | "assistant";
|
|
790
|
+
}, {
|
|
791
|
+
content: string | ({
|
|
792
|
+
type: "text";
|
|
793
|
+
text: string;
|
|
794
|
+
cache_control?: {
|
|
795
|
+
type: "ephemeral";
|
|
796
|
+
} | undefined;
|
|
797
|
+
} | {
|
|
798
|
+
type: "tool_use";
|
|
799
|
+
name: string;
|
|
800
|
+
id: string;
|
|
801
|
+
input: Record<string, any>;
|
|
802
|
+
cache_control?: {
|
|
803
|
+
type: "ephemeral";
|
|
804
|
+
} | undefined;
|
|
805
|
+
} | {
|
|
806
|
+
type: "tool_result";
|
|
807
|
+
content: string;
|
|
808
|
+
tool_use_id: string;
|
|
809
|
+
cache_control?: {
|
|
810
|
+
type: "ephemeral";
|
|
811
|
+
} | undefined;
|
|
812
|
+
} | {
|
|
813
|
+
type: "image";
|
|
814
|
+
source: {
|
|
815
|
+
type: "base64";
|
|
816
|
+
data: string;
|
|
817
|
+
media_type: "image/jpeg";
|
|
818
|
+
};
|
|
819
|
+
cache_control?: {
|
|
820
|
+
type: "ephemeral";
|
|
821
|
+
} | undefined;
|
|
822
|
+
})[];
|
|
823
|
+
role: "user" | "assistant";
|
|
824
|
+
}>, "many">;
|
|
825
|
+
}, "strip", z.ZodTypeAny, {
|
|
826
|
+
fileContext: {
|
|
827
|
+
currentWorkingDirectory: string;
|
|
828
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
829
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
830
|
+
knowledgeFiles: Record<string, string>;
|
|
831
|
+
gitChanges: {
|
|
832
|
+
diff: string;
|
|
833
|
+
status: string;
|
|
834
|
+
diffCached: string;
|
|
835
|
+
lastCommitMessages: string;
|
|
836
|
+
};
|
|
837
|
+
changesSinceLastChat: Record<string, string>;
|
|
838
|
+
shellConfigFiles: Record<string, string>;
|
|
839
|
+
systemInfo: {
|
|
840
|
+
platform: string;
|
|
841
|
+
shell: string;
|
|
842
|
+
nodeVersion: string;
|
|
843
|
+
arch: string;
|
|
844
|
+
homedir: string;
|
|
845
|
+
cpus: number;
|
|
846
|
+
};
|
|
847
|
+
fileVersions: {
|
|
848
|
+
path: string;
|
|
849
|
+
content: string;
|
|
850
|
+
}[][];
|
|
851
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
852
|
+
};
|
|
853
|
+
agentContext: string;
|
|
854
|
+
messageHistory: {
|
|
855
|
+
content: string | ({
|
|
856
|
+
type: "text";
|
|
857
|
+
text: string;
|
|
858
|
+
cache_control?: {
|
|
859
|
+
type: "ephemeral";
|
|
860
|
+
} | undefined;
|
|
861
|
+
} | {
|
|
862
|
+
type: "tool_use";
|
|
863
|
+
name: string;
|
|
864
|
+
id: string;
|
|
865
|
+
input: Record<string, any>;
|
|
866
|
+
cache_control?: {
|
|
867
|
+
type: "ephemeral";
|
|
868
|
+
} | undefined;
|
|
869
|
+
} | {
|
|
870
|
+
type: "tool_result";
|
|
871
|
+
content: string;
|
|
872
|
+
tool_use_id: string;
|
|
873
|
+
cache_control?: {
|
|
874
|
+
type: "ephemeral";
|
|
875
|
+
} | undefined;
|
|
876
|
+
} | {
|
|
877
|
+
type: "image";
|
|
878
|
+
source: {
|
|
879
|
+
type: "base64";
|
|
880
|
+
data: string;
|
|
881
|
+
media_type: "image/jpeg";
|
|
882
|
+
};
|
|
883
|
+
cache_control?: {
|
|
884
|
+
type: "ephemeral";
|
|
885
|
+
} | undefined;
|
|
886
|
+
})[];
|
|
887
|
+
role: "user" | "assistant";
|
|
888
|
+
}[];
|
|
889
|
+
}, {
|
|
890
|
+
fileContext: {
|
|
891
|
+
currentWorkingDirectory: string;
|
|
892
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
893
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
894
|
+
knowledgeFiles: Record<string, string>;
|
|
895
|
+
gitChanges: {
|
|
896
|
+
diff: string;
|
|
897
|
+
status: string;
|
|
898
|
+
diffCached: string;
|
|
899
|
+
lastCommitMessages: string;
|
|
900
|
+
};
|
|
901
|
+
changesSinceLastChat: Record<string, string>;
|
|
902
|
+
shellConfigFiles: Record<string, string>;
|
|
903
|
+
systemInfo: {
|
|
904
|
+
platform: string;
|
|
905
|
+
shell: string;
|
|
906
|
+
nodeVersion: string;
|
|
907
|
+
arch: string;
|
|
908
|
+
homedir: string;
|
|
909
|
+
cpus: number;
|
|
910
|
+
};
|
|
911
|
+
fileVersions: {
|
|
912
|
+
path: string;
|
|
913
|
+
content: string;
|
|
914
|
+
}[][];
|
|
915
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
916
|
+
};
|
|
917
|
+
agentContext: string;
|
|
918
|
+
messageHistory: {
|
|
919
|
+
content: string | ({
|
|
920
|
+
type: "text";
|
|
921
|
+
text: string;
|
|
922
|
+
cache_control?: {
|
|
923
|
+
type: "ephemeral";
|
|
924
|
+
} | undefined;
|
|
925
|
+
} | {
|
|
926
|
+
type: "tool_use";
|
|
927
|
+
name: string;
|
|
928
|
+
id: string;
|
|
929
|
+
input: Record<string, any>;
|
|
930
|
+
cache_control?: {
|
|
931
|
+
type: "ephemeral";
|
|
932
|
+
} | undefined;
|
|
933
|
+
} | {
|
|
934
|
+
type: "tool_result";
|
|
935
|
+
content: string;
|
|
936
|
+
tool_use_id: string;
|
|
937
|
+
cache_control?: {
|
|
938
|
+
type: "ephemeral";
|
|
939
|
+
} | undefined;
|
|
940
|
+
} | {
|
|
941
|
+
type: "image";
|
|
942
|
+
source: {
|
|
943
|
+
type: "base64";
|
|
944
|
+
data: string;
|
|
945
|
+
media_type: "image/jpeg";
|
|
946
|
+
};
|
|
947
|
+
cache_control?: {
|
|
948
|
+
type: "ephemeral";
|
|
949
|
+
} | undefined;
|
|
950
|
+
})[];
|
|
951
|
+
role: "user" | "assistant";
|
|
952
|
+
}[];
|
|
953
|
+
}>;
|
|
954
|
+
toolResults: z.ZodArray<z.ZodObject<{
|
|
955
|
+
name: z.ZodString;
|
|
956
|
+
result: z.ZodString;
|
|
957
|
+
id: z.ZodString;
|
|
958
|
+
}, "strip", z.ZodTypeAny, {
|
|
959
|
+
name: string;
|
|
960
|
+
id: string;
|
|
961
|
+
result: string;
|
|
962
|
+
}, {
|
|
963
|
+
name: string;
|
|
964
|
+
id: string;
|
|
965
|
+
result: string;
|
|
966
|
+
}>, "many">;
|
|
967
|
+
}, "strip", z.ZodTypeAny, {
|
|
968
|
+
type: "prompt";
|
|
969
|
+
fingerprintId: string;
|
|
970
|
+
costMode: "lite" | "normal" | "max";
|
|
971
|
+
promptId: string;
|
|
972
|
+
agentState: {
|
|
973
|
+
fileContext: {
|
|
974
|
+
currentWorkingDirectory: string;
|
|
975
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
976
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
977
|
+
knowledgeFiles: Record<string, string>;
|
|
978
|
+
gitChanges: {
|
|
979
|
+
diff: string;
|
|
980
|
+
status: string;
|
|
981
|
+
diffCached: string;
|
|
982
|
+
lastCommitMessages: string;
|
|
983
|
+
};
|
|
984
|
+
changesSinceLastChat: Record<string, string>;
|
|
985
|
+
shellConfigFiles: Record<string, string>;
|
|
986
|
+
systemInfo: {
|
|
987
|
+
platform: string;
|
|
988
|
+
shell: string;
|
|
989
|
+
nodeVersion: string;
|
|
990
|
+
arch: string;
|
|
991
|
+
homedir: string;
|
|
992
|
+
cpus: number;
|
|
993
|
+
};
|
|
994
|
+
fileVersions: {
|
|
995
|
+
path: string;
|
|
996
|
+
content: string;
|
|
997
|
+
}[][];
|
|
998
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
999
|
+
};
|
|
1000
|
+
agentContext: string;
|
|
1001
|
+
messageHistory: {
|
|
1002
|
+
content: string | ({
|
|
1003
|
+
type: "text";
|
|
1004
|
+
text: string;
|
|
1005
|
+
cache_control?: {
|
|
1006
|
+
type: "ephemeral";
|
|
1007
|
+
} | undefined;
|
|
1008
|
+
} | {
|
|
1009
|
+
type: "tool_use";
|
|
1010
|
+
name: string;
|
|
1011
|
+
id: string;
|
|
1012
|
+
input: Record<string, any>;
|
|
1013
|
+
cache_control?: {
|
|
1014
|
+
type: "ephemeral";
|
|
1015
|
+
} | undefined;
|
|
1016
|
+
} | {
|
|
1017
|
+
type: "tool_result";
|
|
1018
|
+
content: string;
|
|
1019
|
+
tool_use_id: string;
|
|
1020
|
+
cache_control?: {
|
|
1021
|
+
type: "ephemeral";
|
|
1022
|
+
} | undefined;
|
|
1023
|
+
} | {
|
|
1024
|
+
type: "image";
|
|
1025
|
+
source: {
|
|
1026
|
+
type: "base64";
|
|
1027
|
+
data: string;
|
|
1028
|
+
media_type: "image/jpeg";
|
|
1029
|
+
};
|
|
1030
|
+
cache_control?: {
|
|
1031
|
+
type: "ephemeral";
|
|
1032
|
+
} | undefined;
|
|
1033
|
+
})[];
|
|
1034
|
+
role: "user" | "assistant";
|
|
1035
|
+
}[];
|
|
1036
|
+
};
|
|
1037
|
+
toolResults: {
|
|
1038
|
+
name: string;
|
|
1039
|
+
id: string;
|
|
1040
|
+
result: string;
|
|
1041
|
+
}[];
|
|
1042
|
+
authToken?: string | undefined;
|
|
1043
|
+
prompt?: string | undefined;
|
|
1044
|
+
}, {
|
|
1045
|
+
type: "prompt";
|
|
1046
|
+
fingerprintId: string;
|
|
1047
|
+
promptId: string;
|
|
1048
|
+
agentState: {
|
|
1049
|
+
fileContext: {
|
|
1050
|
+
currentWorkingDirectory: string;
|
|
1051
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
1052
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
1053
|
+
knowledgeFiles: Record<string, string>;
|
|
1054
|
+
gitChanges: {
|
|
1055
|
+
diff: string;
|
|
1056
|
+
status: string;
|
|
1057
|
+
diffCached: string;
|
|
1058
|
+
lastCommitMessages: string;
|
|
1059
|
+
};
|
|
1060
|
+
changesSinceLastChat: Record<string, string>;
|
|
1061
|
+
shellConfigFiles: Record<string, string>;
|
|
1062
|
+
systemInfo: {
|
|
1063
|
+
platform: string;
|
|
1064
|
+
shell: string;
|
|
1065
|
+
nodeVersion: string;
|
|
1066
|
+
arch: string;
|
|
1067
|
+
homedir: string;
|
|
1068
|
+
cpus: number;
|
|
1069
|
+
};
|
|
1070
|
+
fileVersions: {
|
|
1071
|
+
path: string;
|
|
1072
|
+
content: string;
|
|
1073
|
+
}[][];
|
|
1074
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1075
|
+
};
|
|
1076
|
+
agentContext: string;
|
|
1077
|
+
messageHistory: {
|
|
1078
|
+
content: string | ({
|
|
1079
|
+
type: "text";
|
|
1080
|
+
text: string;
|
|
1081
|
+
cache_control?: {
|
|
1082
|
+
type: "ephemeral";
|
|
1083
|
+
} | undefined;
|
|
1084
|
+
} | {
|
|
1085
|
+
type: "tool_use";
|
|
1086
|
+
name: string;
|
|
1087
|
+
id: string;
|
|
1088
|
+
input: Record<string, any>;
|
|
1089
|
+
cache_control?: {
|
|
1090
|
+
type: "ephemeral";
|
|
1091
|
+
} | undefined;
|
|
1092
|
+
} | {
|
|
1093
|
+
type: "tool_result";
|
|
1094
|
+
content: string;
|
|
1095
|
+
tool_use_id: string;
|
|
1096
|
+
cache_control?: {
|
|
1097
|
+
type: "ephemeral";
|
|
1098
|
+
} | undefined;
|
|
1099
|
+
} | {
|
|
1100
|
+
type: "image";
|
|
1101
|
+
source: {
|
|
1102
|
+
type: "base64";
|
|
1103
|
+
data: string;
|
|
1104
|
+
media_type: "image/jpeg";
|
|
1105
|
+
};
|
|
1106
|
+
cache_control?: {
|
|
1107
|
+
type: "ephemeral";
|
|
1108
|
+
} | undefined;
|
|
1109
|
+
})[];
|
|
1110
|
+
role: "user" | "assistant";
|
|
1111
|
+
}[];
|
|
1112
|
+
};
|
|
1113
|
+
toolResults: {
|
|
1114
|
+
name: string;
|
|
1115
|
+
id: string;
|
|
1116
|
+
result: string;
|
|
1117
|
+
}[];
|
|
516
1118
|
authToken?: string | undefined;
|
|
517
|
-
costMode?: "
|
|
1119
|
+
costMode?: "lite" | "normal" | "max" | undefined;
|
|
1120
|
+
prompt?: string | undefined;
|
|
518
1121
|
}>, z.ZodObject<{
|
|
519
1122
|
type: z.ZodLiteral<"read-files-response">;
|
|
520
1123
|
files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
@@ -543,13 +1146,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
543
1146
|
diffCached: z.ZodString;
|
|
544
1147
|
lastCommitMessages: z.ZodString;
|
|
545
1148
|
}, "strip", z.ZodTypeAny, {
|
|
546
|
-
status: string;
|
|
547
1149
|
diff: string;
|
|
1150
|
+
status: string;
|
|
548
1151
|
diffCached: string;
|
|
549
1152
|
lastCommitMessages: string;
|
|
550
1153
|
}, {
|
|
551
|
-
status: string;
|
|
552
1154
|
diff: string;
|
|
1155
|
+
status: string;
|
|
553
1156
|
diffCached: string;
|
|
554
1157
|
lastCommitMessages: string;
|
|
555
1158
|
}>;
|
|
@@ -593,8 +1196,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
593
1196
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
594
1197
|
knowledgeFiles: Record<string, string>;
|
|
595
1198
|
gitChanges: {
|
|
596
|
-
status: string;
|
|
597
1199
|
diff: string;
|
|
1200
|
+
status: string;
|
|
598
1201
|
diffCached: string;
|
|
599
1202
|
lastCommitMessages: string;
|
|
600
1203
|
};
|
|
@@ -619,8 +1222,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
619
1222
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
620
1223
|
knowledgeFiles: Record<string, string>;
|
|
621
1224
|
gitChanges: {
|
|
622
|
-
status: string;
|
|
623
1225
|
diff: string;
|
|
1226
|
+
status: string;
|
|
624
1227
|
diffCached: string;
|
|
625
1228
|
lastCommitMessages: string;
|
|
626
1229
|
};
|
|
@@ -649,8 +1252,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
649
1252
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
650
1253
|
knowledgeFiles: Record<string, string>;
|
|
651
1254
|
gitChanges: {
|
|
652
|
-
status: string;
|
|
653
1255
|
diff: string;
|
|
1256
|
+
status: string;
|
|
654
1257
|
diffCached: string;
|
|
655
1258
|
lastCommitMessages: string;
|
|
656
1259
|
};
|
|
@@ -680,8 +1283,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
680
1283
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
681
1284
|
knowledgeFiles: Record<string, string>;
|
|
682
1285
|
gitChanges: {
|
|
683
|
-
status: string;
|
|
684
1286
|
diff: string;
|
|
1287
|
+
status: string;
|
|
685
1288
|
diffCached: string;
|
|
686
1289
|
lastCommitMessages: string;
|
|
687
1290
|
};
|
|
@@ -736,11 +1339,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
736
1339
|
type: "user-input";
|
|
737
1340
|
fingerprintId: string;
|
|
738
1341
|
userInputId: string;
|
|
739
|
-
changesAlreadyApplied: {
|
|
740
|
-
type: "file" | "patch";
|
|
741
|
-
filePath: string;
|
|
742
|
-
content: string;
|
|
743
|
-
}[];
|
|
744
1342
|
messages: {
|
|
745
1343
|
content: string | ({
|
|
746
1344
|
type: "text";
|
|
@@ -767,8 +1365,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
767
1365
|
type: "image";
|
|
768
1366
|
source: {
|
|
769
1367
|
type: "base64";
|
|
770
|
-
media_type: "image/jpeg";
|
|
771
1368
|
data: string;
|
|
1369
|
+
media_type: "image/jpeg";
|
|
772
1370
|
};
|
|
773
1371
|
cache_control?: {
|
|
774
1372
|
type: "ephemeral";
|
|
@@ -782,8 +1380,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
782
1380
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
783
1381
|
knowledgeFiles: Record<string, string>;
|
|
784
1382
|
gitChanges: {
|
|
785
|
-
status: string;
|
|
786
1383
|
diff: string;
|
|
1384
|
+
status: string;
|
|
787
1385
|
diffCached: string;
|
|
788
1386
|
lastCommitMessages: string;
|
|
789
1387
|
};
|
|
@@ -803,8 +1401,90 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
803
1401
|
}[][];
|
|
804
1402
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
805
1403
|
};
|
|
806
|
-
|
|
1404
|
+
changesAlreadyApplied: {
|
|
1405
|
+
type: "patch" | "file";
|
|
1406
|
+
path: string;
|
|
1407
|
+
content: string;
|
|
1408
|
+
}[];
|
|
1409
|
+
costMode: "lite" | "normal" | "max";
|
|
1410
|
+
authToken?: string | undefined;
|
|
1411
|
+
} | {
|
|
1412
|
+
type: "prompt";
|
|
1413
|
+
fingerprintId: string;
|
|
1414
|
+
costMode: "lite" | "normal" | "max";
|
|
1415
|
+
promptId: string;
|
|
1416
|
+
agentState: {
|
|
1417
|
+
fileContext: {
|
|
1418
|
+
currentWorkingDirectory: string;
|
|
1419
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
1420
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
1421
|
+
knowledgeFiles: Record<string, string>;
|
|
1422
|
+
gitChanges: {
|
|
1423
|
+
diff: string;
|
|
1424
|
+
status: string;
|
|
1425
|
+
diffCached: string;
|
|
1426
|
+
lastCommitMessages: string;
|
|
1427
|
+
};
|
|
1428
|
+
changesSinceLastChat: Record<string, string>;
|
|
1429
|
+
shellConfigFiles: Record<string, string>;
|
|
1430
|
+
systemInfo: {
|
|
1431
|
+
platform: string;
|
|
1432
|
+
shell: string;
|
|
1433
|
+
nodeVersion: string;
|
|
1434
|
+
arch: string;
|
|
1435
|
+
homedir: string;
|
|
1436
|
+
cpus: number;
|
|
1437
|
+
};
|
|
1438
|
+
fileVersions: {
|
|
1439
|
+
path: string;
|
|
1440
|
+
content: string;
|
|
1441
|
+
}[][];
|
|
1442
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1443
|
+
};
|
|
1444
|
+
agentContext: string;
|
|
1445
|
+
messageHistory: {
|
|
1446
|
+
content: string | ({
|
|
1447
|
+
type: "text";
|
|
1448
|
+
text: string;
|
|
1449
|
+
cache_control?: {
|
|
1450
|
+
type: "ephemeral";
|
|
1451
|
+
} | undefined;
|
|
1452
|
+
} | {
|
|
1453
|
+
type: "tool_use";
|
|
1454
|
+
name: string;
|
|
1455
|
+
id: string;
|
|
1456
|
+
input: Record<string, any>;
|
|
1457
|
+
cache_control?: {
|
|
1458
|
+
type: "ephemeral";
|
|
1459
|
+
} | undefined;
|
|
1460
|
+
} | {
|
|
1461
|
+
type: "tool_result";
|
|
1462
|
+
content: string;
|
|
1463
|
+
tool_use_id: string;
|
|
1464
|
+
cache_control?: {
|
|
1465
|
+
type: "ephemeral";
|
|
1466
|
+
} | undefined;
|
|
1467
|
+
} | {
|
|
1468
|
+
type: "image";
|
|
1469
|
+
source: {
|
|
1470
|
+
type: "base64";
|
|
1471
|
+
data: string;
|
|
1472
|
+
media_type: "image/jpeg";
|
|
1473
|
+
};
|
|
1474
|
+
cache_control?: {
|
|
1475
|
+
type: "ephemeral";
|
|
1476
|
+
} | undefined;
|
|
1477
|
+
})[];
|
|
1478
|
+
role: "user" | "assistant";
|
|
1479
|
+
}[];
|
|
1480
|
+
};
|
|
1481
|
+
toolResults: {
|
|
1482
|
+
name: string;
|
|
1483
|
+
id: string;
|
|
1484
|
+
result: string;
|
|
1485
|
+
}[];
|
|
807
1486
|
authToken?: string | undefined;
|
|
1487
|
+
prompt?: string | undefined;
|
|
808
1488
|
} | {
|
|
809
1489
|
type: "read-files-response";
|
|
810
1490
|
files: Record<string, string | null>;
|
|
@@ -818,8 +1498,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
818
1498
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
819
1499
|
knowledgeFiles: Record<string, string>;
|
|
820
1500
|
gitChanges: {
|
|
821
|
-
status: string;
|
|
822
1501
|
diff: string;
|
|
1502
|
+
status: string;
|
|
823
1503
|
diffCached: string;
|
|
824
1504
|
lastCommitMessages: string;
|
|
825
1505
|
};
|
|
@@ -857,11 +1537,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
857
1537
|
type: "user-input";
|
|
858
1538
|
fingerprintId: string;
|
|
859
1539
|
userInputId: string;
|
|
860
|
-
changesAlreadyApplied: {
|
|
861
|
-
type: "file" | "patch";
|
|
862
|
-
filePath: string;
|
|
863
|
-
content: string;
|
|
864
|
-
}[];
|
|
865
1540
|
messages: {
|
|
866
1541
|
content: string | ({
|
|
867
1542
|
type: "text";
|
|
@@ -888,8 +1563,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
888
1563
|
type: "image";
|
|
889
1564
|
source: {
|
|
890
1565
|
type: "base64";
|
|
891
|
-
media_type: "image/jpeg";
|
|
892
1566
|
data: string;
|
|
1567
|
+
media_type: "image/jpeg";
|
|
893
1568
|
};
|
|
894
1569
|
cache_control?: {
|
|
895
1570
|
type: "ephemeral";
|
|
@@ -903,8 +1578,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
903
1578
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
904
1579
|
knowledgeFiles: Record<string, string>;
|
|
905
1580
|
gitChanges: {
|
|
906
|
-
status: string;
|
|
907
1581
|
diff: string;
|
|
1582
|
+
status: string;
|
|
908
1583
|
diffCached: string;
|
|
909
1584
|
lastCommitMessages: string;
|
|
910
1585
|
};
|
|
@@ -924,8 +1599,90 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
924
1599
|
}[][];
|
|
925
1600
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
926
1601
|
};
|
|
1602
|
+
changesAlreadyApplied: {
|
|
1603
|
+
type: "patch" | "file";
|
|
1604
|
+
path: string;
|
|
1605
|
+
content: string;
|
|
1606
|
+
}[];
|
|
1607
|
+
authToken?: string | undefined;
|
|
1608
|
+
costMode?: "lite" | "normal" | "max" | undefined;
|
|
1609
|
+
} | {
|
|
1610
|
+
type: "prompt";
|
|
1611
|
+
fingerprintId: string;
|
|
1612
|
+
promptId: string;
|
|
1613
|
+
agentState: {
|
|
1614
|
+
fileContext: {
|
|
1615
|
+
currentWorkingDirectory: string;
|
|
1616
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
1617
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
1618
|
+
knowledgeFiles: Record<string, string>;
|
|
1619
|
+
gitChanges: {
|
|
1620
|
+
diff: string;
|
|
1621
|
+
status: string;
|
|
1622
|
+
diffCached: string;
|
|
1623
|
+
lastCommitMessages: string;
|
|
1624
|
+
};
|
|
1625
|
+
changesSinceLastChat: Record<string, string>;
|
|
1626
|
+
shellConfigFiles: Record<string, string>;
|
|
1627
|
+
systemInfo: {
|
|
1628
|
+
platform: string;
|
|
1629
|
+
shell: string;
|
|
1630
|
+
nodeVersion: string;
|
|
1631
|
+
arch: string;
|
|
1632
|
+
homedir: string;
|
|
1633
|
+
cpus: number;
|
|
1634
|
+
};
|
|
1635
|
+
fileVersions: {
|
|
1636
|
+
path: string;
|
|
1637
|
+
content: string;
|
|
1638
|
+
}[][];
|
|
1639
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1640
|
+
};
|
|
1641
|
+
agentContext: string;
|
|
1642
|
+
messageHistory: {
|
|
1643
|
+
content: string | ({
|
|
1644
|
+
type: "text";
|
|
1645
|
+
text: string;
|
|
1646
|
+
cache_control?: {
|
|
1647
|
+
type: "ephemeral";
|
|
1648
|
+
} | undefined;
|
|
1649
|
+
} | {
|
|
1650
|
+
type: "tool_use";
|
|
1651
|
+
name: string;
|
|
1652
|
+
id: string;
|
|
1653
|
+
input: Record<string, any>;
|
|
1654
|
+
cache_control?: {
|
|
1655
|
+
type: "ephemeral";
|
|
1656
|
+
} | undefined;
|
|
1657
|
+
} | {
|
|
1658
|
+
type: "tool_result";
|
|
1659
|
+
content: string;
|
|
1660
|
+
tool_use_id: string;
|
|
1661
|
+
cache_control?: {
|
|
1662
|
+
type: "ephemeral";
|
|
1663
|
+
} | undefined;
|
|
1664
|
+
} | {
|
|
1665
|
+
type: "image";
|
|
1666
|
+
source: {
|
|
1667
|
+
type: "base64";
|
|
1668
|
+
data: string;
|
|
1669
|
+
media_type: "image/jpeg";
|
|
1670
|
+
};
|
|
1671
|
+
cache_control?: {
|
|
1672
|
+
type: "ephemeral";
|
|
1673
|
+
} | undefined;
|
|
1674
|
+
})[];
|
|
1675
|
+
role: "user" | "assistant";
|
|
1676
|
+
}[];
|
|
1677
|
+
};
|
|
1678
|
+
toolResults: {
|
|
1679
|
+
name: string;
|
|
1680
|
+
id: string;
|
|
1681
|
+
result: string;
|
|
1682
|
+
}[];
|
|
927
1683
|
authToken?: string | undefined;
|
|
928
|
-
costMode?: "
|
|
1684
|
+
costMode?: "lite" | "normal" | "max" | undefined;
|
|
1685
|
+
prompt?: string | undefined;
|
|
929
1686
|
} | {
|
|
930
1687
|
type: "read-files-response";
|
|
931
1688
|
files: Record<string, string | null>;
|
|
@@ -939,8 +1696,8 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
939
1696
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
940
1697
|
knowledgeFiles: Record<string, string>;
|
|
941
1698
|
gitChanges: {
|
|
942
|
-
status: string;
|
|
943
1699
|
diff: string;
|
|
1700
|
+
status: string;
|
|
944
1701
|
diffCached: string;
|
|
945
1702
|
lastCommitMessages: string;
|
|
946
1703
|
};
|
|
@@ -1112,12 +1869,12 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1112
1869
|
data: z.ZodString;
|
|
1113
1870
|
}, "strip", z.ZodTypeAny, {
|
|
1114
1871
|
type: "base64";
|
|
1115
|
-
media_type: "image/jpeg";
|
|
1116
1872
|
data: string;
|
|
1873
|
+
media_type: "image/jpeg";
|
|
1117
1874
|
}, {
|
|
1118
1875
|
type: "base64";
|
|
1119
|
-
media_type: "image/jpeg";
|
|
1120
1876
|
data: string;
|
|
1877
|
+
media_type: "image/jpeg";
|
|
1121
1878
|
}>;
|
|
1122
1879
|
cache_control: z.ZodOptional<z.ZodObject<{
|
|
1123
1880
|
type: z.ZodLiteral<"ephemeral">;
|
|
@@ -1130,8 +1887,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1130
1887
|
type: "image";
|
|
1131
1888
|
source: {
|
|
1132
1889
|
type: "base64";
|
|
1133
|
-
media_type: "image/jpeg";
|
|
1134
1890
|
data: string;
|
|
1891
|
+
media_type: "image/jpeg";
|
|
1135
1892
|
};
|
|
1136
1893
|
cache_control?: {
|
|
1137
1894
|
type: "ephemeral";
|
|
@@ -1140,8 +1897,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1140
1897
|
type: "image";
|
|
1141
1898
|
source: {
|
|
1142
1899
|
type: "base64";
|
|
1143
|
-
media_type: "image/jpeg";
|
|
1144
1900
|
data: string;
|
|
1901
|
+
media_type: "image/jpeg";
|
|
1145
1902
|
};
|
|
1146
1903
|
cache_control?: {
|
|
1147
1904
|
type: "ephemeral";
|
|
@@ -1173,8 +1930,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1173
1930
|
type: "image";
|
|
1174
1931
|
source: {
|
|
1175
1932
|
type: "base64";
|
|
1176
|
-
media_type: "image/jpeg";
|
|
1177
1933
|
data: string;
|
|
1934
|
+
media_type: "image/jpeg";
|
|
1178
1935
|
};
|
|
1179
1936
|
cache_control?: {
|
|
1180
1937
|
type: "ephemeral";
|
|
@@ -1207,8 +1964,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1207
1964
|
type: "image";
|
|
1208
1965
|
source: {
|
|
1209
1966
|
type: "base64";
|
|
1210
|
-
media_type: "image/jpeg";
|
|
1211
1967
|
data: string;
|
|
1968
|
+
media_type: "image/jpeg";
|
|
1212
1969
|
};
|
|
1213
1970
|
cache_control?: {
|
|
1214
1971
|
type: "ephemeral";
|
|
@@ -1228,13 +1985,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1228
1985
|
diffCached: z.ZodString;
|
|
1229
1986
|
lastCommitMessages: z.ZodString;
|
|
1230
1987
|
}, "strip", z.ZodTypeAny, {
|
|
1231
|
-
status: string;
|
|
1232
1988
|
diff: string;
|
|
1989
|
+
status: string;
|
|
1233
1990
|
diffCached: string;
|
|
1234
1991
|
lastCommitMessages: string;
|
|
1235
1992
|
}, {
|
|
1236
|
-
status: string;
|
|
1237
1993
|
diff: string;
|
|
1994
|
+
status: string;
|
|
1238
1995
|
diffCached: string;
|
|
1239
1996
|
lastCommitMessages: string;
|
|
1240
1997
|
}>;
|
|
@@ -1278,8 +2035,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1278
2035
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1279
2036
|
knowledgeFiles: Record<string, string>;
|
|
1280
2037
|
gitChanges: {
|
|
1281
|
-
status: string;
|
|
1282
2038
|
diff: string;
|
|
2039
|
+
status: string;
|
|
1283
2040
|
diffCached: string;
|
|
1284
2041
|
lastCommitMessages: string;
|
|
1285
2042
|
};
|
|
@@ -1304,8 +2061,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1304
2061
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1305
2062
|
knowledgeFiles: Record<string, string>;
|
|
1306
2063
|
gitChanges: {
|
|
1307
|
-
status: string;
|
|
1308
2064
|
diff: string;
|
|
2065
|
+
status: string;
|
|
1309
2066
|
diffCached: string;
|
|
1310
2067
|
lastCommitMessages: string;
|
|
1311
2068
|
};
|
|
@@ -1327,15 +2084,15 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1327
2084
|
}>;
|
|
1328
2085
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
1329
2086
|
type: z.ZodEnum<["patch", "file"]>;
|
|
1330
|
-
|
|
2087
|
+
path: z.ZodString;
|
|
1331
2088
|
content: z.ZodString;
|
|
1332
2089
|
}, "strip", z.ZodTypeAny, {
|
|
1333
|
-
type: "
|
|
1334
|
-
|
|
2090
|
+
type: "patch" | "file";
|
|
2091
|
+
path: string;
|
|
1335
2092
|
content: string;
|
|
1336
2093
|
}, {
|
|
1337
|
-
type: "
|
|
1338
|
-
|
|
2094
|
+
type: "patch" | "file";
|
|
2095
|
+
path: string;
|
|
1339
2096
|
content: string;
|
|
1340
2097
|
}>, "many">;
|
|
1341
2098
|
costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
|
|
@@ -1343,11 +2100,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1343
2100
|
type: "user-input";
|
|
1344
2101
|
fingerprintId: string;
|
|
1345
2102
|
userInputId: string;
|
|
1346
|
-
changesAlreadyApplied: {
|
|
1347
|
-
type: "file" | "patch";
|
|
1348
|
-
filePath: string;
|
|
1349
|
-
content: string;
|
|
1350
|
-
}[];
|
|
1351
2103
|
messages: {
|
|
1352
2104
|
content: string | ({
|
|
1353
2105
|
type: "text";
|
|
@@ -1374,8 +2126,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1374
2126
|
type: "image";
|
|
1375
2127
|
source: {
|
|
1376
2128
|
type: "base64";
|
|
1377
|
-
media_type: "image/jpeg";
|
|
1378
2129
|
data: string;
|
|
2130
|
+
media_type: "image/jpeg";
|
|
1379
2131
|
};
|
|
1380
2132
|
cache_control?: {
|
|
1381
2133
|
type: "ephemeral";
|
|
@@ -1389,8 +2141,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1389
2141
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1390
2142
|
knowledgeFiles: Record<string, string>;
|
|
1391
2143
|
gitChanges: {
|
|
1392
|
-
status: string;
|
|
1393
2144
|
diff: string;
|
|
2145
|
+
status: string;
|
|
1394
2146
|
diffCached: string;
|
|
1395
2147
|
lastCommitMessages: string;
|
|
1396
2148
|
};
|
|
@@ -1410,17 +2162,17 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1410
2162
|
}[][];
|
|
1411
2163
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1412
2164
|
};
|
|
1413
|
-
|
|
2165
|
+
changesAlreadyApplied: {
|
|
2166
|
+
type: "patch" | "file";
|
|
2167
|
+
path: string;
|
|
2168
|
+
content: string;
|
|
2169
|
+
}[];
|
|
2170
|
+
costMode: "lite" | "normal" | "max";
|
|
1414
2171
|
authToken?: string | undefined;
|
|
1415
2172
|
}, {
|
|
1416
2173
|
type: "user-input";
|
|
1417
2174
|
fingerprintId: string;
|
|
1418
2175
|
userInputId: string;
|
|
1419
|
-
changesAlreadyApplied: {
|
|
1420
|
-
type: "file" | "patch";
|
|
1421
|
-
filePath: string;
|
|
1422
|
-
content: string;
|
|
1423
|
-
}[];
|
|
1424
2176
|
messages: {
|
|
1425
2177
|
content: string | ({
|
|
1426
2178
|
type: "text";
|
|
@@ -1447,8 +2199,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1447
2199
|
type: "image";
|
|
1448
2200
|
source: {
|
|
1449
2201
|
type: "base64";
|
|
1450
|
-
media_type: "image/jpeg";
|
|
1451
2202
|
data: string;
|
|
2203
|
+
media_type: "image/jpeg";
|
|
1452
2204
|
};
|
|
1453
2205
|
cache_control?: {
|
|
1454
2206
|
type: "ephemeral";
|
|
@@ -1462,8 +2214,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1462
2214
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1463
2215
|
knowledgeFiles: Record<string, string>;
|
|
1464
2216
|
gitChanges: {
|
|
1465
|
-
status: string;
|
|
1466
2217
|
diff: string;
|
|
2218
|
+
status: string;
|
|
1467
2219
|
diffCached: string;
|
|
1468
2220
|
lastCommitMessages: string;
|
|
1469
2221
|
};
|
|
@@ -1483,147 +2235,699 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1483
2235
|
}[][];
|
|
1484
2236
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1485
2237
|
};
|
|
2238
|
+
changesAlreadyApplied: {
|
|
2239
|
+
type: "patch" | "file";
|
|
2240
|
+
path: string;
|
|
2241
|
+
content: string;
|
|
2242
|
+
}[];
|
|
1486
2243
|
authToken?: string | undefined;
|
|
1487
|
-
costMode?: "
|
|
1488
|
-
}>, z.ZodObject<{
|
|
1489
|
-
type: z.ZodLiteral<"read-files-response">;
|
|
1490
|
-
files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
1491
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
1492
|
-
}, "strip", z.ZodTypeAny, {
|
|
1493
|
-
type: "read-files-response";
|
|
1494
|
-
files: Record<string, string | null>;
|
|
1495
|
-
requestId?: string | undefined;
|
|
1496
|
-
}, {
|
|
1497
|
-
type: "read-files-response";
|
|
1498
|
-
files: Record<string, string | null>;
|
|
1499
|
-
requestId?: string | undefined;
|
|
2244
|
+
costMode?: "lite" | "normal" | "max" | undefined;
|
|
1500
2245
|
}>, z.ZodObject<{
|
|
1501
|
-
type: z.ZodLiteral<"
|
|
2246
|
+
type: z.ZodLiteral<"prompt">;
|
|
2247
|
+
promptId: z.ZodString;
|
|
2248
|
+
prompt: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
|
|
1502
2249
|
fingerprintId: z.ZodString;
|
|
1503
2250
|
authToken: z.ZodOptional<z.ZodString>;
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
2251
|
+
costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
|
|
2252
|
+
agentState: z.ZodObject<{
|
|
2253
|
+
agentContext: z.ZodString;
|
|
2254
|
+
fileContext: z.ZodObject<{
|
|
2255
|
+
currentWorkingDirectory: z.ZodString;
|
|
2256
|
+
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
2257
|
+
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
2258
|
+
knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
2259
|
+
userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2260
|
+
gitChanges: z.ZodObject<{
|
|
2261
|
+
status: z.ZodString;
|
|
2262
|
+
diff: z.ZodString;
|
|
2263
|
+
diffCached: z.ZodString;
|
|
2264
|
+
lastCommitMessages: z.ZodString;
|
|
2265
|
+
}, "strip", z.ZodTypeAny, {
|
|
2266
|
+
diff: string;
|
|
2267
|
+
status: string;
|
|
2268
|
+
diffCached: string;
|
|
2269
|
+
lastCommitMessages: string;
|
|
2270
|
+
}, {
|
|
2271
|
+
diff: string;
|
|
2272
|
+
status: string;
|
|
2273
|
+
diffCached: string;
|
|
2274
|
+
lastCommitMessages: string;
|
|
2275
|
+
}>;
|
|
2276
|
+
changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
2277
|
+
shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
2278
|
+
systemInfo: z.ZodObject<{
|
|
2279
|
+
platform: z.ZodString;
|
|
2280
|
+
shell: z.ZodString;
|
|
2281
|
+
nodeVersion: z.ZodString;
|
|
2282
|
+
arch: z.ZodString;
|
|
2283
|
+
homedir: z.ZodString;
|
|
2284
|
+
cpus: z.ZodNumber;
|
|
2285
|
+
}, "strip", z.ZodTypeAny, {
|
|
2286
|
+
platform: string;
|
|
2287
|
+
shell: string;
|
|
2288
|
+
nodeVersion: string;
|
|
2289
|
+
arch: string;
|
|
2290
|
+
homedir: string;
|
|
2291
|
+
cpus: number;
|
|
2292
|
+
}, {
|
|
2293
|
+
platform: string;
|
|
2294
|
+
shell: string;
|
|
2295
|
+
nodeVersion: string;
|
|
2296
|
+
arch: string;
|
|
2297
|
+
homedir: string;
|
|
2298
|
+
cpus: number;
|
|
2299
|
+
}>;
|
|
2300
|
+
fileVersions: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
2301
|
+
path: z.ZodString;
|
|
2302
|
+
content: z.ZodString;
|
|
2303
|
+
}, "strip", z.ZodTypeAny, {
|
|
2304
|
+
path: string;
|
|
2305
|
+
content: string;
|
|
2306
|
+
}, {
|
|
2307
|
+
path: string;
|
|
2308
|
+
content: string;
|
|
2309
|
+
}>, "many">, "many">;
|
|
1535
2310
|
}, "strip", z.ZodTypeAny, {
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
2311
|
+
currentWorkingDirectory: string;
|
|
2312
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
2313
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
2314
|
+
knowledgeFiles: Record<string, string>;
|
|
2315
|
+
gitChanges: {
|
|
2316
|
+
diff: string;
|
|
2317
|
+
status: string;
|
|
2318
|
+
diffCached: string;
|
|
2319
|
+
lastCommitMessages: string;
|
|
2320
|
+
};
|
|
2321
|
+
changesSinceLastChat: Record<string, string>;
|
|
2322
|
+
shellConfigFiles: Record<string, string>;
|
|
2323
|
+
systemInfo: {
|
|
2324
|
+
platform: string;
|
|
2325
|
+
shell: string;
|
|
2326
|
+
nodeVersion: string;
|
|
2327
|
+
arch: string;
|
|
2328
|
+
homedir: string;
|
|
2329
|
+
cpus: number;
|
|
2330
|
+
};
|
|
2331
|
+
fileVersions: {
|
|
2332
|
+
path: string;
|
|
2333
|
+
content: string;
|
|
2334
|
+
}[][];
|
|
2335
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1542
2336
|
}, {
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
2337
|
+
currentWorkingDirectory: string;
|
|
2338
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
2339
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
2340
|
+
knowledgeFiles: Record<string, string>;
|
|
2341
|
+
gitChanges: {
|
|
2342
|
+
diff: string;
|
|
2343
|
+
status: string;
|
|
2344
|
+
diffCached: string;
|
|
2345
|
+
lastCommitMessages: string;
|
|
2346
|
+
};
|
|
2347
|
+
changesSinceLastChat: Record<string, string>;
|
|
2348
|
+
shellConfigFiles: Record<string, string>;
|
|
2349
|
+
systemInfo: {
|
|
2350
|
+
platform: string;
|
|
2351
|
+
shell: string;
|
|
2352
|
+
nodeVersion: string;
|
|
2353
|
+
arch: string;
|
|
2354
|
+
homedir: string;
|
|
2355
|
+
cpus: number;
|
|
2356
|
+
};
|
|
2357
|
+
fileVersions: {
|
|
2358
|
+
path: string;
|
|
2359
|
+
content: string;
|
|
2360
|
+
}[][];
|
|
2361
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1549
2362
|
}>;
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
content: z.ZodString
|
|
2363
|
+
messageHistory: z.ZodArray<z.ZodObject<{
|
|
2364
|
+
role: z.ZodUnion<[z.ZodLiteral<"user">, z.ZodLiteral<"assistant">]>;
|
|
2365
|
+
content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
2366
|
+
type: z.ZodLiteral<"text">;
|
|
2367
|
+
text: z.ZodString;
|
|
2368
|
+
cache_control: z.ZodOptional<z.ZodObject<{
|
|
2369
|
+
type: z.ZodLiteral<"ephemeral">;
|
|
2370
|
+
}, "strip", z.ZodTypeAny, {
|
|
2371
|
+
type: "ephemeral";
|
|
2372
|
+
}, {
|
|
2373
|
+
type: "ephemeral";
|
|
2374
|
+
}>>;
|
|
2375
|
+
}, "strip", z.ZodTypeAny, {
|
|
2376
|
+
type: "text";
|
|
2377
|
+
text: string;
|
|
2378
|
+
cache_control?: {
|
|
2379
|
+
type: "ephemeral";
|
|
2380
|
+
} | undefined;
|
|
2381
|
+
}, {
|
|
2382
|
+
type: "text";
|
|
2383
|
+
text: string;
|
|
2384
|
+
cache_control?: {
|
|
2385
|
+
type: "ephemeral";
|
|
2386
|
+
} | undefined;
|
|
2387
|
+
}>, z.ZodObject<{
|
|
2388
|
+
type: z.ZodLiteral<"tool_use">;
|
|
2389
|
+
id: z.ZodString;
|
|
2390
|
+
name: z.ZodString;
|
|
2391
|
+
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
2392
|
+
cache_control: z.ZodOptional<z.ZodObject<{
|
|
2393
|
+
type: z.ZodLiteral<"ephemeral">;
|
|
2394
|
+
}, "strip", z.ZodTypeAny, {
|
|
2395
|
+
type: "ephemeral";
|
|
2396
|
+
}, {
|
|
2397
|
+
type: "ephemeral";
|
|
2398
|
+
}>>;
|
|
2399
|
+
}, "strip", z.ZodTypeAny, {
|
|
2400
|
+
type: "tool_use";
|
|
2401
|
+
name: string;
|
|
2402
|
+
id: string;
|
|
2403
|
+
input: Record<string, any>;
|
|
2404
|
+
cache_control?: {
|
|
2405
|
+
type: "ephemeral";
|
|
2406
|
+
} | undefined;
|
|
2407
|
+
}, {
|
|
2408
|
+
type: "tool_use";
|
|
2409
|
+
name: string;
|
|
2410
|
+
id: string;
|
|
2411
|
+
input: Record<string, any>;
|
|
2412
|
+
cache_control?: {
|
|
2413
|
+
type: "ephemeral";
|
|
2414
|
+
} | undefined;
|
|
2415
|
+
}>, z.ZodObject<{
|
|
2416
|
+
type: z.ZodLiteral<"tool_result">;
|
|
2417
|
+
tool_use_id: z.ZodString;
|
|
2418
|
+
content: z.ZodString;
|
|
2419
|
+
cache_control: z.ZodOptional<z.ZodObject<{
|
|
2420
|
+
type: z.ZodLiteral<"ephemeral">;
|
|
2421
|
+
}, "strip", z.ZodTypeAny, {
|
|
2422
|
+
type: "ephemeral";
|
|
2423
|
+
}, {
|
|
2424
|
+
type: "ephemeral";
|
|
2425
|
+
}>>;
|
|
2426
|
+
}, "strip", z.ZodTypeAny, {
|
|
2427
|
+
type: "tool_result";
|
|
2428
|
+
content: string;
|
|
2429
|
+
tool_use_id: string;
|
|
2430
|
+
cache_control?: {
|
|
2431
|
+
type: "ephemeral";
|
|
2432
|
+
} | undefined;
|
|
2433
|
+
}, {
|
|
2434
|
+
type: "tool_result";
|
|
2435
|
+
content: string;
|
|
2436
|
+
tool_use_id: string;
|
|
2437
|
+
cache_control?: {
|
|
2438
|
+
type: "ephemeral";
|
|
2439
|
+
} | undefined;
|
|
2440
|
+
}>, z.ZodObject<{
|
|
2441
|
+
type: z.ZodLiteral<"image">;
|
|
2442
|
+
source: z.ZodObject<{
|
|
2443
|
+
type: z.ZodLiteral<"base64">;
|
|
2444
|
+
media_type: z.ZodLiteral<"image/jpeg">;
|
|
2445
|
+
data: z.ZodString;
|
|
2446
|
+
}, "strip", z.ZodTypeAny, {
|
|
2447
|
+
type: "base64";
|
|
2448
|
+
data: string;
|
|
2449
|
+
media_type: "image/jpeg";
|
|
2450
|
+
}, {
|
|
2451
|
+
type: "base64";
|
|
2452
|
+
data: string;
|
|
2453
|
+
media_type: "image/jpeg";
|
|
2454
|
+
}>;
|
|
2455
|
+
cache_control: z.ZodOptional<z.ZodObject<{
|
|
2456
|
+
type: z.ZodLiteral<"ephemeral">;
|
|
2457
|
+
}, "strip", z.ZodTypeAny, {
|
|
2458
|
+
type: "ephemeral";
|
|
2459
|
+
}, {
|
|
2460
|
+
type: "ephemeral";
|
|
2461
|
+
}>>;
|
|
2462
|
+
}, "strip", z.ZodTypeAny, {
|
|
2463
|
+
type: "image";
|
|
2464
|
+
source: {
|
|
2465
|
+
type: "base64";
|
|
2466
|
+
data: string;
|
|
2467
|
+
media_type: "image/jpeg";
|
|
2468
|
+
};
|
|
2469
|
+
cache_control?: {
|
|
2470
|
+
type: "ephemeral";
|
|
2471
|
+
} | undefined;
|
|
2472
|
+
}, {
|
|
2473
|
+
type: "image";
|
|
2474
|
+
source: {
|
|
2475
|
+
type: "base64";
|
|
2476
|
+
data: string;
|
|
2477
|
+
media_type: "image/jpeg";
|
|
2478
|
+
};
|
|
2479
|
+
cache_control?: {
|
|
2480
|
+
type: "ephemeral";
|
|
2481
|
+
} | undefined;
|
|
2482
|
+
}>]>, "many">]>;
|
|
1553
2483
|
}, "strip", z.ZodTypeAny, {
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
2484
|
+
content: string | ({
|
|
2485
|
+
type: "text";
|
|
2486
|
+
text: string;
|
|
2487
|
+
cache_control?: {
|
|
2488
|
+
type: "ephemeral";
|
|
2489
|
+
} | undefined;
|
|
2490
|
+
} | {
|
|
2491
|
+
type: "tool_use";
|
|
2492
|
+
name: string;
|
|
2493
|
+
id: string;
|
|
2494
|
+
input: Record<string, any>;
|
|
2495
|
+
cache_control?: {
|
|
2496
|
+
type: "ephemeral";
|
|
2497
|
+
} | undefined;
|
|
2498
|
+
} | {
|
|
2499
|
+
type: "tool_result";
|
|
2500
|
+
content: string;
|
|
2501
|
+
tool_use_id: string;
|
|
2502
|
+
cache_control?: {
|
|
2503
|
+
type: "ephemeral";
|
|
2504
|
+
} | undefined;
|
|
2505
|
+
} | {
|
|
2506
|
+
type: "image";
|
|
2507
|
+
source: {
|
|
2508
|
+
type: "base64";
|
|
2509
|
+
data: string;
|
|
2510
|
+
media_type: "image/jpeg";
|
|
2511
|
+
};
|
|
2512
|
+
cache_control?: {
|
|
2513
|
+
type: "ephemeral";
|
|
2514
|
+
} | undefined;
|
|
2515
|
+
})[];
|
|
2516
|
+
role: "user" | "assistant";
|
|
2517
|
+
}, {
|
|
2518
|
+
content: string | ({
|
|
2519
|
+
type: "text";
|
|
2520
|
+
text: string;
|
|
2521
|
+
cache_control?: {
|
|
2522
|
+
type: "ephemeral";
|
|
2523
|
+
} | undefined;
|
|
2524
|
+
} | {
|
|
2525
|
+
type: "tool_use";
|
|
2526
|
+
name: string;
|
|
2527
|
+
id: string;
|
|
2528
|
+
input: Record<string, any>;
|
|
2529
|
+
cache_control?: {
|
|
2530
|
+
type: "ephemeral";
|
|
2531
|
+
} | undefined;
|
|
2532
|
+
} | {
|
|
2533
|
+
type: "tool_result";
|
|
2534
|
+
content: string;
|
|
2535
|
+
tool_use_id: string;
|
|
2536
|
+
cache_control?: {
|
|
2537
|
+
type: "ephemeral";
|
|
2538
|
+
} | undefined;
|
|
2539
|
+
} | {
|
|
2540
|
+
type: "image";
|
|
2541
|
+
source: {
|
|
2542
|
+
type: "base64";
|
|
2543
|
+
data: string;
|
|
2544
|
+
media_type: "image/jpeg";
|
|
2545
|
+
};
|
|
2546
|
+
cache_control?: {
|
|
2547
|
+
type: "ephemeral";
|
|
2548
|
+
} | undefined;
|
|
2549
|
+
})[];
|
|
2550
|
+
role: "user" | "assistant";
|
|
2551
|
+
}>, "many">;
|
|
2552
|
+
}, "strip", z.ZodTypeAny, {
|
|
2553
|
+
fileContext: {
|
|
2554
|
+
currentWorkingDirectory: string;
|
|
2555
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
2556
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
2557
|
+
knowledgeFiles: Record<string, string>;
|
|
2558
|
+
gitChanges: {
|
|
2559
|
+
diff: string;
|
|
2560
|
+
status: string;
|
|
2561
|
+
diffCached: string;
|
|
2562
|
+
lastCommitMessages: string;
|
|
2563
|
+
};
|
|
2564
|
+
changesSinceLastChat: Record<string, string>;
|
|
2565
|
+
shellConfigFiles: Record<string, string>;
|
|
2566
|
+
systemInfo: {
|
|
2567
|
+
platform: string;
|
|
2568
|
+
shell: string;
|
|
2569
|
+
nodeVersion: string;
|
|
2570
|
+
arch: string;
|
|
2571
|
+
homedir: string;
|
|
2572
|
+
cpus: number;
|
|
2573
|
+
};
|
|
2574
|
+
fileVersions: {
|
|
2575
|
+
path: string;
|
|
2576
|
+
content: string;
|
|
2577
|
+
}[][];
|
|
2578
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1580
2579
|
};
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
content: string
|
|
1584
|
-
|
|
1585
|
-
|
|
2580
|
+
agentContext: string;
|
|
2581
|
+
messageHistory: {
|
|
2582
|
+
content: string | ({
|
|
2583
|
+
type: "text";
|
|
2584
|
+
text: string;
|
|
2585
|
+
cache_control?: {
|
|
2586
|
+
type: "ephemeral";
|
|
2587
|
+
} | undefined;
|
|
2588
|
+
} | {
|
|
2589
|
+
type: "tool_use";
|
|
2590
|
+
name: string;
|
|
2591
|
+
id: string;
|
|
2592
|
+
input: Record<string, any>;
|
|
2593
|
+
cache_control?: {
|
|
2594
|
+
type: "ephemeral";
|
|
2595
|
+
} | undefined;
|
|
2596
|
+
} | {
|
|
2597
|
+
type: "tool_result";
|
|
2598
|
+
content: string;
|
|
2599
|
+
tool_use_id: string;
|
|
2600
|
+
cache_control?: {
|
|
2601
|
+
type: "ephemeral";
|
|
2602
|
+
} | undefined;
|
|
2603
|
+
} | {
|
|
2604
|
+
type: "image";
|
|
2605
|
+
source: {
|
|
2606
|
+
type: "base64";
|
|
2607
|
+
data: string;
|
|
2608
|
+
media_type: "image/jpeg";
|
|
2609
|
+
};
|
|
2610
|
+
cache_control?: {
|
|
2611
|
+
type: "ephemeral";
|
|
2612
|
+
} | undefined;
|
|
2613
|
+
})[];
|
|
2614
|
+
role: "user" | "assistant";
|
|
2615
|
+
}[];
|
|
1586
2616
|
}, {
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
2617
|
+
fileContext: {
|
|
2618
|
+
currentWorkingDirectory: string;
|
|
2619
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
2620
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
2621
|
+
knowledgeFiles: Record<string, string>;
|
|
2622
|
+
gitChanges: {
|
|
2623
|
+
diff: string;
|
|
2624
|
+
status: string;
|
|
2625
|
+
diffCached: string;
|
|
2626
|
+
lastCommitMessages: string;
|
|
2627
|
+
};
|
|
2628
|
+
changesSinceLastChat: Record<string, string>;
|
|
2629
|
+
shellConfigFiles: Record<string, string>;
|
|
2630
|
+
systemInfo: {
|
|
2631
|
+
platform: string;
|
|
2632
|
+
shell: string;
|
|
2633
|
+
nodeVersion: string;
|
|
2634
|
+
arch: string;
|
|
2635
|
+
homedir: string;
|
|
2636
|
+
cpus: number;
|
|
2637
|
+
};
|
|
2638
|
+
fileVersions: {
|
|
2639
|
+
path: string;
|
|
2640
|
+
content: string;
|
|
2641
|
+
}[][];
|
|
2642
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1606
2643
|
};
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
content: string
|
|
1610
|
-
|
|
1611
|
-
|
|
2644
|
+
agentContext: string;
|
|
2645
|
+
messageHistory: {
|
|
2646
|
+
content: string | ({
|
|
2647
|
+
type: "text";
|
|
2648
|
+
text: string;
|
|
2649
|
+
cache_control?: {
|
|
2650
|
+
type: "ephemeral";
|
|
2651
|
+
} | undefined;
|
|
2652
|
+
} | {
|
|
2653
|
+
type: "tool_use";
|
|
2654
|
+
name: string;
|
|
2655
|
+
id: string;
|
|
2656
|
+
input: Record<string, any>;
|
|
2657
|
+
cache_control?: {
|
|
2658
|
+
type: "ephemeral";
|
|
2659
|
+
} | undefined;
|
|
2660
|
+
} | {
|
|
2661
|
+
type: "tool_result";
|
|
2662
|
+
content: string;
|
|
2663
|
+
tool_use_id: string;
|
|
2664
|
+
cache_control?: {
|
|
2665
|
+
type: "ephemeral";
|
|
2666
|
+
} | undefined;
|
|
2667
|
+
} | {
|
|
2668
|
+
type: "image";
|
|
2669
|
+
source: {
|
|
2670
|
+
type: "base64";
|
|
2671
|
+
data: string;
|
|
2672
|
+
media_type: "image/jpeg";
|
|
2673
|
+
};
|
|
2674
|
+
cache_control?: {
|
|
2675
|
+
type: "ephemeral";
|
|
2676
|
+
} | undefined;
|
|
2677
|
+
})[];
|
|
2678
|
+
role: "user" | "assistant";
|
|
2679
|
+
}[];
|
|
1612
2680
|
}>;
|
|
2681
|
+
toolResults: z.ZodArray<z.ZodObject<{
|
|
2682
|
+
name: z.ZodString;
|
|
2683
|
+
result: z.ZodString;
|
|
2684
|
+
id: z.ZodString;
|
|
2685
|
+
}, "strip", z.ZodTypeAny, {
|
|
2686
|
+
name: string;
|
|
2687
|
+
id: string;
|
|
2688
|
+
result: string;
|
|
2689
|
+
}, {
|
|
2690
|
+
name: string;
|
|
2691
|
+
id: string;
|
|
2692
|
+
result: string;
|
|
2693
|
+
}>, "many">;
|
|
1613
2694
|
}, "strip", z.ZodTypeAny, {
|
|
1614
|
-
type: "
|
|
2695
|
+
type: "prompt";
|
|
1615
2696
|
fingerprintId: string;
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
2697
|
+
costMode: "lite" | "normal" | "max";
|
|
2698
|
+
promptId: string;
|
|
2699
|
+
agentState: {
|
|
2700
|
+
fileContext: {
|
|
2701
|
+
currentWorkingDirectory: string;
|
|
2702
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
2703
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
2704
|
+
knowledgeFiles: Record<string, string>;
|
|
2705
|
+
gitChanges: {
|
|
2706
|
+
diff: string;
|
|
2707
|
+
status: string;
|
|
2708
|
+
diffCached: string;
|
|
2709
|
+
lastCommitMessages: string;
|
|
2710
|
+
};
|
|
2711
|
+
changesSinceLastChat: Record<string, string>;
|
|
2712
|
+
shellConfigFiles: Record<string, string>;
|
|
2713
|
+
systemInfo: {
|
|
2714
|
+
platform: string;
|
|
2715
|
+
shell: string;
|
|
2716
|
+
nodeVersion: string;
|
|
2717
|
+
arch: string;
|
|
2718
|
+
homedir: string;
|
|
2719
|
+
cpus: number;
|
|
2720
|
+
};
|
|
2721
|
+
fileVersions: {
|
|
2722
|
+
path: string;
|
|
2723
|
+
content: string;
|
|
2724
|
+
}[][];
|
|
2725
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
2726
|
+
};
|
|
2727
|
+
agentContext: string;
|
|
2728
|
+
messageHistory: {
|
|
2729
|
+
content: string | ({
|
|
2730
|
+
type: "text";
|
|
2731
|
+
text: string;
|
|
2732
|
+
cache_control?: {
|
|
2733
|
+
type: "ephemeral";
|
|
2734
|
+
} | undefined;
|
|
2735
|
+
} | {
|
|
2736
|
+
type: "tool_use";
|
|
2737
|
+
name: string;
|
|
2738
|
+
id: string;
|
|
2739
|
+
input: Record<string, any>;
|
|
2740
|
+
cache_control?: {
|
|
2741
|
+
type: "ephemeral";
|
|
2742
|
+
} | undefined;
|
|
2743
|
+
} | {
|
|
2744
|
+
type: "tool_result";
|
|
2745
|
+
content: string;
|
|
2746
|
+
tool_use_id: string;
|
|
2747
|
+
cache_control?: {
|
|
2748
|
+
type: "ephemeral";
|
|
2749
|
+
} | undefined;
|
|
2750
|
+
} | {
|
|
2751
|
+
type: "image";
|
|
2752
|
+
source: {
|
|
2753
|
+
type: "base64";
|
|
2754
|
+
data: string;
|
|
2755
|
+
media_type: "image/jpeg";
|
|
2756
|
+
};
|
|
2757
|
+
cache_control?: {
|
|
2758
|
+
type: "ephemeral";
|
|
2759
|
+
} | undefined;
|
|
2760
|
+
})[];
|
|
2761
|
+
role: "user" | "assistant";
|
|
2762
|
+
}[];
|
|
2763
|
+
};
|
|
2764
|
+
toolResults: {
|
|
2765
|
+
name: string;
|
|
2766
|
+
id: string;
|
|
2767
|
+
result: string;
|
|
2768
|
+
}[];
|
|
2769
|
+
authToken?: string | undefined;
|
|
2770
|
+
prompt?: string | undefined;
|
|
2771
|
+
}, {
|
|
2772
|
+
type: "prompt";
|
|
2773
|
+
fingerprintId: string;
|
|
2774
|
+
promptId: string;
|
|
2775
|
+
agentState: {
|
|
2776
|
+
fileContext: {
|
|
2777
|
+
currentWorkingDirectory: string;
|
|
2778
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
2779
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
2780
|
+
knowledgeFiles: Record<string, string>;
|
|
2781
|
+
gitChanges: {
|
|
2782
|
+
diff: string;
|
|
2783
|
+
status: string;
|
|
2784
|
+
diffCached: string;
|
|
2785
|
+
lastCommitMessages: string;
|
|
2786
|
+
};
|
|
2787
|
+
changesSinceLastChat: Record<string, string>;
|
|
2788
|
+
shellConfigFiles: Record<string, string>;
|
|
2789
|
+
systemInfo: {
|
|
2790
|
+
platform: string;
|
|
2791
|
+
shell: string;
|
|
2792
|
+
nodeVersion: string;
|
|
2793
|
+
arch: string;
|
|
2794
|
+
homedir: string;
|
|
2795
|
+
cpus: number;
|
|
2796
|
+
};
|
|
2797
|
+
fileVersions: {
|
|
2798
|
+
path: string;
|
|
2799
|
+
content: string;
|
|
2800
|
+
}[][];
|
|
2801
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
2802
|
+
};
|
|
2803
|
+
agentContext: string;
|
|
2804
|
+
messageHistory: {
|
|
2805
|
+
content: string | ({
|
|
2806
|
+
type: "text";
|
|
2807
|
+
text: string;
|
|
2808
|
+
cache_control?: {
|
|
2809
|
+
type: "ephemeral";
|
|
2810
|
+
} | undefined;
|
|
2811
|
+
} | {
|
|
2812
|
+
type: "tool_use";
|
|
2813
|
+
name: string;
|
|
2814
|
+
id: string;
|
|
2815
|
+
input: Record<string, any>;
|
|
2816
|
+
cache_control?: {
|
|
2817
|
+
type: "ephemeral";
|
|
2818
|
+
} | undefined;
|
|
2819
|
+
} | {
|
|
2820
|
+
type: "tool_result";
|
|
2821
|
+
content: string;
|
|
2822
|
+
tool_use_id: string;
|
|
2823
|
+
cache_control?: {
|
|
2824
|
+
type: "ephemeral";
|
|
2825
|
+
} | undefined;
|
|
2826
|
+
} | {
|
|
2827
|
+
type: "image";
|
|
2828
|
+
source: {
|
|
2829
|
+
type: "base64";
|
|
2830
|
+
data: string;
|
|
2831
|
+
media_type: "image/jpeg";
|
|
2832
|
+
};
|
|
2833
|
+
cache_control?: {
|
|
2834
|
+
type: "ephemeral";
|
|
2835
|
+
} | undefined;
|
|
2836
|
+
})[];
|
|
2837
|
+
role: "user" | "assistant";
|
|
2838
|
+
}[];
|
|
2839
|
+
};
|
|
2840
|
+
toolResults: {
|
|
2841
|
+
name: string;
|
|
2842
|
+
id: string;
|
|
2843
|
+
result: string;
|
|
2844
|
+
}[];
|
|
2845
|
+
authToken?: string | undefined;
|
|
2846
|
+
costMode?: "lite" | "normal" | "max" | undefined;
|
|
2847
|
+
prompt?: string | undefined;
|
|
2848
|
+
}>, z.ZodObject<{
|
|
2849
|
+
type: z.ZodLiteral<"read-files-response">;
|
|
2850
|
+
files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
2851
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
2852
|
+
}, "strip", z.ZodTypeAny, {
|
|
2853
|
+
type: "read-files-response";
|
|
2854
|
+
files: Record<string, string | null>;
|
|
2855
|
+
requestId?: string | undefined;
|
|
2856
|
+
}, {
|
|
2857
|
+
type: "read-files-response";
|
|
2858
|
+
files: Record<string, string | null>;
|
|
2859
|
+
requestId?: string | undefined;
|
|
2860
|
+
}>, z.ZodObject<{
|
|
2861
|
+
type: z.ZodLiteral<"init">;
|
|
2862
|
+
fingerprintId: z.ZodString;
|
|
2863
|
+
authToken: z.ZodOptional<z.ZodString>;
|
|
2864
|
+
fileContext: z.ZodObject<{
|
|
2865
|
+
currentWorkingDirectory: z.ZodString;
|
|
2866
|
+
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
2867
|
+
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
2868
|
+
knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
2869
|
+
userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2870
|
+
gitChanges: z.ZodObject<{
|
|
2871
|
+
status: z.ZodString;
|
|
2872
|
+
diff: z.ZodString;
|
|
2873
|
+
diffCached: z.ZodString;
|
|
2874
|
+
lastCommitMessages: z.ZodString;
|
|
2875
|
+
}, "strip", z.ZodTypeAny, {
|
|
2876
|
+
diff: string;
|
|
2877
|
+
status: string;
|
|
2878
|
+
diffCached: string;
|
|
2879
|
+
lastCommitMessages: string;
|
|
2880
|
+
}, {
|
|
2881
|
+
diff: string;
|
|
2882
|
+
status: string;
|
|
2883
|
+
diffCached: string;
|
|
2884
|
+
lastCommitMessages: string;
|
|
2885
|
+
}>;
|
|
2886
|
+
changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
2887
|
+
shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
2888
|
+
systemInfo: z.ZodObject<{
|
|
2889
|
+
platform: z.ZodString;
|
|
2890
|
+
shell: z.ZodString;
|
|
2891
|
+
nodeVersion: z.ZodString;
|
|
2892
|
+
arch: z.ZodString;
|
|
2893
|
+
homedir: z.ZodString;
|
|
2894
|
+
cpus: z.ZodNumber;
|
|
2895
|
+
}, "strip", z.ZodTypeAny, {
|
|
2896
|
+
platform: string;
|
|
2897
|
+
shell: string;
|
|
2898
|
+
nodeVersion: string;
|
|
2899
|
+
arch: string;
|
|
2900
|
+
homedir: string;
|
|
2901
|
+
cpus: number;
|
|
2902
|
+
}, {
|
|
2903
|
+
platform: string;
|
|
2904
|
+
shell: string;
|
|
2905
|
+
nodeVersion: string;
|
|
2906
|
+
arch: string;
|
|
2907
|
+
homedir: string;
|
|
2908
|
+
cpus: number;
|
|
2909
|
+
}>;
|
|
2910
|
+
fileVersions: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
2911
|
+
path: z.ZodString;
|
|
2912
|
+
content: z.ZodString;
|
|
2913
|
+
}, "strip", z.ZodTypeAny, {
|
|
2914
|
+
path: string;
|
|
2915
|
+
content: string;
|
|
2916
|
+
}, {
|
|
2917
|
+
path: string;
|
|
2918
|
+
content: string;
|
|
2919
|
+
}>, "many">, "many">;
|
|
2920
|
+
}, "strip", z.ZodTypeAny, {
|
|
2921
|
+
currentWorkingDirectory: string;
|
|
2922
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
2923
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
2924
|
+
knowledgeFiles: Record<string, string>;
|
|
2925
|
+
gitChanges: {
|
|
2926
|
+
diff: string;
|
|
2927
|
+
status: string;
|
|
2928
|
+
diffCached: string;
|
|
2929
|
+
lastCommitMessages: string;
|
|
2930
|
+
};
|
|
1627
2931
|
changesSinceLastChat: Record<string, string>;
|
|
1628
2932
|
shellConfigFiles: Record<string, string>;
|
|
1629
2933
|
systemInfo: {
|
|
@@ -1639,9 +2943,34 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1639
2943
|
content: string;
|
|
1640
2944
|
}[][];
|
|
1641
2945
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1642
|
-
}
|
|
1643
|
-
|
|
1644
|
-
|
|
2946
|
+
}, {
|
|
2947
|
+
currentWorkingDirectory: string;
|
|
2948
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
2949
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
2950
|
+
knowledgeFiles: Record<string, string>;
|
|
2951
|
+
gitChanges: {
|
|
2952
|
+
diff: string;
|
|
2953
|
+
status: string;
|
|
2954
|
+
diffCached: string;
|
|
2955
|
+
lastCommitMessages: string;
|
|
2956
|
+
};
|
|
2957
|
+
changesSinceLastChat: Record<string, string>;
|
|
2958
|
+
shellConfigFiles: Record<string, string>;
|
|
2959
|
+
systemInfo: {
|
|
2960
|
+
platform: string;
|
|
2961
|
+
shell: string;
|
|
2962
|
+
nodeVersion: string;
|
|
2963
|
+
arch: string;
|
|
2964
|
+
homedir: string;
|
|
2965
|
+
cpus: number;
|
|
2966
|
+
};
|
|
2967
|
+
fileVersions: {
|
|
2968
|
+
path: string;
|
|
2969
|
+
content: string;
|
|
2970
|
+
}[][];
|
|
2971
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
2972
|
+
}>;
|
|
2973
|
+
}, "strip", z.ZodTypeAny, {
|
|
1645
2974
|
type: "init";
|
|
1646
2975
|
fingerprintId: string;
|
|
1647
2976
|
fileContext: {
|
|
@@ -1650,8 +2979,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1650
2979
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1651
2980
|
knowledgeFiles: Record<string, string>;
|
|
1652
2981
|
gitChanges: {
|
|
1653
|
-
status: string;
|
|
1654
2982
|
diff: string;
|
|
2983
|
+
status: string;
|
|
1655
2984
|
diffCached: string;
|
|
1656
2985
|
lastCommitMessages: string;
|
|
1657
2986
|
};
|
|
@@ -1672,10 +3001,41 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1672
3001
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1673
3002
|
};
|
|
1674
3003
|
authToken?: string | undefined;
|
|
1675
|
-
}
|
|
1676
|
-
type:
|
|
1677
|
-
fingerprintId:
|
|
1678
|
-
|
|
3004
|
+
}, {
|
|
3005
|
+
type: "init";
|
|
3006
|
+
fingerprintId: string;
|
|
3007
|
+
fileContext: {
|
|
3008
|
+
currentWorkingDirectory: string;
|
|
3009
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
3010
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
3011
|
+
knowledgeFiles: Record<string, string>;
|
|
3012
|
+
gitChanges: {
|
|
3013
|
+
diff: string;
|
|
3014
|
+
status: string;
|
|
3015
|
+
diffCached: string;
|
|
3016
|
+
lastCommitMessages: string;
|
|
3017
|
+
};
|
|
3018
|
+
changesSinceLastChat: Record<string, string>;
|
|
3019
|
+
shellConfigFiles: Record<string, string>;
|
|
3020
|
+
systemInfo: {
|
|
3021
|
+
platform: string;
|
|
3022
|
+
shell: string;
|
|
3023
|
+
nodeVersion: string;
|
|
3024
|
+
arch: string;
|
|
3025
|
+
homedir: string;
|
|
3026
|
+
cpus: number;
|
|
3027
|
+
};
|
|
3028
|
+
fileVersions: {
|
|
3029
|
+
path: string;
|
|
3030
|
+
content: string;
|
|
3031
|
+
}[][];
|
|
3032
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
3033
|
+
};
|
|
3034
|
+
authToken?: string | undefined;
|
|
3035
|
+
}>, z.ZodObject<{
|
|
3036
|
+
type: z.ZodLiteral<"usage">;
|
|
3037
|
+
fingerprintId: z.ZodString;
|
|
3038
|
+
authToken: z.ZodOptional<z.ZodString>;
|
|
1679
3039
|
}, "strip", z.ZodTypeAny, {
|
|
1680
3040
|
type: "usage";
|
|
1681
3041
|
fingerprintId: string;
|
|
@@ -1706,11 +3066,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1706
3066
|
type: "user-input";
|
|
1707
3067
|
fingerprintId: string;
|
|
1708
3068
|
userInputId: string;
|
|
1709
|
-
changesAlreadyApplied: {
|
|
1710
|
-
type: "file" | "patch";
|
|
1711
|
-
filePath: string;
|
|
1712
|
-
content: string;
|
|
1713
|
-
}[];
|
|
1714
3069
|
messages: {
|
|
1715
3070
|
content: string | ({
|
|
1716
3071
|
type: "text";
|
|
@@ -1737,8 +3092,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1737
3092
|
type: "image";
|
|
1738
3093
|
source: {
|
|
1739
3094
|
type: "base64";
|
|
1740
|
-
media_type: "image/jpeg";
|
|
1741
3095
|
data: string;
|
|
3096
|
+
media_type: "image/jpeg";
|
|
1742
3097
|
};
|
|
1743
3098
|
cache_control?: {
|
|
1744
3099
|
type: "ephemeral";
|
|
@@ -1752,8 +3107,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1752
3107
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1753
3108
|
knowledgeFiles: Record<string, string>;
|
|
1754
3109
|
gitChanges: {
|
|
1755
|
-
status: string;
|
|
1756
3110
|
diff: string;
|
|
3111
|
+
status: string;
|
|
1757
3112
|
diffCached: string;
|
|
1758
3113
|
lastCommitMessages: string;
|
|
1759
3114
|
};
|
|
@@ -1773,8 +3128,90 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1773
3128
|
}[][];
|
|
1774
3129
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1775
3130
|
};
|
|
1776
|
-
|
|
3131
|
+
changesAlreadyApplied: {
|
|
3132
|
+
type: "patch" | "file";
|
|
3133
|
+
path: string;
|
|
3134
|
+
content: string;
|
|
3135
|
+
}[];
|
|
3136
|
+
costMode: "lite" | "normal" | "max";
|
|
3137
|
+
authToken?: string | undefined;
|
|
3138
|
+
} | {
|
|
3139
|
+
type: "prompt";
|
|
3140
|
+
fingerprintId: string;
|
|
3141
|
+
costMode: "lite" | "normal" | "max";
|
|
3142
|
+
promptId: string;
|
|
3143
|
+
agentState: {
|
|
3144
|
+
fileContext: {
|
|
3145
|
+
currentWorkingDirectory: string;
|
|
3146
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
3147
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
3148
|
+
knowledgeFiles: Record<string, string>;
|
|
3149
|
+
gitChanges: {
|
|
3150
|
+
diff: string;
|
|
3151
|
+
status: string;
|
|
3152
|
+
diffCached: string;
|
|
3153
|
+
lastCommitMessages: string;
|
|
3154
|
+
};
|
|
3155
|
+
changesSinceLastChat: Record<string, string>;
|
|
3156
|
+
shellConfigFiles: Record<string, string>;
|
|
3157
|
+
systemInfo: {
|
|
3158
|
+
platform: string;
|
|
3159
|
+
shell: string;
|
|
3160
|
+
nodeVersion: string;
|
|
3161
|
+
arch: string;
|
|
3162
|
+
homedir: string;
|
|
3163
|
+
cpus: number;
|
|
3164
|
+
};
|
|
3165
|
+
fileVersions: {
|
|
3166
|
+
path: string;
|
|
3167
|
+
content: string;
|
|
3168
|
+
}[][];
|
|
3169
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
3170
|
+
};
|
|
3171
|
+
agentContext: string;
|
|
3172
|
+
messageHistory: {
|
|
3173
|
+
content: string | ({
|
|
3174
|
+
type: "text";
|
|
3175
|
+
text: string;
|
|
3176
|
+
cache_control?: {
|
|
3177
|
+
type: "ephemeral";
|
|
3178
|
+
} | undefined;
|
|
3179
|
+
} | {
|
|
3180
|
+
type: "tool_use";
|
|
3181
|
+
name: string;
|
|
3182
|
+
id: string;
|
|
3183
|
+
input: Record<string, any>;
|
|
3184
|
+
cache_control?: {
|
|
3185
|
+
type: "ephemeral";
|
|
3186
|
+
} | undefined;
|
|
3187
|
+
} | {
|
|
3188
|
+
type: "tool_result";
|
|
3189
|
+
content: string;
|
|
3190
|
+
tool_use_id: string;
|
|
3191
|
+
cache_control?: {
|
|
3192
|
+
type: "ephemeral";
|
|
3193
|
+
} | undefined;
|
|
3194
|
+
} | {
|
|
3195
|
+
type: "image";
|
|
3196
|
+
source: {
|
|
3197
|
+
type: "base64";
|
|
3198
|
+
data: string;
|
|
3199
|
+
media_type: "image/jpeg";
|
|
3200
|
+
};
|
|
3201
|
+
cache_control?: {
|
|
3202
|
+
type: "ephemeral";
|
|
3203
|
+
} | undefined;
|
|
3204
|
+
})[];
|
|
3205
|
+
role: "user" | "assistant";
|
|
3206
|
+
}[];
|
|
3207
|
+
};
|
|
3208
|
+
toolResults: {
|
|
3209
|
+
name: string;
|
|
3210
|
+
id: string;
|
|
3211
|
+
result: string;
|
|
3212
|
+
}[];
|
|
1777
3213
|
authToken?: string | undefined;
|
|
3214
|
+
prompt?: string | undefined;
|
|
1778
3215
|
} | {
|
|
1779
3216
|
type: "read-files-response";
|
|
1780
3217
|
files: Record<string, string | null>;
|
|
@@ -1788,8 +3225,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1788
3225
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1789
3226
|
knowledgeFiles: Record<string, string>;
|
|
1790
3227
|
gitChanges: {
|
|
1791
|
-
status: string;
|
|
1792
3228
|
diff: string;
|
|
3229
|
+
status: string;
|
|
1793
3230
|
diffCached: string;
|
|
1794
3231
|
lastCommitMessages: string;
|
|
1795
3232
|
};
|
|
@@ -1827,11 +3264,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1827
3264
|
type: "user-input";
|
|
1828
3265
|
fingerprintId: string;
|
|
1829
3266
|
userInputId: string;
|
|
1830
|
-
changesAlreadyApplied: {
|
|
1831
|
-
type: "file" | "patch";
|
|
1832
|
-
filePath: string;
|
|
1833
|
-
content: string;
|
|
1834
|
-
}[];
|
|
1835
3267
|
messages: {
|
|
1836
3268
|
content: string | ({
|
|
1837
3269
|
type: "text";
|
|
@@ -1858,8 +3290,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1858
3290
|
type: "image";
|
|
1859
3291
|
source: {
|
|
1860
3292
|
type: "base64";
|
|
1861
|
-
media_type: "image/jpeg";
|
|
1862
3293
|
data: string;
|
|
3294
|
+
media_type: "image/jpeg";
|
|
1863
3295
|
};
|
|
1864
3296
|
cache_control?: {
|
|
1865
3297
|
type: "ephemeral";
|
|
@@ -1873,8 +3305,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1873
3305
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1874
3306
|
knowledgeFiles: Record<string, string>;
|
|
1875
3307
|
gitChanges: {
|
|
1876
|
-
status: string;
|
|
1877
3308
|
diff: string;
|
|
3309
|
+
status: string;
|
|
1878
3310
|
diffCached: string;
|
|
1879
3311
|
lastCommitMessages: string;
|
|
1880
3312
|
};
|
|
@@ -1894,8 +3326,90 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1894
3326
|
}[][];
|
|
1895
3327
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1896
3328
|
};
|
|
3329
|
+
changesAlreadyApplied: {
|
|
3330
|
+
type: "patch" | "file";
|
|
3331
|
+
path: string;
|
|
3332
|
+
content: string;
|
|
3333
|
+
}[];
|
|
3334
|
+
authToken?: string | undefined;
|
|
3335
|
+
costMode?: "lite" | "normal" | "max" | undefined;
|
|
3336
|
+
} | {
|
|
3337
|
+
type: "prompt";
|
|
3338
|
+
fingerprintId: string;
|
|
3339
|
+
promptId: string;
|
|
3340
|
+
agentState: {
|
|
3341
|
+
fileContext: {
|
|
3342
|
+
currentWorkingDirectory: string;
|
|
3343
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
3344
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
3345
|
+
knowledgeFiles: Record<string, string>;
|
|
3346
|
+
gitChanges: {
|
|
3347
|
+
diff: string;
|
|
3348
|
+
status: string;
|
|
3349
|
+
diffCached: string;
|
|
3350
|
+
lastCommitMessages: string;
|
|
3351
|
+
};
|
|
3352
|
+
changesSinceLastChat: Record<string, string>;
|
|
3353
|
+
shellConfigFiles: Record<string, string>;
|
|
3354
|
+
systemInfo: {
|
|
3355
|
+
platform: string;
|
|
3356
|
+
shell: string;
|
|
3357
|
+
nodeVersion: string;
|
|
3358
|
+
arch: string;
|
|
3359
|
+
homedir: string;
|
|
3360
|
+
cpus: number;
|
|
3361
|
+
};
|
|
3362
|
+
fileVersions: {
|
|
3363
|
+
path: string;
|
|
3364
|
+
content: string;
|
|
3365
|
+
}[][];
|
|
3366
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
3367
|
+
};
|
|
3368
|
+
agentContext: string;
|
|
3369
|
+
messageHistory: {
|
|
3370
|
+
content: string | ({
|
|
3371
|
+
type: "text";
|
|
3372
|
+
text: string;
|
|
3373
|
+
cache_control?: {
|
|
3374
|
+
type: "ephemeral";
|
|
3375
|
+
} | undefined;
|
|
3376
|
+
} | {
|
|
3377
|
+
type: "tool_use";
|
|
3378
|
+
name: string;
|
|
3379
|
+
id: string;
|
|
3380
|
+
input: Record<string, any>;
|
|
3381
|
+
cache_control?: {
|
|
3382
|
+
type: "ephemeral";
|
|
3383
|
+
} | undefined;
|
|
3384
|
+
} | {
|
|
3385
|
+
type: "tool_result";
|
|
3386
|
+
content: string;
|
|
3387
|
+
tool_use_id: string;
|
|
3388
|
+
cache_control?: {
|
|
3389
|
+
type: "ephemeral";
|
|
3390
|
+
} | undefined;
|
|
3391
|
+
} | {
|
|
3392
|
+
type: "image";
|
|
3393
|
+
source: {
|
|
3394
|
+
type: "base64";
|
|
3395
|
+
data: string;
|
|
3396
|
+
media_type: "image/jpeg";
|
|
3397
|
+
};
|
|
3398
|
+
cache_control?: {
|
|
3399
|
+
type: "ephemeral";
|
|
3400
|
+
} | undefined;
|
|
3401
|
+
})[];
|
|
3402
|
+
role: "user" | "assistant";
|
|
3403
|
+
}[];
|
|
3404
|
+
};
|
|
3405
|
+
toolResults: {
|
|
3406
|
+
name: string;
|
|
3407
|
+
id: string;
|
|
3408
|
+
result: string;
|
|
3409
|
+
}[];
|
|
1897
3410
|
authToken?: string | undefined;
|
|
1898
|
-
costMode?: "
|
|
3411
|
+
costMode?: "lite" | "normal" | "max" | undefined;
|
|
3412
|
+
prompt?: string | undefined;
|
|
1899
3413
|
} | {
|
|
1900
3414
|
type: "read-files-response";
|
|
1901
3415
|
files: Record<string, string | null>;
|
|
@@ -1909,8 +3423,8 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1909
3423
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
1910
3424
|
knowledgeFiles: Record<string, string>;
|
|
1911
3425
|
gitChanges: {
|
|
1912
|
-
status: string;
|
|
1913
3426
|
diff: string;
|
|
3427
|
+
status: string;
|
|
1914
3428
|
diffCached: string;
|
|
1915
3429
|
lastCommitMessages: string;
|
|
1916
3430
|
};
|
|
@@ -1982,28 +3496,28 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
1982
3496
|
response: z.ZodString;
|
|
1983
3497
|
changes: z.ZodArray<z.ZodObject<{
|
|
1984
3498
|
type: z.ZodEnum<["patch", "file"]>;
|
|
1985
|
-
|
|
3499
|
+
path: z.ZodString;
|
|
1986
3500
|
content: z.ZodString;
|
|
1987
3501
|
}, "strip", z.ZodTypeAny, {
|
|
1988
|
-
type: "
|
|
1989
|
-
|
|
3502
|
+
type: "patch" | "file";
|
|
3503
|
+
path: string;
|
|
1990
3504
|
content: string;
|
|
1991
3505
|
}, {
|
|
1992
|
-
type: "
|
|
1993
|
-
|
|
3506
|
+
type: "patch" | "file";
|
|
3507
|
+
path: string;
|
|
1994
3508
|
content: string;
|
|
1995
3509
|
}>, "many">;
|
|
1996
3510
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
1997
3511
|
type: z.ZodEnum<["patch", "file"]>;
|
|
1998
|
-
|
|
3512
|
+
path: z.ZodString;
|
|
1999
3513
|
content: z.ZodString;
|
|
2000
3514
|
}, "strip", z.ZodTypeAny, {
|
|
2001
|
-
type: "
|
|
2002
|
-
|
|
3515
|
+
type: "patch" | "file";
|
|
3516
|
+
path: string;
|
|
2003
3517
|
content: string;
|
|
2004
3518
|
}, {
|
|
2005
|
-
type: "
|
|
2006
|
-
|
|
3519
|
+
type: "patch" | "file";
|
|
3520
|
+
path: string;
|
|
2007
3521
|
content: string;
|
|
2008
3522
|
}>, "many">;
|
|
2009
3523
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
@@ -2027,15 +3541,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2027
3541
|
}>, "strip", z.ZodTypeAny, {
|
|
2028
3542
|
type: "response-complete";
|
|
2029
3543
|
userInputId: string;
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
filePath: string;
|
|
3544
|
+
changesAlreadyApplied: {
|
|
3545
|
+
type: "patch" | "file";
|
|
3546
|
+
path: string;
|
|
2034
3547
|
content: string;
|
|
2035
3548
|
}[];
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
3549
|
+
response: string;
|
|
3550
|
+
changes: {
|
|
3551
|
+
type: "patch" | "file";
|
|
3552
|
+
path: string;
|
|
2039
3553
|
content: string;
|
|
2040
3554
|
}[];
|
|
2041
3555
|
addedFileVersions: {
|
|
@@ -2052,15 +3566,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2052
3566
|
}, {
|
|
2053
3567
|
type: "response-complete";
|
|
2054
3568
|
userInputId: string;
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
filePath: string;
|
|
3569
|
+
changesAlreadyApplied: {
|
|
3570
|
+
type: "patch" | "file";
|
|
3571
|
+
path: string;
|
|
2059
3572
|
content: string;
|
|
2060
3573
|
}[];
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
3574
|
+
response: string;
|
|
3575
|
+
changes: {
|
|
3576
|
+
type: "patch" | "file";
|
|
3577
|
+
path: string;
|
|
2064
3578
|
content: string;
|
|
2065
3579
|
}[];
|
|
2066
3580
|
addedFileVersions: {
|
|
@@ -2074,59 +3588,692 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2074
3588
|
subscription_active?: boolean | undefined;
|
|
2075
3589
|
next_quota_reset?: Date | undefined;
|
|
2076
3590
|
session_credits_used?: number | undefined;
|
|
2077
|
-
}>, z.ZodObject<{
|
|
2078
|
-
type: z.ZodLiteral<"
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
3591
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
3592
|
+
type: z.ZodLiteral<"prompt-response">;
|
|
3593
|
+
promptId: z.ZodString;
|
|
3594
|
+
agentState: z.ZodObject<{
|
|
3595
|
+
agentContext: z.ZodString;
|
|
3596
|
+
fileContext: z.ZodObject<{
|
|
3597
|
+
currentWorkingDirectory: z.ZodString;
|
|
3598
|
+
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
3599
|
+
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
3600
|
+
knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
3601
|
+
userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3602
|
+
gitChanges: z.ZodObject<{
|
|
3603
|
+
status: z.ZodString;
|
|
3604
|
+
diff: z.ZodString;
|
|
3605
|
+
diffCached: z.ZodString;
|
|
3606
|
+
lastCommitMessages: z.ZodString;
|
|
3607
|
+
}, "strip", z.ZodTypeAny, {
|
|
3608
|
+
diff: string;
|
|
3609
|
+
status: string;
|
|
3610
|
+
diffCached: string;
|
|
3611
|
+
lastCommitMessages: string;
|
|
3612
|
+
}, {
|
|
3613
|
+
diff: string;
|
|
3614
|
+
status: string;
|
|
3615
|
+
diffCached: string;
|
|
3616
|
+
lastCommitMessages: string;
|
|
3617
|
+
}>;
|
|
3618
|
+
changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
3619
|
+
shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
3620
|
+
systemInfo: z.ZodObject<{
|
|
3621
|
+
platform: z.ZodString;
|
|
3622
|
+
shell: z.ZodString;
|
|
3623
|
+
nodeVersion: z.ZodString;
|
|
3624
|
+
arch: z.ZodString;
|
|
3625
|
+
homedir: z.ZodString;
|
|
3626
|
+
cpus: z.ZodNumber;
|
|
3627
|
+
}, "strip", z.ZodTypeAny, {
|
|
3628
|
+
platform: string;
|
|
3629
|
+
shell: string;
|
|
3630
|
+
nodeVersion: string;
|
|
3631
|
+
arch: string;
|
|
3632
|
+
homedir: string;
|
|
3633
|
+
cpus: number;
|
|
3634
|
+
}, {
|
|
3635
|
+
platform: string;
|
|
3636
|
+
shell: string;
|
|
3637
|
+
nodeVersion: string;
|
|
3638
|
+
arch: string;
|
|
3639
|
+
homedir: string;
|
|
3640
|
+
cpus: number;
|
|
3641
|
+
}>;
|
|
3642
|
+
fileVersions: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
3643
|
+
path: z.ZodString;
|
|
3644
|
+
content: z.ZodString;
|
|
3645
|
+
}, "strip", z.ZodTypeAny, {
|
|
3646
|
+
path: string;
|
|
3647
|
+
content: string;
|
|
3648
|
+
}, {
|
|
3649
|
+
path: string;
|
|
3650
|
+
content: string;
|
|
3651
|
+
}>, "many">, "many">;
|
|
3652
|
+
}, "strip", z.ZodTypeAny, {
|
|
3653
|
+
currentWorkingDirectory: string;
|
|
3654
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
3655
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
3656
|
+
knowledgeFiles: Record<string, string>;
|
|
3657
|
+
gitChanges: {
|
|
3658
|
+
diff: string;
|
|
3659
|
+
status: string;
|
|
3660
|
+
diffCached: string;
|
|
3661
|
+
lastCommitMessages: string;
|
|
3662
|
+
};
|
|
3663
|
+
changesSinceLastChat: Record<string, string>;
|
|
3664
|
+
shellConfigFiles: Record<string, string>;
|
|
3665
|
+
systemInfo: {
|
|
3666
|
+
platform: string;
|
|
3667
|
+
shell: string;
|
|
3668
|
+
nodeVersion: string;
|
|
3669
|
+
arch: string;
|
|
3670
|
+
homedir: string;
|
|
3671
|
+
cpus: number;
|
|
3672
|
+
};
|
|
3673
|
+
fileVersions: {
|
|
3674
|
+
path: string;
|
|
3675
|
+
content: string;
|
|
3676
|
+
}[][];
|
|
3677
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
3678
|
+
}, {
|
|
3679
|
+
currentWorkingDirectory: string;
|
|
3680
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
3681
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
3682
|
+
knowledgeFiles: Record<string, string>;
|
|
3683
|
+
gitChanges: {
|
|
3684
|
+
diff: string;
|
|
3685
|
+
status: string;
|
|
3686
|
+
diffCached: string;
|
|
3687
|
+
lastCommitMessages: string;
|
|
3688
|
+
};
|
|
3689
|
+
changesSinceLastChat: Record<string, string>;
|
|
3690
|
+
shellConfigFiles: Record<string, string>;
|
|
3691
|
+
systemInfo: {
|
|
3692
|
+
platform: string;
|
|
3693
|
+
shell: string;
|
|
3694
|
+
nodeVersion: string;
|
|
3695
|
+
arch: string;
|
|
3696
|
+
homedir: string;
|
|
3697
|
+
cpus: number;
|
|
3698
|
+
};
|
|
3699
|
+
fileVersions: {
|
|
3700
|
+
path: string;
|
|
3701
|
+
content: string;
|
|
3702
|
+
}[][];
|
|
3703
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
3704
|
+
}>;
|
|
3705
|
+
messageHistory: z.ZodArray<z.ZodObject<{
|
|
3706
|
+
role: z.ZodUnion<[z.ZodLiteral<"user">, z.ZodLiteral<"assistant">]>;
|
|
3707
|
+
content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
3708
|
+
type: z.ZodLiteral<"text">;
|
|
3709
|
+
text: z.ZodString;
|
|
3710
|
+
cache_control: z.ZodOptional<z.ZodObject<{
|
|
3711
|
+
type: z.ZodLiteral<"ephemeral">;
|
|
3712
|
+
}, "strip", z.ZodTypeAny, {
|
|
3713
|
+
type: "ephemeral";
|
|
3714
|
+
}, {
|
|
3715
|
+
type: "ephemeral";
|
|
3716
|
+
}>>;
|
|
3717
|
+
}, "strip", z.ZodTypeAny, {
|
|
3718
|
+
type: "text";
|
|
3719
|
+
text: string;
|
|
3720
|
+
cache_control?: {
|
|
3721
|
+
type: "ephemeral";
|
|
3722
|
+
} | undefined;
|
|
3723
|
+
}, {
|
|
3724
|
+
type: "text";
|
|
3725
|
+
text: string;
|
|
3726
|
+
cache_control?: {
|
|
3727
|
+
type: "ephemeral";
|
|
3728
|
+
} | undefined;
|
|
3729
|
+
}>, z.ZodObject<{
|
|
3730
|
+
type: z.ZodLiteral<"tool_use">;
|
|
3731
|
+
id: z.ZodString;
|
|
3732
|
+
name: z.ZodString;
|
|
3733
|
+
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
3734
|
+
cache_control: z.ZodOptional<z.ZodObject<{
|
|
3735
|
+
type: z.ZodLiteral<"ephemeral">;
|
|
3736
|
+
}, "strip", z.ZodTypeAny, {
|
|
3737
|
+
type: "ephemeral";
|
|
3738
|
+
}, {
|
|
3739
|
+
type: "ephemeral";
|
|
3740
|
+
}>>;
|
|
3741
|
+
}, "strip", z.ZodTypeAny, {
|
|
3742
|
+
type: "tool_use";
|
|
3743
|
+
name: string;
|
|
3744
|
+
id: string;
|
|
3745
|
+
input: Record<string, any>;
|
|
3746
|
+
cache_control?: {
|
|
3747
|
+
type: "ephemeral";
|
|
3748
|
+
} | undefined;
|
|
3749
|
+
}, {
|
|
3750
|
+
type: "tool_use";
|
|
3751
|
+
name: string;
|
|
3752
|
+
id: string;
|
|
3753
|
+
input: Record<string, any>;
|
|
3754
|
+
cache_control?: {
|
|
3755
|
+
type: "ephemeral";
|
|
3756
|
+
} | undefined;
|
|
3757
|
+
}>, z.ZodObject<{
|
|
3758
|
+
type: z.ZodLiteral<"tool_result">;
|
|
3759
|
+
tool_use_id: z.ZodString;
|
|
3760
|
+
content: z.ZodString;
|
|
3761
|
+
cache_control: z.ZodOptional<z.ZodObject<{
|
|
3762
|
+
type: z.ZodLiteral<"ephemeral">;
|
|
3763
|
+
}, "strip", z.ZodTypeAny, {
|
|
3764
|
+
type: "ephemeral";
|
|
3765
|
+
}, {
|
|
3766
|
+
type: "ephemeral";
|
|
3767
|
+
}>>;
|
|
3768
|
+
}, "strip", z.ZodTypeAny, {
|
|
3769
|
+
type: "tool_result";
|
|
3770
|
+
content: string;
|
|
3771
|
+
tool_use_id: string;
|
|
3772
|
+
cache_control?: {
|
|
3773
|
+
type: "ephemeral";
|
|
3774
|
+
} | undefined;
|
|
3775
|
+
}, {
|
|
3776
|
+
type: "tool_result";
|
|
3777
|
+
content: string;
|
|
3778
|
+
tool_use_id: string;
|
|
3779
|
+
cache_control?: {
|
|
3780
|
+
type: "ephemeral";
|
|
3781
|
+
} | undefined;
|
|
3782
|
+
}>, z.ZodObject<{
|
|
3783
|
+
type: z.ZodLiteral<"image">;
|
|
3784
|
+
source: z.ZodObject<{
|
|
3785
|
+
type: z.ZodLiteral<"base64">;
|
|
3786
|
+
media_type: z.ZodLiteral<"image/jpeg">;
|
|
3787
|
+
data: z.ZodString;
|
|
3788
|
+
}, "strip", z.ZodTypeAny, {
|
|
3789
|
+
type: "base64";
|
|
3790
|
+
data: string;
|
|
3791
|
+
media_type: "image/jpeg";
|
|
3792
|
+
}, {
|
|
3793
|
+
type: "base64";
|
|
3794
|
+
data: string;
|
|
3795
|
+
media_type: "image/jpeg";
|
|
3796
|
+
}>;
|
|
3797
|
+
cache_control: z.ZodOptional<z.ZodObject<{
|
|
3798
|
+
type: z.ZodLiteral<"ephemeral">;
|
|
3799
|
+
}, "strip", z.ZodTypeAny, {
|
|
3800
|
+
type: "ephemeral";
|
|
3801
|
+
}, {
|
|
3802
|
+
type: "ephemeral";
|
|
3803
|
+
}>>;
|
|
3804
|
+
}, "strip", z.ZodTypeAny, {
|
|
3805
|
+
type: "image";
|
|
3806
|
+
source: {
|
|
3807
|
+
type: "base64";
|
|
3808
|
+
data: string;
|
|
3809
|
+
media_type: "image/jpeg";
|
|
3810
|
+
};
|
|
3811
|
+
cache_control?: {
|
|
3812
|
+
type: "ephemeral";
|
|
3813
|
+
} | undefined;
|
|
3814
|
+
}, {
|
|
3815
|
+
type: "image";
|
|
3816
|
+
source: {
|
|
3817
|
+
type: "base64";
|
|
3818
|
+
data: string;
|
|
3819
|
+
media_type: "image/jpeg";
|
|
3820
|
+
};
|
|
3821
|
+
cache_control?: {
|
|
3822
|
+
type: "ephemeral";
|
|
3823
|
+
} | undefined;
|
|
3824
|
+
}>]>, "many">]>;
|
|
3825
|
+
}, "strip", z.ZodTypeAny, {
|
|
3826
|
+
content: string | ({
|
|
3827
|
+
type: "text";
|
|
3828
|
+
text: string;
|
|
3829
|
+
cache_control?: {
|
|
3830
|
+
type: "ephemeral";
|
|
3831
|
+
} | undefined;
|
|
3832
|
+
} | {
|
|
3833
|
+
type: "tool_use";
|
|
3834
|
+
name: string;
|
|
3835
|
+
id: string;
|
|
3836
|
+
input: Record<string, any>;
|
|
3837
|
+
cache_control?: {
|
|
3838
|
+
type: "ephemeral";
|
|
3839
|
+
} | undefined;
|
|
3840
|
+
} | {
|
|
3841
|
+
type: "tool_result";
|
|
3842
|
+
content: string;
|
|
3843
|
+
tool_use_id: string;
|
|
3844
|
+
cache_control?: {
|
|
3845
|
+
type: "ephemeral";
|
|
3846
|
+
} | undefined;
|
|
3847
|
+
} | {
|
|
3848
|
+
type: "image";
|
|
3849
|
+
source: {
|
|
3850
|
+
type: "base64";
|
|
3851
|
+
data: string;
|
|
3852
|
+
media_type: "image/jpeg";
|
|
3853
|
+
};
|
|
3854
|
+
cache_control?: {
|
|
3855
|
+
type: "ephemeral";
|
|
3856
|
+
} | undefined;
|
|
3857
|
+
})[];
|
|
3858
|
+
role: "user" | "assistant";
|
|
3859
|
+
}, {
|
|
3860
|
+
content: string | ({
|
|
3861
|
+
type: "text";
|
|
3862
|
+
text: string;
|
|
3863
|
+
cache_control?: {
|
|
3864
|
+
type: "ephemeral";
|
|
3865
|
+
} | undefined;
|
|
3866
|
+
} | {
|
|
3867
|
+
type: "tool_use";
|
|
3868
|
+
name: string;
|
|
3869
|
+
id: string;
|
|
3870
|
+
input: Record<string, any>;
|
|
3871
|
+
cache_control?: {
|
|
3872
|
+
type: "ephemeral";
|
|
3873
|
+
} | undefined;
|
|
3874
|
+
} | {
|
|
3875
|
+
type: "tool_result";
|
|
3876
|
+
content: string;
|
|
3877
|
+
tool_use_id: string;
|
|
3878
|
+
cache_control?: {
|
|
3879
|
+
type: "ephemeral";
|
|
3880
|
+
} | undefined;
|
|
3881
|
+
} | {
|
|
3882
|
+
type: "image";
|
|
3883
|
+
source: {
|
|
3884
|
+
type: "base64";
|
|
3885
|
+
data: string;
|
|
3886
|
+
media_type: "image/jpeg";
|
|
3887
|
+
};
|
|
3888
|
+
cache_control?: {
|
|
3889
|
+
type: "ephemeral";
|
|
3890
|
+
} | undefined;
|
|
3891
|
+
})[];
|
|
3892
|
+
role: "user" | "assistant";
|
|
3893
|
+
}>, "many">;
|
|
3894
|
+
}, "strip", z.ZodTypeAny, {
|
|
3895
|
+
fileContext: {
|
|
3896
|
+
currentWorkingDirectory: string;
|
|
3897
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
3898
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
3899
|
+
knowledgeFiles: Record<string, string>;
|
|
3900
|
+
gitChanges: {
|
|
3901
|
+
diff: string;
|
|
3902
|
+
status: string;
|
|
3903
|
+
diffCached: string;
|
|
3904
|
+
lastCommitMessages: string;
|
|
3905
|
+
};
|
|
3906
|
+
changesSinceLastChat: Record<string, string>;
|
|
3907
|
+
shellConfigFiles: Record<string, string>;
|
|
3908
|
+
systemInfo: {
|
|
3909
|
+
platform: string;
|
|
3910
|
+
shell: string;
|
|
3911
|
+
nodeVersion: string;
|
|
3912
|
+
arch: string;
|
|
3913
|
+
homedir: string;
|
|
3914
|
+
cpus: number;
|
|
3915
|
+
};
|
|
3916
|
+
fileVersions: {
|
|
3917
|
+
path: string;
|
|
3918
|
+
content: string;
|
|
3919
|
+
}[][];
|
|
3920
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
3921
|
+
};
|
|
3922
|
+
agentContext: string;
|
|
3923
|
+
messageHistory: {
|
|
3924
|
+
content: string | ({
|
|
3925
|
+
type: "text";
|
|
3926
|
+
text: string;
|
|
3927
|
+
cache_control?: {
|
|
3928
|
+
type: "ephemeral";
|
|
3929
|
+
} | undefined;
|
|
3930
|
+
} | {
|
|
3931
|
+
type: "tool_use";
|
|
3932
|
+
name: string;
|
|
3933
|
+
id: string;
|
|
3934
|
+
input: Record<string, any>;
|
|
3935
|
+
cache_control?: {
|
|
3936
|
+
type: "ephemeral";
|
|
3937
|
+
} | undefined;
|
|
3938
|
+
} | {
|
|
3939
|
+
type: "tool_result";
|
|
3940
|
+
content: string;
|
|
3941
|
+
tool_use_id: string;
|
|
3942
|
+
cache_control?: {
|
|
3943
|
+
type: "ephemeral";
|
|
3944
|
+
} | undefined;
|
|
3945
|
+
} | {
|
|
3946
|
+
type: "image";
|
|
3947
|
+
source: {
|
|
3948
|
+
type: "base64";
|
|
3949
|
+
data: string;
|
|
3950
|
+
media_type: "image/jpeg";
|
|
3951
|
+
};
|
|
3952
|
+
cache_control?: {
|
|
3953
|
+
type: "ephemeral";
|
|
3954
|
+
} | undefined;
|
|
3955
|
+
})[];
|
|
3956
|
+
role: "user" | "assistant";
|
|
3957
|
+
}[];
|
|
3958
|
+
}, {
|
|
3959
|
+
fileContext: {
|
|
3960
|
+
currentWorkingDirectory: string;
|
|
3961
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
3962
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
3963
|
+
knowledgeFiles: Record<string, string>;
|
|
3964
|
+
gitChanges: {
|
|
3965
|
+
diff: string;
|
|
3966
|
+
status: string;
|
|
3967
|
+
diffCached: string;
|
|
3968
|
+
lastCommitMessages: string;
|
|
3969
|
+
};
|
|
3970
|
+
changesSinceLastChat: Record<string, string>;
|
|
3971
|
+
shellConfigFiles: Record<string, string>;
|
|
3972
|
+
systemInfo: {
|
|
3973
|
+
platform: string;
|
|
3974
|
+
shell: string;
|
|
3975
|
+
nodeVersion: string;
|
|
3976
|
+
arch: string;
|
|
3977
|
+
homedir: string;
|
|
3978
|
+
cpus: number;
|
|
3979
|
+
};
|
|
3980
|
+
fileVersions: {
|
|
3981
|
+
path: string;
|
|
3982
|
+
content: string;
|
|
3983
|
+
}[][];
|
|
3984
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
3985
|
+
};
|
|
3986
|
+
agentContext: string;
|
|
3987
|
+
messageHistory: {
|
|
3988
|
+
content: string | ({
|
|
3989
|
+
type: "text";
|
|
3990
|
+
text: string;
|
|
3991
|
+
cache_control?: {
|
|
3992
|
+
type: "ephemeral";
|
|
3993
|
+
} | undefined;
|
|
3994
|
+
} | {
|
|
3995
|
+
type: "tool_use";
|
|
3996
|
+
name: string;
|
|
3997
|
+
id: string;
|
|
3998
|
+
input: Record<string, any>;
|
|
3999
|
+
cache_control?: {
|
|
4000
|
+
type: "ephemeral";
|
|
4001
|
+
} | undefined;
|
|
4002
|
+
} | {
|
|
4003
|
+
type: "tool_result";
|
|
4004
|
+
content: string;
|
|
4005
|
+
tool_use_id: string;
|
|
4006
|
+
cache_control?: {
|
|
4007
|
+
type: "ephemeral";
|
|
4008
|
+
} | undefined;
|
|
4009
|
+
} | {
|
|
4010
|
+
type: "image";
|
|
4011
|
+
source: {
|
|
4012
|
+
type: "base64";
|
|
4013
|
+
data: string;
|
|
4014
|
+
media_type: "image/jpeg";
|
|
4015
|
+
};
|
|
4016
|
+
cache_control?: {
|
|
4017
|
+
type: "ephemeral";
|
|
4018
|
+
} | undefined;
|
|
4019
|
+
})[];
|
|
4020
|
+
role: "user" | "assistant";
|
|
4021
|
+
}[];
|
|
4022
|
+
}>;
|
|
4023
|
+
toolCalls: z.ZodArray<z.ZodObject<{
|
|
4024
|
+
name: z.ZodString;
|
|
4025
|
+
parameters: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
4026
|
+
id: z.ZodString;
|
|
4027
|
+
}, "strip", z.ZodTypeAny, {
|
|
4028
|
+
name: string;
|
|
4029
|
+
id: string;
|
|
4030
|
+
parameters: Record<string, string>;
|
|
4031
|
+
}, {
|
|
4032
|
+
name: string;
|
|
4033
|
+
id: string;
|
|
4034
|
+
parameters: Record<string, string>;
|
|
4035
|
+
}>, "many">;
|
|
4036
|
+
toolResults: z.ZodArray<z.ZodObject<{
|
|
4037
|
+
name: z.ZodString;
|
|
4038
|
+
result: z.ZodString;
|
|
4039
|
+
id: z.ZodString;
|
|
4040
|
+
}, "strip", z.ZodTypeAny, {
|
|
4041
|
+
name: string;
|
|
4042
|
+
id: string;
|
|
4043
|
+
result: string;
|
|
4044
|
+
}, {
|
|
4045
|
+
name: string;
|
|
4046
|
+
id: string;
|
|
4047
|
+
result: string;
|
|
4048
|
+
}>, "many">;
|
|
4049
|
+
}, {
|
|
4050
|
+
usage: z.ZodOptional<z.ZodNumber>;
|
|
4051
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
4052
|
+
referralLink: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4053
|
+
subscription_active: z.ZodOptional<z.ZodBoolean>;
|
|
4054
|
+
next_quota_reset: z.ZodOptional<z.ZodDate>;
|
|
4055
|
+
session_credits_used: z.ZodOptional<z.ZodNumber>;
|
|
4056
|
+
}>, "strip", z.ZodTypeAny, {
|
|
4057
|
+
type: "prompt-response";
|
|
4058
|
+
promptId: string;
|
|
4059
|
+
agentState: {
|
|
4060
|
+
fileContext: {
|
|
4061
|
+
currentWorkingDirectory: string;
|
|
4062
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
4063
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
4064
|
+
knowledgeFiles: Record<string, string>;
|
|
4065
|
+
gitChanges: {
|
|
4066
|
+
diff: string;
|
|
4067
|
+
status: string;
|
|
4068
|
+
diffCached: string;
|
|
4069
|
+
lastCommitMessages: string;
|
|
4070
|
+
};
|
|
4071
|
+
changesSinceLastChat: Record<string, string>;
|
|
4072
|
+
shellConfigFiles: Record<string, string>;
|
|
4073
|
+
systemInfo: {
|
|
4074
|
+
platform: string;
|
|
4075
|
+
shell: string;
|
|
4076
|
+
nodeVersion: string;
|
|
4077
|
+
arch: string;
|
|
4078
|
+
homedir: string;
|
|
4079
|
+
cpus: number;
|
|
4080
|
+
};
|
|
4081
|
+
fileVersions: {
|
|
4082
|
+
path: string;
|
|
4083
|
+
content: string;
|
|
4084
|
+
}[][];
|
|
4085
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
4086
|
+
};
|
|
4087
|
+
agentContext: string;
|
|
4088
|
+
messageHistory: {
|
|
4089
|
+
content: string | ({
|
|
4090
|
+
type: "text";
|
|
4091
|
+
text: string;
|
|
4092
|
+
cache_control?: {
|
|
4093
|
+
type: "ephemeral";
|
|
4094
|
+
} | undefined;
|
|
4095
|
+
} | {
|
|
4096
|
+
type: "tool_use";
|
|
4097
|
+
name: string;
|
|
4098
|
+
id: string;
|
|
4099
|
+
input: Record<string, any>;
|
|
4100
|
+
cache_control?: {
|
|
4101
|
+
type: "ephemeral";
|
|
4102
|
+
} | undefined;
|
|
4103
|
+
} | {
|
|
4104
|
+
type: "tool_result";
|
|
4105
|
+
content: string;
|
|
4106
|
+
tool_use_id: string;
|
|
4107
|
+
cache_control?: {
|
|
4108
|
+
type: "ephemeral";
|
|
4109
|
+
} | undefined;
|
|
4110
|
+
} | {
|
|
4111
|
+
type: "image";
|
|
4112
|
+
source: {
|
|
4113
|
+
type: "base64";
|
|
4114
|
+
data: string;
|
|
4115
|
+
media_type: "image/jpeg";
|
|
4116
|
+
};
|
|
4117
|
+
cache_control?: {
|
|
4118
|
+
type: "ephemeral";
|
|
4119
|
+
} | undefined;
|
|
4120
|
+
})[];
|
|
4121
|
+
role: "user" | "assistant";
|
|
4122
|
+
}[];
|
|
4123
|
+
};
|
|
4124
|
+
toolResults: {
|
|
4125
|
+
name: string;
|
|
4126
|
+
id: string;
|
|
4127
|
+
result: string;
|
|
4128
|
+
}[];
|
|
4129
|
+
toolCalls: {
|
|
4130
|
+
name: string;
|
|
4131
|
+
id: string;
|
|
4132
|
+
parameters: Record<string, string>;
|
|
4133
|
+
}[];
|
|
4134
|
+
usage?: number | undefined;
|
|
4135
|
+
limit?: number | undefined;
|
|
4136
|
+
referralLink?: string | undefined;
|
|
4137
|
+
subscription_active?: boolean | undefined;
|
|
4138
|
+
next_quota_reset?: Date | undefined;
|
|
4139
|
+
session_credits_used?: number | undefined;
|
|
4140
|
+
}, {
|
|
4141
|
+
type: "prompt-response";
|
|
4142
|
+
promptId: string;
|
|
4143
|
+
agentState: {
|
|
4144
|
+
fileContext: {
|
|
4145
|
+
currentWorkingDirectory: string;
|
|
4146
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
4147
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
4148
|
+
knowledgeFiles: Record<string, string>;
|
|
4149
|
+
gitChanges: {
|
|
4150
|
+
diff: string;
|
|
4151
|
+
status: string;
|
|
4152
|
+
diffCached: string;
|
|
4153
|
+
lastCommitMessages: string;
|
|
4154
|
+
};
|
|
4155
|
+
changesSinceLastChat: Record<string, string>;
|
|
4156
|
+
shellConfigFiles: Record<string, string>;
|
|
4157
|
+
systemInfo: {
|
|
4158
|
+
platform: string;
|
|
4159
|
+
shell: string;
|
|
4160
|
+
nodeVersion: string;
|
|
4161
|
+
arch: string;
|
|
4162
|
+
homedir: string;
|
|
4163
|
+
cpus: number;
|
|
4164
|
+
};
|
|
4165
|
+
fileVersions: {
|
|
4166
|
+
path: string;
|
|
4167
|
+
content: string;
|
|
4168
|
+
}[][];
|
|
4169
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
4170
|
+
};
|
|
4171
|
+
agentContext: string;
|
|
4172
|
+
messageHistory: {
|
|
4173
|
+
content: string | ({
|
|
4174
|
+
type: "text";
|
|
4175
|
+
text: string;
|
|
4176
|
+
cache_control?: {
|
|
4177
|
+
type: "ephemeral";
|
|
4178
|
+
} | undefined;
|
|
4179
|
+
} | {
|
|
4180
|
+
type: "tool_use";
|
|
4181
|
+
name: string;
|
|
4182
|
+
id: string;
|
|
4183
|
+
input: Record<string, any>;
|
|
4184
|
+
cache_control?: {
|
|
4185
|
+
type: "ephemeral";
|
|
4186
|
+
} | undefined;
|
|
4187
|
+
} | {
|
|
4188
|
+
type: "tool_result";
|
|
4189
|
+
content: string;
|
|
4190
|
+
tool_use_id: string;
|
|
4191
|
+
cache_control?: {
|
|
4192
|
+
type: "ephemeral";
|
|
4193
|
+
} | undefined;
|
|
4194
|
+
} | {
|
|
4195
|
+
type: "image";
|
|
4196
|
+
source: {
|
|
4197
|
+
type: "base64";
|
|
4198
|
+
data: string;
|
|
4199
|
+
media_type: "image/jpeg";
|
|
4200
|
+
};
|
|
4201
|
+
cache_control?: {
|
|
4202
|
+
type: "ephemeral";
|
|
4203
|
+
} | undefined;
|
|
4204
|
+
})[];
|
|
4205
|
+
role: "user" | "assistant";
|
|
4206
|
+
}[];
|
|
4207
|
+
};
|
|
4208
|
+
toolResults: {
|
|
4209
|
+
name: string;
|
|
4210
|
+
id: string;
|
|
4211
|
+
result: string;
|
|
4212
|
+
}[];
|
|
4213
|
+
toolCalls: {
|
|
4214
|
+
name: string;
|
|
4215
|
+
id: string;
|
|
4216
|
+
parameters: Record<string, string>;
|
|
4217
|
+
}[];
|
|
4218
|
+
usage?: number | undefined;
|
|
4219
|
+
limit?: number | undefined;
|
|
4220
|
+
referralLink?: string | undefined;
|
|
4221
|
+
subscription_active?: boolean | undefined;
|
|
4222
|
+
next_quota_reset?: Date | undefined;
|
|
4223
|
+
session_credits_used?: number | undefined;
|
|
4224
|
+
}>, z.ZodObject<{
|
|
4225
|
+
type: z.ZodLiteral<"read-files">;
|
|
4226
|
+
filePaths: z.ZodArray<z.ZodString, "many">;
|
|
4227
|
+
requestId: z.ZodString;
|
|
4228
|
+
}, "strip", z.ZodTypeAny, {
|
|
4229
|
+
type: "read-files";
|
|
4230
|
+
requestId: string;
|
|
4231
|
+
filePaths: string[];
|
|
4232
|
+
}, {
|
|
4233
|
+
type: "read-files";
|
|
4234
|
+
requestId: string;
|
|
4235
|
+
filePaths: string[];
|
|
4236
|
+
}>, z.ZodObject<{
|
|
4237
|
+
type: z.ZodLiteral<"tool-call">;
|
|
4238
|
+
userInputId: z.ZodString;
|
|
4239
|
+
response: z.ZodString;
|
|
4240
|
+
data: z.ZodObject<{
|
|
4241
|
+
name: z.ZodString;
|
|
4242
|
+
id: z.ZodString;
|
|
4243
|
+
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
4244
|
+
}, "strip", z.ZodTypeAny, {
|
|
4245
|
+
name: string;
|
|
4246
|
+
id: string;
|
|
4247
|
+
input: Record<string, any>;
|
|
4248
|
+
}, {
|
|
4249
|
+
name: string;
|
|
4250
|
+
id: string;
|
|
4251
|
+
input: Record<string, any>;
|
|
4252
|
+
}>;
|
|
4253
|
+
changes: z.ZodArray<z.ZodObject<{
|
|
4254
|
+
type: z.ZodEnum<["patch", "file"]>;
|
|
4255
|
+
path: z.ZodString;
|
|
4256
|
+
content: z.ZodString;
|
|
4257
|
+
}, "strip", z.ZodTypeAny, {
|
|
4258
|
+
type: "patch" | "file";
|
|
4259
|
+
path: string;
|
|
4260
|
+
content: string;
|
|
4261
|
+
}, {
|
|
4262
|
+
type: "patch" | "file";
|
|
4263
|
+
path: string;
|
|
2117
4264
|
content: string;
|
|
2118
4265
|
}>, "many">;
|
|
2119
4266
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
2120
4267
|
type: z.ZodEnum<["patch", "file"]>;
|
|
2121
|
-
|
|
4268
|
+
path: z.ZodString;
|
|
2122
4269
|
content: z.ZodString;
|
|
2123
4270
|
}, "strip", z.ZodTypeAny, {
|
|
2124
|
-
type: "
|
|
2125
|
-
|
|
4271
|
+
type: "patch" | "file";
|
|
4272
|
+
path: string;
|
|
2126
4273
|
content: string;
|
|
2127
4274
|
}, {
|
|
2128
|
-
type: "
|
|
2129
|
-
|
|
4275
|
+
type: "patch" | "file";
|
|
4276
|
+
path: string;
|
|
2130
4277
|
content: string;
|
|
2131
4278
|
}>, "many">;
|
|
2132
4279
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
@@ -2148,15 +4295,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2148
4295
|
input: Record<string, any>;
|
|
2149
4296
|
};
|
|
2150
4297
|
userInputId: string;
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
filePath: string;
|
|
4298
|
+
changesAlreadyApplied: {
|
|
4299
|
+
type: "patch" | "file";
|
|
4300
|
+
path: string;
|
|
2155
4301
|
content: string;
|
|
2156
4302
|
}[];
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
4303
|
+
response: string;
|
|
4304
|
+
changes: {
|
|
4305
|
+
type: "patch" | "file";
|
|
4306
|
+
path: string;
|
|
2160
4307
|
content: string;
|
|
2161
4308
|
}[];
|
|
2162
4309
|
addedFileVersions: {
|
|
@@ -2172,15 +4319,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2172
4319
|
input: Record<string, any>;
|
|
2173
4320
|
};
|
|
2174
4321
|
userInputId: string;
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
filePath: string;
|
|
4322
|
+
changesAlreadyApplied: {
|
|
4323
|
+
type: "patch" | "file";
|
|
4324
|
+
path: string;
|
|
2179
4325
|
content: string;
|
|
2180
4326
|
}[];
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
4327
|
+
response: string;
|
|
4328
|
+
changes: {
|
|
4329
|
+
type: "patch" | "file";
|
|
4330
|
+
path: string;
|
|
2184
4331
|
content: string;
|
|
2185
4332
|
}[];
|
|
2186
4333
|
addedFileVersions: {
|
|
@@ -2266,11 +4413,11 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2266
4413
|
type: z.ZodLiteral<"action-error">;
|
|
2267
4414
|
message: z.ZodString;
|
|
2268
4415
|
}, "strip", z.ZodTypeAny, {
|
|
2269
|
-
message: string;
|
|
2270
4416
|
type: "action-error";
|
|
2271
|
-
}, {
|
|
2272
4417
|
message: string;
|
|
4418
|
+
}, {
|
|
2273
4419
|
type: "action-error";
|
|
4420
|
+
message: string;
|
|
2274
4421
|
}>, z.ZodObject<{
|
|
2275
4422
|
type: z.ZodLiteral<"commit-message-response">;
|
|
2276
4423
|
commitMessage: z.ZodString;
|
|
@@ -2302,15 +4449,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2302
4449
|
} | {
|
|
2303
4450
|
type: "response-complete";
|
|
2304
4451
|
userInputId: string;
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
filePath: string;
|
|
4452
|
+
changesAlreadyApplied: {
|
|
4453
|
+
type: "patch" | "file";
|
|
4454
|
+
path: string;
|
|
2309
4455
|
content: string;
|
|
2310
4456
|
}[];
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
4457
|
+
response: string;
|
|
4458
|
+
changes: {
|
|
4459
|
+
type: "patch" | "file";
|
|
4460
|
+
path: string;
|
|
2314
4461
|
content: string;
|
|
2315
4462
|
}[];
|
|
2316
4463
|
addedFileVersions: {
|
|
@@ -2324,6 +4471,90 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2324
4471
|
subscription_active?: boolean | undefined;
|
|
2325
4472
|
next_quota_reset?: Date | undefined;
|
|
2326
4473
|
session_credits_used?: number | undefined;
|
|
4474
|
+
} | {
|
|
4475
|
+
type: "prompt-response";
|
|
4476
|
+
promptId: string;
|
|
4477
|
+
agentState: {
|
|
4478
|
+
fileContext: {
|
|
4479
|
+
currentWorkingDirectory: string;
|
|
4480
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
4481
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
4482
|
+
knowledgeFiles: Record<string, string>;
|
|
4483
|
+
gitChanges: {
|
|
4484
|
+
diff: string;
|
|
4485
|
+
status: string;
|
|
4486
|
+
diffCached: string;
|
|
4487
|
+
lastCommitMessages: string;
|
|
4488
|
+
};
|
|
4489
|
+
changesSinceLastChat: Record<string, string>;
|
|
4490
|
+
shellConfigFiles: Record<string, string>;
|
|
4491
|
+
systemInfo: {
|
|
4492
|
+
platform: string;
|
|
4493
|
+
shell: string;
|
|
4494
|
+
nodeVersion: string;
|
|
4495
|
+
arch: string;
|
|
4496
|
+
homedir: string;
|
|
4497
|
+
cpus: number;
|
|
4498
|
+
};
|
|
4499
|
+
fileVersions: {
|
|
4500
|
+
path: string;
|
|
4501
|
+
content: string;
|
|
4502
|
+
}[][];
|
|
4503
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
4504
|
+
};
|
|
4505
|
+
agentContext: string;
|
|
4506
|
+
messageHistory: {
|
|
4507
|
+
content: string | ({
|
|
4508
|
+
type: "text";
|
|
4509
|
+
text: string;
|
|
4510
|
+
cache_control?: {
|
|
4511
|
+
type: "ephemeral";
|
|
4512
|
+
} | undefined;
|
|
4513
|
+
} | {
|
|
4514
|
+
type: "tool_use";
|
|
4515
|
+
name: string;
|
|
4516
|
+
id: string;
|
|
4517
|
+
input: Record<string, any>;
|
|
4518
|
+
cache_control?: {
|
|
4519
|
+
type: "ephemeral";
|
|
4520
|
+
} | undefined;
|
|
4521
|
+
} | {
|
|
4522
|
+
type: "tool_result";
|
|
4523
|
+
content: string;
|
|
4524
|
+
tool_use_id: string;
|
|
4525
|
+
cache_control?: {
|
|
4526
|
+
type: "ephemeral";
|
|
4527
|
+
} | undefined;
|
|
4528
|
+
} | {
|
|
4529
|
+
type: "image";
|
|
4530
|
+
source: {
|
|
4531
|
+
type: "base64";
|
|
4532
|
+
data: string;
|
|
4533
|
+
media_type: "image/jpeg";
|
|
4534
|
+
};
|
|
4535
|
+
cache_control?: {
|
|
4536
|
+
type: "ephemeral";
|
|
4537
|
+
} | undefined;
|
|
4538
|
+
})[];
|
|
4539
|
+
role: "user" | "assistant";
|
|
4540
|
+
}[];
|
|
4541
|
+
};
|
|
4542
|
+
toolResults: {
|
|
4543
|
+
name: string;
|
|
4544
|
+
id: string;
|
|
4545
|
+
result: string;
|
|
4546
|
+
}[];
|
|
4547
|
+
toolCalls: {
|
|
4548
|
+
name: string;
|
|
4549
|
+
id: string;
|
|
4550
|
+
parameters: Record<string, string>;
|
|
4551
|
+
}[];
|
|
4552
|
+
usage?: number | undefined;
|
|
4553
|
+
limit?: number | undefined;
|
|
4554
|
+
referralLink?: string | undefined;
|
|
4555
|
+
subscription_active?: boolean | undefined;
|
|
4556
|
+
next_quota_reset?: Date | undefined;
|
|
4557
|
+
session_credits_used?: number | undefined;
|
|
2327
4558
|
} | {
|
|
2328
4559
|
type: "response-chunk";
|
|
2329
4560
|
userInputId: string;
|
|
@@ -2340,15 +4571,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2340
4571
|
input: Record<string, any>;
|
|
2341
4572
|
};
|
|
2342
4573
|
userInputId: string;
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
filePath: string;
|
|
4574
|
+
changesAlreadyApplied: {
|
|
4575
|
+
type: "patch" | "file";
|
|
4576
|
+
path: string;
|
|
2347
4577
|
content: string;
|
|
2348
4578
|
}[];
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
4579
|
+
response: string;
|
|
4580
|
+
changes: {
|
|
4581
|
+
type: "patch" | "file";
|
|
4582
|
+
path: string;
|
|
2352
4583
|
content: string;
|
|
2353
4584
|
}[];
|
|
2354
4585
|
addedFileVersions: {
|
|
@@ -2365,8 +4596,8 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2365
4596
|
isUpToDate: boolean;
|
|
2366
4597
|
latestVersion: string;
|
|
2367
4598
|
} | {
|
|
2368
|
-
message: string;
|
|
2369
4599
|
type: "action-error";
|
|
4600
|
+
message: string;
|
|
2370
4601
|
} | {
|
|
2371
4602
|
type: "commit-message-response";
|
|
2372
4603
|
commitMessage: string;
|
|
@@ -2392,15 +4623,15 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2392
4623
|
} | {
|
|
2393
4624
|
type: "response-complete";
|
|
2394
4625
|
userInputId: string;
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
filePath: string;
|
|
4626
|
+
changesAlreadyApplied: {
|
|
4627
|
+
type: "patch" | "file";
|
|
4628
|
+
path: string;
|
|
2399
4629
|
content: string;
|
|
2400
4630
|
}[];
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
4631
|
+
response: string;
|
|
4632
|
+
changes: {
|
|
4633
|
+
type: "patch" | "file";
|
|
4634
|
+
path: string;
|
|
2404
4635
|
content: string;
|
|
2405
4636
|
}[];
|
|
2406
4637
|
addedFileVersions: {
|
|
@@ -2414,6 +4645,90 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2414
4645
|
subscription_active?: boolean | undefined;
|
|
2415
4646
|
next_quota_reset?: Date | undefined;
|
|
2416
4647
|
session_credits_used?: number | undefined;
|
|
4648
|
+
} | {
|
|
4649
|
+
type: "prompt-response";
|
|
4650
|
+
promptId: string;
|
|
4651
|
+
agentState: {
|
|
4652
|
+
fileContext: {
|
|
4653
|
+
currentWorkingDirectory: string;
|
|
4654
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
4655
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
4656
|
+
knowledgeFiles: Record<string, string>;
|
|
4657
|
+
gitChanges: {
|
|
4658
|
+
diff: string;
|
|
4659
|
+
status: string;
|
|
4660
|
+
diffCached: string;
|
|
4661
|
+
lastCommitMessages: string;
|
|
4662
|
+
};
|
|
4663
|
+
changesSinceLastChat: Record<string, string>;
|
|
4664
|
+
shellConfigFiles: Record<string, string>;
|
|
4665
|
+
systemInfo: {
|
|
4666
|
+
platform: string;
|
|
4667
|
+
shell: string;
|
|
4668
|
+
nodeVersion: string;
|
|
4669
|
+
arch: string;
|
|
4670
|
+
homedir: string;
|
|
4671
|
+
cpus: number;
|
|
4672
|
+
};
|
|
4673
|
+
fileVersions: {
|
|
4674
|
+
path: string;
|
|
4675
|
+
content: string;
|
|
4676
|
+
}[][];
|
|
4677
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
4678
|
+
};
|
|
4679
|
+
agentContext: string;
|
|
4680
|
+
messageHistory: {
|
|
4681
|
+
content: string | ({
|
|
4682
|
+
type: "text";
|
|
4683
|
+
text: string;
|
|
4684
|
+
cache_control?: {
|
|
4685
|
+
type: "ephemeral";
|
|
4686
|
+
} | undefined;
|
|
4687
|
+
} | {
|
|
4688
|
+
type: "tool_use";
|
|
4689
|
+
name: string;
|
|
4690
|
+
id: string;
|
|
4691
|
+
input: Record<string, any>;
|
|
4692
|
+
cache_control?: {
|
|
4693
|
+
type: "ephemeral";
|
|
4694
|
+
} | undefined;
|
|
4695
|
+
} | {
|
|
4696
|
+
type: "tool_result";
|
|
4697
|
+
content: string;
|
|
4698
|
+
tool_use_id: string;
|
|
4699
|
+
cache_control?: {
|
|
4700
|
+
type: "ephemeral";
|
|
4701
|
+
} | undefined;
|
|
4702
|
+
} | {
|
|
4703
|
+
type: "image";
|
|
4704
|
+
source: {
|
|
4705
|
+
type: "base64";
|
|
4706
|
+
data: string;
|
|
4707
|
+
media_type: "image/jpeg";
|
|
4708
|
+
};
|
|
4709
|
+
cache_control?: {
|
|
4710
|
+
type: "ephemeral";
|
|
4711
|
+
} | undefined;
|
|
4712
|
+
})[];
|
|
4713
|
+
role: "user" | "assistant";
|
|
4714
|
+
}[];
|
|
4715
|
+
};
|
|
4716
|
+
toolResults: {
|
|
4717
|
+
name: string;
|
|
4718
|
+
id: string;
|
|
4719
|
+
result: string;
|
|
4720
|
+
}[];
|
|
4721
|
+
toolCalls: {
|
|
4722
|
+
name: string;
|
|
4723
|
+
id: string;
|
|
4724
|
+
parameters: Record<string, string>;
|
|
4725
|
+
}[];
|
|
4726
|
+
usage?: number | undefined;
|
|
4727
|
+
limit?: number | undefined;
|
|
4728
|
+
referralLink?: string | undefined;
|
|
4729
|
+
subscription_active?: boolean | undefined;
|
|
4730
|
+
next_quota_reset?: Date | undefined;
|
|
4731
|
+
session_credits_used?: number | undefined;
|
|
2417
4732
|
} | {
|
|
2418
4733
|
type: "response-chunk";
|
|
2419
4734
|
userInputId: string;
|
|
@@ -2429,110 +4744,625 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2429
4744
|
id: string;
|
|
2430
4745
|
input: Record<string, any>;
|
|
2431
4746
|
};
|
|
2432
|
-
userInputId: string;
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
type: "
|
|
2441
|
-
|
|
2442
|
-
content: string;
|
|
2443
|
-
}[];
|
|
2444
|
-
addedFileVersions: {
|
|
2445
|
-
path: string;
|
|
2446
|
-
content: string;
|
|
4747
|
+
userInputId: string;
|
|
4748
|
+
changesAlreadyApplied: {
|
|
4749
|
+
type: "patch" | "file";
|
|
4750
|
+
path: string;
|
|
4751
|
+
content: string;
|
|
4752
|
+
}[];
|
|
4753
|
+
response: string;
|
|
4754
|
+
changes: {
|
|
4755
|
+
type: "patch" | "file";
|
|
4756
|
+
path: string;
|
|
4757
|
+
content: string;
|
|
4758
|
+
}[];
|
|
4759
|
+
addedFileVersions: {
|
|
4760
|
+
path: string;
|
|
4761
|
+
content: string;
|
|
4762
|
+
}[];
|
|
4763
|
+
resetFileVersions: boolean;
|
|
4764
|
+
} | {
|
|
4765
|
+
type: "terminal-command-result";
|
|
4766
|
+
userInputId: string;
|
|
4767
|
+
result: string;
|
|
4768
|
+
} | {
|
|
4769
|
+
type: "npm-version-status";
|
|
4770
|
+
isUpToDate: boolean;
|
|
4771
|
+
latestVersion: string;
|
|
4772
|
+
} | {
|
|
4773
|
+
type: "action-error";
|
|
4774
|
+
message: string;
|
|
4775
|
+
} | {
|
|
4776
|
+
type: "commit-message-response";
|
|
4777
|
+
commitMessage: string;
|
|
4778
|
+
};
|
|
4779
|
+
}>;
|
|
4780
|
+
};
|
|
4781
|
+
export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
4782
|
+
type: z.ZodLiteral<"ack">;
|
|
4783
|
+
txid: z.ZodOptional<z.ZodNumber>;
|
|
4784
|
+
success: z.ZodBoolean;
|
|
4785
|
+
error: z.ZodOptional<z.ZodString>;
|
|
4786
|
+
}, "strip", z.ZodTypeAny, {
|
|
4787
|
+
type: "ack";
|
|
4788
|
+
success: boolean;
|
|
4789
|
+
error?: string | undefined;
|
|
4790
|
+
txid?: number | undefined;
|
|
4791
|
+
}, {
|
|
4792
|
+
type: "ack";
|
|
4793
|
+
success: boolean;
|
|
4794
|
+
error?: string | undefined;
|
|
4795
|
+
txid?: number | undefined;
|
|
4796
|
+
}>, z.ZodObject<{
|
|
4797
|
+
type: z.ZodLiteral<"action">;
|
|
4798
|
+
data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
4799
|
+
type: z.ZodLiteral<"response-chunk">;
|
|
4800
|
+
userInputId: z.ZodString;
|
|
4801
|
+
chunk: z.ZodString;
|
|
4802
|
+
}, "strip", z.ZodTypeAny, {
|
|
4803
|
+
type: "response-chunk";
|
|
4804
|
+
userInputId: string;
|
|
4805
|
+
chunk: string;
|
|
4806
|
+
}, {
|
|
4807
|
+
type: "response-chunk";
|
|
4808
|
+
userInputId: string;
|
|
4809
|
+
chunk: string;
|
|
4810
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
4811
|
+
type: z.ZodLiteral<"response-complete">;
|
|
4812
|
+
userInputId: z.ZodString;
|
|
4813
|
+
response: z.ZodString;
|
|
4814
|
+
changes: z.ZodArray<z.ZodObject<{
|
|
4815
|
+
type: z.ZodEnum<["patch", "file"]>;
|
|
4816
|
+
path: z.ZodString;
|
|
4817
|
+
content: z.ZodString;
|
|
4818
|
+
}, "strip", z.ZodTypeAny, {
|
|
4819
|
+
type: "patch" | "file";
|
|
4820
|
+
path: string;
|
|
4821
|
+
content: string;
|
|
4822
|
+
}, {
|
|
4823
|
+
type: "patch" | "file";
|
|
4824
|
+
path: string;
|
|
4825
|
+
content: string;
|
|
4826
|
+
}>, "many">;
|
|
4827
|
+
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
4828
|
+
type: z.ZodEnum<["patch", "file"]>;
|
|
4829
|
+
path: z.ZodString;
|
|
4830
|
+
content: z.ZodString;
|
|
4831
|
+
}, "strip", z.ZodTypeAny, {
|
|
4832
|
+
type: "patch" | "file";
|
|
4833
|
+
path: string;
|
|
4834
|
+
content: string;
|
|
4835
|
+
}, {
|
|
4836
|
+
type: "patch" | "file";
|
|
4837
|
+
path: string;
|
|
4838
|
+
content: string;
|
|
4839
|
+
}>, "many">;
|
|
4840
|
+
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
4841
|
+
path: z.ZodString;
|
|
4842
|
+
content: z.ZodString;
|
|
4843
|
+
}, "strip", z.ZodTypeAny, {
|
|
4844
|
+
path: string;
|
|
4845
|
+
content: string;
|
|
4846
|
+
}, {
|
|
4847
|
+
path: string;
|
|
4848
|
+
content: string;
|
|
4849
|
+
}>, "many">;
|
|
4850
|
+
resetFileVersions: z.ZodBoolean;
|
|
4851
|
+
}, {
|
|
4852
|
+
usage: z.ZodOptional<z.ZodNumber>;
|
|
4853
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
4854
|
+
referralLink: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4855
|
+
subscription_active: z.ZodOptional<z.ZodBoolean>;
|
|
4856
|
+
next_quota_reset: z.ZodOptional<z.ZodDate>;
|
|
4857
|
+
session_credits_used: z.ZodOptional<z.ZodNumber>;
|
|
4858
|
+
}>, "strip", z.ZodTypeAny, {
|
|
4859
|
+
type: "response-complete";
|
|
4860
|
+
userInputId: string;
|
|
4861
|
+
changesAlreadyApplied: {
|
|
4862
|
+
type: "patch" | "file";
|
|
4863
|
+
path: string;
|
|
4864
|
+
content: string;
|
|
4865
|
+
}[];
|
|
4866
|
+
response: string;
|
|
4867
|
+
changes: {
|
|
4868
|
+
type: "patch" | "file";
|
|
4869
|
+
path: string;
|
|
4870
|
+
content: string;
|
|
4871
|
+
}[];
|
|
4872
|
+
addedFileVersions: {
|
|
4873
|
+
path: string;
|
|
4874
|
+
content: string;
|
|
4875
|
+
}[];
|
|
4876
|
+
resetFileVersions: boolean;
|
|
4877
|
+
usage?: number | undefined;
|
|
4878
|
+
limit?: number | undefined;
|
|
4879
|
+
referralLink?: string | undefined;
|
|
4880
|
+
subscription_active?: boolean | undefined;
|
|
4881
|
+
next_quota_reset?: Date | undefined;
|
|
4882
|
+
session_credits_used?: number | undefined;
|
|
4883
|
+
}, {
|
|
4884
|
+
type: "response-complete";
|
|
4885
|
+
userInputId: string;
|
|
4886
|
+
changesAlreadyApplied: {
|
|
4887
|
+
type: "patch" | "file";
|
|
4888
|
+
path: string;
|
|
4889
|
+
content: string;
|
|
4890
|
+
}[];
|
|
4891
|
+
response: string;
|
|
4892
|
+
changes: {
|
|
4893
|
+
type: "patch" | "file";
|
|
4894
|
+
path: string;
|
|
4895
|
+
content: string;
|
|
4896
|
+
}[];
|
|
4897
|
+
addedFileVersions: {
|
|
4898
|
+
path: string;
|
|
4899
|
+
content: string;
|
|
4900
|
+
}[];
|
|
4901
|
+
resetFileVersions: boolean;
|
|
4902
|
+
usage?: number | undefined;
|
|
4903
|
+
limit?: number | undefined;
|
|
4904
|
+
referralLink?: string | undefined;
|
|
4905
|
+
subscription_active?: boolean | undefined;
|
|
4906
|
+
next_quota_reset?: Date | undefined;
|
|
4907
|
+
session_credits_used?: number | undefined;
|
|
4908
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
4909
|
+
type: z.ZodLiteral<"prompt-response">;
|
|
4910
|
+
promptId: z.ZodString;
|
|
4911
|
+
agentState: z.ZodObject<{
|
|
4912
|
+
agentContext: z.ZodString;
|
|
4913
|
+
fileContext: z.ZodObject<{
|
|
4914
|
+
currentWorkingDirectory: z.ZodString;
|
|
4915
|
+
fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
|
|
4916
|
+
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
4917
|
+
knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
4918
|
+
userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4919
|
+
gitChanges: z.ZodObject<{
|
|
4920
|
+
status: z.ZodString;
|
|
4921
|
+
diff: z.ZodString;
|
|
4922
|
+
diffCached: z.ZodString;
|
|
4923
|
+
lastCommitMessages: z.ZodString;
|
|
4924
|
+
}, "strip", z.ZodTypeAny, {
|
|
4925
|
+
diff: string;
|
|
4926
|
+
status: string;
|
|
4927
|
+
diffCached: string;
|
|
4928
|
+
lastCommitMessages: string;
|
|
4929
|
+
}, {
|
|
4930
|
+
diff: string;
|
|
4931
|
+
status: string;
|
|
4932
|
+
diffCached: string;
|
|
4933
|
+
lastCommitMessages: string;
|
|
4934
|
+
}>;
|
|
4935
|
+
changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
4936
|
+
shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
4937
|
+
systemInfo: z.ZodObject<{
|
|
4938
|
+
platform: z.ZodString;
|
|
4939
|
+
shell: z.ZodString;
|
|
4940
|
+
nodeVersion: z.ZodString;
|
|
4941
|
+
arch: z.ZodString;
|
|
4942
|
+
homedir: z.ZodString;
|
|
4943
|
+
cpus: z.ZodNumber;
|
|
4944
|
+
}, "strip", z.ZodTypeAny, {
|
|
4945
|
+
platform: string;
|
|
4946
|
+
shell: string;
|
|
4947
|
+
nodeVersion: string;
|
|
4948
|
+
arch: string;
|
|
4949
|
+
homedir: string;
|
|
4950
|
+
cpus: number;
|
|
4951
|
+
}, {
|
|
4952
|
+
platform: string;
|
|
4953
|
+
shell: string;
|
|
4954
|
+
nodeVersion: string;
|
|
4955
|
+
arch: string;
|
|
4956
|
+
homedir: string;
|
|
4957
|
+
cpus: number;
|
|
4958
|
+
}>;
|
|
4959
|
+
fileVersions: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
4960
|
+
path: z.ZodString;
|
|
4961
|
+
content: z.ZodString;
|
|
4962
|
+
}, "strip", z.ZodTypeAny, {
|
|
4963
|
+
path: string;
|
|
4964
|
+
content: string;
|
|
4965
|
+
}, {
|
|
4966
|
+
path: string;
|
|
4967
|
+
content: string;
|
|
4968
|
+
}>, "many">, "many">;
|
|
4969
|
+
}, "strip", z.ZodTypeAny, {
|
|
4970
|
+
currentWorkingDirectory: string;
|
|
4971
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
4972
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
4973
|
+
knowledgeFiles: Record<string, string>;
|
|
4974
|
+
gitChanges: {
|
|
4975
|
+
diff: string;
|
|
4976
|
+
status: string;
|
|
4977
|
+
diffCached: string;
|
|
4978
|
+
lastCommitMessages: string;
|
|
4979
|
+
};
|
|
4980
|
+
changesSinceLastChat: Record<string, string>;
|
|
4981
|
+
shellConfigFiles: Record<string, string>;
|
|
4982
|
+
systemInfo: {
|
|
4983
|
+
platform: string;
|
|
4984
|
+
shell: string;
|
|
4985
|
+
nodeVersion: string;
|
|
4986
|
+
arch: string;
|
|
4987
|
+
homedir: string;
|
|
4988
|
+
cpus: number;
|
|
4989
|
+
};
|
|
4990
|
+
fileVersions: {
|
|
4991
|
+
path: string;
|
|
4992
|
+
content: string;
|
|
4993
|
+
}[][];
|
|
4994
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
4995
|
+
}, {
|
|
4996
|
+
currentWorkingDirectory: string;
|
|
4997
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
4998
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
4999
|
+
knowledgeFiles: Record<string, string>;
|
|
5000
|
+
gitChanges: {
|
|
5001
|
+
diff: string;
|
|
5002
|
+
status: string;
|
|
5003
|
+
diffCached: string;
|
|
5004
|
+
lastCommitMessages: string;
|
|
5005
|
+
};
|
|
5006
|
+
changesSinceLastChat: Record<string, string>;
|
|
5007
|
+
shellConfigFiles: Record<string, string>;
|
|
5008
|
+
systemInfo: {
|
|
5009
|
+
platform: string;
|
|
5010
|
+
shell: string;
|
|
5011
|
+
nodeVersion: string;
|
|
5012
|
+
arch: string;
|
|
5013
|
+
homedir: string;
|
|
5014
|
+
cpus: number;
|
|
5015
|
+
};
|
|
5016
|
+
fileVersions: {
|
|
5017
|
+
path: string;
|
|
5018
|
+
content: string;
|
|
5019
|
+
}[][];
|
|
5020
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
5021
|
+
}>;
|
|
5022
|
+
messageHistory: z.ZodArray<z.ZodObject<{
|
|
5023
|
+
role: z.ZodUnion<[z.ZodLiteral<"user">, z.ZodLiteral<"assistant">]>;
|
|
5024
|
+
content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
5025
|
+
type: z.ZodLiteral<"text">;
|
|
5026
|
+
text: z.ZodString;
|
|
5027
|
+
cache_control: z.ZodOptional<z.ZodObject<{
|
|
5028
|
+
type: z.ZodLiteral<"ephemeral">;
|
|
5029
|
+
}, "strip", z.ZodTypeAny, {
|
|
5030
|
+
type: "ephemeral";
|
|
5031
|
+
}, {
|
|
5032
|
+
type: "ephemeral";
|
|
5033
|
+
}>>;
|
|
5034
|
+
}, "strip", z.ZodTypeAny, {
|
|
5035
|
+
type: "text";
|
|
5036
|
+
text: string;
|
|
5037
|
+
cache_control?: {
|
|
5038
|
+
type: "ephemeral";
|
|
5039
|
+
} | undefined;
|
|
5040
|
+
}, {
|
|
5041
|
+
type: "text";
|
|
5042
|
+
text: string;
|
|
5043
|
+
cache_control?: {
|
|
5044
|
+
type: "ephemeral";
|
|
5045
|
+
} | undefined;
|
|
5046
|
+
}>, z.ZodObject<{
|
|
5047
|
+
type: z.ZodLiteral<"tool_use">;
|
|
5048
|
+
id: z.ZodString;
|
|
5049
|
+
name: z.ZodString;
|
|
5050
|
+
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
5051
|
+
cache_control: z.ZodOptional<z.ZodObject<{
|
|
5052
|
+
type: z.ZodLiteral<"ephemeral">;
|
|
5053
|
+
}, "strip", z.ZodTypeAny, {
|
|
5054
|
+
type: "ephemeral";
|
|
5055
|
+
}, {
|
|
5056
|
+
type: "ephemeral";
|
|
5057
|
+
}>>;
|
|
5058
|
+
}, "strip", z.ZodTypeAny, {
|
|
5059
|
+
type: "tool_use";
|
|
5060
|
+
name: string;
|
|
5061
|
+
id: string;
|
|
5062
|
+
input: Record<string, any>;
|
|
5063
|
+
cache_control?: {
|
|
5064
|
+
type: "ephemeral";
|
|
5065
|
+
} | undefined;
|
|
5066
|
+
}, {
|
|
5067
|
+
type: "tool_use";
|
|
5068
|
+
name: string;
|
|
5069
|
+
id: string;
|
|
5070
|
+
input: Record<string, any>;
|
|
5071
|
+
cache_control?: {
|
|
5072
|
+
type: "ephemeral";
|
|
5073
|
+
} | undefined;
|
|
5074
|
+
}>, z.ZodObject<{
|
|
5075
|
+
type: z.ZodLiteral<"tool_result">;
|
|
5076
|
+
tool_use_id: z.ZodString;
|
|
5077
|
+
content: z.ZodString;
|
|
5078
|
+
cache_control: z.ZodOptional<z.ZodObject<{
|
|
5079
|
+
type: z.ZodLiteral<"ephemeral">;
|
|
5080
|
+
}, "strip", z.ZodTypeAny, {
|
|
5081
|
+
type: "ephemeral";
|
|
5082
|
+
}, {
|
|
5083
|
+
type: "ephemeral";
|
|
5084
|
+
}>>;
|
|
5085
|
+
}, "strip", z.ZodTypeAny, {
|
|
5086
|
+
type: "tool_result";
|
|
5087
|
+
content: string;
|
|
5088
|
+
tool_use_id: string;
|
|
5089
|
+
cache_control?: {
|
|
5090
|
+
type: "ephemeral";
|
|
5091
|
+
} | undefined;
|
|
5092
|
+
}, {
|
|
5093
|
+
type: "tool_result";
|
|
5094
|
+
content: string;
|
|
5095
|
+
tool_use_id: string;
|
|
5096
|
+
cache_control?: {
|
|
5097
|
+
type: "ephemeral";
|
|
5098
|
+
} | undefined;
|
|
5099
|
+
}>, z.ZodObject<{
|
|
5100
|
+
type: z.ZodLiteral<"image">;
|
|
5101
|
+
source: z.ZodObject<{
|
|
5102
|
+
type: z.ZodLiteral<"base64">;
|
|
5103
|
+
media_type: z.ZodLiteral<"image/jpeg">;
|
|
5104
|
+
data: z.ZodString;
|
|
5105
|
+
}, "strip", z.ZodTypeAny, {
|
|
5106
|
+
type: "base64";
|
|
5107
|
+
data: string;
|
|
5108
|
+
media_type: "image/jpeg";
|
|
5109
|
+
}, {
|
|
5110
|
+
type: "base64";
|
|
5111
|
+
data: string;
|
|
5112
|
+
media_type: "image/jpeg";
|
|
5113
|
+
}>;
|
|
5114
|
+
cache_control: z.ZodOptional<z.ZodObject<{
|
|
5115
|
+
type: z.ZodLiteral<"ephemeral">;
|
|
5116
|
+
}, "strip", z.ZodTypeAny, {
|
|
5117
|
+
type: "ephemeral";
|
|
5118
|
+
}, {
|
|
5119
|
+
type: "ephemeral";
|
|
5120
|
+
}>>;
|
|
5121
|
+
}, "strip", z.ZodTypeAny, {
|
|
5122
|
+
type: "image";
|
|
5123
|
+
source: {
|
|
5124
|
+
type: "base64";
|
|
5125
|
+
data: string;
|
|
5126
|
+
media_type: "image/jpeg";
|
|
5127
|
+
};
|
|
5128
|
+
cache_control?: {
|
|
5129
|
+
type: "ephemeral";
|
|
5130
|
+
} | undefined;
|
|
5131
|
+
}, {
|
|
5132
|
+
type: "image";
|
|
5133
|
+
source: {
|
|
5134
|
+
type: "base64";
|
|
5135
|
+
data: string;
|
|
5136
|
+
media_type: "image/jpeg";
|
|
5137
|
+
};
|
|
5138
|
+
cache_control?: {
|
|
5139
|
+
type: "ephemeral";
|
|
5140
|
+
} | undefined;
|
|
5141
|
+
}>]>, "many">]>;
|
|
5142
|
+
}, "strip", z.ZodTypeAny, {
|
|
5143
|
+
content: string | ({
|
|
5144
|
+
type: "text";
|
|
5145
|
+
text: string;
|
|
5146
|
+
cache_control?: {
|
|
5147
|
+
type: "ephemeral";
|
|
5148
|
+
} | undefined;
|
|
5149
|
+
} | {
|
|
5150
|
+
type: "tool_use";
|
|
5151
|
+
name: string;
|
|
5152
|
+
id: string;
|
|
5153
|
+
input: Record<string, any>;
|
|
5154
|
+
cache_control?: {
|
|
5155
|
+
type: "ephemeral";
|
|
5156
|
+
} | undefined;
|
|
5157
|
+
} | {
|
|
5158
|
+
type: "tool_result";
|
|
5159
|
+
content: string;
|
|
5160
|
+
tool_use_id: string;
|
|
5161
|
+
cache_control?: {
|
|
5162
|
+
type: "ephemeral";
|
|
5163
|
+
} | undefined;
|
|
5164
|
+
} | {
|
|
5165
|
+
type: "image";
|
|
5166
|
+
source: {
|
|
5167
|
+
type: "base64";
|
|
5168
|
+
data: string;
|
|
5169
|
+
media_type: "image/jpeg";
|
|
5170
|
+
};
|
|
5171
|
+
cache_control?: {
|
|
5172
|
+
type: "ephemeral";
|
|
5173
|
+
} | undefined;
|
|
5174
|
+
})[];
|
|
5175
|
+
role: "user" | "assistant";
|
|
5176
|
+
}, {
|
|
5177
|
+
content: string | ({
|
|
5178
|
+
type: "text";
|
|
5179
|
+
text: string;
|
|
5180
|
+
cache_control?: {
|
|
5181
|
+
type: "ephemeral";
|
|
5182
|
+
} | undefined;
|
|
5183
|
+
} | {
|
|
5184
|
+
type: "tool_use";
|
|
5185
|
+
name: string;
|
|
5186
|
+
id: string;
|
|
5187
|
+
input: Record<string, any>;
|
|
5188
|
+
cache_control?: {
|
|
5189
|
+
type: "ephemeral";
|
|
5190
|
+
} | undefined;
|
|
5191
|
+
} | {
|
|
5192
|
+
type: "tool_result";
|
|
5193
|
+
content: string;
|
|
5194
|
+
tool_use_id: string;
|
|
5195
|
+
cache_control?: {
|
|
5196
|
+
type: "ephemeral";
|
|
5197
|
+
} | undefined;
|
|
5198
|
+
} | {
|
|
5199
|
+
type: "image";
|
|
5200
|
+
source: {
|
|
5201
|
+
type: "base64";
|
|
5202
|
+
data: string;
|
|
5203
|
+
media_type: "image/jpeg";
|
|
5204
|
+
};
|
|
5205
|
+
cache_control?: {
|
|
5206
|
+
type: "ephemeral";
|
|
5207
|
+
} | undefined;
|
|
5208
|
+
})[];
|
|
5209
|
+
role: "user" | "assistant";
|
|
5210
|
+
}>, "many">;
|
|
5211
|
+
}, "strip", z.ZodTypeAny, {
|
|
5212
|
+
fileContext: {
|
|
5213
|
+
currentWorkingDirectory: string;
|
|
5214
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
5215
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
5216
|
+
knowledgeFiles: Record<string, string>;
|
|
5217
|
+
gitChanges: {
|
|
5218
|
+
diff: string;
|
|
5219
|
+
status: string;
|
|
5220
|
+
diffCached: string;
|
|
5221
|
+
lastCommitMessages: string;
|
|
5222
|
+
};
|
|
5223
|
+
changesSinceLastChat: Record<string, string>;
|
|
5224
|
+
shellConfigFiles: Record<string, string>;
|
|
5225
|
+
systemInfo: {
|
|
5226
|
+
platform: string;
|
|
5227
|
+
shell: string;
|
|
5228
|
+
nodeVersion: string;
|
|
5229
|
+
arch: string;
|
|
5230
|
+
homedir: string;
|
|
5231
|
+
cpus: number;
|
|
5232
|
+
};
|
|
5233
|
+
fileVersions: {
|
|
5234
|
+
path: string;
|
|
5235
|
+
content: string;
|
|
5236
|
+
}[][];
|
|
5237
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
5238
|
+
};
|
|
5239
|
+
agentContext: string;
|
|
5240
|
+
messageHistory: {
|
|
5241
|
+
content: string | ({
|
|
5242
|
+
type: "text";
|
|
5243
|
+
text: string;
|
|
5244
|
+
cache_control?: {
|
|
5245
|
+
type: "ephemeral";
|
|
5246
|
+
} | undefined;
|
|
5247
|
+
} | {
|
|
5248
|
+
type: "tool_use";
|
|
5249
|
+
name: string;
|
|
5250
|
+
id: string;
|
|
5251
|
+
input: Record<string, any>;
|
|
5252
|
+
cache_control?: {
|
|
5253
|
+
type: "ephemeral";
|
|
5254
|
+
} | undefined;
|
|
5255
|
+
} | {
|
|
5256
|
+
type: "tool_result";
|
|
5257
|
+
content: string;
|
|
5258
|
+
tool_use_id: string;
|
|
5259
|
+
cache_control?: {
|
|
5260
|
+
type: "ephemeral";
|
|
5261
|
+
} | undefined;
|
|
5262
|
+
} | {
|
|
5263
|
+
type: "image";
|
|
5264
|
+
source: {
|
|
5265
|
+
type: "base64";
|
|
5266
|
+
data: string;
|
|
5267
|
+
media_type: "image/jpeg";
|
|
5268
|
+
};
|
|
5269
|
+
cache_control?: {
|
|
5270
|
+
type: "ephemeral";
|
|
5271
|
+
} | undefined;
|
|
5272
|
+
})[];
|
|
5273
|
+
role: "user" | "assistant";
|
|
5274
|
+
}[];
|
|
5275
|
+
}, {
|
|
5276
|
+
fileContext: {
|
|
5277
|
+
currentWorkingDirectory: string;
|
|
5278
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
5279
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
5280
|
+
knowledgeFiles: Record<string, string>;
|
|
5281
|
+
gitChanges: {
|
|
5282
|
+
diff: string;
|
|
5283
|
+
status: string;
|
|
5284
|
+
diffCached: string;
|
|
5285
|
+
lastCommitMessages: string;
|
|
5286
|
+
};
|
|
5287
|
+
changesSinceLastChat: Record<string, string>;
|
|
5288
|
+
shellConfigFiles: Record<string, string>;
|
|
5289
|
+
systemInfo: {
|
|
5290
|
+
platform: string;
|
|
5291
|
+
shell: string;
|
|
5292
|
+
nodeVersion: string;
|
|
5293
|
+
arch: string;
|
|
5294
|
+
homedir: string;
|
|
5295
|
+
cpus: number;
|
|
5296
|
+
};
|
|
5297
|
+
fileVersions: {
|
|
5298
|
+
path: string;
|
|
5299
|
+
content: string;
|
|
5300
|
+
}[][];
|
|
5301
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
5302
|
+
};
|
|
5303
|
+
agentContext: string;
|
|
5304
|
+
messageHistory: {
|
|
5305
|
+
content: string | ({
|
|
5306
|
+
type: "text";
|
|
5307
|
+
text: string;
|
|
5308
|
+
cache_control?: {
|
|
5309
|
+
type: "ephemeral";
|
|
5310
|
+
} | undefined;
|
|
5311
|
+
} | {
|
|
5312
|
+
type: "tool_use";
|
|
5313
|
+
name: string;
|
|
5314
|
+
id: string;
|
|
5315
|
+
input: Record<string, any>;
|
|
5316
|
+
cache_control?: {
|
|
5317
|
+
type: "ephemeral";
|
|
5318
|
+
} | undefined;
|
|
5319
|
+
} | {
|
|
5320
|
+
type: "tool_result";
|
|
5321
|
+
content: string;
|
|
5322
|
+
tool_use_id: string;
|
|
5323
|
+
cache_control?: {
|
|
5324
|
+
type: "ephemeral";
|
|
5325
|
+
} | undefined;
|
|
5326
|
+
} | {
|
|
5327
|
+
type: "image";
|
|
5328
|
+
source: {
|
|
5329
|
+
type: "base64";
|
|
5330
|
+
data: string;
|
|
5331
|
+
media_type: "image/jpeg";
|
|
5332
|
+
};
|
|
5333
|
+
cache_control?: {
|
|
5334
|
+
type: "ephemeral";
|
|
5335
|
+
} | undefined;
|
|
5336
|
+
})[];
|
|
5337
|
+
role: "user" | "assistant";
|
|
2447
5338
|
}[];
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
} | {
|
|
2454
|
-
type: "npm-version-status";
|
|
2455
|
-
isUpToDate: boolean;
|
|
2456
|
-
latestVersion: string;
|
|
2457
|
-
} | {
|
|
2458
|
-
message: string;
|
|
2459
|
-
type: "action-error";
|
|
2460
|
-
} | {
|
|
2461
|
-
type: "commit-message-response";
|
|
2462
|
-
commitMessage: string;
|
|
2463
|
-
};
|
|
2464
|
-
}>;
|
|
2465
|
-
};
|
|
2466
|
-
export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
2467
|
-
type: z.ZodLiteral<"ack">;
|
|
2468
|
-
txid: z.ZodOptional<z.ZodNumber>;
|
|
2469
|
-
success: z.ZodBoolean;
|
|
2470
|
-
error: z.ZodOptional<z.ZodString>;
|
|
2471
|
-
}, "strip", z.ZodTypeAny, {
|
|
2472
|
-
type: "ack";
|
|
2473
|
-
success: boolean;
|
|
2474
|
-
error?: string | undefined;
|
|
2475
|
-
txid?: number | undefined;
|
|
2476
|
-
}, {
|
|
2477
|
-
type: "ack";
|
|
2478
|
-
success: boolean;
|
|
2479
|
-
error?: string | undefined;
|
|
2480
|
-
txid?: number | undefined;
|
|
2481
|
-
}>, z.ZodObject<{
|
|
2482
|
-
type: z.ZodLiteral<"action">;
|
|
2483
|
-
data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2484
|
-
type: z.ZodLiteral<"response-chunk">;
|
|
2485
|
-
userInputId: z.ZodString;
|
|
2486
|
-
chunk: z.ZodString;
|
|
2487
|
-
}, "strip", z.ZodTypeAny, {
|
|
2488
|
-
type: "response-chunk";
|
|
2489
|
-
userInputId: string;
|
|
2490
|
-
chunk: string;
|
|
2491
|
-
}, {
|
|
2492
|
-
type: "response-chunk";
|
|
2493
|
-
userInputId: string;
|
|
2494
|
-
chunk: string;
|
|
2495
|
-
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
2496
|
-
type: z.ZodLiteral<"response-complete">;
|
|
2497
|
-
userInputId: z.ZodString;
|
|
2498
|
-
response: z.ZodString;
|
|
2499
|
-
changes: z.ZodArray<z.ZodObject<{
|
|
2500
|
-
type: z.ZodEnum<["patch", "file"]>;
|
|
2501
|
-
filePath: z.ZodString;
|
|
2502
|
-
content: z.ZodString;
|
|
2503
|
-
}, "strip", z.ZodTypeAny, {
|
|
2504
|
-
type: "file" | "patch";
|
|
2505
|
-
filePath: string;
|
|
2506
|
-
content: string;
|
|
2507
|
-
}, {
|
|
2508
|
-
type: "file" | "patch";
|
|
2509
|
-
filePath: string;
|
|
2510
|
-
content: string;
|
|
2511
|
-
}>, "many">;
|
|
2512
|
-
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
2513
|
-
type: z.ZodEnum<["patch", "file"]>;
|
|
2514
|
-
filePath: z.ZodString;
|
|
2515
|
-
content: z.ZodString;
|
|
5339
|
+
}>;
|
|
5340
|
+
toolCalls: z.ZodArray<z.ZodObject<{
|
|
5341
|
+
name: z.ZodString;
|
|
5342
|
+
parameters: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
5343
|
+
id: z.ZodString;
|
|
2516
5344
|
}, "strip", z.ZodTypeAny, {
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
5345
|
+
name: string;
|
|
5346
|
+
id: string;
|
|
5347
|
+
parameters: Record<string, string>;
|
|
2520
5348
|
}, {
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
5349
|
+
name: string;
|
|
5350
|
+
id: string;
|
|
5351
|
+
parameters: Record<string, string>;
|
|
2524
5352
|
}>, "many">;
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
5353
|
+
toolResults: z.ZodArray<z.ZodObject<{
|
|
5354
|
+
name: z.ZodString;
|
|
5355
|
+
result: z.ZodString;
|
|
5356
|
+
id: z.ZodString;
|
|
2528
5357
|
}, "strip", z.ZodTypeAny, {
|
|
2529
|
-
|
|
2530
|
-
|
|
5358
|
+
name: string;
|
|
5359
|
+
id: string;
|
|
5360
|
+
result: string;
|
|
2531
5361
|
}, {
|
|
2532
|
-
|
|
2533
|
-
|
|
5362
|
+
name: string;
|
|
5363
|
+
id: string;
|
|
5364
|
+
result: string;
|
|
2534
5365
|
}>, "many">;
|
|
2535
|
-
resetFileVersions: z.ZodBoolean;
|
|
2536
5366
|
}, {
|
|
2537
5367
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
2538
5368
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2541,24 +5371,83 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2541
5371
|
next_quota_reset: z.ZodOptional<z.ZodDate>;
|
|
2542
5372
|
session_credits_used: z.ZodOptional<z.ZodNumber>;
|
|
2543
5373
|
}>, "strip", z.ZodTypeAny, {
|
|
2544
|
-
type: "response
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
5374
|
+
type: "prompt-response";
|
|
5375
|
+
promptId: string;
|
|
5376
|
+
agentState: {
|
|
5377
|
+
fileContext: {
|
|
5378
|
+
currentWorkingDirectory: string;
|
|
5379
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
5380
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
5381
|
+
knowledgeFiles: Record<string, string>;
|
|
5382
|
+
gitChanges: {
|
|
5383
|
+
diff: string;
|
|
5384
|
+
status: string;
|
|
5385
|
+
diffCached: string;
|
|
5386
|
+
lastCommitMessages: string;
|
|
5387
|
+
};
|
|
5388
|
+
changesSinceLastChat: Record<string, string>;
|
|
5389
|
+
shellConfigFiles: Record<string, string>;
|
|
5390
|
+
systemInfo: {
|
|
5391
|
+
platform: string;
|
|
5392
|
+
shell: string;
|
|
5393
|
+
nodeVersion: string;
|
|
5394
|
+
arch: string;
|
|
5395
|
+
homedir: string;
|
|
5396
|
+
cpus: number;
|
|
5397
|
+
};
|
|
5398
|
+
fileVersions: {
|
|
5399
|
+
path: string;
|
|
5400
|
+
content: string;
|
|
5401
|
+
}[][];
|
|
5402
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
5403
|
+
};
|
|
5404
|
+
agentContext: string;
|
|
5405
|
+
messageHistory: {
|
|
5406
|
+
content: string | ({
|
|
5407
|
+
type: "text";
|
|
5408
|
+
text: string;
|
|
5409
|
+
cache_control?: {
|
|
5410
|
+
type: "ephemeral";
|
|
5411
|
+
} | undefined;
|
|
5412
|
+
} | {
|
|
5413
|
+
type: "tool_use";
|
|
5414
|
+
name: string;
|
|
5415
|
+
id: string;
|
|
5416
|
+
input: Record<string, any>;
|
|
5417
|
+
cache_control?: {
|
|
5418
|
+
type: "ephemeral";
|
|
5419
|
+
} | undefined;
|
|
5420
|
+
} | {
|
|
5421
|
+
type: "tool_result";
|
|
5422
|
+
content: string;
|
|
5423
|
+
tool_use_id: string;
|
|
5424
|
+
cache_control?: {
|
|
5425
|
+
type: "ephemeral";
|
|
5426
|
+
} | undefined;
|
|
5427
|
+
} | {
|
|
5428
|
+
type: "image";
|
|
5429
|
+
source: {
|
|
5430
|
+
type: "base64";
|
|
5431
|
+
data: string;
|
|
5432
|
+
media_type: "image/jpeg";
|
|
5433
|
+
};
|
|
5434
|
+
cache_control?: {
|
|
5435
|
+
type: "ephemeral";
|
|
5436
|
+
} | undefined;
|
|
5437
|
+
})[];
|
|
5438
|
+
role: "user" | "assistant";
|
|
5439
|
+
}[];
|
|
5440
|
+
};
|
|
5441
|
+
toolResults: {
|
|
5442
|
+
name: string;
|
|
5443
|
+
id: string;
|
|
5444
|
+
result: string;
|
|
2556
5445
|
}[];
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
5446
|
+
toolCalls: {
|
|
5447
|
+
name: string;
|
|
5448
|
+
id: string;
|
|
5449
|
+
parameters: Record<string, string>;
|
|
2560
5450
|
}[];
|
|
2561
|
-
resetFileVersions: boolean;
|
|
2562
5451
|
usage?: number | undefined;
|
|
2563
5452
|
limit?: number | undefined;
|
|
2564
5453
|
referralLink?: string | undefined;
|
|
@@ -2566,24 +5455,83 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2566
5455
|
next_quota_reset?: Date | undefined;
|
|
2567
5456
|
session_credits_used?: number | undefined;
|
|
2568
5457
|
}, {
|
|
2569
|
-
type: "response
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
5458
|
+
type: "prompt-response";
|
|
5459
|
+
promptId: string;
|
|
5460
|
+
agentState: {
|
|
5461
|
+
fileContext: {
|
|
5462
|
+
currentWorkingDirectory: string;
|
|
5463
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
5464
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
5465
|
+
knowledgeFiles: Record<string, string>;
|
|
5466
|
+
gitChanges: {
|
|
5467
|
+
diff: string;
|
|
5468
|
+
status: string;
|
|
5469
|
+
diffCached: string;
|
|
5470
|
+
lastCommitMessages: string;
|
|
5471
|
+
};
|
|
5472
|
+
changesSinceLastChat: Record<string, string>;
|
|
5473
|
+
shellConfigFiles: Record<string, string>;
|
|
5474
|
+
systemInfo: {
|
|
5475
|
+
platform: string;
|
|
5476
|
+
shell: string;
|
|
5477
|
+
nodeVersion: string;
|
|
5478
|
+
arch: string;
|
|
5479
|
+
homedir: string;
|
|
5480
|
+
cpus: number;
|
|
5481
|
+
};
|
|
5482
|
+
fileVersions: {
|
|
5483
|
+
path: string;
|
|
5484
|
+
content: string;
|
|
5485
|
+
}[][];
|
|
5486
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
5487
|
+
};
|
|
5488
|
+
agentContext: string;
|
|
5489
|
+
messageHistory: {
|
|
5490
|
+
content: string | ({
|
|
5491
|
+
type: "text";
|
|
5492
|
+
text: string;
|
|
5493
|
+
cache_control?: {
|
|
5494
|
+
type: "ephemeral";
|
|
5495
|
+
} | undefined;
|
|
5496
|
+
} | {
|
|
5497
|
+
type: "tool_use";
|
|
5498
|
+
name: string;
|
|
5499
|
+
id: string;
|
|
5500
|
+
input: Record<string, any>;
|
|
5501
|
+
cache_control?: {
|
|
5502
|
+
type: "ephemeral";
|
|
5503
|
+
} | undefined;
|
|
5504
|
+
} | {
|
|
5505
|
+
type: "tool_result";
|
|
5506
|
+
content: string;
|
|
5507
|
+
tool_use_id: string;
|
|
5508
|
+
cache_control?: {
|
|
5509
|
+
type: "ephemeral";
|
|
5510
|
+
} | undefined;
|
|
5511
|
+
} | {
|
|
5512
|
+
type: "image";
|
|
5513
|
+
source: {
|
|
5514
|
+
type: "base64";
|
|
5515
|
+
data: string;
|
|
5516
|
+
media_type: "image/jpeg";
|
|
5517
|
+
};
|
|
5518
|
+
cache_control?: {
|
|
5519
|
+
type: "ephemeral";
|
|
5520
|
+
} | undefined;
|
|
5521
|
+
})[];
|
|
5522
|
+
role: "user" | "assistant";
|
|
5523
|
+
}[];
|
|
5524
|
+
};
|
|
5525
|
+
toolResults: {
|
|
5526
|
+
name: string;
|
|
5527
|
+
id: string;
|
|
5528
|
+
result: string;
|
|
2581
5529
|
}[];
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
5530
|
+
toolCalls: {
|
|
5531
|
+
name: string;
|
|
5532
|
+
id: string;
|
|
5533
|
+
parameters: Record<string, string>;
|
|
2585
5534
|
}[];
|
|
2586
|
-
resetFileVersions: boolean;
|
|
2587
5535
|
usage?: number | undefined;
|
|
2588
5536
|
limit?: number | undefined;
|
|
2589
5537
|
referralLink?: string | undefined;
|
|
@@ -2621,28 +5569,28 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2621
5569
|
}>;
|
|
2622
5570
|
changes: z.ZodArray<z.ZodObject<{
|
|
2623
5571
|
type: z.ZodEnum<["patch", "file"]>;
|
|
2624
|
-
|
|
5572
|
+
path: z.ZodString;
|
|
2625
5573
|
content: z.ZodString;
|
|
2626
5574
|
}, "strip", z.ZodTypeAny, {
|
|
2627
|
-
type: "
|
|
2628
|
-
|
|
5575
|
+
type: "patch" | "file";
|
|
5576
|
+
path: string;
|
|
2629
5577
|
content: string;
|
|
2630
5578
|
}, {
|
|
2631
|
-
type: "
|
|
2632
|
-
|
|
5579
|
+
type: "patch" | "file";
|
|
5580
|
+
path: string;
|
|
2633
5581
|
content: string;
|
|
2634
5582
|
}>, "many">;
|
|
2635
5583
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
2636
5584
|
type: z.ZodEnum<["patch", "file"]>;
|
|
2637
|
-
|
|
5585
|
+
path: z.ZodString;
|
|
2638
5586
|
content: z.ZodString;
|
|
2639
5587
|
}, "strip", z.ZodTypeAny, {
|
|
2640
|
-
type: "
|
|
2641
|
-
|
|
5588
|
+
type: "patch" | "file";
|
|
5589
|
+
path: string;
|
|
2642
5590
|
content: string;
|
|
2643
5591
|
}, {
|
|
2644
|
-
type: "
|
|
2645
|
-
|
|
5592
|
+
type: "patch" | "file";
|
|
5593
|
+
path: string;
|
|
2646
5594
|
content: string;
|
|
2647
5595
|
}>, "many">;
|
|
2648
5596
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
@@ -2664,15 +5612,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2664
5612
|
input: Record<string, any>;
|
|
2665
5613
|
};
|
|
2666
5614
|
userInputId: string;
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
filePath: string;
|
|
5615
|
+
changesAlreadyApplied: {
|
|
5616
|
+
type: "patch" | "file";
|
|
5617
|
+
path: string;
|
|
2671
5618
|
content: string;
|
|
2672
5619
|
}[];
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
5620
|
+
response: string;
|
|
5621
|
+
changes: {
|
|
5622
|
+
type: "patch" | "file";
|
|
5623
|
+
path: string;
|
|
2676
5624
|
content: string;
|
|
2677
5625
|
}[];
|
|
2678
5626
|
addedFileVersions: {
|
|
@@ -2688,15 +5636,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2688
5636
|
input: Record<string, any>;
|
|
2689
5637
|
};
|
|
2690
5638
|
userInputId: string;
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
filePath: string;
|
|
5639
|
+
changesAlreadyApplied: {
|
|
5640
|
+
type: "patch" | "file";
|
|
5641
|
+
path: string;
|
|
2695
5642
|
content: string;
|
|
2696
5643
|
}[];
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
5644
|
+
response: string;
|
|
5645
|
+
changes: {
|
|
5646
|
+
type: "patch" | "file";
|
|
5647
|
+
path: string;
|
|
2700
5648
|
content: string;
|
|
2701
5649
|
}[];
|
|
2702
5650
|
addedFileVersions: {
|
|
@@ -2782,11 +5730,11 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2782
5730
|
type: z.ZodLiteral<"action-error">;
|
|
2783
5731
|
message: z.ZodString;
|
|
2784
5732
|
}, "strip", z.ZodTypeAny, {
|
|
2785
|
-
message: string;
|
|
2786
5733
|
type: "action-error";
|
|
2787
|
-
}, {
|
|
2788
5734
|
message: string;
|
|
5735
|
+
}, {
|
|
2789
5736
|
type: "action-error";
|
|
5737
|
+
message: string;
|
|
2790
5738
|
}>, z.ZodObject<{
|
|
2791
5739
|
type: z.ZodLiteral<"commit-message-response">;
|
|
2792
5740
|
commitMessage: z.ZodString;
|
|
@@ -2818,15 +5766,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2818
5766
|
} | {
|
|
2819
5767
|
type: "response-complete";
|
|
2820
5768
|
userInputId: string;
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
filePath: string;
|
|
5769
|
+
changesAlreadyApplied: {
|
|
5770
|
+
type: "patch" | "file";
|
|
5771
|
+
path: string;
|
|
2825
5772
|
content: string;
|
|
2826
5773
|
}[];
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
5774
|
+
response: string;
|
|
5775
|
+
changes: {
|
|
5776
|
+
type: "patch" | "file";
|
|
5777
|
+
path: string;
|
|
2830
5778
|
content: string;
|
|
2831
5779
|
}[];
|
|
2832
5780
|
addedFileVersions: {
|
|
@@ -2840,6 +5788,90 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2840
5788
|
subscription_active?: boolean | undefined;
|
|
2841
5789
|
next_quota_reset?: Date | undefined;
|
|
2842
5790
|
session_credits_used?: number | undefined;
|
|
5791
|
+
} | {
|
|
5792
|
+
type: "prompt-response";
|
|
5793
|
+
promptId: string;
|
|
5794
|
+
agentState: {
|
|
5795
|
+
fileContext: {
|
|
5796
|
+
currentWorkingDirectory: string;
|
|
5797
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
5798
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
5799
|
+
knowledgeFiles: Record<string, string>;
|
|
5800
|
+
gitChanges: {
|
|
5801
|
+
diff: string;
|
|
5802
|
+
status: string;
|
|
5803
|
+
diffCached: string;
|
|
5804
|
+
lastCommitMessages: string;
|
|
5805
|
+
};
|
|
5806
|
+
changesSinceLastChat: Record<string, string>;
|
|
5807
|
+
shellConfigFiles: Record<string, string>;
|
|
5808
|
+
systemInfo: {
|
|
5809
|
+
platform: string;
|
|
5810
|
+
shell: string;
|
|
5811
|
+
nodeVersion: string;
|
|
5812
|
+
arch: string;
|
|
5813
|
+
homedir: string;
|
|
5814
|
+
cpus: number;
|
|
5815
|
+
};
|
|
5816
|
+
fileVersions: {
|
|
5817
|
+
path: string;
|
|
5818
|
+
content: string;
|
|
5819
|
+
}[][];
|
|
5820
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
5821
|
+
};
|
|
5822
|
+
agentContext: string;
|
|
5823
|
+
messageHistory: {
|
|
5824
|
+
content: string | ({
|
|
5825
|
+
type: "text";
|
|
5826
|
+
text: string;
|
|
5827
|
+
cache_control?: {
|
|
5828
|
+
type: "ephemeral";
|
|
5829
|
+
} | undefined;
|
|
5830
|
+
} | {
|
|
5831
|
+
type: "tool_use";
|
|
5832
|
+
name: string;
|
|
5833
|
+
id: string;
|
|
5834
|
+
input: Record<string, any>;
|
|
5835
|
+
cache_control?: {
|
|
5836
|
+
type: "ephemeral";
|
|
5837
|
+
} | undefined;
|
|
5838
|
+
} | {
|
|
5839
|
+
type: "tool_result";
|
|
5840
|
+
content: string;
|
|
5841
|
+
tool_use_id: string;
|
|
5842
|
+
cache_control?: {
|
|
5843
|
+
type: "ephemeral";
|
|
5844
|
+
} | undefined;
|
|
5845
|
+
} | {
|
|
5846
|
+
type: "image";
|
|
5847
|
+
source: {
|
|
5848
|
+
type: "base64";
|
|
5849
|
+
data: string;
|
|
5850
|
+
media_type: "image/jpeg";
|
|
5851
|
+
};
|
|
5852
|
+
cache_control?: {
|
|
5853
|
+
type: "ephemeral";
|
|
5854
|
+
} | undefined;
|
|
5855
|
+
})[];
|
|
5856
|
+
role: "user" | "assistant";
|
|
5857
|
+
}[];
|
|
5858
|
+
};
|
|
5859
|
+
toolResults: {
|
|
5860
|
+
name: string;
|
|
5861
|
+
id: string;
|
|
5862
|
+
result: string;
|
|
5863
|
+
}[];
|
|
5864
|
+
toolCalls: {
|
|
5865
|
+
name: string;
|
|
5866
|
+
id: string;
|
|
5867
|
+
parameters: Record<string, string>;
|
|
5868
|
+
}[];
|
|
5869
|
+
usage?: number | undefined;
|
|
5870
|
+
limit?: number | undefined;
|
|
5871
|
+
referralLink?: string | undefined;
|
|
5872
|
+
subscription_active?: boolean | undefined;
|
|
5873
|
+
next_quota_reset?: Date | undefined;
|
|
5874
|
+
session_credits_used?: number | undefined;
|
|
2843
5875
|
} | {
|
|
2844
5876
|
type: "response-chunk";
|
|
2845
5877
|
userInputId: string;
|
|
@@ -2856,15 +5888,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2856
5888
|
input: Record<string, any>;
|
|
2857
5889
|
};
|
|
2858
5890
|
userInputId: string;
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
filePath: string;
|
|
5891
|
+
changesAlreadyApplied: {
|
|
5892
|
+
type: "patch" | "file";
|
|
5893
|
+
path: string;
|
|
2863
5894
|
content: string;
|
|
2864
5895
|
}[];
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
5896
|
+
response: string;
|
|
5897
|
+
changes: {
|
|
5898
|
+
type: "patch" | "file";
|
|
5899
|
+
path: string;
|
|
2868
5900
|
content: string;
|
|
2869
5901
|
}[];
|
|
2870
5902
|
addedFileVersions: {
|
|
@@ -2881,8 +5913,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2881
5913
|
isUpToDate: boolean;
|
|
2882
5914
|
latestVersion: string;
|
|
2883
5915
|
} | {
|
|
2884
|
-
message: string;
|
|
2885
5916
|
type: "action-error";
|
|
5917
|
+
message: string;
|
|
2886
5918
|
} | {
|
|
2887
5919
|
type: "commit-message-response";
|
|
2888
5920
|
commitMessage: string;
|
|
@@ -2908,15 +5940,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2908
5940
|
} | {
|
|
2909
5941
|
type: "response-complete";
|
|
2910
5942
|
userInputId: string;
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
filePath: string;
|
|
5943
|
+
changesAlreadyApplied: {
|
|
5944
|
+
type: "patch" | "file";
|
|
5945
|
+
path: string;
|
|
2915
5946
|
content: string;
|
|
2916
5947
|
}[];
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
5948
|
+
response: string;
|
|
5949
|
+
changes: {
|
|
5950
|
+
type: "patch" | "file";
|
|
5951
|
+
path: string;
|
|
2920
5952
|
content: string;
|
|
2921
5953
|
}[];
|
|
2922
5954
|
addedFileVersions: {
|
|
@@ -2930,6 +5962,90 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2930
5962
|
subscription_active?: boolean | undefined;
|
|
2931
5963
|
next_quota_reset?: Date | undefined;
|
|
2932
5964
|
session_credits_used?: number | undefined;
|
|
5965
|
+
} | {
|
|
5966
|
+
type: "prompt-response";
|
|
5967
|
+
promptId: string;
|
|
5968
|
+
agentState: {
|
|
5969
|
+
fileContext: {
|
|
5970
|
+
currentWorkingDirectory: string;
|
|
5971
|
+
fileTree: import("../util/file").FileTreeNode[];
|
|
5972
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
5973
|
+
knowledgeFiles: Record<string, string>;
|
|
5974
|
+
gitChanges: {
|
|
5975
|
+
diff: string;
|
|
5976
|
+
status: string;
|
|
5977
|
+
diffCached: string;
|
|
5978
|
+
lastCommitMessages: string;
|
|
5979
|
+
};
|
|
5980
|
+
changesSinceLastChat: Record<string, string>;
|
|
5981
|
+
shellConfigFiles: Record<string, string>;
|
|
5982
|
+
systemInfo: {
|
|
5983
|
+
platform: string;
|
|
5984
|
+
shell: string;
|
|
5985
|
+
nodeVersion: string;
|
|
5986
|
+
arch: string;
|
|
5987
|
+
homedir: string;
|
|
5988
|
+
cpus: number;
|
|
5989
|
+
};
|
|
5990
|
+
fileVersions: {
|
|
5991
|
+
path: string;
|
|
5992
|
+
content: string;
|
|
5993
|
+
}[][];
|
|
5994
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
5995
|
+
};
|
|
5996
|
+
agentContext: string;
|
|
5997
|
+
messageHistory: {
|
|
5998
|
+
content: string | ({
|
|
5999
|
+
type: "text";
|
|
6000
|
+
text: string;
|
|
6001
|
+
cache_control?: {
|
|
6002
|
+
type: "ephemeral";
|
|
6003
|
+
} | undefined;
|
|
6004
|
+
} | {
|
|
6005
|
+
type: "tool_use";
|
|
6006
|
+
name: string;
|
|
6007
|
+
id: string;
|
|
6008
|
+
input: Record<string, any>;
|
|
6009
|
+
cache_control?: {
|
|
6010
|
+
type: "ephemeral";
|
|
6011
|
+
} | undefined;
|
|
6012
|
+
} | {
|
|
6013
|
+
type: "tool_result";
|
|
6014
|
+
content: string;
|
|
6015
|
+
tool_use_id: string;
|
|
6016
|
+
cache_control?: {
|
|
6017
|
+
type: "ephemeral";
|
|
6018
|
+
} | undefined;
|
|
6019
|
+
} | {
|
|
6020
|
+
type: "image";
|
|
6021
|
+
source: {
|
|
6022
|
+
type: "base64";
|
|
6023
|
+
data: string;
|
|
6024
|
+
media_type: "image/jpeg";
|
|
6025
|
+
};
|
|
6026
|
+
cache_control?: {
|
|
6027
|
+
type: "ephemeral";
|
|
6028
|
+
} | undefined;
|
|
6029
|
+
})[];
|
|
6030
|
+
role: "user" | "assistant";
|
|
6031
|
+
}[];
|
|
6032
|
+
};
|
|
6033
|
+
toolResults: {
|
|
6034
|
+
name: string;
|
|
6035
|
+
id: string;
|
|
6036
|
+
result: string;
|
|
6037
|
+
}[];
|
|
6038
|
+
toolCalls: {
|
|
6039
|
+
name: string;
|
|
6040
|
+
id: string;
|
|
6041
|
+
parameters: Record<string, string>;
|
|
6042
|
+
}[];
|
|
6043
|
+
usage?: number | undefined;
|
|
6044
|
+
limit?: number | undefined;
|
|
6045
|
+
referralLink?: string | undefined;
|
|
6046
|
+
subscription_active?: boolean | undefined;
|
|
6047
|
+
next_quota_reset?: Date | undefined;
|
|
6048
|
+
session_credits_used?: number | undefined;
|
|
2933
6049
|
} | {
|
|
2934
6050
|
type: "response-chunk";
|
|
2935
6051
|
userInputId: string;
|
|
@@ -2946,15 +6062,15 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2946
6062
|
input: Record<string, any>;
|
|
2947
6063
|
};
|
|
2948
6064
|
userInputId: string;
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
filePath: string;
|
|
6065
|
+
changesAlreadyApplied: {
|
|
6066
|
+
type: "patch" | "file";
|
|
6067
|
+
path: string;
|
|
2953
6068
|
content: string;
|
|
2954
6069
|
}[];
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
6070
|
+
response: string;
|
|
6071
|
+
changes: {
|
|
6072
|
+
type: "patch" | "file";
|
|
6073
|
+
path: string;
|
|
2958
6074
|
content: string;
|
|
2959
6075
|
}[];
|
|
2960
6076
|
addedFileVersions: {
|
|
@@ -2971,8 +6087,8 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2971
6087
|
isUpToDate: boolean;
|
|
2972
6088
|
latestVersion: string;
|
|
2973
6089
|
} | {
|
|
2974
|
-
message: string;
|
|
2975
6090
|
type: "action-error";
|
|
6091
|
+
message: string;
|
|
2976
6092
|
} | {
|
|
2977
6093
|
type: "commit-message-response";
|
|
2978
6094
|
commitMessage: string;
|