@outsidedata/dolex 0.1.13 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/dist/src/analysis/rules.d.ts.map +1 -1
- package/dist/src/analysis/rules.js +8 -2
- package/dist/src/analysis/rules.js.map +1 -1
- package/dist/src/connectors/csv.d.ts.map +1 -1
- package/dist/src/connectors/csv.js +31 -1
- package/dist/src/connectors/csv.js.map +1 -1
- package/dist/src/connectors/dsl-compiler.d.ts +7 -6
- package/dist/src/connectors/dsl-compiler.d.ts.map +1 -1
- package/dist/src/connectors/dsl-compiler.js +72 -79
- package/dist/src/connectors/dsl-compiler.js.map +1 -1
- package/dist/src/connectors/dsl-validator.js +6 -1
- package/dist/src/connectors/dsl-validator.js.map +1 -1
- package/dist/src/connectors/index.d.ts +0 -3
- package/dist/src/connectors/index.d.ts.map +1 -1
- package/dist/src/connectors/index.js +0 -3
- package/dist/src/connectors/index.js.map +1 -1
- package/dist/src/connectors/js-aggregation.d.ts +4 -4
- package/dist/src/connectors/js-aggregation.d.ts.map +1 -1
- package/dist/src/connectors/js-aggregation.js +22 -16
- package/dist/src/connectors/js-aggregation.js.map +1 -1
- package/dist/src/connectors/manager.d.ts.map +1 -1
- package/dist/src/connectors/manager.js +4 -21
- package/dist/src/connectors/manager.js.map +1 -1
- package/dist/src/mcp/app-shell.js +1 -1
- package/dist/src/mcp/index.d.ts +8 -8
- package/dist/src/mcp/index.js +87 -53
- package/dist/src/mcp/index.js.map +1 -1
- package/dist/src/mcp/prompts.js +4 -4
- package/dist/src/mcp/prompts.js.map +1 -1
- package/dist/src/mcp/spec-store.d.ts +2 -1
- package/dist/src/mcp/spec-store.d.ts.map +1 -1
- package/dist/src/mcp/spec-store.js +4 -2
- package/dist/src/mcp/spec-store.js.map +1 -1
- package/dist/src/mcp/tools/analyze.d.ts +1 -1
- package/dist/src/mcp/tools/analyze.js +2 -2
- package/dist/src/mcp/tools/analyze.js.map +1 -1
- package/dist/src/mcp/tools/bug-report.d.ts.map +1 -1
- package/dist/src/mcp/tools/bug-report.js +2 -10
- package/dist/src/mcp/tools/bug-report.js.map +1 -1
- package/dist/src/mcp/tools/dashboard.js +1 -1
- package/dist/src/mcp/tools/dashboard.js.map +1 -1
- package/dist/src/mcp/tools/dsl-schemas.d.ts +53 -52
- package/dist/src/mcp/tools/dsl-schemas.d.ts.map +1 -1
- package/dist/src/mcp/tools/dsl-schemas.js +3 -3
- package/dist/src/mcp/tools/dsl-schemas.js.map +1 -1
- package/dist/src/mcp/tools/export-html.d.ts +1 -1
- package/dist/src/mcp/tools/export-html.js +2 -2
- package/dist/src/mcp/tools/export-html.js.map +1 -1
- package/dist/src/mcp/tools/list-patterns.js +2 -2
- package/dist/src/mcp/tools/list-patterns.js.map +1 -1
- package/dist/src/mcp/tools/query-source.d.ts +17 -17
- package/dist/src/mcp/tools/query-source.js +4 -4
- package/dist/src/mcp/tools/query-source.js.map +1 -1
- package/dist/src/mcp/tools/refine.d.ts +124 -15
- package/dist/src/mcp/tools/refine.d.ts.map +1 -1
- package/dist/src/mcp/tools/refine.js +335 -253
- package/dist/src/mcp/tools/refine.js.map +1 -1
- package/dist/src/mcp/tools/result-cache.d.ts +1 -1
- package/dist/src/mcp/tools/result-cache.js +1 -1
- package/dist/src/mcp/tools/screenshot.js +1 -1
- package/dist/src/mcp/tools/screenshot.js.map +1 -1
- package/dist/src/mcp/tools/server-privacy.d.ts.map +1 -1
- package/dist/src/mcp/tools/server-privacy.js +6 -7
- package/dist/src/mcp/tools/server-privacy.js.map +1 -1
- package/dist/src/mcp/tools/shared.d.ts +15 -2
- package/dist/src/mcp/tools/shared.d.ts.map +1 -1
- package/dist/src/mcp/tools/shared.js +64 -6
- package/dist/src/mcp/tools/shared.js.map +1 -1
- package/dist/src/mcp/tools/sources.d.ts +5 -113
- package/dist/src/mcp/tools/sources.d.ts.map +1 -1
- package/dist/src/mcp/tools/sources.js +15 -44
- package/dist/src/mcp/tools/sources.js.map +1 -1
- package/dist/src/mcp/tools/visualize-from-source.d.ts +53 -77
- package/dist/src/mcp/tools/visualize-from-source.d.ts.map +1 -1
- package/dist/src/mcp/tools/visualize-from-source.js +24 -9
- package/dist/src/mcp/tools/visualize-from-source.js.map +1 -1
- package/dist/src/mcp/tools/visualize.d.ts +47 -102
- package/dist/src/mcp/tools/visualize.d.ts.map +1 -1
- package/dist/src/mcp/tools/visualize.js +24 -24
- package/dist/src/mcp/tools/visualize.js.map +1 -1
- package/dist/src/patterns/definitions/comparison/grouped-bar.js +5 -5
- package/dist/src/patterns/definitions/comparison/grouped-bar.js.map +1 -1
- package/dist/src/patterns/definitions/composition/waffle.d.ts.map +1 -1
- package/dist/src/patterns/definitions/composition/waffle.js +17 -3
- package/dist/src/patterns/definitions/composition/waffle.js.map +1 -1
- package/dist/src/patterns/definitions/distribution/strip-plot.d.ts.map +1 -1
- package/dist/src/patterns/definitions/distribution/strip-plot.js +12 -3
- package/dist/src/patterns/definitions/distribution/strip-plot.js.map +1 -1
- package/dist/src/patterns/definitions/time/sparkline-grid.js +2 -2
- package/dist/src/patterns/definitions/time/sparkline-grid.js.map +1 -1
- package/dist/src/patterns/selector.d.ts.map +1 -1
- package/dist/src/patterns/selector.js +46 -1
- package/dist/src/patterns/selector.js.map +1 -1
- package/dist/src/renderers/d3/comparison/bar.d.ts.map +1 -1
- package/dist/src/renderers/d3/comparison/bar.js +24 -1
- package/dist/src/renderers/d3/comparison/bar.js.map +1 -1
- package/dist/src/renderers/d3/comparison/grouped-bar.d.ts.map +1 -1
- package/dist/src/renderers/d3/comparison/grouped-bar.js +9 -4
- package/dist/src/renderers/d3/comparison/grouped-bar.js.map +1 -1
- package/dist/src/renderers/d3/composition/donut.d.ts.map +1 -1
- package/dist/src/renderers/d3/composition/donut.js +12 -0
- package/dist/src/renderers/d3/composition/donut.js.map +1 -1
- package/dist/src/renderers/d3/composition/stacked-bar.d.ts.map +1 -1
- package/dist/src/renderers/d3/composition/stacked-bar.js +4 -0
- package/dist/src/renderers/d3/composition/stacked-bar.js.map +1 -1
- package/dist/src/renderers/d3/composition/treemap.js +2 -1
- package/dist/src/renderers/d3/composition/treemap.js.map +1 -1
- package/dist/src/renderers/d3/distribution/beeswarm.d.ts.map +1 -1
- package/dist/src/renderers/d3/distribution/beeswarm.js +8 -0
- package/dist/src/renderers/d3/distribution/beeswarm.js.map +1 -1
- package/dist/src/renderers/d3/distribution/histogram.js +36 -2
- package/dist/src/renderers/d3/distribution/histogram.js.map +1 -1
- package/dist/src/renderers/d3/flow/funnel.d.ts.map +1 -1
- package/dist/src/renderers/d3/flow/funnel.js +4 -0
- package/dist/src/renderers/d3/flow/funnel.js.map +1 -1
- package/dist/src/renderers/d3/flow/sankey-layout.js +20 -3
- package/dist/src/renderers/d3/flow/sankey-layout.js.map +1 -1
- package/dist/src/renderers/d3/heatmap.d.ts.map +1 -1
- package/dist/src/renderers/d3/heatmap.js +18 -3
- package/dist/src/renderers/d3/heatmap.js.map +1 -1
- package/dist/src/renderers/d3/radar.d.ts.map +1 -1
- package/dist/src/renderers/d3/radar.js +3 -1
- package/dist/src/renderers/d3/radar.js.map +1 -1
- package/dist/src/renderers/d3/relationship.d.ts.map +1 -1
- package/dist/src/renderers/d3/relationship.js +29 -7
- package/dist/src/renderers/d3/relationship.js.map +1 -1
- package/dist/src/renderers/d3/shared.js +7 -7
- package/dist/src/renderers/d3/shared.js.map +1 -1
- package/dist/src/renderers/d3/time/area.js +21 -7
- package/dist/src/renderers/d3/time/area.js.map +1 -1
- package/dist/src/renderers/d3/time/calendar-heatmap.js +6 -0
- package/dist/src/renderers/d3/time/calendar-heatmap.js.map +1 -1
- package/dist/src/renderers/d3/time/horizon-chart.d.ts.map +1 -1
- package/dist/src/renderers/d3/time/horizon-chart.js +10 -0
- package/dist/src/renderers/d3/time/horizon-chart.js.map +1 -1
- package/dist/src/renderers/d3/time/line.d.ts.map +1 -1
- package/dist/src/renderers/d3/time/line.js +27 -7
- package/dist/src/renderers/d3/time/line.js.map +1 -1
- package/dist/src/renderers/d3/time/small-multiples.js +8 -0
- package/dist/src/renderers/d3/time/small-multiples.js.map +1 -1
- package/dist/src/renderers/d3/time/sparkline-grid.d.ts.map +1 -1
- package/dist/src/renderers/d3/time/sparkline-grid.js +5 -2
- package/dist/src/renderers/d3/time/sparkline-grid.js.map +1 -1
- package/dist/src/renderers/d3/time/stream-graph.js +6 -0
- package/dist/src/renderers/d3/time/stream-graph.js.map +1 -1
- package/dist/src/renderers/html/_generated/bundles.d.ts +39 -39
- package/dist/src/renderers/html/_generated/bundles.d.ts.map +1 -1
- package/dist/src/renderers/html/_generated/bundles.js +39 -39
- package/dist/src/renderers/html/_generated/bundles.js.map +1 -1
- package/dist/src/renderers/html/builders/dashboard.js +2 -2
- package/dist/src/renderers/html/template.js +2 -2
- package/dist/src/renderers/html/template.js.map +1 -1
- package/dist/src/types.d.ts +33 -26
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/package.json +2 -4
- package/src/analysis/rules.ts +10 -2
- package/src/connectors/csv.ts +31 -1
- package/src/connectors/dsl-compiler.ts +76 -82
- package/src/connectors/dsl-validator.ts +6 -1
- package/src/connectors/index.ts +0 -3
- package/src/connectors/js-aggregation.ts +20 -15
- package/src/connectors/manager.ts +4 -24
- package/src/mcp/app-shell.ts +1 -1
- package/src/mcp/index.ts +87 -53
- package/src/mcp/prompts.ts +4 -4
- package/src/mcp/spec-store.ts +5 -1
- package/src/mcp/tools/analyze.ts +2 -2
- package/src/mcp/tools/bug-report.ts +2 -10
- package/src/mcp/tools/dashboard.ts +1 -1
- package/src/mcp/tools/dsl-schemas.ts +3 -3
- package/src/mcp/tools/export-html.ts +2 -2
- package/src/mcp/tools/list-patterns.ts +2 -2
- package/src/mcp/tools/query-source.ts +4 -4
- package/src/mcp/tools/refine.ts +333 -258
- package/src/mcp/tools/result-cache.ts +1 -1
- package/src/mcp/tools/screenshot.ts +1 -1
- package/src/mcp/tools/server-privacy.ts +6 -7
- package/src/mcp/tools/shared.ts +70 -7
- package/src/mcp/tools/sources.ts +18 -46
- package/src/mcp/tools/visualize-from-source.ts +24 -9
- package/src/mcp/tools/visualize.ts +27 -27
- package/src/patterns/definitions/comparison/grouped-bar.ts +5 -5
- package/src/patterns/definitions/composition/waffle.ts +17 -3
- package/src/patterns/definitions/distribution/strip-plot.ts +12 -3
- package/src/patterns/definitions/time/sparkline-grid.ts +2 -2
- package/src/patterns/selector.ts +47 -1
- package/src/renderers/d3/comparison/bar.ts +24 -1
- package/src/renderers/d3/comparison/grouped-bar.ts +9 -4
- package/src/renderers/d3/composition/donut.ts +14 -0
- package/src/renderers/d3/composition/stacked-bar.ts +5 -0
- package/src/renderers/d3/composition/treemap.ts +2 -1
- package/src/renderers/d3/distribution/beeswarm.ts +12 -0
- package/src/renderers/d3/distribution/histogram.ts +44 -2
- package/src/renderers/d3/flow/funnel.ts +8 -0
- package/src/renderers/d3/flow/sankey-layout.ts +23 -3
- package/src/renderers/d3/heatmap.ts +20 -2
- package/src/renderers/d3/radar.ts +4 -1
- package/src/renderers/d3/relationship.ts +31 -6
- package/src/renderers/d3/shared.ts +7 -7
- package/src/renderers/d3/time/area.ts +22 -7
- package/src/renderers/d3/time/calendar-heatmap.ts +5 -0
- package/src/renderers/d3/time/horizon-chart.ts +11 -0
- package/src/renderers/d3/time/line.ts +24 -9
- package/src/renderers/d3/time/small-multiples.ts +6 -0
- package/src/renderers/d3/time/sparkline-grid.ts +5 -2
- package/src/renderers/d3/time/stream-graph.ts +5 -0
- package/src/renderers/html/_generated/bundles.ts +39 -39
- package/src/renderers/html/builders/dashboard.ts +2 -2
- package/src/renderers/html/template.ts +2 -2
- package/src/types.ts +21 -33
- package/src/connectors/mysql.ts +0 -378
- package/src/connectors/postgres.ts +0 -367
- package/src/connectors/sqlite.ts +0 -364
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sources.js","sourceRoot":"","sources":["../../../../src/mcp/tools/sources.ts"],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,CAAC,MAAM,CAAC,CAAC,CAC3E,CAAC;QAEF,OAAO,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC3D,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* MCP Tool:
|
|
2
|
+
* MCP Tool: visualize_data
|
|
3
3
|
* Takes a data source + DSL query + intent and returns visualization
|
|
4
4
|
* recommendations from the handcrafted pattern library.
|
|
5
5
|
*
|
|
@@ -172,10 +172,6 @@ export declare const visualizeFromSourceInputSchema: z.ZodObject<{
|
|
|
172
172
|
op: "=" | "!=" | ">" | ">=" | "<" | "<=" | "in" | "not_in" | "between" | "is_null" | "is_not_null";
|
|
173
173
|
value?: any;
|
|
174
174
|
}[] | undefined;
|
|
175
|
-
groupBy?: (string | {
|
|
176
|
-
field: string;
|
|
177
|
-
bucket: "day" | "week" | "month" | "quarter" | "year";
|
|
178
|
-
})[] | undefined;
|
|
179
175
|
having?: {
|
|
180
176
|
field: string;
|
|
181
177
|
op: "=" | "!=" | ">" | ">=" | "<" | "<=" | "in" | "not_in" | "between" | "is_null" | "is_not_null";
|
|
@@ -185,6 +181,10 @@ export declare const visualizeFromSourceInputSchema: z.ZodObject<{
|
|
|
185
181
|
field: string;
|
|
186
182
|
direction: "asc" | "desc";
|
|
187
183
|
}[] | undefined;
|
|
184
|
+
groupBy?: (string | {
|
|
185
|
+
field: string;
|
|
186
|
+
bucket: "day" | "week" | "month" | "quarter" | "year";
|
|
187
|
+
})[] | undefined;
|
|
188
188
|
limit?: number | undefined;
|
|
189
189
|
}, {
|
|
190
190
|
select: (string | {
|
|
@@ -217,10 +217,6 @@ export declare const visualizeFromSourceInputSchema: z.ZodObject<{
|
|
|
217
217
|
op: "=" | "!=" | ">" | ">=" | "<" | "<=" | "in" | "not_in" | "between" | "is_null" | "is_not_null";
|
|
218
218
|
value?: any;
|
|
219
219
|
}[] | undefined;
|
|
220
|
-
groupBy?: (string | {
|
|
221
|
-
field: string;
|
|
222
|
-
bucket: "day" | "week" | "month" | "quarter" | "year";
|
|
223
|
-
})[] | undefined;
|
|
224
220
|
having?: {
|
|
225
221
|
field: string;
|
|
226
222
|
op: "=" | "!=" | ">" | ">=" | "<" | "<=" | "in" | "not_in" | "between" | "is_null" | "is_not_null";
|
|
@@ -230,6 +226,10 @@ export declare const visualizeFromSourceInputSchema: z.ZodObject<{
|
|
|
230
226
|
field: string;
|
|
231
227
|
direction: "asc" | "desc";
|
|
232
228
|
}[] | undefined;
|
|
229
|
+
groupBy?: (string | {
|
|
230
|
+
field: string;
|
|
231
|
+
bucket: "day" | "week" | "month" | "quarter" | "year";
|
|
232
|
+
})[] | undefined;
|
|
233
233
|
limit?: number | undefined;
|
|
234
234
|
}>, {
|
|
235
235
|
select: (string | {
|
|
@@ -262,10 +262,6 @@ export declare const visualizeFromSourceInputSchema: z.ZodObject<{
|
|
|
262
262
|
op: "=" | "!=" | ">" | ">=" | "<" | "<=" | "in" | "not_in" | "between" | "is_null" | "is_not_null";
|
|
263
263
|
value?: any;
|
|
264
264
|
}[] | undefined;
|
|
265
|
-
groupBy?: (string | {
|
|
266
|
-
field: string;
|
|
267
|
-
bucket: "day" | "week" | "month" | "quarter" | "year";
|
|
268
|
-
})[] | undefined;
|
|
269
265
|
having?: {
|
|
270
266
|
field: string;
|
|
271
267
|
op: "=" | "!=" | ">" | ">=" | "<" | "<=" | "in" | "not_in" | "between" | "is_null" | "is_not_null";
|
|
@@ -275,6 +271,10 @@ export declare const visualizeFromSourceInputSchema: z.ZodObject<{
|
|
|
275
271
|
field: string;
|
|
276
272
|
direction: "asc" | "desc";
|
|
277
273
|
}[] | undefined;
|
|
274
|
+
groupBy?: (string | {
|
|
275
|
+
field: string;
|
|
276
|
+
bucket: "day" | "week" | "month" | "quarter" | "year";
|
|
277
|
+
})[] | undefined;
|
|
278
278
|
limit?: number | undefined;
|
|
279
279
|
}, unknown>;
|
|
280
280
|
intent: z.ZodString;
|
|
@@ -335,44 +335,24 @@ export declare const visualizeFromSourceInputSchema: z.ZodObject<{
|
|
|
335
335
|
title: z.ZodOptional<z.ZodString>;
|
|
336
336
|
subtitle: z.ZodOptional<z.ZodString>;
|
|
337
337
|
includeDataTable: z.ZodOptional<z.ZodBoolean>;
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
mutedOpacity: z.ZodOptional<z.ZodNumber>;
|
|
345
|
-
}, "strip", z.ZodTypeAny, {
|
|
346
|
-
values: any[];
|
|
347
|
-
color?: string | string[] | undefined;
|
|
348
|
-
mutedColor?: string | undefined;
|
|
349
|
-
mutedOpacity?: number | undefined;
|
|
350
|
-
}, {
|
|
351
|
-
values: any[];
|
|
352
|
-
color?: string | string[] | undefined;
|
|
353
|
-
mutedColor?: string | undefined;
|
|
354
|
-
mutedOpacity?: number | undefined;
|
|
355
|
-
}>>;
|
|
356
|
-
colorField: z.ZodOptional<z.ZodString>;
|
|
338
|
+
palette: z.ZodOptional<z.ZodEnum<["categorical", "blue", "green", "purple", "warm", "blueRed", "greenPurple", "tealOrange", "redGreen", "traffic-light", "profit-loss", "temperature"]>>;
|
|
339
|
+
highlight: z.ZodOptional<z.ZodObject<{
|
|
340
|
+
values: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
|
|
341
|
+
color: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
342
|
+
mutedColor: z.ZodOptional<z.ZodString>;
|
|
343
|
+
mutedOpacity: z.ZodOptional<z.ZodNumber>;
|
|
357
344
|
}, "strip", z.ZodTypeAny, {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
mutedOpacity?: number | undefined;
|
|
363
|
-
} | undefined;
|
|
364
|
-
colorField?: string | undefined;
|
|
365
|
-
palette?: "categorical" | "blue" | "green" | "purple" | "warm" | "blueRed" | "greenPurple" | "tealOrange" | "redGreen" | "traffic-light" | "profit-loss" | "temperature" | undefined;
|
|
345
|
+
values: (string | number)[];
|
|
346
|
+
color?: string | string[] | undefined;
|
|
347
|
+
mutedColor?: string | undefined;
|
|
348
|
+
mutedOpacity?: number | undefined;
|
|
366
349
|
}, {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
mutedOpacity?: number | undefined;
|
|
372
|
-
} | undefined;
|
|
373
|
-
colorField?: string | undefined;
|
|
374
|
-
palette?: "categorical" | "blue" | "green" | "purple" | "warm" | "blueRed" | "greenPurple" | "tealOrange" | "redGreen" | "traffic-light" | "profit-loss" | "temperature" | undefined;
|
|
350
|
+
values: (string | number)[];
|
|
351
|
+
color?: string | string[] | undefined;
|
|
352
|
+
mutedColor?: string | undefined;
|
|
353
|
+
mutedOpacity?: number | undefined;
|
|
375
354
|
}>>;
|
|
355
|
+
colorField: z.ZodOptional<z.ZodString>;
|
|
376
356
|
maxAlternativeChartTypes: z.ZodOptional<z.ZodNumber>;
|
|
377
357
|
geoLevel: z.ZodOptional<z.ZodEnum<["country", "subdivision"]>>;
|
|
378
358
|
geoRegion: z.ZodOptional<z.ZodString>;
|
|
@@ -410,10 +390,6 @@ export declare const visualizeFromSourceInputSchema: z.ZodObject<{
|
|
|
410
390
|
op: "=" | "!=" | ">" | ">=" | "<" | "<=" | "in" | "not_in" | "between" | "is_null" | "is_not_null";
|
|
411
391
|
value?: any;
|
|
412
392
|
}[] | undefined;
|
|
413
|
-
groupBy?: (string | {
|
|
414
|
-
field: string;
|
|
415
|
-
bucket: "day" | "week" | "month" | "quarter" | "year";
|
|
416
|
-
})[] | undefined;
|
|
417
393
|
having?: {
|
|
418
394
|
field: string;
|
|
419
395
|
op: "=" | "!=" | ">" | ">=" | "<" | "<=" | "in" | "not_in" | "between" | "is_null" | "is_not_null";
|
|
@@ -423,11 +399,13 @@ export declare const visualizeFromSourceInputSchema: z.ZodObject<{
|
|
|
423
399
|
field: string;
|
|
424
400
|
direction: "asc" | "desc";
|
|
425
401
|
}[] | undefined;
|
|
402
|
+
groupBy?: (string | {
|
|
403
|
+
field: string;
|
|
404
|
+
bucket: "day" | "week" | "month" | "quarter" | "year";
|
|
405
|
+
})[] | undefined;
|
|
426
406
|
limit?: number | undefined;
|
|
427
407
|
};
|
|
428
408
|
sourceId: string;
|
|
429
|
-
pattern?: string | undefined;
|
|
430
|
-
title?: string | undefined;
|
|
431
409
|
columns?: {
|
|
432
410
|
type: "numeric" | "categorical" | "date" | "id" | "text";
|
|
433
411
|
name: string;
|
|
@@ -436,17 +414,17 @@ export declare const visualizeFromSourceInputSchema: z.ZodObject<{
|
|
|
436
414
|
nullCount?: number | undefined;
|
|
437
415
|
totalCount?: number | undefined;
|
|
438
416
|
}[] | undefined;
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
} | undefined;
|
|
447
|
-
colorField?: string | undefined;
|
|
448
|
-
palette?: "categorical" | "blue" | "green" | "purple" | "warm" | "blueRed" | "greenPurple" | "tealOrange" | "redGreen" | "traffic-light" | "profit-loss" | "temperature" | undefined;
|
|
417
|
+
pattern?: string | undefined;
|
|
418
|
+
title?: string | undefined;
|
|
419
|
+
highlight?: {
|
|
420
|
+
values: (string | number)[];
|
|
421
|
+
color?: string | string[] | undefined;
|
|
422
|
+
mutedColor?: string | undefined;
|
|
423
|
+
mutedOpacity?: number | undefined;
|
|
449
424
|
} | undefined;
|
|
425
|
+
colorField?: string | undefined;
|
|
426
|
+
palette?: "categorical" | "blue" | "green" | "purple" | "warm" | "blueRed" | "greenPurple" | "tealOrange" | "redGreen" | "traffic-light" | "profit-loss" | "temperature" | undefined;
|
|
427
|
+
geoRegion?: string | undefined;
|
|
450
428
|
dataShapeHints?: {
|
|
451
429
|
dateColumnCount?: number | undefined;
|
|
452
430
|
categoricalColumnCount?: number | undefined;
|
|
@@ -466,8 +444,6 @@ export declare const visualizeFromSourceInputSchema: z.ZodObject<{
|
|
|
466
444
|
table: string;
|
|
467
445
|
intent: string;
|
|
468
446
|
sourceId: string;
|
|
469
|
-
pattern?: string | undefined;
|
|
470
|
-
title?: string | undefined;
|
|
471
447
|
columns?: {
|
|
472
448
|
type: "numeric" | "categorical" | "date" | "id" | "text";
|
|
473
449
|
name: string;
|
|
@@ -476,17 +452,18 @@ export declare const visualizeFromSourceInputSchema: z.ZodObject<{
|
|
|
476
452
|
nullCount?: number | undefined;
|
|
477
453
|
totalCount?: number | undefined;
|
|
478
454
|
}[] | undefined;
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
} | undefined;
|
|
487
|
-
colorField?: string | undefined;
|
|
488
|
-
palette?: "categorical" | "blue" | "green" | "purple" | "warm" | "blueRed" | "greenPurple" | "tealOrange" | "redGreen" | "traffic-light" | "profit-loss" | "temperature" | undefined;
|
|
455
|
+
pattern?: string | undefined;
|
|
456
|
+
title?: string | undefined;
|
|
457
|
+
highlight?: {
|
|
458
|
+
values: (string | number)[];
|
|
459
|
+
color?: string | string[] | undefined;
|
|
460
|
+
mutedColor?: string | undefined;
|
|
461
|
+
mutedOpacity?: number | undefined;
|
|
489
462
|
} | undefined;
|
|
463
|
+
colorField?: string | undefined;
|
|
464
|
+
palette?: "categorical" | "blue" | "green" | "purple" | "warm" | "blueRed" | "greenPurple" | "tealOrange" | "redGreen" | "traffic-light" | "profit-loss" | "temperature" | undefined;
|
|
465
|
+
geoRegion?: string | undefined;
|
|
466
|
+
query?: unknown;
|
|
490
467
|
dataShapeHints?: {
|
|
491
468
|
dateColumnCount?: number | undefined;
|
|
492
469
|
categoricalColumnCount?: number | undefined;
|
|
@@ -502,7 +479,6 @@ export declare const visualizeFromSourceInputSchema: z.ZodObject<{
|
|
|
502
479
|
includeDataTable?: boolean | undefined;
|
|
503
480
|
maxAlternativeChartTypes?: number | undefined;
|
|
504
481
|
geoLevel?: "country" | "subdivision" | undefined;
|
|
505
|
-
query?: unknown;
|
|
506
482
|
}>;
|
|
507
483
|
export declare function handleVisualizeFromSource(selectPatterns: (input: VisualizeInput) => VisualizeOutput, deps: {
|
|
508
484
|
sourceManager: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visualize-from-source.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/visualize-from-source.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"visualize-from-source.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/visualize-from-source.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAUtE,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBzC,CAAC;AAEH,wBAAgB,yBAAyB,CACvC,cAAc,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,eAAe,EAC1D,IAAI,EAAE;IAAE,aAAa,EAAE,GAAG,CAAA;CAAE,IAId,MAAM,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC;;;;;;;;GAuCnE"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* MCP Tool:
|
|
2
|
+
* MCP Tool: visualize_data
|
|
3
3
|
* Takes a data source + DSL query + intent and returns visualization
|
|
4
4
|
* recommendations from the handcrafted pattern library.
|
|
5
5
|
*
|
|
6
6
|
* For inline data, use the `visualize` tool instead.
|
|
7
7
|
*/
|
|
8
8
|
import { z } from 'zod';
|
|
9
|
-
import { dslQuerySchema } from './dsl-schemas.js';
|
|
10
|
-
import {
|
|
11
|
-
import { errorResponse } from './shared.js';
|
|
9
|
+
import { dslQuerySchema, ALL_PALETTE_NAMES } from './dsl-schemas.js';
|
|
10
|
+
import { columnsSchema, dataShapeHintsSchema, handleVisualizeCore, } from './visualize.js';
|
|
11
|
+
import { errorResponse, inferColumns, applyTimeBucketColumnTypes, enhanceIntentForTimeBucket } from './shared.js';
|
|
12
12
|
import { logOperation, extractDslStructure } from './operation-log.js';
|
|
13
13
|
export const visualizeFromSourceInputSchema = z.object({
|
|
14
|
-
sourceId: z.string().describe('
|
|
14
|
+
sourceId: z.string().describe('Dataset ID returned by load_csv'),
|
|
15
15
|
table: z.string().describe('Base table within the source'),
|
|
16
16
|
query: dslQuerySchema.describe('Declarative query to slice/aggregate the data before visualizing'),
|
|
17
17
|
intent: z.string().describe('What the user wants to see — e.g., "compare sales by region", "show distribution of ages", "how do rankings change over time"'),
|
|
@@ -21,7 +21,15 @@ export const visualizeFromSourceInputSchema = z.object({
|
|
|
21
21
|
title: z.string().optional().describe('Chart title — set upfront to avoid a refine round-trip'),
|
|
22
22
|
subtitle: z.string().optional().describe('Chart subtitle — set upfront to avoid a refine round-trip'),
|
|
23
23
|
includeDataTable: z.boolean().optional().describe('Whether to add a companion sortable data table with linked highlighting below the chart. Default: true'),
|
|
24
|
-
|
|
24
|
+
palette: z.enum(ALL_PALETTE_NAMES).optional()
|
|
25
|
+
.describe('Named palette: categorical, blue, green, purple, warm, blueRed, etc.'),
|
|
26
|
+
highlight: z.object({
|
|
27
|
+
values: z.array(z.union([z.string(), z.number()])).describe('Values to emphasize'),
|
|
28
|
+
color: z.union([z.string(), z.array(z.string())]).optional(),
|
|
29
|
+
mutedColor: z.string().optional(),
|
|
30
|
+
mutedOpacity: z.number().optional(),
|
|
31
|
+
}).optional(),
|
|
32
|
+
colorField: z.string().optional().describe('Which data field to base colors on'),
|
|
25
33
|
maxAlternativeChartTypes: z.number().optional().describe('Max alternative chart type recommendations to return (default: 2, set 0 for none)'),
|
|
26
34
|
geoLevel: z.enum(['country', 'subdivision']).optional()
|
|
27
35
|
.describe('Geographic level: "country" (each row = a nation) or "subdivision" (each row = a state/province). Auto-detected if omitted.'),
|
|
@@ -29,7 +37,7 @@ export const visualizeFromSourceInputSchema = z.object({
|
|
|
29
37
|
.describe('Geographic region code: "world", ISO country code (US, CN, AU, etc.), or continent (EU, AF, AS, SA, NA, OC). Auto-detected if omitted.'),
|
|
30
38
|
});
|
|
31
39
|
export function handleVisualizeFromSource(selectPatterns, deps) {
|
|
32
|
-
const core = handleVisualizeCore(selectPatterns, '
|
|
40
|
+
const core = handleVisualizeCore(selectPatterns, 'visualize_data');
|
|
33
41
|
return async (args) => {
|
|
34
42
|
const start = Date.now();
|
|
35
43
|
if (!deps.sourceManager) {
|
|
@@ -40,7 +48,7 @@ export function handleVisualizeFromSource(selectPatterns, deps) {
|
|
|
40
48
|
const result = await deps.sourceManager.queryDsl(args.sourceId, args.table, args.query);
|
|
41
49
|
if (!result.ok) {
|
|
42
50
|
logOperation({
|
|
43
|
-
toolName: '
|
|
51
|
+
toolName: 'visualize_data',
|
|
44
52
|
timestamp: start,
|
|
45
53
|
durationMs: Date.now() - start,
|
|
46
54
|
success: false,
|
|
@@ -52,7 +60,14 @@ export function handleVisualizeFromSource(selectPatterns, deps) {
|
|
|
52
60
|
});
|
|
53
61
|
return errorResponse(result.error);
|
|
54
62
|
}
|
|
55
|
-
|
|
63
|
+
// Enrich column types and intent with time bucket context (matches dashboard behavior)
|
|
64
|
+
if (!args.columns && args.query.groupBy) {
|
|
65
|
+
const columns = inferColumns(result.rows);
|
|
66
|
+
applyTimeBucketColumnTypes(columns, args.query.groupBy);
|
|
67
|
+
args = { ...args, columns: columns };
|
|
68
|
+
}
|
|
69
|
+
const enrichedIntent = enhanceIntentForTimeBucket(args.intent, args.query.groupBy);
|
|
70
|
+
return core(result.rows, { ...args, intent: enrichedIntent }, { truncated: result.truncated, totalSourceRows: result.totalRows }, {
|
|
56
71
|
dslStructure: extractDslStructure(args.query),
|
|
57
72
|
sourceType,
|
|
58
73
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visualize-from-source.js","sourceRoot":"","sources":["../../../../src/mcp/tools/visualize-from-source.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"visualize-from-source.js","sourceRoot":"","sources":["../../../../src/mcp/tools/visualize-from-source.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,YAAY,EAA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KAAK,CAAC;YAC7C,UAAU;SACX,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Takes inline data + intent and returns visualization recommendations
|
|
4
4
|
* from the handcrafted pattern library.
|
|
5
5
|
*
|
|
6
|
-
* For source-based data (sourceId + table + query), use
|
|
6
|
+
* For source-based data (sourceId + table + query), use visualize_data.
|
|
7
7
|
*
|
|
8
8
|
* Returns compact text content (specId + metadata, no data) while
|
|
9
9
|
* structuredContent still gets the full pre-rendered chart HTML.
|
|
@@ -11,44 +11,6 @@
|
|
|
11
11
|
import { z } from 'zod';
|
|
12
12
|
import type { VisualizeInput, VisualizeOutput } from '../../types.js';
|
|
13
13
|
import type { OperationMeta } from './operation-log.js';
|
|
14
|
-
export declare const colorPreferencesSchema: z.ZodOptional<z.ZodObject<{
|
|
15
|
-
palette: z.ZodOptional<z.ZodEnum<["categorical", "blue", "green", "purple", "warm", "blueRed", "greenPurple", "tealOrange", "redGreen", "traffic-light", "profit-loss", "temperature"]>>;
|
|
16
|
-
highlight: z.ZodOptional<z.ZodObject<{
|
|
17
|
-
values: z.ZodArray<z.ZodAny, "many">;
|
|
18
|
-
color: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
19
|
-
mutedColor: z.ZodOptional<z.ZodString>;
|
|
20
|
-
mutedOpacity: z.ZodOptional<z.ZodNumber>;
|
|
21
|
-
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
values: any[];
|
|
23
|
-
color?: string | string[] | undefined;
|
|
24
|
-
mutedColor?: string | undefined;
|
|
25
|
-
mutedOpacity?: number | undefined;
|
|
26
|
-
}, {
|
|
27
|
-
values: any[];
|
|
28
|
-
color?: string | string[] | undefined;
|
|
29
|
-
mutedColor?: string | undefined;
|
|
30
|
-
mutedOpacity?: number | undefined;
|
|
31
|
-
}>>;
|
|
32
|
-
colorField: z.ZodOptional<z.ZodString>;
|
|
33
|
-
}, "strip", z.ZodTypeAny, {
|
|
34
|
-
highlight?: {
|
|
35
|
-
values: any[];
|
|
36
|
-
color?: string | string[] | undefined;
|
|
37
|
-
mutedColor?: string | undefined;
|
|
38
|
-
mutedOpacity?: number | undefined;
|
|
39
|
-
} | undefined;
|
|
40
|
-
colorField?: string | undefined;
|
|
41
|
-
palette?: "categorical" | "blue" | "green" | "purple" | "warm" | "blueRed" | "greenPurple" | "tealOrange" | "redGreen" | "traffic-light" | "profit-loss" | "temperature" | undefined;
|
|
42
|
-
}, {
|
|
43
|
-
highlight?: {
|
|
44
|
-
values: any[];
|
|
45
|
-
color?: string | string[] | undefined;
|
|
46
|
-
mutedColor?: string | undefined;
|
|
47
|
-
mutedOpacity?: number | undefined;
|
|
48
|
-
} | undefined;
|
|
49
|
-
colorField?: string | undefined;
|
|
50
|
-
palette?: "categorical" | "blue" | "green" | "purple" | "warm" | "blueRed" | "greenPurple" | "tealOrange" | "redGreen" | "traffic-light" | "profit-loss" | "temperature" | undefined;
|
|
51
|
-
}>>;
|
|
52
14
|
export declare const columnsSchema: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
53
15
|
name: z.ZodString;
|
|
54
16
|
type: z.ZodEnum<["numeric", "categorical", "date", "id", "text"]>;
|
|
@@ -163,52 +125,29 @@ export declare const visualizeInputSchema: z.ZodObject<{
|
|
|
163
125
|
title: z.ZodOptional<z.ZodString>;
|
|
164
126
|
subtitle: z.ZodOptional<z.ZodString>;
|
|
165
127
|
includeDataTable: z.ZodOptional<z.ZodBoolean>;
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
mutedOpacity: z.ZodOptional<z.ZodNumber>;
|
|
173
|
-
}, "strip", z.ZodTypeAny, {
|
|
174
|
-
values: any[];
|
|
175
|
-
color?: string | string[] | undefined;
|
|
176
|
-
mutedColor?: string | undefined;
|
|
177
|
-
mutedOpacity?: number | undefined;
|
|
178
|
-
}, {
|
|
179
|
-
values: any[];
|
|
180
|
-
color?: string | string[] | undefined;
|
|
181
|
-
mutedColor?: string | undefined;
|
|
182
|
-
mutedOpacity?: number | undefined;
|
|
183
|
-
}>>;
|
|
184
|
-
colorField: z.ZodOptional<z.ZodString>;
|
|
128
|
+
palette: z.ZodOptional<z.ZodEnum<["categorical", "blue", "green", "purple", "warm", "blueRed", "greenPurple", "tealOrange", "redGreen", "traffic-light", "profit-loss", "temperature"]>>;
|
|
129
|
+
highlight: z.ZodOptional<z.ZodObject<{
|
|
130
|
+
values: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
|
|
131
|
+
color: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
132
|
+
mutedColor: z.ZodOptional<z.ZodString>;
|
|
133
|
+
mutedOpacity: z.ZodOptional<z.ZodNumber>;
|
|
185
134
|
}, "strip", z.ZodTypeAny, {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
mutedOpacity?: number | undefined;
|
|
191
|
-
} | undefined;
|
|
192
|
-
colorField?: string | undefined;
|
|
193
|
-
palette?: "categorical" | "blue" | "green" | "purple" | "warm" | "blueRed" | "greenPurple" | "tealOrange" | "redGreen" | "traffic-light" | "profit-loss" | "temperature" | undefined;
|
|
135
|
+
values: (string | number)[];
|
|
136
|
+
color?: string | string[] | undefined;
|
|
137
|
+
mutedColor?: string | undefined;
|
|
138
|
+
mutedOpacity?: number | undefined;
|
|
194
139
|
}, {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
mutedOpacity?: number | undefined;
|
|
200
|
-
} | undefined;
|
|
201
|
-
colorField?: string | undefined;
|
|
202
|
-
palette?: "categorical" | "blue" | "green" | "purple" | "warm" | "blueRed" | "greenPurple" | "tealOrange" | "redGreen" | "traffic-light" | "profit-loss" | "temperature" | undefined;
|
|
140
|
+
values: (string | number)[];
|
|
141
|
+
color?: string | string[] | undefined;
|
|
142
|
+
mutedColor?: string | undefined;
|
|
143
|
+
mutedOpacity?: number | undefined;
|
|
203
144
|
}>>;
|
|
145
|
+
colorField: z.ZodOptional<z.ZodString>;
|
|
204
146
|
maxAlternativeChartTypes: z.ZodOptional<z.ZodNumber>;
|
|
205
147
|
geoLevel: z.ZodOptional<z.ZodEnum<["country", "subdivision"]>>;
|
|
206
148
|
geoRegion: z.ZodOptional<z.ZodString>;
|
|
207
149
|
}, "strip", z.ZodTypeAny, {
|
|
208
150
|
intent: string;
|
|
209
|
-
data?: Record<string, any>[] | undefined;
|
|
210
|
-
pattern?: string | undefined;
|
|
211
|
-
title?: string | undefined;
|
|
212
151
|
columns?: {
|
|
213
152
|
type: "numeric" | "categorical" | "date" | "id" | "text";
|
|
214
153
|
name: string;
|
|
@@ -217,17 +156,18 @@ export declare const visualizeInputSchema: z.ZodObject<{
|
|
|
217
156
|
nullCount?: number | undefined;
|
|
218
157
|
totalCount?: number | undefined;
|
|
219
158
|
}[] | undefined;
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
colorField?: string | undefined;
|
|
229
|
-
palette?: "categorical" | "blue" | "green" | "purple" | "warm" | "blueRed" | "greenPurple" | "tealOrange" | "redGreen" | "traffic-light" | "profit-loss" | "temperature" | undefined;
|
|
159
|
+
data?: Record<string, any>[] | undefined;
|
|
160
|
+
pattern?: string | undefined;
|
|
161
|
+
title?: string | undefined;
|
|
162
|
+
highlight?: {
|
|
163
|
+
values: (string | number)[];
|
|
164
|
+
color?: string | string[] | undefined;
|
|
165
|
+
mutedColor?: string | undefined;
|
|
166
|
+
mutedOpacity?: number | undefined;
|
|
230
167
|
} | undefined;
|
|
168
|
+
colorField?: string | undefined;
|
|
169
|
+
palette?: "categorical" | "blue" | "green" | "purple" | "warm" | "blueRed" | "greenPurple" | "tealOrange" | "redGreen" | "traffic-light" | "profit-loss" | "temperature" | undefined;
|
|
170
|
+
geoRegion?: string | undefined;
|
|
231
171
|
resultId?: string | undefined;
|
|
232
172
|
dataShapeHints?: {
|
|
233
173
|
dateColumnCount?: number | undefined;
|
|
@@ -246,9 +186,6 @@ export declare const visualizeInputSchema: z.ZodObject<{
|
|
|
246
186
|
geoLevel?: "country" | "subdivision" | undefined;
|
|
247
187
|
}, {
|
|
248
188
|
intent: string;
|
|
249
|
-
data?: Record<string, any>[] | undefined;
|
|
250
|
-
pattern?: string | undefined;
|
|
251
|
-
title?: string | undefined;
|
|
252
189
|
columns?: {
|
|
253
190
|
type: "numeric" | "categorical" | "date" | "id" | "text";
|
|
254
191
|
name: string;
|
|
@@ -257,17 +194,18 @@ export declare const visualizeInputSchema: z.ZodObject<{
|
|
|
257
194
|
nullCount?: number | undefined;
|
|
258
195
|
totalCount?: number | undefined;
|
|
259
196
|
}[] | undefined;
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
colorField?: string | undefined;
|
|
269
|
-
palette?: "categorical" | "blue" | "green" | "purple" | "warm" | "blueRed" | "greenPurple" | "tealOrange" | "redGreen" | "traffic-light" | "profit-loss" | "temperature" | undefined;
|
|
197
|
+
data?: Record<string, any>[] | undefined;
|
|
198
|
+
pattern?: string | undefined;
|
|
199
|
+
title?: string | undefined;
|
|
200
|
+
highlight?: {
|
|
201
|
+
values: (string | number)[];
|
|
202
|
+
color?: string | string[] | undefined;
|
|
203
|
+
mutedColor?: string | undefined;
|
|
204
|
+
mutedOpacity?: number | undefined;
|
|
270
205
|
} | undefined;
|
|
206
|
+
colorField?: string | undefined;
|
|
207
|
+
palette?: "categorical" | "blue" | "green" | "purple" | "warm" | "blueRed" | "greenPurple" | "tealOrange" | "redGreen" | "traffic-light" | "profit-loss" | "temperature" | undefined;
|
|
208
|
+
geoRegion?: string | undefined;
|
|
271
209
|
resultId?: string | undefined;
|
|
272
210
|
dataShapeHints?: {
|
|
273
211
|
dateColumnCount?: number | undefined;
|
|
@@ -286,7 +224,7 @@ export declare const visualizeInputSchema: z.ZodObject<{
|
|
|
286
224
|
geoLevel?: "country" | "subdivision" | undefined;
|
|
287
225
|
}>;
|
|
288
226
|
/**
|
|
289
|
-
* Shared core logic for both visualize and
|
|
227
|
+
* Shared core logic for both visualize and visualize_data.
|
|
290
228
|
* Takes resolved data + args and returns the MCP response.
|
|
291
229
|
*/
|
|
292
230
|
export declare function handleVisualizeCore(selectPatterns: (input: VisualizeInput) => VisualizeOutput, toolName?: string): (data: Record<string, any>[], args: {
|
|
@@ -297,7 +235,14 @@ export declare function handleVisualizeCore(selectPatterns: (input: VisualizeInp
|
|
|
297
235
|
title?: string;
|
|
298
236
|
subtitle?: string;
|
|
299
237
|
includeDataTable?: boolean;
|
|
300
|
-
|
|
238
|
+
palette?: string;
|
|
239
|
+
highlight?: {
|
|
240
|
+
values: any[];
|
|
241
|
+
color?: string | string[];
|
|
242
|
+
mutedColor?: string;
|
|
243
|
+
mutedOpacity?: number;
|
|
244
|
+
};
|
|
245
|
+
colorField?: string;
|
|
301
246
|
maxAlternativeChartTypes?: number;
|
|
302
247
|
geoLevel?: "country" | "subdivision";
|
|
303
248
|
geoRegion?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visualize.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/visualize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAiC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"visualize.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/visualize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,E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