drizzle-cube 0.9.5 → 0.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/adapters/ActivityGridChart.config-C2kT9qd6.cjs +1 -0
- package/dist/adapters/ActivityGridChart.config-Crkwyx_5.js +2 -0
- package/dist/adapters/AreaChart.config-Cn4fTDQH.js +2 -0
- package/dist/adapters/AreaChart.config-DSBAn4xT.cjs +1 -0
- package/dist/adapters/BarChart.config-2r2_F09O.cjs +1 -0
- package/dist/adapters/BarChart.config-CorT50Sr.js +2 -0
- package/dist/adapters/BoxPlotChart.config-BM4SbL34.cjs +1 -0
- package/dist/adapters/BoxPlotChart.config-Dki3qfhN.js +2 -0
- package/dist/adapters/BubbleChart.config-DA768T1u.cjs +1 -0
- package/dist/adapters/BubbleChart.config-LJ2w0ZAz.js +2 -0
- package/dist/adapters/CandlestickChart.config-C00YG927.cjs +1 -0
- package/dist/adapters/CandlestickChart.config-D-vVDHaQ.js +2 -0
- package/dist/adapters/DataTable.config-Ml6Q3VEP.cjs +1 -0
- package/dist/adapters/DataTable.config-jwBiAUpg.js +2 -0
- package/dist/adapters/DotStripChart.config-C_dgJFje.js +2 -0
- package/dist/adapters/DotStripChart.config-D5M4xxNE.cjs +1 -0
- package/dist/adapters/FunnelChart.config-DBkjp0wh.js +2 -0
- package/dist/adapters/FunnelChart.config-Jc6DVjCx.cjs +1 -0
- package/dist/adapters/GaugeChart.config-BqW6WqXS.cjs +1 -0
- package/dist/adapters/GaugeChart.config-CyD4y_yf.js +2 -0
- package/dist/adapters/HeatMapChart.config-C_TKjH9_.cjs +1 -0
- package/dist/adapters/HeatMapChart.config-Di1KFl9H.js +2 -0
- package/dist/adapters/KpiDelta.config-qlIY4kju.js +2 -0
- package/dist/adapters/KpiDelta.config-zaqkGeS2.cjs +1 -0
- package/dist/adapters/KpiNumber.config-D1hq68b3.cjs +1 -0
- package/dist/adapters/KpiNumber.config-D9LpXMmo.js +2 -0
- package/dist/adapters/KpiText.config-BBBV_4aK.cjs +1 -0
- package/dist/adapters/KpiText.config-pqFid-lb.js +2 -0
- package/dist/adapters/LineChart.config-CFGa_jpk.js +2 -0
- package/dist/adapters/LineChart.config-DRTr24Jl.cjs +1 -0
- package/dist/adapters/MarkdownChart.config--Teyo7aa.cjs +1 -0
- package/dist/adapters/MarkdownChart.config-Cnptz8gx.js +2 -0
- package/dist/adapters/MeasureProfileChart.config-BlAnkNf6.js +2 -0
- package/dist/adapters/MeasureProfileChart.config-c4K6xVET.cjs +1 -0
- package/dist/adapters/PieChart.config-BX5FcoZn.cjs +1 -0
- package/dist/adapters/PieChart.config-DT1TCBFA.js +2 -0
- package/dist/adapters/ProportionBarChart.config-CN5ov6e6.js +2 -0
- package/dist/adapters/ProportionBarChart.config-DdrZQypv.cjs +1 -0
- package/dist/adapters/RadarChart.config-CYpWy1MI.js +2 -0
- package/dist/adapters/RadarChart.config-Cm14F-JW.cjs +1 -0
- package/dist/adapters/RadialBarChart.config-BXEmrEW0.js +2 -0
- package/dist/adapters/RadialBarChart.config-bJL8ZwT5.cjs +1 -0
- package/dist/adapters/RecordsTable.config-BifW_6cA.cjs +1 -0
- package/dist/adapters/RecordsTable.config-DOu5dLR9.js +2 -0
- package/dist/adapters/RetentionCombinedChart.config-BLTS46q4.js +2 -0
- package/dist/adapters/RetentionCombinedChart.config-DkIUp-uU.cjs +1 -0
- package/dist/adapters/RetentionHeatmap.config-Csnntt4P.js +2 -0
- package/dist/adapters/RetentionHeatmap.config-Xljn01Px.cjs +1 -0
- package/dist/adapters/SankeyChart.config-BExGzO93.cjs +1 -0
- package/dist/adapters/SankeyChart.config-DEBF3E7J.js +2 -0
- package/dist/adapters/ScatterChart.config-B9fxyVl8.cjs +1 -0
- package/dist/adapters/ScatterChart.config-CNWNsjv_.js +2 -0
- package/dist/adapters/SunburstChart.config-DyBJr_Ah.js +2 -0
- package/dist/adapters/SunburstChart.config-vXKPV3lF.cjs +1 -0
- package/dist/adapters/TreeMapChart.config-CoXSasFP.js +2 -0
- package/dist/adapters/TreeMapChart.config-iq-fCkIZ.cjs +1 -0
- package/dist/adapters/WaterfallChart.config-Coyj2j_7.cjs +1 -0
- package/dist/adapters/WaterfallChart.config-Dyf-p2Z2.js +2 -0
- package/dist/adapters/{compiler-DYAP3l3U.js → compiler-BKg3j2mm.js} +1261 -2447
- package/dist/adapters/compiler-BX6Ug_Uq.cjs +166 -0
- package/dist/adapters/core/index.cjs +1 -1
- package/dist/adapters/core/index.js +1 -1
- package/dist/adapters/{core-B05onvSN.js → core-Bmb7XMBz.js} +2 -2
- package/dist/adapters/{core-BkxueWec.cjs → core-JgUTMhxl.cjs} +1 -1
- 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 +23 -23
- package/dist/adapters/{handler-CP-6A8X3.cjs → handler-CTSg1daG.cjs} +8 -8
- package/dist/adapters/{handler-mwSVmP0z.js → handler-DtX1YNOn.js} +213 -209
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +4 -4
- package/dist/adapters/mcp-app-html-Bu4j3yZM.cjs +1 -0
- package/dist/adapters/mcp-app-html-D3GsxPcx.js +5 -0
- package/dist/adapters/mcp-app-html.cjs +1 -1
- package/dist/adapters/mcp-app-html.js +1 -1
- package/dist/adapters/mcp-tools.cjs +1 -1
- package/dist/adapters/mcp-tools.js +3 -3
- package/dist/adapters/{mcp-transport-BH5avoaA.js → mcp-transport-BTmAXLo8.js} +8 -3
- package/dist/adapters/{mcp-transport-DXgZ-xcU.cjs → mcp-transport-DzxluRyH.cjs} +2 -2
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +5 -5
- package/dist/adapters/{openai-B82IDfp4.cjs → openai-BwtOIJIk.cjs} +1 -1
- package/dist/adapters/{openai-BKDrN7u0.js → openai-CWnhWp3I.js} +1 -1
- package/dist/adapters/{openai-BaNGQmmK.cjs → openai-ClwjvwzT.cjs} +3 -3
- package/dist/adapters/{openai-CeNMQU8r.js → openai-Dqrs3PGo.js} +5 -5
- package/dist/adapters/utils-Du_UZbn5.cjs +139 -0
- package/dist/adapters/{utils-dyUxCOWT.js → utils-i2h5cwI3.js} +2731 -1418
- package/dist/adapters/utils.cjs +1 -1
- package/dist/adapters/utils.js +1 -1
- package/dist/cjs/client/hooks/queries/useExplainAI.d.ts +3 -2
- package/dist/cjs/client/types.d.ts +7 -0
- package/dist/cjs/server/adapters/base-adapter.d.ts +3 -3
- package/dist/cjs/server/ai/query-schema.d.ts +3 -3
- package/dist/cjs/server/builders/date-time-builder.d.ts +1 -2
- package/dist/cjs/server/builders/date-time-helpers.d.ts +19 -6
- package/dist/cjs/server/builders/filter-operators.d.ts +10 -1
- package/dist/cjs/server/execution/query-normalizer.d.ts +9 -0
- package/dist/cjs/server/physical-plan/drizzle-sql-builder.d.ts +25 -0
- package/dist/cjs/server/physical-plan/semi-join.d.ts +21 -0
- package/dist/cjs/server/prompts/single-step-prompt.d.ts +1 -1
- package/dist/client/charts.js +12 -12
- package/dist/client/chunks/{DashboardEditModal-3_odkGXU.js → DashboardEditModal-DfaeSZGf.js} +12 -12
- package/dist/client/chunks/DashboardEditModal-DfaeSZGf.js.map +1 -0
- package/dist/client/chunks/{DotStripChart-BGpjqpNU.js → DotStripChart-in6QHc0b.js} +3 -3
- package/dist/client/chunks/{DotStripChart-BGpjqpNU.js.map → DotStripChart-in6QHc0b.js.map} +1 -1
- package/dist/client/chunks/{ProportionBarChart-DuC16TT0.js → ProportionBarChart-CjuOm7NT.js} +3 -3
- package/dist/client/chunks/{ProportionBarChart-DuC16TT0.js.map → ProportionBarChart-CjuOm7NT.js.map} +1 -1
- package/dist/client/chunks/{RecordsTable-zy4EWyWx.js → RecordsTable-CXXsiaV1.js} +4 -4
- package/dist/client/chunks/{RecordsTable-zy4EWyWx.js.map → RecordsTable-CXXsiaV1.js.map} +1 -1
- package/dist/client/chunks/{RetentionCombinedChart-BrqSuLXT.js → RetentionCombinedChart-DFCeEFkx.js} +3 -3
- package/dist/client/chunks/{RetentionCombinedChart-BrqSuLXT.js.map → RetentionCombinedChart-DFCeEFkx.js.map} +1 -1
- package/dist/client/chunks/{RetentionHeatmap-DlGScG6X.js → RetentionHeatmap-jpshJ2Af.js} +2 -2
- package/dist/client/chunks/{RetentionHeatmap-DlGScG6X.js.map → RetentionHeatmap-jpshJ2Af.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-UhPaVPsn.js → analysis-builder-fPK8NgJW.js} +9 -9
- package/dist/client/chunks/{analysis-builder-UhPaVPsn.js.map → analysis-builder-fPK8NgJW.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-shared-DS_eJnM8.js → analysis-builder-shared--4LqPSum.js} +829 -775
- package/dist/client/chunks/analysis-builder-shared--4LqPSum.js.map +1 -0
- package/dist/client/chunks/{chart-activity-grid-cJI-MF_M.js → chart-activity-grid-DGazwi4C.js} +12 -5
- package/dist/client/chunks/chart-activity-grid-DGazwi4C.js.map +1 -0
- package/dist/client/chunks/{chart-area-11vKdaTE.js → chart-area-zyLGD-ym.js} +2 -2
- package/dist/client/chunks/{chart-area-11vKdaTE.js.map → chart-area-zyLGD-ym.js.map} +1 -1
- package/dist/client/chunks/{chart-bar-ByOYTFZp.js → chart-bar-DMCBq8qJ.js} +3 -3
- package/dist/client/chunks/{chart-bar-ByOYTFZp.js.map → chart-bar-DMCBq8qJ.js.map} +1 -1
- package/dist/client/chunks/{chart-box-plot-DKTdhdjk.js → chart-box-plot-5Z55A-it.js} +2 -2
- package/dist/client/chunks/{chart-box-plot-DKTdhdjk.js.map → chart-box-plot-5Z55A-it.js.map} +1 -1
- package/dist/client/chunks/{chart-bubble-lCNFaxsr.js → chart-bubble-YD28dX8w.js} +2 -2
- package/dist/client/chunks/{chart-bubble-lCNFaxsr.js.map → chart-bubble-YD28dX8w.js.map} +1 -1
- package/dist/client/chunks/{chart-candlestick-DQJ8byvB.js → chart-candlestick-BUMpBI08.js} +2 -2
- package/dist/client/chunks/{chart-candlestick-DQJ8byvB.js.map → chart-candlestick-BUMpBI08.js.map} +1 -1
- package/dist/client/chunks/{chart-data-table-DkkQtuY6.js → chart-data-table-BdMo3zVh.js} +4 -4
- package/dist/client/chunks/{chart-data-table-DkkQtuY6.js.map → chart-data-table-BdMo3zVh.js.map} +1 -1
- package/dist/client/chunks/{chart-funnel-BtjUJRcf.js → chart-funnel-BRyZS6ie.js} +2 -2
- package/dist/client/chunks/{chart-funnel-BtjUJRcf.js.map → chart-funnel-BRyZS6ie.js.map} +1 -1
- package/dist/client/chunks/{chart-gauge-Da-29BzE.js → chart-gauge-DxgHlZKp.js} +3 -3
- package/dist/client/chunks/{chart-gauge-Da-29BzE.js.map → chart-gauge-DxgHlZKp.js.map} +1 -1
- package/dist/client/chunks/{chart-heat-map-DK0IR2al.js → chart-heat-map-5jHm3f-V.js} +3 -3
- package/dist/client/chunks/{chart-heat-map-DK0IR2al.js.map → chart-heat-map-5jHm3f-V.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-delta-Cih5Vh_Z.js → chart-kpi-delta-C84P-mwu.js} +3 -3
- package/dist/client/chunks/{chart-kpi-delta-Cih5Vh_Z.js.map → chart-kpi-delta-C84P-mwu.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-number-Z5zpxeKR.js → chart-kpi-number-D9GqtBWw.js} +5 -5
- package/dist/client/chunks/{chart-kpi-number-Z5zpxeKR.js.map → chart-kpi-number-D9GqtBWw.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-text-glMTySe4.js → chart-kpi-text-D3HqxXzU.js} +3 -3
- package/dist/client/chunks/{chart-kpi-text-glMTySe4.js.map → chart-kpi-text-D3HqxXzU.js.map} +1 -1
- package/dist/client/chunks/{chart-line-D6Xkq1eW.js → chart-line-IEgiF8Nv.js} +3 -3
- package/dist/client/chunks/{chart-line-D6Xkq1eW.js.map → chart-line-IEgiF8Nv.js.map} +1 -1
- package/dist/client/chunks/{chart-markdown-BHBjzgfc.js → chart-markdown-B_2Ed7FJ.js} +3 -3
- package/dist/client/chunks/{chart-markdown-BHBjzgfc.js.map → chart-markdown-B_2Ed7FJ.js.map} +1 -1
- package/dist/client/chunks/{chart-measure-profile-Cl5xQZLF.js → chart-measure-profile-CWsPrQhH.js} +3 -3
- package/dist/client/chunks/{chart-measure-profile-Cl5xQZLF.js.map → chart-measure-profile-CWsPrQhH.js.map} +1 -1
- package/dist/client/chunks/{chart-pie-X3wVYu9v.js → chart-pie-BEB2sCXF.js} +3 -3
- package/dist/client/chunks/{chart-pie-X3wVYu9v.js.map → chart-pie-BEB2sCXF.js.map} +1 -1
- package/dist/client/chunks/{chart-radar-BExajFiU.js → chart-radar-BbSbXKbP.js} +3 -3
- package/dist/client/chunks/{chart-radar-BExajFiU.js.map → chart-radar-BbSbXKbP.js.map} +1 -1
- package/dist/client/chunks/{chart-radial-bar-CgGmC8WE.js → chart-radial-bar-CNYD7tkM.js} +3 -3
- package/dist/client/chunks/{chart-radial-bar-CgGmC8WE.js.map → chart-radial-bar-CNYD7tkM.js.map} +1 -1
- package/dist/client/chunks/{chart-sankey-DKj417mA.js → chart-sankey-DKnTIvSr.js} +2 -2
- package/dist/client/chunks/{chart-sankey-DKj417mA.js.map → chart-sankey-DKnTIvSr.js.map} +1 -1
- package/dist/client/chunks/{chart-scatter-DSNgbnEu.js → chart-scatter-CSWF6-lx.js} +3 -3
- package/dist/client/chunks/{chart-scatter-DSNgbnEu.js.map → chart-scatter-CSWF6-lx.js.map} +1 -1
- package/dist/client/chunks/{chart-sunburst-IUrLGpyo.js → chart-sunburst-CdGzCq7q.js} +3 -3
- package/dist/client/chunks/{chart-sunburst-IUrLGpyo.js.map → chart-sunburst-CdGzCq7q.js.map} +1 -1
- package/dist/client/chunks/{chart-tree-map-DS5X1Wiw.js → chart-tree-map-BiXB7EiM.js} +3 -3
- package/dist/client/chunks/{chart-tree-map-DS5X1Wiw.js.map → chart-tree-map-BiXB7EiM.js.map} +1 -1
- package/dist/client/chunks/{chart-waterfall-C1GZfgHw.js → chart-waterfall-5rSDeLEZ.js} +3 -3
- package/dist/client/chunks/{chart-waterfall-C1GZfgHw.js.map → chart-waterfall-5rSDeLEZ.js.map} +1 -1
- package/dist/client/chunks/{charts-core-DQXx0Xk-.js → charts-core-CKpkoMCa.js} +2 -2
- package/dist/client/chunks/{charts-core-DQXx0Xk-.js.map → charts-core-CKpkoMCa.js.map} +1 -1
- package/dist/client/chunks/charts-loader-BTI0UPK4.js +87 -0
- package/dist/client/chunks/{charts-loader-DuV9kYN8.js.map → charts-loader-BTI0UPK4.js.map} +1 -1
- package/dist/client/chunks/core-BWRP9s8x.js.map +1 -1
- package/dist/client/chunks/dashboardExport-Db3rmUP1.js.map +1 -1
- package/dist/client/chunks/dist-COqN0-Yj.js.map +1 -1
- package/dist/client/chunks/exceljs.min-CdNVdwM3.js.map +1 -1
- package/dist/client/chunks/{nl-NL-gaWTnOGQ.js → nl-NL-kRjxedTf.js} +8 -1
- package/dist/client/chunks/{nl-NL-gaWTnOGQ.js.map → nl-NL-kRjxedTf.js.map} +1 -1
- package/dist/client/chunks/{schema-visualization-DIn9gy5O.js → schema-visualization-BbvL74Sf.js} +3 -3
- package/dist/client/chunks/{schema-visualization-DIn9gy5O.js.map → schema-visualization-BbvL74Sf.js.map} +1 -1
- package/dist/client/chunks/{useDirtyStateTracking-giMoYB90.js → useDirtyStateTracking-BfG1lX_3.js} +4 -4
- package/dist/client/chunks/{useDirtyStateTracking-giMoYB90.js.map → useDirtyStateTracking-BfG1lX_3.js.map} +1 -1
- package/dist/client/chunks/{useExplainAI-CpFZbdn-.js → useExplainAI-CDFhgmpE.js} +5 -5
- package/dist/client/chunks/{useExplainAI-CpFZbdn-.js.map → useExplainAI-CDFhgmpE.js.map} +1 -1
- package/dist/client/chunks/{vendor-wyAsikWW.js → vendor-DeckzF1j.js} +2 -2
- package/dist/client/chunks/{vendor-wyAsikWW.js.map → vendor-DeckzF1j.js.map} +1 -1
- package/dist/client/components.js +1 -1
- package/dist/client/hooks/queries/useExplainAI.d.ts +3 -2
- package/dist/client/hooks.js +3 -3
- package/dist/client/icons.js +1 -1
- package/dist/client/index.js +13 -13
- 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/types.d.ts +7 -0
- package/dist/client/utils.js +4 -4
- package/dist/client-bundle-stats.html +1 -1
- package/dist/mcp-app/mcp-app.html +6 -6
- package/dist/server/adapters/base-adapter.d.ts +3 -3
- package/dist/server/ai/query-schema.d.ts +3 -3
- package/dist/server/builders/date-time-builder.d.ts +1 -2
- package/dist/server/builders/date-time-helpers.d.ts +19 -6
- package/dist/server/builders/filter-operators.d.ts +10 -1
- package/dist/server/execution/query-normalizer.d.ts +9 -0
- package/dist/server/index.cjs +46 -39
- package/dist/server/index.js +2751 -2618
- package/dist/server/{openai-Cxii1K2N.cjs → openai-C6tdx3yN.cjs} +2 -2
- package/dist/server/{openai-aLi6lmJs.js → openai-D0vh48Oi.js} +2 -2
- package/dist/server/{openai-DC2ye24o.cjs → openai-D346-vmt.cjs} +1 -1
- package/dist/server/{openai-Jt2WUOXm.js → openai-SILGL2q_.js} +1 -1
- package/dist/server/physical-plan/drizzle-sql-builder.d.ts +25 -0
- package/dist/server/physical-plan/semi-join.d.ts +21 -0
- package/dist/server/prompts/single-step-prompt.d.ts +1 -1
- package/package.json +2 -2
- package/dist/adapters/ActivityGridChart.config-BXelP_3e.cjs +0 -1
- package/dist/adapters/ActivityGridChart.config-BjOOT9bc.js +0 -2
- package/dist/adapters/AreaChart.config-B9PiH7Kt.js +0 -2
- package/dist/adapters/AreaChart.config-Bv39EDi8.cjs +0 -1
- package/dist/adapters/BarChart.config-CU-XGdDO.cjs +0 -1
- package/dist/adapters/BarChart.config-D9OIP1uN.js +0 -2
- package/dist/adapters/BoxPlotChart.config-C3cLagI6.js +0 -2
- package/dist/adapters/BoxPlotChart.config-CMwswa9H.cjs +0 -1
- package/dist/adapters/BubbleChart.config--rvyga9s.js +0 -2
- package/dist/adapters/BubbleChart.config-DOCLeg91.cjs +0 -1
- package/dist/adapters/CandlestickChart.config-B8h__isO.cjs +0 -1
- package/dist/adapters/CandlestickChart.config-DPzi-8B_.js +0 -2
- package/dist/adapters/DataTable.config-Dn2PyQdy.cjs +0 -1
- package/dist/adapters/DataTable.config-wtCGsLPw.js +0 -2
- package/dist/adapters/DotStripChart.config-BFshbpk0.cjs +0 -1
- package/dist/adapters/DotStripChart.config-c-tbauT6.js +0 -2
- package/dist/adapters/FunnelChart.config-CZYDI4k-.js +0 -2
- package/dist/adapters/FunnelChart.config-Dc2pIfJy.cjs +0 -1
- package/dist/adapters/GaugeChart.config-C9LYrKB1.cjs +0 -1
- package/dist/adapters/GaugeChart.config-DD73ueqk.js +0 -2
- package/dist/adapters/HeatMapChart.config-5DgOpgpV.js +0 -2
- package/dist/adapters/HeatMapChart.config-BZgQ255E.cjs +0 -1
- package/dist/adapters/KpiDelta.config-BEB3XqML.cjs +0 -1
- package/dist/adapters/KpiDelta.config-DeRkPIxD.js +0 -2
- package/dist/adapters/KpiNumber.config-CxpTAKzR.cjs +0 -1
- package/dist/adapters/KpiNumber.config-DM1dRQL-.js +0 -2
- package/dist/adapters/KpiText.config-Dt59uikm.js +0 -2
- package/dist/adapters/KpiText.config-Dt_pW6mK.cjs +0 -1
- package/dist/adapters/LineChart.config-YeXia1kV.cjs +0 -1
- package/dist/adapters/LineChart.config-jX2ulNmq.js +0 -2
- package/dist/adapters/MarkdownChart.config-BAXU79ec.js +0 -2
- package/dist/adapters/MarkdownChart.config-BP6_9ET2.cjs +0 -1
- package/dist/adapters/MeasureProfileChart.config-BW2gdPaM.cjs +0 -1
- package/dist/adapters/MeasureProfileChart.config-CSxeKHnS.js +0 -2
- package/dist/adapters/PieChart.config-Ci3ZPY9U.cjs +0 -1
- package/dist/adapters/PieChart.config-DtCSYlvx.js +0 -2
- package/dist/adapters/ProportionBarChart.config-B71wPMKX.js +0 -2
- package/dist/adapters/ProportionBarChart.config-Bihgdn8v.cjs +0 -1
- package/dist/adapters/RadarChart.config-CC8jIJ78.js +0 -2
- package/dist/adapters/RadarChart.config-D7dCuKRM.cjs +0 -1
- package/dist/adapters/RadialBarChart.config-DC2nQk5q.js +0 -2
- package/dist/adapters/RadialBarChart.config-Dumbvnj1.cjs +0 -1
- package/dist/adapters/RecordsTable.config-BRqLDmY3.cjs +0 -1
- package/dist/adapters/RecordsTable.config-D1wlIO1v.js +0 -2
- package/dist/adapters/RetentionCombinedChart.config-DejP7Hcc.cjs +0 -1
- package/dist/adapters/RetentionCombinedChart.config-yDEDWwJt.js +0 -2
- package/dist/adapters/RetentionHeatmap.config-BSqTkHB8.cjs +0 -1
- package/dist/adapters/RetentionHeatmap.config-GRJjblsW.js +0 -2
- package/dist/adapters/SankeyChart.config-9b1eT_2V.js +0 -2
- package/dist/adapters/SankeyChart.config-n8ro9EZU.cjs +0 -1
- package/dist/adapters/ScatterChart.config-BHqhTxPV.cjs +0 -1
- package/dist/adapters/ScatterChart.config-Bub2V8Ge.js +0 -2
- package/dist/adapters/SunburstChart.config-CxG0NFqN.js +0 -2
- package/dist/adapters/SunburstChart.config-PmN9LEb5.cjs +0 -1
- package/dist/adapters/TreeMapChart.config-D2S3rG6P.js +0 -2
- package/dist/adapters/TreeMapChart.config-TC4dciRa.cjs +0 -1
- package/dist/adapters/WaterfallChart.config-BirJq5VE.cjs +0 -1
- package/dist/adapters/WaterfallChart.config-DYMzte7F.js +0 -2
- package/dist/adapters/compiler-CJVo3oya.cjs +0 -166
- package/dist/adapters/mcp-app-html-CUL2sMpA.js +0 -5
- package/dist/adapters/mcp-app-html-Ey6aj9WR.cjs +0 -1
- package/dist/adapters/utils-iMkgJr10.cjs +0 -132
- package/dist/client/chunks/DashboardEditModal-3_odkGXU.js.map +0 -1
- package/dist/client/chunks/analysis-builder-shared-DS_eJnM8.js.map +0 -1
- package/dist/client/chunks/chart-activity-grid-cJI-MF_M.js.map +0 -1
- package/dist/client/chunks/charts-loader-DuV9kYN8.js +0 -87
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as c, E as l, O as u, T as d } from "./mcp-transport-
|
|
1
|
+
import { G as e, K as t, _ as n, b as r, g as i, h as a, m as o, p as s } from "./utils-i2h5cwI3.js";
|
|
2
|
+
import { D as c, E as l, O as u, T as d } from "./mcp-transport-BTmAXLo8.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 = [
|
|
@@ -57,10 +57,10 @@ function ae(e) {
|
|
|
57
57
|
for (let n of e) t.push(`### ${n.name}`), n.description && t.push(n.description), te(t, n), ne(t, n), re(t, n), ie(t, n), t.push("");
|
|
58
58
|
return t.join("\n");
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function oe(e) {
|
|
61
61
|
return e.messages.map((e) => e.content.text).join("\n\n");
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function se(e) {
|
|
64
64
|
return [
|
|
65
65
|
"# Drizzle Cube Analytics Agent",
|
|
66
66
|
"",
|
|
@@ -231,11 +231,11 @@ function oe(e) {
|
|
|
231
231
|
"",
|
|
232
232
|
"---",
|
|
233
233
|
"",
|
|
234
|
-
|
|
234
|
+
oe(n),
|
|
235
235
|
"",
|
|
236
236
|
"---",
|
|
237
237
|
"",
|
|
238
|
-
|
|
238
|
+
oe(i),
|
|
239
239
|
"",
|
|
240
240
|
"---",
|
|
241
241
|
"",
|
|
@@ -295,7 +295,7 @@ function oe(e) {
|
|
|
295
295
|
}
|
|
296
296
|
//#endregion
|
|
297
297
|
//#region src/client/components/charts/BarChart.config.ts
|
|
298
|
-
var
|
|
298
|
+
var C = {
|
|
299
299
|
clickableElements: { bar: !0 },
|
|
300
300
|
dropZones: [
|
|
301
301
|
{
|
|
@@ -337,7 +337,7 @@ var w = {
|
|
|
337
337
|
y,
|
|
338
338
|
v
|
|
339
339
|
]
|
|
340
|
-
},
|
|
340
|
+
}, w = {
|
|
341
341
|
clickableElements: { point: !0 },
|
|
342
342
|
dropZones: [
|
|
343
343
|
{
|
|
@@ -412,7 +412,7 @@ var w = {
|
|
|
412
412
|
y,
|
|
413
413
|
v
|
|
414
414
|
]
|
|
415
|
-
},
|
|
415
|
+
}, T = {
|
|
416
416
|
dropZones: [
|
|
417
417
|
{
|
|
418
418
|
key: "xAxis",
|
|
@@ -1411,7 +1411,7 @@ var w = {
|
|
|
1411
1411
|
isValid: !1,
|
|
1412
1412
|
message: "chart.heatmap.validation.xAxisRequired"
|
|
1413
1413
|
}
|
|
1414
|
-
},
|
|
1414
|
+
}, ce = {
|
|
1415
1415
|
dropZones: [],
|
|
1416
1416
|
displayOptionsConfig: [{
|
|
1417
1417
|
key: "showLegend",
|
|
@@ -1426,7 +1426,7 @@ var w = {
|
|
|
1426
1426
|
defaultValue: !0,
|
|
1427
1427
|
description: "chart.option.showTooltip.description"
|
|
1428
1428
|
}]
|
|
1429
|
-
},
|
|
1429
|
+
}, U = {
|
|
1430
1430
|
dropZones: [],
|
|
1431
1431
|
displayOptionsConfig: [
|
|
1432
1432
|
{
|
|
@@ -1472,7 +1472,7 @@ var w = {
|
|
|
1472
1472
|
description: "chart.option.showTooltip.description"
|
|
1473
1473
|
}
|
|
1474
1474
|
]
|
|
1475
|
-
},
|
|
1475
|
+
}, W = {
|
|
1476
1476
|
displayOptions: ["hideHeader"],
|
|
1477
1477
|
dropZones: [{
|
|
1478
1478
|
key: "xAxis",
|
|
@@ -1497,7 +1497,7 @@ var w = {
|
|
|
1497
1497
|
type: "axisFormat",
|
|
1498
1498
|
description: "chart.configText.number_formatting_for_the_value_axis"
|
|
1499
1499
|
}]
|
|
1500
|
-
},
|
|
1500
|
+
}, G = {
|
|
1501
1501
|
displayOptions: [
|
|
1502
1502
|
"showGrid",
|
|
1503
1503
|
"showTooltip",
|
|
@@ -1608,7 +1608,7 @@ var w = {
|
|
|
1608
1608
|
description: "chart.option.xAxisFormat.description"
|
|
1609
1609
|
}
|
|
1610
1610
|
]
|
|
1611
|
-
},
|
|
1611
|
+
}, K = {
|
|
1612
1612
|
clickableElements: { bar: !0 },
|
|
1613
1613
|
displayOptions: ["showTooltip", "hideHeader"],
|
|
1614
1614
|
dropZones: [{
|
|
@@ -1657,7 +1657,7 @@ var w = {
|
|
|
1657
1657
|
description: "chart.configText.number_formatting_for_the_y_axis"
|
|
1658
1658
|
}
|
|
1659
1659
|
]
|
|
1660
|
-
},
|
|
1660
|
+
}, q = {
|
|
1661
1661
|
clickableElements: { bar: !0 },
|
|
1662
1662
|
displayOptions: ["hideHeader"],
|
|
1663
1663
|
dropZones: [{
|
|
@@ -1719,7 +1719,7 @@ var w = {
|
|
|
1719
1719
|
description: "chart.configText.number_formatting_for_the_price_axis"
|
|
1720
1720
|
}
|
|
1721
1721
|
]
|
|
1722
|
-
},
|
|
1722
|
+
}, le = {
|
|
1723
1723
|
displayOptions: [
|
|
1724
1724
|
"showLegend",
|
|
1725
1725
|
"showTooltip",
|
|
@@ -1791,7 +1791,7 @@ var w = {
|
|
|
1791
1791
|
description: "chart.configText.number_formatting_for_the_y_axis"
|
|
1792
1792
|
}
|
|
1793
1793
|
]
|
|
1794
|
-
},
|
|
1794
|
+
}, ue = {
|
|
1795
1795
|
dropZones: [{
|
|
1796
1796
|
key: "xAxis",
|
|
1797
1797
|
label: "chart.configText.category",
|
|
@@ -1849,7 +1849,7 @@ var w = {
|
|
|
1849
1849
|
isValid: !1,
|
|
1850
1850
|
message: "chart.proportionBar.validation.measureRequired"
|
|
1851
1851
|
} : { isValid: !0 }
|
|
1852
|
-
},
|
|
1852
|
+
}, de = {
|
|
1853
1853
|
clickableElements: {},
|
|
1854
1854
|
displayOptions: ["hideHeader"],
|
|
1855
1855
|
dropZones: [{
|
|
@@ -1902,18 +1902,18 @@ var w = {
|
|
|
1902
1902
|
description: "chart.configText.number_formatting_for_the_displayed_value_and_axis_labels"
|
|
1903
1903
|
}
|
|
1904
1904
|
]
|
|
1905
|
-
},
|
|
1905
|
+
}, J = {
|
|
1906
1906
|
packageName: "recharts",
|
|
1907
1907
|
installCommand: "npm install recharts"
|
|
1908
|
-
},
|
|
1908
|
+
}, fe = {
|
|
1909
1909
|
bar: {
|
|
1910
1910
|
label: "chart.bar.label",
|
|
1911
1911
|
icon: "chartBar",
|
|
1912
1912
|
description: "chart.bar.description",
|
|
1913
1913
|
useCase: "chart.bar.useCase",
|
|
1914
1914
|
isAvailable: f,
|
|
1915
|
-
dependencies:
|
|
1916
|
-
config: async () => (await import("./BarChart.config-
|
|
1915
|
+
dependencies: J,
|
|
1916
|
+
config: async () => (await import("./BarChart.config-CorT50Sr.js")).barChartConfig
|
|
1917
1917
|
},
|
|
1918
1918
|
line: {
|
|
1919
1919
|
label: "chart.line.label",
|
|
@@ -1921,8 +1921,8 @@ var w = {
|
|
|
1921
1921
|
description: "chart.line.description",
|
|
1922
1922
|
useCase: "chart.line.useCase",
|
|
1923
1923
|
isAvailable: f,
|
|
1924
|
-
dependencies:
|
|
1925
|
-
config: async () => (await import("./LineChart.config-
|
|
1924
|
+
dependencies: J,
|
|
1925
|
+
config: async () => (await import("./LineChart.config-CFGa_jpk.js")).lineChartConfig
|
|
1926
1926
|
},
|
|
1927
1927
|
area: {
|
|
1928
1928
|
label: "chart.area.label",
|
|
@@ -1930,8 +1930,8 @@ var w = {
|
|
|
1930
1930
|
description: "chart.area.description",
|
|
1931
1931
|
useCase: "chart.area.useCase",
|
|
1932
1932
|
isAvailable: f,
|
|
1933
|
-
dependencies:
|
|
1934
|
-
config: async () => (await import("./AreaChart.config-
|
|
1933
|
+
dependencies: J,
|
|
1934
|
+
config: async () => (await import("./AreaChart.config-Cn4fTDQH.js")).areaChartConfig
|
|
1935
1935
|
},
|
|
1936
1936
|
pie: {
|
|
1937
1937
|
label: "chart.pie.label",
|
|
@@ -1939,8 +1939,8 @@ var w = {
|
|
|
1939
1939
|
description: "chart.pie.description",
|
|
1940
1940
|
useCase: "chart.pie.useCase",
|
|
1941
1941
|
isAvailable: f,
|
|
1942
|
-
dependencies:
|
|
1943
|
-
config: async () => (await import("./PieChart.config-
|
|
1942
|
+
dependencies: J,
|
|
1943
|
+
config: async () => (await import("./PieChart.config-DT1TCBFA.js")).pieChartConfig
|
|
1944
1944
|
},
|
|
1945
1945
|
scatter: {
|
|
1946
1946
|
label: "chart.scatter.label",
|
|
@@ -1954,8 +1954,8 @@ var w = {
|
|
|
1954
1954
|
available: !1,
|
|
1955
1955
|
reason: "chart.availability.scatter"
|
|
1956
1956
|
} : { available: !0 },
|
|
1957
|
-
dependencies:
|
|
1958
|
-
config: async () => (await import("./ScatterChart.config-
|
|
1957
|
+
dependencies: J,
|
|
1958
|
+
config: async () => (await import("./ScatterChart.config-CNWNsjv_.js")).scatterChartConfig
|
|
1959
1959
|
},
|
|
1960
1960
|
bubble: {
|
|
1961
1961
|
label: "chart.bubble.label",
|
|
@@ -1969,8 +1969,8 @@ var w = {
|
|
|
1969
1969
|
available: !1,
|
|
1970
1970
|
reason: "chart.availability.bubble"
|
|
1971
1971
|
} : { available: !0 },
|
|
1972
|
-
dependencies:
|
|
1973
|
-
config: async () => (await import("./BubbleChart.config
|
|
1972
|
+
dependencies: J,
|
|
1973
|
+
config: async () => (await import("./BubbleChart.config-LJ2w0ZAz.js")).bubbleChartConfig
|
|
1974
1974
|
},
|
|
1975
1975
|
radar: {
|
|
1976
1976
|
label: "chart.radar.label",
|
|
@@ -1978,8 +1978,8 @@ var w = {
|
|
|
1978
1978
|
description: "chart.radar.description",
|
|
1979
1979
|
useCase: "chart.radar.useCase",
|
|
1980
1980
|
isAvailable: f,
|
|
1981
|
-
dependencies:
|
|
1982
|
-
config: async () => (await import("./RadarChart.config-
|
|
1981
|
+
dependencies: J,
|
|
1982
|
+
config: async () => (await import("./RadarChart.config-CYpWy1MI.js")).radarChartConfig
|
|
1983
1983
|
},
|
|
1984
1984
|
radialBar: {
|
|
1985
1985
|
label: "chart.radialBar.label",
|
|
@@ -1987,8 +1987,8 @@ var w = {
|
|
|
1987
1987
|
description: "chart.radialBar.description",
|
|
1988
1988
|
useCase: "chart.radialBar.useCase",
|
|
1989
1989
|
isAvailable: f,
|
|
1990
|
-
dependencies:
|
|
1991
|
-
config: async () => (await import("./RadialBarChart.config-
|
|
1990
|
+
dependencies: J,
|
|
1991
|
+
config: async () => (await import("./RadialBarChart.config-BXEmrEW0.js")).radialBarChartConfig
|
|
1992
1992
|
},
|
|
1993
1993
|
treemap: {
|
|
1994
1994
|
label: "chart.treemap.label",
|
|
@@ -1996,22 +1996,22 @@ var w = {
|
|
|
1996
1996
|
description: "chart.treemap.description",
|
|
1997
1997
|
useCase: "chart.treemap.useCase",
|
|
1998
1998
|
isAvailable: f,
|
|
1999
|
-
dependencies:
|
|
2000
|
-
config: async () => (await import("./TreeMapChart.config-
|
|
1999
|
+
dependencies: J,
|
|
2000
|
+
config: async () => (await import("./TreeMapChart.config-CoXSasFP.js")).treemapChartConfig
|
|
2001
2001
|
},
|
|
2002
2002
|
table: {
|
|
2003
2003
|
label: "chart.table.label",
|
|
2004
2004
|
icon: "chartTable",
|
|
2005
2005
|
description: "chart.table.description",
|
|
2006
2006
|
useCase: "chart.table.useCase",
|
|
2007
|
-
config: async () => (await import("./DataTable.config-
|
|
2007
|
+
config: async () => (await import("./DataTable.config-jwBiAUpg.js")).dataTableConfig
|
|
2008
2008
|
},
|
|
2009
2009
|
recordsTable: {
|
|
2010
2010
|
label: "chart.recordsTable.label",
|
|
2011
2011
|
icon: "chartRecordsTable",
|
|
2012
2012
|
description: "chart.recordsTable.description",
|
|
2013
2013
|
useCase: "chart.recordsTable.useCase",
|
|
2014
|
-
config: async () => (await import("./RecordsTable.config-
|
|
2014
|
+
config: async () => (await import("./RecordsTable.config-DOu5dLR9.js")).recordsTableConfig
|
|
2015
2015
|
},
|
|
2016
2016
|
activityGrid: {
|
|
2017
2017
|
label: "chart.activityGrid.label",
|
|
@@ -2025,7 +2025,7 @@ var w = {
|
|
|
2025
2025
|
available: !1,
|
|
2026
2026
|
reason: "chart.availability.requiresTimeDimension"
|
|
2027
2027
|
} : { available: !0 },
|
|
2028
|
-
config: async () => (await import("./ActivityGridChart.config-
|
|
2028
|
+
config: async () => (await import("./ActivityGridChart.config-Crkwyx_5.js")).activityGridChartConfig
|
|
2029
2029
|
},
|
|
2030
2030
|
kpiNumber: {
|
|
2031
2031
|
label: "chart.kpiNumber.label",
|
|
@@ -2033,7 +2033,7 @@ var w = {
|
|
|
2033
2033
|
description: "chart.kpiNumber.description",
|
|
2034
2034
|
useCase: "chart.kpiNumber.useCase",
|
|
2035
2035
|
isAvailable: h,
|
|
2036
|
-
config: async () => (await import("./KpiNumber.config-
|
|
2036
|
+
config: async () => (await import("./KpiNumber.config-D9LpXMmo.js")).kpiNumberConfig
|
|
2037
2037
|
},
|
|
2038
2038
|
kpiDelta: {
|
|
2039
2039
|
label: "chart.kpiDelta.label",
|
|
@@ -2041,7 +2041,7 @@ var w = {
|
|
|
2041
2041
|
description: "chart.kpiDelta.description",
|
|
2042
2042
|
useCase: "chart.kpiDelta.useCase",
|
|
2043
2043
|
isAvailable: f,
|
|
2044
|
-
config: async () => (await import("./KpiDelta.config-
|
|
2044
|
+
config: async () => (await import("./KpiDelta.config-qlIY4kju.js")).kpiDeltaConfig
|
|
2045
2045
|
},
|
|
2046
2046
|
kpiText: {
|
|
2047
2047
|
label: "chart.kpiText.label",
|
|
@@ -2049,38 +2049,38 @@ var w = {
|
|
|
2049
2049
|
description: "chart.kpiText.description",
|
|
2050
2050
|
useCase: "chart.kpiText.useCase",
|
|
2051
2051
|
isAvailable: h,
|
|
2052
|
-
config: async () => (await import("./KpiText.config-
|
|
2052
|
+
config: async () => (await import("./KpiText.config-pqFid-lb.js")).kpiTextConfig
|
|
2053
2053
|
},
|
|
2054
2054
|
markdown: {
|
|
2055
2055
|
label: "chart.markdown.label",
|
|
2056
2056
|
icon: "chartMarkdown",
|
|
2057
2057
|
description: "chart.markdown.description",
|
|
2058
2058
|
useCase: "chart.markdown.useCase",
|
|
2059
|
-
config: async () => (await import("./MarkdownChart.config-
|
|
2059
|
+
config: async () => (await import("./MarkdownChart.config-Cnptz8gx.js")).markdownConfig
|
|
2060
2060
|
},
|
|
2061
2061
|
funnel: {
|
|
2062
2062
|
label: "chart.funnel.label",
|
|
2063
2063
|
icon: "chartFunnel",
|
|
2064
2064
|
description: "chart.funnel.description",
|
|
2065
2065
|
useCase: "chart.funnel.useCase",
|
|
2066
|
-
dependencies:
|
|
2067
|
-
config: async () => (await import("./FunnelChart.config-
|
|
2066
|
+
dependencies: J,
|
|
2067
|
+
config: async () => (await import("./FunnelChart.config-DBkjp0wh.js")).funnelChartConfig
|
|
2068
2068
|
},
|
|
2069
2069
|
sankey: {
|
|
2070
2070
|
label: "chart.sankey.label",
|
|
2071
2071
|
icon: "chartSankey",
|
|
2072
2072
|
description: "chart.sankey.description",
|
|
2073
2073
|
useCase: "chart.sankey.useCase",
|
|
2074
|
-
dependencies:
|
|
2075
|
-
config: async () => (await import("./SankeyChart.config-
|
|
2074
|
+
dependencies: J,
|
|
2075
|
+
config: async () => (await import("./SankeyChart.config-DEBF3E7J.js")).sankeyChartConfig
|
|
2076
2076
|
},
|
|
2077
2077
|
sunburst: {
|
|
2078
2078
|
label: "chart.sunburst.label",
|
|
2079
2079
|
icon: "chartSunburst",
|
|
2080
2080
|
description: "chart.sunburst.description",
|
|
2081
2081
|
useCase: "chart.sunburst.useCase",
|
|
2082
|
-
dependencies:
|
|
2083
|
-
config: async () => (await import("./SunburstChart.config-
|
|
2082
|
+
dependencies: J,
|
|
2083
|
+
config: async () => (await import("./SunburstChart.config-DyBJr_Ah.js")).sunburstChartConfig
|
|
2084
2084
|
},
|
|
2085
2085
|
heatmap: {
|
|
2086
2086
|
label: "chart.heatmap.label",
|
|
@@ -2098,21 +2098,21 @@ var w = {
|
|
|
2098
2098
|
packageName: "@nivo/heatmap",
|
|
2099
2099
|
installCommand: "npm install @nivo/heatmap"
|
|
2100
2100
|
},
|
|
2101
|
-
config: async () => (await import("./HeatMapChart.config-
|
|
2101
|
+
config: async () => (await import("./HeatMapChart.config-Di1KFl9H.js")).heatmapChartConfig
|
|
2102
2102
|
},
|
|
2103
2103
|
retentionHeatmap: {
|
|
2104
2104
|
label: "chart.retentionHeatmap.label",
|
|
2105
2105
|
icon: "chartRetention",
|
|
2106
2106
|
description: "chart.retentionHeatmap.description",
|
|
2107
2107
|
useCase: "chart.retentionHeatmap.useCase",
|
|
2108
|
-
config: async () => (await import("./RetentionHeatmap.config-
|
|
2108
|
+
config: async () => (await import("./RetentionHeatmap.config-Csnntt4P.js")).retentionHeatmapConfig
|
|
2109
2109
|
},
|
|
2110
2110
|
retentionCombined: {
|
|
2111
2111
|
label: "chart.retentionCombined.label",
|
|
2112
2112
|
icon: "chartRetention",
|
|
2113
2113
|
description: "chart.retentionCombined.description",
|
|
2114
2114
|
useCase: "chart.retentionCombined.useCase",
|
|
2115
|
-
config: async () => (await import("./RetentionCombinedChart.config-
|
|
2115
|
+
config: async () => (await import("./RetentionCombinedChart.config-BLTS46q4.js")).retentionCombinedConfig
|
|
2116
2116
|
},
|
|
2117
2117
|
boxPlot: {
|
|
2118
2118
|
label: "chart.boxPlot.label",
|
|
@@ -2120,7 +2120,7 @@ var w = {
|
|
|
2120
2120
|
description: "chart.boxPlot.description",
|
|
2121
2121
|
useCase: "chart.boxPlot.useCase",
|
|
2122
2122
|
isAvailable: f,
|
|
2123
|
-
config: async () => (await import("./BoxPlotChart.config-
|
|
2123
|
+
config: async () => (await import("./BoxPlotChart.config-Dki3qfhN.js")).boxPlotChartConfig
|
|
2124
2124
|
},
|
|
2125
2125
|
dotStrip: {
|
|
2126
2126
|
label: "chart.dotStrip.label",
|
|
@@ -2128,7 +2128,7 @@ var w = {
|
|
|
2128
2128
|
description: "chart.dotStrip.description",
|
|
2129
2129
|
useCase: "chart.dotStrip.useCase",
|
|
2130
2130
|
isAvailable: f,
|
|
2131
|
-
config: async () => (await import("./DotStripChart.config-
|
|
2131
|
+
config: async () => (await import("./DotStripChart.config-C_dgJFje.js")).dotStripChartConfig
|
|
2132
2132
|
},
|
|
2133
2133
|
waterfall: {
|
|
2134
2134
|
label: "chart.waterfall.label",
|
|
@@ -2136,8 +2136,8 @@ var w = {
|
|
|
2136
2136
|
description: "chart.waterfall.description",
|
|
2137
2137
|
useCase: "chart.waterfall.useCase",
|
|
2138
2138
|
isAvailable: f,
|
|
2139
|
-
dependencies:
|
|
2140
|
-
config: async () => (await import("./WaterfallChart.config-
|
|
2139
|
+
dependencies: J,
|
|
2140
|
+
config: async () => (await import("./WaterfallChart.config-Dyf-p2Z2.js")).waterfallChartConfig
|
|
2141
2141
|
},
|
|
2142
2142
|
candlestick: {
|
|
2143
2143
|
label: "chart.candlestick.label",
|
|
@@ -2151,7 +2151,7 @@ var w = {
|
|
|
2151
2151
|
available: !1,
|
|
2152
2152
|
reason: "chart.availability.requiresDimension"
|
|
2153
2153
|
} : { available: !0 },
|
|
2154
|
-
config: async () => (await import("./CandlestickChart.config-
|
|
2154
|
+
config: async () => (await import("./CandlestickChart.config-D-vVDHaQ.js")).candlestickChartConfig
|
|
2155
2155
|
},
|
|
2156
2156
|
measureProfile: {
|
|
2157
2157
|
label: "chart.measureProfile.label",
|
|
@@ -2162,8 +2162,8 @@ var w = {
|
|
|
2162
2162
|
available: !1,
|
|
2163
2163
|
reason: "chart.availability.requiresTwoMeasures"
|
|
2164
2164
|
} : { available: !0 },
|
|
2165
|
-
dependencies:
|
|
2166
|
-
config: async () => (await import("./MeasureProfileChart.config-
|
|
2165
|
+
dependencies: J,
|
|
2166
|
+
config: async () => (await import("./MeasureProfileChart.config-BlAnkNf6.js")).measureProfileChartConfig
|
|
2167
2167
|
},
|
|
2168
2168
|
proportionBar: {
|
|
2169
2169
|
label: "chart.proportionBar.label",
|
|
@@ -2171,7 +2171,7 @@ var w = {
|
|
|
2171
2171
|
description: "chart.proportionBar.description",
|
|
2172
2172
|
useCase: "chart.proportionBar.useCase",
|
|
2173
2173
|
isAvailable: f,
|
|
2174
|
-
config: async () => (await import("./ProportionBarChart.config-
|
|
2174
|
+
config: async () => (await import("./ProportionBarChart.config-CN5ov6e6.js")).proportionBarChartConfig
|
|
2175
2175
|
},
|
|
2176
2176
|
gauge: {
|
|
2177
2177
|
label: "chart.gauge.label",
|
|
@@ -2183,10 +2183,10 @@ var w = {
|
|
|
2183
2183
|
packageName: "d3-shape",
|
|
2184
2184
|
installCommand: "npm install d3-shape"
|
|
2185
2185
|
},
|
|
2186
|
-
config: async () => (await import("./GaugeChart.config-
|
|
2186
|
+
config: async () => (await import("./GaugeChart.config-CyD4y_yf.js")).gaugeChartConfig
|
|
2187
2187
|
}
|
|
2188
2188
|
};
|
|
2189
|
-
function
|
|
2189
|
+
function pe(e, t) {
|
|
2190
2190
|
return {
|
|
2191
2191
|
...t,
|
|
2192
2192
|
label: e.label,
|
|
@@ -2197,10 +2197,10 @@ function me(e, t) {
|
|
|
2197
2197
|
}
|
|
2198
2198
|
//#endregion
|
|
2199
2199
|
//#region src/client/charts/chartConfigRegistry.ts
|
|
2200
|
-
var
|
|
2201
|
-
bar:
|
|
2202
|
-
line:
|
|
2203
|
-
area:
|
|
2200
|
+
var me = {
|
|
2201
|
+
bar: C,
|
|
2202
|
+
line: w,
|
|
2203
|
+
area: T,
|
|
2204
2204
|
pie: E,
|
|
2205
2205
|
scatter: D,
|
|
2206
2206
|
bubble: O,
|
|
@@ -2218,67 +2218,71 @@ var he = {
|
|
|
2218
2218
|
sankey: B,
|
|
2219
2219
|
sunburst: V,
|
|
2220
2220
|
heatmap: H,
|
|
2221
|
-
retentionHeatmap:
|
|
2222
|
-
retentionCombined:
|
|
2223
|
-
boxPlot:
|
|
2224
|
-
dotStrip:
|
|
2225
|
-
waterfall:
|
|
2226
|
-
candlestick:
|
|
2227
|
-
measureProfile:
|
|
2228
|
-
proportionBar:
|
|
2229
|
-
gauge:
|
|
2230
|
-
},
|
|
2231
|
-
function
|
|
2232
|
-
return
|
|
2221
|
+
retentionHeatmap: ce,
|
|
2222
|
+
retentionCombined: U,
|
|
2223
|
+
boxPlot: W,
|
|
2224
|
+
dotStrip: G,
|
|
2225
|
+
waterfall: K,
|
|
2226
|
+
candlestick: q,
|
|
2227
|
+
measureProfile: le,
|
|
2228
|
+
proportionBar: ue,
|
|
2229
|
+
gauge: de
|
|
2230
|
+
}, Y = Object.fromEntries(Object.keys(fe).map((e) => [e, pe(fe[e], me[e])]));
|
|
2231
|
+
function he(e) {
|
|
2232
|
+
return Y[e]?.recordGrain === !0;
|
|
2233
2233
|
}
|
|
2234
2234
|
//#endregion
|
|
2235
2235
|
//#region src/server/agent/chart-validation.ts
|
|
2236
|
-
function
|
|
2236
|
+
function X(e) {
|
|
2237
2237
|
return Array.isArray(e) ? e.length > 0 : !!e;
|
|
2238
2238
|
}
|
|
2239
|
-
function
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2239
|
+
function Z(e) {
|
|
2240
|
+
let t = e.timeDimensions ?? [];
|
|
2241
|
+
return e.ungrouped ? t : t.filter((e) => !!e.granularity);
|
|
2242
|
+
}
|
|
2243
|
+
function ge(e, n, r, i) {
|
|
2244
|
+
for (let a of e.dropZones) {
|
|
2245
|
+
if (!a.mandatory || X(r?.[a.key])) continue;
|
|
2246
|
+
let e = a.acceptTypes?.join("/") ?? "fields";
|
|
2247
|
+
i.push(t("server.validation.chart.dropZoneRequired", {
|
|
2248
|
+
key: a.key,
|
|
2249
|
+
chartType: n,
|
|
2250
|
+
label: a.label,
|
|
2247
2251
|
acceptDesc: e
|
|
2248
2252
|
}));
|
|
2249
2253
|
}
|
|
2250
2254
|
}
|
|
2251
|
-
function
|
|
2252
|
-
if (
|
|
2253
|
-
let
|
|
2254
|
-
|
|
2255
|
+
function _e(e, n, r) {
|
|
2256
|
+
if (X(e?.xAxis)) return;
|
|
2257
|
+
let i = n.dimensions ?? [], a = Z(n), o = i.length > 0 || a.length > 0;
|
|
2258
|
+
r.push(t(o ? "server.validation.chart.barXAxisRequired" : "server.validation.chart.barNeedsDimension"));
|
|
2255
2259
|
}
|
|
2256
|
-
function
|
|
2260
|
+
function ve(e) {
|
|
2257
2261
|
return Array.isArray(e) ? e : [e];
|
|
2258
2262
|
}
|
|
2259
|
-
function
|
|
2263
|
+
function ye(e, n) {
|
|
2260
2264
|
if (!e?.xAxis || !e?.series) return;
|
|
2261
|
-
let
|
|
2262
|
-
|
|
2265
|
+
let r = new Set(ve(e.xAxis)), i = ve(e.series).filter((e) => r.has(e));
|
|
2266
|
+
i.length > 0 && n.push(t("server.validation.chart.seriesDuplicatesXAxis", { duplicates: i.join(", ") }));
|
|
2263
2267
|
}
|
|
2264
|
-
function
|
|
2265
|
-
|
|
2268
|
+
function be(e, n, r) {
|
|
2269
|
+
he(e) && n.ungrouped !== !0 && r.push(t("server.validation.chart.recordGrainNeedsUngrouped", { chartType: e }));
|
|
2266
2270
|
}
|
|
2267
|
-
function
|
|
2268
|
-
let r =
|
|
2271
|
+
function xe(e, t, n) {
|
|
2272
|
+
let r = Y[e];
|
|
2269
2273
|
if (!r || r.skipQuery) return {
|
|
2270
2274
|
isValid: !0,
|
|
2271
2275
|
errors: []
|
|
2272
2276
|
};
|
|
2273
2277
|
let i = [];
|
|
2274
|
-
return
|
|
2278
|
+
return ge(r, e, t, i), be(e, n, i), e === "bar" && _e(t, n, i), ye(t, i), {
|
|
2275
2279
|
isValid: i.length === 0,
|
|
2276
2280
|
errors: i
|
|
2277
2281
|
};
|
|
2278
2282
|
}
|
|
2279
|
-
function
|
|
2280
|
-
if (e !== "bar" ||
|
|
2281
|
-
let r = n.dimensions ?? [], i = n
|
|
2283
|
+
function Se(e, t, n) {
|
|
2284
|
+
if (e !== "bar" || X(t?.xAxis)) return { chartType: e };
|
|
2285
|
+
let r = n.dimensions ?? [], i = Z(n);
|
|
2282
2286
|
if (r.length > 0 || i.length > 0) return { chartType: e };
|
|
2283
2287
|
let a = (n.measures ?? []).length === 1 ? "kpiNumber" : "table";
|
|
2284
2288
|
return {
|
|
@@ -2286,7 +2290,7 @@ function Ce(e, t, n) {
|
|
|
2286
2290
|
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".`
|
|
2287
2291
|
};
|
|
2288
2292
|
}
|
|
2289
|
-
function
|
|
2293
|
+
function Ce(e, t, n, r) {
|
|
2290
2294
|
if (!(e.acceptTypes ?? []).includes("measure")) return;
|
|
2291
2295
|
let i = /* @__PURE__ */ new Set();
|
|
2292
2296
|
for (let r of t.dropZones) {
|
|
@@ -2297,7 +2301,7 @@ function we(e, t, n, r) {
|
|
|
2297
2301
|
let a = r.filter((e) => !i.has(e));
|
|
2298
2302
|
a.length > 0 && (n[e.key] = a[0]);
|
|
2299
2303
|
}
|
|
2300
|
-
function
|
|
2304
|
+
function we(e, t) {
|
|
2301
2305
|
let n = /* @__PURE__ */ new Set();
|
|
2302
2306
|
for (let [r, i] of Object.entries(e)) if (r !== t) {
|
|
2303
2307
|
if (Array.isArray(i)) for (let e of i) typeof e == "string" && n.add(e);
|
|
@@ -2305,34 +2309,34 @@ function Te(e, t) {
|
|
|
2305
2309
|
}
|
|
2306
2310
|
return n;
|
|
2307
2311
|
}
|
|
2308
|
-
function
|
|
2312
|
+
function Te(e, t, n) {
|
|
2309
2313
|
let r = e.acceptTypes ?? [], i = [];
|
|
2310
2314
|
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;
|
|
2311
|
-
let a =
|
|
2315
|
+
let a = we(t, e.key), o = i.filter((e) => !a.has(e));
|
|
2312
2316
|
if (o.length === 0) return;
|
|
2313
2317
|
let s = e.maxItems ?? Infinity, c = o.slice(0, s);
|
|
2314
2318
|
c.length > 0 && (t[e.key] = c);
|
|
2315
2319
|
}
|
|
2316
|
-
function
|
|
2317
|
-
let r =
|
|
2320
|
+
function Ee(e, t, n) {
|
|
2321
|
+
let r = Y[e];
|
|
2318
2322
|
if (!r) return t ?? {};
|
|
2319
|
-
let i = { ...t }, a = n
|
|
2323
|
+
let i = { ...t }, a = Z(n), o = {
|
|
2320
2324
|
measures: n.measures ?? [],
|
|
2321
2325
|
dimensions: n.dimensions ?? [],
|
|
2322
2326
|
timeDimFields: a.map((e) => e.dimension)
|
|
2323
2327
|
};
|
|
2324
|
-
for (let e of r.dropZones) e.excludeFromInference ||
|
|
2328
|
+
for (let e of r.dropZones) e.excludeFromInference || X(i[e.key]) || (e.key === "sizeField" || e.key === "colorField" ? Ce(e, r, i, o.measures) : Te(e, i, o));
|
|
2325
2329
|
return i;
|
|
2326
2330
|
}
|
|
2327
|
-
function
|
|
2328
|
-
return
|
|
2331
|
+
function De(n) {
|
|
2332
|
+
return n ? e(n) ? t(n) : n : "";
|
|
2329
2333
|
}
|
|
2330
|
-
function
|
|
2334
|
+
function Oe(e) {
|
|
2331
2335
|
let t = ["\nChart config requirements by type:"];
|
|
2332
2336
|
for (let n of e) {
|
|
2333
|
-
let e =
|
|
2337
|
+
let e = Y[n];
|
|
2334
2338
|
if (!e) continue;
|
|
2335
|
-
let r = [
|
|
2339
|
+
let r = [De(e.description), De(e.useCase)].filter(Boolean).join(". "), i = r ? ` — ${r}.` : "", a = he(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);
|
|
2336
2340
|
if (o.length === 0 && !e.skipQuery) {
|
|
2337
2341
|
t.push(` ${n}${i}${a} chartConfig auto-inferred from query.`);
|
|
2338
2342
|
continue;
|
|
@@ -2351,7 +2355,7 @@ function ke(e) {
|
|
|
2351
2355
|
}
|
|
2352
2356
|
//#endregion
|
|
2353
2357
|
//#region src/server/agent/data-shape.ts
|
|
2354
|
-
function
|
|
2358
|
+
function ke(e, t, n, r) {
|
|
2355
2359
|
let i = /* @__PURE__ */ new Set(), a = 0, o, s, c = !0;
|
|
2356
2360
|
for (let n of e) {
|
|
2357
2361
|
let e = n[t];
|
|
@@ -2375,28 +2379,28 @@ function Ae(e, t, n, r) {
|
|
|
2375
2379
|
} : {}
|
|
2376
2380
|
};
|
|
2377
2381
|
}
|
|
2378
|
-
function
|
|
2382
|
+
function Ae(e, t) {
|
|
2379
2383
|
if (e.length === 0) return [];
|
|
2380
2384
|
let n = [], r = /* @__PURE__ */ new Set(), i = [
|
|
2381
2385
|
["dimension", t?.dimensions],
|
|
2382
2386
|
["timeDimension", t?.timeDimensions],
|
|
2383
2387
|
["measure", t?.measures]
|
|
2384
2388
|
];
|
|
2385
|
-
for (let [t, a] of i) for (let [i, o] of Object.entries(a ?? {})) r.add(i), n.push(
|
|
2386
|
-
for (let t of Object.keys(e[0])) r.has(t) || n.push(
|
|
2389
|
+
for (let [t, a] of i) for (let [i, o] of Object.entries(a ?? {})) r.add(i), n.push(ke(e, i, t, o?.type));
|
|
2390
|
+
for (let t of Object.keys(e[0])) r.has(t) || n.push(ke(e, t, "dimension", void 0));
|
|
2387
2391
|
return n;
|
|
2388
2392
|
}
|
|
2389
2393
|
//#endregion
|
|
2390
2394
|
//#region src/shared/query-shape.ts
|
|
2391
|
-
function
|
|
2395
|
+
function je(e) {
|
|
2392
2396
|
if (!e || typeof e != "object") return !1;
|
|
2393
2397
|
let t = (e) => Array.isArray(e) ? e.length : 0;
|
|
2394
2398
|
return t(e.measures) > 0 || t(e.dimensions) > 0 || t(e.timeDimensions) > 0;
|
|
2395
2399
|
}
|
|
2396
2400
|
//#endregion
|
|
2397
2401
|
//#region src/server/agent/tools.ts
|
|
2398
|
-
var
|
|
2399
|
-
function
|
|
2402
|
+
var Me = "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`.", Q = /* @__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(".");
|
|
2403
|
+
function Ne() {
|
|
2400
2404
|
return [
|
|
2401
2405
|
{
|
|
2402
2406
|
name: "discover_cubes",
|
|
@@ -2436,12 +2440,12 @@ function Pe() {
|
|
|
2436
2440
|
description: "Execute a semantic query and return data results. Supports standard queries (measures/dimensions) and analysis modes (funnel/flow/retention). Only provide ONE mode per call.",
|
|
2437
2441
|
parameters: {
|
|
2438
2442
|
type: "object",
|
|
2439
|
-
properties:
|
|
2443
|
+
properties: r
|
|
2440
2444
|
}
|
|
2441
2445
|
},
|
|
2442
2446
|
{
|
|
2443
2447
|
name: "add_portlet",
|
|
2444
|
-
description: "Add a chart visualization to the notebook.\n" +
|
|
2448
|
+
description: "Add a chart visualization to the notebook.\n" + Oe(Q) + "\nThe query is validated before adding. The portlet fetches its own data.",
|
|
2445
2449
|
parameters: {
|
|
2446
2450
|
type: "object",
|
|
2447
2451
|
properties: {
|
|
@@ -2455,7 +2459,7 @@ function Pe() {
|
|
|
2455
2459
|
},
|
|
2456
2460
|
chartType: {
|
|
2457
2461
|
type: "string",
|
|
2458
|
-
enum:
|
|
2462
|
+
enum: Q,
|
|
2459
2463
|
description: "Chart type to render"
|
|
2460
2464
|
},
|
|
2461
2465
|
chartConfig: {
|
|
@@ -2497,7 +2501,7 @@ function Pe() {
|
|
|
2497
2501
|
},
|
|
2498
2502
|
content: {
|
|
2499
2503
|
type: "string",
|
|
2500
|
-
description: "Markdown body, for the \"markdown\" chart type. " +
|
|
2504
|
+
description: "Markdown body, for the \"markdown\" chart type. " + Me
|
|
2501
2505
|
},
|
|
2502
2506
|
...c,
|
|
2503
2507
|
...u
|
|
@@ -2532,7 +2536,7 @@ function Pe() {
|
|
|
2532
2536
|
},
|
|
2533
2537
|
chartType: {
|
|
2534
2538
|
type: "string",
|
|
2535
|
-
enum:
|
|
2539
|
+
enum: Q,
|
|
2536
2540
|
description: "Replacement chart type"
|
|
2537
2541
|
},
|
|
2538
2542
|
chartConfig: {
|
|
@@ -2594,7 +2598,7 @@ function Pe() {
|
|
|
2594
2598
|
},
|
|
2595
2599
|
chartType: {
|
|
2596
2600
|
type: "string",
|
|
2597
|
-
enum:
|
|
2601
|
+
enum: Q,
|
|
2598
2602
|
description: "Chart type. Use \"markdown\" for section headers."
|
|
2599
2603
|
},
|
|
2600
2604
|
query: {
|
|
@@ -2625,7 +2629,7 @@ function Pe() {
|
|
|
2625
2629
|
},
|
|
2626
2630
|
displayConfig: {
|
|
2627
2631
|
type: "object",
|
|
2628
|
-
description: "Chart display configuration (for markdown: { content, hideHeader, transparentBackground, autoHeight }). " +
|
|
2632
|
+
description: "Chart display configuration (for markdown: { content, hideHeader, transparentBackground, autoHeight }). " + Me,
|
|
2629
2633
|
properties: {
|
|
2630
2634
|
...c,
|
|
2631
2635
|
...u
|
|
@@ -2737,8 +2741,8 @@ function Pe() {
|
|
|
2737
2741
|
}
|
|
2738
2742
|
];
|
|
2739
2743
|
}
|
|
2740
|
-
function
|
|
2741
|
-
let { semanticLayer: t, securityContext: n } = e, r = /* @__PURE__ */ new Map(),
|
|
2744
|
+
function Pe(e) {
|
|
2745
|
+
let { semanticLayer: t, securityContext: n } = e, r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
2742
2746
|
r.set("discover_cubes", async (e) => {
|
|
2743
2747
|
let r = { cubes: (await s(t, n, {
|
|
2744
2748
|
topic: e.topic,
|
|
@@ -2803,7 +2807,7 @@ function Fe(e) {
|
|
|
2803
2807
|
rowCount: a.data.length,
|
|
2804
2808
|
data: s,
|
|
2805
2809
|
truncated: a.data.length > s.length,
|
|
2806
|
-
dataShape:
|
|
2810
|
+
dataShape: Ae(s, a.annotation),
|
|
2807
2811
|
annotation: a.annotation
|
|
2808
2812
|
}) + "\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.]" };
|
|
2809
2813
|
} catch (t) {
|
|
@@ -2828,27 +2832,27 @@ function Fe(e) {
|
|
|
2828
2832
|
let r = {
|
|
2829
2833
|
number: "kpiNumber",
|
|
2830
2834
|
retention: "retentionHeatmap"
|
|
2831
|
-
}[e.chartType] ?? e.chartType,
|
|
2835
|
+
}[e.chartType] ?? e.chartType, i;
|
|
2832
2836
|
try {
|
|
2833
|
-
|
|
2837
|
+
i = JSON.parse(e.query);
|
|
2834
2838
|
} catch {
|
|
2835
2839
|
return { error: "Invalid query: could not parse JSON string. Ensure `query` is a valid JSON string." };
|
|
2836
2840
|
}
|
|
2837
|
-
|
|
2838
|
-
let o = t.validateQuery(
|
|
2839
|
-
if (!o.isValid) return { error: `Invalid query — fix these errors and retry:\n${o.errors.join("\n")}\n\nAttempted query:\n${JSON.stringify(
|
|
2840
|
-
let s = !!(
|
|
2841
|
+
i = a(i);
|
|
2842
|
+
let o = t.validateQuery(i, n);
|
|
2843
|
+
if (!o.isValid) return { error: `Invalid query — fix these errors and retry:\n${o.errors.join("\n")}\n\nAttempted query:\n${JSON.stringify(i, null, 2)}` };
|
|
2844
|
+
let s = !!(i.funnel || i.flow || i.retention), c, l = r, u;
|
|
2841
2845
|
if (s) c = e.chartConfig ?? {};
|
|
2842
2846
|
else {
|
|
2843
|
-
let t =
|
|
2847
|
+
let t = Se(r, e.chartConfig, i);
|
|
2844
2848
|
l = t.chartType, u = t.note;
|
|
2845
|
-
let n =
|
|
2846
|
-
if (!
|
|
2849
|
+
let n = Ee(l, e.chartConfig, i), a = xe(l, n, i);
|
|
2850
|
+
if (!a.isValid) return { error: `Chart config invalid — fix these errors and retry:\n${a.errors.join("\n")}\n\nchartType: ${l}\nAttempted chartConfig:\n${JSON.stringify(n, null, 2)}\n\nQuery:\n${JSON.stringify(i, null, 2)}` };
|
|
2847
2851
|
c = n;
|
|
2848
2852
|
}
|
|
2849
2853
|
return {
|
|
2850
2854
|
portlet: {
|
|
2851
|
-
query: JSON.stringify(
|
|
2855
|
+
query: JSON.stringify(i),
|
|
2852
2856
|
chartType: l,
|
|
2853
2857
|
chartConfig: c,
|
|
2854
2858
|
displayConfig: e.displayConfig
|
|
@@ -2872,7 +2876,7 @@ function Fe(e) {
|
|
|
2872
2876
|
title: e.title,
|
|
2873
2877
|
...t.portlet
|
|
2874
2878
|
};
|
|
2875
|
-
return
|
|
2879
|
+
return i.set(n, r), {
|
|
2876
2880
|
result: `Portlet "${e.title}" added to notebook (id: ${n}, chart: ${r.chartType}).` + (t.note ? `\n${t.note}` : "") + " [Reminder: in your next response, start with a brief sentence about what you will do next BEFORE making any tool calls.]",
|
|
2877
2881
|
sideEffect: {
|
|
2878
2882
|
type: "add_portlet",
|
|
@@ -2880,14 +2884,14 @@ function Fe(e) {
|
|
|
2880
2884
|
}
|
|
2881
2885
|
};
|
|
2882
2886
|
}), r.set("update_portlet", async (e) => {
|
|
2883
|
-
let t = e.portletId, n = t ?
|
|
2884
|
-
if (!t || !r || !
|
|
2887
|
+
let t = e.portletId, n = t ? i.get(t) : void 0, r = e.query ?? n?.query, a = e.chartType ?? n?.chartType;
|
|
2888
|
+
if (!t || !r || !a) return {
|
|
2885
2889
|
result: `Cannot update portlet "${t ?? ""}": it was not added in this conversation, so there is nothing to merge your change into. Call update_portlet again with the same portletId plus the full \`query\` and \`chartType\` for the chart you want.`,
|
|
2886
2890
|
isError: !0
|
|
2887
2891
|
};
|
|
2888
2892
|
let o = u({
|
|
2889
2893
|
query: r,
|
|
2890
|
-
chartType:
|
|
2894
|
+
chartType: a,
|
|
2891
2895
|
chartConfig: e.chartConfig ?? n?.chartConfig,
|
|
2892
2896
|
displayConfig: e.displayConfig ?? n?.displayConfig
|
|
2893
2897
|
});
|
|
@@ -2900,7 +2904,7 @@ function Fe(e) {
|
|
|
2900
2904
|
title: s,
|
|
2901
2905
|
...o.portlet
|
|
2902
2906
|
};
|
|
2903
|
-
return
|
|
2907
|
+
return i.set(t, c), {
|
|
2904
2908
|
result: `Portlet "${s}" updated (id: ${t}, chart: ${c.chartType}).` + (o.note ? `\n${o.note}` : "") + " [Reminder: in your next response, start with a brief sentence about what you will do next BEFORE making any tool calls.]",
|
|
2905
2909
|
sideEffect: {
|
|
2906
2910
|
type: "update_portlet",
|
|
@@ -2932,40 +2936,40 @@ function Fe(e) {
|
|
|
2932
2936
|
result: "Dashboard must contain at least one portlet.",
|
|
2933
2937
|
isError: !0
|
|
2934
2938
|
};
|
|
2935
|
-
let
|
|
2939
|
+
let i = [], o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
|
|
2936
2940
|
for (let e of r) {
|
|
2937
2941
|
let r = e.chartType, c = r === "markdown", l = e.query;
|
|
2938
2942
|
if (!l) {
|
|
2939
2943
|
if (c) continue;
|
|
2940
|
-
|
|
2944
|
+
i.push(`Portlet "${e.title}": missing query`);
|
|
2941
2945
|
continue;
|
|
2942
2946
|
}
|
|
2943
2947
|
let u;
|
|
2944
2948
|
try {
|
|
2945
2949
|
u = JSON.parse(l);
|
|
2946
2950
|
} catch {
|
|
2947
|
-
|
|
2951
|
+
i.push(`Portlet "${e.title}": invalid JSON query`);
|
|
2948
2952
|
continue;
|
|
2949
2953
|
}
|
|
2950
|
-
if (u =
|
|
2954
|
+
if (u = a(u), c && !je(u)) continue;
|
|
2951
2955
|
let d = t.validateQuery(u, n);
|
|
2952
2956
|
if (!d.isValid) {
|
|
2953
|
-
|
|
2957
|
+
i.push(`Portlet "${e.title}": ${d.errors.join(", ")}`);
|
|
2954
2958
|
continue;
|
|
2955
2959
|
}
|
|
2956
2960
|
if (c) {
|
|
2957
2961
|
s.set(e, r);
|
|
2958
2962
|
continue;
|
|
2959
2963
|
}
|
|
2960
|
-
let f =
|
|
2964
|
+
let f = Se(r, e.chartConfig, u).chartType, p = Ee(f, e.chartConfig, u), m = xe(f, p, u);
|
|
2961
2965
|
if (!m.isValid) {
|
|
2962
|
-
|
|
2966
|
+
i.push(`Portlet "${e.title}": ${m.errors.join(", ")}`);
|
|
2963
2967
|
continue;
|
|
2964
2968
|
}
|
|
2965
2969
|
o.set(e, p), s.set(e, f);
|
|
2966
2970
|
}
|
|
2967
|
-
if (
|
|
2968
|
-
result: `Dashboard has invalid portlets — fix these errors and retry:\n${
|
|
2971
|
+
if (i.length > 0) return {
|
|
2972
|
+
result: `Dashboard has invalid portlets — fix these errors and retry:\n${i.join("\n")}`,
|
|
2969
2973
|
isError: !0
|
|
2970
2974
|
};
|
|
2971
2975
|
let c = {
|
|
@@ -2985,7 +2989,7 @@ function Fe(e) {
|
|
|
2985
2989
|
chartConfig: o.get(e) ?? e.chartConfig ?? {},
|
|
2986
2990
|
displayConfig: e.displayConfig || {}
|
|
2987
2991
|
} },
|
|
2988
|
-
query: n && !
|
|
2992
|
+
query: n && !je(c) ? {} : c
|
|
2989
2993
|
};
|
|
2990
2994
|
return {
|
|
2991
2995
|
id: e.id,
|
|
@@ -3022,14 +3026,14 @@ function Fe(e) {
|
|
|
3022
3026
|
}
|
|
3023
3027
|
//#endregion
|
|
3024
3028
|
//#region src/server/agent/providers/factory.ts
|
|
3025
|
-
async function
|
|
3029
|
+
async function Fe(e, t, n) {
|
|
3026
3030
|
switch (e) {
|
|
3027
3031
|
case "anthropic": {
|
|
3028
3032
|
let { AnthropicProvider: e } = await import("./anthropic-MQlafOZv.js");
|
|
3029
3033
|
return new e(t);
|
|
3030
3034
|
}
|
|
3031
3035
|
case "openai": {
|
|
3032
|
-
let { OpenAIProvider: e } = await import("./openai-
|
|
3036
|
+
let { OpenAIProvider: e } = await import("./openai-CWnhWp3I.js");
|
|
3033
3037
|
return new e(t, n);
|
|
3034
3038
|
}
|
|
3035
3039
|
case "google": {
|
|
@@ -3041,11 +3045,11 @@ async function Ie(e, t, n) {
|
|
|
3041
3045
|
}
|
|
3042
3046
|
//#endregion
|
|
3043
3047
|
//#region src/server/agent/handler-steps.ts
|
|
3044
|
-
function
|
|
3048
|
+
function Ie(e, t) {
|
|
3045
3049
|
if (Array.isArray(t)) for (let n of t) e.push(n);
|
|
3046
3050
|
else e.push(t);
|
|
3047
3051
|
}
|
|
3048
|
-
function
|
|
3052
|
+
function $(e) {
|
|
3049
3053
|
if (e) try {
|
|
3050
3054
|
e();
|
|
3051
3055
|
} catch {}
|
|
@@ -3083,7 +3087,7 @@ function Le(e, t) {
|
|
|
3083
3087
|
content: typeof e.result == "string" ? e.result : JSON.stringify(e.result ?? ""),
|
|
3084
3088
|
isError: e.status === "error"
|
|
3085
3089
|
}));
|
|
3086
|
-
|
|
3090
|
+
Ie(n, t.formatToolResults(i));
|
|
3087
3091
|
} else e.length > 0 && n.push({
|
|
3088
3092
|
role: "assistant",
|
|
3089
3093
|
content: r.content
|
|
@@ -3091,22 +3095,22 @@ function Le(e, t) {
|
|
|
3091
3095
|
}
|
|
3092
3096
|
return n;
|
|
3093
3097
|
}
|
|
3094
|
-
function
|
|
3098
|
+
function Re(e, t) {
|
|
3095
3099
|
if (e?.type === "tool_use" && t) try {
|
|
3096
3100
|
e.input = JSON.parse(t);
|
|
3097
3101
|
} catch {
|
|
3098
3102
|
e.input = {}, e.inputParseError = !0;
|
|
3099
3103
|
}
|
|
3100
3104
|
}
|
|
3101
|
-
function
|
|
3105
|
+
function ze(e, t) {
|
|
3102
3106
|
let n = e.contentBlocks[e.contentBlocks.length - 1];
|
|
3103
3107
|
n && n.type === "text" ? n.text = (n.text || "") + t : e.contentBlocks.push({
|
|
3104
3108
|
type: "text",
|
|
3105
3109
|
text: t
|
|
3106
3110
|
});
|
|
3107
3111
|
}
|
|
3108
|
-
function
|
|
3109
|
-
e.currentBlockIsToolUse && e.currentToolInputJson &&
|
|
3112
|
+
function Be(e, t) {
|
|
3113
|
+
e.currentBlockIsToolUse && e.currentToolInputJson && Re(e.contentBlocks[e.contentBlocks.length - 1], e.currentToolInputJson), e.contentBlocks.push({
|
|
3110
3114
|
type: "tool_use",
|
|
3111
3115
|
id: t.id,
|
|
3112
3116
|
name: t.name,
|
|
@@ -3114,16 +3118,16 @@ function ze(e, t) {
|
|
|
3114
3118
|
...t.metadata ? { metadata: t.metadata } : {}
|
|
3115
3119
|
}), e.currentToolInputJson = "", e.currentBlockIsToolUse = !0;
|
|
3116
3120
|
}
|
|
3117
|
-
function
|
|
3121
|
+
function Ve(e, t) {
|
|
3118
3122
|
if (t.id && t.input) {
|
|
3119
3123
|
let n = e.contentBlocks.find((e) => e.type === "tool_use" && e.id === t.id);
|
|
3120
3124
|
n && (n.input = t.input, t.parseError && (n.inputParseError = !0));
|
|
3121
3125
|
} else if (e.currentBlockIsToolUse) {
|
|
3122
3126
|
let t = e.contentBlocks[e.contentBlocks.length - 1];
|
|
3123
|
-
t?.type === "tool_use" && e.currentToolInputJson && (
|
|
3127
|
+
t?.type === "tool_use" && e.currentToolInputJson && (Re(t, e.currentToolInputJson), e.currentToolInputJson = ""), e.currentBlockIsToolUse = !1;
|
|
3124
3128
|
}
|
|
3125
3129
|
}
|
|
3126
|
-
async function*
|
|
3130
|
+
async function* He(e, t) {
|
|
3127
3131
|
let n = {
|
|
3128
3132
|
contentBlocks: [],
|
|
3129
3133
|
currentToolInputJson: "",
|
|
@@ -3134,13 +3138,13 @@ async function* Ve(e, t) {
|
|
|
3134
3138
|
let e = r;
|
|
3135
3139
|
switch (e.type) {
|
|
3136
3140
|
case "text_delta":
|
|
3137
|
-
|
|
3141
|
+
ze(n, e.text), yield {
|
|
3138
3142
|
type: "text_delta",
|
|
3139
3143
|
data: e.text
|
|
3140
3144
|
};
|
|
3141
3145
|
break;
|
|
3142
3146
|
case "tool_use_start":
|
|
3143
|
-
|
|
3147
|
+
Be(n, e), yield {
|
|
3144
3148
|
type: "tool_use_start",
|
|
3145
3149
|
data: {
|
|
3146
3150
|
id: e.id,
|
|
@@ -3153,7 +3157,7 @@ async function* Ve(e, t) {
|
|
|
3153
3157
|
n.currentToolInputJson += e.json;
|
|
3154
3158
|
break;
|
|
3155
3159
|
case "tool_use_end":
|
|
3156
|
-
|
|
3160
|
+
Ve(n, e);
|
|
3157
3161
|
break;
|
|
3158
3162
|
case "message_meta": e.inputTokens != null && (n.inputTokens = e.inputTokens), e.outputTokens != null && (n.outputTokens = e.outputTokens), e.stopReason && (n.stopReason = e.stopReason);
|
|
3159
3163
|
}
|
|
@@ -3165,7 +3169,7 @@ async function* Ve(e, t) {
|
|
|
3165
3169
|
outputTokens: n.outputTokens
|
|
3166
3170
|
};
|
|
3167
3171
|
}
|
|
3168
|
-
async function*
|
|
3172
|
+
async function* Ue(e, t) {
|
|
3169
3173
|
let { executor: n, observability: r, traceId: i, turn: a } = t, o = e.name, s = e.input || {}, c = e.id;
|
|
3170
3174
|
if (e.inputParseError) {
|
|
3171
3175
|
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.`;
|
|
@@ -3177,7 +3181,7 @@ async function* He(e, t) {
|
|
|
3177
3181
|
result: e,
|
|
3178
3182
|
isError: !0
|
|
3179
3183
|
}
|
|
3180
|
-
},
|
|
3184
|
+
}, $(() => r?.onToolEnd?.({
|
|
3181
3185
|
traceId: i,
|
|
3182
3186
|
turn: a,
|
|
3183
3187
|
toolName: o,
|
|
@@ -3218,7 +3222,7 @@ async function* He(e, t) {
|
|
|
3218
3222
|
result: e.result,
|
|
3219
3223
|
...e.isError ? { isError: !0 } : {}
|
|
3220
3224
|
}
|
|
3221
|
-
},
|
|
3225
|
+
}, $(() => r?.onToolEnd?.({
|
|
3222
3226
|
traceId: i,
|
|
3223
3227
|
turn: a,
|
|
3224
3228
|
toolName: o,
|
|
@@ -3241,7 +3245,7 @@ async function* He(e, t) {
|
|
|
3241
3245
|
result: t,
|
|
3242
3246
|
isError: !0
|
|
3243
3247
|
}
|
|
3244
|
-
},
|
|
3248
|
+
}, $(() => r?.onToolEnd?.({
|
|
3245
3249
|
traceId: i,
|
|
3246
3250
|
turn: a,
|
|
3247
3251
|
toolName: o,
|
|
@@ -3256,82 +3260,82 @@ async function* He(e, t) {
|
|
|
3256
3260
|
};
|
|
3257
3261
|
}
|
|
3258
3262
|
}
|
|
3259
|
-
async function*
|
|
3263
|
+
async function* We(e, t) {
|
|
3260
3264
|
let n = [];
|
|
3261
3265
|
for (let r of e) {
|
|
3262
3266
|
if (r.type !== "tool_use") continue;
|
|
3263
|
-
let e = yield*
|
|
3267
|
+
let e = yield* Ue(r, t);
|
|
3264
3268
|
n.push(e);
|
|
3265
3269
|
}
|
|
3266
3270
|
return n;
|
|
3267
3271
|
}
|
|
3268
3272
|
//#endregion
|
|
3269
3273
|
//#region src/server/agent/handler.ts
|
|
3270
|
-
var
|
|
3274
|
+
var Ge = {
|
|
3271
3275
|
anthropic: "claude-sonnet-4-6",
|
|
3272
3276
|
openai: "gpt-4.1-mini",
|
|
3273
3277
|
google: "gemini-3-flash-preview"
|
|
3274
3278
|
};
|
|
3275
|
-
async function*
|
|
3276
|
-
let { message:
|
|
3279
|
+
async function* Ke(e) {
|
|
3280
|
+
let { message: n, history: r, semanticLayer: i, securityContext: a, 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 || Ge[f] || "claude-sonnet-4-6", m = e.baseURLOverride || o.baseURL, h = o.maxTurns || 25, g = o.maxTokens || 8192, _;
|
|
3277
3281
|
try {
|
|
3278
|
-
_ = await
|
|
3282
|
+
_ = await Fe(f, s, { baseURL: m });
|
|
3279
3283
|
} catch (e) {
|
|
3280
3284
|
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 {
|
|
3281
3285
|
type: "error",
|
|
3282
|
-
data: { message: e instanceof Error ? e.message :
|
|
3286
|
+
data: { message: e instanceof Error ? e.message : t("server.errors.llmInitFailed") }
|
|
3283
3287
|
};
|
|
3284
3288
|
return;
|
|
3285
3289
|
}
|
|
3286
|
-
let v =
|
|
3287
|
-
semanticLayer:
|
|
3288
|
-
securityContext:
|
|
3289
|
-
}), b =
|
|
3290
|
-
e.systemContext && (b += `\n\n## User Context\n\n${e.systemContext}`),
|
|
3290
|
+
let v = Ne(), y = Pe({
|
|
3291
|
+
semanticLayer: i,
|
|
3292
|
+
securityContext: a
|
|
3293
|
+
}), b = se(i.getMetadata(a));
|
|
3294
|
+
e.systemContext && (b += `\n\n## User Context\n\n${e.systemContext}`), $(() => l?.onChatStart?.({
|
|
3291
3295
|
traceId: u,
|
|
3292
3296
|
sessionId: c,
|
|
3293
|
-
message:
|
|
3297
|
+
message: n,
|
|
3294
3298
|
model: p,
|
|
3295
|
-
historyLength:
|
|
3299
|
+
historyLength: r?.length ?? 0
|
|
3296
3300
|
}));
|
|
3297
|
-
let x = Le(
|
|
3301
|
+
let x = Le(r, _);
|
|
3298
3302
|
x.push({
|
|
3299
3303
|
role: "user",
|
|
3300
|
-
content:
|
|
3304
|
+
content: n
|
|
3301
3305
|
});
|
|
3302
3306
|
let S = 0;
|
|
3303
3307
|
try {
|
|
3304
3308
|
for (let e = 0; e < h; e++) {
|
|
3305
3309
|
S = e + 1;
|
|
3306
|
-
let
|
|
3310
|
+
let n = await _.createStream({
|
|
3307
3311
|
model: p,
|
|
3308
3312
|
maxTokens: g,
|
|
3309
3313
|
system: b,
|
|
3310
3314
|
tools: v,
|
|
3311
3315
|
messages: x
|
|
3312
|
-
}),
|
|
3313
|
-
if (
|
|
3316
|
+
}), r = Date.now(), { contentBlocks: i, stopReason: a, inputTokens: o, outputTokens: s } = yield* He(_, n);
|
|
3317
|
+
if ($(() => l?.onGenerationEnd?.({
|
|
3314
3318
|
traceId: u,
|
|
3315
3319
|
turn: e,
|
|
3316
3320
|
model: p,
|
|
3317
|
-
stopReason:
|
|
3321
|
+
stopReason: a,
|
|
3318
3322
|
inputTokens: o,
|
|
3319
3323
|
outputTokens: s,
|
|
3320
|
-
durationMs: Date.now() -
|
|
3324
|
+
durationMs: Date.now() - r,
|
|
3321
3325
|
input: x,
|
|
3322
|
-
output:
|
|
3326
|
+
output: i
|
|
3323
3327
|
})), x.push({
|
|
3324
3328
|
role: "assistant",
|
|
3325
|
-
content:
|
|
3326
|
-
}), _.isTruncated(
|
|
3329
|
+
content: i
|
|
3330
|
+
}), _.isTruncated(a)) {
|
|
3327
3331
|
yield {
|
|
3328
3332
|
type: "error",
|
|
3329
|
-
data: { message:
|
|
3333
|
+
data: { message: t("server.errors.agentResponseTruncated") }
|
|
3330
3334
|
};
|
|
3331
3335
|
break;
|
|
3332
3336
|
}
|
|
3333
|
-
if (!_.shouldContinue(
|
|
3334
|
-
let c = yield*
|
|
3337
|
+
if (!_.shouldContinue(a)) break;
|
|
3338
|
+
let c = yield* We(i, {
|
|
3335
3339
|
executor: y,
|
|
3336
3340
|
observability: l,
|
|
3337
3341
|
traceId: u,
|
|
@@ -3340,9 +3344,9 @@ async function* Ge(e) {
|
|
|
3340
3344
|
yield {
|
|
3341
3345
|
type: "turn_complete",
|
|
3342
3346
|
data: {}
|
|
3343
|
-
},
|
|
3347
|
+
}, Ie(x, _.formatToolResults(c));
|
|
3344
3348
|
}
|
|
3345
|
-
|
|
3349
|
+
$(() => l?.onChatEnd?.({
|
|
3346
3350
|
traceId: u,
|
|
3347
3351
|
sessionId: c,
|
|
3348
3352
|
totalTurns: S,
|
|
@@ -3371,4 +3375,4 @@ async function* Ge(e) {
|
|
|
3371
3375
|
}
|
|
3372
3376
|
}
|
|
3373
3377
|
//#endregion
|
|
3374
|
-
export { k as C,
|
|
3378
|
+
export { k as C, T as D, E, w as O, A as S, D as T, F as _, K as a, M as b, U as c, V as d, B as f, I as g, L as h, Ke as handleAgentChat, q as i, C as k, ce as l, R as m, ue as n, G as o, z as p, le as r, W as s, de as t, H as u, P as v, O as w, j as x, N as y };
|