codebuff 1.0.281 → 1.0.282
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/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 +2 -0
- package/dist/cli-modules/command-processor.js +112 -0
- package/dist/cli-modules/command-processor.js.map +1 -0
- package/dist/cli-modules/input-handler.d.ts +4 -0
- package/dist/cli-modules/input-handler.js +75 -0
- package/dist/cli-modules/input-handler.js.map +1 -0
- package/dist/cli-modules/readline-handler.d.ts +11 -0
- package/dist/cli-modules/readline-handler.js +158 -0
- package/dist/cli-modules/readline-handler.js.map +1 -0
- package/dist/cli-modules/signal-handler.d.ts +7 -0
- package/dist/cli-modules/signal-handler.js +128 -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.js +8 -6
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +2 -2
- package/dist/client.js +5 -6
- 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/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/tsconfig.tsbuildinfo +1 -1
- package/dist/common/actions.d.ts +66 -66
- 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 +0 -2
- package/dist/common/constants/tools.js +0 -3
- package/dist/common/constants/tools.js.map +1 -1
- package/dist/common/types/agent-state.d.ts +12 -12
- 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/saxy.js +3 -1
- package/dist/common/util/saxy.js.map +1 -1
- package/dist/common/websockets/websocket-schema.d.ts +124 -124
- package/dist/index.js +2 -56
- package/dist/tool-handlers.js +0 -6
- package/dist/tool-handlers.js.map +1 -1
- package/dist/utils/tool-renderers.js +0 -6
- package/dist/utils/tool-renderers.js.map +1 -1
- package/package.json +1 -1
- package/dist/common/__tests__/project-file-tree.test.d.ts +0 -1
- package/dist/common/__tests__/project-file-tree.test.js +0 -251
- package/dist/common/__tests__/project-file-tree.test.js.map +0 -1
- package/dist/common/json-config/__tests__/__snapshots__/stringify-schema.test.js.snap +0 -119
- package/dist/common/util/process-stream.d.ts +0 -7
- package/dist/common/util/process-stream.js +0 -162
- package/dist/common/util/process-stream.js.map +0 -1
- package/dist/utils/__tests__/__snapshots__/background-process-manager.test.js.snap +0 -137
- package/dist/utils/__tests__/file-paths.test.d.ts +0 -1
- package/dist/utils/__tests__/file-paths.test.js +0 -37
- package/dist/utils/__tests__/file-paths.test.js.map +0 -1
- package/dist/utils/__tests__/path.test.d.ts +0 -1
- package/dist/utils/__tests__/path.test.js +0 -37
- package/dist/utils/__tests__/path.test.js.map +0 -1
- package/dist/utils/file-paths.d.ts +0 -9
- package/dist/utils/file-paths.js +0 -24
- package/dist/utils/file-paths.js.map +0 -1
- package/dist/utils/path.d.ts +0 -9
- package/dist/utils/path.js +0 -27
- package/dist/utils/path.js.map +0 -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
|
-
type: "patch" | "file";
|
|
8
7
|
path: string;
|
|
8
|
+
type: "patch" | "file";
|
|
9
9
|
content: string;
|
|
10
10
|
}, {
|
|
11
|
-
type: "patch" | "file";
|
|
12
11
|
path: string;
|
|
12
|
+
type: "patch" | "file";
|
|
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
|
-
type: "patch" | "file";
|
|
22
21
|
path: string;
|
|
22
|
+
type: "patch" | "file";
|
|
23
23
|
content: string;
|
|
24
24
|
}, {
|
|
25
|
-
type: "patch" | "file";
|
|
26
25
|
path: string;
|
|
26
|
+
type: "patch" | "file";
|
|
27
27
|
content: string;
|
|
28
28
|
}>, "many">;
|
|
29
29
|
export type FileChanges = z.infer<typeof CHANGES>;
|
|
@@ -199,16 +199,16 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
199
199
|
type: "ephemeral";
|
|
200
200
|
}>>;
|
|
201
201
|
}, "strip", z.ZodTypeAny, {
|
|
202
|
-
type: "tool_use";
|
|
203
202
|
name: string;
|
|
203
|
+
type: "tool_use";
|
|
204
204
|
id: string;
|
|
205
205
|
input: Record<string, any>;
|
|
206
206
|
cache_control?: {
|
|
207
207
|
type: "ephemeral";
|
|
208
208
|
} | undefined;
|
|
209
209
|
}, {
|
|
210
|
-
type: "tool_use";
|
|
211
210
|
name: string;
|
|
211
|
+
type: "tool_use";
|
|
212
212
|
id: string;
|
|
213
213
|
input: Record<string, any>;
|
|
214
214
|
cache_control?: {
|
|
@@ -290,8 +290,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
290
290
|
type: "ephemeral";
|
|
291
291
|
} | undefined;
|
|
292
292
|
} | {
|
|
293
|
-
type: "tool_use";
|
|
294
293
|
name: string;
|
|
294
|
+
type: "tool_use";
|
|
295
295
|
id: string;
|
|
296
296
|
input: Record<string, any>;
|
|
297
297
|
cache_control?: {
|
|
@@ -324,8 +324,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
324
324
|
type: "ephemeral";
|
|
325
325
|
} | undefined;
|
|
326
326
|
} | {
|
|
327
|
-
type: "tool_use";
|
|
328
327
|
name: string;
|
|
328
|
+
type: "tool_use";
|
|
329
329
|
id: string;
|
|
330
330
|
input: Record<string, any>;
|
|
331
331
|
cache_control?: {
|
|
@@ -390,8 +390,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
390
390
|
type: "ephemeral";
|
|
391
391
|
} | undefined;
|
|
392
392
|
} | {
|
|
393
|
-
type: "tool_use";
|
|
394
393
|
name: string;
|
|
394
|
+
type: "tool_use";
|
|
395
395
|
id: string;
|
|
396
396
|
input: Record<string, any>;
|
|
397
397
|
cache_control?: {
|
|
@@ -456,8 +456,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
456
456
|
type: "ephemeral";
|
|
457
457
|
} | undefined;
|
|
458
458
|
} | {
|
|
459
|
-
type: "tool_use";
|
|
460
459
|
name: string;
|
|
460
|
+
type: "tool_use";
|
|
461
461
|
id: string;
|
|
462
462
|
input: Record<string, any>;
|
|
463
463
|
cache_control?: {
|
|
@@ -504,7 +504,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
504
504
|
type: "prompt";
|
|
505
505
|
promptId: string;
|
|
506
506
|
fingerprintId: string;
|
|
507
|
-
costMode: "
|
|
507
|
+
costMode: "max" | "lite" | "normal" | "experimental";
|
|
508
508
|
agentState: {
|
|
509
509
|
agentContext: string;
|
|
510
510
|
fileContext: {
|
|
@@ -543,8 +543,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
543
543
|
type: "ephemeral";
|
|
544
544
|
} | undefined;
|
|
545
545
|
} | {
|
|
546
|
-
type: "tool_use";
|
|
547
546
|
name: string;
|
|
547
|
+
type: "tool_use";
|
|
548
548
|
id: string;
|
|
549
549
|
input: Record<string, any>;
|
|
550
550
|
cache_control?: {
|
|
@@ -623,8 +623,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
623
623
|
type: "ephemeral";
|
|
624
624
|
} | undefined;
|
|
625
625
|
} | {
|
|
626
|
-
type: "tool_use";
|
|
627
626
|
name: string;
|
|
627
|
+
type: "tool_use";
|
|
628
628
|
id: string;
|
|
629
629
|
input: Record<string, any>;
|
|
630
630
|
cache_control?: {
|
|
@@ -659,7 +659,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
659
659
|
}[];
|
|
660
660
|
prompt?: string | undefined;
|
|
661
661
|
authToken?: string | undefined;
|
|
662
|
-
costMode?: "
|
|
662
|
+
costMode?: "max" | "lite" | "normal" | "experimental" | undefined;
|
|
663
663
|
model?: string | undefined;
|
|
664
664
|
cwd?: string | undefined;
|
|
665
665
|
}>, z.ZodObject<{
|
|
@@ -792,7 +792,6 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
792
792
|
}>;
|
|
793
793
|
}, "strip", z.ZodTypeAny, {
|
|
794
794
|
type: "init";
|
|
795
|
-
fingerprintId: string;
|
|
796
795
|
fileContext: {
|
|
797
796
|
currentWorkingDirectory: string;
|
|
798
797
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -821,10 +820,10 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
821
820
|
content: string;
|
|
822
821
|
}[][] | undefined;
|
|
823
822
|
};
|
|
823
|
+
fingerprintId: string;
|
|
824
824
|
authToken?: string | undefined;
|
|
825
825
|
}, {
|
|
826
826
|
type: "init";
|
|
827
|
-
fingerprintId: string;
|
|
828
827
|
fileContext: {
|
|
829
828
|
currentWorkingDirectory: string;
|
|
830
829
|
fileTree: import("./util/file").FileTreeNode[];
|
|
@@ -853,6 +852,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
853
852
|
content: string;
|
|
854
853
|
}[][] | undefined;
|
|
855
854
|
};
|
|
855
|
+
fingerprintId: string;
|
|
856
856
|
authToken?: string | undefined;
|
|
857
857
|
}>, z.ZodObject<{
|
|
858
858
|
type: z.ZodLiteral<"generate-commit-message">;
|
|
@@ -928,12 +928,12 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
928
928
|
path: z.ZodString;
|
|
929
929
|
content: z.ZodString;
|
|
930
930
|
}, "strip", z.ZodTypeAny, {
|
|
931
|
-
type: "patch" | "file";
|
|
932
931
|
path: string;
|
|
932
|
+
type: "patch" | "file";
|
|
933
933
|
content: string;
|
|
934
934
|
}, {
|
|
935
|
-
type: "patch" | "file";
|
|
936
935
|
path: string;
|
|
936
|
+
type: "patch" | "file";
|
|
937
937
|
content: string;
|
|
938
938
|
}>, "many">;
|
|
939
939
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
@@ -941,12 +941,12 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
941
941
|
path: z.ZodString;
|
|
942
942
|
content: z.ZodString;
|
|
943
943
|
}, "strip", z.ZodTypeAny, {
|
|
944
|
-
type: "patch" | "file";
|
|
945
944
|
path: string;
|
|
945
|
+
type: "patch" | "file";
|
|
946
946
|
content: string;
|
|
947
947
|
}, {
|
|
948
|
-
type: "patch" | "file";
|
|
949
948
|
path: string;
|
|
949
|
+
type: "patch" | "file";
|
|
950
950
|
content: string;
|
|
951
951
|
}>, "many">;
|
|
952
952
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
@@ -971,13 +971,13 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
971
971
|
userInputId: string;
|
|
972
972
|
response: string;
|
|
973
973
|
changes: {
|
|
974
|
-
type: "patch" | "file";
|
|
975
974
|
path: string;
|
|
975
|
+
type: "patch" | "file";
|
|
976
976
|
content: string;
|
|
977
977
|
}[];
|
|
978
978
|
changesAlreadyApplied: {
|
|
979
|
-
type: "patch" | "file";
|
|
980
979
|
path: string;
|
|
980
|
+
type: "patch" | "file";
|
|
981
981
|
content: string;
|
|
982
982
|
}[];
|
|
983
983
|
addedFileVersions: {
|
|
@@ -995,13 +995,13 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
995
995
|
userInputId: string;
|
|
996
996
|
response: string;
|
|
997
997
|
changes: {
|
|
998
|
-
type: "patch" | "file";
|
|
999
998
|
path: string;
|
|
999
|
+
type: "patch" | "file";
|
|
1000
1000
|
content: string;
|
|
1001
1001
|
}[];
|
|
1002
1002
|
changesAlreadyApplied: {
|
|
1003
|
-
type: "patch" | "file";
|
|
1004
1003
|
path: string;
|
|
1004
|
+
type: "patch" | "file";
|
|
1005
1005
|
content: string;
|
|
1006
1006
|
}[];
|
|
1007
1007
|
addedFileVersions: {
|
|
@@ -1183,16 +1183,16 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1183
1183
|
type: "ephemeral";
|
|
1184
1184
|
}>>;
|
|
1185
1185
|
}, "strip", z.ZodTypeAny, {
|
|
1186
|
-
type: "tool_use";
|
|
1187
1186
|
name: string;
|
|
1187
|
+
type: "tool_use";
|
|
1188
1188
|
id: string;
|
|
1189
1189
|
input: Record<string, any>;
|
|
1190
1190
|
cache_control?: {
|
|
1191
1191
|
type: "ephemeral";
|
|
1192
1192
|
} | undefined;
|
|
1193
1193
|
}, {
|
|
1194
|
-
type: "tool_use";
|
|
1195
1194
|
name: string;
|
|
1195
|
+
type: "tool_use";
|
|
1196
1196
|
id: string;
|
|
1197
1197
|
input: Record<string, any>;
|
|
1198
1198
|
cache_control?: {
|
|
@@ -1274,8 +1274,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1274
1274
|
type: "ephemeral";
|
|
1275
1275
|
} | undefined;
|
|
1276
1276
|
} | {
|
|
1277
|
-
type: "tool_use";
|
|
1278
1277
|
name: string;
|
|
1278
|
+
type: "tool_use";
|
|
1279
1279
|
id: string;
|
|
1280
1280
|
input: Record<string, any>;
|
|
1281
1281
|
cache_control?: {
|
|
@@ -1308,8 +1308,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1308
1308
|
type: "ephemeral";
|
|
1309
1309
|
} | undefined;
|
|
1310
1310
|
} | {
|
|
1311
|
-
type: "tool_use";
|
|
1312
1311
|
name: string;
|
|
1312
|
+
type: "tool_use";
|
|
1313
1313
|
id: string;
|
|
1314
1314
|
input: Record<string, any>;
|
|
1315
1315
|
cache_control?: {
|
|
@@ -1374,8 +1374,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1374
1374
|
type: "ephemeral";
|
|
1375
1375
|
} | undefined;
|
|
1376
1376
|
} | {
|
|
1377
|
-
type: "tool_use";
|
|
1378
1377
|
name: string;
|
|
1378
|
+
type: "tool_use";
|
|
1379
1379
|
id: string;
|
|
1380
1380
|
input: Record<string, any>;
|
|
1381
1381
|
cache_control?: {
|
|
@@ -1440,8 +1440,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1440
1440
|
type: "ephemeral";
|
|
1441
1441
|
} | undefined;
|
|
1442
1442
|
} | {
|
|
1443
|
-
type: "tool_use";
|
|
1444
1443
|
name: string;
|
|
1444
|
+
type: "tool_use";
|
|
1445
1445
|
id: string;
|
|
1446
1446
|
input: Record<string, any>;
|
|
1447
1447
|
cache_control?: {
|
|
@@ -1475,12 +1475,12 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1475
1475
|
id: z.ZodString;
|
|
1476
1476
|
}, "strip", z.ZodTypeAny, {
|
|
1477
1477
|
name: string;
|
|
1478
|
-
id: string;
|
|
1479
1478
|
parameters: Record<string, string>;
|
|
1479
|
+
id: string;
|
|
1480
1480
|
}, {
|
|
1481
1481
|
name: string;
|
|
1482
|
-
id: string;
|
|
1483
1482
|
parameters: Record<string, string>;
|
|
1483
|
+
id: string;
|
|
1484
1484
|
}>, "many">;
|
|
1485
1485
|
toolResults: z.ZodArray<z.ZodObject<{
|
|
1486
1486
|
name: z.ZodString;
|
|
@@ -1536,8 +1536,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1536
1536
|
type: "ephemeral";
|
|
1537
1537
|
} | undefined;
|
|
1538
1538
|
} | {
|
|
1539
|
-
type: "tool_use";
|
|
1540
1539
|
name: string;
|
|
1540
|
+
type: "tool_use";
|
|
1541
1541
|
id: string;
|
|
1542
1542
|
input: Record<string, any>;
|
|
1543
1543
|
cache_control?: {
|
|
@@ -1572,8 +1572,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1572
1572
|
}[];
|
|
1573
1573
|
toolCalls: {
|
|
1574
1574
|
name: string;
|
|
1575
|
-
id: string;
|
|
1576
1575
|
parameters: Record<string, string>;
|
|
1576
|
+
id: string;
|
|
1577
1577
|
}[];
|
|
1578
1578
|
}, {
|
|
1579
1579
|
type: "prompt-response";
|
|
@@ -1616,8 +1616,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1616
1616
|
type: "ephemeral";
|
|
1617
1617
|
} | undefined;
|
|
1618
1618
|
} | {
|
|
1619
|
-
type: "tool_use";
|
|
1620
1619
|
name: string;
|
|
1620
|
+
type: "tool_use";
|
|
1621
1621
|
id: string;
|
|
1622
1622
|
input: Record<string, any>;
|
|
1623
1623
|
cache_control?: {
|
|
@@ -1652,8 +1652,8 @@ export declare const PromptResponseSchema: z.ZodObject<{
|
|
|
1652
1652
|
}[];
|
|
1653
1653
|
toolCalls: {
|
|
1654
1654
|
name: string;
|
|
1655
|
-
id: string;
|
|
1656
1655
|
parameters: Record<string, string>;
|
|
1656
|
+
id: string;
|
|
1657
1657
|
}[];
|
|
1658
1658
|
}>;
|
|
1659
1659
|
export type PromptResponse = z.infer<typeof PromptResponseSchema>;
|
|
@@ -1678,12 +1678,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1678
1678
|
path: z.ZodString;
|
|
1679
1679
|
content: z.ZodString;
|
|
1680
1680
|
}, "strip", z.ZodTypeAny, {
|
|
1681
|
-
type: "patch" | "file";
|
|
1682
1681
|
path: string;
|
|
1682
|
+
type: "patch" | "file";
|
|
1683
1683
|
content: string;
|
|
1684
1684
|
}, {
|
|
1685
|
-
type: "patch" | "file";
|
|
1686
1685
|
path: string;
|
|
1686
|
+
type: "patch" | "file";
|
|
1687
1687
|
content: string;
|
|
1688
1688
|
}>, "many">;
|
|
1689
1689
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
@@ -1691,12 +1691,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1691
1691
|
path: z.ZodString;
|
|
1692
1692
|
content: z.ZodString;
|
|
1693
1693
|
}, "strip", z.ZodTypeAny, {
|
|
1694
|
-
type: "patch" | "file";
|
|
1695
1694
|
path: string;
|
|
1695
|
+
type: "patch" | "file";
|
|
1696
1696
|
content: string;
|
|
1697
1697
|
}, {
|
|
1698
|
-
type: "patch" | "file";
|
|
1699
1698
|
path: string;
|
|
1699
|
+
type: "patch" | "file";
|
|
1700
1700
|
content: string;
|
|
1701
1701
|
}>, "many">;
|
|
1702
1702
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
@@ -1721,13 +1721,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1721
1721
|
userInputId: string;
|
|
1722
1722
|
response: string;
|
|
1723
1723
|
changes: {
|
|
1724
|
-
type: "patch" | "file";
|
|
1725
1724
|
path: string;
|
|
1725
|
+
type: "patch" | "file";
|
|
1726
1726
|
content: string;
|
|
1727
1727
|
}[];
|
|
1728
1728
|
changesAlreadyApplied: {
|
|
1729
|
-
type: "patch" | "file";
|
|
1730
1729
|
path: string;
|
|
1730
|
+
type: "patch" | "file";
|
|
1731
1731
|
content: string;
|
|
1732
1732
|
}[];
|
|
1733
1733
|
addedFileVersions: {
|
|
@@ -1745,13 +1745,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1745
1745
|
userInputId: string;
|
|
1746
1746
|
response: string;
|
|
1747
1747
|
changes: {
|
|
1748
|
-
type: "patch" | "file";
|
|
1749
1748
|
path: string;
|
|
1749
|
+
type: "patch" | "file";
|
|
1750
1750
|
content: string;
|
|
1751
1751
|
}[];
|
|
1752
1752
|
changesAlreadyApplied: {
|
|
1753
|
-
type: "patch" | "file";
|
|
1754
1753
|
path: string;
|
|
1754
|
+
type: "patch" | "file";
|
|
1755
1755
|
content: string;
|
|
1756
1756
|
}[];
|
|
1757
1757
|
addedFileVersions: {
|
|
@@ -1918,16 +1918,16 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1918
1918
|
type: "ephemeral";
|
|
1919
1919
|
}>>;
|
|
1920
1920
|
}, "strip", z.ZodTypeAny, {
|
|
1921
|
-
type: "tool_use";
|
|
1922
1921
|
name: string;
|
|
1922
|
+
type: "tool_use";
|
|
1923
1923
|
id: string;
|
|
1924
1924
|
input: Record<string, any>;
|
|
1925
1925
|
cache_control?: {
|
|
1926
1926
|
type: "ephemeral";
|
|
1927
1927
|
} | undefined;
|
|
1928
1928
|
}, {
|
|
1929
|
-
type: "tool_use";
|
|
1930
1929
|
name: string;
|
|
1930
|
+
type: "tool_use";
|
|
1931
1931
|
id: string;
|
|
1932
1932
|
input: Record<string, any>;
|
|
1933
1933
|
cache_control?: {
|
|
@@ -2009,8 +2009,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2009
2009
|
type: "ephemeral";
|
|
2010
2010
|
} | undefined;
|
|
2011
2011
|
} | {
|
|
2012
|
-
type: "tool_use";
|
|
2013
2012
|
name: string;
|
|
2013
|
+
type: "tool_use";
|
|
2014
2014
|
id: string;
|
|
2015
2015
|
input: Record<string, any>;
|
|
2016
2016
|
cache_control?: {
|
|
@@ -2043,8 +2043,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2043
2043
|
type: "ephemeral";
|
|
2044
2044
|
} | undefined;
|
|
2045
2045
|
} | {
|
|
2046
|
-
type: "tool_use";
|
|
2047
2046
|
name: string;
|
|
2047
|
+
type: "tool_use";
|
|
2048
2048
|
id: string;
|
|
2049
2049
|
input: Record<string, any>;
|
|
2050
2050
|
cache_control?: {
|
|
@@ -2109,8 +2109,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2109
2109
|
type: "ephemeral";
|
|
2110
2110
|
} | undefined;
|
|
2111
2111
|
} | {
|
|
2112
|
-
type: "tool_use";
|
|
2113
2112
|
name: string;
|
|
2113
|
+
type: "tool_use";
|
|
2114
2114
|
id: string;
|
|
2115
2115
|
input: Record<string, any>;
|
|
2116
2116
|
cache_control?: {
|
|
@@ -2175,8 +2175,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2175
2175
|
type: "ephemeral";
|
|
2176
2176
|
} | undefined;
|
|
2177
2177
|
} | {
|
|
2178
|
-
type: "tool_use";
|
|
2179
2178
|
name: string;
|
|
2179
|
+
type: "tool_use";
|
|
2180
2180
|
id: string;
|
|
2181
2181
|
input: Record<string, any>;
|
|
2182
2182
|
cache_control?: {
|
|
@@ -2210,12 +2210,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2210
2210
|
id: z.ZodString;
|
|
2211
2211
|
}, "strip", z.ZodTypeAny, {
|
|
2212
2212
|
name: string;
|
|
2213
|
-
id: string;
|
|
2214
2213
|
parameters: Record<string, string>;
|
|
2214
|
+
id: string;
|
|
2215
2215
|
}, {
|
|
2216
2216
|
name: string;
|
|
2217
|
-
id: string;
|
|
2218
2217
|
parameters: Record<string, string>;
|
|
2218
|
+
id: string;
|
|
2219
2219
|
}>, "many">;
|
|
2220
2220
|
toolResults: z.ZodArray<z.ZodObject<{
|
|
2221
2221
|
name: z.ZodString;
|
|
@@ -2271,8 +2271,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2271
2271
|
type: "ephemeral";
|
|
2272
2272
|
} | undefined;
|
|
2273
2273
|
} | {
|
|
2274
|
-
type: "tool_use";
|
|
2275
2274
|
name: string;
|
|
2275
|
+
type: "tool_use";
|
|
2276
2276
|
id: string;
|
|
2277
2277
|
input: Record<string, any>;
|
|
2278
2278
|
cache_control?: {
|
|
@@ -2307,8 +2307,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2307
2307
|
}[];
|
|
2308
2308
|
toolCalls: {
|
|
2309
2309
|
name: string;
|
|
2310
|
-
id: string;
|
|
2311
2310
|
parameters: Record<string, string>;
|
|
2311
|
+
id: string;
|
|
2312
2312
|
}[];
|
|
2313
2313
|
}, {
|
|
2314
2314
|
type: "prompt-response";
|
|
@@ -2351,8 +2351,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2351
2351
|
type: "ephemeral";
|
|
2352
2352
|
} | undefined;
|
|
2353
2353
|
} | {
|
|
2354
|
-
type: "tool_use";
|
|
2355
2354
|
name: string;
|
|
2355
|
+
type: "tool_use";
|
|
2356
2356
|
id: string;
|
|
2357
2357
|
input: Record<string, any>;
|
|
2358
2358
|
cache_control?: {
|
|
@@ -2387,8 +2387,8 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2387
2387
|
}[];
|
|
2388
2388
|
toolCalls: {
|
|
2389
2389
|
name: string;
|
|
2390
|
-
id: string;
|
|
2391
2390
|
parameters: Record<string, string>;
|
|
2391
|
+
id: string;
|
|
2392
2392
|
}[];
|
|
2393
2393
|
}>, z.ZodObject<{
|
|
2394
2394
|
type: z.ZodLiteral<"read-files">;
|
|
@@ -2424,12 +2424,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2424
2424
|
path: z.ZodString;
|
|
2425
2425
|
content: z.ZodString;
|
|
2426
2426
|
}, "strip", z.ZodTypeAny, {
|
|
2427
|
-
type: "patch" | "file";
|
|
2428
2427
|
path: string;
|
|
2428
|
+
type: "patch" | "file";
|
|
2429
2429
|
content: string;
|
|
2430
2430
|
}, {
|
|
2431
|
-
type: "patch" | "file";
|
|
2432
2431
|
path: string;
|
|
2432
|
+
type: "patch" | "file";
|
|
2433
2433
|
content: string;
|
|
2434
2434
|
}>, "many">;
|
|
2435
2435
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
@@ -2437,12 +2437,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2437
2437
|
path: z.ZodString;
|
|
2438
2438
|
content: z.ZodString;
|
|
2439
2439
|
}, "strip", z.ZodTypeAny, {
|
|
2440
|
-
type: "patch" | "file";
|
|
2441
2440
|
path: string;
|
|
2441
|
+
type: "patch" | "file";
|
|
2442
2442
|
content: string;
|
|
2443
2443
|
}, {
|
|
2444
|
-
type: "patch" | "file";
|
|
2445
2444
|
path: string;
|
|
2445
|
+
type: "patch" | "file";
|
|
2446
2446
|
content: string;
|
|
2447
2447
|
}>, "many">;
|
|
2448
2448
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
@@ -2466,13 +2466,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2466
2466
|
userInputId: string;
|
|
2467
2467
|
response: string;
|
|
2468
2468
|
changes: {
|
|
2469
|
-
type: "patch" | "file";
|
|
2470
2469
|
path: string;
|
|
2470
|
+
type: "patch" | "file";
|
|
2471
2471
|
content: string;
|
|
2472
2472
|
}[];
|
|
2473
2473
|
changesAlreadyApplied: {
|
|
2474
|
-
type: "patch" | "file";
|
|
2475
2474
|
path: string;
|
|
2475
|
+
type: "patch" | "file";
|
|
2476
2476
|
content: string;
|
|
2477
2477
|
}[];
|
|
2478
2478
|
addedFileVersions: {
|
|
@@ -2490,13 +2490,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2490
2490
|
userInputId: string;
|
|
2491
2491
|
response: string;
|
|
2492
2492
|
changes: {
|
|
2493
|
-
type: "patch" | "file";
|
|
2494
2493
|
path: string;
|
|
2494
|
+
type: "patch" | "file";
|
|
2495
2495
|
content: string;
|
|
2496
2496
|
}[];
|
|
2497
2497
|
changesAlreadyApplied: {
|
|
2498
|
-
type: "patch" | "file";
|
|
2499
2498
|
path: string;
|
|
2499
|
+
type: "patch" | "file";
|
|
2500
2500
|
content: string;
|
|
2501
2501
|
}[];
|
|
2502
2502
|
addedFileVersions: {
|
|
@@ -2590,13 +2590,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2590
2590
|
error: z.ZodOptional<z.ZodString>;
|
|
2591
2591
|
remainingBalance: z.ZodOptional<z.ZodNumber>;
|
|
2592
2592
|
}, "strip", z.ZodTypeAny, {
|
|
2593
|
-
type: "action-error";
|
|
2594
2593
|
message: string;
|
|
2594
|
+
type: "action-error";
|
|
2595
2595
|
remainingBalance?: number | undefined;
|
|
2596
2596
|
error?: string | undefined;
|
|
2597
2597
|
}, {
|
|
2598
|
-
type: "action-error";
|
|
2599
2598
|
message: string;
|
|
2599
|
+
type: "action-error";
|
|
2600
2600
|
remainingBalance?: number | undefined;
|
|
2601
2601
|
error?: string | undefined;
|
|
2602
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
|
+
}[]>;
|