@lightdash/common 2.273.0 → 2.274.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.
Files changed (100) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/ee/AiAgent/chartConfig/web/getWebAiChartConfig.d.ts +25 -25
  3. package/dist/cjs/ee/AiAgent/schemas/tools/index.d.ts +1 -0
  4. package/dist/cjs/ee/AiAgent/schemas/tools/index.d.ts.map +1 -1
  5. package/dist/cjs/ee/AiAgent/schemas/tools/index.js +1 -0
  6. package/dist/cjs/ee/AiAgent/schemas/tools/index.js.map +1 -1
  7. package/dist/cjs/ee/AiAgent/schemas/tools/toolDefinitions.d.ts +7 -5
  8. package/dist/cjs/ee/AiAgent/schemas/tools/toolDefinitions.d.ts.map +1 -1
  9. package/dist/cjs/ee/AiAgent/schemas/tools/toolDefinitions.js +43 -7
  10. package/dist/cjs/ee/AiAgent/schemas/tools/toolDefinitions.js.map +1 -1
  11. package/dist/cjs/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.d.ts +17 -1
  12. package/dist/cjs/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.d.ts.map +1 -1
  13. package/dist/cjs/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.js +50 -3
  14. package/dist/cjs/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.js.map +1 -1
  15. package/dist/cjs/ee/AiAgent/schemas/tools/toolGetDataAppBuildStatusArgs.d.ts +43 -0
  16. package/dist/cjs/ee/AiAgent/schemas/tools/toolGetDataAppBuildStatusArgs.d.ts.map +1 -0
  17. package/dist/cjs/ee/AiAgent/schemas/tools/toolGetDataAppBuildStatusArgs.js +122 -0
  18. package/dist/cjs/ee/AiAgent/schemas/tools/toolGetDataAppBuildStatusArgs.js.map +1 -0
  19. package/dist/cjs/ee/AiAgent/schemas/tools/toolIterateDataAppArgs.d.ts +3 -0
  20. package/dist/cjs/ee/AiAgent/schemas/tools/toolIterateDataAppArgs.d.ts.map +1 -1
  21. package/dist/cjs/ee/AiAgent/schemas/tools/toolIterateDataAppArgs.js +24 -2
  22. package/dist/cjs/ee/AiAgent/schemas/tools/toolIterateDataAppArgs.js.map +1 -1
  23. package/dist/cjs/ee/AiAgent/schemas/tools/toolListDataAppThemesArgs.d.ts +10 -0
  24. package/dist/cjs/ee/AiAgent/schemas/tools/toolListDataAppThemesArgs.d.ts.map +1 -1
  25. package/dist/cjs/ee/AiAgent/schemas/tools/toolListDataAppThemesArgs.js +41 -1
  26. package/dist/cjs/ee/AiAgent/schemas/tools/toolListDataAppThemesArgs.js.map +1 -1
  27. package/dist/cjs/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts +50 -50
  28. package/dist/cjs/ee/AiAgent/utils.d.ts +28 -28
  29. package/dist/cjs/ee/apps/types.d.ts +1 -1
  30. package/dist/cjs/ee/apps/types.d.ts.map +1 -1
  31. package/dist/cjs/ee/apps/types.js +1 -0
  32. package/dist/cjs/ee/apps/types.js.map +1 -1
  33. package/dist/cjs/schemas/json/mcp-tools-1.0.json +340 -0
  34. package/dist/esm/.tsbuildinfo +1 -1
  35. package/dist/esm/ee/AiAgent/chartConfig/web/getWebAiChartConfig.d.ts +28 -28
  36. package/dist/esm/ee/AiAgent/schemas/tools/index.d.ts +1 -0
  37. package/dist/esm/ee/AiAgent/schemas/tools/index.d.ts.map +1 -1
  38. package/dist/esm/ee/AiAgent/schemas/tools/index.js +1 -0
  39. package/dist/esm/ee/AiAgent/schemas/tools/index.js.map +1 -1
  40. package/dist/esm/ee/AiAgent/schemas/tools/toolDefinitions.d.ts +7 -5
  41. package/dist/esm/ee/AiAgent/schemas/tools/toolDefinitions.d.ts.map +1 -1
  42. package/dist/esm/ee/AiAgent/schemas/tools/toolDefinitions.js +45 -9
  43. package/dist/esm/ee/AiAgent/schemas/tools/toolDefinitions.js.map +1 -1
  44. package/dist/esm/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.d.ts +17 -1
  45. package/dist/esm/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.d.ts.map +1 -1
  46. package/dist/esm/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.js +49 -2
  47. package/dist/esm/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.js.map +1 -1
  48. package/dist/esm/ee/AiAgent/schemas/tools/toolGetDataAppBuildStatusArgs.d.ts +43 -0
  49. package/dist/esm/ee/AiAgent/schemas/tools/toolGetDataAppBuildStatusArgs.d.ts.map +1 -0
  50. package/dist/esm/ee/AiAgent/schemas/tools/toolGetDataAppBuildStatusArgs.js +118 -0
  51. package/dist/esm/ee/AiAgent/schemas/tools/toolGetDataAppBuildStatusArgs.js.map +1 -0
  52. package/dist/esm/ee/AiAgent/schemas/tools/toolIterateDataAppArgs.d.ts +3 -0
  53. package/dist/esm/ee/AiAgent/schemas/tools/toolIterateDataAppArgs.d.ts.map +1 -1
  54. package/dist/esm/ee/AiAgent/schemas/tools/toolIterateDataAppArgs.js +24 -2
  55. package/dist/esm/ee/AiAgent/schemas/tools/toolIterateDataAppArgs.js.map +1 -1
  56. package/dist/esm/ee/AiAgent/schemas/tools/toolListDataAppThemesArgs.d.ts +10 -0
  57. package/dist/esm/ee/AiAgent/schemas/tools/toolListDataAppThemesArgs.d.ts.map +1 -1
  58. package/dist/esm/ee/AiAgent/schemas/tools/toolListDataAppThemesArgs.js +40 -0
  59. package/dist/esm/ee/AiAgent/schemas/tools/toolListDataAppThemesArgs.js.map +1 -1
  60. package/dist/esm/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts +50 -50
  61. package/dist/esm/ee/AiAgent/utils.d.ts +13 -13
  62. package/dist/esm/ee/apps/types.d.ts +1 -1
  63. package/dist/esm/ee/apps/types.d.ts.map +1 -1
  64. package/dist/esm/ee/apps/types.js +1 -0
  65. package/dist/esm/ee/apps/types.js.map +1 -1
  66. package/dist/esm/schemas/json/mcp-tools-1.0.json +340 -0
  67. package/dist/types/.tsbuildinfo +1 -1
  68. package/dist/types/ee/AiAgent/chartConfig/web/getWebAiChartConfig.d.ts +28 -28
  69. package/dist/types/ee/AiAgent/schemas/tools/index.d.ts +1 -0
  70. package/dist/types/ee/AiAgent/schemas/tools/index.d.ts.map +1 -1
  71. package/dist/types/ee/AiAgent/schemas/tools/index.js +1 -0
  72. package/dist/types/ee/AiAgent/schemas/tools/index.js.map +1 -1
  73. package/dist/types/ee/AiAgent/schemas/tools/toolDefinitions.d.ts +7 -5
  74. package/dist/types/ee/AiAgent/schemas/tools/toolDefinitions.d.ts.map +1 -1
  75. package/dist/types/ee/AiAgent/schemas/tools/toolDefinitions.js +45 -9
  76. package/dist/types/ee/AiAgent/schemas/tools/toolDefinitions.js.map +1 -1
  77. package/dist/types/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.d.ts +17 -1
  78. package/dist/types/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.d.ts.map +1 -1
  79. package/dist/types/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.js +49 -2
  80. package/dist/types/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.js.map +1 -1
  81. package/dist/types/ee/AiAgent/schemas/tools/toolGetDataAppBuildStatusArgs.d.ts +43 -0
  82. package/dist/types/ee/AiAgent/schemas/tools/toolGetDataAppBuildStatusArgs.d.ts.map +1 -0
  83. package/dist/types/ee/AiAgent/schemas/tools/toolGetDataAppBuildStatusArgs.js +118 -0
  84. package/dist/types/ee/AiAgent/schemas/tools/toolGetDataAppBuildStatusArgs.js.map +1 -0
  85. package/dist/types/ee/AiAgent/schemas/tools/toolIterateDataAppArgs.d.ts +3 -0
  86. package/dist/types/ee/AiAgent/schemas/tools/toolIterateDataAppArgs.d.ts.map +1 -1
  87. package/dist/types/ee/AiAgent/schemas/tools/toolIterateDataAppArgs.js +24 -2
  88. package/dist/types/ee/AiAgent/schemas/tools/toolIterateDataAppArgs.js.map +1 -1
  89. package/dist/types/ee/AiAgent/schemas/tools/toolListDataAppThemesArgs.d.ts +10 -0
  90. package/dist/types/ee/AiAgent/schemas/tools/toolListDataAppThemesArgs.d.ts.map +1 -1
  91. package/dist/types/ee/AiAgent/schemas/tools/toolListDataAppThemesArgs.js +40 -0
  92. package/dist/types/ee/AiAgent/schemas/tools/toolListDataAppThemesArgs.js.map +1 -1
  93. package/dist/types/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts +50 -50
  94. package/dist/types/ee/AiAgent/utils.d.ts +13 -13
  95. package/dist/types/ee/apps/types.d.ts +1 -1
  96. package/dist/types/ee/apps/types.d.ts.map +1 -1
  97. package/dist/types/ee/apps/types.js +1 -0
  98. package/dist/types/ee/apps/types.js.map +1 -1
  99. package/dist/types/schemas/json/mcp-tools-1.0.json +340 -0
  100. package/package.json +1 -1
