@lightdash/common 2.315.0 → 2.316.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 (43) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/ee/AiAgent/schemas/tools/toolComposerQueryArgs.d.ts +17 -1
  3. package/dist/cjs/ee/AiAgent/schemas/tools/toolComposerQueryArgs.d.ts.map +1 -1
  4. package/dist/cjs/ee/AiAgent/schemas/tools/toolComposerQueryArgs.js +41 -20
  5. package/dist/cjs/ee/AiAgent/schemas/tools/toolComposerQueryArgs.js.map +1 -1
  6. package/dist/cjs/schemas/json/mcp-tools-1.0.json +42 -2
  7. package/dist/cjs/types/api.d.ts +2 -2
  8. package/dist/cjs/types/api.d.ts.map +1 -1
  9. package/dist/cjs/types/api.js.map +1 -1
  10. package/dist/cjs/types/querySources.d.ts +16 -0
  11. package/dist/cjs/types/querySources.d.ts.map +1 -1
  12. package/dist/cjs/types/warehouseConnections.d.ts +23 -0
  13. package/dist/cjs/types/warehouseConnections.d.ts.map +1 -1
  14. package/dist/cjs/types/warehouseConnections.js.map +1 -1
  15. package/dist/esm/.tsbuildinfo +1 -1
  16. package/dist/esm/ee/AiAgent/schemas/tools/toolComposerQueryArgs.d.ts +17 -1
  17. package/dist/esm/ee/AiAgent/schemas/tools/toolComposerQueryArgs.d.ts.map +1 -1
  18. package/dist/esm/ee/AiAgent/schemas/tools/toolComposerQueryArgs.js +41 -20
  19. package/dist/esm/ee/AiAgent/schemas/tools/toolComposerQueryArgs.js.map +1 -1
  20. package/dist/esm/schemas/json/mcp-tools-1.0.json +42 -2
  21. package/dist/esm/types/api.d.ts +2 -2
  22. package/dist/esm/types/api.d.ts.map +1 -1
  23. package/dist/esm/types/api.js.map +1 -1
  24. package/dist/esm/types/querySources.d.ts +16 -0
  25. package/dist/esm/types/querySources.d.ts.map +1 -1
  26. package/dist/esm/types/warehouseConnections.d.ts +23 -0
  27. package/dist/esm/types/warehouseConnections.d.ts.map +1 -1
  28. package/dist/esm/types/warehouseConnections.js.map +1 -1
  29. package/dist/types/.tsbuildinfo +1 -1
  30. package/dist/types/ee/AiAgent/schemas/tools/toolComposerQueryArgs.d.ts +17 -1
  31. package/dist/types/ee/AiAgent/schemas/tools/toolComposerQueryArgs.d.ts.map +1 -1
  32. package/dist/types/ee/AiAgent/schemas/tools/toolComposerQueryArgs.js +41 -20
  33. package/dist/types/ee/AiAgent/schemas/tools/toolComposerQueryArgs.js.map +1 -1
  34. package/dist/types/schemas/json/mcp-tools-1.0.json +42 -2
  35. package/dist/types/types/api.d.ts +2 -2
  36. package/dist/types/types/api.d.ts.map +1 -1
  37. package/dist/types/types/api.js.map +1 -1
  38. package/dist/types/types/querySources.d.ts +16 -0
  39. package/dist/types/types/querySources.d.ts.map +1 -1
  40. package/dist/types/types/warehouseConnections.d.ts +23 -0
  41. package/dist/types/types/warehouseConnections.d.ts.map +1 -1
  42. package/dist/types/types/warehouseConnections.js.map +1 -1
  43. package/package.json +1 -1
@@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
  import { QuerySourceType, type DuckdbSourceQuery, type ExternalSourceQuery, type SemanticLayerSourceQuery, type SqlSourceQuery } from '../../../../types/querySources';
3
3
  export declare const DEFAULT_COMPOSER_QUERY_LIMIT = 500;
4
4
  export declare const DEFAULT_COMPOSER_QUERY_MAX_LIMIT = 5000;
