codebuff 1.0.273 → 1.0.275
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/cli-handlers/api-key.d.ts +1 -1
- package/dist/cli-handlers/api-key.js +1 -1
- package/dist/cli-handlers/api-key.js.map +1 -1
- package/dist/cli-handlers/initialization-flow.d.ts +1 -0
- package/dist/cli-handlers/initialization-flow.js +24 -0
- package/dist/cli-handlers/initialization-flow.js.map +1 -0
- package/dist/cli-modules/command-processor.d.ts +12 -0
- package/dist/cli-modules/command-processor.js +129 -0
- package/dist/cli-modules/command-processor.js.map +1 -0
- package/dist/cli-modules/input-handler.d.ts +20 -0
- package/dist/cli-modules/input-handler.js +98 -0
- package/dist/cli-modules/input-handler.js.map +1 -0
- package/dist/cli-modules/readline-handler.d.ts +17 -0
- package/dist/cli-modules/readline-handler.js +134 -0
- package/dist/cli-modules/readline-handler.js.map +1 -0
- package/dist/cli-modules/signal-handler.d.ts +13 -0
- package/dist/cli-modules/signal-handler.js +69 -0
- package/dist/cli-modules/signal-handler.js.map +1 -0
- package/dist/cli-modules/types.d.ts +51 -0
- package/dist/cli-modules/types.js +3 -0
- package/dist/cli-modules/types.js.map +1 -0
- package/dist/cli-modules/websocket-handler.d.ts +16 -0
- package/dist/cli-modules/websocket-handler.js +53 -0
- package/dist/cli-modules/websocket-handler.js.map +1 -0
- package/dist/cli.d.ts +6 -1
- package/dist/cli.js +60 -7
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +1 -0
- package/dist/client.js +3 -0
- package/dist/client.js.map +1 -1
- package/dist/code-map/__mocks__/tree-sitter-typescript.d.ts +12 -0
- package/dist/code-map/__mocks__/tree-sitter-typescript.d.ts.map +1 -0
- package/dist/code-map/__mocks__/tree-sitter-typescript.js +14 -0
- package/dist/code-map/__mocks__/tree-sitter-typescript.js.map +1 -0
- package/dist/code-map/__mocks__/wasm-mock.d.ts +2 -0
- package/dist/code-map/__mocks__/wasm-mock.d.ts.map +1 -0
- package/dist/code-map/__mocks__/wasm-mock.js +3 -0
- package/dist/code-map/__mocks__/wasm-mock.js.map +1 -0
- package/dist/code-map/__tests__/parse.test.d.ts +2 -0
- package/dist/code-map/__tests__/parse.test.d.ts.map +1 -0
- package/dist/code-map/__tests__/parse.test.js +231 -0
- package/dist/code-map/__tests__/parse.test.js.map +1 -0
- package/dist/code-map/__tests__/test-langs/consumer.d.ts +2 -0
- package/dist/code-map/__tests__/test-langs/consumer.d.ts.map +1 -0
- package/dist/code-map/__tests__/test-langs/consumer.js +6 -0
- package/dist/code-map/__tests__/test-langs/consumer.js.map +1 -0
- package/dist/code-map/__tests__/test-langs/empty.d.ts +1 -0
- package/dist/code-map/__tests__/test-langs/empty.d.ts.map +1 -0
- package/dist/code-map/__tests__/test-langs/empty.js +2 -0
- package/dist/code-map/__tests__/test-langs/empty.js.map +1 -0
- package/dist/code-map/__tests__/test-langs/test.d.ts +12 -0
- package/dist/code-map/__tests__/test-langs/test.d.ts.map +1 -0
- package/dist/code-map/__tests__/test-langs/test.js +23 -0
- package/dist/code-map/__tests__/test-langs/test.js.map +1 -0
- package/dist/code-map/__tests__/test-langs/unused.d.ts +2 -0
- package/dist/code-map/__tests__/test-langs/unused.d.ts.map +1 -0
- package/dist/code-map/__tests__/test-langs/unused.js +7 -0
- package/dist/code-map/__tests__/test-langs/unused.js.map +1 -0
- package/dist/code-map/__tests__/test-langs/utils1.d.ts +2 -0
- package/dist/code-map/__tests__/test-langs/utils1.d.ts.map +1 -0
- package/dist/code-map/__tests__/test-langs/utils1.js +7 -0
- package/dist/code-map/__tests__/test-langs/utils1.js.map +1 -0
- package/dist/code-map/__tests__/test-langs/utils2.d.ts +2 -0
- package/dist/code-map/__tests__/test-langs/utils2.d.ts.map +1 -0
- package/dist/code-map/__tests__/test-langs/utils2.js +8 -0
- package/dist/code-map/__tests__/test-langs/utils2.js.map +1 -0
- package/dist/code-map/__tests__/tree-sitter-minimal.test.d.ts +2 -0
- package/dist/code-map/__tests__/tree-sitter-minimal.test.d.ts.map +1 -0
- package/dist/code-map/__tests__/tree-sitter-minimal.test.js +79 -0
- package/dist/code-map/__tests__/tree-sitter-minimal.test.js.map +1 -0
- package/dist/code-map/jest.config.d.ts +4 -0
- package/dist/code-map/jest.config.d.ts.map +1 -0
- package/dist/code-map/jest.config.js +18 -0
- package/dist/code-map/jest.config.js.map +1 -0
- package/dist/code-map/languages.d.ts +1 -2
- package/dist/code-map/languages.d.ts.map +1 -1
- package/dist/code-map/languages.js +2 -1
- package/dist/code-map/languages.js.map +1 -1
- package/dist/code-map/parse.d.ts +14 -4
- package/dist/code-map/parse.d.ts.map +1 -1
- package/dist/code-map/parse.js +91 -38
- package/dist/code-map/parse.js.map +1 -1
- package/dist/code-map/parse.test.d.ts +2 -0
- package/dist/code-map/parse.test.d.ts.map +1 -0
- package/dist/code-map/parse.test.js +218 -0
- package/dist/code-map/parse.test.js.map +1 -0
- package/dist/code-map/scripts/tree-sitter-test.cjs +27 -0
- package/dist/code-map/scripts/tree-sitter-test.cjs.map +1 -0
- package/dist/code-map/scripts/tree-sitter-test.d.cts +2 -0
- package/dist/code-map/scripts/tree-sitter-test.d.cts.map +1 -0
- package/dist/code-map/scripts/tree-sitter-test.d.ts +2 -0
- package/dist/code-map/scripts/tree-sitter-test.d.ts.map +1 -0
- package/dist/code-map/scripts/tree-sitter-test.js +54 -0
- package/dist/code-map/scripts/tree-sitter-test.js.map +1 -0
- package/dist/code-map/test-parser.d.ts +2 -0
- package/dist/code-map/test-parser.d.ts.map +1 -0
- package/dist/code-map/test-parser.js +42 -0
- package/dist/code-map/test-parser.js.map +1 -0
- package/dist/code-map/tree-sitter-queries/tree-sitter-c-tags.scm +6 -1
- package/dist/code-map/tree-sitter-queries/tree-sitter-c_sharp-tags.scm +11 -1
- package/dist/code-map/tree-sitter-queries/tree-sitter-cpp-tags.scm +13 -1
- package/dist/code-map/tree-sitter-queries/tree-sitter-javascript-tags.scm +1 -0
- package/dist/code-map/tree-sitter-queries/tree-sitter-php-tags.scm +5 -8
- package/dist/code-map/tree-sitter-queries/tree-sitter-python-tags.scm +5 -2
- package/dist/code-map/tree-sitter-queries/tree-sitter-typescript-tags.scm +7 -0
- package/dist/code-map/tsconfig.tsbuildinfo +1 -1
- package/dist/common/actions.d.ts +58 -32
- package/dist/common/bigquery/client.d.ts +15 -0
- package/dist/common/bigquery/client.js +265 -0
- package/dist/common/bigquery/client.js.map +1 -0
- package/dist/common/bigquery/schema.d.ts +55 -0
- package/dist/common/bigquery/schema.js +24 -0
- package/dist/common/bigquery/schema.js.map +1 -0
- package/dist/common/constants/tools.d.ts +1 -0
- package/dist/common/constants/tools.js +1 -0
- package/dist/common/constants/tools.js.map +1 -1
- package/dist/common/constants.d.ts +1 -1
- package/dist/common/constants.js +18 -7
- package/dist/common/constants.js.map +1 -1
- package/dist/common/project-file-tree.js +12 -0
- package/dist/common/project-file-tree.js.map +1 -1
- package/dist/common/types/agent-state.d.ts +13 -8
- package/dist/common/types/message.d.ts +6 -6
- package/dist/common/util/__tests__/saxy.test.js +140 -21
- package/dist/common/util/__tests__/saxy.test.js.map +1 -1
- package/dist/common/util/credentials.d.ts +2 -2
- package/dist/common/util/file-metadata.d.ts +9 -0
- package/dist/common/util/file-metadata.js +24 -0
- package/dist/common/util/file-metadata.js.map +1 -0
- package/dist/common/util/file.d.ts +3 -0
- package/dist/common/util/file.js +3 -0
- package/dist/common/util/file.js.map +1 -1
- package/dist/common/util/promise.js +1 -1
- package/dist/common/util/promise.js.map +1 -1
- package/dist/common/util/saxy.d.ts +2 -1
- package/dist/common/util/saxy.js +51 -18
- package/dist/common/util/saxy.js.map +1 -1
- package/dist/common/websockets/websocket-schema.d.ts +118 -68
- package/dist/display.d.ts +2 -0
- package/dist/display.js +8 -0
- package/dist/display.js.map +1 -1
- package/dist/index.js +4 -80
- package/dist/index.js.map +1 -1
- package/dist/menu.js +35 -110
- package/dist/menu.js.map +1 -1
- package/dist/project-files.d.ts +2 -0
- package/dist/project-files.js +3 -2
- package/dist/project-files.js.map +1 -1
- package/dist/tool-handlers.js +3 -0
- package/dist/tool-handlers.js.map +1 -1
- package/dist/utils/__tests__/tool-renderers.test.js +27 -1
- package/dist/utils/__tests__/tool-renderers.test.js.map +1 -1
- package/dist/utils/__tests__/xml-stream-parser.test.js +26 -0
- package/dist/utils/__tests__/xml-stream-parser.test.js.map +1 -1
- package/dist/utils/detect-shell.js +1 -1
- package/dist/utils/detect-shell.js.map +1 -1
- package/dist/utils/logger.d.ts +1 -1
- package/dist/utils/logger.js +3 -6
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/spinner.d.ts +1 -0
- package/dist/utils/spinner.js +8 -1
- package/dist/utils/spinner.js.map +1 -1
- package/dist/utils/system-info.js +2 -2
- package/dist/utils/system-info.js.map +1 -1
- package/dist/utils/terminal.d.ts +2 -2
- package/dist/utils/terminal.js +46 -34
- package/dist/utils/terminal.js.map +1 -1
- package/dist/utils/tool-renderers.js +25 -5
- package/dist/utils/tool-renderers.js.map +1 -1
- package/dist/utils/xml-stream-parser.js.map +1 -1
- package/dist/workers/project-context.js +4 -1
- package/dist/workers/project-context.js.map +1 -1
- package/package.json +3 -1
package/dist/common/actions.d.ts
CHANGED
|
@@ -4,12 +4,12 @@ export declare const FileChangeSchema: z.ZodObject<{
|
|
|
4
4
|
path: z.ZodString;
|
|
5
5
|
content: z.ZodString;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
-
path: string;
|
|
8
7
|
type: "file" | "patch";
|
|
8
|
+
path: string;
|
|
9
9
|
content: string;
|
|
10
10
|
}, {
|
|
11
|
-
path: string;
|
|
12
11
|
type: "file" | "patch";
|
|
12
|
+
path: string;
|
|
13
13
|
content: string;
|
|
14
14
|
}>;
|
|
15
15
|
export type FileChange = z.infer<typeof FileChangeSchema>;
|
|
@@ -18,12 +18,12 @@ export declare const CHANGES: z.ZodArray<z.ZodObject<{
|
|
|
18
18
|
path: z.ZodString;
|
|
19
19
|
content: z.ZodString;
|
|
20
20
|
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
path: string;
|
|
22
21
|
type: "file" | "patch";
|
|
22
|
+
path: string;
|
|
23
23
|
content: string;
|
|
24
24
|
}, {
|
|
25
|
-
path: string;
|
|
26
25
|
type: "file" | "patch";
|
|
26
|
+
path: string;
|
|
27
27
|
content: string;
|
|
28
28
|
}>, "many">;
|
|
29
29
|
export type FileChanges = z.infer<typeof CHANGES>;
|
|
@@ -54,6 +54,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
54
54
|
currentWorkingDirectory: z.ZodString;
|
|
55
55
|
fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
|
|
56
56
|
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
57
|
+
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
57
58
|
knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
58
59
|
userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
59
60
|
gitChanges: z.ZodObject<{
|
|
@@ -127,6 +128,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
127
128
|
homedir: string;
|
|
128
129
|
cpus: number;
|
|
129
130
|
};
|
|
131
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
130
132
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
131
133
|
fileVersions?: {
|
|
132
134
|
path: string;
|
|
@@ -153,6 +155,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
153
155
|
homedir: string;
|
|
154
156
|
cpus: number;
|
|
155
157
|
};
|
|
158
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
156
159
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
157
160
|
fileVersions?: {
|
|
158
161
|
path: string;
|
|
@@ -372,6 +375,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
372
375
|
homedir: string;
|
|
373
376
|
cpus: number;
|
|
374
377
|
};
|
|
378
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
375
379
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
376
380
|
fileVersions?: {
|
|
377
381
|
path: string;
|
|
@@ -437,6 +441,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
437
441
|
homedir: string;
|
|
438
442
|
cpus: number;
|
|
439
443
|
};
|
|
444
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
440
445
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
441
446
|
fileVersions?: {
|
|
442
447
|
path: string;
|
|
@@ -523,6 +528,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
523
528
|
homedir: string;
|
|
524
529
|
cpus: number;
|
|
525
530
|
};
|
|
531
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
526
532
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
527
533
|
fileVersions?: {
|
|
528
534
|
path: string;
|
|
@@ -602,6 +608,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
602
608
|
homedir: string;
|
|
603
609
|
cpus: number;
|
|
604
610
|
};
|
|
611
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
605
612
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
606
613
|
fileVersions?: {
|
|
607
614
|
path: string;
|
|
@@ -675,6 +682,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
675
682
|
currentWorkingDirectory: z.ZodString;
|
|
676
683
|
fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
|
|
677
684
|
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
685
|
+
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
678
686
|
knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
679
687
|
userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
680
688
|
gitChanges: z.ZodObject<{
|
|
@@ -748,6 +756,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
748
756
|
homedir: string;
|
|
749
757
|
cpus: number;
|
|
750
758
|
};
|
|
759
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
751
760
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
752
761
|
fileVersions?: {
|
|
753
762
|
path: string;
|
|
@@ -774,6 +783,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
774
783
|
homedir: string;
|
|
775
784
|
cpus: number;
|
|
776
785
|
};
|
|
786
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
777
787
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
778
788
|
fileVersions?: {
|
|
779
789
|
path: string;
|
|
@@ -782,6 +792,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
782
792
|
}>;
|
|
783
793
|
}, "strip", z.ZodTypeAny, {
|
|
784
794
|
type: "init";
|
|
795
|
+
fingerprintId: string;
|
|
785
796
|
fileContext: {
|
|
786
797
|
currentWorkingDirectory: string;
|
|
787
798
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -803,16 +814,17 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
803
814
|
homedir: string;
|
|
804
815
|
cpus: number;
|
|
805
816
|
};
|
|
817
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
806
818
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
807
819
|
fileVersions?: {
|
|
808
820
|
path: string;
|
|
809
821
|
content: string;
|
|
810
822
|
}[][] | undefined;
|
|
811
823
|
};
|
|
812
|
-
fingerprintId: string;
|
|
813
824
|
authToken?: string | undefined;
|
|
814
825
|
}, {
|
|
815
826
|
type: "init";
|
|
827
|
+
fingerprintId: string;
|
|
816
828
|
fileContext: {
|
|
817
829
|
currentWorkingDirectory: string;
|
|
818
830
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -834,13 +846,13 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
834
846
|
homedir: string;
|
|
835
847
|
cpus: number;
|
|
836
848
|
};
|
|
849
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
837
850
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
838
851
|
fileVersions?: {
|
|
839
852
|
path: string;
|
|
840
853
|
content: string;
|
|
841
854
|
}[][] | undefined;
|
|
842
855
|
};
|
|
843
|
-
fingerprintId: string;
|
|
844
856
|
authToken?: string | undefined;
|
|
845
857
|
}>, z.ZodObject<{
|
|
846
858
|
type: z.ZodLiteral<"generate-commit-message">;
|
|
@@ -916,12 +928,12 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
916
928
|
path: z.ZodString;
|
|
917
929
|
content: z.ZodString;
|
|
918
930
|
}, "strip", z.ZodTypeAny, {
|
|
919
|
-
path: string;
|
|
920
931
|
type: "file" | "patch";
|
|
932
|
+
path: string;
|
|
921
933
|
content: string;
|
|
922
934
|
}, {
|
|
923
|
-
path: string;
|
|
924
935
|
type: "file" | "patch";
|
|
936
|
+
path: string;
|
|
925
937
|
content: string;
|
|
926
938
|
}>, "many">;
|
|
927
939
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
@@ -929,12 +941,12 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
929
941
|
path: z.ZodString;
|
|
930
942
|
content: z.ZodString;
|
|
931
943
|
}, "strip", z.ZodTypeAny, {
|
|
932
|
-
path: string;
|
|
933
944
|
type: "file" | "patch";
|
|
945
|
+
path: string;
|
|
934
946
|
content: string;
|
|
935
947
|
}, {
|
|
936
|
-
path: string;
|
|
937
948
|
type: "file" | "patch";
|
|
949
|
+
path: string;
|
|
938
950
|
content: string;
|
|
939
951
|
}>, "many">;
|
|
940
952
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
@@ -959,13 +971,13 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
959
971
|
userInputId: string;
|
|
960
972
|
response: string;
|
|
961
973
|
changes: {
|
|
962
|
-
path: string;
|
|
963
974
|
type: "file" | "patch";
|
|
975
|
+
path: string;
|
|
964
976
|
content: string;
|
|
965
977
|
}[];
|
|
966
978
|
changesAlreadyApplied: {
|
|
967
|
-
path: string;
|
|
968
979
|
type: "file" | "patch";
|
|
980
|
+
path: string;
|
|
969
981
|
content: string;
|
|
970
982
|
}[];
|
|
971
983
|
addedFileVersions: {
|
|
@@ -983,13 +995,13 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
983
995
|
userInputId: string;
|
|
984
996
|
response: string;
|
|
985
997
|
changes: {
|
|
986
|
-
path: string;
|
|
987
998
|
type: "file" | "patch";
|
|
999
|
+
path: string;
|
|
988
1000
|
content: string;
|
|
989
1001
|
}[];
|
|
990
1002
|
changesAlreadyApplied: {
|
|
991
|
-
path: string;
|
|
992
1003
|
type: "file" | "patch";
|
|
1004
|
+
path: string;
|
|
993
1005
|
content: string;
|
|
994
1006
|
}[];
|
|
995
1007
|
addedFileVersions: {
|
|
@@ -1026,6 +1038,7 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1026
1038
|
currentWorkingDirectory: z.ZodString;
|
|
1027
1039
|
fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
|
|
1028
1040
|
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1041
|
+
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
1029
1042
|
knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1030
1043
|
userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1031
1044
|
gitChanges: z.ZodObject<{
|
|
@@ -1099,6 +1112,7 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1099
1112
|
homedir: string;
|
|
1100
1113
|
cpus: number;
|
|
1101
1114
|
};
|
|
1115
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
1102
1116
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1103
1117
|
fileVersions?: {
|
|
1104
1118
|
path: string;
|
|
@@ -1125,6 +1139,7 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1125
1139
|
homedir: string;
|
|
1126
1140
|
cpus: number;
|
|
1127
1141
|
};
|
|
1142
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
1128
1143
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1129
1144
|
fileVersions?: {
|
|
1130
1145
|
path: string;
|
|
@@ -1344,6 +1359,7 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1344
1359
|
homedir: string;
|
|
1345
1360
|
cpus: number;
|
|
1346
1361
|
};
|
|
1362
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
1347
1363
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1348
1364
|
fileVersions?: {
|
|
1349
1365
|
path: string;
|
|
@@ -1409,6 +1425,7 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1409
1425
|
homedir: string;
|
|
1410
1426
|
cpus: number;
|
|
1411
1427
|
};
|
|
1428
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
1412
1429
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1413
1430
|
fileVersions?: {
|
|
1414
1431
|
path: string;
|
|
@@ -1504,6 +1521,7 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1504
1521
|
homedir: string;
|
|
1505
1522
|
cpus: number;
|
|
1506
1523
|
};
|
|
1524
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
1507
1525
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1508
1526
|
fileVersions?: {
|
|
1509
1527
|
path: string;
|
|
@@ -1583,6 +1601,7 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1583
1601
|
homedir: string;
|
|
1584
1602
|
cpus: number;
|
|
1585
1603
|
};
|
|
1604
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
1586
1605
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1587
1606
|
fileVersions?: {
|
|
1588
1607
|
path: string;
|
|
@@ -1659,12 +1678,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1659
1678
|
path: z.ZodString;
|
|
1660
1679
|
content: z.ZodString;
|
|
1661
1680
|
}, "strip", z.ZodTypeAny, {
|
|
1662
|
-
path: string;
|
|
1663
1681
|
type: "file" | "patch";
|
|
1682
|
+
path: string;
|
|
1664
1683
|
content: string;
|
|
1665
1684
|
}, {
|
|
1666
|
-
path: string;
|
|
1667
1685
|
type: "file" | "patch";
|
|
1686
|
+
path: string;
|
|
1668
1687
|
content: string;
|
|
1669
1688
|
}>, "many">;
|
|
1670
1689
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
@@ -1672,12 +1691,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1672
1691
|
path: z.ZodString;
|
|
1673
1692
|
content: z.ZodString;
|
|
1674
1693
|
}, "strip", z.ZodTypeAny, {
|
|
1675
|
-
path: string;
|
|
1676
1694
|
type: "file" | "patch";
|
|
1695
|
+
path: string;
|
|
1677
1696
|
content: string;
|
|
1678
1697
|
}, {
|
|
1679
|
-
path: string;
|
|
1680
1698
|
type: "file" | "patch";
|
|
1699
|
+
path: string;
|
|
1681
1700
|
content: string;
|
|
1682
1701
|
}>, "many">;
|
|
1683
1702
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
@@ -1702,13 +1721,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1702
1721
|
userInputId: string;
|
|
1703
1722
|
response: string;
|
|
1704
1723
|
changes: {
|
|
1705
|
-
path: string;
|
|
1706
1724
|
type: "file" | "patch";
|
|
1725
|
+
path: string;
|
|
1707
1726
|
content: string;
|
|
1708
1727
|
}[];
|
|
1709
1728
|
changesAlreadyApplied: {
|
|
1710
|
-
path: string;
|
|
1711
1729
|
type: "file" | "patch";
|
|
1730
|
+
path: string;
|
|
1712
1731
|
content: string;
|
|
1713
1732
|
}[];
|
|
1714
1733
|
addedFileVersions: {
|
|
@@ -1726,13 +1745,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1726
1745
|
userInputId: string;
|
|
1727
1746
|
response: string;
|
|
1728
1747
|
changes: {
|
|
1729
|
-
path: string;
|
|
1730
1748
|
type: "file" | "patch";
|
|
1749
|
+
path: string;
|
|
1731
1750
|
content: string;
|
|
1732
1751
|
}[];
|
|
1733
1752
|
changesAlreadyApplied: {
|
|
1734
|
-
path: string;
|
|
1735
1753
|
type: "file" | "patch";
|
|
1754
|
+
path: string;
|
|
1736
1755
|
content: string;
|
|
1737
1756
|
}[];
|
|
1738
1757
|
addedFileVersions: {
|
|
@@ -1754,6 +1773,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1754
1773
|
currentWorkingDirectory: z.ZodString;
|
|
1755
1774
|
fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
|
|
1756
1775
|
fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1776
|
+
tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
|
|
1757
1777
|
knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1758
1778
|
userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1759
1779
|
gitChanges: z.ZodObject<{
|
|
@@ -1827,6 +1847,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1827
1847
|
homedir: string;
|
|
1828
1848
|
cpus: number;
|
|
1829
1849
|
};
|
|
1850
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
1830
1851
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1831
1852
|
fileVersions?: {
|
|
1832
1853
|
path: string;
|
|
@@ -1853,6 +1874,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1853
1874
|
homedir: string;
|
|
1854
1875
|
cpus: number;
|
|
1855
1876
|
};
|
|
1877
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
1856
1878
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
1857
1879
|
fileVersions?: {
|
|
1858
1880
|
path: string;
|
|
@@ -2072,6 +2094,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2072
2094
|
homedir: string;
|
|
2073
2095
|
cpus: number;
|
|
2074
2096
|
};
|
|
2097
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
2075
2098
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
2076
2099
|
fileVersions?: {
|
|
2077
2100
|
path: string;
|
|
@@ -2137,6 +2160,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2137
2160
|
homedir: string;
|
|
2138
2161
|
cpus: number;
|
|
2139
2162
|
};
|
|
2163
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
2140
2164
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
2141
2165
|
fileVersions?: {
|
|
2142
2166
|
path: string;
|
|
@@ -2232,6 +2256,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2232
2256
|
homedir: string;
|
|
2233
2257
|
cpus: number;
|
|
2234
2258
|
};
|
|
2259
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
2235
2260
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
2236
2261
|
fileVersions?: {
|
|
2237
2262
|
path: string;
|
|
@@ -2311,6 +2336,7 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2311
2336
|
homedir: string;
|
|
2312
2337
|
cpus: number;
|
|
2313
2338
|
};
|
|
2339
|
+
tokenCallers?: Record<string, Record<string, string[]>> | undefined;
|
|
2314
2340
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
2315
2341
|
fileVersions?: {
|
|
2316
2342
|
path: string;
|
|
@@ -2398,12 +2424,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2398
2424
|
path: z.ZodString;
|
|
2399
2425
|
content: z.ZodString;
|
|
2400
2426
|
}, "strip", z.ZodTypeAny, {
|
|
2401
|
-
path: string;
|
|
2402
2427
|
type: "file" | "patch";
|
|
2428
|
+
path: string;
|
|
2403
2429
|
content: string;
|
|
2404
2430
|
}, {
|
|
2405
|
-
path: string;
|
|
2406
2431
|
type: "file" | "patch";
|
|
2432
|
+
path: string;
|
|
2407
2433
|
content: string;
|
|
2408
2434
|
}>, "many">;
|
|
2409
2435
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
@@ -2411,12 +2437,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2411
2437
|
path: z.ZodString;
|
|
2412
2438
|
content: z.ZodString;
|
|
2413
2439
|
}, "strip", z.ZodTypeAny, {
|
|
2414
|
-
path: string;
|
|
2415
2440
|
type: "file" | "patch";
|
|
2441
|
+
path: string;
|
|
2416
2442
|
content: string;
|
|
2417
2443
|
}, {
|
|
2418
|
-
path: string;
|
|
2419
2444
|
type: "file" | "patch";
|
|
2445
|
+
path: string;
|
|
2420
2446
|
content: string;
|
|
2421
2447
|
}>, "many">;
|
|
2422
2448
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
@@ -2440,13 +2466,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2440
2466
|
userInputId: string;
|
|
2441
2467
|
response: string;
|
|
2442
2468
|
changes: {
|
|
2443
|
-
path: string;
|
|
2444
2469
|
type: "file" | "patch";
|
|
2470
|
+
path: string;
|
|
2445
2471
|
content: string;
|
|
2446
2472
|
}[];
|
|
2447
2473
|
changesAlreadyApplied: {
|
|
2448
|
-
path: string;
|
|
2449
2474
|
type: "file" | "patch";
|
|
2475
|
+
path: string;
|
|
2450
2476
|
content: string;
|
|
2451
2477
|
}[];
|
|
2452
2478
|
addedFileVersions: {
|
|
@@ -2464,13 +2490,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2464
2490
|
userInputId: string;
|
|
2465
2491
|
response: string;
|
|
2466
2492
|
changes: {
|
|
2467
|
-
path: string;
|
|
2468
2493
|
type: "file" | "patch";
|
|
2494
|
+
path: string;
|
|
2469
2495
|
content: string;
|
|
2470
2496
|
}[];
|
|
2471
2497
|
changesAlreadyApplied: {
|
|
2472
|
-
path: string;
|
|
2473
2498
|
type: "file" | "patch";
|
|
2499
|
+
path: string;
|
|
2474
2500
|
content: string;
|
|
2475
2501
|
}[];
|
|
2476
2502
|
addedFileVersions: {
|
|
@@ -2564,13 +2590,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2564
2590
|
error: z.ZodOptional<z.ZodString>;
|
|
2565
2591
|
remainingBalance: z.ZodOptional<z.ZodNumber>;
|
|
2566
2592
|
}, "strip", z.ZodTypeAny, {
|
|
2567
|
-
message: string;
|
|
2568
2593
|
type: "action-error";
|
|
2594
|
+
message: string;
|
|
2569
2595
|
remainingBalance?: number | undefined;
|
|
2570
2596
|
error?: string | undefined;
|
|
2571
2597
|
}, {
|
|
2572
|
-
message: string;
|
|
2573
2598
|
type: "action-error";
|
|
2599
|
+
message: string;
|
|
2574
2600
|
remainingBalance?: number | undefined;
|
|
2575
2601
|
error?: string | undefined;
|
|
2576
2602
|
}>, z.ZodObject<{
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GetRelevantFilesTrace, Relabel, Trace } from './schema';
|
|
2
|
+
export declare function setupBigQuery(dataset?: string): Promise<void>;
|
|
3
|
+
export declare function insertTrace(trace: Trace, dataset?: string): Promise<boolean>;
|
|
4
|
+
export declare function insertRelabel(relabel: Relabel, dataset?: string): Promise<boolean>;
|
|
5
|
+
export declare function getRecentTraces(limit?: number, dataset?: string): Promise<Trace[]>;
|
|
6
|
+
export declare function getRecentRelabels(limit?: number, dataset?: string): Promise<Relabel[]>;
|
|
7
|
+
export declare function getTracesWithoutRelabels(model: string, limit?: number, userId?: string | undefined, dataset?: string): Promise<GetRelevantFilesTrace[]>;
|
|
8
|
+
export declare function getTracesWithRelabels(model: string, limit?: number, dataset?: string): Promise<{
|
|
9
|
+
trace: GetRelevantFilesTrace;
|
|
10
|
+
relabel: Relabel;
|
|
11
|
+
}[]>;
|
|
12
|
+
export declare function getTracesAndRelabelsForUser(userId: string, limit?: number, dataset?: string): Promise<{
|
|
13
|
+
trace: GetRelevantFilesTrace;
|
|
14
|
+
relabels: Relabel[];
|
|
15
|
+
}[]>;
|