@@ -1,9 +1,11 @@
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_THEME_SLUG_DESCRIPTION = exports.DATA_APP_VIZ_LINE_FORMAT = 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.mcpDataAppBuildStartedOutputSchema = exports.MCP_TOOL_GENERATE_DATA_APP_DESCRIPTION = exports.MCP_DATA_APP_PLACEMENT_GUIDANCE = exports.MCP_DATA_APP_AGENT_SCOPE_GUIDANCE = exports.TOOL_GENERATE_DATA_APP_DESCRIPTION = exports.DATA_APP_THEME_SLUG_DESCRIPTION = exports.DATA_APP_VIZ_LINE_FORMAT = exports.DATA_APP_BUILD_TEMPLATES = exports.AI_DATA_APP_BUILD_PENDING_GRACE_MS = exports.DATA_APP_BUILD_POLL_INTERVAL_MS = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const types_1 = require("../../../apps/types");
6
6
  const builtInToolResultGuard_1 = require("./builtInToolResultGuard");
7
+ /** Suggested gap between build status polls; a build runs minutes, not seconds. */
8
+ exports.DATA_APP_BUILD_POLL_INTERVAL_MS = 15000;
7
9
  /** Builds run minutes, not seconds: a pending result older than this is stale. */
8
10
  exports.AI_DATA_APP_BUILD_PENDING_GRACE_MS = 30 * 60 * 1000;
9
11
  /** Builder starter templates the AI agent may pick; the viz renderer template is internal. */
@@ -21,9 +23,51 @@ exports.TOOL_GENERATE_DATA_APP_DESCRIPTION = [
21
23
  "Start building a new data app — an interactive application generated from a brief on top of this project's semantic layer.",
22
24
  '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.',
23
25
  'This tool always creates a new app: to change an app that already exists, use iterateDataApp instead.',
24
- 'The build runs in the background for several minutes, so the call returns as soon as it has started (status: "pending") and the outcome lands on this result for a later turn. One request, one call — never wait, poll, or call this tool again for the same request.',
26
+ 'Name the app yourself: the name fixes both the app name and its slug at creation, and neither changes afterwards.',
27
+ 'The build runs in the background for several minutes, so the call returns as soon as it has started (status: "pending") and the outcome lands on this result for a later turn. One request, one call — never wait, poll, or call this tool again for the same request: tell the user the build has started and end your turn.',
25
28
  ].join(' ');
