@lightdash/common 2.59.0 → 2.60.1
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/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/builtInToolResultGuard.d.ts +11 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/builtInToolResultGuard.d.ts.map +1 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/builtInToolResultGuard.js +10 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/builtInToolResultGuard.js.map +1 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/builtInToolResultGuard.test.d.ts +2 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/builtInToolResultGuard.test.d.ts.map +1 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/builtInToolResultGuard.test.js +36 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/builtInToolResultGuard.test.js.map +1 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/index.d.ts +1 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/index.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/index.js +1 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/index.js.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.d.ts +32 -8
- package/dist/cjs/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.js +2 -5
- package/dist/cjs/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.js.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolEditRepoArgs.d.ts +21 -8
- package/dist/cjs/ee/AiAgent/schemas/tools/toolEditRepoArgs.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolEditRepoArgs.js +2 -4
- package/dist/cjs/ee/AiAgent/schemas/tools/toolEditRepoArgs.js.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.d.ts +30 -15
- package/dist/cjs/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.js +19 -16
- package/dist/cjs/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.js.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolSetupPreviewDeployArgs.d.ts +10 -8
- package/dist/cjs/ee/AiAgent/schemas/tools/toolSetupPreviewDeployArgs.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolSetupPreviewDeployArgs.js +2 -5
- package/dist/cjs/ee/AiAgent/schemas/tools/toolSetupPreviewDeployArgs.js.map +1 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/builtInToolResultGuard.d.ts +11 -0
- package/dist/esm/ee/AiAgent/schemas/tools/builtInToolResultGuard.d.ts.map +1 -0
- package/dist/esm/ee/AiAgent/schemas/tools/builtInToolResultGuard.js +6 -0
- package/dist/esm/ee/AiAgent/schemas/tools/builtInToolResultGuard.js.map +1 -0
- package/dist/esm/ee/AiAgent/schemas/tools/builtInToolResultGuard.test.d.ts +2 -0
- package/dist/esm/ee/AiAgent/schemas/tools/builtInToolResultGuard.test.d.ts.map +1 -0
- package/dist/esm/ee/AiAgent/schemas/tools/builtInToolResultGuard.test.js +34 -0
- package/dist/esm/ee/AiAgent/schemas/tools/builtInToolResultGuard.test.js.map +1 -0
- package/dist/esm/ee/AiAgent/schemas/tools/index.d.ts +1 -0
- package/dist/esm/ee/AiAgent/schemas/tools/index.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/index.js +1 -0
- package/dist/esm/ee/AiAgent/schemas/tools/index.js.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.d.ts +32 -8
- package/dist/esm/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.js +2 -4
- package/dist/esm/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.js.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolEditRepoArgs.d.ts +21 -8
- package/dist/esm/ee/AiAgent/schemas/tools/toolEditRepoArgs.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolEditRepoArgs.js +2 -3
- package/dist/esm/ee/AiAgent/schemas/tools/toolEditRepoArgs.js.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.d.ts +30 -15
- package/dist/esm/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.js +18 -14
- package/dist/esm/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.js.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolSetupPreviewDeployArgs.d.ts +10 -8
- package/dist/esm/ee/AiAgent/schemas/tools/toolSetupPreviewDeployArgs.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolSetupPreviewDeployArgs.js +2 -4
- package/dist/esm/ee/AiAgent/schemas/tools/toolSetupPreviewDeployArgs.js.map +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/builtInToolResultGuard.d.ts +11 -0
- package/dist/types/ee/AiAgent/schemas/tools/builtInToolResultGuard.d.ts.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/builtInToolResultGuard.js +6 -0
- package/dist/types/ee/AiAgent/schemas/tools/builtInToolResultGuard.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/builtInToolResultGuard.test.d.ts +2 -0
- package/dist/types/ee/AiAgent/schemas/tools/builtInToolResultGuard.test.d.ts.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/builtInToolResultGuard.test.js +34 -0
- package/dist/types/ee/AiAgent/schemas/tools/builtInToolResultGuard.test.js.map +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/index.d.ts +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/index.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/index.js +1 -0
- package/dist/types/ee/AiAgent/schemas/tools/index.js.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.d.ts +32 -8
- package/dist/types/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.js +2 -4
- package/dist/types/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.js.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolEditRepoArgs.d.ts +21 -8
- package/dist/types/ee/AiAgent/schemas/tools/toolEditRepoArgs.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolEditRepoArgs.js +2 -3
- package/dist/types/ee/AiAgent/schemas/tools/toolEditRepoArgs.js.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.d.ts +30 -15
- package/dist/types/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.js +18 -14
- package/dist/types/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.js.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolSetupPreviewDeployArgs.d.ts +10 -8
- package/dist/types/ee/AiAgent/schemas/tools/toolSetupPreviewDeployArgs.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolSetupPreviewDeployArgs.js +2 -4
- package/dist/types/ee/AiAgent/schemas/tools/toolSetupPreviewDeployArgs.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type z } from 'zod';
|
|
2
|
+
export declare const makeBuiltInToolResultGuard: <Name extends string, Schema extends z.ZodType>(toolName: Name, metadataSchema: Schema) => <T extends {
|
|
3
|
+
toolType: string;
|
|
4
|
+
toolName: string;
|
|
5
|
+
metadata: unknown;
|
|
6
|
+
}>(result: T) => result is T & {
|
|
7
|
+
toolType: 'built-in';
|
|
8
|
+
toolName: Name;
|
|
9
|
+
metadata: z.infer<Schema>;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=builtInToolResultGuard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtInToolResultGuard.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/builtInToolResultGuard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC;AAI7B,eAAO,MAAM,0BAA0B,GAClC,IAAI,SAAS,MAAM,EAAE,MAAM,SAAS,CAAC,CAAC,OAAO,YAChC,IAAI,kBACE,MAAM,MAEzB,CAAC,SAAS;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,UACxD,CAAC,KACV,MAAM,IAAI,CAAC,GAAG;IACb,QAAQ,EAAE,UAAU,CAAC;IACrB,QAAQ,EAAE,IAAI,CAAC;IACf,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;CAIuB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeBuiltInToolResultGuard = void 0;
|
|
4
|
+
// Guards persisted tool results (metadata comes from the DB), so the schema
|
|
5
|
+
// check must be a safeParse, never a throw.
|
|
6
|
+
const makeBuiltInToolResultGuard = (toolName, metadataSchema) => (result) => result.toolType === 'built-in' &&
|
|
7
|
+
result.toolName === toolName &&
|
|
8
|
+
metadataSchema.safeParse(result.metadata).success;
|
|
9
|
+
exports.makeBuiltInToolResultGuard = makeBuiltInToolResultGuard;
|
|
10
|
+
//# sourceMappingURL=builtInToolResultGuard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtInToolResultGuard.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/builtInToolResultGuard.ts"],"names":[],"mappings":";;;AAEA,4EAA4E;AAC5E,4CAA4C;AACrC,MAAM,0BAA0B,GACnC,CACI,QAAc,EACd,cAAsB,EACxB,EAAE,CACJ,CACI,MAAS,EAKX,EAAE,CACA,MAAM,CAAC,QAAQ,KAAK,UAAU;IAC9B,MAAM,CAAC,QAAQ,KAAK,QAAQ;IAC5B,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC;AAd7C,QAAA,0BAA0B,GAA1B,0BAA0B,CAcmB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtInToolResultGuard.test.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/builtInToolResultGuard.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const zod_1 = require("zod");
|
|
4
|
+
const builtInToolResultGuard_1 = require("./builtInToolResultGuard");
|
|
5
|
+
describe('makeBuiltInToolResultGuard', () => {
|
|
6
|
+
const metadataSchema = zod_1.z.object({ status: zod_1.z.literal('success') });
|
|
7
|
+
const isMyToolResult = (0, builtInToolResultGuard_1.makeBuiltInToolResultGuard)('myTool', metadataSchema);
|
|
8
|
+
const base = {
|
|
9
|
+
toolType: 'built-in',
|
|
10
|
+
toolName: 'myTool',
|
|
11
|
+
metadata: { status: 'success' },
|
|
12
|
+
};
|
|
13
|
+
it('accepts a matching built-in result', () => {
|
|
14
|
+
expect(isMyToolResult(base)).toBe(true);
|
|
15
|
+
});
|
|
16
|
+
it('rejects other tool names and types', () => {
|
|
17
|
+
expect(isMyToolResult({ ...base, toolName: 'otherTool' })).toBe(false);
|
|
18
|
+
expect(isMyToolResult({ ...base, toolType: 'mcp' })).toBe(false);
|
|
19
|
+
});
|
|
20
|
+
it('rejects metadata that fails the schema, without throwing', () => {
|
|
21
|
+
expect(isMyToolResult({ ...base, metadata: null })).toBe(false);
|
|
22
|
+
expect(isMyToolResult({ ...base, metadata: { status: 'nope' } })).toBe(false);
|
|
23
|
+
});
|
|
24
|
+
it('narrows metadata to the schema type', () => {
|
|
25
|
+
const result = base;
|
|
26
|
+
if (isMyToolResult(result)) {
|
|
27
|
+
// type-level check: metadata.status is narrowed
|
|
28
|
+
const status = result.metadata.status;
|
|
29
|
+
expect(status).toBe('success');
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
throw new Error('expected guard to pass');
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=builtInToolResultGuard.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtInToolResultGuard.test.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/builtInToolResultGuard.test.ts"],"names":[],"mappings":";;AAAA,6BAAwB;AACxB,qEAAsE;AAEtE,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IACxC,MAAM,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAClE,MAAM,cAAc,GAAG,IAAA,mDAA0B,EAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;IAE5E,MAAM,IAAI,GAAG;QACT,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,QAAQ;QAClB,QAAQ,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE;KAClC,CAAC;IAEF,EAAE,CAAC,oCAAoC,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CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,sBAAsB,CAAC;AACrC,cAAc,uCAAuC,CAAC;AACtD,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./builtInToolResultGuard"), exports);
|
|
4
5
|
tslib_1.__exportStar(require("./toolDefinitions"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./toolAnalyzeFieldImpactArgs"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./toolBuiltInSkillArgs"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,uEAA6C;AAC7C,iEAAuC;AACvC,mEAAyC;AACzC,mEAAyC;AACzC,+DAAqC;AACrC,gEAAsC;AACtC,gEAAsC;AACtC,mEAAyC;AACzC,kEAAwC;AACxC,uEAA6C;AAC7C,iEAAuC;AACvC,8DAAoC;AACpC,0EAAgD;AAChD,mEAAyC;AACzC,oEAA0C;AAC1C,uEAA6C;AAC7C,6DAAmC;AACnC,mEAAyC;AACzC,gEAAsC;AACtC,kEAAwC;AACxC,oEAA0C;AAC1C,qEAA2C;AAC3C,kEAAwC;AACxC,uEAA6C;AAC7C,uEAA6C;AAC7C,gEAAsC;AACtC,+DAAqC;AACrC,oEAA0C;AAC1C,gEAAsC;AACtC,2EAAiD;AACjD,+DAAqC;AACrC,gFAAsD;AACtD,2EAAiD;AACjD,qEAA2C;AAC3C,kEAAwC;AACxC,4EAAkD;AAClD,mEAAyC;AACzC,gEAAsC;AACtC,gEAAsC;AACtC,mEAAyC;AACzC,uEAA6C;AAC7C,mEAAyC;AACzC,mEAAyC;AACzC,yEAA+C;AAC/C,iEAAuC;AACvC,+DAAqC;AACrC,iEAAuC;AACvC,wEAA8C;AAC9C,oEAA0C;AAC1C,mEAAyC;AACzC,6DAAmC;AACnC,kEAAwC;AACxC,2DAAiC;AACjC,sEAA4C;AAC5C,wEAA8C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/index.ts"],"names":[],"mappings":";;;AAAA,mEAAyC;AACzC,4DAAkC;AAClC,uEAA6C;AAC7C,iEAAuC;AACvC,mEAAyC;AACzC,mEAAyC;AACzC,+DAAqC;AACrC,gEAAsC;AACtC,gEAAsC;AACtC,mEAAyC;AACzC,kEAAwC;AACxC,uEAA6C;AAC7C,iEAAuC;AACvC,8DAAoC;AACpC,0EAAgD;AAChD,mEAAyC;AACzC,oEAA0C;AAC1C,uEAA6C;AAC7C,6DAAmC;AACnC,mEAAyC;AACzC,gEAAsC;AACtC,kEAAwC;AACxC,oEAA0C;AAC1C,qEAA2C;AAC3C,kEAAwC;AACxC,uEAA6C;AAC7C,uEAA6C;AAC7C,gEAAsC;AACtC,+DAAqC;AACrC,oEAA0C;AAC1C,gEAAsC;AACtC,2EAAiD;AACjD,+DAAqC;AACrC,gFAAsD;AACtD,2EAAiD;AACjD,qEAA2C;AAC3C,kEAAwC;AACxC,4EAAkD;AAClD,mEAAyC;AACzC,gEAAsC;AACtC,gEAAsC;AACtC,mEAAyC;AACzC,uEAA6C;AAC7C,mEAAyC;AACzC,mEAAyC;AACzC,yEAA+C;AAC/C,iEAAuC;AACvC,+DAAqC;AACrC,iEAAuC;AACvC,wEAA8C;AAC9C,oEAA0C;AAC1C,mEAAyC;AACzC,6DAAmC;AACnC,kEAAwC;AACxC,2DAAiC;AACjC,sEAA4C;AAC5C,wEAA8C"}
|
|
@@ -184,16 +184,40 @@ export declare const toolEditDbtProjectOutputSchema: z.ZodObject<{
|
|
|
184
184
|
}>;
|
|
185
185
|
export type ToolEditDbtProjectArgs = z.infer<typeof toolEditDbtProjectArgsSchema>;
|
|
186
186
|
export type ToolEditDbtProjectOutput = z.infer<typeof toolEditDbtProjectOutputSchema>;
|
|
187
|
-
|
|
187
|
+
export declare const isToolEditDbtProjectResult: <T extends {
|
|
188
188
|
toolType: string;
|
|
189
189
|
toolName: string;
|
|
190
|
-
metadata:
|
|
191
|
-
}
|
|
192
|
-
type ToolEditDbtProjectResult = ToolEditDbtProjectResultLike & {
|
|
190
|
+
metadata: unknown;
|
|
191
|
+
}>(result: T) => result is T & {
|
|
193
192
|
toolType: 'built-in';
|
|
194
|
-
toolName:
|
|
195
|
-
metadata:
|
|
193
|
+
toolName: "editDbtProject";
|
|
194
|
+
metadata: {
|
|
195
|
+
status: "pending";
|
|
196
|
+
aiWritebackRunUuid: string;
|
|
197
|
+
} | {
|
|
198
|
+
status: "success";
|
|
199
|
+
prUrl: string | null;
|
|
200
|
+
prAction?: "opened" | "updated" | null | undefined;
|
|
201
|
+
commitSha?: string | null | undefined;
|
|
202
|
+
additions?: number | null | undefined;
|
|
203
|
+
deletions?: number | null | undefined;
|
|
204
|
+
previewUrl?: string | null | undefined;
|
|
205
|
+
steps?: {
|
|
206
|
+
kind: "compile" | "edit" | "read" | "search" | "stage";
|
|
207
|
+
label: string;
|
|
208
|
+
}[] | null | undefined;
|
|
209
|
+
needsDbtSourceSelection?: boolean | null | undefined;
|
|
210
|
+
dbtSourceOptions?: {
|
|
211
|
+
projectDbtSourceUuid: string;
|
|
212
|
+
name: string;
|
|
213
|
+
isPrimary: boolean;
|
|
214
|
+
repository: string | null;
|
|
215
|
+
branch: string | null;
|
|
216
|
+
projectSubPath: string | null;
|
|
217
|
+
}[] | null | undefined;
|
|
218
|
+
} | {
|
|
219
|
+
status: "error";
|
|
220
|
+
errorCode?: "git_write_permission" | "github_not_installed" | "gitlab_not_installed" | "pull_request_not_open" | "unknown" | "unsupported_source_control" | null | undefined;
|
|
221
|
+
};
|
|
196
222
|
};
|
|
197
|
-
export declare const isToolEditDbtProjectResult: <T extends ToolEditDbtProjectResultLike>(result: T) => result is T & ToolEditDbtProjectResult;
|
|
198
|
-
export {};
|
|
199
223
|
//# sourceMappingURL=toolEditDbtProjectArgs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolEditDbtProjectArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"toolEditDbtProjectArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,6BAA6B,QAAgB,CAAC;AAE3D,eAAO,MAAM,iCAAiC,QAMnC,CAAC;AAEZ,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;EAyBvC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+EzC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CACxC,OAAO,4BAA4B,CACtC,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,8BAA8B,CACxC,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGtC,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isToolEditDbtProjectResult = exports.toolEditDbtProjectOutputSchema = exports.toolEditDbtProjectArgsSchema = exports.TOOL_EDIT_DBT_PROJECT_DESCRIPTION = exports.AI_WRITEBACK_PENDING_GRACE_MS = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const builtInToolResultGuard_1 = require("./builtInToolResultGuard");
|
|
5
6
|
exports.AI_WRITEBACK_PENDING_GRACE_MS = 5 * 60 * 1000;
|
|
6
7
|
exports.TOOL_EDIT_DBT_PROJECT_DESCRIPTION = [
|
|
7
8
|
'Open or update a pull request that modifies the dbt project / Lightdash semantic layer for this project.',
|
|
@@ -104,9 +105,5 @@ exports.toolEditDbtProjectOutputSchema = zod_1.z.object({
|
|
|
104
105
|
}),
|
|
105
106
|
]),
|
|
106
107
|
});
|
|
107
|
-
|
|
108
|
-
result.toolName === 'editDbtProject' &&
|
|
109
|
-
exports.toolEditDbtProjectOutputSchema.shape.metadata.safeParse(result.metadata)
|
|
110
|
-
.success;
|
|
111
|
-
exports.isToolEditDbtProjectResult = isToolEditDbtProjectResult;
|
|
108
|
+
exports.isToolEditDbtProjectResult = (0, builtInToolResultGuard_1.makeBuiltInToolResultGuard)('editDbtProject', exports.toolEditDbtProjectOutputSchema.shape.metadata);
|
|
112
109
|
//# sourceMappingURL=toolEditDbtProjectArgs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolEditDbtProjectArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;
|
|
1
|
+
{"version":3,"file":"toolEditDbtProjectArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qEAAsE;AAEzD,QAAA,6BAA6B,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAE9C,QAAA,iCAAiC,GAAG;IAC7C,0GAA0G;IAC1G,wLAAwL;IACxL,8JAA8J;IAC9J,6YAA6Y;IAC7Y,+MAA+M;CAClN,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEC,QAAA,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IACjD,aAAa,EAAE,OAAC;SACX,MAAM,EAAE;SACR,IAAI,EAAE;SACN,QAAQ,EAAE;SACV,QAAQ,CACL,kKAAkK,CACrK;IACL,MAAM,EAAE,OAAC;SACJ,MAAM,EAAE;SACR,QAAQ,CACL,gVAAgV,CACnV;IACL,KAAK,EAAE,OAAC;SACH,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACL,8ZAA8Z,CACja;IACL,mBAAmB,EAAE,OAAC;SACjB,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CACL,uUAAuU,CAC1U;CACR,CAAC,CAAC;AAEU,QAAA,8BAA8B,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,MAAM,EAAE,OAAC,CAAC,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,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE;YAC9C,gBAAgB,EAAE,OAAC;iBACd,KAAK,CACF,OAAC,CAAC,MAAM,CAAC;gBACL,oBAAoB,EAAE,OAAC,CAAC,MAAM,EAAE;gBAChC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;gBAChB,SAAS,EAAE,OAAC,CAAC,OAAO,EAAE;gBACtB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;gBACjC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;gBAC7B,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aACxC,CAAC,CACL;iBACA,OAAO,EAAE;SACjB,CAAC;QACF,OAAC,CAAC,MAAM,CAAC;YACL,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC;YAC1B,8DAA8D;YAC9D,oEAAoE;YACpE,mEAAmE;YACnE,kEAAkE;YAClE,SAAS,EAAE,OAAC;iBACP,IAAI,CAAC;gBACF,sBAAsB;gBACtB,sBAAsB;gBACtB,4BAA4B;gBAC5B,uBAAuB;gBACvB,sBAAsB;gBACtB,SAAS;aACZ,CAAC;iBACD,OAAO,EAAE;SACjB,CAAC;KACL,CAAC;CACL,CAAC,CAAC;AAUU,QAAA,0BAA0B,GAAG,IAAA,mDAA0B,EAChE,gBAAgB,EAChB,QAAA,8BAA8B,CAAC,KAAK,CAAC,QAAQ,CAChD,CAAC"}
|
|
@@ -114,16 +114,29 @@ export declare const toolEditRepoOutputSchema: z.ZodObject<{
|
|
|
114
114
|
}>;
|
|
115
115
|
export type ToolEditRepoArgs = z.infer<typeof toolEditRepoArgsSchema>;
|
|
116
116
|
export type ToolEditRepoOutput = z.infer<typeof toolEditRepoOutputSchema>;
|
|
117
|
-
|
|
117
|
+
export declare const isToolEditRepoResult: <T extends {
|
|
118
118
|
toolType: string;
|
|
119
119
|
toolName: string;
|
|
120
|
-
metadata:
|
|
121
|
-
}
|
|
122
|
-
type ToolEditRepoResult = ToolEditRepoResultLike & {
|
|
120
|
+
metadata: unknown;
|
|
121
|
+
}>(result: T) => result is T & {
|
|
123
122
|
toolType: 'built-in';
|
|
124
|
-
toolName:
|
|
125
|
-
metadata:
|
|
123
|
+
toolName: "editRepo";
|
|
124
|
+
metadata: {
|
|
125
|
+
status: "success";
|
|
126
|
+
repository?: string | null | undefined;
|
|
127
|
+
prUrl: string | null;
|
|
128
|
+
prAction?: "opened" | "updated" | null | undefined;
|
|
129
|
+
commitSha?: string | null | undefined;
|
|
130
|
+
additions?: number | null | undefined;
|
|
131
|
+
deletions?: number | null | undefined;
|
|
132
|
+
steps?: {
|
|
133
|
+
kind: "compile" | "edit" | "read" | "search" | "stage";
|
|
134
|
+
label: string;
|
|
135
|
+
}[] | null | undefined;
|
|
136
|
+
} | {
|
|
137
|
+
status: "error";
|
|
138
|
+
errorCode?: "denied_path" | "git_write_permission" | "github_not_installed" | "gitlab_not_installed" | "pull_request_not_open" | "repo_too_large" | "repo_write_forbidden" | "unknown" | null | undefined;
|
|
139
|
+
reason?: string | null | undefined;
|
|
140
|
+
};
|
|
126
141
|
};
|
|
127
|
-
export declare const isToolEditRepoResult: <T extends ToolEditRepoResultLike>(result: T) => result is T & ToolEditRepoResult;
|
|
128
|
-
export {};
|
|
129
142
|
//# sourceMappingURL=toolEditRepoArgs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolEditRepoArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolEditRepoArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"toolEditRepoArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolEditRepoArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,0BAA0B,QAO5B,CAAC;AAEZ,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;EAwBjC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmEnC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;CAGhC,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isToolEditRepoResult = exports.toolEditRepoOutputSchema = exports.toolEditRepoArgsSchema = exports.TOOL_EDIT_REPO_DESCRIPTION = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const builtInToolResultGuard_1 = require("./builtInToolResultGuard");
|
|
5
6
|
exports.TOOL_EDIT_REPO_DESCRIPTION = [
|
|
6
7
|
'Make a code change to one of the repositories your organization can write to, and open (or update) a pull request with it.',
|
|
7
8
|
'Use this tool when the user asks to CHANGE code in a connected repository — e.g. fix a typo, edit a file, add a small feature — and wants a pull request raised on their behalf.',
|
|
@@ -93,8 +94,5 @@ exports.toolEditRepoOutputSchema = zod_1.z.object({
|
|
|
93
94
|
}),
|
|
94
95
|
]),
|
|
95
96
|
});
|
|
96
|
-
|
|
97
|
-
result.toolName === 'editRepo' &&
|
|
98
|
-
exports.toolEditRepoOutputSchema.shape.metadata.safeParse(result.metadata).success;
|
|
99
|
-
exports.isToolEditRepoResult = isToolEditRepoResult;
|
|
97
|
+
exports.isToolEditRepoResult = (0, builtInToolResultGuard_1.makeBuiltInToolResultGuard)('editRepo', exports.toolEditRepoOutputSchema.shape.metadata);
|
|
100
98
|
//# sourceMappingURL=toolEditRepoArgs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolEditRepoArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolEditRepoArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;
|
|
1
|
+
{"version":3,"file":"toolEditRepoArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolEditRepoArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qEAAsE;AAEzD,QAAA,0BAA0B,GAAG;IACtC,4HAA4H;IAC5H,kLAAkL;IAClL,4RAA4R;IAC5R,0OAA0O;IAC1O,wKAAwK;IACxK,wKAAwK;CAC3K,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEC,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,UAAU,EAAE,OAAC;SACR,MAAM,EAAE;SACR,QAAQ,CACL,uPAAuP,CAC1P;IACL,MAAM,EAAE,OAAC;SACJ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACL,mUAAmU,CACtU;IACL,KAAK,EAAE,OAAC;SACH,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACL,qVAAqV,CACxV;IACL,mBAAmB,EAAE,OAAC;SACjB,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CACL,2UAA2U,CAC9U;CACR,CAAC,CAAC;AAEU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,OAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;QACrC,OAAC,CAAC,MAAM,CAAC;YACL,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC;YAC5B,kEAAkE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EAAmE;YACnE,mEAAmE;YACnE,iEAAiE;YACjE,oEAAoE;YACpE,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;SAC/B,CAAC;KACL,CAAC;CACL,CAAC,CAAC;AAMU,QAAA,oBAAoB,GAAG,IAAA,mDAA0B,EAC1D,UAAU,EACV,QAAA,wBAAwB,CAAC,KAAK,CAAC,QAAQ,CAC1C,CAAC"}
|
|
@@ -2,14 +2,17 @@ import { z } from 'zod';
|
|
|
2
2
|
import { type AppVersionStatus } from '../../../apps/types';
|
|
3
3
|
/** Builds run minutes, not seconds: a pending result older than this is stale. */
|
|
4
4
|
export declare const AI_DATA_APP_BUILD_PENDING_GRACE_MS: number;
|
|
5
|
-
|
|
5
|
+
/** Builder starter templates the AI agent may pick; the viz renderer template is internal. */
|
|
6
|
+
export declare const DATA_APP_BUILD_TEMPLATES: readonly ["dashboard", "slideshow", "pdf", "custom"];
|
|
6
7
|
export type DataAppBuildTemplate = (typeof DATA_APP_BUILD_TEMPLATES)[number];
|
|
8
|
+
/** How a prior visualization's query travels in the brief; shared with the system prompt. */
|
|
9
|
+
export declare const DATA_APP_VIZ_LINE_FORMAT = "[viz title][explore; metrics; dimensions; filters; sort]";
|
|
7
10
|
export declare const TOOL_GENERATE_DATA_APP_DESCRIPTION: string;
|
|
8
11
|
export declare const toolGenerateDataAppArgsSchema: z.ZodObject<{
|
|
9
12
|
prompt: z.ZodString;
|
|
10
|
-
template: z.ZodNullable<z.ZodEnum<["dashboard", "slideshow", "pdf", "custom"]
|
|
11
|
-
dashboardSlug: z.ZodNullable<z.ZodString
|
|
12
|
-
chartSlugs: z.ZodNullable<z.ZodArray<z.ZodString, "many"
|
|
13
|
+
template: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<["dashboard", "slideshow", "pdf", "custom"]>>>>;
|
|
14
|
+
dashboardSlug: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
15
|
+
chartSlugs: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
|
|
13
16
|
}, "strip", z.ZodTypeAny, {
|
|
14
17
|
prompt: string;
|
|
15
18
|
template: "custom" | "dashboard" | "pdf" | "slideshow" | null;
|
|
@@ -17,9 +20,9 @@ export declare const toolGenerateDataAppArgsSchema: z.ZodObject<{
|
|
|
17
20
|
chartSlugs: string[] | null;
|
|
18
21
|
}, {
|
|
19
22
|
prompt: string;
|
|
20
|
-
template
|
|
21
|
-
dashboardSlug
|
|
22
|
-
chartSlugs
|
|
23
|
+
template?: "custom" | "dashboard" | "pdf" | "slideshow" | null | undefined;
|
|
24
|
+
dashboardSlug?: string | null | undefined;
|
|
25
|
+
chartSlugs?: string[] | null | undefined;
|
|
23
26
|
}>;
|
|
24
27
|
export declare const toolGenerateDataAppOutputSchema: z.ZodObject<{
|
|
25
28
|
result: z.ZodString;
|
|
@@ -114,17 +117,30 @@ export type ToolGenerateDataAppTerminalResult = {
|
|
|
114
117
|
status: 'pending';
|
|
115
118
|
}>;
|
|
116
119
|
};
|
|
117
|
-
|
|
120
|
+
export declare const isToolGenerateDataAppResult: <T extends {
|
|
118
121
|
toolType: string;
|
|
119
122
|
toolName: string;
|
|
120
|
-
metadata:
|
|
121
|
-
}
|
|
122
|
-
type ToolGenerateDataAppResult = ToolGenerateDataAppResultLike & {
|
|
123
|
+
metadata: unknown;
|
|
124
|
+
}>(result: T) => result is T & {
|
|
123
125
|
toolType: 'built-in';
|
|
124
|
-
toolName:
|
|
125
|
-
metadata:
|
|
126
|
+
toolName: "generateDataApp";
|
|
127
|
+
metadata: {
|
|
128
|
+
status: "pending";
|
|
129
|
+
appUuid: string;
|
|
130
|
+
version: number;
|
|
131
|
+
} | {
|
|
132
|
+
status: "success";
|
|
133
|
+
appUuid: string;
|
|
134
|
+
version: number;
|
|
135
|
+
name: string;
|
|
136
|
+
href: string;
|
|
137
|
+
} | {
|
|
138
|
+
status: "error";
|
|
139
|
+
appUuid: string | null;
|
|
140
|
+
reason: "cancelled" | "failed";
|
|
141
|
+
message: string;
|
|
142
|
+
};
|
|
126
143
|
};
|
|
127
|
-
export declare const isToolGenerateDataAppResult: <T extends ToolGenerateDataAppResultLike>(result: T) => result is T & ToolGenerateDataAppResult;
|
|
128
144
|
export declare const getDataAppBuilderPath: (projectUuid: string, appUuid: string) => string;
|
|
129
145
|
export declare const getGenerateDataAppBuildOutcome: ({ siteUrl, projectUuid, appUuid, version, name, status, error, statusMessage, }: {
|
|
130
146
|
siteUrl: string;
|
|
@@ -137,5 +153,4 @@ export declare const getGenerateDataAppBuildOutcome: ({ siteUrl, projectUuid, ap
|
|
|
137
153
|
statusMessage: string | null;
|
|
138
154
|
}) => ToolGenerateDataAppTerminalResult | null;
|
|
139
155
|
export declare const getExpiredGenerateDataAppBuildOutcome: (appUuid: string) => ToolGenerateDataAppTerminalResult;
|
|
140
|
-
export {};
|
|
141
156
|
//# sourceMappingURL=toolGenerateDataAppArgs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolGenerateDataAppArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAGH,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"toolGenerateDataAppArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAGH,KAAK,gBAAgB,EAExB,MAAM,qBAAqB,CAAC;AAG7B,kFAAkF;AAClF,eAAO,MAAM,kCAAkC,QAAiB,CAAC;AAEjE,8FAA8F;AAC9F,eAAO,MAAM,wBAAwB,sDAKU,CAAC;AAChD,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAA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1,38 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getExpiredGenerateDataAppBuildOutcome = exports.getGenerateDataAppBuildOutcome = exports.getDataAppBuilderPath = exports.isToolGenerateDataAppResult = exports.toolGenerateDataAppOutputSchema = exports.toolGenerateDataAppArgsSchema = exports.TOOL_GENERATE_DATA_APP_DESCRIPTION = exports.DATA_APP_BUILD_TEMPLATES = exports.AI_DATA_APP_BUILD_PENDING_GRACE_MS = void 0;
|
|
3
|
+
exports.getExpiredGenerateDataAppBuildOutcome = exports.getGenerateDataAppBuildOutcome = exports.getDataAppBuilderPath = exports.isToolGenerateDataAppResult = exports.toolGenerateDataAppOutputSchema = exports.toolGenerateDataAppArgsSchema = exports.TOOL_GENERATE_DATA_APP_DESCRIPTION = exports.DATA_APP_VIZ_LINE_FORMAT = exports.DATA_APP_BUILD_TEMPLATES = exports.AI_DATA_APP_BUILD_PENDING_GRACE_MS = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const types_1 = require("../../../apps/types");
|
|
6
|
+
const builtInToolResultGuard_1 = require("./builtInToolResultGuard");
|
|
6
7
|
/** Builds run minutes, not seconds: a pending result older than this is stale. */
|
|
7
8
|
exports.AI_DATA_APP_BUILD_PENDING_GRACE_MS = 30 * 60 * 1000;
|
|
9
|
+
/** Builder starter templates the AI agent may pick; the viz renderer template is internal. */
|
|
8
10
|
exports.DATA_APP_BUILD_TEMPLATES = [
|
|
9
11
|
'dashboard',
|
|
10
12
|
'slideshow',
|
|
11
13
|
'pdf',
|
|
12
14
|
'custom',
|
|
13
15
|
];
|
|
16
|
+
/** How a prior visualization's query travels in the brief; shared with the system prompt. */
|
|
17
|
+
exports.DATA_APP_VIZ_LINE_FORMAT = '[viz title][explore; metrics; dimensions; filters; sort]';
|
|
14
18
|
exports.TOOL_GENERATE_DATA_APP_DESCRIPTION = [
|
|
15
|
-
"Start building a data app — an interactive application generated from a
|
|
16
|
-
'Use it
|
|
17
|
-
'The build runs in the background for several minutes, so the call returns as soon as it has started (status: "pending").
|
|
19
|
+
"Start building a data app — an interactive application generated from a brief on top of this project's semantic layer.",
|
|
20
|
+
'Use it when the user asks to build, make, or generate a data app (or an app, slide show, or PDF report); questions, charts, dashboards, and other saved content have their own tools.',
|
|
21
|
+
'The build runs in the background for several minutes, so the call returns as soon as it has started (status: "pending"). One request, one call: tell the user the build has started and that you will link them to the app afterwards, then end your turn — never wait, poll, or call this tool again for the same request.',
|
|
18
22
|
'A later turn sees the outcome on this call\'s result: "success" carries the app name and the builder link (href) to share; "error" carries the failure message.',
|
|
19
23
|
].join(' ');
|
|
20
24
|
exports.toolGenerateDataAppArgsSchema = zod_1.z.object({
|
|
21
25
|
prompt: zod_1.z
|
|
22
26
|
.string()
|
|
23
|
-
.describe(
|
|
27
|
+
.describe(`A self-contained brief for the coding agent that builds the app: what the app shows, for whom, and how it behaves. Carry this thread's analysis in as a collection of visualizations — for each one, its title, a one-line description, and a metric query line \`${exports.DATA_APP_VIZ_LINE_FORMAT}\`. The coding agent sees the semantic layer but not this conversation, so include every detail it needs.`),
|
|
24
28
|
template: zod_1.z
|
|
25
29
|
.enum(exports.DATA_APP_BUILD_TEMPLATES)
|
|
26
|
-
.
|
|
27
|
-
.
|
|
30
|
+
.nullish()
|
|
31
|
+
.default(null)
|
|
32
|
+
.describe('Starter template the builder would use: "dashboard" for a dashboard-style app, "slideshow" for a slide show, "pdf" for a PDF report, "custom" for anything else. Omit when the user did not ask for one.'),
|
|
28
33
|
dashboardSlug: zod_1.z
|
|
29
34
|
.string()
|
|
30
|
-
.
|
|
31
|
-
.
|
|
35
|
+
.nullish()
|
|
36
|
+
.default(null)
|
|
37
|
+
.describe("Generate from an existing dashboard: its slug (from findContent). The app starts from the dashboard's layout and charts; the dashboard itself stays unchanged. Omit when not generating from a dashboard."),
|
|
32
38
|
chartSlugs: zod_1.z
|
|
33
39
|
.array(zod_1.z.string())
|
|
34
|
-
.
|
|
35
|
-
.
|
|
40
|
+
.nullish()
|
|
41
|
+
.default(null)
|
|
42
|
+
.describe('Saved charts (slugs from findContent) whose queries the app is built on; the charts themselves stay unchanged. Omit when not building on saved charts.'),
|
|
36
43
|
});
|
|
37
44
|
exports.toolGenerateDataAppOutputSchema = zod_1.z.object({
|
|
38
45
|
result: zod_1.z.string(),
|
|
@@ -58,11 +65,7 @@ exports.toolGenerateDataAppOutputSchema = zod_1.z.object({
|
|
|
58
65
|
}),
|
|
59
66
|
]),
|
|
60
67
|
});
|
|
61
|
-
|
|
62
|
-
result.toolName === 'generateDataApp' &&
|
|
63
|
-
exports.toolGenerateDataAppOutputSchema.shape.metadata.safeParse(result.metadata)
|
|
64
|
-
.success;
|
|
65
|
-
exports.isToolGenerateDataAppResult = isToolGenerateDataAppResult;
|
|
68
|
+
exports.isToolGenerateDataAppResult = (0, builtInToolResultGuard_1.makeBuiltInToolResultGuard)('generateDataApp', exports.toolGenerateDataAppOutputSchema.shape.metadata);
|
|
66
69
|
const getDataAppBuilderPath = (projectUuid, appUuid) => `/projects/${projectUuid}/apps/${appUuid}`;
|
|
67
70
|
exports.getDataAppBuilderPath = getDataAppBuilderPath;
|
|
68
71
|
// Terminal tool result for a version, or null while still building. Shared by
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolGenerateDataAppArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,+
|
|
1
|
+
{"version":3,"file":"toolGenerateDataAppArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,+CAK6B;AAC7B,qEAAsE;AAEtE,kFAAkF;AACrE,QAAA,kCAAkC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEjE,8FAA8F;AACjF,QAAA,wBAAwB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E,iBAAiB,IAAI,uEAAuE,IAAI,EAAE;YAC1G,QAAQ,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE;SAChE,CAAC;IACN,CAAC;IACD,MAAM,SAAS,GAAG,KAAK,KAAK,qCAA6B,CAAC;IAC1D,MAAM,OAAO,GAAG,SAAS;QACrB,CAAC,CAAC,0BAA0B;QAC5B,CAAC,CAAC,CAAC,aAAa,IAAI,mBAAmB,CAAC,CAAC;IAC7C,OAAO;QACH,MAAM,EAAE,sCAAsC,OAAO,EAAE;QACvD,QAAQ,EAAE;YACN,MAAM,EAAE,OAAO;YACf,OAAO;YACP,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ;YAC1C,OAAO;SACV;KACJ,CAAC;AACN,CAAC,CAAC;AA3CW,QAAA,8BAA8B,GAA9B,8BAA8B,CA2CzC;AAEK,MAAM,qCAAqC,GAAG,CACjD,OAAe,EACkB,EAAE;IACnC,MAAM,OAAO,GAAG,8CACZ,QAAA,kCAAkC,GAAG,KACzC,WAAW,CAAC;IACZ,OAAO;QACH,MAAM,EAAE,sCAAsC,OAAO,EAAE;QACvD,QAAQ,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE;KACpE,CAAC;AACN,CAAC,CAAC;AAVW,QAAA,qCAAqC,GAArC,qCAAqC,CAUhD"}
|
|
@@ -38,16 +38,18 @@ export declare const toolSetupPreviewDeployOutputSchema: z.ZodObject<{
|
|
|
38
38
|
}>;
|
|
39
39
|
export type ToolSetupPreviewDeployArgs = z.infer<typeof toolSetupPreviewDeployArgsSchema>;
|
|
40
40
|
export type ToolSetupPreviewDeployOutput = z.infer<typeof toolSetupPreviewDeployOutputSchema>;
|
|
41
|
-
|
|
41
|
+
export declare const isToolSetupPreviewDeployResult: <T extends {
|
|
42
42
|
toolType: string;
|
|
43
43
|
toolName: string;
|
|
44
|
-
metadata:
|
|
45
|
-
}
|
|
46
|
-
type ToolSetupPreviewDeployResult = ToolSetupPreviewDeployResultLike & {
|
|
44
|
+
metadata: unknown;
|
|
45
|
+
}>(result: T) => result is T & {
|
|
47
46
|
toolType: 'built-in';
|
|
48
|
-
toolName:
|
|
49
|
-
metadata:
|
|
47
|
+
toolName: "setupPreviewDeploy";
|
|
48
|
+
metadata: {
|
|
49
|
+
status: "success";
|
|
50
|
+
prUrl: string | null;
|
|
51
|
+
} | {
|
|
52
|
+
status: "error";
|
|
53
|
+
};
|
|
50
54
|
};
|
|
51
|
-
export declare const isToolSetupPreviewDeployResult: <T extends ToolSetupPreviewDeployResultLike>(result: T) => result is T & ToolSetupPreviewDeployResult;
|
|
52
|
-
export {};
|
|
53
55
|
//# sourceMappingURL=toolSetupPreviewDeployArgs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolSetupPreviewDeployArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolSetupPreviewDeployArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"toolSetupPreviewDeployArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolSetupPreviewDeployArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,qCAAqC,QAKvC,CAAC;AAEZ,eAAO,MAAM,gCAAgC,gDAAe,CAAC;AAE7D,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW7C,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,gCAAgC,CAC1C,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,kCAAkC,CAC5C,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;CAG1C,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isToolSetupPreviewDeployResult = exports.toolSetupPreviewDeployOutputSchema = exports.toolSetupPreviewDeployArgsSchema = exports.TOOL_SETUP_PREVIEW_DEPLOY_DESCRIPTION = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const builtInToolResultGuard_1 = require("./builtInToolResultGuard");
|
|
5
6
|
exports.TOOL_SETUP_PREVIEW_DEPLOY_DESCRIPTION = [
|
|
6
7
|
'Open a pull request that sets up Lightdash preview-project deploys for this project via GitHub Actions.',
|
|
7
8
|
'Call this whenever the user wants to add Lightdash preview deploys — EITHER when they accept the offer surfaced by editDbtProject, OR when they ask directly (e.g. "set up preview deploys", "add the Lightdash preview GitHub Action", "deploy a preview project for each PR"). A prior writeback or offer is NOT required.',
|
|
@@ -21,9 +22,5 @@ exports.toolSetupPreviewDeployOutputSchema = zod_1.z.object({
|
|
|
21
22
|
}),
|
|
22
23
|
]),
|
|
23
24
|
});
|
|
24
|
-
|
|
25
|
-
result.toolName === 'setupPreviewDeploy' &&
|
|
26
|
-
exports.toolSetupPreviewDeployOutputSchema.shape.metadata.safeParse(result.metadata)
|
|
27
|
-
.success;
|
|
28
|
-
exports.isToolSetupPreviewDeployResult = isToolSetupPreviewDeployResult;
|
|
25
|
+
exports.isToolSetupPreviewDeployResult = (0, builtInToolResultGuard_1.makeBuiltInToolResultGuard)('setupPreviewDeploy', exports.toolSetupPreviewDeployOutputSchema.shape.metadata);
|
|
29
26
|
//# sourceMappingURL=toolSetupPreviewDeployArgs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolSetupPreviewDeployArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolSetupPreviewDeployArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;
|
|
1
|
+
{"version":3,"file":"toolSetupPreviewDeployArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolSetupPreviewDeployArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qEAAsE;AAEzD,QAAA,qCAAqC,GAAG;IACjD,yGAAyG;IACzG,8TAA8T;IAC9T,wJAAwJ;IACxJ,qJAAqJ;CACxJ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEC,QAAA,gCAAgC,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEhD,QAAA,kCAAkC,GAAG,OAAC,CAAC,MAAM,CAAC;IACvD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,OAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;QACrC,OAAC,CAAC,MAAM,CAAC;YACL,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC;YAC5B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC/B,CAAC;QACF,OAAC,CAAC,MAAM,CAAC;YACL,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC;SAC7B,CAAC;KACL,CAAC;CACL,CAAC,CAAC;AAUU,QAAA,8BAA8B,GAAG,IAAA,mDAA0B,EACpE,oBAAoB,EACpB,QAAA,kCAAkC,CAAC,KAAK,CAAC,QAAQ,CACpD,CAAC"}
|