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.
Files changed (287) hide show
  1. package/dist/adapters/ActivityGridChart.config-BIHNNXe8.cjs +1 -0
  2. package/dist/adapters/ActivityGridChart.config-D8brFtkU.js +2 -0
  3. package/dist/adapters/AreaChart.config-BjBnqhrD.js +2 -0
  4. package/dist/adapters/AreaChart.config-hCYHwAaC.cjs +1 -0
  5. package/dist/adapters/BarChart.config-JWskLg7a.js +2 -0
  6. package/dist/adapters/BarChart.config-ldUoUV-V.cjs +1 -0
  7. package/dist/adapters/BoxPlotChart.config-DXgi-pWk.js +2 -0
  8. package/dist/adapters/BoxPlotChart.config-t7CU_SEB.cjs +1 -0
  9. package/dist/adapters/BubbleChart.config-BqNbgcs4.js +2 -0
  10. package/dist/adapters/BubbleChart.config-SRbrJWj2.cjs +1 -0
  11. package/dist/adapters/CandlestickChart.config-CTqj07at.cjs +1 -0
  12. package/dist/adapters/CandlestickChart.config-D-KaQpN1.js +2 -0
  13. package/dist/adapters/DataTable.config-4QtzEm2K.js +2 -0
  14. package/dist/adapters/DataTable.config-C4OZyZKL.cjs +1 -0
  15. package/dist/adapters/DotStripChart.config-CrwF5K67.cjs +1 -0
  16. package/dist/adapters/DotStripChart.config-tmdykLsT.js +2 -0
  17. package/dist/adapters/FunnelChart.config-Dk7bb3KU.cjs +1 -0
  18. package/dist/adapters/FunnelChart.config-Uah6h6t6.js +2 -0
  19. package/dist/adapters/GaugeChart.config-BGi82n3v.cjs +1 -0
  20. package/dist/adapters/GaugeChart.config-DIWl6xVG.js +2 -0
  21. package/dist/adapters/HeatMapChart.config-C1Wl6SHf.js +2 -0
  22. package/dist/adapters/HeatMapChart.config-CsA67rfc.cjs +1 -0
  23. package/dist/adapters/KpiDelta.config-CBo61Kp9.cjs +1 -0
  24. package/dist/adapters/KpiDelta.config-CgYK9zIF.js +2 -0
  25. package/dist/adapters/KpiNumber.config-BqQjoY4A.cjs +1 -0
  26. package/dist/adapters/KpiNumber.config-Dt8kOvIA.js +2 -0
  27. package/dist/adapters/KpiText.config-BE8HbXQ0.js +2 -0
  28. package/dist/adapters/KpiText.config-DaSbcfKE.cjs +1 -0
  29. package/dist/adapters/LineChart.config-CUPtbHNz.cjs +1 -0
  30. package/dist/adapters/LineChart.config-DHlctcYT.js +2 -0
  31. package/dist/adapters/MarkdownChart.config-B0T5A7dw.js +2 -0
  32. package/dist/adapters/MarkdownChart.config-iV60Icd3.cjs +1 -0
  33. package/dist/adapters/MeasureProfileChart.config-CBCezRPr.cjs +1 -0
  34. package/dist/adapters/MeasureProfileChart.config-CO9Cc3Ha.js +2 -0
  35. package/dist/adapters/PieChart.config-D6Ofc2h-.js +2 -0
  36. package/dist/adapters/PieChart.config-TOCX24yj.cjs +1 -0
  37. package/dist/adapters/ProportionBarChart.config-BfiCmXI7.js +2 -0
  38. package/dist/adapters/ProportionBarChart.config-Bh8_aieC.cjs +1 -0
  39. package/dist/adapters/RadarChart.config-BfWKUYv4.cjs +1 -0
  40. package/dist/adapters/RadarChart.config-x87UPfQH.js +2 -0
  41. package/dist/adapters/RadialBarChart.config-BGA-fVmo.js +2 -0
  42. package/dist/adapters/RadialBarChart.config-Bo3E1IWc.cjs +1 -0
  43. package/dist/adapters/RecordsTable.config-CKb4xY0c.cjs +1 -0
  44. package/dist/adapters/RecordsTable.config-KsPOo8YB.js +2 -0
  45. package/dist/adapters/RetentionCombinedChart.config-DVDQBMW8.js +2 -0
  46. package/dist/adapters/RetentionCombinedChart.config-DqfOBn6k.cjs +1 -0
  47. package/dist/adapters/RetentionHeatmap.config-B7NVTM5_.cjs +1 -0
  48. package/dist/adapters/RetentionHeatmap.config-tnd7N7g-.js +2 -0
  49. package/dist/adapters/SankeyChart.config-B1K4e0RA.js +2 -0
  50. package/dist/adapters/SankeyChart.config-I26Q_e5f.cjs +1 -0
  51. package/dist/adapters/ScatterChart.config-CMta6GGl.cjs +1 -0
  52. package/dist/adapters/ScatterChart.config-WwER0vgC.js +2 -0
  53. package/dist/adapters/SunburstChart.config-CBYye6Ez.js +2 -0
  54. package/dist/adapters/SunburstChart.config-DbC1AZCI.cjs +1 -0
  55. package/dist/adapters/TreeMapChart.config-EcJf0Dzm.cjs +1 -0
  56. package/dist/adapters/TreeMapChart.config-wNJWipDf.js +2 -0
  57. package/dist/adapters/WaterfallChart.config--d2EuVF-.cjs +1 -0
  58. package/dist/adapters/WaterfallChart.config-CPJLjH4K.js +2 -0
  59. package/dist/adapters/{compiler-SBDjxyQ3.js → compiler-B4tLaYye.js} +10 -10
  60. package/dist/adapters/{compiler-BdVMQ3Xj.cjs → compiler-BYm93X_G.cjs} +5 -5
  61. package/dist/adapters/core/index.cjs +1 -1
  62. package/dist/adapters/core/index.js +1 -1
  63. package/dist/adapters/{core-CSt8MGbw.cjs → core-BQEJzwTJ.cjs} +1 -1
  64. package/dist/adapters/{core-CXrxqh7l.js → core-CVDf8WNs.js} +2 -2
  65. package/dist/adapters/express/index.cjs +1 -1
  66. package/dist/adapters/express/index.js +5 -5
  67. package/dist/adapters/fastify/index.cjs +1 -1
  68. package/dist/adapters/fastify/index.js +5 -5
  69. package/dist/adapters/{handler-Cppe-aqH.js → handler-Ck2X85KS.js} +170 -151
  70. package/dist/adapters/handler-MFn_eVcJ.cjs +16 -0
  71. package/dist/adapters/hono/index.cjs +1 -1
  72. package/dist/adapters/hono/index.js +4 -4
  73. package/dist/adapters/mcp-app-html-V1nZOil3.cjs +1 -0
  74. package/dist/adapters/mcp-app-html-sD7j035f.js +5 -0
  75. package/dist/adapters/mcp-app-html.cjs +1 -0
  76. package/dist/adapters/mcp-app-html.d.ts +25 -0
  77. package/dist/adapters/mcp-app-html.js +2 -0
  78. package/dist/adapters/mcp-tools.cjs +1 -1
  79. package/dist/adapters/mcp-tools.js +21 -20
  80. package/dist/adapters/mcp-transport-BQxL1h2h.cjs +42 -0
  81. package/dist/adapters/mcp-transport-yJDy3T6W.js +758 -0
  82. package/dist/adapters/mcp-transport.d.ts +19 -2
  83. package/dist/adapters/nextjs/index.cjs +1 -1
  84. package/dist/adapters/nextjs/index.js +5 -5
  85. package/dist/adapters/{openai-BIoIunc7.js → openai-B7EVH3cl.js} +2578 -1797
  86. package/dist/adapters/openai-BkD4iuG8.cjs +19 -0
  87. package/dist/adapters/{openai-62sEF0Ev.js → openai-DRFOtBUU.js} +1 -1
  88. package/dist/adapters/{openai-CaxNY6TC.cjs → openai-FjvP4Mek.cjs} +1 -1
  89. package/dist/adapters/{utils-C_RKaP0n.js → utils-BY3FDOmN.js} +8 -1
  90. package/dist/adapters/utils-BkdzL4m9.cjs +132 -0
  91. package/dist/adapters/utils.cjs +1 -1
  92. package/dist/adapters/utils.js +1 -1
  93. package/dist/cjs/adapters/mcp-app-html.d.ts +25 -0
  94. package/dist/cjs/adapters/mcp-transport.d.ts +19 -2
  95. package/dist/cjs/client/charts/chartConfigs.d.ts +34 -0
  96. package/dist/cjs/client/components/AnalysisBuilder/AnalysisChartConfigPanel.d.ts +10 -2
  97. package/dist/cjs/client/components/AnalysisBuilder/TemplateEditor.d.ts +17 -0
  98. package/dist/cjs/client/components/AnalysisBuilder/templateSyntax.d.ts +26 -0
  99. package/dist/cjs/client/components/analyticsPortlet/parsePortletQuery.d.ts +12 -0
  100. package/dist/cjs/client/components/analyticsPortlet/portletRenderState.d.ts +7 -0
  101. package/dist/cjs/client/components/charts/MarkdownChart.d.ts +1 -1
  102. package/dist/cjs/client/components/charts/MarkdownChart.helpers.d.ts +156 -0
  103. package/dist/cjs/client/components/charts/markdownTemplate.d.ts +92 -0
  104. package/dist/client/charts/chartConfigs.d.ts +34 -0
  105. package/dist/client/charts.js +12 -12
  106. package/dist/client/chunks/{DashboardEditModal-DjMGNTUa.js → DashboardEditModal-B8zIH0ja.js} +2529 -2368
  107. package/dist/client/chunks/DashboardEditModal-B8zIH0ja.js.map +1 -0
  108. package/dist/client/chunks/{DotStripChart-EEtJyV1v.js → DotStripChart-BCgHGY0s.js} +4 -4
  109. package/dist/client/chunks/{DotStripChart-EEtJyV1v.js.map → DotStripChart-BCgHGY0s.js.map} +1 -1
  110. package/dist/client/chunks/{ProportionBarChart-3r7ZPX-V.js → ProportionBarChart-DzdKxzr4.js} +3 -3
  111. package/dist/client/chunks/{ProportionBarChart-3r7ZPX-V.js.map → ProportionBarChart-DzdKxzr4.js.map} +1 -1
  112. package/dist/client/chunks/{RecordsTable-DvMXV6F6.js → RecordsTable-kQfZ25Pz.js} +4 -4
  113. package/dist/client/chunks/{RecordsTable-DvMXV6F6.js.map → RecordsTable-kQfZ25Pz.js.map} +1 -1
  114. package/dist/client/chunks/{RetentionCombinedChart-DbxB86fj.js → RetentionCombinedChart-CvddCEOk.js} +3 -3
  115. package/dist/client/chunks/{RetentionCombinedChart-DbxB86fj.js.map → RetentionCombinedChart-CvddCEOk.js.map} +1 -1
  116. package/dist/client/chunks/{RetentionHeatmap-CE3rxhAU.js → RetentionHeatmap-BURt-mfm.js} +2 -2
  117. package/dist/client/chunks/{RetentionHeatmap-CE3rxhAU.js.map → RetentionHeatmap-BURt-mfm.js.map} +1 -1
  118. package/dist/client/chunks/{analysis-builder-lQk_qJBQ.js → analysis-builder-C0hzThmQ.js} +1688 -1675
  119. package/dist/client/chunks/{analysis-builder-lQk_qJBQ.js.map → analysis-builder-C0hzThmQ.js.map} +1 -1
  120. package/dist/client/chunks/{analysis-builder-shared-C_pLSXJR.js → analysis-builder-shared-CQFcY6vA.js} +476 -476
  121. package/dist/client/chunks/{analysis-builder-shared-C_pLSXJR.js.map → analysis-builder-shared-CQFcY6vA.js.map} +1 -1
  122. package/dist/client/chunks/{chart-activity-grid-UZIp9_2E.js → chart-activity-grid-aIyjUpbJ.js} +9 -2
  123. package/dist/client/chunks/chart-activity-grid-aIyjUpbJ.js.map +1 -0
  124. package/dist/client/chunks/{chart-area-CEBcvCcn.js → chart-area-DCCvp06H.js} +3 -3
  125. package/dist/client/chunks/{chart-area-CEBcvCcn.js.map → chart-area-DCCvp06H.js.map} +1 -1
  126. package/dist/client/chunks/{chart-bar-DGh7cpU-.js → chart-bar-C8xQ15Aa.js} +3 -3
  127. package/dist/client/chunks/{chart-bar-DGh7cpU-.js.map → chart-bar-C8xQ15Aa.js.map} +1 -1
  128. package/dist/client/chunks/{chart-box-plot-CeqoKPFa.js → chart-box-plot-DFMjBoL1.js} +2 -2
  129. package/dist/client/chunks/{chart-box-plot-CeqoKPFa.js.map → chart-box-plot-DFMjBoL1.js.map} +1 -1
  130. package/dist/client/chunks/{chart-bubble-8uH_JKNt.js → chart-bubble-CavhSOT8.js} +2 -2
  131. package/dist/client/chunks/{chart-bubble-8uH_JKNt.js.map → chart-bubble-CavhSOT8.js.map} +1 -1
  132. package/dist/client/chunks/{chart-candlestick-DogklMg1.js → chart-candlestick-BlJ6l-0-.js} +2 -2
  133. package/dist/client/chunks/{chart-candlestick-DogklMg1.js.map → chart-candlestick-BlJ6l-0-.js.map} +1 -1
  134. package/dist/client/chunks/{chart-config-markdown-C5kBQOjP.js → chart-config-markdown-CK8PAWUg.js} +8 -3
  135. package/dist/client/chunks/chart-config-markdown-CK8PAWUg.js.map +1 -0
  136. package/dist/client/chunks/{chart-data-table-CCvvgeG_.js → chart-data-table-Dfup1JpL.js} +426 -423
  137. package/dist/client/chunks/chart-data-table-Dfup1JpL.js.map +1 -0
  138. package/dist/client/chunks/{chart-funnel-D2vGQhaz.js → chart-funnel-DqBD-oth.js} +2 -2
  139. package/dist/client/chunks/{chart-funnel-D2vGQhaz.js.map → chart-funnel-DqBD-oth.js.map} +1 -1
  140. package/dist/client/chunks/{chart-gauge-DbU0rxqv.js → chart-gauge-Tr9BRoTo.js} +3 -3
  141. package/dist/client/chunks/{chart-gauge-DbU0rxqv.js.map → chart-gauge-Tr9BRoTo.js.map} +1 -1
  142. package/dist/client/chunks/{chart-heat-map-x6aQq91x.js → chart-heat-map-V200X1EP.js} +3 -3
  143. package/dist/client/chunks/{chart-heat-map-x6aQq91x.js.map → chart-heat-map-V200X1EP.js.map} +1 -1
  144. package/dist/client/chunks/{chart-kpi-delta-B2-m16QC.js → chart-kpi-delta-DuXkAxKV.js} +3 -3
  145. package/dist/client/chunks/{chart-kpi-delta-B2-m16QC.js.map → chart-kpi-delta-DuXkAxKV.js.map} +1 -1
  146. package/dist/client/chunks/{chart-kpi-number-DggvlYT_.js → chart-kpi-number-CzRaT5KF.js} +5 -5
  147. package/dist/client/chunks/{chart-kpi-number-DggvlYT_.js.map → chart-kpi-number-CzRaT5KF.js.map} +1 -1
  148. package/dist/client/chunks/{chart-kpi-text-BFy-m1NP.js → chart-kpi-text-DxMl_C7M.js} +3 -3
  149. package/dist/client/chunks/{chart-kpi-text-BFy-m1NP.js.map → chart-kpi-text-DxMl_C7M.js.map} +1 -1
  150. package/dist/client/chunks/{chart-line-C4r44HWi.js → chart-line-rl9q-vom.js} +3 -3
  151. package/dist/client/chunks/{chart-line-C4r44HWi.js.map → chart-line-rl9q-vom.js.map} +1 -1
  152. package/dist/client/chunks/chart-markdown-DJq7fXKF.js +8622 -0
  153. package/dist/client/chunks/chart-markdown-DJq7fXKF.js.map +1 -0
  154. package/dist/client/chunks/{chart-measure-profile-Dc-d82kF.js → chart-measure-profile-BDpkr55p.js} +3 -3
  155. package/dist/client/chunks/{chart-measure-profile-Dc-d82kF.js.map → chart-measure-profile-BDpkr55p.js.map} +1 -1
  156. package/dist/client/chunks/{chart-pie-BHrPxga2.js → chart-pie-W4Mk0WFB.js} +3 -3
  157. package/dist/client/chunks/{chart-pie-BHrPxga2.js.map → chart-pie-W4Mk0WFB.js.map} +1 -1
  158. package/dist/client/chunks/{chart-radar-I9sOFbG5.js → chart-radar-BXkMOUVC.js} +3 -3
  159. package/dist/client/chunks/{chart-radar-I9sOFbG5.js.map → chart-radar-BXkMOUVC.js.map} +1 -1
  160. package/dist/client/chunks/{chart-radial-bar-DeDMMf9P.js → chart-radial-bar-CSw1hCK2.js} +3 -3
  161. package/dist/client/chunks/{chart-radial-bar-DeDMMf9P.js.map → chart-radial-bar-CSw1hCK2.js.map} +1 -1
  162. package/dist/client/chunks/{chart-sankey-1qB7yWHq.js → chart-sankey-CXG8SeW3.js} +2 -2
  163. package/dist/client/chunks/{chart-sankey-1qB7yWHq.js.map → chart-sankey-CXG8SeW3.js.map} +1 -1
  164. package/dist/client/chunks/{chart-scatter-BHttSxcc.js → chart-scatter-BHp1yLvR.js} +3 -3
  165. package/dist/client/chunks/{chart-scatter-BHttSxcc.js.map → chart-scatter-BHp1yLvR.js.map} +1 -1
  166. package/dist/client/chunks/{chart-sunburst-Cmzol8kR.js → chart-sunburst-CHgQCRCz.js} +3 -3
  167. package/dist/client/chunks/{chart-sunburst-Cmzol8kR.js.map → chart-sunburst-CHgQCRCz.js.map} +1 -1
  168. package/dist/client/chunks/{chart-tree-map-CdSwr_zI.js → chart-tree-map-YBAOj00L.js} +3 -3
  169. package/dist/client/chunks/{chart-tree-map-CdSwr_zI.js.map → chart-tree-map-YBAOj00L.js.map} +1 -1
  170. package/dist/client/chunks/{chart-waterfall-BN3B5luW.js → chart-waterfall-CSQ3xvUJ.js} +3 -3
  171. package/dist/client/chunks/{chart-waterfall-BN3B5luW.js.map → chart-waterfall-CSQ3xvUJ.js.map} +1 -1
  172. package/dist/client/chunks/{charts-core-DIneMirc.js → charts-core-ghjDtt0_.js} +2 -2
  173. package/dist/client/chunks/{charts-core-DIneMirc.js.map → charts-core-ghjDtt0_.js.map} +1 -1
  174. package/dist/client/chunks/charts-loader-B_ye_C5_.js +87 -0
  175. package/dist/client/chunks/{charts-loader-OHpTBq8c.js.map → charts-loader-B_ye_C5_.js.map} +1 -1
  176. package/dist/client/chunks/{dist-BPmPx7kz.js → dist-COqN0-Yj.js} +4 -4
  177. package/dist/client/chunks/{dist-BPmPx7kz.js.map → dist-COqN0-Yj.js.map} +1 -1
  178. package/dist/client/chunks/{exceljs.min-CiByP8VQ.js → exceljs.min-CdNVdwM3.js} +8 -11
  179. package/dist/client/chunks/{exceljs.min-CiByP8VQ.js.map → exceljs.min-CdNVdwM3.js.map} +1 -1
  180. package/dist/client/chunks/{nl-NL-dk-kC0sL.js → nl-NL-CKdVNqSp.js} +8 -1
  181. package/dist/client/chunks/nl-NL-CKdVNqSp.js.map +1 -0
  182. package/dist/client/chunks/{schema-visualization-PYa578pV.js → schema-visualization-txYCG4v5.js} +4 -4
  183. package/dist/client/chunks/{schema-visualization-PYa578pV.js.map → schema-visualization-txYCG4v5.js.map} +1 -1
  184. package/dist/client/chunks/{useDirtyStateTracking-BQupC3wJ.js → useDirtyStateTracking-BUk23Wbh.js} +6 -6
  185. package/dist/client/chunks/{useDirtyStateTracking-BQupC3wJ.js.map → useDirtyStateTracking-BUk23Wbh.js.map} +1 -1
  186. package/dist/client/chunks/{useExplainAI-DORnTynt.js → useExplainAI-CGLroDBD.js} +5 -5
  187. package/dist/client/chunks/{useExplainAI-DORnTynt.js.map → useExplainAI-CGLroDBD.js.map} +1 -1
  188. package/dist/client/chunks/{vendor-DDo8nSGP.js → vendor-CApRxi77.js} +5 -6
  189. package/dist/client/chunks/{vendor-DDo8nSGP.js.map → vendor-CApRxi77.js.map} +1 -1
  190. package/dist/client/components/AnalysisBuilder/AnalysisChartConfigPanel.d.ts +10 -2
  191. package/dist/client/components/AnalysisBuilder/TemplateEditor.d.ts +17 -0
  192. package/dist/client/components/AnalysisBuilder/templateSyntax.d.ts +26 -0
  193. package/dist/client/components/analyticsPortlet/parsePortletQuery.d.ts +12 -0
  194. package/dist/client/components/analyticsPortlet/portletRenderState.d.ts +7 -0
  195. package/dist/client/components/charts/MarkdownChart.d.ts +1 -1
  196. package/dist/client/components/charts/MarkdownChart.helpers.d.ts +156 -0
  197. package/dist/client/components/charts/markdownTemplate.d.ts +92 -0
  198. package/dist/client/components.js +2 -2
  199. package/dist/client/hooks.js +3 -3
  200. package/dist/client/icons.js +1 -1
  201. package/dist/client/index.js +409 -409
  202. package/dist/client/index.js.map +1 -1
  203. package/dist/client/providers.js +1 -1
  204. package/dist/client/schema.js +1 -1
  205. package/dist/client/styles.css +1 -1
  206. package/dist/client/utils.js +4 -4
  207. package/dist/client-bundle-stats.html +1 -1
  208. package/dist/mcp-app/mcp-app.html +190 -132
  209. package/dist/server/index.cjs +17 -23
  210. package/dist/server/index.js +176 -147
  211. package/dist/server/openai-BWGYfr6Z.cjs +19 -0
  212. package/dist/server/{openai-nBhuSFd3.js → openai-Cap1nBuK.js} +1 -1
  213. package/dist/server/{openai-C1gLuR-0.js → openai-DW5TRMXE.js} +2577 -1796
  214. package/dist/server/{openai-rF50ZEiR.cjs → openai-G2EivP-n.cjs} +1 -1
  215. package/package.json +14 -3
  216. package/dist/adapters/ActivityGridChart.config-DfyZh3He.js +0 -2
  217. package/dist/adapters/ActivityGridChart.config-DgOwl51m.cjs +0 -1
  218. package/dist/adapters/AreaChart.config-BL_ZpMsg.js +0 -2
  219. package/dist/adapters/AreaChart.config-rc1phjmI.cjs +0 -1
  220. package/dist/adapters/BarChart.config-C6k4BxhM.cjs +0 -1
  221. package/dist/adapters/BarChart.config-CBACR7Z-.js +0 -2
  222. package/dist/adapters/BoxPlotChart.config-Bvg6yFn2.js +0 -2
  223. package/dist/adapters/BoxPlotChart.config-CAlLRM0v.cjs +0 -1
  224. package/dist/adapters/BubbleChart.config-22qXNskY.js +0 -2
  225. package/dist/adapters/BubbleChart.config-BkB3P6Bi.cjs +0 -1
  226. package/dist/adapters/CandlestickChart.config-DuZb-y6d.cjs +0 -1
  227. package/dist/adapters/CandlestickChart.config-G78UbuwS.js +0 -2
  228. package/dist/adapters/DataTable.config-BXkpzOC2.js +0 -2
  229. package/dist/adapters/DataTable.config-CwPlSht6.cjs +0 -1
  230. package/dist/adapters/DotStripChart.config-Bw9Ww5zY.cjs +0 -1
  231. package/dist/adapters/DotStripChart.config-D5sbLAqA.js +0 -2
  232. package/dist/adapters/FunnelChart.config-CUs1rqN2.cjs +0 -1
  233. package/dist/adapters/FunnelChart.config-Cw9qrC2C.js +0 -2
  234. package/dist/adapters/GaugeChart.config-CjGtJVoO.cjs +0 -1
  235. package/dist/adapters/GaugeChart.config-F5SA5Oi3.js +0 -2
  236. package/dist/adapters/HeatMapChart.config-CvgmSiuY.cjs +0 -1
  237. package/dist/adapters/HeatMapChart.config-DrvQrPHT.js +0 -2
  238. package/dist/adapters/KpiDelta.config-B-UJWdJ5.cjs +0 -1
  239. package/dist/adapters/KpiDelta.config-C00mTZYy.js +0 -2
  240. package/dist/adapters/KpiNumber.config-CB0kTeoV.cjs +0 -1
  241. package/dist/adapters/KpiNumber.config-D3CogH8j.js +0 -2
  242. package/dist/adapters/KpiText.config-B0LbKRCf.js +0 -2
  243. package/dist/adapters/KpiText.config-Dv4TNprC.cjs +0 -1
  244. package/dist/adapters/LineChart.config-CdONxSLL.js +0 -2
  245. package/dist/adapters/LineChart.config-DBHsfIYG.cjs +0 -1
  246. package/dist/adapters/MarkdownChart.config-AYKXdpuw.cjs +0 -1
  247. package/dist/adapters/MarkdownChart.config-CngxD_Lc.js +0 -2
  248. package/dist/adapters/MeasureProfileChart.config-B0a5sUk6.cjs +0 -1
  249. package/dist/adapters/MeasureProfileChart.config-ByW5F1Ey.js +0 -2
  250. package/dist/adapters/PieChart.config-Csx1ctk4.js +0 -2
  251. package/dist/adapters/PieChart.config-Dfw66Xab.cjs +0 -1
  252. package/dist/adapters/ProportionBarChart.config-BaeYznc1.cjs +0 -1
  253. package/dist/adapters/ProportionBarChart.config-DCOizSVs.js +0 -2
  254. package/dist/adapters/RadarChart.config-AxQh97rB.js +0 -2
  255. package/dist/adapters/RadarChart.config-BjP-zEGW.cjs +0 -1
  256. package/dist/adapters/RadialBarChart.config-D5EwyJ0G.cjs +0 -1
  257. package/dist/adapters/RadialBarChart.config-DMaEJYM_.js +0 -2
  258. package/dist/adapters/RecordsTable.config-BdN0kZ8b.js +0 -2
  259. package/dist/adapters/RecordsTable.config-CWRvGDbi.cjs +0 -1
  260. package/dist/adapters/RetentionCombinedChart.config-BpciOTeX.cjs +0 -1
  261. package/dist/adapters/RetentionCombinedChart.config-CY8TDzuy.js +0 -2
  262. package/dist/adapters/RetentionHeatmap.config-BZPRoVpF.cjs +0 -1
  263. package/dist/adapters/RetentionHeatmap.config-YMZt-u-T.js +0 -2
  264. package/dist/adapters/SankeyChart.config-BdSA-Jlp.cjs +0 -1
  265. package/dist/adapters/SankeyChart.config-Dlgi5_DA.js +0 -2
  266. package/dist/adapters/ScatterChart.config-VJ0xG0Ak.cjs +0 -1
  267. package/dist/adapters/ScatterChart.config-oOd1Jplx.js +0 -2
  268. package/dist/adapters/SunburstChart.config-Cllhyjy4.js +0 -2
  269. package/dist/adapters/SunburstChart.config-DU11BAei.cjs +0 -1
  270. package/dist/adapters/TreeMapChart.config--EB8bQTo.js +0 -2
  271. package/dist/adapters/TreeMapChart.config-BPmMLBH1.cjs +0 -1
  272. package/dist/adapters/WaterfallChart.config-E99Fl6uM.cjs +0 -1
  273. package/dist/adapters/WaterfallChart.config-xz3DaoMQ.js +0 -2
  274. package/dist/adapters/handler-_u5krbOj.cjs +0 -26
  275. package/dist/adapters/mcp-transport-CpF7usmR.js +0 -754
  276. package/dist/adapters/mcp-transport-DXIfb0p-.cjs +0 -42
  277. package/dist/adapters/openai-EBTQKJnV.cjs +0 -19
  278. package/dist/adapters/utils-DXWQUJbD.cjs +0 -128
  279. package/dist/client/chunks/DashboardEditModal-DjMGNTUa.js.map +0 -1
  280. package/dist/client/chunks/chart-activity-grid-UZIp9_2E.js.map +0 -1
  281. package/dist/client/chunks/chart-config-markdown-C5kBQOjP.js.map +0 -1
  282. package/dist/client/chunks/chart-data-table-CCvvgeG_.js.map +0 -1
  283. package/dist/client/chunks/chart-markdown-b0qPZ617.js +0 -3926
  284. package/dist/client/chunks/chart-markdown-b0qPZ617.js.map +0 -1
  285. package/dist/client/chunks/charts-loader-OHpTBq8c.js +0 -87
  286. package/dist/client/chunks/nl-NL-dk-kC0sL.js.map +0 -1
  287. 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-C_RKaP0n.js";