29
+ /** Why a scoped session loses sight of a personal app; shared by every MCP build tool. */
30
+ exports.MCP_DATA_APP_AGENT_SCOPE_GUIDANCE = '- An agent-scoped session restricted to specific spaces cannot read a personal app. Call this tool and get_data_app_build_status without agentUuid to build and poll an app you own.';
31
+ /** Placement every MCP-started build shares; stated on each start tool. */
32
+ exports.MCP_DATA_APP_PLACEMENT_GUIDANCE = [
33
+ "- The app is created as the calling user's personal app: at the project root, in no space, visible only to them until they move it.",
34
+ exports.MCP_DATA_APP_AGENT_SCOPE_GUIDANCE,
35
+ ].join('\n');
36
+ exports.MCP_TOOL_GENERATE_DATA_APP_DESCRIPTION = `Tool: generate_data_app
37
+
38
+ Purpose:
39
+ Start building a new data app: an interactive application generated from a brief on top of a Lightdash project's semantic layer. Each build produces one version of the app. Charts, dashboards, and other saved content have their own tools.
40
+
41
+ Important:
42
+ - You name the app. The name fixes both the app's name and its slug at creation, and neither changes afterwards. A name already taken in the project gets a numeric suffix on the slug, so identify the app by the slug this call returns, never one you derived from the name.
43
+ - The build runs in the background for several minutes. This call returns as soon as the build has started. Poll get_data_app_build_status with the returned slug every ${exports.DATA_APP_BUILD_POLL_INTERVAL_MS / 1000} seconds until its status is "ready", "error", or "cancelled". Call this tool once per request.
44
+ ${exports.MCP_DATA_APP_PLACEMENT_GUIDANCE}
45
+ - An unknown themeSlug fails before the build starts and lists the valid slugs. Call list_data_app_themes when the user names a theme, brand, or look.
46
+
47
+ Response shape (MCP CallToolResult):
48
+ - content: [{ type: "text", text: "<confirmation that the build started>" }]
49
+ - structuredContent: {
50
+ slug: string, // the app's permanent slug; pass it to get_data_app_build_status
51
+ version: number // the version of the app this build produces
52
+ }
53
+
54
+ Errors: an unknown themeSlug, dashboardSlug, or chartSlug returns an error and starts no build.
55
+ `;
56
+ /** What a started build reports at the MCP surface; the app uuid stays internal. */
57
+ exports.mcpDataAppBuildStartedOutputSchema = zod_1.z.object({
58
+ slug: zod_1.z
59
+ .string()
60
+ .describe("The app's permanent slug. Poll get_data_app_build_status with it."),
61
+ version: zod_1.z
62
+ .number()
63
+ .int()
64
+ .positive()
65
+ .describe('The version of the app this build produces.'),
66
+ });
26
67
  exports.toolGenerateDataAppArgsSchema = zod_1.z.object({
68
+ name: zod_1.z
69
+ .string()
70
+ .describe('Display name for the app: a headline-short title, in title case, naming what the app shows ("Revenue Overview"). The app\'s slug is derived from it at creation, so treat the name as final — it is not renamed later.'),
27
71
  prompt: zod_1.z
28
72
  .string()
29
73
  .describe(`A self-contained brief for the coding agent that builds the app: what the app shows, for whom, and how it behaves. The coding agent explores the semantic layer itself but sees neither this conversation nor its query results: when this thread has already settled the analysis, carry it over — for each visualization, its title, a one-line description, and a metric query line \`${exports.DATA_APP_VIZ_LINE_FORMAT}\` — as queries, never pasted numbers, which would be hardcoded into the app.`),
@@ -55,6 +99,9 @@ exports.toolGenerateDataAppOutputSchema = zod_1.z.object({
55
99
  status: zod_1.z.literal('pending'),
56
100
  appUuid: zod_1.z.string(),
57
101
  version: zod_1.z.number(),
102
+ // Nullish: iterate results and results persisted before generate
103
+ // took a name lack it.
104
+ name: zod_1.z.string().nullish(),
58
105
  }),
59
106
  zod_1.z.object({
60
107
  status: zod_1.z.literal('success'),
@@ -75,7 +122,7 @@ exports.toolGenerateDataAppOutputSchema = zod_1.z.object({
75
122
  ]),
76
123
  });
77
124
  exports.isToolGenerateDataAppResult = (0, builtInToolResultGuard_1.makeBuiltInToolResultGuard)('generateDataApp', exports.toolGenerateDataAppOutputSchema.shape.metadata);
78
- const getDataAppBuilderPath = (projectUuid, appUuid) => `/projects/${projectUuid}/apps/${appUuid}`;
125
+ const getDataAppBuilderPath = (projectUuid, appUuidOrSlug) => `/projects/${projectUuid}/apps/${appUuidOrSlug}`;
79
126
  exports.getDataAppBuilderPath = getDataAppBuilderPath;
80
127
  // Terminal tool result for a version, or null while still building. Shared by
81
128
  // the worker patch and the thread-read self-heal.
@@ -1 +1 @@
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,GAAG;IACpC,WAAW;IACX,WAAW;IACX,KAAK;IACL,QAAQ;CACmC,C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AVW,QAAA,qCAAqC,GAArC,qCAAqC,CAUhD"}
1
+ {"version":3,"file":"toolGenerateDataAppArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolGenerateDataAppArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,+CAK6B;AAC7B,qEAAsE;AAEtE,mFAAmF;AACtE,QAAA,+BAA+B,GAAG,KAAM,CAAC;AAEtD,kFAAkF;AACrE,QAAA,kCAAkC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEjE,8FAA8F;AACjF,QAAA,wBAAwB,GAAG;IACpC,WAAW;IACX,WAAW;IACX,KAAK;IACL,QAAQ;CACmC,CAAC;AAGhD,6FAA6F;AAChF,QAAA,wBAAwB,GACjC,0DAA0D,CAAC;AAE/D,0HAA0H;AAC7G,QAAA,+BAA+B,GACxC,+PAA+P,CAAC;AAEvP,QAAA,kCAAkC,GAAG;IAC9C,4HAA4H;IAC5H,uLAAuL;IACvL,uGAAuG;IACvG,mHAAmH;IACnH,+TAA+T;CAClU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,0FAA0F;AAC7E,QAAA,iCAAiC,GAC1C,sLAAsL,CAAC;AAE3L,2EAA2E;AAC9D,QAAA,+BAA+B,GAAG;IAC3C,qIAAqI;IACrI,QAAA,iCAAiC;CACpC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEA,QAAA,sCAAsC,GAAG;;;;;;;0KAQlD,QAAA,+BAA+B,GAAG,IACtC;EACE,QAAA,+BAA+B;;;;;;;;;;;CAWhC,CAAC;AAEF,oFAAoF;AACvE,QAAA,kCAAkC,GAAG,OAAC,CAAC,MAAM,CAAC;IACvD,IAAI,EAAE,OAAC;SACF,MAAM,EAAE;SACR,QAAQ,CACL,mEAAmE,CACtE;IACL,OAAO,EAAE,OAAC;SACL,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,EAAE;SACV,QAAQ,CAAC,6CAA6C,CAA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+ import { z } from 'zod';
2
+ import { type AppVersionStatus } from '../../../apps/types';
3
+ export declare const DATA_APP_BUILD_STATUSES: readonly ["pending", "sandbox", "catalog", "generating", "building", "packaging", "ready", "error", "cancelled"];
4
+ export type DataAppBuildStatus = (typeof DATA_APP_BUILD_STATUSES)[number];
5
+ export declare const MCP_TOOL_GET_DATA_APP_BUILD_STATUS_DESCRIPTION = "Tool: get_data_app_build_status\n\nPurpose:\nCheck how a data app build is going, and get the app's URL once it is ready. A data app is an interactive application generated from a brief on top of a Lightdash project's semantic layer; each build produces one version of it.\n\nImportant:\n- Poll every 15 seconds \u2014 \"nextPollAfterMs\" in the response carries the same number in milliseconds. A build usually takes several minutes.\n- Stop polling once \"status\" is \"ready\", \"error\", or \"cancelled\". Those are terminal; the version never changes again.\n- \"slug\" is the app's permanent identifier and never changes, even when the app is renamed. Keep using the slug you started the build with.\n- An agent-scoped session restricted to specific spaces cannot read a personal app, which is what a build started over MCP creates. Call this tool without agentUuid to poll a build you started.\n\nParameters:\n- appSlug: The app's slug, as returned when the build started.\n- version: Which version of the app to report on. Omit it for the latest version, which is the one a build you just started produces.\n\nResponse shape (MCP CallToolResult):\n- content: [{ type: \"text\", text: \"<human-readable status summary>\" }]\n- structuredContent: {\n status: string, // \"pending\" | \"sandbox\" | \"catalog\" | \"generating\" | \"building\" | \"packaging\" | \"ready\" | \"error\" | \"cancelled\"\n statusMessage: string, // short line describing what the build is doing, or how it ended\n errorMessage: string | null, // why the build failed, set only when status is \"error\"\n name: string, // the app's name\n slug: string, // the app's permanent slug\n href: string, // URL to open the app in Lightdash\n nextPollAfterMs: number // how long to wait before polling again\n }\n\nErrors: an unknown slug, or an app or version this caller may not view, returns an error rather than a status.\n";
6
+ export declare const mcpGetDataAppBuildStatusArgsSchema: z.ZodObject<{
7
+ appSlug: z.ZodString;
8
+ version: z.ZodOptional<z.ZodNumber>;
9
+ }, z.core.$strip>;
10
+ export type McpGetDataAppBuildStatusArgs = z.infer<typeof mcpGetDataAppBuildStatusArgsSchema>;
11
+ export declare const mcpGetDataAppBuildStatusStructuredOutputSchema: z.ZodObject<{
12
+ status: z.ZodEnum<{
13
+ building: "building";
14
+ cancelled: "cancelled";
15
+ catalog: "catalog";
16
+ error: "error";
17
+ generating: "generating";
18
+ packaging: "packaging";
19
+ pending: "pending";
20
+ ready: "ready";
21
+ sandbox: "sandbox";
22
+ }>;
23
+ statusMessage: z.ZodString;
24
+ errorMessage: z.ZodNullable<z.ZodString>;
25
+ name: z.ZodString;
26
+ slug: z.ZodString;
27
+ href: z.ZodString;
28
+ nextPollAfterMs: z.ZodNumber;
29
+ }, z.core.$strip>;
30
+ export type DataAppBuildStatusResponse = z.infer<typeof mcpGetDataAppBuildStatusStructuredOutputSchema>;
31
+ /** Version row -> the status a caller polls for. */
32
+ export declare const getDataAppBuildStatusResponse: ({ siteUrl, projectUuid, appUuid, version, name, slug, status, error, statusMessage, }: {
33
+ siteUrl: string;
34
+ projectUuid: string;
35
+ appUuid: string;
36
+ version: number;
37
+ name: string;
38
+ slug: string;
39
+ status: AppVersionStatus;
40
+ error: string | null;
41
+ statusMessage: string | null;
42
+ }) => DataAppBuildStatusResponse;
43
+ //# sourceMappingURL=toolGetDataAppBuildStatusArgs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolGetDataAppBuildStatusArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolGetDataAppBuildStatusArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAIH,KAAK,gBAAgB,EACxB,MAAM,qBAAqB,CAAC;AAQ7B,eAAO,MAAM,uBAAuB,kHAI1B,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAY1E,eAAO,MAAM,8CAA8C,k+DA8B1D,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;iBAa7C,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,kCAAkC,CAC5C,CAAC;AAEF,eAAO,MAAM,8CAA8C;;;;;;;;;;;;;;;;;;iBAyBzD,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8CAA8C,CACxD,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,6BAA6B,0FAUvC;IACC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC,KAAG,0BAsCH,CAAC"}
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getDataAppBuildStatusResponse = exports.mcpGetDataAppBuildStatusStructuredOutputSchema = exports.mcpGetDataAppBuildStatusArgsSchema = exports.MCP_TOOL_GET_DATA_APP_BUILD_STATUS_DESCRIPTION = exports.DATA_APP_BUILD_STATUSES = void 0;
4
+ const zod_1 = require("zod");
5
+ const types_1 = require("../../../apps/types");
6
+ const toolGenerateDataAppArgs_1 = require("./toolGenerateDataAppArgs");
7
+ // The pipeline has no 'cancelled' status — it is an 'error' row carrying
8
+ // APP_VERSION_CANCELLED_BY_USER — so the tool reports it as its own value.
9
+ exports.DATA_APP_BUILD_STATUSES = [
10
+ ...types_1.APP_VERSION_STAGE_ORDER,
11
+ 'error',
12
+ 'cancelled',
13
+ ];
14
+ const STAGE_STATUS_MESSAGES = {
15
+ pending: 'The build is queued.',
16
+ sandbox: 'Preparing the build sandbox.',
17
+ catalog: 'Reading the project semantic layer.',
18
+ generating: 'Writing the app.',
19
+ building: 'Building the app.',
20
+ packaging: 'Packaging the app.',
21
+ ready: 'The app is ready.',
22
+ };
23
+ exports.MCP_TOOL_GET_DATA_APP_BUILD_STATUS_DESCRIPTION = `Tool: get_data_app_build_status
24
+
25
+ Purpose:
26
+ Check how a data app build is going, and get the app's URL once it is ready. A data app is an interactive application generated from a brief on top of a Lightdash project's semantic layer; each build produces one version of it.
27
+
28
+ Important:
29
+ - Poll every ${toolGenerateDataAppArgs_1.DATA_APP_BUILD_POLL_INTERVAL_MS / 1000} seconds — "nextPollAfterMs" in the response carries the same number in milliseconds. A build usually takes several minutes.
30
+ - Stop polling once "status" is "ready", "error", or "cancelled". Those are terminal; the version never changes again.
31
+ - "slug" is the app's permanent identifier and never changes, even when the app is renamed. Keep using the slug you started the build with.
32
+ - An agent-scoped session restricted to specific spaces cannot read a personal app, which is what a build started over MCP creates. Call this tool without agentUuid to poll a build you started.
33
+
34
+ Parameters:
35
+ - appSlug: The app's slug, as returned when the build started.
36
+ - version: Which version of the app to report on. Omit it for the latest version, which is the one a build you just started produces.
37
+
38
+ Response shape (MCP CallToolResult):
39
+ - content: [{ type: "text", text: "<human-readable status summary>" }]
40
+ - structuredContent: {
41
+ status: string, // "pending" | "sandbox" | "catalog" | "generating" | "building" | "packaging" | "ready" | "error" | "cancelled"
42
+ statusMessage: string, // short line describing what the build is doing, or how it ended
43
+ errorMessage: string | null, // why the build failed, set only when status is "error"
44
+ name: string, // the app's name
45
+ slug: string, // the app's permanent slug
46
+ href: string, // URL to open the app in Lightdash
47
+ nextPollAfterMs: number // how long to wait before polling again
48
+ }
49
+
50
+ Errors: an unknown slug, or an app or version this caller may not view, returns an error rather than a status.
51
+ `;
52
+ exports.mcpGetDataAppBuildStatusArgsSchema = zod_1.z.object({
53
+ appSlug: zod_1.z
54
+ .string()
55
+ .min(1)
56
+ .describe("The data app's slug, as returned when the build started."),
57
+ version: zod_1.z
58
+ .number()
59
+ .int()
60
+ .positive()
61
+ .optional()
62
+ .describe('Which version of the app to report on. Omit for the latest version — the one a build you just started produces.'),
63
+ });
64
+ exports.mcpGetDataAppBuildStatusStructuredOutputSchema = zod_1.z.object({
65
+ status: zod_1.z
66
+ .enum(exports.DATA_APP_BUILD_STATUSES)
67
+ .describe('Pipeline stage the build has reached, or a terminal outcome: "ready", "error", or "cancelled".'),
68
+ statusMessage: zod_1.z
69
+ .string()
70
+ .describe('Short line describing what the build is doing, or how it ended.'),
71
+ errorMessage: zod_1.z
72
+ .string()
73
+ .nullable()
74
+ .describe('Why the build failed. Set only when status is "error".'),
75
+ name: zod_1.z.string().describe("The app's name."),
76
+ slug: zod_1.z.string().describe("The app's permanent slug; it never changes."),
77
+ href: zod_1.z.string().describe('URL to open the app in Lightdash.'),
78
+ nextPollAfterMs: zod_1.z
79
+ .number()
80
+ .int()
81
+ .positive()
82
+ .describe('How long to wait before polling again. Stop polling on a terminal status.'),
83
+ });
84
+ /** Version row -> the status a caller polls for. */
85
+ const getDataAppBuildStatusResponse = ({ siteUrl, projectUuid, appUuid, version, name, slug, status, error, statusMessage, }) => {
86
+ const displayName = (0, types_1.getAppDisplayName)(name, appUuid);
87
+ const common = {
88
+ name: displayName,
89
+ slug,
90
+ href: `${siteUrl}${(0, toolGenerateDataAppArgs_1.getDataAppBuilderPath)(projectUuid, slug)}`,
91
+ nextPollAfterMs: toolGenerateDataAppArgs_1.DATA_APP_BUILD_POLL_INTERVAL_MS,
92
+ };
93
+ if (status !== 'error') {
94
+ return {
95
+ ...common,
96
+ status,
97
+ statusMessage: status === 'ready'
98
+ ? `${version === 1
99
+ ? `The data app "${displayName}"`
100
+ : `Version ${version} of the data app "${displayName}"`} is ready.`
101
+ : (statusMessage ?? STAGE_STATUS_MESSAGES[status]),
102
+ errorMessage: null,
103
+ };
104
+ }
105
+ if (error === types_1.APP_VERSION_CANCELLED_BY_USER) {
106
+ return {
107
+ ...common,
108
+ status: 'cancelled',
109
+ statusMessage: 'The build was cancelled.',
110
+ errorMessage: null,
111
+ };
112
+ }
113
+ const failure = error ?? statusMessage ?? 'The build failed.';
114
+ return {
115
+ ...common,
116
+ status: 'error',
117
+ statusMessage: statusMessage ?? 'The build failed.',
118
+ errorMessage: failure,
119
+ };
120
+ };
121
+ exports.getDataAppBuildStatusResponse = getDataAppBuildStatusResponse;
122
+ //# sourceMappingURL=toolGetDataAppBuildStatusArgs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolGetDataAppBuildStatusArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolGetDataAppBuildStatusArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,+CAK6B;AAC7B,uEAGmC;AAEnC,yEAAyE;AACzE,2EAA2E;AAC9D,QAAA,uBAAuB,GAAG;IACnC,GAAG,+BAAuB;IAC1B,OAAO;IACP,WAAW;CACL,CAAC;AAIX,MAAM,qBAAqB,GAAG;IAC1B,OAAO,EAAE,sBAAsB;IAC/B,OAAO,EAAE,8BAA8B;IACvC,OAAO,EAAE,qCAAqC;IAC9C,UAAU,EAAE,kBAAkB;IAC9B,QAAQ,EAAE,mBAAmB;IAC7B,SAAS,EAAE,oBAAoB;IAC/B,KAAK,EAAE,mBAAmB;CAC+C,CAAC;AAEjE,QAAA,8CAA8C,GAAG;;;;;;eAO1D,yDAA+B,GAAG,IACtC;;;;;;;;;;;;;;;;;;;;;;CAsBC,CAAC;AAEW,QAAA,kCAAkC,GAAG,OAAC,CAAC,MAAM,CAAC;IACvD,OAAO,EAAE,OAAC;SACL,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,0DAA0D,CAAC;IACzE,OAAO,EAAE,OAAC;SACL,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,EAAE;SACV,QAAQ,EAAE;SACV,QAAQ,CACL,iHAAiH,CACpH;CACR,CAAC,CAAC;AAMU,QAAA,8CAA8C,GAAG,OAAC,CAAC,MAAM,CAAC;IACnE,MAAM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C,CAAC,CAAC,WAAW,OAAO,qBAAqB,WAAW,GAC5D,YAAY;gBACd,CAAC,CAAC,CAAC,aAAa,IAAI,qBAAqB,CAAC,MAAM,CAAC,CAAC;YAC1D,YAAY,EAAE,IAAI;SACrB,CAAC;IACN,CAAC;IACD,IAAI,KAAK,KAAK,qCAA6B,EAAE,CAAC;QAC1C,OAAO;YACH,GAAG,MAAM;YACT,MAAM,EAAE,WAAW;YACnB,aAAa,EAAE,0BAA0B;YACzC,YAAY,EAAE,IAAI;SACrB,CAAC;IACN,CAAC;IACD,MAAM,OAAO,GAAG,KAAK,IAAI,aAAa,IAAI,mBAAmB,CAAC;IAC9D,OAAO;QACH,GAAG,MAAM;QACT,MAAM,EAAE,OAAO;QACf,aAAa,EAAE,aAAa,IAAI,mBAAmB;QACnD,YAAY,EAAE,OAAO;KACxB,CAAC;AACN,CAAC,CAAC;AA1DW,QAAA,6BAA6B,GAA7B,6BAA6B,CA0DxC"}
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { type ToolGenerateDataAppOutput } from './toolGenerateDataAppArgs';
3
3
  export declare const TOOL_ITERATE_DATA_APP_DESCRIPTION: string;
4
+ export declare const MCP_TOOL_ITERATE_DATA_APP_DESCRIPTION = "Tool: iterate_data_app\n\nPurpose:\nStart a build that adds a version to an existing data app from a follow-up brief. Use it to change, fix, or extend an app that already exists; generate_data_app is the tool for a brand-new app.\n\nImportant:\n- The coding agent works from the app's current source, so the brief describes the change rather than restating the whole app.\n- The app's name and slug stay as they are. The build adds a version to the app named by appSlug.\n- The build runs in the background for several minutes. This call returns as soon as the build has started. Poll get_data_app_build_status with the same appSlug every 15 seconds until its status is \"ready\", \"error\", or \"cancelled\". Call this tool once per request.\n- While a version is already building for the app, this call fails with \"A version is already building for this app\". Poll get_data_app_build_status until that build reaches a terminal status, then call this tool again.\n- An agent-scoped session restricted to specific spaces cannot read a personal app. Call this tool and get_data_app_build_status without agentUuid to build and poll an app you own.\n- Pass themeSlug only when the user asks to switch the app's theme; omitting it keeps the current one. An unknown themeSlug fails before the build starts and lists the valid slugs, which list_data_app_themes also returns.\n\nResponse shape (MCP CallToolResult):\n- content: [{ type: \"text\", text: \"<confirmation that the build started>\" }]\n- structuredContent: {\n slug: string, // the app's slug, unchanged by this build\n version: number // the version of the app this build produces\n }\n\nErrors: an unknown appSlug, themeSlug, dashboardSlug, or chartSlug returns an error and starts no build.\n";
4
5
  export declare const toolIterateDataAppArgsSchema: z.ZodObject<{
5
6
  appSlug: z.ZodString;
6
7
  prompt: z.ZodString;
@@ -14,6 +15,7 @@ export declare const toolIterateDataAppOutputSchema: z.ZodObject<{
14
15
  status: z.ZodLiteral<"pending">;
15
16
  appUuid: z.ZodString;
16
17
  version: z.ZodNumber;
18
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
19
  }, z.core.$strip>, z.ZodObject<{
18
20
  status: z.ZodLiteral<"success">;
19
21
  appUuid: z.ZodString;
@@ -44,6 +46,7 @@ export declare const isToolIterateDataAppResult: <T extends {
44
46
  status: "pending";
45
47
  appUuid: string;
46
48
  version: number;
49
+ name?: string | null | undefined;
47
50
  } | {
48
51
  status: "success";
49
52
  appUuid: string;
@@ -1 +1 @@
1
- {"version":3,"file":"toolIterateDataAppArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolIterateDataAppArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAIH,KAAK,yBAAyB,EACjC,MAAM,2BAA2B,CAAC;AAEnC,eAAO,MAAM,iCAAiC,QAOnC,CAAC;AAEZ,eAAO,MAAM,4BAA4B;;;;;;iBAgCvC,CAAC;AAIH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;iBAAkC,CAAC;AAE9E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CACxC,OAAO,4BAA4B,CACtC,CAAC;AAEF,MAAM,MAAM,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AC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,UAE3D,CAAC,KACV,MAAM,IAAI,CAAC,GAAG;IACb,QAAQ,EAAE,UAAU,CAAC;IACrB,QAAQ,EAAE,iBAAiB,GAAG,gBAAgB,CAAC;IAC/C,QAAQ,EAAE,yBAAyB,CAAC,UAAU,CAAC,CAAC;CAC0B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isToolDataAppBuildResult = exports.isToolIterateDataAppResult = exports.toolIterateDataAppOutputSchema = exports.toolIterateDataAppArgsSchema = exports.TOOL_ITERATE_DATA_APP_DESCRIPTION = void 0;
3
+ exports.isToolDataAppBuildResult = exports.isToolIterateDataAppResult = exports.toolIterateDataAppOutputSchema = exports.toolIterateDataAppArgsSchema = exports.MCP_TOOL_ITERATE_DATA_APP_DESCRIPTION = exports.TOOL_ITERATE_DATA_APP_DESCRIPTION = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const builtInToolResultGuard_1 = require("./builtInToolResultGuard");
6
6
  const toolGenerateDataAppArgs_1 = require("./toolGenerateDataAppArgs");
@@ -8,10 +8,32 @@ exports.TOOL_ITERATE_DATA_APP_DESCRIPTION = [
8
8
  'Start a build that adds a version to an existing data app from a follow-up brief.',
9
9
  'Use it when the user wants to change, fix, or extend a data app that already exists — one built earlier in this thread, or one found with findContent; use generateDataApp only for a brand-new app.',
10
10
  "The coding agent works from the app's current source, so the brief should describe the change, not restate the whole app.",
11
- 'The build runs in the background for several minutes, so the call returns as soon as it has started (status: "pending") and the outcome lands on this result for a later turn. One request, one call — never wait, poll, or call this tool again for the same request.',
11
+ 'The build runs in the background for several minutes, so the call returns as soon as it has started (status: "pending") and the outcome lands on this result for a later turn. One request, one call — never wait, poll, or call this tool again for the same request: tell the user the build has started and end your turn.',
12
12
  'While a version is already building for the app, the call fails — relay that the user should wait for the current build to finish.',
13
13
  'When the attached context lists element references for this app (bracketed `[tag "text" @path:line]` strings), copy every one of them verbatim into the brief — the coding agent resolves them by source location and cannot see them otherwise.',
14
14
  ].join(' ');
15
+ exports.MCP_TOOL_ITERATE_DATA_APP_DESCRIPTION = `Tool: iterate_data_app
16
+
17
+ Purpose:
18
+ Start a build that adds a version to an existing data app from a follow-up brief. Use it to change, fix, or extend an app that already exists; generate_data_app is the tool for a brand-new app.
19
+
20
+ Important:
21
+ - The coding agent works from the app's current source, so the brief describes the change rather than restating the whole app.
22
+ - The app's name and slug stay as they are. The build adds a version to the app named by appSlug.
23
+ - The build runs in the background for several minutes. This call returns as soon as the build has started. Poll get_data_app_build_status with the same appSlug every ${toolGenerateDataAppArgs_1.DATA_APP_BUILD_POLL_INTERVAL_MS / 1000} seconds until its status is "ready", "error", or "cancelled". Call this tool once per request.
24
+ - While a version is already building for the app, this call fails with "A version is already building for this app". Poll get_data_app_build_status until that build reaches a terminal status, then call this tool again.
25
+ ${toolGenerateDataAppArgs_1.MCP_DATA_APP_AGENT_SCOPE_GUIDANCE}
26
+ - Pass themeSlug only when the user asks to switch the app's theme; omitting it keeps the current one. An unknown themeSlug fails before the build starts and lists the valid slugs, which list_data_app_themes also returns.
27
+
28
+ Response shape (MCP CallToolResult):
29
+ - content: [{ type: "text", text: "<confirmation that the build started>" }]
30
+ - structuredContent: {
31
+ slug: string, // the app's slug, unchanged by this build
32
+ version: number // the version of the app this build produces
33
+ }
34
+
35
+ Errors: an unknown appSlug, themeSlug, dashboardSlug, or chartSlug returns an error and starts no build.
36
+ `;
15
37
  exports.toolIterateDataAppArgsSchema = zod_1.z.object({
16
38
  appSlug: zod_1.z
17
39
  .string()
@@ -1 +1 @@
1
- {"version":3,"file":"toolIterateDataAppArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolIterateDataAppArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qEAAsE;AACtE,uEAKmC;AAEtB,QAAA,iCAAiC,GAAG;IAC7C,mFAAmF;IACnF,sMAAsM;IACtM,2HAA2H;IAC3H,wQAAwQ;IACxQ,oIAAoI;IACpI,kPAAkP;CACrP,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEC,QAAA,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IACjD,OAAO,EAAE,OAAC;SACL,MAAM,EAAE;SACR,QAAQ,CACL,yHAAyH,CAC5H;IACL,MAAM,EAAE,OAAC;SACJ,MAAM,EAAE;SACR,QAAQ,CACL,yXAAyX,CAC5X;IACL,aAAa,EAAE,OAAC;SACX,MAAM,EAAE;SACR,OAAO,EAAE;SACT,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CACL,4NAA4N,CAC/N;IACL,UAAU,EAAE,OAAC;SACR,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;SACjB,OAAO,EAAE;SACT,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CACL,uKAAuK,CAC1K;IACL,SAAS,EAAE,OAAC;SACP,MAAM,EAAE;SACR,OAAO,EAAE;SACT,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CACL,GAAG,yDAA+B,kKAAkK,CACvM;CACR,CAAC,CAAC;AAEH,4EAA4E;AAC5E,0EAA0E;AAC7D,QAAA,8BAA8B,GAAG,yDAA+B,CAAC;AAUjE,QAAA,0BAA0B,GAAG,IAAA,mDAA0B,EAChE,gBAAgB,EAChB,yDAA+B,CAAC,KAAK,CAAC,QAAQ,CACjD,CAAC;AAEF,0EAA0E;AACnE,MAAM,wBAAwB,GAAG,CAGpC,MAAS,EAKX,EAAE,CAAC,IAAA,qDAA2B,EAAC,MAAM,CAAC,IAAI,IAAA,QAAA,0BAA0B,EAAC,MAAM,CAAC,CAAC;AARlE,QAAA,wBAAwB,GAAxB,wBAAwB,CAQ0C"}
1
+ {"version":3,"file":"toolIterateDataAppArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolIterateDataAppArgs.ts"],"names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AA,0BAA0B,EAAC,MAAM,CAAC,CAAC;AARlE,QAAA,wBAAwB,GAAxB,wBAAwB,CAQ0C"}
@@ -1,6 +1,16 @@
1
1
  import { z } from 'zod';
2
2
  export declare const TOOL_LIST_DATA_APP_THEMES_DESCRIPTION: string;
3
+ export declare const MCP_TOOL_LIST_DATA_APP_THEMES_DESCRIPTION = "Tool: list_data_app_themes\n\nPurpose:\nList the organization's data app themes. A theme is a bundle of styling a data app can be built with; each has a slug you pass as themeSlug to generate_data_app.\n\nImportant:\n- Call it when the user names a theme, brand, or look for a data app, then match the request to a theme and pass its slug.\n- Skip it when the user says nothing about the look: the organization default theme applies.\n- An organization may have no themes at all, in which case omit themeSlug.\n\nParameters: none.\n\nResponse shape (MCP CallToolResult):\n- content: [{ type: \"text\", text: \"<the themes, one per line>\" }]\n- structuredContent: {\n themes: [{\n slug: string, // pass as themeSlug to generate_data_app\n name: string,\n isDefault: boolean, // applied when themeSlug is omitted\n description: string | null\n }]\n }\n";
3
4
  export declare const toolListDataAppThemesArgsSchema: z.ZodObject<{}, z.core.$strip>;
5
+ export declare const mcpListDataAppThemesStructuredOutputSchema: z.ZodObject<{
6
+ themes: z.ZodArray<z.ZodObject<{
7
+ slug: z.ZodString;
8
+ name: z.ZodString;
9
+ isDefault: z.ZodBoolean;
10
+ description: z.ZodNullable<z.ZodString>;
11
+ }, z.core.$strip>>;
12
+ }, z.core.$strip>;
13
+ export type McpListDataAppThemesOutput = z.infer<typeof mcpListDataAppThemesStructuredOutputSchema>;
4
14
  export declare const toolListDataAppThemesOutputSchema: z.ZodObject<{
5
15
  result: z.ZodString;
6
16
  metadata: z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"toolListDataAppThemesArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolListDataAppThemesArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,qCAAqC,QAIvC,CAAC;AAEZ,eAAO,MAAM,+BAA+B,gCAA6B,CAAC;AAE1E,eAAO,MAAM,iCAAiC;;;;;;;;iBAG5C,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,+BAA+B,CACzC,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,iCAAiC,CAC3C,CAAC"}
1
+ {"version":3,"file":"toolListDataAppThemesArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolListDataAppThemesArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,qCAAqC,QAIvC,CAAC;AAEZ,eAAO,MAAM,yCAAyC,g5BAsBrD,CAAC;AAEF,eAAO,MAAM,+BAA+B,gCAA6B,CAAC;AAE1E,eAAO,MAAM,0CAA0C;;;;;;;iBAoBrD,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,0CAA0C,CACpD,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;iBAG5C,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,+BAA+B,CACzC,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,iCAAiC,CAC3C,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toolListDataAppThemesOutputSchema = exports.toolListDataAppThemesArgsSchema = exports.TOOL_LIST_DATA_APP_THEMES_DESCRIPTION = void 0;
3
+ exports.toolListDataAppThemesOutputSchema = exports.mcpListDataAppThemesStructuredOutputSchema = exports.toolListDataAppThemesArgsSchema = exports.MCP_TOOL_LIST_DATA_APP_THEMES_DESCRIPTION = exports.TOOL_LIST_DATA_APP_THEMES_DESCRIPTION = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const outputMetadata_1 = require("../outputMetadata");
6
6
  const toolSchemaBuilder_1 = require("../toolSchemaBuilder");
@@ -9,7 +9,47 @@ exports.TOOL_LIST_DATA_APP_THEMES_DESCRIPTION = [
9
9
  'Call it when the user names a theme, brand, or look for a data app and no theme slug is in the attached context; match the request to a theme and pass its slug as themeSlug to generateDataApp or iterateDataApp.',
10
10
  'Skip it when the context already carries a theme slug, or when the user says nothing about the look — the organization default applies.',
11
11
  ].join(' ');
12
+ exports.MCP_TOOL_LIST_DATA_APP_THEMES_DESCRIPTION = `Tool: list_data_app_themes
13
+
14
+ Purpose:
15
+ List the organization's data app themes. A theme is a bundle of styling a data app can be built with; each has a slug you pass as themeSlug to generate_data_app.
16
+
17
+ Important:
18
+ - Call it when the user names a theme, brand, or look for a data app, then match the request to a theme and pass its slug.
19
+ - Skip it when the user says nothing about the look: the organization default theme applies.
20
+ - An organization may have no themes at all, in which case omit themeSlug.
21
+
22
+ Parameters: none.
23
+
24
+ Response shape (MCP CallToolResult):
25
+ - content: [{ type: "text", text: "<the themes, one per line>" }]
26
+ - structuredContent: {
27
+ themes: [{
28
+ slug: string, // pass as themeSlug to generate_data_app
29
+ name: string,
30
+ isDefault: boolean, // applied when themeSlug is omitted
31
+ description: string | null
32
+ }]
33
+ }
34
+ `;
12
35
  exports.toolListDataAppThemesArgsSchema = (0, toolSchemaBuilder_1.createToolSchema)().build();
36
+ exports.mcpListDataAppThemesStructuredOutputSchema = zod_1.z.object({
37
+ themes: zod_1.z
38
+ .array(zod_1.z.object({
39
+ slug: zod_1.z
40
+ .string()
41
+ .describe('Pass as themeSlug to generate_data_app.'),
42
+ name: zod_1.z.string().describe("The theme's display name."),
43
+ isDefault: zod_1.z
44
+ .boolean()
45
+ .describe('Whether this theme applies when themeSlug is omitted.'),
46
+ description: zod_1.z
47
+ .string()
48
+ .nullable()
49
+ .describe('What it looks like.'),
50
+ }))
51
+ .describe("The organization's themes; empty when it has none."),
52
+ });
13
53
  exports.toolListDataAppThemesOutputSchema = zod_1.z.object({
14
54
  result: zod_1.z.string(),
15
55
  metadata: outputMetadata_1.baseOutputMetadataSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"toolListDataAppThemesArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolListDataAppThemesArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,sDAA6D;AAC7D,4DAAwD;AAE3C,QAAA,qCAAqC,GAAG;IACjD,mHAAmH;IACnH,oNAAoN;IACpN,yIAAyI;CAC5I,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEC,QAAA,+BAA+B,GAAG,IAAA,oCAAgB,GAAE,CAAC,KAAK,EAAE,CAAC;AAE7D,QAAA,iCAAiC,GAAG,OAAC,CAAC,MAAM,CAAC;IACtD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,yCAAwB;CACrC,CAAC,CAAC"}
1
+ {"version":3,"file":"toolListDataAppThemesArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolListDataAppThemesArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,sDAA6D;AAC7D,4DAAwD;AAE3C,QAAA,qCAAqC,GAAG;IACjD,mHAAmH;IACnH,oNAAoN;IACpN,yIAAyI;CAC5I,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEC,QAAA,yCAAyC,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsBxD,CAAC;AAEW,QAAA,+BAA+B,GAAG,IAAA,oCAAgB,GAAE,CAAC,KAAK,EAAE,CAAC;AAE7D,QAAA,0CAA0C,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/D,MAAM,EAAE,OAAC;SACJ,KAAK,CACF,OAAC,CAAC,MAAM,CAAC;QACL,IAAI,EAAE,OAAC;aACF,MAAM,EAAE;aACR,QAAQ,CAAC,yCAAyC,CAAC;QACxD,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;QACtD,SAAS,EAAE,OAAC;aACP,OAAO,EAAE;aACT,QAAQ,CACL,uDAAuD,CAC1D;QACL,WAAW,EAAE,OAAC;aACT,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,qBAAqB,CAAC;KACvC,CAAC,CACL;SACA,QAAQ,CAAC,oDAAoD,CAAC;CACtE,CAAC,CAAC;AAMU,QAAA,iCAAiC,GAAG,OAAC,CAAC,MAAM,CAAC;IACtD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,yCAAwB;CACrC,CAAC,CAAC"}
@@ -969,31 +969,13 @@ export declare const toolRunMetricQueryArgsSchemaTransformed: z.ZodPipe<z.ZodObj
969
969
  tableCalculations: ({
970
970
  name: string;
971
971
  displayName: string;
972
- type: "percent_of_column_total";
972
+ type: "percent_of_previous_value";
973
973
  fieldId: string;
974
- partitionBy: string[] | null;
975
- } | {
976
- name: string;
977
- displayName: string;
978
- type: "window_function";
979
- windowFunction: import("../../../..").WindowFunctionType;
980
- fieldId: string | null;
981
974
  orderBy: {
982
975
  fieldId: string;
983
976
  order: "asc" | "desc" | null;
984
- }[] | null;
977
+ }[];
985
978
  partitionBy: string[] | null;
986
- frame: {
987
- frameType: "range" | "rows";
988
- start: {
989
- type: "current_row" | "following" | "preceding" | "unbounded_following" | "unbounded_preceding";
990
- offset: number | null;
991
- } | null;
992
- end: {
993
- type: "current_row" | "following" | "preceding" | "unbounded_following" | "unbounded_preceding";
994
- offset: number | null;
995
- };
996
- } | null;
997
979
  } | {
998
980
  name: string;
999
981
  displayName: string;
@@ -1014,12 +996,8 @@ export declare const toolRunMetricQueryArgsSchemaTransformed: z.ZodPipe<z.ZodObj
1014
996
  } | {
1015
997
  name: string;
1016
998
  displayName: string;
1017
- type: "percent_of_previous_value";
999
+ type: "percent_of_column_total";
1018
1000
  fieldId: string;
1019
- orderBy: {
1020
- fieldId: string;
1021
- order: "asc" | "desc" | null;
1022
- }[];
1023
1001
  partitionBy: string[] | null;
1024
1002
  } | {
1025
1003
  name: string;
@@ -1031,6 +1009,28 @@ export declare const toolRunMetricQueryArgsSchemaTransformed: z.ZodPipe<z.ZodObj
1031
1009
  displayName: string;
1032
1010
  type: "running_total";
1033
1011
  fieldId: string;
1012
+ } | {
1013
+ name: string;
1014
+ displayName: string;
1015
+ type: "window_function";
1016
+ windowFunction: import("../../../..").WindowFunctionType;
1017
+ fieldId: string | null;
1018
+ orderBy: {
1019
+ fieldId: string;
1020
+ order: "asc" | "desc" | null;
1021
+ }[] | null;
1022
+ partitionBy: string[] | null;
1023
+ frame: {
1024
+ frameType: "range" | "rows";
1025
+ start: {
1026
+ type: "current_row" | "following" | "preceding" | "unbounded_following" | "unbounded_preceding";
1027
+ offset: number | null;
1028
+ } | null;
1029
+ end: {
1030
+ type: "current_row" | "following" | "preceding" | "unbounded_following" | "unbounded_preceding";
1031
+ offset: number | null;
1032
+ };
1033
+ } | null;
1034
1034
  })[] | null;
1035
1035
  customMetrics: TransformedCustomMetric[] | null;
1036
1036
  filters: Filters;
@@ -1156,31 +1156,13 @@ export declare const toolRunMetricQueryArgsSchemaTransformed: z.ZodPipe<z.ZodObj
1156
1156
  tableCalculations: ({
1157
1157
  name: string;
1158
1158
  displayName: string;
1159
- type: "percent_of_column_total";
1159
+ type: "percent_of_previous_value";
1160
1160
  fieldId: string;
1161
- partitionBy: string[] | null;
1162
- } | {
1163
- name: string;
1164
- displayName: string;
1165
- type: "window_function";
1166
- windowFunction: import("../../../..").WindowFunctionType;
1167
- fieldId: string | null;
1168
1161
  orderBy: {
1169
1162
  fieldId: string;
1170
1163
  order: "asc" | "desc" | null;
1171
- }[] | null;
1164
+ }[];
1172
1165
  partitionBy: string[] | null;
1173
- frame: {
1174
- frameType: "range" | "rows";
1175
- start: {
1176
- type: "current_row" | "following" | "preceding" | "unbounded_following" | "unbounded_preceding";
1177
- offset: number | null;
1178
- } | null;
1179
- end: {
1180
- type: "current_row" | "following" | "preceding" | "unbounded_following" | "unbounded_preceding";
1181
- offset: number | null;
1182
- };
1183
- } | null;
1184
1166
  } | {
1185
1167
  name: string;
1186
1168
  displayName: string;
@@ -1201,12 +1183,8 @@ export declare const toolRunMetricQueryArgsSchemaTransformed: z.ZodPipe<z.ZodObj
1201
1183
  } | {
1202
1184
  name: string;
1203
1185
  displayName: string;
1204
- type: "percent_of_previous_value";
1186
+ type: "percent_of_column_total";
1205
1187
  fieldId: string;
1206
- orderBy: {
1207
- fieldId: string;
1208
- order: "asc" | "desc" | null;
1209
- }[];
1210
1188
  partitionBy: string[] | null;
1211
1189
  } | {
1212
1190
  name: string;
@@ -1218,6 +1196,28 @@ export declare const toolRunMetricQueryArgsSchemaTransformed: z.ZodPipe<z.ZodObj
1218
1196
  displayName: string;
1219
1197
  type: "running_total";
1220
1198
  fieldId: string;
1199
+ } | {
1200
+ name: string;
1201
+ displayName: string;
1202
+ type: "window_function";
1203
+ windowFunction: import("../../../..").WindowFunctionType;
1204
+ fieldId: string | null;
1205
+ orderBy: {
1206
+ fieldId: string;
1207
+ order: "asc" | "desc" | null;
1208
+ }[] | null;
1209
+ partitionBy: string[] | null;
1210
+ frame: {
1211
+ frameType: "range" | "rows";
1212
+ start: {
1213
+ type: "current_row" | "following" | "preceding" | "unbounded_following" | "unbounded_preceding";
1214
+ offset: number | null;
1215
+ } | null;
1216
+ end: {
1217
+ type: "current_row" | "following" | "preceding" | "unbounded_following" | "unbounded_preceding";
1218
+ offset: number | null;
1219
+ };
1220
+ } | null;
1221
1221
  })[] | null;
1222
1222
  filters: {
1223
1223
  type: "and" | "or";