5
- export declare const TOOL_COMPOSER_QUERIES_DESCRIPTION = "Execute a composer query: a pipeline of one or more queries submitted together, where DuckDB queries can join and transform the results of the other queries. Results are stored as a chart artifact that renders the terminal node's results table in the thread.\n\nUse this tool when a single source cannot answer the question \u2014 e.g. joining a semantic layer metric query with an uploaded CSV, joining with raw warehouse SQL, or post-processing prior results with SQL. A pipeline may also be a single node: a lone \"sql\" node is how raw warehouse SQL runs when no standalone runSql tool is available.\n\nHow to build a pipeline:\n- Every query is a node. Name each node with \"nodeId\" (letters, digits, underscores; starting with a letter or underscore).\n- \"semanticLayer\" nodes run a metric query against an explore. Result columns are named by field id \u2014 exactly the dimensions and metrics requested (e.g. metric \"payments_total_revenue\" yields column \"payments_total_revenue\").\n- \"sql\" nodes run raw SQL against the project's data warehouse, in the warehouse's SQL dialect. Result columns are the SELECT output names. SQL execution may require the user to approve the SQL first.\n- \"external\" nodes run DuckDB SQL over durable external tables such as uploaded CSVs and connected data sources. Declare the tables via \"tables\": an array of table names, or a map of {sqlAlias: tableNameOrTableUuid}. Use the exact table name or UUID supplied in the user's attached-source context. One source may expose many tables, and one external node can read any subset of them. Result columns are the SELECT output names.\n- \"duckdb\" nodes run DuckDB SQL over other queries' results. Declare which results the SQL reads via \"references\": the shorthand array form lists node ids from this submission, each exposed as a table named by its node id ([\"orders\", \"revenue\"] lets the SQL run SELECT * FROM orders JOIN revenue ...); the map form aliases tables or references stored results by queryUuid ({\"o\": \"orders\", \"prev\": \"<queryUuid>\"}). A referenced table's columns are the upstream result's columns.\n- The \"terminal\" node is the one whose results the artifact shows and whose rows are returned to you. By default it is the unique sink (the one node no other node references); pass \"terminalNodeId\" explicitly when the pipeline has multiple sinks.\n\nResults are reusable across calls:\n- Every call returns a queryUuid per node. Any of them \u2014 not just the terminal one \u2014 can be referenced by a later call via the map form of \"references\".\n- Referencing a queryUuid reads the stored result; the query behind it is NOT re-run. A duckdb-only submission over stored results touches no source and needs no SQL approval, however many times you iterate.\n- This supports step-by-step work: run a source query once, then explore its result with as many follow-up duckdb submissions over the same queryUuid as you need.\n- The artifact shown in the thread always renders your LATEST call's terminal result, so finish with the submission that produces the table the user should see \u2014 referencing earlier queryUuids keeps that final pipeline small.\n\nReturns the terminal node's result columns and a CSV preview of its rows, plus per-node queryUuids.";
5
+ export declare const TOOL_COMPOSER_QUERIES_DESCRIPTION = "Run a pipeline: one or more queries submitted together, where duckdb queries join or transform the others' results. The terminal node's table is shown in the thread as a chart artifact and its rows are returned to you.\n\nNode kinds:\n- \"semanticLayer\": a metric query against an explore. Result columns are the requested field ids.\n- \"sql\": raw SQL against the project warehouse; may need user approval. A lone sql node is how raw SQL runs when there is no runSql tool.\n- \"external\": DuckDB SQL over uploaded or connected tables declared in \"tables\".\n- \"duckdb\": DuckDB SQL over other results declared in \"references\".\n\nEvery node has a \"nodeId\" (for references) and a \"title\" (what users see). The terminal node is the unique sink by default, or \"terminalNodeId\".\n\nReuse across calls: every call returns a queryUuid per node. Referencing a queryUuid in the map form of \"references\" reads the stored result without re-running it or asking for approval. The artifact always shows your latest call's terminal result, so end with the pipeline that produces the table the user should see.";
6
6
  type CreateToolComposerQueriesArgsSchemaOptions = {
7
7
  maxLimit?: number;
8
8
  defaultLimit?: number;
@@ -11,6 +11,8 @@ export declare const createToolComposerQueriesArgsSchema: ({ maxLimit, defaultLi
11
11
  title: z.ZodNullable<z.ZodString>;
12
12
  description: z.ZodNullable<z.ZodString>;
13
13
  queries: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
14
+ title: z.ZodString;
15
+ description: z.ZodNullable<z.ZodString>;
14
16
  sourceType: z.ZodLiteral<QuerySourceType.SEMANTIC_LAYER>;
15
17
  nodeId: z.ZodString;
16
18
  exploreName: z.ZodString;
@@ -27,17 +29,23 @@ export declare const createToolComposerQueriesArgsSchema: ({ maxLimit, defaultLi
27
29
  }, z.core.$strip>>>;
28
30
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
29
31
  }, z.core.$strip>, z.ZodObject<{
32
+ title: z.ZodString;
33
+ description: z.ZodNullable<z.ZodString>;
30
34
  sourceType: z.ZodLiteral<QuerySourceType.SQL>;
31
35
  nodeId: z.ZodString;
32
36
  sql: z.ZodString;
33
37
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
34
38
  }, z.core.$strip>, z.ZodObject<{
39
+ title: z.ZodString;
40
+ description: z.ZodNullable<z.ZodString>;
35
41
  sourceType: z.ZodLiteral<QuerySourceType.DUCKDB>;
36
42
  nodeId: z.ZodString;
37
43
  sql: z.ZodString;
38
44
  references: z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodString>]>;
39
45
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
40
46
  }, z.core.$strip>, z.ZodObject<{
47
+ title: z.ZodString;
48
+ description: z.ZodNullable<z.ZodString>;
41
49
  sourceType: z.ZodLiteral<QuerySourceType.EXTERNAL>;
42
50
  nodeId: z.ZodString;
43
51
  sql: z.ZodString;
@@ -50,6 +58,8 @@ export declare const toolComposerQueriesArgsSchema: z.ZodObject<{
50
58
  title: z.ZodNullable<z.ZodString>;
51
59
  description: z.ZodNullable<z.ZodString>;
52
60
  queries: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
61
+ title: z.ZodString;
62
+ description: z.ZodNullable<z.ZodString>;
53
63
  sourceType: z.ZodLiteral<QuerySourceType.SEMANTIC_LAYER>;
54
64
  nodeId: z.ZodString;
55
65
  exploreName: z.ZodString;
@@ -66,17 +76,23 @@ export declare const toolComposerQueriesArgsSchema: z.ZodObject<{
66
76
  }, z.core.$strip>>>;
67
77
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
68
78
  }, z.core.$strip>, z.ZodObject<{
79
+ title: z.ZodString;
80
+ description: z.ZodNullable<z.ZodString>;
69
81
  sourceType: z.ZodLiteral<QuerySourceType.SQL>;
70
82
  nodeId: z.ZodString;
71
83
  sql: z.ZodString;
72
84
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
73
85
  }, z.core.$strip>, z.ZodObject<{
86
+ title: z.ZodString;
87
+ description: z.ZodNullable<z.ZodString>;
74
88
  sourceType: z.ZodLiteral<QuerySourceType.DUCKDB>;
75
89
  nodeId: z.ZodString;
76
90
  sql: z.ZodString;
77
91
  references: z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodString>]>;
78
92
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
79
93
  }, z.core.$strip>, z.ZodObject<{
94
+ title: z.ZodString;
95
+ description: z.ZodNullable<z.ZodString>;
80
96
  sourceType: z.ZodLiteral<QuerySourceType.EXTERNAL>;
81
97
  nodeId: z.ZodString;
82
98
  sql: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"toolComposerQueryArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolComposerQueryArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EACH,eAAe,EACf,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACtB,MAAM,gCAAgC,CAAC;AAIxC,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAChD,eAAO,MAAM,gCAAgC,OAAO,CAAC;AAErD,eAAO,MAAM,iCAAiC,iuGAkBsD,CAAC;AA6BrG,KAAK,0CAA0C,GAAG;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,mCAAmC,iCAG7C,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiH5C,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBACD,CAAC;AAE1C,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CACvC,OAAO,6BAA6B,CACvC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAErB;;;;GAIG;AACH,eAAO,MAAM,kCAAkC,SACrC,qBAAqB,KAEzB,wBAAwB,GACxB,cAAc,GACd,iBAAiB,GACjB,mBA2CL,CAAC;AAsBF;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC,UACrC,OAAO,KACf,uBAAuB,GAAG,IAyE5B,CAAC;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;;iBAK1C,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CACzC,OAAO,6BAA6B,CACvC,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,+BAA+B,CACzC,CAAC"}
1
+ {"version":3,"file":"toolComposerQueryArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolComposerQueryArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EACH,eAAe,EACf,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACtB,MAAM,gCAAgC,CAAC;AAIxC,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAChD,eAAO,MAAM,gCAAgC,OAAO,CAAC;AAErD,eAAO,MAAM,iCAAiC,6lCAUiR,CAAC;AA+ChU,KAAK,0CAA0C,GAAG;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,mCAAmC,iCAG7C,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqH5C,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBACD,CAAC;AAE1C,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CACvC,OAAO,6BAA6B,CACvC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AASrB;;;;GAIG;AACH,eAAO,MAAM,kCAAkC,SACrC,qBAAqB,KAEzB,wBAAwB,GACxB,cAAc,GACd,iBAAiB,GACjB,mBA+CL,CAAC;AAsBF;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC,UACrC,OAAO,KACf,uBAAuB,GAAG,IAgF5B,CAAC;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;;iBAK1C,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CACzC,OAAO,6BAA6B,CACvC,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,+BAA+B,CACzC,CAAC"}
@@ -8,29 +8,32 @@ const assertUnreachable_1 = tslib_1.__importDefault(require("../../../../utils/a
8
8
  const toolSchemaBuilder_1 = require("../toolSchemaBuilder");
9
9
  exports.DEFAULT_COMPOSER_QUERY_LIMIT = 500;
10
10
  exports.DEFAULT_COMPOSER_QUERY_MAX_LIMIT = 5000;
11
- exports.TOOL_COMPOSER_QUERIES_DESCRIPTION = `Execute a composer query: a pipeline of one or more queries submitted together, where DuckDB queries can join and transform the results of the other queries. Results are stored as a chart artifact that renders the terminal node's results table in the thread.
11
+ exports.TOOL_COMPOSER_QUERIES_DESCRIPTION = `Run a pipeline: one or more queries submitted together, where duckdb queries join or transform the others' results. The terminal node's table is shown in the thread as a chart artifact and its rows are returned to you.
12
12
 
13
- Use this tool when a single source cannot answer the question — e.g. joining a semantic layer metric query with an uploaded CSV, joining with raw warehouse SQL, or post-processing prior results with SQL. A pipeline may also be a single node: a lone "sql" node is how raw warehouse SQL runs when no standalone runSql tool is available.
13
+ Node kinds:
14
+ - "semanticLayer": a metric query against an explore. Result columns are the requested field ids.
15
+ - "sql": raw SQL against the project warehouse; may need user approval. A lone sql node is how raw SQL runs when there is no runSql tool.
16
+ - "external": DuckDB SQL over uploaded or connected tables declared in "tables".
17
+ - "duckdb": DuckDB SQL over other results declared in "references".
14
18
 
15
- How to build a pipeline:
16
- - Every query is a node. Name each node with "nodeId" (letters, digits, underscores; starting with a letter or underscore).
17
- - "semanticLayer" nodes run a metric query against an explore. Result columns are named by field id — exactly the dimensions and metrics requested (e.g. metric "payments_total_revenue" yields column "payments_total_revenue").
18
- - "sql" nodes run raw SQL against the project's data warehouse, in the warehouse's SQL dialect. Result columns are the SELECT output names. SQL execution may require the user to approve the SQL first.
19
- - "external" nodes run DuckDB SQL over durable external tables such as uploaded CSVs and connected data sources. Declare the tables via "tables": an array of table names, or a map of {sqlAlias: tableNameOrTableUuid}. Use the exact table name or UUID supplied in the user's attached-source context. One source may expose many tables, and one external node can read any subset of them. Result columns are the SELECT output names.
20
- - "duckdb" nodes run DuckDB SQL over other queries' results. Declare which results the SQL reads via "references": the shorthand array form lists node ids from this submission, each exposed as a table named by its node id (["orders", "revenue"] lets the SQL run SELECT * FROM orders JOIN revenue ...); the map form aliases tables or references stored results by queryUuid ({"o": "orders", "prev": "<queryUuid>"}). A referenced table's columns are the upstream result's columns.
21
- - The "terminal" node is the one whose results the artifact shows and whose rows are returned to you. By default it is the unique sink (the one node no other node references); pass "terminalNodeId" explicitly when the pipeline has multiple sinks.
19
+ Every node has a "nodeId" (for references) and a "title" (what users see). The terminal node is the unique sink by default, or "terminalNodeId".
22
20
 
23
- Results are reusable across calls:
24
- - Every call returns a queryUuid per node. Any of them — not just the terminal one — can be referenced by a later call via the map form of "references".
25
- - Referencing a queryUuid reads the stored result; the query behind it is NOT re-run. A duckdb-only submission over stored results touches no source and needs no SQL approval, however many times you iterate.
26
- - This supports step-by-step work: run a source query once, then explore its result with as many follow-up duckdb submissions over the same queryUuid as you need.
27
- - The artifact shown in the thread always renders your LATEST call's terminal result, so finish with the submission that produces the table the user should see — referencing earlier queryUuids keeps that final pipeline small.
28
-
29
- Returns the terminal node's result columns and a CSV preview of its rows, plus per-node queryUuids.`;
21
+ Reuse across calls: every call returns a queryUuid per node. Referencing a queryUuid in the map form of "references" reads the stored result without re-running it or asking for approval. The artifact always shows your latest call's terminal result, so end with the pipeline that produces the table the user should see.`;
30
22
  const nodeIdSchema = zod_1.z
31
23
  .string()
32
24
  .regex(/^[a-zA-Z_][a-zA-Z0-9_]{0,62}$/, 'Node ids use letters, digits and underscores, starting with a letter or underscore')
33
25
  .describe('Names this query so other queries in the same submission can reference its results. Also the DuckDB table name its results are exposed as.');
26
+ const nodeTitleSchema = zod_1.z
27
+ .string()
28
+ .describe('Short label a reader understands without seeing the query, two to five words, e.g. "Revenue by month". Shown to users instead of the node id.');
29
+ const nodeDescriptionSchema = zod_1.z
30
+ .string()
31
+ .nullable()
32
+ .describe('One sentence on what this query does, only when the title is not enough. Null otherwise.');
33
+ const nodeMetaSchema = {
34
+ title: nodeTitleSchema,
35
+ description: nodeDescriptionSchema,
36
+ };
34
37
  const semanticLayerFiltersSchema = zod_1.z
35
38
  .object({
36
39
  dimensions: zod_1.z.unknown().optional(),
@@ -55,6 +58,7 @@ const createToolComposerQueriesArgsSchema = ({ maxLimit = exports.DEFAULT_COMPOS
55
58
  const semanticLayerNodeSchema = zod_1.z.object({
56
59
  sourceType: zod_1.z.literal(querySources_1.QuerySourceType.SEMANTIC_LAYER),
57
60
  nodeId: nodeIdSchema,
61
+ ...nodeMetaSchema,
58
62
  exploreName: zod_1.z
59
63
  .string()
60
64
  .describe('The explore to run the metric query against.'),
@@ -74,6 +78,7 @@ const createToolComposerQueriesArgsSchema = ({ maxLimit = exports.DEFAULT_COMPOS
74
78
  const sqlNodeSchema = zod_1.z.object({
75
79
  sourceType: zod_1.z.literal(querySources_1.QuerySourceType.SQL),
76
80
  nodeId: nodeIdSchema,
81
+ ...nodeMetaSchema,
77
82
  sql: zod_1.z
78
83
  .string()
79
84
  .describe("The SQL to execute against the project's data warehouse, in the warehouse's SQL dialect. Must be a SELECT (or WITH) statement."),
@@ -82,6 +87,7 @@ const createToolComposerQueriesArgsSchema = ({ maxLimit = exports.DEFAULT_COMPOS
82
87
  const duckdbNodeSchema = zod_1.z.object({
83
88
  sourceType: zod_1.z.literal(querySources_1.QuerySourceType.DUCKDB),
84
89
  nodeId: nodeIdSchema,
90
+ ...nodeMetaSchema,
85
91
  sql: zod_1.z
86
92
  .string()
87
93
  .describe('DuckDB SQL over the referenced results. Each reference is exposed as a table; its columns are the upstream result columns.'),
@@ -93,6 +99,7 @@ const createToolComposerQueriesArgsSchema = ({ maxLimit = exports.DEFAULT_COMPOS
93
99
  const externalNodeSchema = zod_1.z.object({
94
100
  sourceType: zod_1.z.literal(querySources_1.QuerySourceType.EXTERNAL),
95
101
  nodeId: nodeIdSchema,
102
+ ...nodeMetaSchema,
96
103
  sql: zod_1.z
97
104
  .string()
98
105
  .describe('DuckDB SQL over the declared external source tables. Each table is exposed under its name or map alias.'),
@@ -130,6 +137,10 @@ const createToolComposerQueriesArgsSchema = ({ maxLimit = exports.DEFAULT_COMPOS
130
137
  };
131
138
  exports.createToolComposerQueriesArgsSchema = createToolComposerQueriesArgsSchema;
132
139
  exports.toolComposerQueriesArgsSchema = (0, exports.createToolComposerQueriesArgsSchema)();
140
+ const toSourceQueryNodeMeta = (node) => ({
141
+ title: node.title,
142
+ description: node.description ?? undefined,
143
+ });
133
144
  /**
134
145
  * Converts a validated tool node into the canonical SourceQuery shape the
135
146
  * query source service takes. The explicit return types pin drift at compile
@@ -143,6 +154,7 @@ const toolComposerQueryNodeToSourceQuery = (node) => {
143
154
  return {
144
155
  sourceType: node.sourceType,
145
156
  nodeId: node.nodeId,
157
+ ...toSourceQueryNodeMeta(node),
146
158
  exploreName: node.exploreName,
147
159
  dimensions: node.dimensions,
148
160
  metrics: node.metrics,
@@ -155,6 +167,7 @@ const toolComposerQueryNodeToSourceQuery = (node) => {
155
167
  return {
156
168
  sourceType: node.sourceType,
157
169
  nodeId: node.nodeId,
170
+ ...toSourceQueryNodeMeta(node),
158
171
  sql: node.sql,
159
172
  limit: node.limit,
160
173
  };
@@ -162,6 +175,7 @@ const toolComposerQueryNodeToSourceQuery = (node) => {
162
175
  return {
163
176
  sourceType: node.sourceType,
164
177
  nodeId: node.nodeId,
178
+ ...toSourceQueryNodeMeta(node),
165
179
  sql: node.sql,
166
180
  references: node.references,
167
181
  limit: node.limit,
@@ -170,6 +184,7 @@ const toolComposerQueryNodeToSourceQuery = (node) => {
170
184
  return {
171
185
  sourceType: node.sourceType,
172
186
  nodeId: node.nodeId,
187
+ ...toSourceQueryNodeMeta(node),
173
188
  sql: node.sql,
174
189
  tables: node.tables,
175
190
  limit: node.limit,
@@ -213,12 +228,18 @@ const parsePartialToolComposerQueriesArgs = (input) => {
213
228
  if (typeof nodeId !== 'string' || nodeId.length === 0)
214
229
  return [];
215
230
  const sql = typeof node.sql === 'string' ? node.sql : '';
231
+ const meta = {
232
+ nodeId,
233
+ // Title falls back to the node id until it streams in
234
+ title: typeof node.title === 'string' ? node.title : nodeId,
235
+ description: typeof node.description === 'string' ? node.description : null,
236
+ };
216
237
  switch (node.sourceType) {
217
238
  case querySources_1.QuerySourceType.SEMANTIC_LAYER:
218
239
  return [
219
240
  {
220
241
  sourceType: querySources_1.QuerySourceType.SEMANTIC_LAYER,
221
- nodeId,
242
+ ...meta,
222
243
  exploreName: typeof node.exploreName === 'string'
223
244
  ? node.exploreName
224
245
  : '',
@@ -233,7 +254,7 @@ const parsePartialToolComposerQueriesArgs = (input) => {
233
254
  return [
234
255
  {
235
256
  sourceType: querySources_1.QuerySourceType.SQL,
236
- nodeId,
257
+ ...meta,
237
258
  sql,
238
259
  limit: exports.DEFAULT_COMPOSER_QUERY_LIMIT,
239
260
  },
@@ -242,7 +263,7 @@ const parsePartialToolComposerQueriesArgs = (input) => {
242
263
  return [
243
264
  {
244
265
  sourceType: querySources_1.QuerySourceType.DUCKDB,
245
- nodeId,
266
+ ...meta,
246
267
  sql,
247
268
  references: asReferenceMapOrArray(node.references),
248
269
  limit: exports.DEFAULT_COMPOSER_QUERY_LIMIT,
@@ -252,7 +273,7 @@ const parsePartialToolComposerQueriesArgs = (input) => {
252
273
  return [
253
274
  {
254
275
  sourceType: querySources_1.QuerySourceType.EXTERNAL,
255
- nodeId,
276
+ ...meta,
256
277
  sql,
257
278
  tables: asReferenceMapOrArray(node.tables),
258
279
  limit: exports.DEFAULT_COMPOSER_QUERY_LIMIT,
@@ -1 +1 @@
1
- {"version":3,"file":"toolComposerQueryArgs.js","sourceRoot":"","sources":["../../../../../../src/ee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U,EAAE,SAAS,CAAC,CAAC;KAC9D,CAAC;CACL,CAAC,CAAC"}
@@ -3098,7 +3098,7 @@
3098
3098
  "openWorldHint": false,
3099
3099
  "readOnlyHint": true
3100
3100
  },
3101
- "description": "Execute a composer query: a pipeline of one or more queries submitted together, where DuckDB queries can join and transform the results of the other queries. Results are stored as a chart artifact that renders the terminal node's results table in the thread.\n\nUse this tool when a single source cannot answer the question — e.g. joining a semantic layer metric query with an uploaded CSV, joining with raw warehouse SQL, or post-processing prior results with SQL. A pipeline may also be a single node: a lone \"sql\" node is how raw warehouse SQL runs when no standalone runSql tool is available.\n\nHow to build a pipeline:\n- Every query is a node. Name each node with \"nodeId\" (letters, digits, underscores; starting with a letter or underscore).\n- \"semanticLayer\" nodes run a metric query against an explore. Result columns are named by field id — exactly the dimensions and metrics requested (e.g. metric \"payments_total_revenue\" yields column \"payments_total_revenue\").\n- \"sql\" nodes run raw SQL against the project's data warehouse, in the warehouse's SQL dialect. Result columns are the SELECT output names. SQL execution may require the user to approve the SQL first.\n- \"external\" nodes run DuckDB SQL over durable external tables such as uploaded CSVs and connected data sources. Declare the tables via \"tables\": an array of table names, or a map of {sqlAlias: tableNameOrTableUuid}. Use the exact table name or UUID supplied in the user's attached-source context. One source may expose many tables, and one external node can read any subset of them. Result columns are the SELECT output names.\n- \"duckdb\" nodes run DuckDB SQL over other queries' results. Declare which results the SQL reads via \"references\": the shorthand array form lists node ids from this submission, each exposed as a table named by its node id ([\"orders\", \"revenue\"] lets the SQL run SELECT * FROM orders JOIN revenue ...); the map form aliases tables or references stored results by queryUuid ({\"o\": \"orders\", \"prev\": \"<queryUuid>\"}). A referenced table's columns are the upstream result's columns.\n- The \"terminal\" node is the one whose results the artifact shows and whose rows are returned to you. By default it is the unique sink (the one node no other node references); pass \"terminalNodeId\" explicitly when the pipeline has multiple sinks.\n\nResults are reusable across calls:\n- Every call returns a queryUuid per node. Any of them — not just the terminal one — can be referenced by a later call via the map form of \"references\".\n- Referencing a queryUuid reads the stored result; the query behind it is NOT re-run. A duckdb-only submission over stored results touches no source and needs no SQL approval, however many times you iterate.\n- This supports step-by-step work: run a source query once, then explore its result with as many follow-up duckdb submissions over the same queryUuid as you need.\n- The artifact shown in the thread always renders your LATEST call's terminal result, so finish with the submission that produces the table the user should see — referencing earlier queryUuids keeps that final pipeline small.\n\nReturns the terminal node's result columns and a CSV preview of its rows, plus per-node queryUuids.",
3101
+ "description": "Run a pipeline: one or more queries submitted together, where duckdb queries join or transform the others' results. The terminal node's table is shown in the thread as a chart artifact and its rows are returned to you.\n\nNode kinds:\n- \"semanticLayer\": a metric query against an explore. Result columns are the requested field ids.\n- \"sql\": raw SQL against the project warehouse; may need user approval. A lone sql node is how raw SQL runs when there is no runSql tool.\n- \"external\": DuckDB SQL over uploaded or connected tables declared in \"tables\".\n- \"duckdb\": DuckDB SQL over other results declared in \"references\".\n\nEvery node has a \"nodeId\" (for references) and a \"title\" (what users see). The terminal node is the unique sink by default, or \"terminalNodeId\".\n\nReuse across calls: every call returns a queryUuid per node. Referencing a queryUuid in the map form of \"references\" reads the stored result without re-running it or asking for approval. The artifact always shows your latest call's terminal result, so end with the pipeline that produces the table the user should see.",
3102
3102
  "inputSchema": {
3103
3103
  "$schema": "http://json-schema.org/draft-07/schema#",
3104
3104
  "properties": {
@@ -3112,6 +3112,10 @@
3112
3112
  "anyOf": [
3113
3113
  {
3114
3114
  "properties": {
3115
+ "description": {
3116
+ "description": "One sentence on what this query does, only when the title is not enough. Null otherwise.",
3117
+ "type": "string"
3118
+ },
3115
3119
  "dimensions": {
3116
3120
  "description": "Dimension field ids to group by, from the explore's schema.",
3117
3121
  "items": {
@@ -3175,11 +3179,16 @@
3175
3179
  "sourceType": {
3176
3180
  "const": "semanticLayer",
3177
3181
  "type": "string"
3182
+ },
3183
+ "title": {
3184
+ "description": "Short label a reader understands without seeing the query, two to five words, e.g. \"Revenue by month\". Shown to users instead of the node id.",
3185
+ "type": "string"
3178
3186
  }
3179
3187
  },
3180
3188
  "required": [
3181
3189
  "sourceType",
3182
3190
  "nodeId",
3191
+ "title",
3183
3192
  "exploreName",
3184
3193
  "dimensions",
3185
3194
  "metrics"
@@ -3188,6 +3197,10 @@
3188
3197
  },
3189
3198
  {
3190
3199
  "properties": {
3200
+ "description": {
3201
+ "description": "One sentence on what this query does, only when the title is not enough. Null otherwise.",
3202
+ "type": "string"
3203
+ },
3191
3204
  "limit": {
3192
3205
  "default": 500,
3193
3206
  "description": "Maximum number of rows this node returns. Defaults to 500, max 5000.",
@@ -3207,13 +3220,26 @@
3207
3220
  "sql": {
3208
3221
  "description": "The SQL to execute against the project's data warehouse, in the warehouse's SQL dialect. Must be a SELECT (or WITH) statement.",
3209
3222
  "type": "string"
3223
+ },
3224
+ "title": {
3225
+ "description": "Short label a reader understands without seeing the query, two to five words, e.g. \"Revenue by month\". Shown to users instead of the node id.",
3226
+ "type": "string"
3210
3227
  }
3211
3228
  },
3212
- "required": ["sourceType", "nodeId", "sql"],
3229
+ "required": [
3230
+ "sourceType",
3231
+ "nodeId",
3232
+ "title",
3233
+ "sql"
3234
+ ],
3213
3235
  "type": "object"
3214
3236
  },
3215
3237
  {
3216
3238
  "properties": {
3239
+ "description": {
3240
+ "description": "One sentence on what this query does, only when the title is not enough. Null otherwise.",
3241
+ "type": "string"
3242
+ },
3217
3243
  "limit": {
3218
3244
  "default": 500,
3219
3245
  "description": "Maximum number of rows this node returns. Defaults to 500, max 5000.",
@@ -3253,11 +3279,16 @@
3253
3279
  "sql": {
3254
3280
  "description": "DuckDB SQL over the referenced results. Each reference is exposed as a table; its columns are the upstream result columns.",
3255
3281
  "type": "string"
3282
+ },
3283
+ "title": {
3284
+ "description": "Short label a reader understands without seeing the query, two to five words, e.g. \"Revenue by month\". Shown to users instead of the node id.",
3285
+ "type": "string"
3256
3286
  }
3257
3287
  },
3258
3288
  "required": [
3259
3289
  "sourceType",
3260
3290
  "nodeId",
3291
+ "title",
3261
3292
  "sql",
3262
3293
  "references"
3263
3294
  ],
@@ -3265,6 +3296,10 @@
3265
3296
  },
3266
3297
  {
3267
3298
  "properties": {
3299
+ "description": {
3300
+ "description": "One sentence on what this query does, only when the title is not enough. Null otherwise.",
3301
+ "type": "string"
3302
+ },
3268
3303
  "limit": {
3269
3304
  "default": 500,
3270
3305
  "description": "Maximum number of rows this node returns. Defaults to 500, max 5000.",
@@ -3304,11 +3339,16 @@
3304
3339
  }
3305
3340
  ],
3306
3341
  "description": "External tables read by this query: an array of table names, or a map of {sqlAlias: tableNameOrTableUuid}. Prefer table UUIDs from attached-source context so renames cannot break the query."
3342
+ },
3343
+ "title": {
3344
+ "description": "Short label a reader understands without seeing the query, two to five words, e.g. \"Revenue by month\". Shown to users instead of the node id.",
3345
+ "type": "string"
3307
3346
  }
3308
3347
  },
3309
3348
  "required": [
3310
3349
  "sourceType",
3311
3350
  "nodeId",
3351
+ "title",
3312
3352
  "sql",
3313
3353
  "tables"
3314
3354
  ],
@@ -96,7 +96,7 @@ import { type RedshiftAwsSsoCompleteResults, type RedshiftAwsSsoStartResults, ty
96
96
  import { type ApiChartValidationResponse, type ApiDashboardValidationResponse, type ApiPaginatedValidateResponse, type ApiSingleValidationResponse, type ApiValidationSummaryResponse, type ValidationResponse } from './validation';
97
97
  import { type ApiWarehouseTableFields, type ApiWarehouseTablesCatalog } from './warehouse';
98
98
  import { type ApiWarehouseConnectCodeClaimResponse, type ApiWarehouseConnectCodeResponse } from './warehouseConnectCode';
99
- import { type ApiWarehouseConnectionResponse, type ApiWarehouseConnectionsResponse, type ApiWarehouseConnectionWithCredentialsResponse } from './warehouseConnections';
99
+ import { type ApiWarehouseConnectionResponse, type ApiWarehouseConnectionsForUserCredentialsResponse, type ApiWarehouseConnectionsResponse, type ApiWarehouseConnectionUserCredentialsResponse, type ApiWarehouseConnectionWithCredentialsResponse } from './warehouseConnections';
100
100
  export type ApiGetDashboardPreAggregateAuditResponse = {
101
101
  status: 'ok';
102
102
  results: DashboardPreAggregateAudit;
@@ -745,7 +745,7 @@ export type ApiCreateProjectResults = {
745
745
  };
746
746
  export type ProjectSavedChartStatus = boolean;
747
747
  export type ApiFlashResults = Record<string, string[]>;
748
- type ApiResults = ApiWarehouseConnectionsResponse['results'] | ApiWarehouseConnectionResponse['results'] | ApiWarehouseConnectionWithCredentialsResponse['results'] | Document | DocumentList | ContentReviewRequest | ContentReviewRequestDetail | ContentReviewSettings | ContentReviewSimilarContentItem[] | KnexPaginatedData<ContentReviewRequestListItem[]> | BigqueryProjectRecommendation | ApiScimRequestLogListResponse['results'] | EnsurePlaygroundProjectResults | AnalyticsProjectStatus | EnsureAnalyticsProjectResult | CreateTrainingPreviewResults | ApiWarehouseConnectCodeResponse['results'] | ApiWarehouseConnectCodeClaimResponse['results'] | ApiQueryResults | ApiSqlQueryResults | ApiCompiledQueryResults | ApiCompiledMergeQueryResults | ApiExecuteAsyncMergeQueryResults | ApiFormulaValidationResults | ApiExploresResults | ApiExploreResults | ApiStatusResults | ApiRefreshResults | ApiCreatePreviewResults | ApiDataTimezonePreviewResults | WarehouseConnectionTestResults | ApiUpstreamDiffResults | ApiHealthResults | OrganizationAccess | Organization | LightdashUser | LoginOptions | SavedChart | SavedChart[] | Space[] | InviteLink | OrganizationProject[] | Project | WarehouseCredentials | OrganizationMemberProfile[] | ProjectCatalog | TablesConfiguration | Dashboard | DashboardBasicDetails[] | OnboardingStatus | Dashboard[] | DeleteOpenIdentity | ApiFlashResults | Record<OpenIdIdentitySummary['issuerType'], OpenIdIdentitySummary[]> | FilterableField[] | DashboardAvailableFilters | ProjectSavedChartStatus | null | Array<unknown> | ApiJobStartedResults | ApiCreateUserTokenResults | CreatePersonalAccessToken | PersonalAccessToken | ProjectMemberProfile[] | ProjectGroupAccess | SearchResults | Space | ShareUrl | SlackSettings | ApiSlackChannelsResponse['results'] | UserActivity | SchedulerAndTargets | SchedulerAndTargets[] | SchedulerAiAugmentation | FieldValueSearchResult | ApiDownloadCsv | AllowedEmailDomains | AzureAdSsoConfigSummary | OktaSsoConfigSummary | GenericOidcSsoConfigSummary | OneLoginSsoConfigSummary | OrganizationSettings | UpdateAllowedEmailDomains | UserAllowedOrganization[] | EmailStatusExpiring | DomainVerificationStatus | VerifiedDomain[] | ApiScheduledDownloadCsv | PinnedItems | ViewStatistics | SchedulerWithLogs | ValidationResponse[] | ApiPaginatedValidateResponse['results'] | ApiValidationSummaryResponse['results'] | ApiRoadmapResponse['results'] | ApiRoadmapProjectResponse['results'] | ApiRoadmapFollowProjectResponse['results'] | ChartHistory | ChartVersion | DashboardHistory | DashboardCustomMetricUpdateResult | DashboardVersion | EmbedUrl | DecodedEmbed | Array<GitRepo> | PullRequestCreated | PullRequestPreview | ProjectFiles | ProjectCiStatus | ApiGitFileContent | GitIntegrationConfiguration | GithubUserCredential | JiraInstallation | JiraInstallUrl | Array<JiraSite> | Array<JiraProject> | Array<JiraIssueType> | LinearInstallation | Array<LinearTeam> | Array<LinearProject> | CiChecks | MergePullRequestResult | ClosePullRequestResult | {
748
+ type ApiResults = ApiWarehouseConnectionsResponse['results'] | ApiWarehouseConnectionResponse['results'] | ApiWarehouseConnectionWithCredentialsResponse['results'] | ApiWarehouseConnectionUserCredentialsResponse['results'] | ApiWarehouseConnectionsForUserCredentialsResponse['results'] | Document | DocumentList | ContentReviewRequest | ContentReviewRequestDetail | ContentReviewSettings | ContentReviewSimilarContentItem[] | KnexPaginatedData<ContentReviewRequestListItem[]> | BigqueryProjectRecommendation | ApiScimRequestLogListResponse['results'] | EnsurePlaygroundProjectResults | AnalyticsProjectStatus | EnsureAnalyticsProjectResult | CreateTrainingPreviewResults | ApiWarehouseConnectCodeResponse['results'] | ApiWarehouseConnectCodeClaimResponse['results'] | ApiQueryResults | ApiSqlQueryResults | ApiCompiledQueryResults | ApiCompiledMergeQueryResults | ApiExecuteAsyncMergeQueryResults | ApiFormulaValidationResults | ApiExploresResults | ApiExploreResults | ApiStatusResults | ApiRefreshResults | ApiCreatePreviewResults | ApiDataTimezonePreviewResults | WarehouseConnectionTestResults | ApiUpstreamDiffResults | ApiHealthResults | OrganizationAccess | Organization | LightdashUser | LoginOptions | SavedChart | SavedChart[] | Space[] | InviteLink | OrganizationProject[] | Project | WarehouseCredentials | OrganizationMemberProfile[] | ProjectCatalog | TablesConfiguration | Dashboard | DashboardBasicDetails[] | OnboardingStatus | Dashboard[] | DeleteOpenIdentity | ApiFlashResults | Record<OpenIdIdentitySummary['issuerType'], OpenIdIdentitySummary[]> | FilterableField[] | DashboardAvailableFilters | ProjectSavedChartStatus | null | Array<unknown> | ApiJobStartedResults | ApiCreateUserTokenResults | CreatePersonalAccessToken | PersonalAccessToken | ProjectMemberProfile[] | ProjectGroupAccess | SearchResults | Space | ShareUrl | SlackSettings | ApiSlackChannelsResponse['results'] | UserActivity | SchedulerAndTargets | SchedulerAndTargets[] | SchedulerAiAugmentation | FieldValueSearchResult | ApiDownloadCsv | AllowedEmailDomains | AzureAdSsoConfigSummary | OktaSsoConfigSummary | GenericOidcSsoConfigSummary | OneLoginSsoConfigSummary | OrganizationSettings | UpdateAllowedEmailDomains | UserAllowedOrganization[] | EmailStatusExpiring | DomainVerificationStatus | VerifiedDomain[] | ApiScheduledDownloadCsv | PinnedItems | ViewStatistics | SchedulerWithLogs | ValidationResponse[] | ApiPaginatedValidateResponse['results'] | ApiValidationSummaryResponse['results'] | ApiRoadmapResponse['results'] | ApiRoadmapProjectResponse['results'] | ApiRoadmapFollowProjectResponse['results'] | ChartHistory | ChartVersion | DashboardHistory | DashboardCustomMetricUpdateResult | DashboardVersion | EmbedUrl | DecodedEmbed | Array<GitRepo> | PullRequestCreated | PullRequestPreview | ProjectFiles | ProjectCiStatus | ApiGitFileContent | GitIntegrationConfiguration | GithubUserCredential | JiraInstallation | JiraInstallUrl | Array<JiraSite> | Array<JiraProject> | Array<JiraIssueType> | LinearInstallation | Array<LinearTeam> | Array<LinearProject> | CiChecks | MergePullRequestResult | ClosePullRequestResult | {
749
749
  diff: string;
750
750
  } | GitBranch | GitBranch[] | GitFileOrDirectory | {
751
751
  sha: string;