codecane 1.0.201 → 1.0.203
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/checkpoints/checkpoint-manager.d.ts +34 -12
- package/dist/checkpoints/checkpoint-manager.js +74 -38
- package/dist/checkpoints/checkpoint-manager.js.map +1 -1
- package/dist/checkpoints/file-manager.d.ts +2 -0
- package/dist/checkpoints/file-manager.js +2 -0
- package/dist/checkpoints/file-manager.js.map +1 -1
- package/dist/cli.js +0 -7
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +9 -97
- package/dist/client.js +50 -23
- package/dist/client.js.map +1 -1
- package/dist/code-map/languages.d.ts +0 -1
- package/dist/code-map/languages.js +17 -181
- package/dist/code-map/languages.js.map +1 -1
- package/dist/code-map/tsconfig.tsbuildinfo +1 -1
- package/dist/common/actions.d.ts +141 -121
- package/dist/common/actions.js +1 -0
- package/dist/common/actions.js.map +1 -1
- package/dist/common/advanced-analyzer.d.ts +19 -0
- package/dist/common/advanced-analyzer.js +140 -0
- package/dist/common/advanced-analyzer.js.map +1 -0
- package/dist/common/browser-actions.d.ts +44 -44
- package/dist/common/message-image-handling.d.ts +41 -0
- package/dist/common/message-image-handling.js +57 -0
- package/dist/common/message-image-handling.js.map +1 -0
- package/dist/common/types/agent-state.d.ts +26 -26
- package/dist/common/types/message.d.ts +14 -14
- package/dist/common/types/usage.d.ts +2 -2
- package/dist/common/util/credentials.d.ts +2 -2
- package/dist/common/util/process-stream.d.ts +8 -0
- package/dist/common/util/process-stream.js +102 -0
- package/dist/common/util/process-stream.js.map +1 -0
- package/dist/common/util/string.js +2 -1
- package/dist/common/util/string.js.map +1 -1
- package/dist/common/websockets/websocket-schema.d.ts +394 -362
- package/dist/index.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/menu.js.map +1 -1
- package/dist/workers/checkpoint-worker.d.ts +1 -0
- package/dist/workers/checkpoint-worker.js +47 -0
- package/dist/workers/checkpoint-worker.js.map +1 -0
- package/package.json +13 -37
- package/dist/common/logger.d.ts +0 -1
- package/dist/common/logger.js +0 -7
- package/dist/common/logger.js.map +0 -1
- package/dist/common/util/constants.d.ts +0 -1
- package/dist/common/util/constants.js +0 -7
- package/dist/common/util/constants.js.map +0 -1
- package/dist/common/util/helpers.d.ts +0 -1
- package/dist/common/util/helpers.js +0 -6
- package/dist/common/util/helpers.js.map +0 -1
- package/dist/common/util/token-counter.d.ts +0 -3
- package/dist/common/util/token-counter.js +0 -27
- package/dist/common/util/token-counter.js.map +0 -1
package/dist/common/actions.d.ts
CHANGED
|
@@ -4,13 +4,13 @@ export declare const FileChangeSchema: z.ZodObject<{
|
|
|
4
4
|
path: z.ZodString;
|
|
5
5
|
content: z.ZodString;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
type: "patch" | "file";
|
|
7
8
|
path: string;
|
|
8
9
|
content: string;
|
|
9
|
-
type: "file" | "patch";
|
|
10
10
|
}, {
|
|
11
|
+
type: "patch" | "file";
|
|
11
12
|
path: string;
|
|
12
13
|
content: string;
|
|
13
|
-
type: "file" | "patch";
|
|
14
14
|
}>;
|
|
15
15
|
export type FileChange = z.infer<typeof FileChangeSchema>;
|
|
16
16
|
export declare const CHANGES: z.ZodArray<z.ZodObject<{
|
|
@@ -18,13 +18,13 @@ export declare const CHANGES: z.ZodArray<z.ZodObject<{
|
|
|
18
18
|
path: z.ZodString;
|
|
19
19
|
content: z.ZodString;
|
|
20
20
|
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
type: "patch" | "file";
|
|
21
22
|
path: string;
|
|
22
23
|
content: string;
|
|
23
|
-
type: "file" | "patch";
|
|
24
24
|
}, {
|
|
25
|
+
type: "patch" | "file";
|
|
25
26
|
path: string;
|
|
26
27
|
content: string;
|
|
27
|
-
type: "file" | "patch";
|
|
28
28
|
}>, "many">;
|
|
29
29
|
export type FileChanges = z.infer<typeof CHANGES>;
|
|
30
30
|
export declare const ToolCallSchema: z.ZodObject<{
|
|
@@ -110,15 +110,15 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
110
110
|
type: "ephemeral";
|
|
111
111
|
}>>;
|
|
112
112
|
}, "strip", z.ZodTypeAny, {
|
|
113
|
-
content: string;
|
|
114
113
|
type: "tool_result";
|
|
114
|
+
content: string;
|
|
115
115
|
tool_use_id: string;
|
|
116
116
|
cache_control?: {
|
|
117
117
|
type: "ephemeral";
|
|
118
118
|
} | undefined;
|
|
119
119
|
}, {
|
|
120
|
-
content: string;
|
|
121
120
|
type: "tool_result";
|
|
121
|
+
content: string;
|
|
122
122
|
tool_use_id: string;
|
|
123
123
|
cache_control?: {
|
|
124
124
|
type: "ephemeral";
|
|
@@ -182,8 +182,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
182
182
|
type: "ephemeral";
|
|
183
183
|
} | undefined;
|
|
184
184
|
} | {
|
|
185
|
-
content: string;
|
|
186
185
|
type: "tool_result";
|
|
186
|
+
content: string;
|
|
187
187
|
tool_use_id: string;
|
|
188
188
|
cache_control?: {
|
|
189
189
|
type: "ephemeral";
|
|
@@ -216,8 +216,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
216
216
|
type: "ephemeral";
|
|
217
217
|
} | undefined;
|
|
218
218
|
} | {
|
|
219
|
-
content: string;
|
|
220
219
|
type: "tool_result";
|
|
220
|
+
content: string;
|
|
221
221
|
tool_use_id: string;
|
|
222
222
|
cache_control?: {
|
|
223
223
|
type: "ephemeral";
|
|
@@ -349,44 +349,17 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
349
349
|
path: z.ZodString;
|
|
350
350
|
content: z.ZodString;
|
|
351
351
|
}, "strip", z.ZodTypeAny, {
|
|
352
|
+
type: "patch" | "file";
|
|
352
353
|
path: string;
|
|
353
354
|
content: string;
|
|
354
|
-
type: "file" | "patch";
|
|
355
355
|
}, {
|
|
356
|
+
type: "patch" | "file";
|
|
356
357
|
path: string;
|
|
357
358
|
content: string;
|
|
358
|
-
type: "file" | "patch";
|
|
359
359
|
}>, "many">;
|
|
360
360
|
costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
|
|
361
361
|
}, "strip", z.ZodTypeAny, {
|
|
362
362
|
type: "user-input";
|
|
363
|
-
fileContext: {
|
|
364
|
-
currentWorkingDirectory: string;
|
|
365
|
-
fileTree: import("./util/file").FileTreeNode[];
|
|
366
|
-
fileTokenScores: Record<string, Record<string, number>>;
|
|
367
|
-
knowledgeFiles: Record<string, string>;
|
|
368
|
-
gitChanges: {
|
|
369
|
-
status: string;
|
|
370
|
-
diff: string;
|
|
371
|
-
diffCached: string;
|
|
372
|
-
lastCommitMessages: string;
|
|
373
|
-
};
|
|
374
|
-
changesSinceLastChat: Record<string, string>;
|
|
375
|
-
shellConfigFiles: Record<string, string>;
|
|
376
|
-
systemInfo: {
|
|
377
|
-
platform: string;
|
|
378
|
-
shell: string;
|
|
379
|
-
nodeVersion: string;
|
|
380
|
-
arch: string;
|
|
381
|
-
homedir: string;
|
|
382
|
-
cpus: number;
|
|
383
|
-
};
|
|
384
|
-
fileVersions: {
|
|
385
|
-
path: string;
|
|
386
|
-
content: string;
|
|
387
|
-
}[][];
|
|
388
|
-
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
389
|
-
};
|
|
390
363
|
fingerprintId: string;
|
|
391
364
|
userInputId: string;
|
|
392
365
|
messages: {
|
|
@@ -405,8 +378,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
405
378
|
type: "ephemeral";
|
|
406
379
|
} | undefined;
|
|
407
380
|
} | {
|
|
408
|
-
content: string;
|
|
409
381
|
type: "tool_result";
|
|
382
|
+
content: string;
|
|
410
383
|
tool_use_id: string;
|
|
411
384
|
cache_control?: {
|
|
412
385
|
type: "ephemeral";
|
|
@@ -424,15 +397,6 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
424
397
|
})[];
|
|
425
398
|
role: "user" | "assistant";
|
|
426
399
|
}[];
|
|
427
|
-
changesAlreadyApplied: {
|
|
428
|
-
path: string;
|
|
429
|
-
content: string;
|
|
430
|
-
type: "file" | "patch";
|
|
431
|
-
}[];
|
|
432
|
-
costMode: "max" | "lite" | "normal";
|
|
433
|
-
authToken?: string | undefined;
|
|
434
|
-
}, {
|
|
435
|
-
type: "user-input";
|
|
436
400
|
fileContext: {
|
|
437
401
|
currentWorkingDirectory: string;
|
|
438
402
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -460,6 +424,15 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
460
424
|
}[][];
|
|
461
425
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
462
426
|
};
|
|
427
|
+
changesAlreadyApplied: {
|
|
428
|
+
type: "patch" | "file";
|
|
429
|
+
path: string;
|
|
430
|
+
content: string;
|
|
431
|
+
}[];
|
|
432
|
+
costMode: "max" | "lite" | "normal";
|
|
433
|
+
authToken?: string | undefined;
|
|
434
|
+
}, {
|
|
435
|
+
type: "user-input";
|
|
463
436
|
fingerprintId: string;
|
|
464
437
|
userInputId: string;
|
|
465
438
|
messages: {
|
|
@@ -478,8 +451,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
478
451
|
type: "ephemeral";
|
|
479
452
|
} | undefined;
|
|
480
453
|
} | {
|
|
481
|
-
content: string;
|
|
482
454
|
type: "tool_result";
|
|
455
|
+
content: string;
|
|
483
456
|
tool_use_id: string;
|
|
484
457
|
cache_control?: {
|
|
485
458
|
type: "ephemeral";
|
|
@@ -497,10 +470,37 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
497
470
|
})[];
|
|
498
471
|
role: "user" | "assistant";
|
|
499
472
|
}[];
|
|
473
|
+
fileContext: {
|
|
474
|
+
currentWorkingDirectory: string;
|
|
475
|
+
fileTree: import("./util/file").FileTreeNode[];
|
|
476
|
+
fileTokenScores: Record<string, Record<string, number>>;
|
|
477
|
+
knowledgeFiles: Record<string, string>;
|
|
478
|
+
gitChanges: {
|
|
479
|
+
status: string;
|
|
480
|
+
diff: string;
|
|
481
|
+
diffCached: string;
|
|
482
|
+
lastCommitMessages: string;
|
|
483
|
+
};
|
|
484
|
+
changesSinceLastChat: Record<string, string>;
|
|
485
|
+
shellConfigFiles: Record<string, string>;
|
|
486
|
+
systemInfo: {
|
|
487
|
+
platform: string;
|
|
488
|
+
shell: string;
|
|
489
|
+
nodeVersion: string;
|
|
490
|
+
arch: string;
|
|
491
|
+
homedir: string;
|
|
492
|
+
cpus: number;
|
|
493
|
+
};
|
|
494
|
+
fileVersions: {
|
|
495
|
+
path: string;
|
|
496
|
+
content: string;
|
|
497
|
+
}[][];
|
|
498
|
+
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
499
|
+
};
|
|
500
500
|
changesAlreadyApplied: {
|
|
501
|
+
type: "patch" | "file";
|
|
501
502
|
path: string;
|
|
502
503
|
content: string;
|
|
503
|
-
type: "file" | "patch";
|
|
504
504
|
}[];
|
|
505
505
|
authToken?: string | undefined;
|
|
506
506
|
costMode?: "max" | "lite" | "normal" | undefined;
|
|
@@ -686,15 +686,15 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
686
686
|
type: "ephemeral";
|
|
687
687
|
}>>;
|
|
688
688
|
}, "strip", z.ZodTypeAny, {
|
|
689
|
-
content: string;
|
|
690
689
|
type: "tool_result";
|
|
690
|
+
content: string;
|
|
691
691
|
tool_use_id: string;
|
|
692
692
|
cache_control?: {
|
|
693
693
|
type: "ephemeral";
|
|
694
694
|
} | undefined;
|
|
695
695
|
}, {
|
|
696
|
-
content: string;
|
|
697
696
|
type: "tool_result";
|
|
697
|
+
content: string;
|
|
698
698
|
tool_use_id: string;
|
|
699
699
|
cache_control?: {
|
|
700
700
|
type: "ephemeral";
|
|
@@ -758,8 +758,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
758
758
|
type: "ephemeral";
|
|
759
759
|
} | undefined;
|
|
760
760
|
} | {
|
|
761
|
-
content: string;
|
|
762
761
|
type: "tool_result";
|
|
762
|
+
content: string;
|
|
763
763
|
tool_use_id: string;
|
|
764
764
|
cache_control?: {
|
|
765
765
|
type: "ephemeral";
|
|
@@ -792,8 +792,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
792
792
|
type: "ephemeral";
|
|
793
793
|
} | undefined;
|
|
794
794
|
} | {
|
|
795
|
-
content: string;
|
|
796
795
|
type: "tool_result";
|
|
796
|
+
content: string;
|
|
797
797
|
tool_use_id: string;
|
|
798
798
|
cache_control?: {
|
|
799
799
|
type: "ephemeral";
|
|
@@ -812,7 +812,6 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
812
812
|
role: "user" | "assistant";
|
|
813
813
|
}>, "many">;
|
|
814
814
|
}, "strip", z.ZodTypeAny, {
|
|
815
|
-
agentContext: string;
|
|
816
815
|
fileContext: {
|
|
817
816
|
currentWorkingDirectory: string;
|
|
818
817
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -840,6 +839,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
840
839
|
}[][];
|
|
841
840
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
842
841
|
};
|
|
842
|
+
agentContext: string;
|
|
843
843
|
messageHistory: {
|
|
844
844
|
content: string | ({
|
|
845
845
|
type: "text";
|
|
@@ -856,8 +856,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
856
856
|
type: "ephemeral";
|
|
857
857
|
} | undefined;
|
|
858
858
|
} | {
|
|
859
|
-
content: string;
|
|
860
859
|
type: "tool_result";
|
|
860
|
+
content: string;
|
|
861
861
|
tool_use_id: string;
|
|
862
862
|
cache_control?: {
|
|
863
863
|
type: "ephemeral";
|
|
@@ -876,7 +876,6 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
876
876
|
role: "user" | "assistant";
|
|
877
877
|
}[];
|
|
878
878
|
}, {
|
|
879
|
-
agentContext: string;
|
|
880
879
|
fileContext: {
|
|
881
880
|
currentWorkingDirectory: string;
|
|
882
881
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -904,6 +903,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
904
903
|
}[][];
|
|
905
904
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
906
905
|
};
|
|
906
|
+
agentContext: string;
|
|
907
907
|
messageHistory: {
|
|
908
908
|
content: string | ({
|
|
909
909
|
type: "text";
|
|
@@ -920,8 +920,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
920
920
|
type: "ephemeral";
|
|
921
921
|
} | undefined;
|
|
922
922
|
} | {
|
|
923
|
-
content: string;
|
|
924
923
|
type: "tool_result";
|
|
924
|
+
content: string;
|
|
925
925
|
tool_use_id: string;
|
|
926
926
|
cache_control?: {
|
|
927
927
|
type: "ephemeral";
|
|
@@ -959,7 +959,6 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
959
959
|
costMode: "max" | "lite" | "normal";
|
|
960
960
|
promptId: string;
|
|
961
961
|
agentState: {
|
|
962
|
-
agentContext: string;
|
|
963
962
|
fileContext: {
|
|
964
963
|
currentWorkingDirectory: string;
|
|
965
964
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -987,6 +986,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
987
986
|
}[][];
|
|
988
987
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
989
988
|
};
|
|
989
|
+
agentContext: string;
|
|
990
990
|
messageHistory: {
|
|
991
991
|
content: string | ({
|
|
992
992
|
type: "text";
|
|
@@ -1003,8 +1003,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1003
1003
|
type: "ephemeral";
|
|
1004
1004
|
} | undefined;
|
|
1005
1005
|
} | {
|
|
1006
|
-
content: string;
|
|
1007
1006
|
type: "tool_result";
|
|
1007
|
+
content: string;
|
|
1008
1008
|
tool_use_id: string;
|
|
1009
1009
|
cache_control?: {
|
|
1010
1010
|
type: "ephemeral";
|
|
@@ -1035,7 +1035,6 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1035
1035
|
fingerprintId: string;
|
|
1036
1036
|
promptId: string;
|
|
1037
1037
|
agentState: {
|
|
1038
|
-
agentContext: string;
|
|
1039
1038
|
fileContext: {
|
|
1040
1039
|
currentWorkingDirectory: string;
|
|
1041
1040
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -1063,6 +1062,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1063
1062
|
}[][];
|
|
1064
1063
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1065
1064
|
};
|
|
1065
|
+
agentContext: string;
|
|
1066
1066
|
messageHistory: {
|
|
1067
1067
|
content: string | ({
|
|
1068
1068
|
type: "text";
|
|
@@ -1079,8 +1079,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1079
1079
|
type: "ephemeral";
|
|
1080
1080
|
} | undefined;
|
|
1081
1081
|
} | {
|
|
1082
|
-
content: string;
|
|
1083
1082
|
type: "tool_result";
|
|
1083
|
+
content: string;
|
|
1084
1084
|
tool_use_id: string;
|
|
1085
1085
|
cache_control?: {
|
|
1086
1086
|
type: "ephemeral";
|
|
@@ -1234,6 +1234,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1234
1234
|
}>;
|
|
1235
1235
|
}, "strip", z.ZodTypeAny, {
|
|
1236
1236
|
type: "init";
|
|
1237
|
+
fingerprintId: string;
|
|
1237
1238
|
fileContext: {
|
|
1238
1239
|
currentWorkingDirectory: string;
|
|
1239
1240
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -1261,10 +1262,10 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1261
1262
|
}[][];
|
|
1262
1263
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1263
1264
|
};
|
|
1264
|
-
fingerprintId: string;
|
|
1265
1265
|
authToken?: string | undefined;
|
|
1266
1266
|
}, {
|
|
1267
1267
|
type: "init";
|
|
1268
|
+
fingerprintId: string;
|
|
1268
1269
|
fileContext: {
|
|
1269
1270
|
currentWorkingDirectory: string;
|
|
1270
1271
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -1292,7 +1293,6 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1292
1293
|
}[][];
|
|
1293
1294
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1294
1295
|
};
|
|
1295
|
-
fingerprintId: string;
|
|
1296
1296
|
authToken?: string | undefined;
|
|
1297
1297
|
}>, z.ZodObject<{
|
|
1298
1298
|
type: z.ZodLiteral<"usage">;
|
|
@@ -1325,6 +1325,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1325
1325
|
export type ClientAction = z.infer<typeof CLIENT_ACTION_SCHEMA>;
|
|
1326
1326
|
export declare const UsageReponseSchema: z.ZodObject<{
|
|
1327
1327
|
type: z.ZodLiteral<"usage-response">;
|
|
1328
|
+
promptId: z.ZodOptional<z.ZodString>;
|
|
1328
1329
|
usage: z.ZodNumber;
|
|
1329
1330
|
limit: z.ZodNumber;
|
|
1330
1331
|
referralLink: z.ZodOptional<z.ZodString>;
|
|
@@ -1338,6 +1339,7 @@ export declare const UsageReponseSchema: z.ZodObject<{
|
|
|
1338
1339
|
subscription_active: boolean;
|
|
1339
1340
|
next_quota_reset: Date;
|
|
1340
1341
|
session_credits_used: number;
|
|
1342
|
+
promptId?: string | undefined;
|
|
1341
1343
|
referralLink?: string | undefined;
|
|
1342
1344
|
}, {
|
|
1343
1345
|
type: "usage-response";
|
|
@@ -1346,6 +1348,7 @@ export declare const UsageReponseSchema: z.ZodObject<{
|
|
|
1346
1348
|
subscription_active: boolean;
|
|
1347
1349
|
next_quota_reset: Date;
|
|
1348
1350
|
session_credits_used: number;
|
|
1351
|
+
promptId?: string | undefined;
|
|
1349
1352
|
referralLink?: string | undefined;
|
|
1350
1353
|
}>;
|
|
1351
1354
|
export type UsageResponse = z.infer<typeof UsageReponseSchema>;
|
|
@@ -1353,6 +1356,7 @@ export declare const InitResponseSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1353
1356
|
type: z.ZodLiteral<"init-response">;
|
|
1354
1357
|
}, Omit<{
|
|
1355
1358
|
type: z.ZodLiteral<"usage-response">;
|
|
1359
|
+
promptId: z.ZodOptional<z.ZodString>;
|
|
1356
1360
|
usage: z.ZodNumber;
|
|
1357
1361
|
limit: z.ZodNumber;
|
|
1358
1362
|
referralLink: z.ZodOptional<z.ZodString>;
|
|
@@ -1366,6 +1370,7 @@ export declare const InitResponseSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1366
1370
|
subscription_active: boolean;
|
|
1367
1371
|
next_quota_reset: Date;
|
|
1368
1372
|
session_credits_used: number;
|
|
1373
|
+
promptId?: string | undefined;
|
|
1369
1374
|
referralLink?: string | undefined;
|
|
1370
1375
|
}, {
|
|
1371
1376
|
type: "init-response";
|
|
@@ -1374,6 +1379,7 @@ export declare const InitResponseSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1374
1379
|
subscription_active: boolean;
|
|
1375
1380
|
next_quota_reset: Date;
|
|
1376
1381
|
session_credits_used: number;
|
|
1382
|
+
promptId?: string | undefined;
|
|
1377
1383
|
referralLink?: string | undefined;
|
|
1378
1384
|
}>;
|
|
1379
1385
|
export type InitResponse = z.infer<typeof InitResponseSchema>;
|
|
@@ -1386,26 +1392,26 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
1386
1392
|
path: z.ZodString;
|
|
1387
1393
|
content: z.ZodString;
|
|
1388
1394
|
}, "strip", z.ZodTypeAny, {
|
|
1395
|
+
type: "patch" | "file";
|
|
1389
1396
|
path: string;
|
|
1390
1397
|
content: string;
|
|
1391
|
-
type: "file" | "patch";
|
|
1392
1398
|
}, {
|
|
1399
|
+
type: "patch" | "file";
|
|
1393
1400
|
path: string;
|
|
1394
1401
|
content: string;
|
|
1395
|
-
type: "file" | "patch";
|
|
1396
1402
|
}>, "many">;
|
|
1397
1403
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
1398
1404
|
type: z.ZodEnum<["patch", "file"]>;
|
|
1399
1405
|
path: z.ZodString;
|
|
1400
1406
|
content: z.ZodString;
|
|
1401
1407
|
}, "strip", z.ZodTypeAny, {
|
|
1408
|
+
type: "patch" | "file";
|
|
1402
1409
|
path: string;
|
|
1403
1410
|
content: string;
|
|
1404
|
-
type: "file" | "patch";
|
|
1405
1411
|
}, {
|
|
1412
|
+
type: "patch" | "file";
|
|
1406
1413
|
path: string;
|
|
1407
1414
|
content: string;
|
|
1408
|
-
type: "file" | "patch";
|
|
1409
1415
|
}>, "many">;
|
|
1410
1416
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
1411
1417
|
path: z.ZodString;
|
|
@@ -1419,6 +1425,7 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
1419
1425
|
}>, "many">;
|
|
1420
1426
|
resetFileVersions: z.ZodBoolean;
|
|
1421
1427
|
}, {
|
|
1428
|
+
promptId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1422
1429
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
1423
1430
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
1424
1431
|
referralLink: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
@@ -1429,21 +1436,22 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
1429
1436
|
type: "response-complete";
|
|
1430
1437
|
userInputId: string;
|
|
1431
1438
|
changesAlreadyApplied: {
|
|
1439
|
+
type: "patch" | "file";
|
|
1432
1440
|
path: string;
|
|
1433
1441
|
content: string;
|
|
1434
|
-
type: "file" | "patch";
|
|
1435
1442
|
}[];
|
|
1436
1443
|
response: string;
|
|
1437
1444
|
changes: {
|
|
1445
|
+
type: "patch" | "file";
|
|
1438
1446
|
path: string;
|
|
1439
1447
|
content: string;
|
|
1440
|
-
type: "file" | "patch";
|
|
1441
1448
|
}[];
|
|
1442
1449
|
addedFileVersions: {
|
|
1443
1450
|
path: string;
|
|
1444
1451
|
content: string;
|
|
1445
1452
|
}[];
|
|
1446
1453
|
resetFileVersions: boolean;
|
|
1454
|
+
promptId?: string | undefined;
|
|
1447
1455
|
usage?: number | undefined;
|
|
1448
1456
|
limit?: number | undefined;
|
|
1449
1457
|
referralLink?: string | undefined;
|
|
@@ -1454,21 +1462,22 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
1454
1462
|
type: "response-complete";
|
|
1455
1463
|
userInputId: string;
|
|
1456
1464
|
changesAlreadyApplied: {
|
|
1465
|
+
type: "patch" | "file";
|
|
1457
1466
|
path: string;
|
|
1458
1467
|
content: string;
|
|
1459
|
-
type: "file" | "patch";
|
|
1460
1468
|
}[];
|
|
1461
1469
|
response: string;
|
|
1462
1470
|
changes: {
|
|
1471
|
+
type: "patch" | "file";
|
|
1463
1472
|
path: string;
|
|
1464
1473
|
content: string;
|
|
1465
|
-
type: "file" | "patch";
|
|
1466
1474
|
}[];
|
|
1467
1475
|
addedFileVersions: {
|
|
1468
1476
|
path: string;
|
|
1469
1477
|
content: string;
|
|
1470
1478
|
}[];
|
|
1471
1479
|
resetFileVersions: boolean;
|
|
1480
|
+
promptId?: string | undefined;
|
|
1472
1481
|
usage?: number | undefined;
|
|
1473
1482
|
limit?: number | undefined;
|
|
1474
1483
|
referralLink?: string | undefined;
|
|
@@ -1654,15 +1663,15 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1654
1663
|
type: "ephemeral";
|
|
1655
1664
|
}>>;
|
|
1656
1665
|
}, "strip", z.ZodTypeAny, {
|
|
1657
|
-
content: string;
|
|
1658
1666
|
type: "tool_result";
|
|
1667
|
+
content: string;
|
|
1659
1668
|
tool_use_id: string;
|
|
1660
1669
|
cache_control?: {
|
|
1661
1670
|
type: "ephemeral";
|
|
1662
1671
|
} | undefined;
|
|
1663
1672
|
}, {
|
|
1664
|
-
content: string;
|
|
1665
1673
|
type: "tool_result";
|
|
1674
|
+
content: string;
|
|
1666
1675
|
tool_use_id: string;
|
|
1667
1676
|
cache_control?: {
|
|
1668
1677
|
type: "ephemeral";
|
|
@@ -1726,8 +1735,8 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1726
1735
|
type: "ephemeral";
|
|
1727
1736
|
} | undefined;
|
|
1728
1737
|
} | {
|
|
1729
|
-
content: string;
|
|
1730
1738
|
type: "tool_result";
|
|
1739
|
+
content: string;
|
|
1731
1740
|
tool_use_id: string;
|
|
1732
1741
|
cache_control?: {
|
|
1733
1742
|
type: "ephemeral";
|
|
@@ -1760,8 +1769,8 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1760
1769
|
type: "ephemeral";
|
|
1761
1770
|
} | undefined;
|
|
1762
1771
|
} | {
|
|
1763
|
-
content: string;
|
|
1764
1772
|
type: "tool_result";
|
|
1773
|
+
content: string;
|
|
1765
1774
|
tool_use_id: string;
|
|
1766
1775
|
cache_control?: {
|
|
1767
1776
|
type: "ephemeral";
|
|
@@ -1780,7 +1789,6 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1780
1789
|
role: "user" | "assistant";
|
|
1781
1790
|
}>, "many">;
|
|
1782
1791
|
}, "strip", z.ZodTypeAny, {
|
|
1783
|
-
agentContext: string;
|
|
1784
1792
|
fileContext: {
|
|
1785
1793
|
currentWorkingDirectory: string;
|
|
1786
1794
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -1808,6 +1816,7 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1808
1816
|
}[][];
|
|
1809
1817
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1810
1818
|
};
|
|
1819
|
+
agentContext: string;
|
|
1811
1820
|
messageHistory: {
|
|
1812
1821
|
content: string | ({
|
|
1813
1822
|
type: "text";
|
|
@@ -1824,8 +1833,8 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1824
1833
|
type: "ephemeral";
|
|
1825
1834
|
} | undefined;
|
|
1826
1835
|
} | {
|
|
1827
|
-
content: string;
|
|
1828
1836
|
type: "tool_result";
|
|
1837
|
+
content: string;
|
|
1829
1838
|
tool_use_id: string;
|
|
1830
1839
|
cache_control?: {
|
|
1831
1840
|
type: "ephemeral";
|
|
@@ -1844,7 +1853,6 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1844
1853
|
role: "user" | "assistant";
|
|
1845
1854
|
}[];
|
|
1846
1855
|
}, {
|
|
1847
|
-
agentContext: string;
|
|
1848
1856
|
fileContext: {
|
|
1849
1857
|
currentWorkingDirectory: string;
|
|
1850
1858
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -1872,6 +1880,7 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1872
1880
|
}[][];
|
|
1873
1881
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1874
1882
|
};
|
|
1883
|
+
agentContext: string;
|
|
1875
1884
|
messageHistory: {
|
|
1876
1885
|
content: string | ({
|
|
1877
1886
|
type: "text";
|
|
@@ -1888,8 +1897,8 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1888
1897
|
type: "ephemeral";
|
|
1889
1898
|
} | undefined;
|
|
1890
1899
|
} | {
|
|
1891
|
-
content: string;
|
|
1892
1900
|
type: "tool_result";
|
|
1901
|
+
content: string;
|
|
1893
1902
|
tool_use_id: string;
|
|
1894
1903
|
cache_control?: {
|
|
1895
1904
|
type: "ephemeral";
|
|
@@ -1935,6 +1944,7 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1935
1944
|
result: string;
|
|
1936
1945
|
}>, "many">;
|
|
1937
1946
|
}, {
|
|
1947
|
+
promptId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1938
1948
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
1939
1949
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
1940
1950
|
referralLink: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
@@ -1943,9 +1953,7 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1943
1953
|
session_credits_used: z.ZodOptional<z.ZodNumber>;
|
|
1944
1954
|
}>, "strip", z.ZodTypeAny, {
|
|
1945
1955
|
type: "prompt-response";
|
|
1946
|
-
promptId: string;
|
|
1947
1956
|
agentState: {
|
|
1948
|
-
agentContext: string;
|
|
1949
1957
|
fileContext: {
|
|
1950
1958
|
currentWorkingDirectory: string;
|
|
1951
1959
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -1973,6 +1981,7 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1973
1981
|
}[][];
|
|
1974
1982
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1975
1983
|
};
|
|
1984
|
+
agentContext: string;
|
|
1976
1985
|
messageHistory: {
|
|
1977
1986
|
content: string | ({
|
|
1978
1987
|
type: "text";
|
|
@@ -1989,8 +1998,8 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1989
1998
|
type: "ephemeral";
|
|
1990
1999
|
} | undefined;
|
|
1991
2000
|
} | {
|
|
1992
|
-
content: string;
|
|
1993
2001
|
type: "tool_result";
|
|
2002
|
+
content: string;
|
|
1994
2003
|
tool_use_id: string;
|
|
1995
2004
|
cache_control?: {
|
|
1996
2005
|
type: "ephemeral";
|
|
@@ -2019,6 +2028,7 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
2019
2028
|
id: string;
|
|
2020
2029
|
parameters: Record<string, string>;
|
|
2021
2030
|
}[];
|
|
2031
|
+
promptId?: string | undefined;
|
|
2022
2032
|
usage?: number | undefined;
|
|
2023
2033
|
limit?: number | undefined;
|
|
2024
2034
|
referralLink?: string | undefined;
|
|
@@ -2027,9 +2037,7 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
2027
2037
|
session_credits_used?: number | undefined;
|
|
2028
2038
|
}, {
|
|
2029
2039
|
type: "prompt-response";
|
|
2030
|
-
promptId: string;
|
|
2031
2040
|
agentState: {
|
|
2032
|
-
agentContext: string;
|
|
2033
2041
|
fileContext: {
|
|
2034
2042
|
currentWorkingDirectory: string;
|
|
2035
2043
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -2057,6 +2065,7 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
2057
2065
|
}[][];
|
|
2058
2066
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
2059
2067
|
};
|
|
2068
|
+
agentContext: string;
|
|
2060
2069
|
messageHistory: {
|
|
2061
2070
|
content: string | ({
|
|
2062
2071
|
type: "text";
|
|
@@ -2073,8 +2082,8 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
2073
2082
|
type: "ephemeral";
|
|
2074
2083
|
} | undefined;
|
|
2075
2084
|
} | {
|
|
2076
|
-
content: string;
|
|
2077
2085
|
type: "tool_result";
|
|
2086
|
+
content: string;
|
|
2078
2087
|
tool_use_id: string;
|
|
2079
2088
|
cache_control?: {
|
|
2080
2089
|
type: "ephemeral";
|
|
@@ -2103,6 +2112,7 @@ export declare const PromptResponseSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
2103
2112
|
id: string;
|
|
2104
2113
|
parameters: Record<string, string>;
|
|
2105
2114
|
}[];
|
|
2115
|
+
promptId?: string | undefined;
|
|
2106
2116
|
usage?: number | undefined;
|
|
2107
2117
|
limit?: number | undefined;
|
|
2108
2118
|
referralLink?: string | undefined;
|
|
@@ -2132,26 +2142,26 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2132
2142
|
path: z.ZodString;
|
|
2133
2143
|
content: z.ZodString;
|
|
2134
2144
|
}, "strip", z.ZodTypeAny, {
|
|
2145
|
+
type: "patch" | "file";
|
|
2135
2146
|
path: string;
|
|
2136
2147
|
content: string;
|
|
2137
|
-
type: "file" | "patch";
|
|
2138
2148
|
}, {
|
|
2149
|
+
type: "patch" | "file";
|
|
2139
2150
|
path: string;
|
|
2140
2151
|
content: string;
|
|
2141
|
-
type: "file" | "patch";
|
|
2142
2152
|
}>, "many">;
|
|
2143
2153
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
2144
2154
|
type: z.ZodEnum<["patch", "file"]>;
|
|
2145
2155
|
path: z.ZodString;
|
|
2146
2156
|
content: z.ZodString;
|
|
2147
2157
|
}, "strip", z.ZodTypeAny, {
|
|
2158
|
+
type: "patch" | "file";
|
|
2148
2159
|
path: string;
|
|
2149
2160
|
content: string;
|
|
2150
|
-
type: "file" | "patch";
|
|
2151
2161
|
}, {
|
|
2162
|
+
type: "patch" | "file";
|
|
2152
2163
|
path: string;
|
|
2153
2164
|
content: string;
|
|
2154
|
-
type: "file" | "patch";
|
|
2155
2165
|
}>, "many">;
|
|
2156
2166
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
2157
2167
|
path: z.ZodString;
|
|
@@ -2165,6 +2175,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2165
2175
|
}>, "many">;
|
|
2166
2176
|
resetFileVersions: z.ZodBoolean;
|
|
2167
2177
|
}, {
|
|
2178
|
+
promptId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
2168
2179
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
2169
2180
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
2170
2181
|
referralLink: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
@@ -2175,21 +2186,22 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2175
2186
|
type: "response-complete";
|
|
2176
2187
|
userInputId: string;
|
|
2177
2188
|
changesAlreadyApplied: {
|
|
2189
|
+
type: "patch" | "file";
|
|
2178
2190
|
path: string;
|
|
2179
2191
|
content: string;
|
|
2180
|
-
type: "file" | "patch";
|
|
2181
2192
|
}[];
|
|
2182
2193
|
response: string;
|
|
2183
2194
|
changes: {
|
|
2195
|
+
type: "patch" | "file";
|
|
2184
2196
|
path: string;
|
|
2185
2197
|
content: string;
|
|
2186
|
-
type: "file" | "patch";
|
|
2187
2198
|
}[];
|
|
2188
2199
|
addedFileVersions: {
|
|
2189
2200
|
path: string;
|
|
2190
2201
|
content: string;
|
|
2191
2202
|
}[];
|
|
2192
2203
|
resetFileVersions: boolean;
|
|
2204
|
+
promptId?: string | undefined;
|
|
2193
2205
|
usage?: number | undefined;
|
|
2194
2206
|
limit?: number | undefined;
|
|
2195
2207
|
referralLink?: string | undefined;
|
|
@@ -2200,21 +2212,22 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2200
2212
|
type: "response-complete";
|
|
2201
2213
|
userInputId: string;
|
|
2202
2214
|
changesAlreadyApplied: {
|
|
2215
|
+
type: "patch" | "file";
|
|
2203
2216
|
path: string;
|
|
2204
2217
|
content: string;
|
|
2205
|
-
type: "file" | "patch";
|
|
2206
2218
|
}[];
|
|
2207
2219
|
response: string;
|
|
2208
2220
|
changes: {
|
|
2221
|
+
type: "patch" | "file";
|
|
2209
2222
|
path: string;
|
|
2210
2223
|
content: string;
|
|
2211
|
-
type: "file" | "patch";
|
|
2212
2224
|
}[];
|
|
2213
2225
|
addedFileVersions: {
|
|
2214
2226
|
path: string;
|
|
2215
2227
|
content: string;
|
|
2216
2228
|
}[];
|
|
2217
2229
|
resetFileVersions: boolean;
|
|
2230
|
+
promptId?: string | undefined;
|
|
2218
2231
|
usage?: number | undefined;
|
|
2219
2232
|
limit?: number | undefined;
|
|
2220
2233
|
referralLink?: string | undefined;
|
|
@@ -2399,15 +2412,15 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2399
2412
|
type: "ephemeral";
|
|
2400
2413
|
}>>;
|
|
2401
2414
|
}, "strip", z.ZodTypeAny, {
|
|
2402
|
-
content: string;
|
|
2403
2415
|
type: "tool_result";
|
|
2416
|
+
content: string;
|
|
2404
2417
|
tool_use_id: string;
|
|
2405
2418
|
cache_control?: {
|
|
2406
2419
|
type: "ephemeral";
|
|
2407
2420
|
} | undefined;
|
|
2408
2421
|
}, {
|
|
2409
|
-
content: string;
|
|
2410
2422
|
type: "tool_result";
|
|
2423
|
+
content: string;
|
|
2411
2424
|
tool_use_id: string;
|
|
2412
2425
|
cache_control?: {
|
|
2413
2426
|
type: "ephemeral";
|
|
@@ -2471,8 +2484,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2471
2484
|
type: "ephemeral";
|
|
2472
2485
|
} | undefined;
|
|
2473
2486
|
} | {
|
|
2474
|
-
content: string;
|
|
2475
2487
|
type: "tool_result";
|
|
2488
|
+
content: string;
|
|
2476
2489
|
tool_use_id: string;
|
|
2477
2490
|
cache_control?: {
|
|
2478
2491
|
type: "ephemeral";
|
|
@@ -2505,8 +2518,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2505
2518
|
type: "ephemeral";
|
|
2506
2519
|
} | undefined;
|
|
2507
2520
|
} | {
|
|
2508
|
-
content: string;
|
|
2509
2521
|
type: "tool_result";
|
|
2522
|
+
content: string;
|
|
2510
2523
|
tool_use_id: string;
|
|
2511
2524
|
cache_control?: {
|
|
2512
2525
|
type: "ephemeral";
|
|
@@ -2525,7 +2538,6 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2525
2538
|
role: "user" | "assistant";
|
|
2526
2539
|
}>, "many">;
|
|
2527
2540
|
}, "strip", z.ZodTypeAny, {
|
|
2528
|
-
agentContext: string;
|
|
2529
2541
|
fileContext: {
|
|
2530
2542
|
currentWorkingDirectory: string;
|
|
2531
2543
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -2553,6 +2565,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2553
2565
|
}[][];
|
|
2554
2566
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
2555
2567
|
};
|
|
2568
|
+
agentContext: string;
|
|
2556
2569
|
messageHistory: {
|
|
2557
2570
|
content: string | ({
|
|
2558
2571
|
type: "text";
|
|
@@ -2569,8 +2582,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2569
2582
|
type: "ephemeral";
|
|
2570
2583
|
} | undefined;
|
|
2571
2584
|
} | {
|
|
2572
|
-
content: string;
|
|
2573
2585
|
type: "tool_result";
|
|
2586
|
+
content: string;
|
|
2574
2587
|
tool_use_id: string;
|
|
2575
2588
|
cache_control?: {
|
|
2576
2589
|
type: "ephemeral";
|
|
@@ -2589,7 +2602,6 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2589
2602
|
role: "user" | "assistant";
|
|
2590
2603
|
}[];
|
|
2591
2604
|
}, {
|
|
2592
|
-
agentContext: string;
|
|
2593
2605
|
fileContext: {
|
|
2594
2606
|
currentWorkingDirectory: string;
|
|
2595
2607
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -2617,6 +2629,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2617
2629
|
}[][];
|
|
2618
2630
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
2619
2631
|
};
|
|
2632
|
+
agentContext: string;
|
|
2620
2633
|
messageHistory: {
|
|
2621
2634
|
content: string | ({
|
|
2622
2635
|
type: "text";
|
|
@@ -2633,8 +2646,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2633
2646
|
type: "ephemeral";
|
|
2634
2647
|
} | undefined;
|
|
2635
2648
|
} | {
|
|
2636
|
-
content: string;
|
|
2637
2649
|
type: "tool_result";
|
|
2650
|
+
content: string;
|
|
2638
2651
|
tool_use_id: string;
|
|
2639
2652
|
cache_control?: {
|
|
2640
2653
|
type: "ephemeral";
|
|
@@ -2680,6 +2693,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2680
2693
|
result: string;
|
|
2681
2694
|
}>, "many">;
|
|
2682
2695
|
}, {
|
|
2696
|
+
promptId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
2683
2697
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
2684
2698
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
2685
2699
|
referralLink: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
@@ -2688,9 +2702,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2688
2702
|
session_credits_used: z.ZodOptional<z.ZodNumber>;
|
|
2689
2703
|
}>, "strip", z.ZodTypeAny, {
|
|
2690
2704
|
type: "prompt-response";
|
|
2691
|
-
promptId: string;
|
|
2692
2705
|
agentState: {
|
|
2693
|
-
agentContext: string;
|
|
2694
2706
|
fileContext: {
|
|
2695
2707
|
currentWorkingDirectory: string;
|
|
2696
2708
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -2718,6 +2730,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2718
2730
|
}[][];
|
|
2719
2731
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
2720
2732
|
};
|
|
2733
|
+
agentContext: string;
|
|
2721
2734
|
messageHistory: {
|
|
2722
2735
|
content: string | ({
|
|
2723
2736
|
type: "text";
|
|
@@ -2734,8 +2747,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2734
2747
|
type: "ephemeral";
|
|
2735
2748
|
} | undefined;
|
|
2736
2749
|
} | {
|
|
2737
|
-
content: string;
|
|
2738
2750
|
type: "tool_result";
|
|
2751
|
+
content: string;
|
|
2739
2752
|
tool_use_id: string;
|
|
2740
2753
|
cache_control?: {
|
|
2741
2754
|
type: "ephemeral";
|
|
@@ -2764,6 +2777,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2764
2777
|
id: string;
|
|
2765
2778
|
parameters: Record<string, string>;
|
|
2766
2779
|
}[];
|
|
2780
|
+
promptId?: string | undefined;
|
|
2767
2781
|
usage?: number | undefined;
|
|
2768
2782
|
limit?: number | undefined;
|
|
2769
2783
|
referralLink?: string | undefined;
|
|
@@ -2772,9 +2786,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2772
2786
|
session_credits_used?: number | undefined;
|
|
2773
2787
|
}, {
|
|
2774
2788
|
type: "prompt-response";
|
|
2775
|
-
promptId: string;
|
|
2776
2789
|
agentState: {
|
|
2777
|
-
agentContext: string;
|
|
2778
2790
|
fileContext: {
|
|
2779
2791
|
currentWorkingDirectory: string;
|
|
2780
2792
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -2802,6 +2814,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2802
2814
|
}[][];
|
|
2803
2815
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
2804
2816
|
};
|
|
2817
|
+
agentContext: string;
|
|
2805
2818
|
messageHistory: {
|
|
2806
2819
|
content: string | ({
|
|
2807
2820
|
type: "text";
|
|
@@ -2818,8 +2831,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2818
2831
|
type: "ephemeral";
|
|
2819
2832
|
} | undefined;
|
|
2820
2833
|
} | {
|
|
2821
|
-
content: string;
|
|
2822
2834
|
type: "tool_result";
|
|
2835
|
+
content: string;
|
|
2823
2836
|
tool_use_id: string;
|
|
2824
2837
|
cache_control?: {
|
|
2825
2838
|
type: "ephemeral";
|
|
@@ -2848,6 +2861,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2848
2861
|
id: string;
|
|
2849
2862
|
parameters: Record<string, string>;
|
|
2850
2863
|
}[];
|
|
2864
|
+
promptId?: string | undefined;
|
|
2851
2865
|
usage?: number | undefined;
|
|
2852
2866
|
limit?: number | undefined;
|
|
2853
2867
|
referralLink?: string | undefined;
|
|
@@ -2888,26 +2902,26 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2888
2902
|
path: z.ZodString;
|
|
2889
2903
|
content: z.ZodString;
|
|
2890
2904
|
}, "strip", z.ZodTypeAny, {
|
|
2905
|
+
type: "patch" | "file";
|
|
2891
2906
|
path: string;
|
|
2892
2907
|
content: string;
|
|
2893
|
-
type: "file" | "patch";
|
|
2894
2908
|
}, {
|
|
2909
|
+
type: "patch" | "file";
|
|
2895
2910
|
path: string;
|
|
2896
2911
|
content: string;
|
|
2897
|
-
type: "file" | "patch";
|
|
2898
2912
|
}>, "many">;
|
|
2899
2913
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
2900
2914
|
type: z.ZodEnum<["patch", "file"]>;
|
|
2901
2915
|
path: z.ZodString;
|
|
2902
2916
|
content: z.ZodString;
|
|
2903
2917
|
}, "strip", z.ZodTypeAny, {
|
|
2918
|
+
type: "patch" | "file";
|
|
2904
2919
|
path: string;
|
|
2905
2920
|
content: string;
|
|
2906
|
-
type: "file" | "patch";
|
|
2907
2921
|
}, {
|
|
2922
|
+
type: "patch" | "file";
|
|
2908
2923
|
path: string;
|
|
2909
2924
|
content: string;
|
|
2910
|
-
type: "file" | "patch";
|
|
2911
2925
|
}>, "many">;
|
|
2912
2926
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
2913
2927
|
path: z.ZodString;
|
|
@@ -2922,22 +2936,22 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2922
2936
|
resetFileVersions: z.ZodBoolean;
|
|
2923
2937
|
}, "strip", z.ZodTypeAny, {
|
|
2924
2938
|
type: "tool-call";
|
|
2939
|
+
userInputId: string;
|
|
2925
2940
|
data: {
|
|
2926
2941
|
name: string;
|
|
2927
2942
|
id: string;
|
|
2928
2943
|
input: Record<string, any>;
|
|
2929
2944
|
};
|
|
2930
|
-
userInputId: string;
|
|
2931
2945
|
changesAlreadyApplied: {
|
|
2946
|
+
type: "patch" | "file";
|
|
2932
2947
|
path: string;
|
|
2933
2948
|
content: string;
|
|
2934
|
-
type: "file" | "patch";
|
|
2935
2949
|
}[];
|
|
2936
2950
|
response: string;
|
|
2937
2951
|
changes: {
|
|
2952
|
+
type: "patch" | "file";
|
|
2938
2953
|
path: string;
|
|
2939
2954
|
content: string;
|
|
2940
|
-
type: "file" | "patch";
|
|
2941
2955
|
}[];
|
|
2942
2956
|
addedFileVersions: {
|
|
2943
2957
|
path: string;
|
|
@@ -2946,22 +2960,22 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2946
2960
|
resetFileVersions: boolean;
|
|
2947
2961
|
}, {
|
|
2948
2962
|
type: "tool-call";
|
|
2963
|
+
userInputId: string;
|
|
2949
2964
|
data: {
|
|
2950
2965
|
name: string;
|
|
2951
2966
|
id: string;
|
|
2952
2967
|
input: Record<string, any>;
|
|
2953
2968
|
};
|
|
2954
|
-
userInputId: string;
|
|
2955
2969
|
changesAlreadyApplied: {
|
|
2970
|
+
type: "patch" | "file";
|
|
2956
2971
|
path: string;
|
|
2957
2972
|
content: string;
|
|
2958
|
-
type: "file" | "patch";
|
|
2959
2973
|
}[];
|
|
2960
2974
|
response: string;
|
|
2961
2975
|
changes: {
|
|
2976
|
+
type: "patch" | "file";
|
|
2962
2977
|
path: string;
|
|
2963
2978
|
content: string;
|
|
2964
|
-
type: "file" | "patch";
|
|
2965
2979
|
}[];
|
|
2966
2980
|
addedFileVersions: {
|
|
2967
2981
|
path: string;
|
|
@@ -2974,12 +2988,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2974
2988
|
result: z.ZodString;
|
|
2975
2989
|
}, "strip", z.ZodTypeAny, {
|
|
2976
2990
|
type: "terminal-command-result";
|
|
2977
|
-
result: string;
|
|
2978
2991
|
userInputId: string;
|
|
2992
|
+
result: string;
|
|
2979
2993
|
}, {
|
|
2980
2994
|
type: "terminal-command-result";
|
|
2981
|
-
result: string;
|
|
2982
2995
|
userInputId: string;
|
|
2996
|
+
result: string;
|
|
2983
2997
|
}>, z.ZodObject<{
|
|
2984
2998
|
type: z.ZodLiteral<"npm-version-status">;
|
|
2985
2999
|
isUpToDate: z.ZodBoolean;
|
|
@@ -2996,6 +3010,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2996
3010
|
type: z.ZodLiteral<"init-response">;
|
|
2997
3011
|
}, Omit<{
|
|
2998
3012
|
type: z.ZodLiteral<"usage-response">;
|
|
3013
|
+
promptId: z.ZodOptional<z.ZodString>;
|
|
2999
3014
|
usage: z.ZodNumber;
|
|
3000
3015
|
limit: z.ZodNumber;
|
|
3001
3016
|
referralLink: z.ZodOptional<z.ZodString>;
|
|
@@ -3009,6 +3024,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
3009
3024
|
subscription_active: boolean;
|
|
3010
3025
|
next_quota_reset: Date;
|
|
3011
3026
|
session_credits_used: number;
|
|
3027
|
+
promptId?: string | undefined;
|
|
3012
3028
|
referralLink?: string | undefined;
|
|
3013
3029
|
}, {
|
|
3014
3030
|
type: "init-response";
|
|
@@ -3017,9 +3033,11 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
3017
3033
|
subscription_active: boolean;
|
|
3018
3034
|
next_quota_reset: Date;
|
|
3019
3035
|
session_credits_used: number;
|
|
3036
|
+
promptId?: string | undefined;
|
|
3020
3037
|
referralLink?: string | undefined;
|
|
3021
3038
|
}>, z.ZodObject<{
|
|
3022
3039
|
type: z.ZodLiteral<"usage-response">;
|
|
3040
|
+
promptId: z.ZodOptional<z.ZodString>;
|
|
3023
3041
|
usage: z.ZodNumber;
|
|
3024
3042
|
limit: z.ZodNumber;
|
|
3025
3043
|
referralLink: z.ZodOptional<z.ZodString>;
|
|
@@ -3033,6 +3051,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
3033
3051
|
subscription_active: boolean;
|
|
3034
3052
|
next_quota_reset: Date;
|
|
3035
3053
|
session_credits_used: number;
|
|
3054
|
+
promptId?: string | undefined;
|
|
3036
3055
|
referralLink?: string | undefined;
|
|
3037
3056
|
}, {
|
|
3038
3057
|
type: "usage-response";
|
|
@@ -3041,16 +3060,17 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
3041
3060
|
subscription_active: boolean;
|
|
3042
3061
|
next_quota_reset: Date;
|
|
3043
3062
|
session_credits_used: number;
|
|
3063
|
+
promptId?: string | undefined;
|
|
3044
3064
|
referralLink?: string | undefined;
|
|
3045
3065
|
}>, z.ZodObject<{
|
|
3046
3066
|
type: z.ZodLiteral<"action-error">;
|
|
3047
3067
|
message: z.ZodString;
|
|
3048
3068
|
}, "strip", z.ZodTypeAny, {
|
|
3049
|
-
message: string;
|
|
3050
3069
|
type: "action-error";
|
|
3051
|
-
}, {
|
|
3052
3070
|
message: string;
|
|
3071
|
+
}, {
|
|
3053
3072
|
type: "action-error";
|
|
3073
|
+
message: string;
|
|
3054
3074
|
}>, z.ZodObject<{
|
|
3055
3075
|
type: z.ZodLiteral<"commit-message-response">;
|
|
3056
3076
|
commitMessage: z.ZodString;
|