drizzle-cube 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/ActivityGridChart.config-BIHNNXe8.cjs +1 -0
- package/dist/adapters/ActivityGridChart.config-D8brFtkU.js +2 -0
- package/dist/adapters/AreaChart.config-BjBnqhrD.js +2 -0
- package/dist/adapters/AreaChart.config-hCYHwAaC.cjs +1 -0
- package/dist/adapters/BarChart.config-JWskLg7a.js +2 -0
- package/dist/adapters/BarChart.config-ldUoUV-V.cjs +1 -0
- package/dist/adapters/BoxPlotChart.config-DXgi-pWk.js +2 -0
- package/dist/adapters/BoxPlotChart.config-t7CU_SEB.cjs +1 -0
- package/dist/adapters/BubbleChart.config-BqNbgcs4.js +2 -0
- package/dist/adapters/BubbleChart.config-SRbrJWj2.cjs +1 -0
- package/dist/adapters/CandlestickChart.config-CTqj07at.cjs +1 -0
- package/dist/adapters/CandlestickChart.config-D-KaQpN1.js +2 -0
- package/dist/adapters/DataTable.config-4QtzEm2K.js +2 -0
- package/dist/adapters/DataTable.config-C4OZyZKL.cjs +1 -0
- package/dist/adapters/DotStripChart.config-CrwF5K67.cjs +1 -0
- package/dist/adapters/DotStripChart.config-tmdykLsT.js +2 -0
- package/dist/adapters/FunnelChart.config-Dk7bb3KU.cjs +1 -0
- package/dist/adapters/FunnelChart.config-Uah6h6t6.js +2 -0
- package/dist/adapters/GaugeChart.config-BGi82n3v.cjs +1 -0
- package/dist/adapters/GaugeChart.config-DIWl6xVG.js +2 -0
- package/dist/adapters/HeatMapChart.config-C1Wl6SHf.js +2 -0
- package/dist/adapters/HeatMapChart.config-CsA67rfc.cjs +1 -0
- package/dist/adapters/KpiDelta.config-CBo61Kp9.cjs +1 -0
- package/dist/adapters/KpiDelta.config-CgYK9zIF.js +2 -0
- package/dist/adapters/KpiNumber.config-BqQjoY4A.cjs +1 -0
- package/dist/adapters/KpiNumber.config-Dt8kOvIA.js +2 -0
- package/dist/adapters/KpiText.config-BE8HbXQ0.js +2 -0
- package/dist/adapters/KpiText.config-DaSbcfKE.cjs +1 -0
- package/dist/adapters/LineChart.config-CUPtbHNz.cjs +1 -0
- package/dist/adapters/LineChart.config-DHlctcYT.js +2 -0
- package/dist/adapters/MarkdownChart.config-B0T5A7dw.js +2 -0
- package/dist/adapters/MarkdownChart.config-iV60Icd3.cjs +1 -0
- package/dist/adapters/MeasureProfileChart.config-CBCezRPr.cjs +1 -0
- package/dist/adapters/MeasureProfileChart.config-CO9Cc3Ha.js +2 -0
- package/dist/adapters/PieChart.config-D6Ofc2h-.js +2 -0
- package/dist/adapters/PieChart.config-TOCX24yj.cjs +1 -0
- package/dist/adapters/ProportionBarChart.config-BfiCmXI7.js +2 -0
- package/dist/adapters/ProportionBarChart.config-Bh8_aieC.cjs +1 -0
- package/dist/adapters/RadarChart.config-BfWKUYv4.cjs +1 -0
- package/dist/adapters/RadarChart.config-x87UPfQH.js +2 -0
- package/dist/adapters/RadialBarChart.config-BGA-fVmo.js +2 -0
- package/dist/adapters/RadialBarChart.config-Bo3E1IWc.cjs +1 -0
- package/dist/adapters/RecordsTable.config-CKb4xY0c.cjs +1 -0
- package/dist/adapters/RecordsTable.config-KsPOo8YB.js +2 -0
- package/dist/adapters/RetentionCombinedChart.config-DVDQBMW8.js +2 -0
- package/dist/adapters/RetentionCombinedChart.config-DqfOBn6k.cjs +1 -0
- package/dist/adapters/RetentionHeatmap.config-B7NVTM5_.cjs +1 -0
- package/dist/adapters/RetentionHeatmap.config-tnd7N7g-.js +2 -0
- package/dist/adapters/SankeyChart.config-B1K4e0RA.js +2 -0
- package/dist/adapters/SankeyChart.config-I26Q_e5f.cjs +1 -0
- package/dist/adapters/ScatterChart.config-CMta6GGl.cjs +1 -0
- package/dist/adapters/ScatterChart.config-WwER0vgC.js +2 -0
- package/dist/adapters/SunburstChart.config-CBYye6Ez.js +2 -0
- package/dist/adapters/SunburstChart.config-DbC1AZCI.cjs +1 -0
- package/dist/adapters/TreeMapChart.config-EcJf0Dzm.cjs +1 -0
- package/dist/adapters/TreeMapChart.config-wNJWipDf.js +2 -0
- package/dist/adapters/WaterfallChart.config--d2EuVF-.cjs +1 -0
- package/dist/adapters/WaterfallChart.config-CPJLjH4K.js +2 -0
- package/dist/adapters/{compiler-SBDjxyQ3.js → compiler-B4tLaYye.js} +10 -10
- package/dist/adapters/{compiler-BdVMQ3Xj.cjs → compiler-BYm93X_G.cjs} +5 -5
- package/dist/adapters/core/index.cjs +1 -1
- package/dist/adapters/core/index.js +1 -1
- package/dist/adapters/{core-CSt8MGbw.cjs → core-BQEJzwTJ.cjs} +1 -1
- package/dist/adapters/{core-CXrxqh7l.js → core-CVDf8WNs.js} +2 -2
- package/dist/adapters/express/index.cjs +1 -1
- package/dist/adapters/express/index.js +5 -5
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/fastify/index.js +5 -5
- package/dist/adapters/{handler-Cppe-aqH.js → handler-Ck2X85KS.js} +170 -151
- package/dist/adapters/handler-MFn_eVcJ.cjs +16 -0
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +4 -4
- package/dist/adapters/mcp-app-html-V1nZOil3.cjs +1 -0
- package/dist/adapters/mcp-app-html-sD7j035f.js +5 -0
- package/dist/adapters/mcp-app-html.cjs +1 -0
- package/dist/adapters/mcp-app-html.d.ts +25 -0
- package/dist/adapters/mcp-app-html.js +2 -0
- package/dist/adapters/mcp-tools.cjs +1 -1
- package/dist/adapters/mcp-tools.js +21 -20
- package/dist/adapters/mcp-transport-BQxL1h2h.cjs +42 -0
- package/dist/adapters/mcp-transport-yJDy3T6W.js +758 -0
- package/dist/adapters/mcp-transport.d.ts +19 -2
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +5 -5
- package/dist/adapters/{openai-BIoIunc7.js → openai-B7EVH3cl.js} +2578 -1797
- package/dist/adapters/openai-BkD4iuG8.cjs +19 -0
- package/dist/adapters/{openai-62sEF0Ev.js → openai-DRFOtBUU.js} +1 -1
- package/dist/adapters/{openai-CaxNY6TC.cjs → openai-FjvP4Mek.cjs} +1 -1
- package/dist/adapters/{utils-C_RKaP0n.js → utils-BY3FDOmN.js} +8 -1
- package/dist/adapters/utils-BkdzL4m9.cjs +132 -0
- package/dist/adapters/utils.cjs +1 -1
- package/dist/adapters/utils.js +1 -1
- package/dist/cjs/adapters/mcp-app-html.d.ts +25 -0
- package/dist/cjs/adapters/mcp-transport.d.ts +19 -2
- package/dist/cjs/client/charts/chartConfigs.d.ts +34 -0
- package/dist/cjs/client/components/AnalysisBuilder/AnalysisChartConfigPanel.d.ts +10 -2
- package/dist/cjs/client/components/AnalysisBuilder/TemplateEditor.d.ts +17 -0
- package/dist/cjs/client/components/AnalysisBuilder/templateSyntax.d.ts +26 -0
- package/dist/cjs/client/components/analyticsPortlet/parsePortletQuery.d.ts +12 -0
- package/dist/cjs/client/components/analyticsPortlet/portletRenderState.d.ts +7 -0
- package/dist/cjs/client/components/charts/MarkdownChart.d.ts +1 -1
- package/dist/cjs/client/components/charts/MarkdownChart.helpers.d.ts +156 -0
- package/dist/cjs/client/components/charts/markdownTemplate.d.ts +92 -0
- package/dist/client/charts/chartConfigs.d.ts +34 -0
- package/dist/client/charts.js +12 -12
- package/dist/client/chunks/{DashboardEditModal-DjMGNTUa.js → DashboardEditModal-B8zIH0ja.js} +2529 -2368
- package/dist/client/chunks/DashboardEditModal-B8zIH0ja.js.map +1 -0
- package/dist/client/chunks/{DotStripChart-EEtJyV1v.js → DotStripChart-BCgHGY0s.js} +4 -4
- package/dist/client/chunks/{DotStripChart-EEtJyV1v.js.map → DotStripChart-BCgHGY0s.js.map} +1 -1
- package/dist/client/chunks/{ProportionBarChart-3r7ZPX-V.js → ProportionBarChart-DzdKxzr4.js} +3 -3
- package/dist/client/chunks/{ProportionBarChart-3r7ZPX-V.js.map → ProportionBarChart-DzdKxzr4.js.map} +1 -1
- package/dist/client/chunks/{RecordsTable-DvMXV6F6.js → RecordsTable-kQfZ25Pz.js} +4 -4
- package/dist/client/chunks/{RecordsTable-DvMXV6F6.js.map → RecordsTable-kQfZ25Pz.js.map} +1 -1
- package/dist/client/chunks/{RetentionCombinedChart-DbxB86fj.js → RetentionCombinedChart-CvddCEOk.js} +3 -3
- package/dist/client/chunks/{RetentionCombinedChart-DbxB86fj.js.map → RetentionCombinedChart-CvddCEOk.js.map} +1 -1
- package/dist/client/chunks/{RetentionHeatmap-CE3rxhAU.js → RetentionHeatmap-BURt-mfm.js} +2 -2
- package/dist/client/chunks/{RetentionHeatmap-CE3rxhAU.js.map → RetentionHeatmap-BURt-mfm.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-lQk_qJBQ.js → analysis-builder-C0hzThmQ.js} +1688 -1675
- package/dist/client/chunks/{analysis-builder-lQk_qJBQ.js.map → analysis-builder-C0hzThmQ.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-shared-C_pLSXJR.js → analysis-builder-shared-CQFcY6vA.js} +476 -476
- package/dist/client/chunks/{analysis-builder-shared-C_pLSXJR.js.map → analysis-builder-shared-CQFcY6vA.js.map} +1 -1
- package/dist/client/chunks/{chart-activity-grid-UZIp9_2E.js → chart-activity-grid-aIyjUpbJ.js} +9 -2
- package/dist/client/chunks/chart-activity-grid-aIyjUpbJ.js.map +1 -0
- package/dist/client/chunks/{chart-area-CEBcvCcn.js → chart-area-DCCvp06H.js} +3 -3
- package/dist/client/chunks/{chart-area-CEBcvCcn.js.map → chart-area-DCCvp06H.js.map} +1 -1
- package/dist/client/chunks/{chart-bar-DGh7cpU-.js → chart-bar-C8xQ15Aa.js} +3 -3
- package/dist/client/chunks/{chart-bar-DGh7cpU-.js.map → chart-bar-C8xQ15Aa.js.map} +1 -1
- package/dist/client/chunks/{chart-box-plot-CeqoKPFa.js → chart-box-plot-DFMjBoL1.js} +2 -2
- package/dist/client/chunks/{chart-box-plot-CeqoKPFa.js.map → chart-box-plot-DFMjBoL1.js.map} +1 -1
- package/dist/client/chunks/{chart-bubble-8uH_JKNt.js → chart-bubble-CavhSOT8.js} +2 -2
- package/dist/client/chunks/{chart-bubble-8uH_JKNt.js.map → chart-bubble-CavhSOT8.js.map} +1 -1
- package/dist/client/chunks/{chart-candlestick-DogklMg1.js → chart-candlestick-BlJ6l-0-.js} +2 -2
- package/dist/client/chunks/{chart-candlestick-DogklMg1.js.map → chart-candlestick-BlJ6l-0-.js.map} +1 -1
- package/dist/client/chunks/{chart-config-markdown-C5kBQOjP.js → chart-config-markdown-CK8PAWUg.js} +8 -3
- package/dist/client/chunks/chart-config-markdown-CK8PAWUg.js.map +1 -0
- package/dist/client/chunks/{chart-data-table-CCvvgeG_.js → chart-data-table-Dfup1JpL.js} +426 -423
- package/dist/client/chunks/chart-data-table-Dfup1JpL.js.map +1 -0
- package/dist/client/chunks/{chart-funnel-D2vGQhaz.js → chart-funnel-DqBD-oth.js} +2 -2
- package/dist/client/chunks/{chart-funnel-D2vGQhaz.js.map → chart-funnel-DqBD-oth.js.map} +1 -1
- package/dist/client/chunks/{chart-gauge-DbU0rxqv.js → chart-gauge-Tr9BRoTo.js} +3 -3
- package/dist/client/chunks/{chart-gauge-DbU0rxqv.js.map → chart-gauge-Tr9BRoTo.js.map} +1 -1
- package/dist/client/chunks/{chart-heat-map-x6aQq91x.js → chart-heat-map-V200X1EP.js} +3 -3
- package/dist/client/chunks/{chart-heat-map-x6aQq91x.js.map → chart-heat-map-V200X1EP.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-delta-B2-m16QC.js → chart-kpi-delta-DuXkAxKV.js} +3 -3
- package/dist/client/chunks/{chart-kpi-delta-B2-m16QC.js.map → chart-kpi-delta-DuXkAxKV.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-number-DggvlYT_.js → chart-kpi-number-CzRaT5KF.js} +5 -5
- package/dist/client/chunks/{chart-kpi-number-DggvlYT_.js.map → chart-kpi-number-CzRaT5KF.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-text-BFy-m1NP.js → chart-kpi-text-DxMl_C7M.js} +3 -3
- package/dist/client/chunks/{chart-kpi-text-BFy-m1NP.js.map → chart-kpi-text-DxMl_C7M.js.map} +1 -1
- package/dist/client/chunks/{chart-line-C4r44HWi.js → chart-line-rl9q-vom.js} +3 -3
- package/dist/client/chunks/{chart-line-C4r44HWi.js.map → chart-line-rl9q-vom.js.map} +1 -1
- package/dist/client/chunks/chart-markdown-DJq7fXKF.js +8622 -0
- package/dist/client/chunks/chart-markdown-DJq7fXKF.js.map +1 -0
- package/dist/client/chunks/{chart-measure-profile-Dc-d82kF.js → chart-measure-profile-BDpkr55p.js} +3 -3
- package/dist/client/chunks/{chart-measure-profile-Dc-d82kF.js.map → chart-measure-profile-BDpkr55p.js.map} +1 -1
- package/dist/client/chunks/{chart-pie-BHrPxga2.js → chart-pie-W4Mk0WFB.js} +3 -3
- package/dist/client/chunks/{chart-pie-BHrPxga2.js.map → chart-pie-W4Mk0WFB.js.map} +1 -1
- package/dist/client/chunks/{chart-radar-I9sOFbG5.js → chart-radar-BXkMOUVC.js} +3 -3
- package/dist/client/chunks/{chart-radar-I9sOFbG5.js.map → chart-radar-BXkMOUVC.js.map} +1 -1
- package/dist/client/chunks/{chart-radial-bar-DeDMMf9P.js → chart-radial-bar-CSw1hCK2.js} +3 -3
- package/dist/client/chunks/{chart-radial-bar-DeDMMf9P.js.map → chart-radial-bar-CSw1hCK2.js.map} +1 -1
- package/dist/client/chunks/{chart-sankey-1qB7yWHq.js → chart-sankey-CXG8SeW3.js} +2 -2
- package/dist/client/chunks/{chart-sankey-1qB7yWHq.js.map → chart-sankey-CXG8SeW3.js.map} +1 -1
- package/dist/client/chunks/{chart-scatter-BHttSxcc.js → chart-scatter-BHp1yLvR.js} +3 -3
- package/dist/client/chunks/{chart-scatter-BHttSxcc.js.map → chart-scatter-BHp1yLvR.js.map} +1 -1
- package/dist/client/chunks/{chart-sunburst-Cmzol8kR.js → chart-sunburst-CHgQCRCz.js} +3 -3
- package/dist/client/chunks/{chart-sunburst-Cmzol8kR.js.map → chart-sunburst-CHgQCRCz.js.map} +1 -1
- package/dist/client/chunks/{chart-tree-map-CdSwr_zI.js → chart-tree-map-YBAOj00L.js} +3 -3
- package/dist/client/chunks/{chart-tree-map-CdSwr_zI.js.map → chart-tree-map-YBAOj00L.js.map} +1 -1
- package/dist/client/chunks/{chart-waterfall-BN3B5luW.js → chart-waterfall-CSQ3xvUJ.js} +3 -3
- package/dist/client/chunks/{chart-waterfall-BN3B5luW.js.map → chart-waterfall-CSQ3xvUJ.js.map} +1 -1
- package/dist/client/chunks/{charts-core-DIneMirc.js → charts-core-ghjDtt0_.js} +2 -2
- package/dist/client/chunks/{charts-core-DIneMirc.js.map → charts-core-ghjDtt0_.js.map} +1 -1
- package/dist/client/chunks/charts-loader-B_ye_C5_.js +87 -0
- package/dist/client/chunks/{charts-loader-OHpTBq8c.js.map → charts-loader-B_ye_C5_.js.map} +1 -1
- package/dist/client/chunks/{dist-BPmPx7kz.js → dist-COqN0-Yj.js} +4 -4
- package/dist/client/chunks/{dist-BPmPx7kz.js.map → dist-COqN0-Yj.js.map} +1 -1
- package/dist/client/chunks/{exceljs.min-CiByP8VQ.js → exceljs.min-CdNVdwM3.js} +8 -11
- package/dist/client/chunks/{exceljs.min-CiByP8VQ.js.map → exceljs.min-CdNVdwM3.js.map} +1 -1
- package/dist/client/chunks/{nl-NL-dk-kC0sL.js → nl-NL-CKdVNqSp.js} +8 -1
- package/dist/client/chunks/nl-NL-CKdVNqSp.js.map +1 -0
- package/dist/client/chunks/{schema-visualization-PYa578pV.js → schema-visualization-txYCG4v5.js} +4 -4
- package/dist/client/chunks/{schema-visualization-PYa578pV.js.map → schema-visualization-txYCG4v5.js.map} +1 -1
- package/dist/client/chunks/{useDirtyStateTracking-BQupC3wJ.js → useDirtyStateTracking-BUk23Wbh.js} +6 -6
- package/dist/client/chunks/{useDirtyStateTracking-BQupC3wJ.js.map → useDirtyStateTracking-BUk23Wbh.js.map} +1 -1
- package/dist/client/chunks/{useExplainAI-DORnTynt.js → useExplainAI-CGLroDBD.js} +5 -5
- package/dist/client/chunks/{useExplainAI-DORnTynt.js.map → useExplainAI-CGLroDBD.js.map} +1 -1
- package/dist/client/chunks/{vendor-DDo8nSGP.js → vendor-CApRxi77.js} +5 -6
- package/dist/client/chunks/{vendor-DDo8nSGP.js.map → vendor-CApRxi77.js.map} +1 -1
- package/dist/client/components/AnalysisBuilder/AnalysisChartConfigPanel.d.ts +10 -2
- package/dist/client/components/AnalysisBuilder/TemplateEditor.d.ts +17 -0
- package/dist/client/components/AnalysisBuilder/templateSyntax.d.ts +26 -0
- package/dist/client/components/analyticsPortlet/parsePortletQuery.d.ts +12 -0
- package/dist/client/components/analyticsPortlet/portletRenderState.d.ts +7 -0
- package/dist/client/components/charts/MarkdownChart.d.ts +1 -1
- package/dist/client/components/charts/MarkdownChart.helpers.d.ts +156 -0
- package/dist/client/components/charts/markdownTemplate.d.ts +92 -0
- package/dist/client/components.js +2 -2
- package/dist/client/hooks.js +3 -3
- package/dist/client/icons.js +1 -1
- package/dist/client/index.js +409 -409
- package/dist/client/index.js.map +1 -1
- package/dist/client/providers.js +1 -1
- package/dist/client/schema.js +1 -1
- package/dist/client/styles.css +1 -1
- package/dist/client/utils.js +4 -4
- package/dist/client-bundle-stats.html +1 -1
- package/dist/mcp-app/mcp-app.html +190 -132
- package/dist/server/index.cjs +17 -23
- package/dist/server/index.js +176 -147
- package/dist/server/openai-BWGYfr6Z.cjs +19 -0
- package/dist/server/{openai-nBhuSFd3.js → openai-Cap1nBuK.js} +1 -1
- package/dist/server/{openai-C1gLuR-0.js → openai-DW5TRMXE.js} +2577 -1796
- package/dist/server/{openai-rF50ZEiR.cjs → openai-G2EivP-n.cjs} +1 -1
- package/package.json +14 -3
- package/dist/adapters/ActivityGridChart.config-DfyZh3He.js +0 -2
- package/dist/adapters/ActivityGridChart.config-DgOwl51m.cjs +0 -1
- package/dist/adapters/AreaChart.config-BL_ZpMsg.js +0 -2
- package/dist/adapters/AreaChart.config-rc1phjmI.cjs +0 -1
- package/dist/adapters/BarChart.config-C6k4BxhM.cjs +0 -1
- package/dist/adapters/BarChart.config-CBACR7Z-.js +0 -2
- package/dist/adapters/BoxPlotChart.config-Bvg6yFn2.js +0 -2
- package/dist/adapters/BoxPlotChart.config-CAlLRM0v.cjs +0 -1
- package/dist/adapters/BubbleChart.config-22qXNskY.js +0 -2
- package/dist/adapters/BubbleChart.config-BkB3P6Bi.cjs +0 -1
- package/dist/adapters/CandlestickChart.config-DuZb-y6d.cjs +0 -1
- package/dist/adapters/CandlestickChart.config-G78UbuwS.js +0 -2
- package/dist/adapters/DataTable.config-BXkpzOC2.js +0 -2
- package/dist/adapters/DataTable.config-CwPlSht6.cjs +0 -1
- package/dist/adapters/DotStripChart.config-Bw9Ww5zY.cjs +0 -1
- package/dist/adapters/DotStripChart.config-D5sbLAqA.js +0 -2
- package/dist/adapters/FunnelChart.config-CUs1rqN2.cjs +0 -1
- package/dist/adapters/FunnelChart.config-Cw9qrC2C.js +0 -2
- package/dist/adapters/GaugeChart.config-CjGtJVoO.cjs +0 -1
- package/dist/adapters/GaugeChart.config-F5SA5Oi3.js +0 -2
- package/dist/adapters/HeatMapChart.config-CvgmSiuY.cjs +0 -1
- package/dist/adapters/HeatMapChart.config-DrvQrPHT.js +0 -2
- package/dist/adapters/KpiDelta.config-B-UJWdJ5.cjs +0 -1
- package/dist/adapters/KpiDelta.config-C00mTZYy.js +0 -2
- package/dist/adapters/KpiNumber.config-CB0kTeoV.cjs +0 -1
- package/dist/adapters/KpiNumber.config-D3CogH8j.js +0 -2
- package/dist/adapters/KpiText.config-B0LbKRCf.js +0 -2
- package/dist/adapters/KpiText.config-Dv4TNprC.cjs +0 -1
- package/dist/adapters/LineChart.config-CdONxSLL.js +0 -2
- package/dist/adapters/LineChart.config-DBHsfIYG.cjs +0 -1
- package/dist/adapters/MarkdownChart.config-AYKXdpuw.cjs +0 -1
- package/dist/adapters/MarkdownChart.config-CngxD_Lc.js +0 -2
- package/dist/adapters/MeasureProfileChart.config-B0a5sUk6.cjs +0 -1
- package/dist/adapters/MeasureProfileChart.config-ByW5F1Ey.js +0 -2
- package/dist/adapters/PieChart.config-Csx1ctk4.js +0 -2
- package/dist/adapters/PieChart.config-Dfw66Xab.cjs +0 -1
- package/dist/adapters/ProportionBarChart.config-BaeYznc1.cjs +0 -1
- package/dist/adapters/ProportionBarChart.config-DCOizSVs.js +0 -2
- package/dist/adapters/RadarChart.config-AxQh97rB.js +0 -2
- package/dist/adapters/RadarChart.config-BjP-zEGW.cjs +0 -1
- package/dist/adapters/RadialBarChart.config-D5EwyJ0G.cjs +0 -1
- package/dist/adapters/RadialBarChart.config-DMaEJYM_.js +0 -2
- package/dist/adapters/RecordsTable.config-BdN0kZ8b.js +0 -2
- package/dist/adapters/RecordsTable.config-CWRvGDbi.cjs +0 -1
- package/dist/adapters/RetentionCombinedChart.config-BpciOTeX.cjs +0 -1
- package/dist/adapters/RetentionCombinedChart.config-CY8TDzuy.js +0 -2
- package/dist/adapters/RetentionHeatmap.config-BZPRoVpF.cjs +0 -1
- package/dist/adapters/RetentionHeatmap.config-YMZt-u-T.js +0 -2
- package/dist/adapters/SankeyChart.config-BdSA-Jlp.cjs +0 -1
- package/dist/adapters/SankeyChart.config-Dlgi5_DA.js +0 -2
- package/dist/adapters/ScatterChart.config-VJ0xG0Ak.cjs +0 -1
- package/dist/adapters/ScatterChart.config-oOd1Jplx.js +0 -2
- package/dist/adapters/SunburstChart.config-Cllhyjy4.js +0 -2
- package/dist/adapters/SunburstChart.config-DU11BAei.cjs +0 -1
- package/dist/adapters/TreeMapChart.config--EB8bQTo.js +0 -2
- package/dist/adapters/TreeMapChart.config-BPmMLBH1.cjs +0 -1
- package/dist/adapters/WaterfallChart.config-E99Fl6uM.cjs +0 -1
- package/dist/adapters/WaterfallChart.config-xz3DaoMQ.js +0 -2
- package/dist/adapters/handler-_u5krbOj.cjs +0 -26
- package/dist/adapters/mcp-transport-CpF7usmR.js +0 -754
- package/dist/adapters/mcp-transport-DXIfb0p-.cjs +0 -42
- package/dist/adapters/openai-EBTQKJnV.cjs +0 -19
- package/dist/adapters/utils-DXWQUJbD.cjs +0 -128
- package/dist/client/chunks/DashboardEditModal-DjMGNTUa.js.map +0 -1
- package/dist/client/chunks/chart-activity-grid-UZIp9_2E.js.map +0 -1
- package/dist/client/chunks/chart-config-markdown-C5kBQOjP.js.map +0 -1
- package/dist/client/chunks/chart-data-table-CCvvgeG_.js.map +0 -1
- package/dist/client/chunks/chart-markdown-b0qPZ617.js +0 -3926
- package/dist/client/chunks/chart-markdown-b0qPZ617.js.map +0 -1
- package/dist/client/chunks/charts-loader-OHpTBq8c.js +0 -87
- package/dist/client/chunks/nl-NL-dk-kC0sL.js.map +0 -1
- package/dist/server/openai-BmADmD1e.cjs +0 -19
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./mcp-app-html-V1nZOil3.cjs");exports.mcpAppHtml=e.t;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The bundled MCP App HTML — public subpath `drizzle-cube/mcp-app-html`.
|
|
3
|
+
*
|
|
4
|
+
* This is the ~2 MB single-file MCP App (React + charts, inlined by
|
|
5
|
+
* `vite-plugin-singlefile` → `src/mcp-app/generated-html.ts`). It is only ever
|
|
6
|
+
* needed when `mcp.app` is enabled and a client lists or reads the
|
|
7
|
+
* `ui://drizzle-cube/visualization.html` resource, so the MCP transport loads it
|
|
8
|
+
* with a dynamic `import()` at that moment rather than at adapter import time.
|
|
9
|
+
*
|
|
10
|
+
* **Invariant:** nothing reachable from the adapter entries (`hono`, `express`,
|
|
11
|
+
* `fastify`, `nextjs`, `core`, `utils`) may import this module — or
|
|
12
|
+
* `../mcp-app/generated-html.js` — statically. A static import drags the blob
|
|
13
|
+
* into every consumer's server bundle even with `mcp.enabled: false`
|
|
14
|
+
* (`tests/adapters/mcp-app-html-lazy.test.ts` guards this). The one deliberate
|
|
15
|
+
* static importer is `mcp-tools.ts` (`drizzle-cube/mcp`), whose `resources`
|
|
16
|
+
* array is synchronous public API.
|
|
17
|
+
*
|
|
18
|
+
* In the published build the transport's `import()` targets the bare specifier
|
|
19
|
+
* `drizzle-cube/mcp-app-html` (see `vite.config.adapters.ts`), so bundlers that
|
|
20
|
+
* count every emitted module against a size budget (e.g. wrangler for
|
|
21
|
+
* Cloudflare Workers) can alias it to a stub exporting `mcpAppHtml = ''` when the
|
|
22
|
+
* MCP App is not used.
|
|
23
|
+
*/
|
|
24
|
+
/** The bundled MCP App as a single HTML document. Empty string if not yet built. */
|
|
25
|
+
export declare const mcpAppHtml: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./utils-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./utils-BkdzL4m9.cjs"),t=require("./mcp-transport-BQxL1h2h.cjs"),n=require("./mcp-app-html-V1nZOil3.cjs");async function r(t,n,r){let i=await t.getSecurityContext(r);return t.wrapContent(await e.p(t.semanticLayer,i,n||{}))}async function i(t,n,r){let i=n||{};if(!i.query)return t.wrapError(`query is required`);let a=await t.getSecurityContext(r);return t.wrapContent(await e.f(t.semanticLayer,a,i))}async function a(t,n,r){let i=n||{};if(!i.query)return t.wrapError(`query is required`);let a=await t.getSecurityContext(r);return t.wrapContent(await e.m(t.semanticLayer,a,i))}function o(e){return{content:[{type:`text`,text:typeof e==`string`?e:JSON.stringify(e)}],isError:!1}}function s(e){return{content:[{type:`text`,text:e instanceof Error?e.message:String(e)}],isError:!0}}function c(e){let{semanticLayer:n,getSecurityContext:c,toolPrefix:u=`drizzle_cube_`,tools:d=[`discover`,`validate`,`load`,`chart`],prompts:f=t.u(),resources:p,app:m=!1}=e,h=!!m,g=typeof m==`object`?m:void 0,_=p??t.d(),v=h?[..._,...l(g)]:_,y=t.o({appEnabled:h}),b=new Map(y.map(e=>[e.name,e])),x=d.filter(e=>b.has(e)).map(e=>{let t=b.get(e),n={name:`${u}${e}`,description:t.description,inputSchema:t.inputSchema},r=t._meta;return r&&(n._meta=r),n}),S=x.map(e=>e.name),C=new Set;for(let e of d)C.add(e),C.add(`${u}${e}`);function w(e){return C.has(e)}let T={semanticLayer:n,getSecurityContext:c,wrapContent:o,wrapError:s},E={discover:(e,t)=>r(T,e,t),validate:(e,t)=>i(T,e,t),load:(e,t)=>a(T,e,t),chart:(e,t)=>a(T,e,t)};async function D(e,t,n){let r=e.startsWith(u)?e.slice(u.length):e,i=d.includes(r)?E[r]:void 0;if(!i)return s(`Unknown tool: ${e}`);try{return await i(t,n)}catch(e){return s(e)}}return{definitions:x,handle:D,handles:w,prompts:f,resources:v,toolNames:S}}function l(e){let r=t.f(n.t,e);return r?[{uri:t.n,name:`Drizzle Cube Visualization`,description:`Interactive chart visualization for query results`,mimeType:t.t,text:r}]:[]}exports.getCubeTools=c;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { f as e, m as t, p as n } from "./utils-
|
|
2
|
-
import { d as r, f as i, n as a, o, t as s, u as c } from "./mcp-transport-
|
|
1
|
+
import { f as e, m as t, p as n } from "./utils-BY3FDOmN.js";
|
|
2
|
+
import { d as r, f as i, n as a, o, t as s, u as c } from "./mcp-transport-yJDy3T6W.js";
|
|
3
|
+
import { t as l } from "./mcp-app-html-sD7j035f.js";
|
|
3
4
|
//#region src/adapters/mcp-tools-handlers.ts
|
|
4
|
-
async function
|
|
5
|
+
async function u(e, t, r) {
|
|
5
6
|
let i = await e.getSecurityContext(r);
|
|
6
7
|
return e.wrapContent(await n(e.semanticLayer, i, t || {}));
|
|
7
8
|
}
|
|
8
|
-
async function
|
|
9
|
+
async function d(t, n, r) {
|
|
9
10
|
let i = n || {};
|
|
10
11
|
if (!i.query) return t.wrapError("query is required");
|
|
11
12
|
let a = await t.getSecurityContext(r);
|
|
12
13
|
return t.wrapContent(await e(t.semanticLayer, a, i));
|
|
13
14
|
}
|
|
14
|
-
async function
|
|
15
|
+
async function f(e, n, r) {
|
|
15
16
|
let i = n || {};
|
|
16
17
|
if (!i.query) return e.wrapError("query is required");
|
|
17
18
|
let a = await e.getSecurityContext(r);
|
|
@@ -19,7 +20,7 @@ async function d(e, n, r) {
|
|
|
19
20
|
}
|
|
20
21
|
//#endregion
|
|
21
22
|
//#region src/adapters/mcp-tools.ts
|
|
22
|
-
function
|
|
23
|
+
function p(e) {
|
|
23
24
|
return {
|
|
24
25
|
content: [{
|
|
25
26
|
type: "text",
|
|
@@ -28,7 +29,7 @@ function f(e) {
|
|
|
28
29
|
isError: !1
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
+
function m(e) {
|
|
32
33
|
return {
|
|
33
34
|
content: [{
|
|
34
35
|
type: "text",
|
|
@@ -37,13 +38,13 @@ function p(e) {
|
|
|
37
38
|
isError: !0
|
|
38
39
|
};
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
+
function h(e) {
|
|
41
42
|
let { semanticLayer: t, getSecurityContext: n, toolPrefix: i = "drizzle_cube_", tools: a = [
|
|
42
43
|
"discover",
|
|
43
44
|
"validate",
|
|
44
45
|
"load",
|
|
45
46
|
"chart"
|
|
46
|
-
], prompts: s = c(), resources:
|
|
47
|
+
], prompts: s = c(), resources: l, app: h = !1 } = e, _ = !!h, v = typeof h == "object" ? h : void 0, y = l ?? r(), b = _ ? [...y, ...g(v)] : y, x = o({ appEnabled: _ }), S = new Map(x.map((e) => [e.name, e])), C = a.filter((e) => S.has(e)).map((e) => {
|
|
47
48
|
let t = S.get(e), n = {
|
|
48
49
|
name: `${i}${e}`,
|
|
49
50
|
description: t.description,
|
|
@@ -58,21 +59,21 @@ function m(e) {
|
|
|
58
59
|
let D = {
|
|
59
60
|
semanticLayer: t,
|
|
60
61
|
getSecurityContext: n,
|
|
61
|
-
wrapContent:
|
|
62
|
-
wrapError:
|
|
62
|
+
wrapContent: p,
|
|
63
|
+
wrapError: m
|
|
63
64
|
}, O = {
|
|
64
|
-
discover: (e, t) =>
|
|
65
|
-
validate: (e, t) =>
|
|
66
|
-
load: (e, t) =>
|
|
67
|
-
chart: (e, t) =>
|
|
65
|
+
discover: (e, t) => u(D, e, t),
|
|
66
|
+
validate: (e, t) => d(D, e, t),
|
|
67
|
+
load: (e, t) => f(D, e, t),
|
|
68
|
+
chart: (e, t) => f(D, e, t)
|
|
68
69
|
};
|
|
69
70
|
async function k(e, t, n) {
|
|
70
71
|
let r = e.startsWith(i) ? e.slice(i.length) : e, o = a.includes(r) ? O[r] : void 0;
|
|
71
|
-
if (!o) return
|
|
72
|
+
if (!o) return m(`Unknown tool: ${e}`);
|
|
72
73
|
try {
|
|
73
74
|
return await o(t, n);
|
|
74
75
|
} catch (e) {
|
|
75
|
-
return
|
|
76
|
+
return m(e);
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
79
|
return {
|
|
@@ -84,8 +85,8 @@ function m(e) {
|
|
|
84
85
|
toolNames: w
|
|
85
86
|
};
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
-
let t = i(e);
|
|
88
|
+
function g(e) {
|
|
89
|
+
let t = i(l, e);
|
|
89
90
|
return t ? [{
|
|
90
91
|
uri: a,
|
|
91
92
|
name: "Drizzle Cube Visualization",
|
|
@@ -95,4 +96,4 @@ function h(e) {
|
|
|
95
96
|
}] : [];
|
|
96
97
|
}
|
|
97
98
|
//#endregion
|
|
98
|
-
export {
|
|
99
|
+
export { h as getCubeTools };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const e=require("./utils-BkdzL4m9.cjs");var t={valueField:{type:`array`,items:{type:`string`},description:`heatmap and activityGrid: single measure driving cell colour intensity. Required for both — the chart renders empty without it.`},dateField:{type:`array`,items:{type:`string`},description:`activityGrid only: single time dimension laying out the grid. Query it with day granularity over several months, or the grid has nothing to show.`}},n={minValue:{type:`number`,description:`gauge only: scale minimum (defaults to 0).`},maxValue:{type:`number`,description:`gauge only: scale maximum. ALWAYS set this — without it the gauge scales to the data it was given, so a single value always reads as 100%.`},template:{type:`string`,description:'kpiText only: sentence template around the value, e.g. "${fieldLabel}: ${value}". Defaults to that if omitted.'}},r={columns:{type:`array`,items:{type:`string`},description:`recordsTable only: fields to render as columns, in this order. Omit to show every field the query returns, in query order.`},hiddenColumns:{type:`array`,items:{type:`string`},description:`recordsTable only: fields fetched for row context or rowLink tokens but never displayed (e.g. an id used in the URL template). Leave empty unless a field is genuinely only needed behind the scenes — anything listed here disappears from the table.`}},i={columnFormats:{type:`object`,description:`recordsTable only: how each column renders, keyed by field name (e.g. "Employees.salary"). Formats are never inferred from the data — a column is plain text unless you say otherwise, so set this for any numeric, date, status or ratio column.`,additionalProperties:{type:`object`,required:[`kind`],properties:{kind:{type:`string`,enum:[`text`,`number`,`date`,`badge`,`progress`],description:`Required on every entry. text: as-is. number: formatted numeric. date: formatted date. badge: coloured pill for statuses/categories. progress: bar or ring for a bounded value. Use "text" when you only want to set a label.`},numberFormat:{type:`object`,description:`kind "number": { unit: "currency"|"percent"|"number"|"custom", decimals, abbreviate (K/M/B), currencyCode, customPrefix, customSuffix }.`},dateGranularity:{type:`string`,description:`kind "date": granularity to render at (e.g. "day", "month", "year").`},badgeColors:{type:`array`,description:`kind "badge": an ARRAY of { value, colorIndex } entries, not an object keyed by value. colorIndex is a number index into the dashboard palette (0, 1, 2, …), never a colour name like "green" — the palette is themed, so names would not follow it. A value with no entry renders neutral rather than being assigned a guessed colour.`,items:{type:`object`,required:[`value`,`colorIndex`],properties:{value:{type:`string`,description:`Cell value to colour, matched exactly`},colorIndex:{type:`number`,description:`Index into the dashboard colour palette`}}}},progressMin:{type:`number`,description:`kind "progress": lower bound (default 0). Values are clamped.`},progressMax:{type:`number`,description:`kind "progress": upper bound (default 100). Values are clamped.`},progressStyle:{type:`string`,enum:[`bar`,`circle`],description:`kind "progress": full-width bar, or a compact ring for narrow columns.`},label:{type:`string`,description:`Header override; defaults to the field title from the cube metadata.`},align:{type:`string`,enum:[`left`,`right`],description:`Cell alignment. Numbers usually read better right-aligned.`}}}},rowLink:{type:`object`,description:`recordsTable only: makes each row a link.`,required:[`urlTemplate`],properties:{urlTemplate:{type:`string`,description:`URL with {Cube.field} tokens substituted from the row, including hidden columns (e.g. "/employees/{Employees.id}"). Relative paths and http(s) URLs only.`},target:{type:`string`,enum:[`self`,`blank`],description:`Open in the same tab (default) or a new one.`}}},pageSize:{type:`number`,enum:[25,50,100],description:`recordsTable only: rows per page (default 25).`}},a=[`bar`,`line`,`area`,`pie`,`scatter`,`treemap`,`kpiNumber`,`kpiDelta`,`kpiText`,`table`,`recordsTable`,`radar`,`radialBar`,`bubble`,`funnel`,`waterfall`,`gauge`,`boxPlot`,`candlestick`,`activityGrid`,`measureProfile`,`sankey`,`sunburst`,`heatmap`,`markdown`];new Set(a);var o=`ui://drizzle-cube/visualization.html`,s=`text/html;profile=mcp-app`,c=a.filter(e=>e!==`markdown`);function l(e,t){if(!e||!t)return e;let n=`<script>window.__DRIZZLE_CUBE_MCP_APP_CONFIG__ = ${JSON.stringify({defaultLocale:t.defaultLocale,detectBrowserLocale:t.detectBrowserLocale}).replace(/<\//g,`<\\/`)}<\/script>`;return e.replace(`</head>`,`${n}</head>`)}async function u(e){let{mcpAppHtml:t}=await import(`drizzle-cube/mcp-app-html`);return l(t,e)}var d=[`2025-11-25`,`2025-06-18`,`2025-03-26`],f=`2025-11-25`;function p(e){let t=M(e[`mcp-protocol-version`])||`2025-11-25`;return{ok:d.includes(t),negotiated:d.includes(t)?t:null,supported:d}}function m(e){if(!e)return!1;let t=e.split(`,`).map(e=>e.trim().toLowerCase()),n=t.includes(`text/event-stream`),r=t.includes(`application/json`);return n&&!r}var h=`mcp-session-id`;function g(e){if(!e)return!1;let t=e.split(`,`).map(e=>e.trim().toLowerCase().split(`;`)[0]),n=t.some(e=>e===`application/json`),r=t.some(e=>e===`text/event-stream`),i=t.some(e=>e===`*/*`);return n&&r||n||i}function _(e){let t=e.hostname;return t===`localhost`||t===`::1`||t===`[::1]`||/^127(?:\.\d{1,3}){3}$/.test(t)}function v(e,t={}){let{allowMissingOrigin:n=!0,allowedOrigins:r}=t;if(!e)return n?{valid:!0}:{valid:!1,reason:`Origin header is required`};let i;try{i=new URL(e)}catch{return{valid:!1,reason:`Invalid Origin header format`}}let a=r&&r.length>0;return a&&r.includes(`*`)?{valid:!0}:a?r.map(e=>{try{return new URL(e).origin}catch{return e}}).includes(i.origin)?{valid:!0}:{valid:!1,reason:`Origin not in allowed list`}:_(i)?{valid:!0}:{valid:!1,reason:`Origin not allowed (default policy permits loopback origins only; configure mcp.allowedOrigins to allow this origin)`}}function y(e){return e.allowedOrigins?{allowedOrigins:e.allowedOrigins}:{}}function b(e){if(!e)return null;let t=/^Bearer\s+(\S+)$/i.exec(e);return t?t[1]:null}function x(e){return`Bearer resource_metadata="${e}"`}function S(e,t,n){let r=[];return t&&r.push(`id: ${t}`),n&&n>0&&r.push(`retry: ${n}`),r.push(`event: message`),r.push(`data: ${JSON.stringify(e)}`),r.push(``),r.join(`
|
|
2
|
+
`)}function C(e,t,n,r){return{jsonrpc:`2.0`,id:e??null,error:{code:t,message:n,...r===void 0?{}:{data:r}}}}function w(e,t){return{jsonrpc:`2.0`,id:e??null,result:t}}function T(e){if(!e||typeof e!=`object`)return null;let t=e;return t.jsonrpc!==`2.0`||typeof t.method!=`string`?null:{jsonrpc:`2.0`,method:t.method,id:t.id,params:t.params}}function E(e,t){let n=e?.protocolVersion;return{protocolVersion:n&&d.includes(n)?n:f,capabilities:{tools:{listChanged:!1},resources:{listChanged:!1},prompts:{listChanged:!1},sampling:{}},sessionId:P(),serverInfo:{name:t.serverName,version:typeof process<`u`?process.env?.npm_package_version||`dev`:`worker`},instructions:t.instructions}}async function D(e){return{resources:(await e.getResources()).map(({uri:e,name:t,description:n,mimeType:r})=>({uri:e,name:t,description:n,mimeType:r})),nextCursor:``}}async function O(e,t){let n=e?.uri,r=await t.getResources(),i=r.find(e=>e.uri===n)||r[0];if(!i)throw j(-32602,`resource not found`);return{contents:[{uri:i.uri,mimeType:i.mimeType,text:i.text}]}}function k(e,t){let n=e?.name,r=t.prompts.find(e=>e.name===n)||t.prompts[0];if(!r)throw j(-32602,`prompt not found`);return{name:r.name,description:r.description,messages:r.messages}}async function A(t,n,r){let{appEnabled:i,appConfig:a}=r,o=r.resources??B,s={appEnabled:i,serverName:r.serverName??`drizzle-cube`,prompts:r.prompts??z,getResources:async()=>{let e=await r.extractSecurityContext(r.rawRequest,r.rawResponse),t=J(r.semanticLayer,e,o);return i?[...t,...await R(a)]:t},instructions:r.instructions??e.y()};switch(t){case`initialize`:return E(n,s);case`list_tools`:case`tools/list`:return{tools:F({appEnabled:i}),nextCursor:``};case`call_tool`:case`tools/call`:return I(n,r);case`resources/list`:return await D(s);case`resources/templates/list`:return{resourceTemplates:[],nextCursor:``};case`resources/read`:return await O(n,s);case`prompts/list`:return{prompts:s.prompts.map(({name:e,description:t})=>({name:e,description:t})),nextCursor:``};case`ping`:return{};case`notifications/initialized`:return{};case`prompts/get`:return k(n,s);default:throw j(-32601,`Unknown MCP method: ${t}`)}}function j(e,t,n){let r=Error(t);return r.code=e,n!==void 0&&(r.data=n),r}function M(e){return e?Array.isArray(e)?e[0]||null:e:null}function N(e){return e.id===void 0||e.id===null}function P(){return`evt-${e.s()}`}function F(t){let n=[{name:`discover`,description:`MANDATORY FIRST CALL. You MUST call this before constructing any query — even if you think you know the schema.
|
|
3
|
+
|
|
4
|
+
Returns:
|
|
5
|
+
- 'cubes': matched cubes with measures, dimensions, joins, and metadata hints (eventStream for funnels, etc.)
|
|
6
|
+
- 'queryLanguageReference': the COMPLETE TypeScript DSL for query construction. This is the source of truth for field naming, filter operators, time dimensions, and analysis modes (funnel/flow/retention). READ IT before building queries — do not guess syntax.
|
|
7
|
+
- 'dateFilteringGuide': decision tree for date filtering vs time grouping. READ IT whenever the user mentions a time period — this is the #1 source of incorrect queries.
|
|
8
|
+
|
|
9
|
+
The 'joins' property on each cube shows relationships. You can include dimensions from ANY related cube in your query — the system auto-joins them.
|
|
10
|
+
|
|
11
|
+
Example: If Productivity has a join to Employees, you can query:
|
|
12
|
+
{ "measures": ["Productivity.totalPullRequests"], "dimensions": ["Employees.name"] }`,inputSchema:{type:`object`,properties:{topic:{type:`string`,description:`Keyword to search (e.g., "sales", "employees")`},intent:{type:`string`,description:`Natural language goal (e.g., "analyze productivity trends")`},limit:{type:`number`,description:`Max results (default: 10)`},minScore:{type:`number`,description:`Min relevance 0-1 (default: 0.1)`}}}},{name:`validate`,description:`Validate a query and get auto-corrections for issues.
|
|
13
|
+
|
|
14
|
+
Checks:
|
|
15
|
+
- Field existence (measures, dimensions exist in schema)
|
|
16
|
+
- Filter syntax and operators
|
|
17
|
+
- Cross-cube join validity
|
|
18
|
+
|
|
19
|
+
Returns corrected query if issues found, plus the generated SQL for debugging.`,inputSchema:{type:`object`,required:[`query`],properties:{query:{type:`object`,description:`CubeQuery to validate`}}}},{name:`load`,description:`Execute a semantic query and return aggregated results.
|
|
20
|
+
|
|
21
|
+
PREREQUISITE: You MUST have called 'discover' first in this session. The discover response contains the 'queryLanguageReference' (full DSL) and 'dateFilteringGuide' you need to construct a correct query. If you have not yet called discover, call it NOW before calling load.
|
|
22
|
+
|
|
23
|
+
Supports regular queries (measures/dimensions), funnel, flow, and retention analysis modes — see the queryLanguageReference returned by discover for the full DSL.
|
|
24
|
+
|
|
25
|
+
Key rules (the queryLanguageReference is authoritative — these are reminders, not the full spec):
|
|
26
|
+
- Fields are EXACTLY "CubeName.fieldName" (two parts, one dot). Copy verbatim from discover.
|
|
27
|
+
- Cross-cube joins: include dimensions from related cubes (system auto-joins).
|
|
28
|
+
- Aggregated totals over a period: use filters with inDateRange — NOT timeDimensions.
|
|
29
|
+
- Time series ("by month", "daily trend"): use timeDimensions WITH granularity.
|
|
30
|
+
- Top N: filters + order + limit.
|
|
31
|
+
|
|
32
|
+
Use "load" for data retrieval. Use "chart" to visualise results with an interactive chart.`,inputSchema:{type:`object`,required:[`query`],properties:{query:{type:`object`,description:`Semantic query object. Regular: { measures, dimensions, filters, timeDimensions, order, limit }. Funnel: { funnel: {...} }. Flow: { flow: {...} }. Retention: { retention: {...} }.`,properties:e.b}}}}];if(t?.appEnabled){n.push({name:`chart`,description:`Execute a semantic query and render an interactive chart visualization.
|
|
33
|
+
|
|
34
|
+
Same query format as "load", but renders results in the MCP App chart UI.
|
|
35
|
+
Include a "chart" object to control the visualization.
|
|
36
|
+
|
|
37
|
+
Chart types: ${c.join(`, `)}
|
|
38
|
+
Guidelines: single number -> kpiNumber, trend -> line/area, categories -> bar, part-of-whole -> pie, correlation -> scatter/bubble, distribution -> boxPlot, record-level listing -> recordsTable
|
|
39
|
+
|
|
40
|
+
recordsTable renders one row per record, so pair it with "ungrouped": true in the query. Its columns are plain text unless you say otherwise: use chart.displayConfig.columnFormats to give each column a kind (number, date, badge, progress), which is what makes the listing readable.`,inputSchema:{type:`object`,required:[`query`],properties:{query:{type:`object`,description:`Semantic query object. Same format as the load tool.`,properties:e.b},chart:{type:`object`,description:`Chart configuration for the visualization. If omitted, chart type is auto-detected from query shape.`,properties:{type:{type:`string`,enum:c,description:`Chart type to render`},title:{type:`string`,description:`Chart title`},chartConfig:{type:`object`,description:`Axis configuration — same schema as agent add_portlet chartConfig.`,properties:{xAxis:{type:`array`,items:{type:`string`},description:`Dimension fields for X axis`},yAxis:{type:`array`,items:{type:`string`},description:`Measure fields for Y axis`},series:{type:`array`,items:{type:`string`},description:`Dimension for series splitting (grouped/stacked)`},yAxisAssignment:{type:`object`,description:`Dual Y-axis: map measure fields to "left" or "right". Only bar/line/area with 2+ measures of different scales.`},sizeField:{type:`string`,description:`Bubble chart size field`},colorField:{type:`string`,description:`Bubble chart color field`},...r}},displayConfig:{type:`object`,description:`Display options.`,properties:{showLegend:{type:`boolean`},showGrid:{type:`boolean`},showTooltip:{type:`boolean`},stacked:{type:`boolean`},stackType:{type:`string`,enum:[`none`,`normal`,`percent`]},orientation:{type:`string`,enum:[`horizontal`,`vertical`]},...i}},xAxis:{type:`string`,description:`Deprecated: use chartConfig.xAxis`},yAxis:{type:`array`,items:{type:`string`},description:`Deprecated: use chartConfig.yAxis`}}}}}});let t=n.find(e=>e.name===`chart`);t&&(t._meta={ui:{resourceUri:o}})}return n}async function I(t,n){let{semanticLayer:r,extractSecurityContext:i,rawRequest:a,rawResponse:o}=n,s=t||{};if(!s.name)throw j(-32602,`name is required for tools/call`);let c=s.arguments;try{switch(s.name){case`discover`:{let t=await i(a,o);return L(await e.p(r,t,c||{}))}case`validate`:{let t=c||{};if(!t.query)throw j(-32602,`query is required`);let n=await i(a,o);return L(await e.f(r,n,t))}case`load`:{let t=c||{};if(!t.query)throw j(-32602,`query is required`);let n=await i(a,o);return L(await e.m(r,n,t))}case`chart`:{let t=c||{};if(!t.query)throw j(-32602,`query is required`);let n=await i(a,o);return L(await e.m(r,n,t))}default:throw j(-32601,`Unknown tool: ${s.name}`)}}catch(e){if(e?.code===-32602||e?.code===-32601)throw e;let t=e instanceof Error?e.message:String(e);return{content:[{type:`text`,text:JSON.stringify({error:t})}],isError:!0}}}function L(e){return{content:[{type:`text`,text:typeof e==`string`?e:JSON.stringify(e)}],isError:!1}}async function R(e){let t=await u(e);return t?[{uri:o,name:`Drizzle Cube Visualization`,description:`Interactive chart visualization for query results`,mimeType:s,text:t}]:[]}var z=e.v(),B=[{uri:`drizzle-cube://quickstart`,name:`Drizzle Cube MCP Quickstart`,description:`Minimal guide for using discover/validate/load`,mimeType:`text/markdown`,text:[`# Drizzle Cube MCP Quickstart`,``,`Tools:`,`- discover: { topic?, intent?, limit?, minScore? } -> cubes list`,`- validate: { query } -> corrected query + issues`,`- load: { query } -> data + annotation (text only)`,`- chart: { query, chart? } -> data + interactive chart visualization`,``,`Recommended flow:`,`1) tools/call name=discover intent="<goal>"`,`2) tools/call name=validate query=<draft> (optional)`,`3) tools/call name=load query=<validated> (data only) OR name=chart query=<validated> chart={type, ...} (with visualization)`,``,`Query shapes supported:`,`- regular: { measures, dimensions, filters, timeDimensions, order, limit, offset, ungrouped }`,`- funnel: { funnel: { bindingKey, timeDimension, steps[], includeTimeMetrics?, globalTimeWindow? } }`,`- flow: { flow: { bindingKey, timeDimension, eventDimension, startingStep: { name, filter }, stepsBefore, stepsAfter } }`,`- retention: { retention: { timeDimension, bindingKey, dateRange: { start, end }, granularity, periods, retentionType } }`,``,`Filter rules: flat arrays of { member, operator, values }. Use { and: [...] } or { or: [...] } for logical grouping.`].join(`
|
|
41
|
+
`)},{uri:`drizzle-cube://query-shapes`,name:`Query Shapes Reference`,description:`Detailed schema examples for regular, funnel, flow, and retention queries`,mimeType:`text/markdown`,text:[`# Query Shapes`,``,`## Regular query`,"```json",`{`,` "measures": ["Sales.count"],`,` "dimensions": ["Sales.channel"],`,` "filters": [`,` { "member": "Sales.status", "operator": "equals", "values": ["paid"] },`,` { "or": [`,` { "member": "Sales.region", "operator": "equals", "values": ["US"] },`,` { "member": "Sales.region", "operator": "equals", "values": ["EU"] }`,` ]}`,` ],`,` "timeDimensions": [{ "dimension": "Sales.createdAt", "dateRange": "last 30 days", "granularity": "day" }],`,` "order": { "Sales.createdAt": "asc" },`,` "limit": 500`,`}`,"```",``,`## Funnel`,"```json",`{`,` "funnel": {`,` "bindingKey": "Events.userId",`,` "timeDimension": "Events.timestamp",`,` "steps": [`,` {`,` "name": "Signup",`,` "filter": [`,` { "member": "Events.eventType", "operator": "equals", "values": ["signup"] },`,` { "member": "Events.timestamp", "operator": "inDateRange", "values": ["last 6 months"] }`,` ]`,` },`,` {`,` "name": "Purchase",`,` "filter": [{ "member": "Events.eventType", "operator": "equals", "values": ["purchase"] }],`,` "timeToConvert": "P7D"`,` }`,` ],`,` "includeTimeMetrics": true`,` }`,`}`,"```",``,`## Flow`,"```json",`{`,` "flow": {`,` "bindingKey": "Events.userId",`,` "timeDimension": "Events.timestamp",`,` "eventDimension": "Events.eventType",`,` "startingStep": {`,` "name": "Checkout",`,` "filter": { "member": "Events.eventType", "operator": "equals", "values": ["checkout"] }`,` },`,` "stepsBefore": 2,`,` "stepsAfter": 3`,` }`,`}`,"```",``,`## Retention`,"```json",`{`,` "retention": {`,` "timeDimension": "Events.timestamp",`,` "bindingKey": "Events.userId",`,` "dateRange": { "start": "2024-01-01", "end": "2024-03-31" },`,` "granularity": "week",`,` "periods": 8,`,` "retentionType": "classic",`,` "breakdownDimensions": ["Events.country"]`,` }`,`}`,"```",``,`### Filter operators`,`String: equals, notEquals, contains, notContains, startsWith, endsWith, like, ilike, regex`,`Numeric: gt, gte, lt, lte, between, notBetween`,`Set: in, notIn, set, notSet, isEmpty, isNotEmpty`,`Date: inDateRange, beforeDate, afterDate`,``,`### Time handling`,`- Aggregated totals: use filters with inDateRange (NOT timeDimensions)`,`- Time series grouping: use timeDimensions with granularity`,`- Both can be combined: inDateRange filter + timeDimensions with granularity`,`- Period comparison: use compareDateRange in timeDimensions`].join(`
|
|
42
|
+
`)}];function V(){return B}function H(){return z}function U(){return e.y()}function W(e){let t=H();return typeof e==`function`?e(t):e??t}function G(e){let t=V();return typeof e==`function`?e(t):e??t}function K(e){let t=U();return typeof e==`function`?e(t):e??t}function q(e,t){return{uri:`drizzle-cube://schema`,name:`Cube Schema`,description:`Current cube metadata as JSON`,mimeType:`application/json`,text:JSON.stringify(e.getMetadata(t),null,2)}}function J(e,t,n){let r=q(e,t);return[...G(n).filter(e=>e.uri!==r.uri),r]}Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return W}});
|