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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as e, _ as t, b as n, g as r, h as i, k as a, m as o, p as s } from "./utils-
|
|
2
|
-
import { D as c, E as l, O as u, T as d } from "./mcp-transport-
|
|
1
|
+
import { O as e, _ as t, b as n, g as r, h as i, k as a, m as o, p as s } from "./utils-BY3FDOmN.js";
|
|
2
|
+
import { D as c, E as l, O as u, T as d } from "./mcp-transport-yJDy3T6W.js";
|
|
3
3
|
import { a as f, c as p, d as m, i as h, l as g, n as _, o as v, r as y, s as b, t as x, u as S } from "./chartConfigHelpers-BsnbxA2c.js";
|
|
4
4
|
//#region src/server/agent/agent-prompts.ts
|
|
5
5
|
var ee = [
|
|
@@ -25,7 +25,7 @@ var ee = [
|
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/server/agent/system-prompt.ts
|
|
27
27
|
function te(e, t) {
|
|
28
|
-
if (
|
|
28
|
+
if (t.measures && t.measures.length !== 0) {
|
|
29
29
|
e.push(""), e.push("**Measures:**");
|
|
30
30
|
for (let n of t.measures) {
|
|
31
31
|
let r = n.description ? ` - ${n.description}` : "";
|
|
@@ -34,7 +34,7 @@ function te(e, t) {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
function ne(e, t) {
|
|
37
|
-
if (
|
|
37
|
+
if (t.dimensions && t.dimensions.length !== 0) {
|
|
38
38
|
e.push(""), e.push("**Dimensions:**");
|
|
39
39
|
for (let n of t.dimensions) {
|
|
40
40
|
let r = n.description ? ` - ${n.description}` : "";
|
|
@@ -43,7 +43,7 @@ function ne(e, t) {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
function re(e, t) {
|
|
46
|
-
if (
|
|
46
|
+
if (t.relationships && t.relationships.length !== 0) {
|
|
47
47
|
e.push(""), e.push("**Joins:**");
|
|
48
48
|
for (let n of t.relationships) e.push(`- → \`${n.targetCube}\` (${n.relationship})`);
|
|
49
49
|
}
|
|
@@ -1052,8 +1052,13 @@ var w = {
|
|
|
1052
1052
|
key: "content",
|
|
1053
1053
|
label: "chart.configText.markdown_content",
|
|
1054
1054
|
type: "string",
|
|
1055
|
-
|
|
1056
|
-
|
|
1055
|
+
placement: "chart",
|
|
1056
|
+
rows: 18,
|
|
1057
|
+
syntax: "markdownTemplate",
|
|
1058
|
+
placeholder: "chart.markdown.contentPlaceholder",
|
|
1059
|
+
description: "chart.markdown.contentDescription",
|
|
1060
|
+
docsUrl: "https://knap.md/variables",
|
|
1061
|
+
docsLabel: "chart.markdown.contentDocsLabel"
|
|
1057
1062
|
},
|
|
1058
1063
|
{
|
|
1059
1064
|
key: "accentColorIndex",
|
|
@@ -1603,7 +1608,7 @@ var w = {
|
|
|
1603
1608
|
description: "chart.option.xAxisFormat.description"
|
|
1604
1609
|
}
|
|
1605
1610
|
]
|
|
1606
|
-
},
|
|
1611
|
+
}, ce = {
|
|
1607
1612
|
clickableElements: { bar: !0 },
|
|
1608
1613
|
displayOptions: ["showTooltip", "hideHeader"],
|
|
1609
1614
|
dropZones: [{
|
|
@@ -1652,7 +1657,7 @@ var w = {
|
|
|
1652
1657
|
description: "chart.configText.number_formatting_for_the_y_axis"
|
|
1653
1658
|
}
|
|
1654
1659
|
]
|
|
1655
|
-
},
|
|
1660
|
+
}, le = {
|
|
1656
1661
|
clickableElements: { bar: !0 },
|
|
1657
1662
|
displayOptions: ["hideHeader"],
|
|
1658
1663
|
dropZones: [{
|
|
@@ -1714,7 +1719,7 @@ var w = {
|
|
|
1714
1719
|
description: "chart.configText.number_formatting_for_the_price_axis"
|
|
1715
1720
|
}
|
|
1716
1721
|
]
|
|
1717
|
-
},
|
|
1722
|
+
}, ue = {
|
|
1718
1723
|
displayOptions: [
|
|
1719
1724
|
"showLegend",
|
|
1720
1725
|
"showTooltip",
|
|
@@ -1786,7 +1791,7 @@ var w = {
|
|
|
1786
1791
|
description: "chart.configText.number_formatting_for_the_y_axis"
|
|
1787
1792
|
}
|
|
1788
1793
|
]
|
|
1789
|
-
},
|
|
1794
|
+
}, de = {
|
|
1790
1795
|
dropZones: [{
|
|
1791
1796
|
key: "xAxis",
|
|
1792
1797
|
label: "chart.configText.category",
|
|
@@ -1844,7 +1849,7 @@ var w = {
|
|
|
1844
1849
|
isValid: !1,
|
|
1845
1850
|
message: "chart.proportionBar.validation.measureRequired"
|
|
1846
1851
|
} : { isValid: !0 }
|
|
1847
|
-
},
|
|
1852
|
+
}, fe = {
|
|
1848
1853
|
clickableElements: {},
|
|
1849
1854
|
displayOptions: ["hideHeader"],
|
|
1850
1855
|
dropZones: [{
|
|
@@ -1897,18 +1902,18 @@ var w = {
|
|
|
1897
1902
|
description: "chart.configText.number_formatting_for_the_displayed_value_and_axis_labels"
|
|
1898
1903
|
}
|
|
1899
1904
|
]
|
|
1900
|
-
},
|
|
1905
|
+
}, q = {
|
|
1901
1906
|
packageName: "recharts",
|
|
1902
1907
|
installCommand: "npm install recharts"
|
|
1903
|
-
},
|
|
1908
|
+
}, pe = {
|
|
1904
1909
|
bar: {
|
|
1905
1910
|
label: "chart.bar.label",
|
|
1906
1911
|
icon: "chartBar",
|
|
1907
1912
|
description: "chart.bar.description",
|
|
1908
1913
|
useCase: "chart.bar.useCase",
|
|
1909
1914
|
isAvailable: f,
|
|
1910
|
-
dependencies:
|
|
1911
|
-
config: async () => (await import("./BarChart.config-
|
|
1915
|
+
dependencies: q,
|
|
1916
|
+
config: async () => (await import("./BarChart.config-JWskLg7a.js")).barChartConfig
|
|
1912
1917
|
},
|
|
1913
1918
|
line: {
|
|
1914
1919
|
label: "chart.line.label",
|
|
@@ -1916,8 +1921,8 @@ var w = {
|
|
|
1916
1921
|
description: "chart.line.description",
|
|
1917
1922
|
useCase: "chart.line.useCase",
|
|
1918
1923
|
isAvailable: f,
|
|
1919
|
-
dependencies:
|
|
1920
|
-
config: async () => (await import("./LineChart.config-
|
|
1924
|
+
dependencies: q,
|
|
1925
|
+
config: async () => (await import("./LineChart.config-DHlctcYT.js")).lineChartConfig
|
|
1921
1926
|
},
|
|
1922
1927
|
area: {
|
|
1923
1928
|
label: "chart.area.label",
|
|
@@ -1925,8 +1930,8 @@ var w = {
|
|
|
1925
1930
|
description: "chart.area.description",
|
|
1926
1931
|
useCase: "chart.area.useCase",
|
|
1927
1932
|
isAvailable: f,
|
|
1928
|
-
dependencies:
|
|
1929
|
-
config: async () => (await import("./AreaChart.config-
|
|
1933
|
+
dependencies: q,
|
|
1934
|
+
config: async () => (await import("./AreaChart.config-BjBnqhrD.js")).areaChartConfig
|
|
1930
1935
|
},
|
|
1931
1936
|
pie: {
|
|
1932
1937
|
label: "chart.pie.label",
|
|
@@ -1934,8 +1939,8 @@ var w = {
|
|
|
1934
1939
|
description: "chart.pie.description",
|
|
1935
1940
|
useCase: "chart.pie.useCase",
|
|
1936
1941
|
isAvailable: f,
|
|
1937
|
-
dependencies:
|
|
1938
|
-
config: async () => (await import("./PieChart.config-
|
|
1942
|
+
dependencies: q,
|
|
1943
|
+
config: async () => (await import("./PieChart.config-D6Ofc2h-.js")).pieChartConfig
|
|
1939
1944
|
},
|
|
1940
1945
|
scatter: {
|
|
1941
1946
|
label: "chart.scatter.label",
|
|
@@ -1949,8 +1954,8 @@ var w = {
|
|
|
1949
1954
|
available: !1,
|
|
1950
1955
|
reason: "chart.availability.scatter"
|
|
1951
1956
|
} : { available: !0 },
|
|
1952
|
-
dependencies:
|
|
1953
|
-
config: async () => (await import("./ScatterChart.config-
|
|
1957
|
+
dependencies: q,
|
|
1958
|
+
config: async () => (await import("./ScatterChart.config-WwER0vgC.js")).scatterChartConfig
|
|
1954
1959
|
},
|
|
1955
1960
|
bubble: {
|
|
1956
1961
|
label: "chart.bubble.label",
|
|
@@ -1964,8 +1969,8 @@ var w = {
|
|
|
1964
1969
|
available: !1,
|
|
1965
1970
|
reason: "chart.availability.bubble"
|
|
1966
1971
|
} : { available: !0 },
|
|
1967
|
-
dependencies:
|
|
1968
|
-
config: async () => (await import("./BubbleChart.config-
|
|
1972
|
+
dependencies: q,
|
|
1973
|
+
config: async () => (await import("./BubbleChart.config-BqNbgcs4.js")).bubbleChartConfig
|
|
1969
1974
|
},
|
|
1970
1975
|
radar: {
|
|
1971
1976
|
label: "chart.radar.label",
|
|
@@ -1973,8 +1978,8 @@ var w = {
|
|
|
1973
1978
|
description: "chart.radar.description",
|
|
1974
1979
|
useCase: "chart.radar.useCase",
|
|
1975
1980
|
isAvailable: f,
|
|
1976
|
-
dependencies:
|
|
1977
|
-
config: async () => (await import("./RadarChart.config-
|
|
1981
|
+
dependencies: q,
|
|
1982
|
+
config: async () => (await import("./RadarChart.config-x87UPfQH.js")).radarChartConfig
|
|
1978
1983
|
},
|
|
1979
1984
|
radialBar: {
|
|
1980
1985
|
label: "chart.radialBar.label",
|
|
@@ -1982,8 +1987,8 @@ var w = {
|
|
|
1982
1987
|
description: "chart.radialBar.description",
|
|
1983
1988
|
useCase: "chart.radialBar.useCase",
|
|
1984
1989
|
isAvailable: f,
|
|
1985
|
-
dependencies:
|
|
1986
|
-
config: async () => (await import("./RadialBarChart.config-
|
|
1990
|
+
dependencies: q,
|
|
1991
|
+
config: async () => (await import("./RadialBarChart.config-BGA-fVmo.js")).radialBarChartConfig
|
|
1987
1992
|
},
|
|
1988
1993
|
treemap: {
|
|
1989
1994
|
label: "chart.treemap.label",
|
|
@@ -1991,22 +1996,22 @@ var w = {
|
|
|
1991
1996
|
description: "chart.treemap.description",
|
|
1992
1997
|
useCase: "chart.treemap.useCase",
|
|
1993
1998
|
isAvailable: f,
|
|
1994
|
-
dependencies:
|
|
1995
|
-
config: async () => (await import("./TreeMapChart.config
|
|
1999
|
+
dependencies: q,
|
|
2000
|
+
config: async () => (await import("./TreeMapChart.config-wNJWipDf.js")).treemapChartConfig
|
|
1996
2001
|
},
|
|
1997
2002
|
table: {
|
|
1998
2003
|
label: "chart.table.label",
|
|
1999
2004
|
icon: "chartTable",
|
|
2000
2005
|
description: "chart.table.description",
|
|
2001
2006
|
useCase: "chart.table.useCase",
|
|
2002
|
-
config: async () => (await import("./DataTable.config-
|
|
2007
|
+
config: async () => (await import("./DataTable.config-4QtzEm2K.js")).dataTableConfig
|
|
2003
2008
|
},
|
|
2004
2009
|
recordsTable: {
|
|
2005
2010
|
label: "chart.recordsTable.label",
|
|
2006
2011
|
icon: "chartRecordsTable",
|
|
2007
2012
|
description: "chart.recordsTable.description",
|
|
2008
2013
|
useCase: "chart.recordsTable.useCase",
|
|
2009
|
-
config: async () => (await import("./RecordsTable.config-
|
|
2014
|
+
config: async () => (await import("./RecordsTable.config-KsPOo8YB.js")).recordsTableConfig
|
|
2010
2015
|
},
|
|
2011
2016
|
activityGrid: {
|
|
2012
2017
|
label: "chart.activityGrid.label",
|
|
@@ -2020,7 +2025,7 @@ var w = {
|
|
|
2020
2025
|
available: !1,
|
|
2021
2026
|
reason: "chart.availability.requiresTimeDimension"
|
|
2022
2027
|
} : { available: !0 },
|
|
2023
|
-
config: async () => (await import("./ActivityGridChart.config-
|
|
2028
|
+
config: async () => (await import("./ActivityGridChart.config-D8brFtkU.js")).activityGridChartConfig
|
|
2024
2029
|
},
|
|
2025
2030
|
kpiNumber: {
|
|
2026
2031
|
label: "chart.kpiNumber.label",
|
|
@@ -2028,7 +2033,7 @@ var w = {
|
|
|
2028
2033
|
description: "chart.kpiNumber.description",
|
|
2029
2034
|
useCase: "chart.kpiNumber.useCase",
|
|
2030
2035
|
isAvailable: h,
|
|
2031
|
-
config: async () => (await import("./KpiNumber.config-
|
|
2036
|
+
config: async () => (await import("./KpiNumber.config-Dt8kOvIA.js")).kpiNumberConfig
|
|
2032
2037
|
},
|
|
2033
2038
|
kpiDelta: {
|
|
2034
2039
|
label: "chart.kpiDelta.label",
|
|
@@ -2036,7 +2041,7 @@ var w = {
|
|
|
2036
2041
|
description: "chart.kpiDelta.description",
|
|
2037
2042
|
useCase: "chart.kpiDelta.useCase",
|
|
2038
2043
|
isAvailable: f,
|
|
2039
|
-
config: async () => (await import("./KpiDelta.config-
|
|
2044
|
+
config: async () => (await import("./KpiDelta.config-CgYK9zIF.js")).kpiDeltaConfig
|
|
2040
2045
|
},
|
|
2041
2046
|
kpiText: {
|
|
2042
2047
|
label: "chart.kpiText.label",
|
|
@@ -2044,38 +2049,38 @@ var w = {
|
|
|
2044
2049
|
description: "chart.kpiText.description",
|
|
2045
2050
|
useCase: "chart.kpiText.useCase",
|
|
2046
2051
|
isAvailable: h,
|
|
2047
|
-
config: async () => (await import("./KpiText.config-
|
|
2052
|
+
config: async () => (await import("./KpiText.config-BE8HbXQ0.js")).kpiTextConfig
|
|
2048
2053
|
},
|
|
2049
2054
|
markdown: {
|
|
2050
2055
|
label: "chart.markdown.label",
|
|
2051
2056
|
icon: "chartMarkdown",
|
|
2052
2057
|
description: "chart.markdown.description",
|
|
2053
2058
|
useCase: "chart.markdown.useCase",
|
|
2054
|
-
config: async () => (await import("./MarkdownChart.config-
|
|
2059
|
+
config: async () => (await import("./MarkdownChart.config-B0T5A7dw.js")).markdownConfig
|
|
2055
2060
|
},
|
|
2056
2061
|
funnel: {
|
|
2057
2062
|
label: "chart.funnel.label",
|
|
2058
2063
|
icon: "chartFunnel",
|
|
2059
2064
|
description: "chart.funnel.description",
|
|
2060
2065
|
useCase: "chart.funnel.useCase",
|
|
2061
|
-
dependencies:
|
|
2062
|
-
config: async () => (await import("./FunnelChart.config-
|
|
2066
|
+
dependencies: q,
|
|
2067
|
+
config: async () => (await import("./FunnelChart.config-Uah6h6t6.js")).funnelChartConfig
|
|
2063
2068
|
},
|
|
2064
2069
|
sankey: {
|
|
2065
2070
|
label: "chart.sankey.label",
|
|
2066
2071
|
icon: "chartSankey",
|
|
2067
2072
|
description: "chart.sankey.description",
|
|
2068
2073
|
useCase: "chart.sankey.useCase",
|
|
2069
|
-
dependencies:
|
|
2070
|
-
config: async () => (await import("./SankeyChart.config-
|
|
2074
|
+
dependencies: q,
|
|
2075
|
+
config: async () => (await import("./SankeyChart.config-B1K4e0RA.js")).sankeyChartConfig
|
|
2071
2076
|
},
|
|
2072
2077
|
sunburst: {
|
|
2073
2078
|
label: "chart.sunburst.label",
|
|
2074
2079
|
icon: "chartSunburst",
|
|
2075
2080
|
description: "chart.sunburst.description",
|
|
2076
2081
|
useCase: "chart.sunburst.useCase",
|
|
2077
|
-
dependencies:
|
|
2078
|
-
config: async () => (await import("./SunburstChart.config-
|
|
2082
|
+
dependencies: q,
|
|
2083
|
+
config: async () => (await import("./SunburstChart.config-CBYye6Ez.js")).sunburstChartConfig
|
|
2079
2084
|
},
|
|
2080
2085
|
heatmap: {
|
|
2081
2086
|
label: "chart.heatmap.label",
|
|
@@ -2093,21 +2098,21 @@ var w = {
|
|
|
2093
2098
|
packageName: "@nivo/heatmap",
|
|
2094
2099
|
installCommand: "npm install @nivo/heatmap"
|
|
2095
2100
|
},
|
|
2096
|
-
config: async () => (await import("./HeatMapChart.config-
|
|
2101
|
+
config: async () => (await import("./HeatMapChart.config-C1Wl6SHf.js")).heatmapChartConfig
|
|
2097
2102
|
},
|
|
2098
2103
|
retentionHeatmap: {
|
|
2099
2104
|
label: "chart.retentionHeatmap.label",
|
|
2100
2105
|
icon: "chartRetention",
|
|
2101
2106
|
description: "chart.retentionHeatmap.description",
|
|
2102
2107
|
useCase: "chart.retentionHeatmap.useCase",
|
|
2103
|
-
config: async () => (await import("./RetentionHeatmap.config-
|
|
2108
|
+
config: async () => (await import("./RetentionHeatmap.config-tnd7N7g-.js")).retentionHeatmapConfig
|
|
2104
2109
|
},
|
|
2105
2110
|
retentionCombined: {
|
|
2106
2111
|
label: "chart.retentionCombined.label",
|
|
2107
2112
|
icon: "chartRetention",
|
|
2108
2113
|
description: "chart.retentionCombined.description",
|
|
2109
2114
|
useCase: "chart.retentionCombined.useCase",
|
|
2110
|
-
config: async () => (await import("./RetentionCombinedChart.config-
|
|
2115
|
+
config: async () => (await import("./RetentionCombinedChart.config-DVDQBMW8.js")).retentionCombinedConfig
|
|
2111
2116
|
},
|
|
2112
2117
|
boxPlot: {
|
|
2113
2118
|
label: "chart.boxPlot.label",
|
|
@@ -2115,7 +2120,7 @@ var w = {
|
|
|
2115
2120
|
description: "chart.boxPlot.description",
|
|
2116
2121
|
useCase: "chart.boxPlot.useCase",
|
|
2117
2122
|
isAvailable: f,
|
|
2118
|
-
config: async () => (await import("./BoxPlotChart.config-
|
|
2123
|
+
config: async () => (await import("./BoxPlotChart.config-DXgi-pWk.js")).boxPlotChartConfig
|
|
2119
2124
|
},
|
|
2120
2125
|
dotStrip: {
|
|
2121
2126
|
label: "chart.dotStrip.label",
|
|
@@ -2123,7 +2128,7 @@ var w = {
|
|
|
2123
2128
|
description: "chart.dotStrip.description",
|
|
2124
2129
|
useCase: "chart.dotStrip.useCase",
|
|
2125
2130
|
isAvailable: f,
|
|
2126
|
-
config: async () => (await import("./DotStripChart.config-
|
|
2131
|
+
config: async () => (await import("./DotStripChart.config-tmdykLsT.js")).dotStripChartConfig
|
|
2127
2132
|
},
|
|
2128
2133
|
waterfall: {
|
|
2129
2134
|
label: "chart.waterfall.label",
|
|
@@ -2131,8 +2136,8 @@ var w = {
|
|
|
2131
2136
|
description: "chart.waterfall.description",
|
|
2132
2137
|
useCase: "chart.waterfall.useCase",
|
|
2133
2138
|
isAvailable: f,
|
|
2134
|
-
dependencies:
|
|
2135
|
-
config: async () => (await import("./WaterfallChart.config-
|
|
2139
|
+
dependencies: q,
|
|
2140
|
+
config: async () => (await import("./WaterfallChart.config-CPJLjH4K.js")).waterfallChartConfig
|
|
2136
2141
|
},
|
|
2137
2142
|
candlestick: {
|
|
2138
2143
|
label: "chart.candlestick.label",
|
|
@@ -2146,7 +2151,7 @@ var w = {
|
|
|
2146
2151
|
available: !1,
|
|
2147
2152
|
reason: "chart.availability.requiresDimension"
|
|
2148
2153
|
} : { available: !0 },
|
|
2149
|
-
config: async () => (await import("./CandlestickChart.config-
|
|
2154
|
+
config: async () => (await import("./CandlestickChart.config-D-KaQpN1.js")).candlestickChartConfig
|
|
2150
2155
|
},
|
|
2151
2156
|
measureProfile: {
|
|
2152
2157
|
label: "chart.measureProfile.label",
|
|
@@ -2157,8 +2162,8 @@ var w = {
|
|
|
2157
2162
|
available: !1,
|
|
2158
2163
|
reason: "chart.availability.requiresTwoMeasures"
|
|
2159
2164
|
} : { available: !0 },
|
|
2160
|
-
dependencies:
|
|
2161
|
-
config: async () => (await import("./MeasureProfileChart.config-
|
|
2165
|
+
dependencies: q,
|
|
2166
|
+
config: async () => (await import("./MeasureProfileChart.config-CO9Cc3Ha.js")).measureProfileChartConfig
|
|
2162
2167
|
},
|
|
2163
2168
|
proportionBar: {
|
|
2164
2169
|
label: "chart.proportionBar.label",
|
|
@@ -2166,7 +2171,7 @@ var w = {
|
|
|
2166
2171
|
description: "chart.proportionBar.description",
|
|
2167
2172
|
useCase: "chart.proportionBar.useCase",
|
|
2168
2173
|
isAvailable: f,
|
|
2169
|
-
config: async () => (await import("./ProportionBarChart.config-
|
|
2174
|
+
config: async () => (await import("./ProportionBarChart.config-BfiCmXI7.js")).proportionBarChartConfig
|
|
2170
2175
|
},
|
|
2171
2176
|
gauge: {
|
|
2172
2177
|
label: "chart.gauge.label",
|
|
@@ -2178,10 +2183,10 @@ var w = {
|
|
|
2178
2183
|
packageName: "d3-shape",
|
|
2179
2184
|
installCommand: "npm install d3-shape"
|
|
2180
2185
|
},
|
|
2181
|
-
config: async () => (await import("./GaugeChart.config-
|
|
2186
|
+
config: async () => (await import("./GaugeChart.config-DIWl6xVG.js")).gaugeChartConfig
|
|
2182
2187
|
}
|
|
2183
2188
|
};
|
|
2184
|
-
function
|
|
2189
|
+
function me(e, t) {
|
|
2185
2190
|
return {
|
|
2186
2191
|
...t,
|
|
2187
2192
|
label: e.label,
|
|
@@ -2192,7 +2197,7 @@ function pe(e, t) {
|
|
|
2192
2197
|
}
|
|
2193
2198
|
//#endregion
|
|
2194
2199
|
//#region src/client/charts/chartConfigRegistry.ts
|
|
2195
|
-
var
|
|
2200
|
+
var he = {
|
|
2196
2201
|
bar: w,
|
|
2197
2202
|
line: T,
|
|
2198
2203
|
area: se,
|
|
@@ -2217,23 +2222,23 @@ var me = {
|
|
|
2217
2222
|
retentionCombined: W,
|
|
2218
2223
|
boxPlot: G,
|
|
2219
2224
|
dotStrip: K,
|
|
2220
|
-
waterfall:
|
|
2221
|
-
candlestick:
|
|
2222
|
-
measureProfile:
|
|
2223
|
-
proportionBar:
|
|
2224
|
-
gauge:
|
|
2225
|
-
},
|
|
2226
|
-
function
|
|
2227
|
-
return
|
|
2225
|
+
waterfall: ce,
|
|
2226
|
+
candlestick: le,
|
|
2227
|
+
measureProfile: ue,
|
|
2228
|
+
proportionBar: de,
|
|
2229
|
+
gauge: fe
|
|
2230
|
+
}, J = Object.fromEntries(Object.keys(pe).map((e) => [e, me(pe[e], he[e])]));
|
|
2231
|
+
function ge(e) {
|
|
2232
|
+
return J[e]?.recordGrain === !0;
|
|
2228
2233
|
}
|
|
2229
2234
|
//#endregion
|
|
2230
2235
|
//#region src/server/agent/chart-validation.ts
|
|
2231
|
-
function
|
|
2236
|
+
function Y(e) {
|
|
2232
2237
|
return Array.isArray(e) ? e.length > 0 : !!e;
|
|
2233
2238
|
}
|
|
2234
|
-
function
|
|
2239
|
+
function _e(e, t, n, r) {
|
|
2235
2240
|
for (let i of e.dropZones) {
|
|
2236
|
-
if (!i.mandatory ||
|
|
2241
|
+
if (!i.mandatory || Y(n?.[i.key])) continue;
|
|
2237
2242
|
let e = i.acceptTypes?.join("/") ?? "fields";
|
|
2238
2243
|
r.push(a("server.validation.chart.dropZoneRequired", {
|
|
2239
2244
|
key: i.key,
|
|
@@ -2243,36 +2248,36 @@ function ge(e, t, n, r) {
|
|
|
2243
2248
|
}));
|
|
2244
2249
|
}
|
|
2245
2250
|
}
|
|
2246
|
-
function
|
|
2247
|
-
if (
|
|
2251
|
+
function ve(e, t, n) {
|
|
2252
|
+
if (Y(e?.xAxis)) return;
|
|
2248
2253
|
let r = t.dimensions ?? [], i = t.timeDimensions ?? [], o = r.length > 0 || i.length > 0;
|
|
2249
2254
|
n.push(a(o ? "server.validation.chart.barXAxisRequired" : "server.validation.chart.barNeedsDimension"));
|
|
2250
2255
|
}
|
|
2251
|
-
function
|
|
2256
|
+
function ye(e) {
|
|
2252
2257
|
return Array.isArray(e) ? e : [e];
|
|
2253
2258
|
}
|
|
2254
|
-
function
|
|
2259
|
+
function be(e, t) {
|
|
2255
2260
|
if (!e?.xAxis || !e?.series) return;
|
|
2256
|
-
let n = new Set(
|
|
2261
|
+
let n = new Set(ye(e.xAxis)), r = ye(e.series).filter((e) => n.has(e));
|
|
2257
2262
|
r.length > 0 && t.push(a("server.validation.chart.seriesDuplicatesXAxis", { duplicates: r.join(", ") }));
|
|
2258
2263
|
}
|
|
2259
|
-
function be(e, t, n) {
|
|
2260
|
-
he(e) && t.ungrouped !== !0 && n.push(a("server.validation.chart.recordGrainNeedsUngrouped", { chartType: e }));
|
|
2261
|
-
}
|
|
2262
2264
|
function xe(e, t, n) {
|
|
2263
|
-
|
|
2265
|
+
ge(e) && t.ungrouped !== !0 && n.push(a("server.validation.chart.recordGrainNeedsUngrouped", { chartType: e }));
|
|
2266
|
+
}
|
|
2267
|
+
function Se(e, t, n) {
|
|
2268
|
+
let r = J[e];
|
|
2264
2269
|
if (!r || r.skipQuery) return {
|
|
2265
2270
|
isValid: !0,
|
|
2266
2271
|
errors: []
|
|
2267
2272
|
};
|
|
2268
2273
|
let i = [];
|
|
2269
|
-
return
|
|
2274
|
+
return _e(r, e, t, i), xe(e, n, i), e === "bar" && ve(t, n, i), be(t, i), {
|
|
2270
2275
|
isValid: i.length === 0,
|
|
2271
2276
|
errors: i
|
|
2272
2277
|
};
|
|
2273
2278
|
}
|
|
2274
|
-
function
|
|
2275
|
-
if (e !== "bar" ||
|
|
2279
|
+
function Ce(e, t, n) {
|
|
2280
|
+
if (e !== "bar" || Y(t?.xAxis)) return { chartType: e };
|
|
2276
2281
|
let r = n.dimensions ?? [], i = n.timeDimensions ?? [];
|
|
2277
2282
|
if (r.length > 0 || i.length > 0) return { chartType: e };
|
|
2278
2283
|
let a = (n.measures ?? []).length === 1 ? "kpiNumber" : "table";
|
|
@@ -2281,7 +2286,7 @@ function Se(e, t, n) {
|
|
|
2281
2286
|
note: `Note: chartType was changed from "bar" to "${a}" because the query has no dimension, so a bar chart would have no category axis to label its bars. For a real bar chart, put the category in the query's dimensions and use a single measure. To plot several measures as an ordered profile instead, use "measureProfile".`
|
|
2282
2287
|
};
|
|
2283
2288
|
}
|
|
2284
|
-
function
|
|
2289
|
+
function we(e, t, n, r) {
|
|
2285
2290
|
if (!(e.acceptTypes ?? []).includes("measure")) return;
|
|
2286
2291
|
let i = /* @__PURE__ */ new Set();
|
|
2287
2292
|
for (let r of t.dropZones) {
|
|
@@ -2292,7 +2297,7 @@ function Ce(e, t, n, r) {
|
|
|
2292
2297
|
let a = r.filter((e) => !i.has(e));
|
|
2293
2298
|
a.length > 0 && (n[e.key] = a[0]);
|
|
2294
2299
|
}
|
|
2295
|
-
function
|
|
2300
|
+
function Te(e, t) {
|
|
2296
2301
|
let n = /* @__PURE__ */ new Set();
|
|
2297
2302
|
for (let [r, i] of Object.entries(e)) if (r !== t) {
|
|
2298
2303
|
if (Array.isArray(i)) for (let e of i) typeof e == "string" && n.add(e);
|
|
@@ -2300,40 +2305,40 @@ function we(e, t) {
|
|
|
2300
2305
|
}
|
|
2301
2306
|
return n;
|
|
2302
2307
|
}
|
|
2303
|
-
function
|
|
2308
|
+
function Ee(e, t, n) {
|
|
2304
2309
|
let r = e.acceptTypes ?? [], i = [];
|
|
2305
2310
|
if (r.includes("dimension") && i.push(...n.dimensions), r.includes("timeDimension") && i.push(...n.timeDimFields), r.includes("measure") && i.push(...n.measures), i.length === 0) return;
|
|
2306
|
-
let a =
|
|
2311
|
+
let a = Te(t, e.key), o = i.filter((e) => !a.has(e));
|
|
2307
2312
|
if (o.length === 0) return;
|
|
2308
2313
|
let s = e.maxItems ?? Infinity, c = o.slice(0, s);
|
|
2309
2314
|
c.length > 0 && (t[e.key] = c);
|
|
2310
2315
|
}
|
|
2311
|
-
function
|
|
2312
|
-
let r =
|
|
2316
|
+
function De(e, t, n) {
|
|
2317
|
+
let r = J[e];
|
|
2313
2318
|
if (!r) return t ?? {};
|
|
2314
2319
|
let i = { ...t }, a = n.timeDimensions ?? [], o = {
|
|
2315
2320
|
measures: n.measures ?? [],
|
|
2316
2321
|
dimensions: n.dimensions ?? [],
|
|
2317
2322
|
timeDimFields: a.map((e) => e.dimension)
|
|
2318
2323
|
};
|
|
2319
|
-
for (let e of r.dropZones) e.excludeFromInference ||
|
|
2324
|
+
for (let e of r.dropZones) e.excludeFromInference || Y(i[e.key]) || (e.key === "sizeField" || e.key === "colorField" ? we(e, r, i, o.measures) : Ee(e, i, o));
|
|
2320
2325
|
return i;
|
|
2321
2326
|
}
|
|
2322
|
-
function
|
|
2327
|
+
function Oe(t) {
|
|
2323
2328
|
return t ? e(t) ? a(t) : t : "";
|
|
2324
2329
|
}
|
|
2325
|
-
function
|
|
2330
|
+
function ke(e) {
|
|
2326
2331
|
let t = ["\nChart config requirements by type:"];
|
|
2327
2332
|
for (let n of e) {
|
|
2328
|
-
let e =
|
|
2333
|
+
let e = J[n];
|
|
2329
2334
|
if (!e) continue;
|
|
2330
|
-
let r = [
|
|
2335
|
+
let r = [Oe(e.description), Oe(e.useCase)].filter(Boolean).join(". "), i = r ? ` — ${r}.` : "", a = ge(n) ? " Query MUST set \"ungrouped\": true, which also means one cube plus its to-one joins — an ungrouped query cannot span a hasMany relationship." : "", o = e.dropZones.filter((e) => e.mandatory);
|
|
2331
2336
|
if (o.length === 0 && !e.skipQuery) {
|
|
2332
2337
|
t.push(` ${n}${i}${a} chartConfig auto-inferred from query.`);
|
|
2333
2338
|
continue;
|
|
2334
2339
|
}
|
|
2335
2340
|
if (e.skipQuery) {
|
|
2336
|
-
t.push(` ${n}${i}
|
|
2341
|
+
t.push(` ${n}${i} Query optional: omit it for static text, or supply one to render displayConfig.content as a data template.`);
|
|
2337
2342
|
continue;
|
|
2338
2343
|
}
|
|
2339
2344
|
let s = o.map((e) => {
|
|
@@ -2346,7 +2351,7 @@ function Oe(e) {
|
|
|
2346
2351
|
}
|
|
2347
2352
|
//#endregion
|
|
2348
2353
|
//#region src/server/agent/data-shape.ts
|
|
2349
|
-
function
|
|
2354
|
+
function Ae(e, t, n, r) {
|
|
2350
2355
|
let i = /* @__PURE__ */ new Set(), a = 0, o, s, c = !0;
|
|
2351
2356
|
for (let n of e) {
|
|
2352
2357
|
let e = n[t];
|
|
@@ -2370,21 +2375,28 @@ function ke(e, t, n, r) {
|
|
|
2370
2375
|
} : {}
|
|
2371
2376
|
};
|
|
2372
2377
|
}
|
|
2373
|
-
function
|
|
2378
|
+
function je(e, t) {
|
|
2374
2379
|
if (e.length === 0) return [];
|
|
2375
2380
|
let n = [], r = /* @__PURE__ */ new Set(), i = [
|
|
2376
2381
|
["dimension", t?.dimensions],
|
|
2377
2382
|
["timeDimension", t?.timeDimensions],
|
|
2378
2383
|
["measure", t?.measures]
|
|
2379
2384
|
];
|
|
2380
|
-
for (let [t, a] of i) for (let [i, o] of Object.entries(a ?? {})) r.add(i), n.push(
|
|
2381
|
-
for (let t of Object.keys(e[0])) r.has(t) || n.push(
|
|
2385
|
+
for (let [t, a] of i) for (let [i, o] of Object.entries(a ?? {})) r.add(i), n.push(Ae(e, i, t, o?.type));
|
|
2386
|
+
for (let t of Object.keys(e[0])) r.has(t) || n.push(Ae(e, t, "dimension", void 0));
|
|
2382
2387
|
return n;
|
|
2383
2388
|
}
|
|
2384
2389
|
//#endregion
|
|
2390
|
+
//#region src/shared/query-shape.ts
|
|
2391
|
+
function Me(e) {
|
|
2392
|
+
if (!e || typeof e != "object") return !1;
|
|
2393
|
+
let t = (e) => Array.isArray(e) ? e.length : 0;
|
|
2394
|
+
return t(e.measures) > 0 || t(e.dimensions) > 0 || t(e.timeDimensions) > 0;
|
|
2395
|
+
}
|
|
2396
|
+
//#endregion
|
|
2385
2397
|
//#region src/server/agent/tools.ts
|
|
2386
|
-
var
|
|
2387
|
-
function
|
|
2398
|
+
var Ne = "With a query attached, `content` is rendered as a Knap template over the result rows. Variables: `rows` (rows keyed by snake_case alias, so Employees.avgSalary becomes employees_avg_salary), `labelled` (same rows keyed by field label — use this for `{{ labelled | table }}` so column headers read well), `data` (raw rows, addressed as `{{ data[0][\"Employees.count\"] }}`), `rowCount`, `first` and `last`. Filters include sum, map, join, length, sort, reverse, slice, round, number_format, date and table. Example: `We employ {{ rows | map:\"employees_count\" | sum }} people across {{ rowCount }} teams.` A template cannot sort and then index, so rely on the query's own order via `first` and `last`.", X = /* @__PURE__ */ "bar.line.area.pie.scatter.radar.bubble.table.kpiNumber.kpiDelta.kpiText.funnel.heatmap.sankey.sunburst.retentionHeatmap.retentionCombined.boxPlot.markdown.recordsTable.treemap.radialBar.proportionBar.dotStrip.waterfall.measureProfile.activityGrid.gauge.candlestick".split(".");
|
|
2399
|
+
function Pe() {
|
|
2388
2400
|
return [
|
|
2389
2401
|
{
|
|
2390
2402
|
name: "discover_cubes",
|
|
@@ -2429,7 +2441,7 @@ function je() {
|
|
|
2429
2441
|
},
|
|
2430
2442
|
{
|
|
2431
2443
|
name: "add_portlet",
|
|
2432
|
-
description: "Add a chart visualization to the notebook.\n" +
|
|
2444
|
+
description: "Add a chart visualization to the notebook.\n" + ke(X) + "\nThe query is validated before adding. The portlet fetches its own data.",
|
|
2433
2445
|
parameters: {
|
|
2434
2446
|
type: "object",
|
|
2435
2447
|
properties: {
|
|
@@ -2443,7 +2455,7 @@ function je() {
|
|
|
2443
2455
|
},
|
|
2444
2456
|
chartType: {
|
|
2445
2457
|
type: "string",
|
|
2446
|
-
enum:
|
|
2458
|
+
enum: X,
|
|
2447
2459
|
description: "Chart type to render"
|
|
2448
2460
|
},
|
|
2449
2461
|
chartConfig: {
|
|
@@ -2483,6 +2495,10 @@ function je() {
|
|
|
2483
2495
|
type: "string",
|
|
2484
2496
|
enum: ["horizontal", "vertical"]
|
|
2485
2497
|
},
|
|
2498
|
+
content: {
|
|
2499
|
+
type: "string",
|
|
2500
|
+
description: "Markdown body, for the \"markdown\" chart type. " + Ne
|
|
2501
|
+
},
|
|
2486
2502
|
...c,
|
|
2487
2503
|
...u
|
|
2488
2504
|
},
|
|
@@ -2516,7 +2532,7 @@ function je() {
|
|
|
2516
2532
|
},
|
|
2517
2533
|
chartType: {
|
|
2518
2534
|
type: "string",
|
|
2519
|
-
enum:
|
|
2535
|
+
enum: X,
|
|
2520
2536
|
description: "Replacement chart type"
|
|
2521
2537
|
},
|
|
2522
2538
|
chartConfig: {
|
|
@@ -2578,12 +2594,12 @@ function je() {
|
|
|
2578
2594
|
},
|
|
2579
2595
|
chartType: {
|
|
2580
2596
|
type: "string",
|
|
2581
|
-
enum:
|
|
2597
|
+
enum: X,
|
|
2582
2598
|
description: "Chart type. Use \"markdown\" for section headers."
|
|
2583
2599
|
},
|
|
2584
2600
|
query: {
|
|
2585
2601
|
type: "string",
|
|
2586
|
-
description: "JSON string of the query.
|
|
2602
|
+
description: "JSON string of the query. For a markdown portlet this is optional: omit it for a static text block or section header, or supply one to render displayConfig.content as a template over the result rows."
|
|
2587
2603
|
},
|
|
2588
2604
|
chartConfig: {
|
|
2589
2605
|
type: "object",
|
|
@@ -2609,7 +2625,7 @@ function je() {
|
|
|
2609
2625
|
},
|
|
2610
2626
|
displayConfig: {
|
|
2611
2627
|
type: "object",
|
|
2612
|
-
description: "Chart display configuration (for markdown: { content, hideHeader, transparentBackground, autoHeight })",
|
|
2628
|
+
description: "Chart display configuration (for markdown: { content, hideHeader, transparentBackground, autoHeight }). " + Ne,
|
|
2613
2629
|
properties: {
|
|
2614
2630
|
...c,
|
|
2615
2631
|
...u
|
|
@@ -2721,7 +2737,7 @@ function je() {
|
|
|
2721
2737
|
}
|
|
2722
2738
|
];
|
|
2723
2739
|
}
|
|
2724
|
-
function
|
|
2740
|
+
function Fe(e) {
|
|
2725
2741
|
let { semanticLayer: t, securityContext: n } = e, r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
|
|
2726
2742
|
r.set("discover_cubes", async (e) => {
|
|
2727
2743
|
let r = { cubes: (await s(t, n, {
|
|
@@ -2787,7 +2803,7 @@ function Me(e) {
|
|
|
2787
2803
|
rowCount: a.data.length,
|
|
2788
2804
|
data: s,
|
|
2789
2805
|
truncated: a.data.length > s.length,
|
|
2790
|
-
dataShape:
|
|
2806
|
+
dataShape: je(s, a.annotation),
|
|
2791
2807
|
annotation: a.annotation
|
|
2792
2808
|
}) + "\n[IMPORTANT: Your next response MUST start with a brief text message BEFORE any tool calls. Now call add_markdown and add_portlet to visualize these results.]" };
|
|
2793
2809
|
} catch (t) {
|
|
@@ -2824,9 +2840,9 @@ function Me(e) {
|
|
|
2824
2840
|
let s = !!(a.funnel || a.flow || a.retention), c, l = r, u;
|
|
2825
2841
|
if (s) c = e.chartConfig ?? {};
|
|
2826
2842
|
else {
|
|
2827
|
-
let t =
|
|
2843
|
+
let t = Ce(r, e.chartConfig, a);
|
|
2828
2844
|
l = t.chartType, u = t.note;
|
|
2829
|
-
let n =
|
|
2845
|
+
let n = De(l, e.chartConfig, a), i = Se(l, n, a);
|
|
2830
2846
|
if (!i.isValid) return { error: `Chart config invalid — fix these errors and retry:\n${i.errors.join("\n")}\n\nchartType: ${l}\nAttempted chartConfig:\n${JSON.stringify(n, null, 2)}\n\nQuery:\n${JSON.stringify(a, null, 2)}` };
|
|
2831
2847
|
c = n;
|
|
2832
2848
|
}
|
|
@@ -2918,32 +2934,35 @@ function Me(e) {
|
|
|
2918
2934
|
};
|
|
2919
2935
|
let a = [], o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
|
|
2920
2936
|
for (let e of r) {
|
|
2921
|
-
let r = e.chartType;
|
|
2922
|
-
if (
|
|
2923
|
-
|
|
2924
|
-
if (!c) {
|
|
2937
|
+
let r = e.chartType, c = r === "markdown", l = e.query;
|
|
2938
|
+
if (!l) {
|
|
2939
|
+
if (c) continue;
|
|
2925
2940
|
a.push(`Portlet "${e.title}": missing query`);
|
|
2926
2941
|
continue;
|
|
2927
2942
|
}
|
|
2928
|
-
let
|
|
2943
|
+
let u;
|
|
2929
2944
|
try {
|
|
2930
|
-
|
|
2945
|
+
u = JSON.parse(l);
|
|
2931
2946
|
} catch {
|
|
2932
2947
|
a.push(`Portlet "${e.title}": invalid JSON query`);
|
|
2933
2948
|
continue;
|
|
2934
2949
|
}
|
|
2935
|
-
|
|
2936
|
-
let
|
|
2937
|
-
if (!
|
|
2938
|
-
a.push(`Portlet "${e.title}": ${
|
|
2950
|
+
if (u = i(u), c && !Me(u)) continue;
|
|
2951
|
+
let d = t.validateQuery(u, n);
|
|
2952
|
+
if (!d.isValid) {
|
|
2953
|
+
a.push(`Portlet "${e.title}": ${d.errors.join(", ")}`);
|
|
2939
2954
|
continue;
|
|
2940
2955
|
}
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
a.push(`Portlet "${e.title}": ${p.errors.join(", ")}`);
|
|
2956
|
+
if (c) {
|
|
2957
|
+
s.set(e, r);
|
|
2944
2958
|
continue;
|
|
2945
2959
|
}
|
|
2946
|
-
|
|
2960
|
+
let f = Ce(r, e.chartConfig, u).chartType, p = De(f, e.chartConfig, u), m = Se(f, p, u);
|
|
2961
|
+
if (!m.isValid) {
|
|
2962
|
+
a.push(`Portlet "${e.title}": ${m.errors.join(", ")}`);
|
|
2963
|
+
continue;
|
|
2964
|
+
}
|
|
2965
|
+
o.set(e, p), s.set(e, f);
|
|
2947
2966
|
}
|
|
2948
2967
|
if (a.length > 0) return {
|
|
2949
2968
|
result: `Dashboard has invalid portlets — fix these errors and retry:\n${a.join("\n")}`,
|
|
@@ -2966,7 +2985,7 @@ function Me(e) {
|
|
|
2966
2985
|
chartConfig: o.get(e) ?? e.chartConfig ?? {},
|
|
2967
2986
|
displayConfig: e.displayConfig || {}
|
|
2968
2987
|
} },
|
|
2969
|
-
query: n ? {} : c
|
|
2988
|
+
query: n && !Me(c) ? {} : c
|
|
2970
2989
|
};
|
|
2971
2990
|
return {
|
|
2972
2991
|
id: e.id,
|
|
@@ -3003,14 +3022,14 @@ function Me(e) {
|
|
|
3003
3022
|
}
|
|
3004
3023
|
//#endregion
|
|
3005
3024
|
//#region src/server/agent/providers/factory.ts
|
|
3006
|
-
async function
|
|
3025
|
+
async function Ie(e, t, n) {
|
|
3007
3026
|
switch (e) {
|
|
3008
3027
|
case "anthropic": {
|
|
3009
3028
|
let { AnthropicProvider: e } = await import("./anthropic-MQlafOZv.js");
|
|
3010
3029
|
return new e(t);
|
|
3011
3030
|
}
|
|
3012
3031
|
case "openai": {
|
|
3013
|
-
let { OpenAIProvider: e } = await import("./openai-
|
|
3032
|
+
let { OpenAIProvider: e } = await import("./openai-DRFOtBUU.js");
|
|
3014
3033
|
return new e(t, n);
|
|
3015
3034
|
}
|
|
3016
3035
|
case "google": {
|
|
@@ -3022,7 +3041,7 @@ async function Ne(e, t, n) {
|
|
|
3022
3041
|
}
|
|
3023
3042
|
//#endregion
|
|
3024
3043
|
//#region src/server/agent/handler-steps.ts
|
|
3025
|
-
function
|
|
3044
|
+
function Z(e, t) {
|
|
3026
3045
|
if (Array.isArray(t)) for (let n of t) e.push(n);
|
|
3027
3046
|
else e.push(t);
|
|
3028
3047
|
}
|
|
@@ -3031,7 +3050,7 @@ function Q(e) {
|
|
|
3031
3050
|
e();
|
|
3032
3051
|
} catch {}
|
|
3033
3052
|
}
|
|
3034
|
-
function
|
|
3053
|
+
function Le(e, t) {
|
|
3035
3054
|
let n = [];
|
|
3036
3055
|
if (!e || e.length === 0) return n;
|
|
3037
3056
|
for (let r of e) {
|
|
@@ -3064,7 +3083,7 @@ function Fe(e, t) {
|
|
|
3064
3083
|
content: typeof e.result == "string" ? e.result : JSON.stringify(e.result ?? ""),
|
|
3065
3084
|
isError: e.status === "error"
|
|
3066
3085
|
}));
|
|
3067
|
-
|
|
3086
|
+
Z(n, t.formatToolResults(i));
|
|
3068
3087
|
} else e.length > 0 && n.push({
|
|
3069
3088
|
role: "assistant",
|
|
3070
3089
|
content: r.content
|
|
@@ -3073,20 +3092,20 @@ function Fe(e, t) {
|
|
|
3073
3092
|
return n;
|
|
3074
3093
|
}
|
|
3075
3094
|
function $(e, t) {
|
|
3076
|
-
if (
|
|
3095
|
+
if (e?.type === "tool_use" && t) try {
|
|
3077
3096
|
e.input = JSON.parse(t);
|
|
3078
3097
|
} catch {
|
|
3079
3098
|
e.input = {}, e.inputParseError = !0;
|
|
3080
3099
|
}
|
|
3081
3100
|
}
|
|
3082
|
-
function
|
|
3101
|
+
function Re(e, t) {
|
|
3083
3102
|
let n = e.contentBlocks[e.contentBlocks.length - 1];
|
|
3084
3103
|
n && n.type === "text" ? n.text = (n.text || "") + t : e.contentBlocks.push({
|
|
3085
3104
|
type: "text",
|
|
3086
3105
|
text: t
|
|
3087
3106
|
});
|
|
3088
3107
|
}
|
|
3089
|
-
function
|
|
3108
|
+
function ze(e, t) {
|
|
3090
3109
|
e.currentBlockIsToolUse && e.currentToolInputJson && $(e.contentBlocks[e.contentBlocks.length - 1], e.currentToolInputJson), e.contentBlocks.push({
|
|
3091
3110
|
type: "tool_use",
|
|
3092
3111
|
id: t.id,
|
|
@@ -3095,7 +3114,7 @@ function Le(e, t) {
|
|
|
3095
3114
|
...t.metadata ? { metadata: t.metadata } : {}
|
|
3096
3115
|
}), e.currentToolInputJson = "", e.currentBlockIsToolUse = !0;
|
|
3097
3116
|
}
|
|
3098
|
-
function
|
|
3117
|
+
function Be(e, t) {
|
|
3099
3118
|
if (t.id && t.input) {
|
|
3100
3119
|
let n = e.contentBlocks.find((e) => e.type === "tool_use" && e.id === t.id);
|
|
3101
3120
|
n && (n.input = t.input, t.parseError && (n.inputParseError = !0));
|
|
@@ -3104,7 +3123,7 @@ function Re(e, t) {
|
|
|
3104
3123
|
t?.type === "tool_use" && e.currentToolInputJson && ($(t, e.currentToolInputJson), e.currentToolInputJson = ""), e.currentBlockIsToolUse = !1;
|
|
3105
3124
|
}
|
|
3106
3125
|
}
|
|
3107
|
-
async function*
|
|
3126
|
+
async function* Ve(e, t) {
|
|
3108
3127
|
let n = {
|
|
3109
3128
|
contentBlocks: [],
|
|
3110
3129
|
currentToolInputJson: "",
|
|
@@ -3115,13 +3134,13 @@ async function* ze(e, t) {
|
|
|
3115
3134
|
let e = r;
|
|
3116
3135
|
switch (e.type) {
|
|
3117
3136
|
case "text_delta":
|
|
3118
|
-
|
|
3137
|
+
Re(n, e.text), yield {
|
|
3119
3138
|
type: "text_delta",
|
|
3120
3139
|
data: e.text
|
|
3121
3140
|
};
|
|
3122
3141
|
break;
|
|
3123
3142
|
case "tool_use_start":
|
|
3124
|
-
|
|
3143
|
+
ze(n, e), yield {
|
|
3125
3144
|
type: "tool_use_start",
|
|
3126
3145
|
data: {
|
|
3127
3146
|
id: e.id,
|
|
@@ -3134,7 +3153,7 @@ async function* ze(e, t) {
|
|
|
3134
3153
|
n.currentToolInputJson += e.json;
|
|
3135
3154
|
break;
|
|
3136
3155
|
case "tool_use_end":
|
|
3137
|
-
|
|
3156
|
+
Be(n, e);
|
|
3138
3157
|
break;
|
|
3139
3158
|
case "message_meta": e.inputTokens != null && (n.inputTokens = e.inputTokens), e.outputTokens != null && (n.outputTokens = e.outputTokens), e.stopReason && (n.stopReason = e.stopReason);
|
|
3140
3159
|
}
|
|
@@ -3146,7 +3165,7 @@ async function* ze(e, t) {
|
|
|
3146
3165
|
outputTokens: n.outputTokens
|
|
3147
3166
|
};
|
|
3148
3167
|
}
|
|
3149
|
-
async function*
|
|
3168
|
+
async function* He(e, t) {
|
|
3150
3169
|
let { executor: n, observability: r, traceId: i, turn: a } = t, o = e.name, s = e.input || {}, c = e.id;
|
|
3151
3170
|
if (e.inputParseError) {
|
|
3152
3171
|
let e = `Could not parse the arguments you sent for ${o} — they were not valid JSON, so the tool was not run. Call it again with well-formed JSON arguments.`;
|
|
@@ -3237,26 +3256,26 @@ async function* Be(e, t) {
|
|
|
3237
3256
|
};
|
|
3238
3257
|
}
|
|
3239
3258
|
}
|
|
3240
|
-
async function*
|
|
3259
|
+
async function* Ue(e, t) {
|
|
3241
3260
|
let n = [];
|
|
3242
3261
|
for (let r of e) {
|
|
3243
3262
|
if (r.type !== "tool_use") continue;
|
|
3244
|
-
let e = yield*
|
|
3263
|
+
let e = yield* He(r, t);
|
|
3245
3264
|
n.push(e);
|
|
3246
3265
|
}
|
|
3247
3266
|
return n;
|
|
3248
3267
|
}
|
|
3249
3268
|
//#endregion
|
|
3250
3269
|
//#region src/server/agent/handler.ts
|
|
3251
|
-
var
|
|
3270
|
+
var We = {
|
|
3252
3271
|
anthropic: "claude-sonnet-4-6",
|
|
3253
3272
|
openai: "gpt-4.1-mini",
|
|
3254
3273
|
google: "gemini-3-flash-preview"
|
|
3255
3274
|
};
|
|
3256
|
-
async function*
|
|
3257
|
-
let { message: t, history: n, semanticLayer: r, securityContext: i, agentConfig: o, apiKey: s } = e, c = e.sessionId || crypto.randomUUID(), l = o.observability, u = crypto.randomUUID(), d = Date.now(), f = e.providerOverride || o.provider || "anthropic", p = e.modelOverride || o.model ||
|
|
3275
|
+
async function* Ge(e) {
|
|
3276
|
+
let { message: t, history: n, semanticLayer: r, securityContext: i, agentConfig: o, apiKey: s } = e, c = e.sessionId || crypto.randomUUID(), l = o.observability, u = crypto.randomUUID(), d = Date.now(), f = e.providerOverride || o.provider || "anthropic", p = e.modelOverride || o.model || We[f] || "claude-sonnet-4-6", m = e.baseURLOverride || o.baseURL, h = o.maxTurns || 25, g = o.maxTokens || 8192, _;
|
|
3258
3277
|
try {
|
|
3259
|
-
_ = await
|
|
3278
|
+
_ = await Ie(f, s, { baseURL: m });
|
|
3260
3279
|
} catch (e) {
|
|
3261
3280
|
console.error("[agent] Failed to create %s provider: %s", String(f).replace(/\n|\r/g, ""), String(e instanceof Error ? e.message : e).replace(/\n|\r/g, "")), yield {
|
|
3262
3281
|
type: "error",
|
|
@@ -3264,7 +3283,7 @@ async function* Ue(e) {
|
|
|
3264
3283
|
};
|
|
3265
3284
|
return;
|
|
3266
3285
|
}
|
|
3267
|
-
let v =
|
|
3286
|
+
let v = Pe(), y = Fe({
|
|
3268
3287
|
semanticLayer: r,
|
|
3269
3288
|
securityContext: i
|
|
3270
3289
|
}), b = oe(r.getMetadata(i));
|
|
@@ -3275,7 +3294,7 @@ async function* Ue(e) {
|
|
|
3275
3294
|
model: p,
|
|
3276
3295
|
historyLength: n?.length ?? 0
|
|
3277
3296
|
}));
|
|
3278
|
-
let x =
|
|
3297
|
+
let x = Le(n, _);
|
|
3279
3298
|
x.push({
|
|
3280
3299
|
role: "user",
|
|
3281
3300
|
content: t
|
|
@@ -3290,7 +3309,7 @@ async function* Ue(e) {
|
|
|
3290
3309
|
system: b,
|
|
3291
3310
|
tools: v,
|
|
3292
3311
|
messages: x
|
|
3293
|
-
}), n = Date.now(), { contentBlocks: r, stopReason: i, inputTokens: o, outputTokens: s } = yield*
|
|
3312
|
+
}), n = Date.now(), { contentBlocks: r, stopReason: i, inputTokens: o, outputTokens: s } = yield* Ve(_, t);
|
|
3294
3313
|
if (Q(() => l?.onGenerationEnd?.({
|
|
3295
3314
|
traceId: u,
|
|
3296
3315
|
turn: e,
|
|
@@ -3312,7 +3331,7 @@ async function* Ue(e) {
|
|
|
3312
3331
|
break;
|
|
3313
3332
|
}
|
|
3314
3333
|
if (!_.shouldContinue(i)) break;
|
|
3315
|
-
let c = yield*
|
|
3334
|
+
let c = yield* Ue(r, {
|
|
3316
3335
|
executor: y,
|
|
3317
3336
|
observability: l,
|
|
3318
3337
|
traceId: u,
|
|
@@ -3321,7 +3340,7 @@ async function* Ue(e) {
|
|
|
3321
3340
|
yield {
|
|
3322
3341
|
type: "turn_complete",
|
|
3323
3342
|
data: {}
|
|
3324
|
-
},
|
|
3343
|
+
}, Z(x, _.formatToolResults(c));
|
|
3325
3344
|
}
|
|
3326
3345
|
Q(() => l?.onChatEnd?.({
|
|
3327
3346
|
traceId: u,
|
|
@@ -3352,4 +3371,4 @@ async function* Ue(e) {
|
|
|
3352
3371
|
}
|
|
3353
3372
|
}
|
|
3354
3373
|
//#endregion
|
|
3355
|
-
export { k as C, se as D, E, T as O, A as S, D as T, F as _,
|
|
3374
|
+
export { k as C, se as D, E, T as O, A as S, D as T, F as _, ce as a, M as b, W as c, V as d, B as f, I as g, L as h, Ge as handleAgentChat, le as i, w as k, U as l, R as m, de as n, K as o, z as p, ue as r, G as s, fe as t, H as u, P as v, O as w, j as x, N as y };
|