2
- import { D as c, E as l, O as u, T as d } from "./mcp-transport-CpF7usmR.js";
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 (!(!t.measures || t.measures.length === 0)) {
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 (!(!t.dimensions || t.dimensions.length === 0)) {
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 (!(!t.relationships || t.relationships.length === 0)) {
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
- placeholder: "# Welcome\n\nAdd your **markdown** content here:\n\n- Lists with bullets\n- [Links](https://example.com)\n- *Italic* and **bold** text\n\n---\n\nUse --- for horizontal rules.",
1056
- description: "chart.configText.enter_markdown_text_supports_headers_bold_text_italic_text_links_text_ur"
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
- }, q = {
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
- }, ce = {
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
- }, le = {
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
- }, ue = {
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
- }, de = {
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
- }, J = {
1905
+ }, q = {
1901
1906
  packageName: "recharts",
1902
1907
  installCommand: "npm install recharts"
1903
- }, fe = {
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: J,
1911
- config: async () => (await import("./BarChart.config-CBACR7Z-.js")).barChartConfig
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: J,
1920
- config: async () => (await import("./LineChart.config-CdONxSLL.js")).lineChartConfig
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: J,
1929
- config: async () => (await import("./AreaChart.config-BL_ZpMsg.js")).areaChartConfig
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: J,
1938
- config: async () => (await import("./PieChart.config-Csx1ctk4.js")).pieChartConfig
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: J,
1953
- config: async () => (await import("./ScatterChart.config-oOd1Jplx.js")).scatterChartConfig
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: J,
1968
- config: async () => (await import("./BubbleChart.config-22qXNskY.js")).bubbleChartConfig
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: J,
1977
- config: async () => (await import("./RadarChart.config-AxQh97rB.js")).radarChartConfig
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: J,
1986
- config: async () => (await import("./RadialBarChart.config-DMaEJYM_.js")).radialBarChartConfig
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: J,
1995
- config: async () => (await import("./TreeMapChart.config--EB8bQTo.js")).treemapChartConfig
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-BXkpzOC2.js")).dataTableConfig
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-BdN0kZ8b.js")).recordsTableConfig
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-DfyZh3He.js")).activityGridChartConfig
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-D3CogH8j.js")).kpiNumberConfig
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-C00mTZYy.js")).kpiDeltaConfig
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-B0LbKRCf.js")).kpiTextConfig
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-CngxD_Lc.js")).markdownConfig
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: J,
2062
- config: async () => (await import("./FunnelChart.config-Cw9qrC2C.js")).funnelChartConfig
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: J,
2070
- config: async () => (await import("./SankeyChart.config-Dlgi5_DA.js")).sankeyChartConfig
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: J,
2078
- config: async () => (await import("./SunburstChart.config-Cllhyjy4.js")).sunburstChartConfig
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-DrvQrPHT.js")).heatmapChartConfig
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-YMZt-u-T.js")).retentionHeatmapConfig
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-CY8TDzuy.js")).retentionCombinedConfig
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-Bvg6yFn2.js")).boxPlotChartConfig
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-D5sbLAqA.js")).dotStripChartConfig
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: J,
2135
- config: async () => (await import("./WaterfallChart.config-xz3DaoMQ.js")).waterfallChartConfig
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-G78UbuwS.js")).candlestickChartConfig
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: J,
2161
- config: async () => (await import("./MeasureProfileChart.config-ByW5F1Ey.js")).measureProfileChartConfig
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-DCOizSVs.js")).proportionBarChartConfig
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-F5SA5Oi3.js")).gaugeChartConfig
2186
+ config: async () => (await import("./GaugeChart.config-DIWl6xVG.js")).gaugeChartConfig
2182
2187
  }
2183
2188
  };
2184
- function pe(e, t) {
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 me = {
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: q,
2221
- candlestick: ce,
2222
- measureProfile: le,
2223
- proportionBar: ue,
2224
- gauge: de
2225
- }, Y = Object.fromEntries(Object.keys(fe).map((e) => [e, pe(fe[e], me[e])]));
2226
- function he(e) {
2227
- return Y[e]?.recordGrain === !0;
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 X(e) {
2236
+ function Y(e) {
2232
2237
  return Array.isArray(e) ? e.length > 0 : !!e;
2233
2238
  }
2234
- function ge(e, t, n, r) {
2239
+ function _e(e, t, n, r) {
2235
2240
  for (let i of e.dropZones) {
2236
- if (!i.mandatory || X(n?.[i.key])) continue;
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 _e(e, t, n) {
2247
- if (X(e?.xAxis)) return;
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 ve(e) {
2256
+ function ye(e) {
2252
2257
  return Array.isArray(e) ? e : [e];
2253
2258
  }
2254
- function ye(e, t) {
2259
+ function be(e, t) {
2255
2260
  if (!e?.xAxis || !e?.series) return;
2256
- let n = new Set(ve(e.xAxis)), r = ve(e.series).filter((e) => n.has(e));
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
- let r = Y[e];
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 ge(r, e, t, i), be(e, n, i), e === "bar" && _e(t, n, i), ye(t, i), {
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 Se(e, t, n) {
2275
- if (e !== "bar" || X(t?.xAxis)) return { chartType: e };
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 Ce(e, t, n, r) {
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 we(e, t) {
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 Te(e, t, n) {
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 = we(t, e.key), o = i.filter((e) => !a.has(e));
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 Ee(e, t, n) {
2312
- let r = Y[e];
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 || X(i[e.key]) || (e.key === "sizeField" || e.key === "colorField" ? Ce(e, r, i, o.measures) : Te(e, i, o));
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 De(t) {
2327
+ function Oe(t) {
2323
2328
  return t ? e(t) ? a(t) : t : "";
2324
2329
  }
2325
- function Oe(e) {
2330
+ function ke(e) {
2326
2331
  let t = ["\nChart config requirements by type:"];
2327
2332
  for (let n of e) {
2328
- let e = Y[n];
2333
+ let e = J[n];
2329
2334
  if (!e) continue;
2330
- 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);
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} No query needed.`);
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 ke(e, t, n, r) {
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 Ae(e, t) {
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(ke(e, i, t, o?.type));
2381
- for (let t of Object.keys(e[0])) r.has(t) || n.push(ke(e, t, "dimension", void 0));
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 Z = /* @__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(".");
2387
- function je() {
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" + Oe(Z) + "\nThe query is validated before adding. The portlet fetches its own data.",
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: Z,
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: Z,
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: Z,
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. Omit or leave empty for markdown portlets."
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 Me(e) {
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: Ae(s, a.annotation),
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 = Se(r, e.chartConfig, a);
2843
+ let t = Ce(r, e.chartConfig, a);
2828
2844
  l = t.chartType, u = t.note;
2829
- let n = Ee(l, e.chartConfig, a), i = xe(l, n, a);
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 (r === "markdown") continue;
2923
- let c = e.query;
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 l;
2943
+ let u;
2929
2944
  try {
2930
- l = JSON.parse(c);
2945
+ u = JSON.parse(l);
2931
2946
  } catch {
2932
2947
  a.push(`Portlet "${e.title}": invalid JSON query`);
2933
2948
  continue;
2934
2949
  }
2935
- l = i(l);
2936
- let u = t.validateQuery(l, n);
2937
- if (!u.isValid) {
2938
- a.push(`Portlet "${e.title}": ${u.errors.join(", ")}`);
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
- let d = Se(r, e.chartConfig, l).chartType, f = Ee(d, e.chartConfig, l), p = xe(d, f, l);
2942
- if (!p.isValid) {
2943
- a.push(`Portlet "${e.title}": ${p.errors.join(", ")}`);
2956
+ if (c) {
2957
+ s.set(e, r);
2944
2958
  continue;
2945
2959
  }
2946
- o.set(e, f), s.set(e, d);
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 Ne(e, t, n) {
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-62sEF0Ev.js");
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 Pe(e, t) {
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 Fe(e, t) {
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
- Pe(n, t.formatToolResults(i));
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 (!(e?.type !== "tool_use" || !t)) try {
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 Ie(e, t) {
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 Le(e, t) {
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 Re(e, t) {
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* ze(e, t) {
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
- Ie(n, e.text), yield {
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
- Le(n, e), yield {
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
- Re(n, e);
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* Be(e, t) {
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* Ve(e, t) {
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* Be(r, t);
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 He = {
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* Ue(e) {
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 || He[f] || "claude-sonnet-4-6", m = e.baseURLOverride || o.baseURL, h = o.maxTurns || 25, g = o.maxTokens || 8192, _;
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 Ne(f, s, { baseURL: m });
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 = je(), y = Me({
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 = Fe(n, _);
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* ze(_, t);
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* Ve(r, {
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
- }, Pe(x, _.formatToolResults(c));
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 _, q as a, M as b, W as c, V as d, B as f, I as g, L as h, Ue as handleAgentChat, ce as i, w as k, U as l, R as m, ue as n, K as o, z as p, le as r, G as s, de as t, H as u, P as v, O as w, j as x, N as y };
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 };