drizzle-cube 0.7.1 → 0.8.1

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 (363) hide show
  1. package/dist/adapters/ActivityGridChart.config-DXUUgx0N.cjs +1 -0
  2. package/dist/adapters/ActivityGridChart.config-Dyozu3VW.js +2 -0
  3. package/dist/adapters/AreaChart.config-Di5odBXp.cjs +1 -0
  4. package/dist/adapters/AreaChart.config-KEaXP_4K.js +2 -0
  5. package/dist/adapters/BarChart.config-B-hBHykR.cjs +1 -0
  6. package/dist/adapters/BarChart.config-C5sqbn0A.js +2 -0
  7. package/dist/adapters/BoxPlotChart.config-B1R4Br7L.js +2 -0
  8. package/dist/adapters/BoxPlotChart.config-C82Fhd3c.cjs +1 -0
  9. package/dist/adapters/BubbleChart.config-CoBxmmfp.js +2 -0
  10. package/dist/adapters/BubbleChart.config-DfOnNjL-.cjs +1 -0
  11. package/dist/adapters/CandlestickChart.config-C5ggV_3j.cjs +1 -0
  12. package/dist/adapters/CandlestickChart.config-ZaJpWVuL.js +2 -0
  13. package/dist/adapters/DataTable.config-Cx2_ACdY.cjs +1 -0
  14. package/dist/adapters/DataTable.config-DkAgD-iz.js +2 -0
  15. package/dist/adapters/FunnelChart.config-CvzcECUB.js +2 -0
  16. package/dist/adapters/FunnelChart.config-DVH7IFnb.cjs +1 -0
  17. package/dist/adapters/GaugeChart.config-Csx8rt8o.cjs +1 -0
  18. package/dist/adapters/GaugeChart.config-DEmrNgMa.js +2 -0
  19. package/dist/adapters/HeatMapChart.config-BfD_dpP7.js +2 -0
  20. package/dist/adapters/HeatMapChart.config-D_jlyPJL.cjs +1 -0
  21. package/dist/adapters/KpiDelta.config-CVBdUL_n.cjs +1 -0
  22. package/dist/adapters/KpiDelta.config-D4dCXOxl.js +2 -0
  23. package/dist/adapters/KpiNumber.config-BK5pgIKz.cjs +1 -0
  24. package/dist/adapters/KpiNumber.config-D6XqjZrm.js +2 -0
  25. package/dist/adapters/KpiText.config-ChphMwG5.js +2 -0
  26. package/dist/adapters/KpiText.config-fO1wc6FH.cjs +1 -0
  27. package/dist/adapters/LineChart.config-CXJrgz1s.js +2 -0
  28. package/dist/adapters/LineChart.config-Cg_h-SiJ.cjs +1 -0
  29. package/dist/adapters/MarkdownChart.config-ByPjX-4O.cjs +1 -0
  30. package/dist/adapters/MarkdownChart.config-Df2yY9AT.js +2 -0
  31. package/dist/adapters/MeasureProfileChart.config-BBWGIteF.cjs +1 -0
  32. package/dist/adapters/MeasureProfileChart.config-C9OFbN9Z.js +2 -0
  33. package/dist/adapters/PieChart.config-C6jJj6xm.js +2 -0
  34. package/dist/adapters/PieChart.config-CmCw_8eN.cjs +1 -0
  35. package/dist/adapters/ProportionBarChart.config-B9NEyFEe.js +2 -0
  36. package/dist/adapters/ProportionBarChart.config-C3GAVPWn.cjs +1 -0
  37. package/dist/adapters/RadarChart.config-5AMwEqUJ.cjs +1 -0
  38. package/dist/adapters/RadarChart.config-Ct_b7IM5.js +2 -0
  39. package/dist/adapters/RadialBarChart.config-Bp-Sl0cm.js +2 -0
  40. package/dist/adapters/RadialBarChart.config-D14yoexI.cjs +1 -0
  41. package/dist/adapters/RecordsTable.config-D2-qmG06.cjs +1 -0
  42. package/dist/adapters/RecordsTable.config-DIwoqZCU.js +2 -0
  43. package/dist/adapters/RetentionCombinedChart.config-BWHipi5M.cjs +1 -0
  44. package/dist/adapters/RetentionCombinedChart.config-D40UgTcl.js +2 -0
  45. package/dist/adapters/RetentionHeatmap.config-GlnSLrjn.js +2 -0
  46. package/dist/adapters/RetentionHeatmap.config-MlhZf26c.cjs +1 -0
  47. package/dist/adapters/SankeyChart.config-Bf1_NHiv.js +2 -0
  48. package/dist/adapters/SankeyChart.config-BoYf6BFE.cjs +1 -0
  49. package/dist/adapters/ScatterChart.config-CV2rdGJp.js +2 -0
  50. package/dist/adapters/ScatterChart.config-DywduGF3.cjs +1 -0
  51. package/dist/adapters/SunburstChart.config-CrqiE1UZ.js +2 -0
  52. package/dist/adapters/SunburstChart.config-D5tbF_GJ.cjs +1 -0
  53. package/dist/adapters/TreeMapChart.config-BJ8HnZU0.cjs +1 -0
  54. package/dist/adapters/TreeMapChart.config-DxgIqIIj.js +2 -0
  55. package/dist/adapters/WaterfallChart.config-Cns8fLFu.js +2 -0
  56. package/dist/adapters/WaterfallChart.config-D_kdL9SN.cjs +1 -0
  57. package/dist/adapters/compiler-BxZHh0UD.cjs +166 -0
  58. package/dist/adapters/{compiler-DiYxWAKg.js → compiler-CBGD_4Et.js} +1389 -1923
  59. package/dist/adapters/core/http-port.d.ts +34 -7
  60. package/dist/adapters/core/index.cjs +1 -1
  61. package/dist/adapters/core/index.d.ts +1 -0
  62. package/dist/adapters/core/index.js +2 -2
  63. package/dist/adapters/core/rest-handlers.d.ts +1 -1
  64. package/dist/adapters/core-CIGuwGuI.cjs +1 -0
  65. package/dist/adapters/{core-BOPRmxPc.js → core-DAAnqPyN.js} +81 -65
  66. package/dist/adapters/express/index.cjs +2 -2
  67. package/dist/adapters/express/index.d.ts +11 -2
  68. package/dist/adapters/express/index.js +14 -14
  69. package/dist/adapters/fastify/index.cjs +2 -2
  70. package/dist/adapters/fastify/index.d.ts +11 -2
  71. package/dist/adapters/fastify/index.js +29 -29
  72. package/dist/{server/google-eKAc20al.js → adapters/google-DRY7jnOh.js} +46 -28
  73. package/dist/adapters/{google-BhvizbFR.cjs → google-PsZzwedr.cjs} +2 -2
  74. package/dist/adapters/handler-BcYTw6zB.cjs +25 -0
  75. package/dist/adapters/{handler-DGud-C-w.js → handler-eA0VJDHj.js} +363 -266
  76. package/dist/adapters/hono/index.cjs +1 -1
  77. package/dist/adapters/hono/index.js +9 -9
  78. package/dist/adapters/mcp-tools-handlers.d.ts +10 -3
  79. package/dist/adapters/mcp-tools.cjs +1 -1
  80. package/dist/adapters/mcp-tools.js +18 -20
  81. package/dist/adapters/mcp-transport-BpG44Fvn.js +730 -0
  82. package/dist/adapters/mcp-transport-CDxZXpc-.cjs +42 -0
  83. package/dist/adapters/mcp-transport.d.ts +13 -2
  84. package/dist/adapters/nextjs/index.cjs +1 -1
  85. package/dist/adapters/nextjs/index.d.ts +5 -2
  86. package/dist/adapters/nextjs/index.js +32 -32
  87. package/dist/adapters/{openai-Crp3X_zg.js → openai-BZ48ioYp.js} +1 -1
  88. package/dist/adapters/{openai-CmdN7Sj1.cjs → openai-Bw1j-OiP.cjs} +1 -1
  89. package/dist/adapters/{openai-Dwt9bxOE.cjs → openai-CLjyL5_J.cjs} +2 -2
  90. package/dist/adapters/{openai-CGJM6Qun.js → openai-CYYjUG_3.js} +4 -4
  91. package/dist/adapters/{utils-DboNUT3A.js → utils-BagURNRb.js} +1963 -1135
  92. package/dist/adapters/utils-BiKIg2tk.cjs +128 -0
  93. package/dist/adapters/utils.cjs +1 -1
  94. package/dist/adapters/utils.d.ts +19 -5
  95. package/dist/adapters/utils.js +1 -1
  96. package/dist/cjs/adapters/core/http-port.d.ts +34 -7
  97. package/dist/cjs/adapters/core/index.d.ts +1 -0
  98. package/dist/cjs/adapters/core/rest-handlers.d.ts +1 -1
  99. package/dist/cjs/adapters/express/index.d.ts +11 -2
  100. package/dist/cjs/adapters/fastify/index.d.ts +11 -2
  101. package/dist/cjs/adapters/mcp-tools-handlers.d.ts +10 -3
  102. package/dist/cjs/adapters/mcp-transport.d.ts +13 -2
  103. package/dist/cjs/adapters/nextjs/index.d.ts +5 -2
  104. package/dist/cjs/adapters/utils.d.ts +19 -5
  105. package/dist/cjs/client/charts/chartConfigRegistry.d.ts +7 -0
  106. package/dist/cjs/client/charts/chartConfigs.d.ts +17 -1
  107. package/dist/cjs/client/client/CubeClient.d.ts +11 -1
  108. package/dist/cjs/client/components/AnalysisBuilder/AnalysisDisplayConfigPanel.d.ts +4 -2
  109. package/dist/cjs/client/components/AnalysisBuilder/ColumnFormatsEditor.d.ts +10 -0
  110. package/dist/cjs/client/components/AnalysisBuilder/DisplayOptionControl.d.ts +3 -2
  111. package/dist/cjs/client/components/AnalysisBuilder/utils/queryUtils.d.ts +7 -1
  112. package/dist/cjs/client/components/analyticsPortlet/PortletChart.d.ts +2 -1
  113. package/dist/cjs/client/components/analyticsPortlet/PortletChartView.d.ts +4 -1
  114. package/dist/cjs/client/components/analyticsPortlet/usePortletDeadMembers.d.ts +24 -0
  115. package/dist/cjs/client/components/analyticsPortlet/usePortletPagination.d.ts +21 -0
  116. package/dist/cjs/client/components/charts/RecordsTable.config.d.ts +10 -0
  117. package/dist/cjs/client/components/charts/RecordsTable.d.ts +4 -0
  118. package/dist/cjs/client/components/charts/recordsTableHooks.d.ts +68 -0
  119. package/dist/cjs/client/icons/types.d.ts +1 -0
  120. package/dist/cjs/client/index.d.ts +2 -2
  121. package/dist/cjs/client/types.d.ts +92 -1
  122. package/dist/cjs/client/utils/recordsTableUtils.d.ts +71 -0
  123. package/dist/cjs/client/utils/rowLinkUtils.d.ts +35 -0
  124. package/dist/cjs/server/adapters/base-adapter.d.ts +46 -0
  125. package/dist/cjs/server/adapters/databend-adapter.d.ts +5 -0
  126. package/dist/cjs/server/adapters/duckdb-adapter.d.ts +5 -0
  127. package/dist/cjs/server/adapters/mysql-adapter.d.ts +14 -0
  128. package/dist/cjs/server/adapters/postgres-adapter.d.ts +15 -0
  129. package/dist/cjs/server/adapters/snowflake-adapter.d.ts +6 -0
  130. package/dist/cjs/server/adapters/sqlite-adapter.d.ts +21 -0
  131. package/dist/cjs/server/agent/chart-validation.d.ts +1 -1
  132. package/dist/cjs/server/ai/chart-schema.d.ts +117 -0
  133. package/dist/cjs/server/ai/discovery-helpers.d.ts +14 -0
  134. package/dist/cjs/server/ai/discovery.d.ts +6 -0
  135. package/dist/cjs/server/ai/query-schema.d.ts +1 -1
  136. package/dist/cjs/server/attribute-dimensions.d.ts +102 -0
  137. package/dist/cjs/server/builders/group-by-builder.d.ts +15 -0
  138. package/dist/cjs/server/cache-utils.d.ts +5 -1
  139. package/dist/cjs/server/compiler-metadata.d.ts +24 -3
  140. package/dist/cjs/server/compiler.d.ts +159 -13
  141. package/dist/cjs/server/execution/query-result-cache.d.ts +1 -1
  142. package/dist/cjs/server/executor.d.ts +15 -0
  143. package/dist/cjs/server/index.d.ts +13 -3
  144. package/dist/cjs/server/query-handlers.d.ts +2 -1
  145. package/dist/cjs/server/query-validator.d.ts +36 -4
  146. package/dist/cjs/server/types/core.d.ts +13 -0
  147. package/dist/cjs/server/types/cube.d.ts +39 -2
  148. package/dist/cjs/server/types/query.d.ts +8 -0
  149. package/dist/cli/index.cjs +130 -52
  150. package/dist/client/charts/chartConfigRegistry.d.ts +7 -0
  151. package/dist/client/charts/chartConfigs.d.ts +17 -1
  152. package/dist/client/charts.js +13 -13
  153. package/dist/client/chunks/{DashboardEditModal-BOfLdTgV.js → DashboardEditModal-_ZDMwaGX.js} +1653 -1188
  154. package/dist/client/chunks/DashboardEditModal-_ZDMwaGX.js.map +1 -0
  155. package/dist/client/chunks/{ProportionBarChart-DwoXU5VP.js → ProportionBarChart-qfpAWhIg.js} +3 -3
  156. package/dist/client/chunks/{ProportionBarChart-DwoXU5VP.js.map → ProportionBarChart-qfpAWhIg.js.map} +1 -1
  157. package/dist/client/chunks/RecordsTable-KmJy94xN.js +556 -0
  158. package/dist/client/chunks/RecordsTable-KmJy94xN.js.map +1 -0
  159. package/dist/client/chunks/{RetentionCombinedChart-BqlSV7yF.js → RetentionCombinedChart-C7X6aj97.js} +3 -3
  160. package/dist/client/chunks/{RetentionCombinedChart-BqlSV7yF.js.map → RetentionCombinedChart-C7X6aj97.js.map} +1 -1
  161. package/dist/client/chunks/{RetentionHeatmap-VdVkBg8Q.js → RetentionHeatmap-PpRpiqR_.js} +2 -2
  162. package/dist/client/chunks/{RetentionHeatmap-VdVkBg8Q.js.map → RetentionHeatmap-PpRpiqR_.js.map} +1 -1
  163. package/dist/client/chunks/{analysis-builder-DXw60SEs.js → analysis-builder-DaqyOjLX.js} +169 -168
  164. package/dist/client/chunks/{analysis-builder-DXw60SEs.js.map → analysis-builder-DaqyOjLX.js.map} +1 -1
  165. package/dist/client/chunks/{analysis-builder-shared-CEvHIlmk.js → analysis-builder-shared-ow9KAHDP.js} +965 -954
  166. package/dist/client/chunks/analysis-builder-shared-ow9KAHDP.js.map +1 -0
  167. package/dist/client/chunks/{chart-activity-grid-4jfS8khG.js → chart-activity-grid-DO82rrbW.js} +140 -84
  168. package/dist/client/chunks/chart-activity-grid-DO82rrbW.js.map +1 -0
  169. package/dist/client/chunks/{chart-area-Dol6s9no.js → chart-area-9SBeG0GM.js} +21 -21
  170. package/dist/client/chunks/{chart-area-Dol6s9no.js.map → chart-area-9SBeG0GM.js.map} +1 -1
  171. package/dist/client/chunks/{chart-bar-5_niozi2.js → chart-bar-tfgmLK2D.js} +5 -5
  172. package/dist/client/chunks/{chart-bar-5_niozi2.js.map → chart-bar-tfgmLK2D.js.map} +1 -1
  173. package/dist/client/chunks/{chart-box-plot-Dhp-VwhD.js → chart-box-plot-BuYW6j6g.js} +2 -2
  174. package/dist/client/chunks/{chart-box-plot-Dhp-VwhD.js.map → chart-box-plot-BuYW6j6g.js.map} +1 -1
  175. package/dist/client/chunks/{chart-bubble-BM2BAMSo.js → chart-bubble-BNmonWqW.js} +2 -2
  176. package/dist/client/chunks/{chart-bubble-BM2BAMSo.js.map → chart-bubble-BNmonWqW.js.map} +1 -1
  177. package/dist/client/chunks/{chart-candlestick-BNwLIBfm.js → chart-candlestick-BYeWNkKl.js} +2 -2
  178. package/dist/client/chunks/{chart-candlestick-BNwLIBfm.js.map → chart-candlestick-BYeWNkKl.js.map} +1 -1
  179. package/dist/client/chunks/{chart-data-table-DoDHQRe7.js → chart-data-table-C_oHiK6N.js} +1094 -1029
  180. package/dist/client/chunks/chart-data-table-C_oHiK6N.js.map +1 -0
  181. package/dist/client/chunks/{chart-funnel-Cd7da_sa.js → chart-funnel-B_CWC3cL.js} +2 -2
  182. package/dist/client/chunks/{chart-funnel-Cd7da_sa.js.map → chart-funnel-B_CWC3cL.js.map} +1 -1
  183. package/dist/client/chunks/{chart-gauge-DOpul-Oz.js → chart-gauge-D7VxwPnx.js} +3 -3
  184. package/dist/client/chunks/{chart-gauge-DOpul-Oz.js.map → chart-gauge-D7VxwPnx.js.map} +1 -1
  185. package/dist/client/chunks/{chart-heat-map-CeKbK655.js → chart-heat-map-q7Vf_dog.js} +3 -3
  186. package/dist/client/chunks/{chart-heat-map-CeKbK655.js.map → chart-heat-map-q7Vf_dog.js.map} +1 -1
  187. package/dist/client/chunks/{chart-kpi-delta-Dq8qUOOT.js → chart-kpi-delta-PEuA3iGs.js} +3 -3
  188. package/dist/client/chunks/{chart-kpi-delta-Dq8qUOOT.js.map → chart-kpi-delta-PEuA3iGs.js.map} +1 -1
  189. package/dist/client/chunks/{chart-kpi-number-DgiqTi9g.js → chart-kpi-number-DlxrO6Pq.js} +5 -5
  190. package/dist/client/chunks/{chart-kpi-number-DgiqTi9g.js.map → chart-kpi-number-DlxrO6Pq.js.map} +1 -1
  191. package/dist/client/chunks/{chart-kpi-text-CsZMVEnM.js → chart-kpi-text-Cx6cJu2s.js} +3 -3
  192. package/dist/client/chunks/{chart-kpi-text-CsZMVEnM.js.map → chart-kpi-text-Cx6cJu2s.js.map} +1 -1
  193. package/dist/client/chunks/{chart-line-DlwOB7C7.js → chart-line-pDe25JzB.js} +3 -3
  194. package/dist/client/chunks/{chart-line-DlwOB7C7.js.map → chart-line-pDe25JzB.js.map} +1 -1
  195. package/dist/client/chunks/{chart-markdown-DPE34SjC.js → chart-markdown-CRY15yp0.js} +2 -2
  196. package/dist/client/chunks/{chart-markdown-DPE34SjC.js.map → chart-markdown-CRY15yp0.js.map} +1 -1
  197. package/dist/client/chunks/{chart-measure-profile-BpTz1fce.js → chart-measure-profile-DyQ-vvuC.js} +3 -3
  198. package/dist/client/chunks/{chart-measure-profile-BpTz1fce.js.map → chart-measure-profile-DyQ-vvuC.js.map} +1 -1
  199. package/dist/client/chunks/{chart-pie-FGw66XAH.js → chart-pie-ZrnBycy1.js} +15 -15
  200. package/dist/client/chunks/{chart-pie-FGw66XAH.js.map → chart-pie-ZrnBycy1.js.map} +1 -1
  201. package/dist/client/chunks/{chart-radar-D-eRDoiA.js → chart-radar-BXbnYMUJ.js} +13 -13
  202. package/dist/client/chunks/{chart-radar-D-eRDoiA.js.map → chart-radar-BXbnYMUJ.js.map} +1 -1
  203. package/dist/client/chunks/{chart-radial-bar-DgtkNTs3.js → chart-radial-bar-CYxH3ryh.js} +3 -3
  204. package/dist/client/chunks/{chart-radial-bar-DgtkNTs3.js.map → chart-radial-bar-CYxH3ryh.js.map} +1 -1
  205. package/dist/client/chunks/{chart-sankey-D0hhb_EQ.js → chart-sankey-C9R_TDDh.js} +2 -2
  206. package/dist/client/chunks/{chart-sankey-D0hhb_EQ.js.map → chart-sankey-C9R_TDDh.js.map} +1 -1
  207. package/dist/client/chunks/{chart-scatter-D9EcAiMQ.js → chart-scatter-DrwRkzzl.js} +3 -3
  208. package/dist/client/chunks/{chart-scatter-D9EcAiMQ.js.map → chart-scatter-DrwRkzzl.js.map} +1 -1
  209. package/dist/client/chunks/{chart-sunburst-DCYmJ5DU.js → chart-sunburst-Bs1yqIPp.js} +3 -3
  210. package/dist/client/chunks/{chart-sunburst-DCYmJ5DU.js.map → chart-sunburst-Bs1yqIPp.js.map} +1 -1
  211. package/dist/client/chunks/{chart-tree-map-D_ACSSiB.js → chart-tree-map-BNjHhhVq.js} +3 -3
  212. package/dist/client/chunks/{chart-tree-map-D_ACSSiB.js.map → chart-tree-map-BNjHhhVq.js.map} +1 -1
  213. package/dist/client/chunks/{chart-waterfall-CVUVNa1R.js → chart-waterfall-CyoC0uLT.js} +3 -3
  214. package/dist/client/chunks/{chart-waterfall-CVUVNa1R.js.map → chart-waterfall-CyoC0uLT.js.map} +1 -1
  215. package/dist/client/chunks/charts-core-DCQ7od_L.js +190 -0
  216. package/dist/client/chunks/charts-core-DCQ7od_L.js.map +1 -0
  217. package/dist/client/chunks/charts-loader-Bya_zDIA.js +86 -0
  218. package/dist/client/chunks/charts-loader-Bya_zDIA.js.map +1 -0
  219. package/dist/client/chunks/{en-US-BE6VoG0o.js → en-US-HP6FHuNy.js} +3 -1
  220. package/dist/client/chunks/{en-US-BE6VoG0o.js.map → en-US-HP6FHuNy.js.map} +1 -1
  221. package/dist/client/chunks/{exceljs.min-DWC_b8G9.js → exceljs.min-CiByP8VQ.js} +2 -3
  222. package/dist/client/chunks/{exceljs.min-DWC_b8G9.js.map → exceljs.min-CiByP8VQ.js.map} +1 -1
  223. package/dist/client/chunks/{nl-NL-DFLVORiD.js → nl-NL-CEdoCz6Q.js} +54 -1
  224. package/dist/client/chunks/nl-NL-CEdoCz6Q.js.map +1 -0
  225. package/dist/client/chunks/{schema-visualization-C6g_LCiA.js → schema-visualization-DfXxFBIY.js} +3 -3
  226. package/dist/client/chunks/{schema-visualization-C6g_LCiA.js.map → schema-visualization-DfXxFBIY.js.map} +1 -1
  227. package/dist/client/chunks/{useDirtyStateTracking-ZfChDEd3.js → useDirtyStateTracking-BFJHiiVK.js} +15 -15
  228. package/dist/client/chunks/{useDirtyStateTracking-ZfChDEd3.js.map → useDirtyStateTracking-BFJHiiVK.js.map} +1 -1
  229. package/dist/client/chunks/{useExplainAI-im9e1rVb.js → useExplainAI-_C4WQE5I.js} +16 -16
  230. package/dist/client/chunks/{useExplainAI-im9e1rVb.js.map → useExplainAI-_C4WQE5I.js.map} +1 -1
  231. package/dist/client/chunks/{vendor-Qa1s8oSX.js → vendor-Gb3lH0cc.js} +49 -49
  232. package/dist/client/chunks/vendor-Gb3lH0cc.js.map +1 -0
  233. package/dist/client/client/CubeClient.d.ts +11 -1
  234. package/dist/client/components/AnalysisBuilder/AnalysisDisplayConfigPanel.d.ts +4 -2
  235. package/dist/client/components/AnalysisBuilder/ColumnFormatsEditor.d.ts +10 -0
  236. package/dist/client/components/AnalysisBuilder/DisplayOptionControl.d.ts +3 -2
  237. package/dist/client/components/AnalysisBuilder/utils/queryUtils.d.ts +7 -1
  238. package/dist/client/components/analyticsPortlet/PortletChart.d.ts +2 -1
  239. package/dist/client/components/analyticsPortlet/PortletChartView.d.ts +4 -1
  240. package/dist/client/components/analyticsPortlet/usePortletDeadMembers.d.ts +24 -0
  241. package/dist/client/components/analyticsPortlet/usePortletPagination.d.ts +21 -0
  242. package/dist/client/components/charts/RecordsTable.config.d.ts +10 -0
  243. package/dist/client/components/charts/RecordsTable.d.ts +4 -0
  244. package/dist/client/components/charts/recordsTableHooks.d.ts +68 -0
  245. package/dist/client/components.js +1 -1
  246. package/dist/client/hooks.js +3 -3
  247. package/dist/client/icons/types.d.ts +1 -0
  248. package/dist/client/icons.js +2 -2
  249. package/dist/client/index.d.ts +2 -2
  250. package/dist/client/index.js +213 -213
  251. package/dist/client/providers.js +1 -1
  252. package/dist/client/schema.js +1 -1
  253. package/dist/client/styles.css +1 -1
  254. package/dist/client/types.d.ts +92 -1
  255. package/dist/client/utils/recordsTableUtils.d.ts +71 -0
  256. package/dist/client/utils/rowLinkUtils.d.ts +35 -0
  257. package/dist/client/utils.js +14 -14
  258. package/dist/client-bundle-stats.html +1 -1
  259. package/dist/mcp-app/mcp-app.html +109 -109
  260. package/dist/server/adapters/base-adapter.d.ts +46 -0
  261. package/dist/server/adapters/databend-adapter.d.ts +5 -0
  262. package/dist/server/adapters/duckdb-adapter.d.ts +5 -0
  263. package/dist/server/adapters/mysql-adapter.d.ts +14 -0
  264. package/dist/server/adapters/postgres-adapter.d.ts +15 -0
  265. package/dist/server/adapters/snowflake-adapter.d.ts +6 -0
  266. package/dist/server/adapters/sqlite-adapter.d.ts +21 -0
  267. package/dist/server/agent/chart-validation.d.ts +1 -1
  268. package/dist/server/ai/chart-schema.d.ts +117 -0
  269. package/dist/server/ai/discovery-helpers.d.ts +14 -0
  270. package/dist/server/ai/discovery.d.ts +6 -0
  271. package/dist/server/ai/query-schema.d.ts +1 -1
  272. package/dist/server/attribute-dimensions.d.ts +102 -0
  273. package/dist/server/builders/group-by-builder.d.ts +15 -0
  274. package/dist/server/cache-utils.d.ts +5 -1
  275. package/dist/server/compiler-metadata.d.ts +24 -3
  276. package/dist/server/compiler.d.ts +159 -13
  277. package/dist/server/execution/query-result-cache.d.ts +1 -1
  278. package/dist/server/executor.d.ts +15 -0
  279. package/dist/{adapters/google-eKAc20al.js → server/google-DRY7jnOh.js} +46 -28
  280. package/dist/server/{google-BhvizbFR.cjs → google-PsZzwedr.cjs} +2 -2
  281. package/dist/server/index.cjs +42 -38
  282. package/dist/server/index.d.ts +13 -3
  283. package/dist/server/index.js +2079 -1573
  284. package/dist/server/{openai-Czk1BdHa.js → openai-6uUf7h-5.js} +1 -1
  285. package/dist/server/{openai-DBwI1OSu.cjs → openai-BBe1XbZd.cjs} +1 -1
  286. package/dist/server/{openai-Cu4TXXjl.cjs → openai-BmADmD1e.cjs} +1 -1
  287. package/dist/server/{openai-CUf4vc3Q.js → openai-C1gLuR-0.js} +1 -1
  288. package/dist/server/query-handlers.d.ts +2 -1
  289. package/dist/server/query-validator.d.ts +36 -4
  290. package/dist/server/types/core.d.ts +13 -0
  291. package/dist/server/types/cube.d.ts +39 -2
  292. package/dist/server/types/query.d.ts +8 -0
  293. package/package.json +2 -2
  294. package/dist/adapters/ActivityGridChart.config-D6hhj345.cjs +0 -1
  295. package/dist/adapters/ActivityGridChart.config-QZKs_NYg.js +0 -2
  296. package/dist/adapters/AreaChart.config-B5XM6G22.js +0 -2
  297. package/dist/adapters/AreaChart.config-NP34BH5y.cjs +0 -1
  298. package/dist/adapters/BarChart.config-Bqlmr81N.js +0 -2
  299. package/dist/adapters/BarChart.config-C3bw-cAP.cjs +0 -1
  300. package/dist/adapters/BoxPlotChart.config-BOAvoj6x.cjs +0 -1
  301. package/dist/adapters/BoxPlotChart.config-CTXiycYY.js +0 -2
  302. package/dist/adapters/BubbleChart.config-CGFIkl4H.cjs +0 -1
  303. package/dist/adapters/BubbleChart.config-Njxx4Eq1.js +0 -2
  304. package/dist/adapters/CandlestickChart.config-BZ_yWaSo.cjs +0 -1
  305. package/dist/adapters/CandlestickChart.config-D4Svhmef.js +0 -2
  306. package/dist/adapters/DataTable.config-B-bT9puT.js +0 -2
  307. package/dist/adapters/DataTable.config-BHtt1cPM.cjs +0 -1
  308. package/dist/adapters/FunnelChart.config-C1e07O7B.cjs +0 -1
  309. package/dist/adapters/FunnelChart.config-CVEy0tV9.js +0 -2
  310. package/dist/adapters/GaugeChart.config-5PLNlQlu.js +0 -2
  311. package/dist/adapters/GaugeChart.config-Cdv6knjZ.cjs +0 -1
  312. package/dist/adapters/HeatMapChart.config-MGTfYpWJ.js +0 -2
  313. package/dist/adapters/HeatMapChart.config-jfBEi1ZI.cjs +0 -1
  314. package/dist/adapters/KpiDelta.config-D2IUsEYz.cjs +0 -1
  315. package/dist/adapters/KpiDelta.config-DT_MmAHw.js +0 -2
  316. package/dist/adapters/KpiNumber.config-ChgbKmx8.cjs +0 -1
  317. package/dist/adapters/KpiNumber.config-CvZ_FhyL.js +0 -2
  318. package/dist/adapters/KpiText.config-Bgkw8gr2.js +0 -2
  319. package/dist/adapters/KpiText.config-Bz9orqt6.cjs +0 -1
  320. package/dist/adapters/LineChart.config-BVew35dI.cjs +0 -1
  321. package/dist/adapters/LineChart.config-DSCCKXNg.js +0 -2
  322. package/dist/adapters/MarkdownChart.config-Bu6XUuhI.js +0 -2
  323. package/dist/adapters/MarkdownChart.config-E4aSVTf3.cjs +0 -1
  324. package/dist/adapters/MeasureProfileChart.config-BF249hc_.cjs +0 -1
  325. package/dist/adapters/MeasureProfileChart.config-lERVe38G.js +0 -2
  326. package/dist/adapters/PieChart.config-7Ujwp8R5.cjs +0 -1
  327. package/dist/adapters/PieChart.config-jQl2HIcA.js +0 -2
  328. package/dist/adapters/ProportionBarChart.config-o0w_Pnlt.js +0 -2
  329. package/dist/adapters/ProportionBarChart.config-phNohhhY.cjs +0 -1
  330. package/dist/adapters/RadarChart.config-BmrYBd9x.js +0 -2
  331. package/dist/adapters/RadarChart.config-Dlt3UflG.cjs +0 -1
  332. package/dist/adapters/RadialBarChart.config-CeEm8xRb.cjs +0 -1
  333. package/dist/adapters/RadialBarChart.config-Dishh6bC.js +0 -2
  334. package/dist/adapters/RetentionCombinedChart.config-BaD4ev85.cjs +0 -1
  335. package/dist/adapters/RetentionCombinedChart.config-m2FjBUi9.js +0 -2
  336. package/dist/adapters/RetentionHeatmap.config-DiMplGdk.js +0 -2
  337. package/dist/adapters/RetentionHeatmap.config-Dp6oYwQZ.cjs +0 -1
  338. package/dist/adapters/SankeyChart.config-C4Y6qzCS.cjs +0 -1
  339. package/dist/adapters/SankeyChart.config-CJHqgjQ1.js +0 -2
  340. package/dist/adapters/ScatterChart.config-C0QqvDrN.cjs +0 -1
  341. package/dist/adapters/ScatterChart.config-DywOsWPW.js +0 -2
  342. package/dist/adapters/SunburstChart.config-DE8RxpDR.cjs +0 -1
  343. package/dist/adapters/SunburstChart.config-DohowrO3.js +0 -2
  344. package/dist/adapters/TreeMapChart.config-D2gXz-zC.cjs +0 -1
  345. package/dist/adapters/TreeMapChart.config-HMlI29GG.js +0 -2
  346. package/dist/adapters/WaterfallChart.config-BO2WV2VB.js +0 -2
  347. package/dist/adapters/WaterfallChart.config-CzwGiheB.cjs +0 -1
  348. package/dist/adapters/compiler-BNjqYdmc.cjs +0 -166
  349. package/dist/adapters/core-CzFfrJzu.cjs +0 -1
  350. package/dist/adapters/handler-m6WgA9xu.cjs +0 -25
  351. package/dist/adapters/mcp-transport-B0b27YUB.cjs +0 -40
  352. package/dist/adapters/mcp-transport-BXyA4dTk.js +0 -603
  353. package/dist/adapters/utils-BoOeig94.cjs +0 -128
  354. package/dist/client/chunks/DashboardEditModal-BOfLdTgV.js.map +0 -1
  355. package/dist/client/chunks/analysis-builder-shared-CEvHIlmk.js.map +0 -1
  356. package/dist/client/chunks/chart-activity-grid-4jfS8khG.js.map +0 -1
  357. package/dist/client/chunks/chart-data-table-DoDHQRe7.js.map +0 -1
  358. package/dist/client/chunks/charts-core-BPD_hLaL.js +0 -215
  359. package/dist/client/chunks/charts-core-BPD_hLaL.js.map +0 -1
  360. package/dist/client/chunks/charts-loader-CwMcOfwT.js +0 -85
  361. package/dist/client/chunks/charts-loader-CwMcOfwT.js.map +0 -1
  362. package/dist/client/chunks/nl-NL-DFLVORiD.js.map +0 -1
  363. package/dist/client/chunks/vendor-Qa1s8oSX.js.map +0 -1
@@ -1,7 +1,8 @@
1
- import { O as e, _ as t, g as n, h as r, m as i, p as a, v as o, x as s } from "./utils-DboNUT3A.js";
2
- import { a as c, c as l, d as u, i as d, l as f, n as p, o as m, r as h, s as g, t as _, u as v } from "./chartConfigHelpers-BsnbxA2c.js";
1
+ import { A as e, _ as t, g as n, h as r, k as i, m as a, p as o, v as s, x as c } from "./utils-BagURNRb.js";
2
+ import { E as l, T as u } from "./mcp-transport-BpG44Fvn.js";
3
+ import { a as d, c as f, d as p, i as m, l as h, n as g, o as _, r as v, s as y, t as b, u as x } from "./chartConfigHelpers-BsnbxA2c.js";
3
4
  //#region src/server/agent/system-prompt.ts
4
- function y(e, t) {
5
+ function S(e, t) {
5
6
  if (!(!t.measures || t.measures.length === 0)) {
6
7
  e.push(""), e.push("**Measures:**");
7
8
  for (let n of t.measures) {
@@ -10,7 +11,7 @@ function y(e, t) {
10
11
  }
11
12
  }
12
13
  }
13
- function b(e, t) {
14
+ function ee(e, t) {
14
15
  if (!(!t.dimensions || t.dimensions.length === 0)) {
15
16
  e.push(""), e.push("**Dimensions:**");
16
17
  for (let n of t.dimensions) {
@@ -19,25 +20,25 @@ function b(e, t) {
19
20
  }
20
21
  }
21
22
  }
22
- function x(e, t) {
23
+ function te(e, t) {
23
24
  if (!(!t.relationships || t.relationships.length === 0)) {
24
25
  e.push(""), e.push("**Joins:**");
25
26
  for (let n of t.relationships) e.push(`- → \`${n.targetCube}\` (${n.relationship})`);
26
27
  }
27
28
  }
28
- function S(e, t) {
29
+ function ne(e, t) {
29
30
  t.meta?.eventStream && (e.push(""), e.push("**Event Stream:** Yes (supports funnel, flow, retention queries)"), t.meta.eventStream.bindingKey && e.push(`- Binding key: \`${t.name}.${t.meta.eventStream.bindingKey}\``), t.meta.eventStream.timeDimension && e.push(`- Time dimension: \`${t.name}.${t.meta.eventStream.timeDimension}\``));
30
31
  }
31
- function ee(e) {
32
+ function re(e) {
32
33
  if (e.length === 0) return "No cubes are currently available.";
33
34
  let t = ["## Available Cubes", ""];
34
- for (let n of e) t.push(`### ${n.name}`), n.description && t.push(n.description), y(t, n), b(t, n), x(t, n), S(t, n), t.push("");
35
+ for (let n of e) t.push(`### ${n.name}`), n.description && t.push(n.description), S(t, n), ee(t, n), te(t, n), ne(t, n), t.push("");
35
36
  return t.join("\n");
36
37
  }
37
38
  function C(e) {
38
39
  return e.messages.map((e) => e.content.text).join("\n\n");
39
40
  }
40
- function te(e) {
41
+ function ie(e) {
41
42
  return [
42
43
  "# Drizzle Cube Analytics Agent",
43
44
  "",
@@ -182,7 +183,7 @@ function te(e) {
182
183
  "",
183
184
  "---",
184
185
  "",
185
- C(o),
186
+ C(s),
186
187
  "",
187
188
  "---",
188
189
  "",
@@ -198,7 +199,7 @@ function te(e) {
198
199
  "- Dashboard grid is 12 columns wide",
199
200
  "- KPI cards: w=3, h=3 — place at the top in a row of 4",
200
201
  "- Overview charts (bar, line, area): w=6, h=4",
201
- "- Wide charts (heatmap, table): w=12, h=5",
202
+ "- Wide charts (heatmap, table, recordsTable): w=12, h=5",
202
203
  "- Section headers (markdown): w=12, h=1",
203
204
  "",
204
205
  "### Section Headers",
@@ -241,12 +242,12 @@ function te(e) {
241
242
  "",
242
243
  "---",
243
244
  "",
244
- ee(e)
245
+ re(e)
245
246
  ].join("\n");
246
247
  }
247
248
  //#endregion
248
249
  //#region src/client/components/charts/BarChart.config.ts
249
- var w = {
250
+ var ae = {
250
251
  clickableElements: { bar: !0 },
251
252
  dropZones: [
252
253
  {
@@ -283,12 +284,12 @@ var w = {
283
284
  "hideHeader"
284
285
  ],
285
286
  displayOptionsConfig: [
286
- f("chart.configText.how_to_stack_multiple_bar_series"),
287
+ h("chart.configText.how_to_stack_multiple_bar_series"),
288
+ x,
287
289
  v,
288
- h,
289
- m
290
+ _
290
291
  ]
291
- }, ne = {
292
+ }, oe = {
292
293
  clickableElements: { point: !0 },
293
294
  dropZones: [
294
295
  {
@@ -325,10 +326,10 @@ var w = {
325
326
  "hideHeader"
326
327
  ],
327
328
  displayOptionsConfig: [
328
- l,
329
- g(),
330
- _,
331
- v,
329
+ f,
330
+ y(),
331
+ b,
332
+ x,
332
333
  {
333
334
  key: "priorPeriodStyle",
334
335
  label: "chart.option.priorPeriodStyle.label",
@@ -360,10 +361,10 @@ var w = {
360
361
  step: .1,
361
362
  description: "chart.option.priorPeriodOpacity.description"
362
363
  },
363
- h,
364
- m
364
+ v,
365
+ _
365
366
  ]
366
- }, re = {
367
+ }, w = {
367
368
  dropZones: [
368
369
  {
369
370
  key: "xAxis",
@@ -399,15 +400,15 @@ var w = {
399
400
  "hideHeader"
400
401
  ],
401
402
  displayOptionsConfig: [
402
- l,
403
- g(!1),
404
- f("chart.configText.how_to_stack_multiple_area_series"),
405
- _,
403
+ f,
404
+ y(!1),
405
+ h("chart.configText.how_to_stack_multiple_area_series"),
406
+ b,
407
+ x,
406
408
  v,
407
- h,
408
- m
409
+ _
409
410
  ]
410
- }, ie = {
411
+ }, T = {
411
412
  clickableElements: { slice: !0 },
412
413
  dropZones: [{
413
414
  key: "xAxis",
@@ -459,8 +460,8 @@ var w = {
459
460
  label: "chart.configText.80_percent"
460
461
  }
461
462
  ]
462
- }, u()]
463
- }, T = {
463
+ }, p()]
464
+ }, E = {
464
465
  dropZones: [
465
466
  {
466
467
  key: "xAxis",
@@ -511,7 +512,7 @@ var w = {
511
512
  type: "axisFormat",
512
513
  description: "chart.option.yAxisFormat.description"
513
514
  }]
514
- }, E = {
515
+ }, D = {
515
516
  dropZones: [
516
517
  {
517
518
  key: "xAxis",
@@ -583,7 +584,7 @@ var w = {
583
584
  type: "axisFormat",
584
585
  description: "chart.configText.number_formatting_for_y_axis_and_values"
585
586
  }]
586
- }, D = {
587
+ }, O = {
587
588
  dropZones: [
588
589
  {
589
590
  key: "xAxis",
@@ -616,8 +617,8 @@ var w = {
616
617
  "showTooltip",
617
618
  "hideHeader"
618
619
  ],
619
- displayOptionsConfig: [u()]
620
- }, O = {
620
+ displayOptionsConfig: [p()]
621
+ }, k = {
621
622
  dropZones: [{
622
623
  key: "xAxis",
623
624
  label: "chart.configText.categories",
@@ -639,8 +640,8 @@ var w = {
639
640
  "showTooltip",
640
641
  "hideHeader"
641
642
  ],
642
- displayOptionsConfig: [u()]
643
- }, k = {
643
+ displayOptionsConfig: [p()]
644
+ }, A = {
644
645
  dropZones: [
645
646
  {
646
647
  key: "xAxis",
@@ -674,9 +675,9 @@ var w = {
674
675
  "showTooltip",
675
676
  "hideHeader"
676
677
  ],
677
- displayOptionsConfig: [u("chart.configText.number_formatting_for_size_values")],
678
+ displayOptionsConfig: [p("chart.configText.number_formatting_for_size_values")],
678
679
  clickableElements: { cell: !0 }
679
- }, A = {
680
+ }, j = {
680
681
  dropZones: [{
681
682
  key: "xAxis",
682
683
  label: "chart.configText.columns",
@@ -696,7 +697,70 @@ var w = {
696
697
  type: "axisFormat",
697
698
  description: "chart.configText.number_formatting_for_numeric_values"
698
699
  }]
699
- }, j = {
700
+ }, M = {
701
+ dropZones: [{
702
+ key: "columns",
703
+ label: "chart.recordsTable.dropZone.columns.label",
704
+ description: "chart.recordsTable.dropZone.columns.description",
705
+ mandatory: !1,
706
+ acceptTypes: [
707
+ "dimension",
708
+ "timeDimension",
709
+ "measure"
710
+ ],
711
+ emptyText: "chart.recordsTable.dropZone.columns.empty"
712
+ }, {
713
+ key: "hiddenColumns",
714
+ label: "chart.recordsTable.dropZone.hiddenColumns.label",
715
+ description: "chart.recordsTable.dropZone.hiddenColumns.description",
716
+ mandatory: !1,
717
+ acceptTypes: [
718
+ "dimension",
719
+ "timeDimension",
720
+ "measure"
721
+ ],
722
+ emptyText: "chart.recordsTable.dropZone.hiddenColumns.empty",
723
+ excludeFromInference: !0
724
+ }],
725
+ displayOptions: ["hideHeader"],
726
+ displayOptionsConfig: [
727
+ {
728
+ key: "columnFormats",
729
+ label: "chart.recordsTable.option.columnFormats.label",
730
+ type: "columnFormats",
731
+ description: "chart.recordsTable.option.columnFormats.description"
732
+ },
733
+ {
734
+ key: "rowLink",
735
+ label: "chart.recordsTable.option.rowLink.label",
736
+ type: "rowLink",
737
+ description: "chart.recordsTable.option.rowLink.description"
738
+ },
739
+ {
740
+ key: "pageSize",
741
+ label: "chart.recordsTable.option.pageSize.label",
742
+ type: "select",
743
+ defaultValue: 25,
744
+ description: "chart.recordsTable.option.pageSize.description",
745
+ options: [
746
+ {
747
+ value: 25,
748
+ label: "chart.recordsTable.option.pageSize.option.25"
749
+ },
750
+ {
751
+ value: 50,
752
+ label: "chart.recordsTable.option.pageSize.option.50"
753
+ },
754
+ {
755
+ value: 100,
756
+ label: "chart.recordsTable.option.pageSize.option.100"
757
+ }
758
+ ]
759
+ }
760
+ ],
761
+ clickableElements: { row: !0 },
762
+ recordGrain: !0
763
+ }, N = {
700
764
  dropZones: [{
701
765
  key: "dateField",
702
766
  label: "chart.configText.time_dimension",
@@ -737,7 +801,7 @@ var w = {
737
801
  } : { isValid: !0 };
738
802
  },
739
803
  clickableElements: { cell: !0 }
740
- }, M = {
804
+ }, P = {
741
805
  dropZones: [{
742
806
  key: "yAxis",
743
807
  label: "chart.configText.value",
@@ -748,7 +812,7 @@ var w = {
748
812
  emptyText: "chart.kpiNumber.dropZone.yAxis.empty"
749
813
  }],
750
814
  displayOptionsConfig: [
751
- p,
815
+ g,
752
816
  {
753
817
  key: "target",
754
818
  label: "chart.runtime.tooltip.targetValue",
@@ -803,7 +867,7 @@ var w = {
803
867
  }
804
868
  ],
805
869
  displayOptions: ["hideHeader"]
806
- }, N = {
870
+ }, F = {
807
871
  dropZones: [{
808
872
  key: "yAxis",
809
873
  label: "chart.configText.value",
@@ -822,7 +886,7 @@ var w = {
822
886
  emptyText: "chart.kpiDelta.dropZone.xAxis.empty"
823
887
  }],
824
888
  displayOptionsConfig: [
825
- p,
889
+ g,
826
890
  {
827
891
  key: "showBaseline",
828
892
  label: "chart.option.showBaseline.label",
@@ -895,7 +959,7 @@ var w = {
895
959
  isValid: !1,
896
960
  message: "chart.kpiDelta.validation.measureRequired"
897
961
  } : { isValid: !0 }
898
- }, P = {
962
+ }, I = {
899
963
  dropZones: [{
900
964
  key: "yAxis",
901
965
  label: "chart.configText.value",
@@ -932,7 +996,7 @@ var w = {
932
996
  }
933
997
  ],
934
998
  displayOptions: ["hideHeader"]
935
- }, F = {
999
+ }, L = {
936
1000
  skipQuery: !0,
937
1001
  dropZones: [],
938
1002
  displayOptionsConfig: [
@@ -1039,7 +1103,7 @@ var w = {
1039
1103
  description: "chart.configText.add_an_accent_colored_border_on_one_side_of_the_content"
1040
1104
  }
1041
1105
  ]
1042
- }, I = {
1106
+ }, R = {
1043
1107
  dropZones: [{
1044
1108
  key: "xAxis",
1045
1109
  label: "chart.configText.step_name",
@@ -1122,7 +1186,7 @@ var w = {
1122
1186
  description: "chart.option.showP90Time.description"
1123
1187
  }
1124
1188
  ]
1125
- }, L = {
1189
+ }, z = {
1126
1190
  dropZones: [{
1127
1191
  key: "xAxis",
1128
1192
  label: "chart.configText.event_type",
@@ -1178,7 +1242,7 @@ var w = {
1178
1242
  description: "chart.configText.hide_the_statistics_footer_below_the_chart"
1179
1243
  }
1180
1244
  ]
1181
- }, R = {
1245
+ }, B = {
1182
1246
  dropZones: [{
1183
1247
  key: "xAxis",
1184
1248
  label: "chart.configText.event_type",
@@ -1213,7 +1277,7 @@ var w = {
1213
1277
  defaultValue: !0,
1214
1278
  description: "chart.configText.hide_the_statistics_footer_below_the_chart"
1215
1279
  }]
1216
- }, z = {
1280
+ }, V = {
1217
1281
  dropZones: [
1218
1282
  {
1219
1283
  key: "xAxis",
@@ -1294,7 +1358,7 @@ var w = {
1294
1358
  isValid: !1,
1295
1359
  message: "chart.heatmap.validation.xAxisRequired"
1296
1360
  }
1297
- }, B = {
1361
+ }, H = {
1298
1362
  dropZones: [],
1299
1363
  displayOptionsConfig: [{
1300
1364
  key: "showLegend",
@@ -1309,7 +1373,7 @@ var w = {
1309
1373
  defaultValue: !0,
1310
1374
  description: "chart.option.showTooltip.description"
1311
1375
  }]
1312
- }, V = {
1376
+ }, U = {
1313
1377
  dropZones: [],
1314
1378
  displayOptionsConfig: [
1315
1379
  {
@@ -1355,7 +1419,7 @@ var w = {
1355
1419
  description: "chart.option.showTooltip.description"
1356
1420
  }
1357
1421
  ]
1358
- }, H = {
1422
+ }, W = {
1359
1423
  displayOptions: ["hideHeader"],
1360
1424
  dropZones: [{
1361
1425
  key: "xAxis",
@@ -1380,7 +1444,7 @@ var w = {
1380
1444
  type: "axisFormat",
1381
1445
  description: "chart.configText.number_formatting_for_the_value_axis"
1382
1446
  }]
1383
- }, U = {
1447
+ }, G = {
1384
1448
  clickableElements: { bar: !0 },
1385
1449
  displayOptions: ["showTooltip", "hideHeader"],
1386
1450
  dropZones: [{
@@ -1429,7 +1493,7 @@ var w = {
1429
1493
  description: "chart.configText.number_formatting_for_the_y_axis"
1430
1494
  }
1431
1495
  ]
1432
- }, W = {
1496
+ }, K = {
1433
1497
  clickableElements: { bar: !0 },
1434
1498
  displayOptions: ["hideHeader"],
1435
1499
  dropZones: [{
@@ -1491,7 +1555,7 @@ var w = {
1491
1555
  description: "chart.configText.number_formatting_for_the_price_axis"
1492
1556
  }
1493
1557
  ]
1494
- }, G = {
1558
+ }, q = {
1495
1559
  displayOptions: [
1496
1560
  "showLegend",
1497
1561
  "showTooltip",
@@ -1563,7 +1627,7 @@ var w = {
1563
1627
  description: "chart.configText.number_formatting_for_the_y_axis"
1564
1628
  }
1565
1629
  ]
1566
- }, K = {
1630
+ }, J = {
1567
1631
  dropZones: [{
1568
1632
  key: "xAxis",
1569
1633
  label: "chart.configText.category",
@@ -1621,7 +1685,7 @@ var w = {
1621
1685
  isValid: !1,
1622
1686
  message: "chart.proportionBar.validation.measureRequired"
1623
1687
  } : { isValid: !0 }
1624
- }, q = {
1688
+ }, se = {
1625
1689
  clickableElements: {},
1626
1690
  displayOptions: ["hideHeader"],
1627
1691
  dropZones: [{
@@ -1674,45 +1738,45 @@ var w = {
1674
1738
  description: "chart.configText.number_formatting_for_the_displayed_value_and_axis_labels"
1675
1739
  }
1676
1740
  ]
1677
- }, J = {
1741
+ }, Y = {
1678
1742
  packageName: "recharts",
1679
1743
  installCommand: "npm install recharts"
1680
- }, Y = {
1744
+ }, ce = {
1681
1745
  bar: {
1682
1746
  label: "chart.bar.label",
1683
1747
  icon: "chartBar",
1684
1748
  description: "chart.bar.description",
1685
1749
  useCase: "chart.bar.useCase",
1686
- isAvailable: c,
1687
- dependencies: J,
1688
- config: async () => (await import("./BarChart.config-Bqlmr81N.js")).barChartConfig
1750
+ isAvailable: d,
1751
+ dependencies: Y,
1752
+ config: async () => (await import("./BarChart.config-C5sqbn0A.js")).barChartConfig
1689
1753
  },
1690
1754
  line: {
1691
1755
  label: "chart.line.label",
1692
1756
  icon: "chartLine",
1693
1757
  description: "chart.line.description",
1694
1758
  useCase: "chart.line.useCase",
1695
- isAvailable: c,
1696
- dependencies: J,
1697
- config: async () => (await import("./LineChart.config-DSCCKXNg.js")).lineChartConfig
1759
+ isAvailable: d,
1760
+ dependencies: Y,
1761
+ config: async () => (await import("./LineChart.config-CXJrgz1s.js")).lineChartConfig
1698
1762
  },
1699
1763
  area: {
1700
1764
  label: "chart.area.label",
1701
1765
  icon: "chartArea",
1702
1766
  description: "chart.area.description",
1703
1767
  useCase: "chart.area.useCase",
1704
- isAvailable: c,
1705
- dependencies: J,
1706
- config: async () => (await import("./AreaChart.config-B5XM6G22.js")).areaChartConfig
1768
+ isAvailable: d,
1769
+ dependencies: Y,
1770
+ config: async () => (await import("./AreaChart.config-KEaXP_4K.js")).areaChartConfig
1707
1771
  },
1708
1772
  pie: {
1709
1773
  label: "chart.pie.label",
1710
1774
  icon: "chartPie",
1711
1775
  description: "chart.pie.description",
1712
1776
  useCase: "chart.pie.useCase",
1713
- isAvailable: c,
1714
- dependencies: J,
1715
- config: async () => (await import("./PieChart.config-jQl2HIcA.js")).pieChartConfig
1777
+ isAvailable: d,
1778
+ dependencies: Y,
1779
+ config: async () => (await import("./PieChart.config-C6jJj6xm.js")).pieChartConfig
1716
1780
  },
1717
1781
  scatter: {
1718
1782
  label: "chart.scatter.label",
@@ -1726,8 +1790,8 @@ var w = {
1726
1790
  available: !1,
1727
1791
  reason: "chart.availability.scatter"
1728
1792
  } : { available: !0 },
1729
- dependencies: J,
1730
- config: async () => (await import("./ScatterChart.config-DywOsWPW.js")).scatterChartConfig
1793
+ dependencies: Y,
1794
+ config: async () => (await import("./ScatterChart.config-CV2rdGJp.js")).scatterChartConfig
1731
1795
  },
1732
1796
  bubble: {
1733
1797
  label: "chart.bubble.label",
@@ -1741,42 +1805,49 @@ var w = {
1741
1805
  available: !1,
1742
1806
  reason: "chart.availability.bubble"
1743
1807
  } : { available: !0 },
1744
- dependencies: J,
1745
- config: async () => (await import("./BubbleChart.config-Njxx4Eq1.js")).bubbleChartConfig
1808
+ dependencies: Y,
1809
+ config: async () => (await import("./BubbleChart.config-CoBxmmfp.js")).bubbleChartConfig
1746
1810
  },
1747
1811
  radar: {
1748
1812
  label: "chart.radar.label",
1749
1813
  icon: "chartRadar",
1750
1814
  description: "chart.radar.description",
1751
1815
  useCase: "chart.radar.useCase",
1752
- isAvailable: c,
1753
- dependencies: J,
1754
- config: async () => (await import("./RadarChart.config-BmrYBd9x.js")).radarChartConfig
1816
+ isAvailable: d,
1817
+ dependencies: Y,
1818
+ config: async () => (await import("./RadarChart.config-Ct_b7IM5.js")).radarChartConfig
1755
1819
  },
1756
1820
  radialBar: {
1757
1821
  label: "chart.radialBar.label",
1758
1822
  icon: "chartRadialBar",
1759
1823
  description: "chart.radialBar.description",
1760
1824
  useCase: "chart.radialBar.useCase",
1761
- isAvailable: c,
1762
- dependencies: J,
1763
- config: async () => (await import("./RadialBarChart.config-Dishh6bC.js")).radialBarChartConfig
1825
+ isAvailable: d,
1826
+ dependencies: Y,
1827
+ config: async () => (await import("./RadialBarChart.config-Bp-Sl0cm.js")).radialBarChartConfig
1764
1828
  },
1765
1829
  treemap: {
1766
1830
  label: "chart.treemap.label",
1767
1831
  icon: "chartTreemap",
1768
1832
  description: "chart.treemap.description",
1769
1833
  useCase: "chart.treemap.useCase",
1770
- isAvailable: c,
1771
- dependencies: J,
1772
- config: async () => (await import("./TreeMapChart.config-HMlI29GG.js")).treemapChartConfig
1834
+ isAvailable: d,
1835
+ dependencies: Y,
1836
+ config: async () => (await import("./TreeMapChart.config-DxgIqIIj.js")).treemapChartConfig
1773
1837
  },
1774
1838
  table: {
1775
1839
  label: "chart.table.label",
1776
1840
  icon: "chartTable",
1777
1841
  description: "chart.table.description",
1778
1842
  useCase: "chart.table.useCase",
1779
- config: async () => (await import("./DataTable.config-B-bT9puT.js")).dataTableConfig
1843
+ config: async () => (await import("./DataTable.config-DkAgD-iz.js")).dataTableConfig
1844
+ },
1845
+ recordsTable: {
1846
+ label: "chart.recordsTable.label",
1847
+ icon: "chartRecordsTable",
1848
+ description: "chart.recordsTable.description",
1849
+ useCase: "chart.recordsTable.useCase",
1850
+ config: async () => (await import("./RecordsTable.config-DIwoqZCU.js")).recordsTableConfig
1780
1851
  },
1781
1852
  activityGrid: {
1782
1853
  label: "chart.activityGrid.label",
@@ -1790,62 +1861,62 @@ var w = {
1790
1861
  available: !1,
1791
1862
  reason: "chart.availability.requiresTimeDimension"
1792
1863
  } : { available: !0 },
1793
- config: async () => (await import("./ActivityGridChart.config-QZKs_NYg.js")).activityGridChartConfig
1864
+ config: async () => (await import("./ActivityGridChart.config-Dyozu3VW.js")).activityGridChartConfig
1794
1865
  },
1795
1866
  kpiNumber: {
1796
1867
  label: "chart.kpiNumber.label",
1797
1868
  icon: "chartKpiNumber",
1798
1869
  description: "chart.kpiNumber.description",
1799
1870
  useCase: "chart.kpiNumber.useCase",
1800
- isAvailable: d,
1801
- config: async () => (await import("./KpiNumber.config-CvZ_FhyL.js")).kpiNumberConfig
1871
+ isAvailable: m,
1872
+ config: async () => (await import("./KpiNumber.config-D6XqjZrm.js")).kpiNumberConfig
1802
1873
  },
1803
1874
  kpiDelta: {
1804
1875
  label: "chart.kpiDelta.label",
1805
1876
  icon: "chartKpiDelta",
1806
1877
  description: "chart.kpiDelta.description",
1807
1878
  useCase: "chart.kpiDelta.useCase",
1808
- isAvailable: c,
1809
- config: async () => (await import("./KpiDelta.config-DT_MmAHw.js")).kpiDeltaConfig
1879
+ isAvailable: d,
1880
+ config: async () => (await import("./KpiDelta.config-D4dCXOxl.js")).kpiDeltaConfig
1810
1881
  },
1811
1882
  kpiText: {
1812
1883
  label: "chart.kpiText.label",
1813
1884
  icon: "chartKpiText",
1814
1885
  description: "chart.kpiText.description",
1815
1886
  useCase: "chart.kpiText.useCase",
1816
- isAvailable: d,
1817
- config: async () => (await import("./KpiText.config-Bgkw8gr2.js")).kpiTextConfig
1887
+ isAvailable: m,
1888
+ config: async () => (await import("./KpiText.config-ChphMwG5.js")).kpiTextConfig
1818
1889
  },
1819
1890
  markdown: {
1820
1891
  label: "chart.markdown.label",
1821
1892
  icon: "chartMarkdown",
1822
1893
  description: "chart.markdown.description",
1823
1894
  useCase: "chart.markdown.useCase",
1824
- config: async () => (await import("./MarkdownChart.config-Bu6XUuhI.js")).markdownConfig
1895
+ config: async () => (await import("./MarkdownChart.config-Df2yY9AT.js")).markdownConfig
1825
1896
  },
1826
1897
  funnel: {
1827
1898
  label: "chart.funnel.label",
1828
1899
  icon: "chartFunnel",
1829
1900
  description: "chart.funnel.description",
1830
1901
  useCase: "chart.funnel.useCase",
1831
- dependencies: J,
1832
- config: async () => (await import("./FunnelChart.config-CVEy0tV9.js")).funnelChartConfig
1902
+ dependencies: Y,
1903
+ config: async () => (await import("./FunnelChart.config-CvzcECUB.js")).funnelChartConfig
1833
1904
  },
1834
1905
  sankey: {
1835
1906
  label: "chart.sankey.label",
1836
1907
  icon: "chartSankey",
1837
1908
  description: "chart.sankey.description",
1838
1909
  useCase: "chart.sankey.useCase",
1839
- dependencies: J,
1840
- config: async () => (await import("./SankeyChart.config-CJHqgjQ1.js")).sankeyChartConfig
1910
+ dependencies: Y,
1911
+ config: async () => (await import("./SankeyChart.config-Bf1_NHiv.js")).sankeyChartConfig
1841
1912
  },
1842
1913
  sunburst: {
1843
1914
  label: "chart.sunburst.label",
1844
1915
  icon: "chartSunburst",
1845
1916
  description: "chart.sunburst.description",
1846
1917
  useCase: "chart.sunburst.useCase",
1847
- dependencies: J,
1848
- config: async () => (await import("./SunburstChart.config-DohowrO3.js")).sunburstChartConfig
1918
+ dependencies: Y,
1919
+ config: async () => (await import("./SunburstChart.config-CrqiE1UZ.js")).sunburstChartConfig
1849
1920
  },
1850
1921
  heatmap: {
1851
1922
  label: "chart.heatmap.label",
@@ -1863,38 +1934,38 @@ var w = {
1863
1934
  packageName: "@nivo/heatmap",
1864
1935
  installCommand: "npm install @nivo/heatmap"
1865
1936
  },
1866
- config: async () => (await import("./HeatMapChart.config-MGTfYpWJ.js")).heatmapChartConfig
1937
+ config: async () => (await import("./HeatMapChart.config-BfD_dpP7.js")).heatmapChartConfig
1867
1938
  },
1868
1939
  retentionHeatmap: {
1869
1940
  label: "chart.retentionHeatmap.label",
1870
1941
  icon: "chartRetention",
1871
1942
  description: "chart.retentionHeatmap.description",
1872
1943
  useCase: "chart.retentionHeatmap.useCase",
1873
- config: async () => (await import("./RetentionHeatmap.config-DiMplGdk.js")).retentionHeatmapConfig
1944
+ config: async () => (await import("./RetentionHeatmap.config-GlnSLrjn.js")).retentionHeatmapConfig
1874
1945
  },
1875
1946
  retentionCombined: {
1876
1947
  label: "chart.retentionCombined.label",
1877
1948
  icon: "chartRetention",
1878
1949
  description: "chart.retentionCombined.description",
1879
1950
  useCase: "chart.retentionCombined.useCase",
1880
- config: async () => (await import("./RetentionCombinedChart.config-m2FjBUi9.js")).retentionCombinedConfig
1951
+ config: async () => (await import("./RetentionCombinedChart.config-D40UgTcl.js")).retentionCombinedConfig
1881
1952
  },
1882
1953
  boxPlot: {
1883
1954
  label: "chart.boxPlot.label",
1884
1955
  icon: "chartBoxPlot",
1885
1956
  description: "chart.boxPlot.description",
1886
1957
  useCase: "chart.boxPlot.useCase",
1887
- isAvailable: c,
1888
- config: async () => (await import("./BoxPlotChart.config-CTXiycYY.js")).boxPlotChartConfig
1958
+ isAvailable: d,
1959
+ config: async () => (await import("./BoxPlotChart.config-B1R4Br7L.js")).boxPlotChartConfig
1889
1960
  },
1890
1961
  waterfall: {
1891
1962
  label: "chart.waterfall.label",
1892
1963
  icon: "chartWaterfall",
1893
1964
  description: "chart.waterfall.description",
1894
1965
  useCase: "chart.waterfall.useCase",
1895
- isAvailable: c,
1896
- dependencies: J,
1897
- config: async () => (await import("./WaterfallChart.config-BO2WV2VB.js")).waterfallChartConfig
1966
+ isAvailable: d,
1967
+ dependencies: Y,
1968
+ config: async () => (await import("./WaterfallChart.config-Cns8fLFu.js")).waterfallChartConfig
1898
1969
  },
1899
1970
  candlestick: {
1900
1971
  label: "chart.candlestick.label",
@@ -1908,7 +1979,7 @@ var w = {
1908
1979
  available: !1,
1909
1980
  reason: "chart.availability.requiresDimension"
1910
1981
  } : { available: !0 },
1911
- config: async () => (await import("./CandlestickChart.config-D4Svhmef.js")).candlestickChartConfig
1982
+ config: async () => (await import("./CandlestickChart.config-ZaJpWVuL.js")).candlestickChartConfig
1912
1983
  },
1913
1984
  measureProfile: {
1914
1985
  label: "chart.measureProfile.label",
@@ -1919,31 +1990,31 @@ var w = {
1919
1990
  available: !1,
1920
1991
  reason: "chart.availability.requiresTwoMeasures"
1921
1992
  } : { available: !0 },
1922
- dependencies: J,
1923
- config: async () => (await import("./MeasureProfileChart.config-lERVe38G.js")).measureProfileChartConfig
1993
+ dependencies: Y,
1994
+ config: async () => (await import("./MeasureProfileChart.config-C9OFbN9Z.js")).measureProfileChartConfig
1924
1995
  },
1925
1996
  proportionBar: {
1926
1997
  label: "chart.proportionBar.label",
1927
1998
  icon: "chartProportionBar",
1928
1999
  description: "chart.proportionBar.description",
1929
2000
  useCase: "chart.proportionBar.useCase",
1930
- isAvailable: c,
1931
- config: async () => (await import("./ProportionBarChart.config-o0w_Pnlt.js")).proportionBarChartConfig
2001
+ isAvailable: d,
2002
+ config: async () => (await import("./ProportionBarChart.config-B9NEyFEe.js")).proportionBarChartConfig
1932
2003
  },
1933
2004
  gauge: {
1934
2005
  label: "chart.gauge.label",
1935
2006
  icon: "chartGauge",
1936
2007
  description: "chart.gauge.description",
1937
2008
  useCase: "chart.gauge.useCase",
1938
- isAvailable: d,
2009
+ isAvailable: m,
1939
2010
  dependencies: {
1940
2011
  packageName: "d3-shape",
1941
2012
  installCommand: "npm install d3-shape"
1942
2013
  },
1943
- config: async () => (await import("./GaugeChart.config-5PLNlQlu.js")).gaugeChartConfig
2014
+ config: async () => (await import("./GaugeChart.config-DEmrNgMa.js")).gaugeChartConfig
1944
2015
  }
1945
2016
  };
1946
- function ae(e, t) {
2017
+ function le(e, t) {
1947
2018
  return {
1948
2019
  ...t,
1949
2020
  label: e.label,
@@ -1954,41 +2025,45 @@ function ae(e, t) {
1954
2025
  }
1955
2026
  //#endregion
1956
2027
  //#region src/client/charts/chartConfigRegistry.ts
1957
- var oe = {
1958
- bar: w,
1959
- line: ne,
1960
- area: re,
1961
- pie: ie,
1962
- scatter: T,
1963
- bubble: E,
1964
- radar: D,
1965
- radialBar: O,
1966
- treemap: k,
1967
- table: A,
1968
- activityGrid: j,
1969
- kpiNumber: M,
1970
- kpiDelta: N,
1971
- kpiText: P,
1972
- markdown: F,
1973
- funnel: I,
1974
- sankey: L,
1975
- sunburst: R,
1976
- heatmap: z,
1977
- retentionHeatmap: B,
1978
- retentionCombined: V,
1979
- boxPlot: H,
1980
- waterfall: U,
1981
- candlestick: W,
1982
- measureProfile: G,
1983
- proportionBar: K,
1984
- gauge: q
1985
- }, X = Object.fromEntries(Object.keys(Y).map((e) => [e, ae(Y[e], oe[e])]));
2028
+ var ue = {
2029
+ bar: ae,
2030
+ line: oe,
2031
+ area: w,
2032
+ pie: T,
2033
+ scatter: E,
2034
+ bubble: D,
2035
+ radar: O,
2036
+ radialBar: k,
2037
+ treemap: A,
2038
+ table: j,
2039
+ recordsTable: M,
2040
+ activityGrid: N,
2041
+ kpiNumber: P,
2042
+ kpiDelta: F,
2043
+ kpiText: I,
2044
+ markdown: L,
2045
+ funnel: R,
2046
+ sankey: z,
2047
+ sunburst: B,
2048
+ heatmap: V,
2049
+ retentionHeatmap: H,
2050
+ retentionCombined: U,
2051
+ boxPlot: W,
2052
+ waterfall: G,
2053
+ candlestick: K,
2054
+ measureProfile: q,
2055
+ proportionBar: J,
2056
+ gauge: se
2057
+ }, X = Object.fromEntries(Object.keys(ce).map((e) => [e, le(ce[e], ue[e])]));
2058
+ function de(e) {
2059
+ return X[e]?.recordGrain === !0;
2060
+ }
1986
2061
  //#endregion
1987
2062
  //#region src/server/agent/chart-validation.ts
1988
2063
  function Z(e) {
1989
2064
  return Array.isArray(e) ? e.length > 0 : !!e;
1990
2065
  }
1991
- function se(t, n, r, i) {
2066
+ function fe(t, n, r, i) {
1992
2067
  for (let a of t.dropZones) {
1993
2068
  if (!a.mandatory || Z(r?.[a.key])) continue;
1994
2069
  let t = a.acceptTypes?.join("/") ?? "fields";
@@ -2000,32 +2075,35 @@ function se(t, n, r, i) {
2000
2075
  }));
2001
2076
  }
2002
2077
  }
2003
- function ce(t, n, r) {
2078
+ function pe(t, n, r) {
2004
2079
  if (Z(t?.xAxis)) return;
2005
2080
  let i = n.dimensions ?? [], a = n.timeDimensions ?? [], o = i.length > 0 || a.length > 0;
2006
2081
  r.push(e(o ? "server.validation.chart.barXAxisRequired" : "server.validation.chart.barNeedsDimension"));
2007
2082
  }
2008
- function le(e) {
2083
+ function me(e) {
2009
2084
  return Array.isArray(e) ? e : [e];
2010
2085
  }
2011
- function ue(t, n) {
2086
+ function he(t, n) {
2012
2087
  if (!t?.xAxis || !t?.series) return;
2013
- let r = new Set(le(t.xAxis)), i = le(t.series).filter((e) => r.has(e));
2088
+ let r = new Set(me(t.xAxis)), i = me(t.series).filter((e) => r.has(e));
2014
2089
  i.length > 0 && n.push(e("server.validation.chart.seriesDuplicatesXAxis", { duplicates: i.join(", ") }));
2015
2090
  }
2016
- function de(e, t, n) {
2091
+ function ge(t, n, r) {
2092
+ de(t) && n.ungrouped !== !0 && r.push(e("server.validation.chart.recordGrainNeedsUngrouped", { chartType: t }));
2093
+ }
2094
+ function _e(e, t, n) {
2017
2095
  let r = X[e];
2018
2096
  if (!r || r.skipQuery) return {
2019
2097
  isValid: !0,
2020
2098
  errors: []
2021
2099
  };
2022
2100
  let i = [];
2023
- return se(r, e, t, i), e === "bar" && ce(t, n, i), ue(t, i), {
2101
+ return fe(r, e, t, i), ge(e, n, i), e === "bar" && pe(t, n, i), he(t, i), {
2024
2102
  isValid: i.length === 0,
2025
2103
  errors: i
2026
2104
  };
2027
2105
  }
2028
- function fe(e, t, n, r) {
2106
+ function ve(e, t, n, r) {
2029
2107
  if (!(e.acceptTypes ?? []).includes("measure")) return;
2030
2108
  let i = /* @__PURE__ */ new Set();
2031
2109
  for (let r of t.dropZones) {
@@ -2036,7 +2114,7 @@ function fe(e, t, n, r) {
2036
2114
  let a = r.filter((e) => !i.has(e));
2037
2115
  a.length > 0 && (n[e.key] = a[0]);
2038
2116
  }
2039
- function pe(e, t, n) {
2117
+ function ye(e, t, n) {
2040
2118
  let r = e.acceptTypes ?? [], i = [];
2041
2119
  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;
2042
2120
  let a = i;
@@ -2047,7 +2125,7 @@ function pe(e, t, n) {
2047
2125
  let o = e.maxItems ?? Infinity, s = a.slice(0, o);
2048
2126
  s.length > 0 && (t[e.key] = s);
2049
2127
  }
2050
- function me(e, t, n) {
2128
+ function be(e, t, n) {
2051
2129
  let r = X[e];
2052
2130
  if (!r) return t ?? {};
2053
2131
  let i = { ...t }, a = n.timeDimensions ?? [], o = {
@@ -2055,28 +2133,31 @@ function me(e, t, n) {
2055
2133
  dimensions: n.dimensions ?? [],
2056
2134
  timeDimFields: a.map((e) => e.dimension)
2057
2135
  };
2058
- for (let e of r.dropZones) Z(i[e.key]) || (e.key === "sizeField" || e.key === "colorField" ? fe(e, r, i, o.measures) : pe(e, i, o));
2136
+ for (let e of r.dropZones) e.excludeFromInference || Z(i[e.key]) || (e.key === "sizeField" || e.key === "colorField" ? ve(e, r, i, o.measures) : ye(e, i, o));
2059
2137
  return i;
2060
2138
  }
2061
- function he(e) {
2139
+ function xe(t) {
2140
+ return t ? i(t) ? e(t) : t : "";
2141
+ }
2142
+ function Se(e) {
2062
2143
  let t = ["\nChart config requirements by type:"];
2063
2144
  for (let n of e) {
2064
2145
  let e = X[n];
2065
2146
  if (!e) continue;
2066
- let r = [e.description ?? "", e.useCase ?? ""].filter(Boolean).join(". "), i = r ? ` — ${r}.` : "", a = e.dropZones.filter((e) => e.mandatory);
2067
- if (a.length === 0 && !e.skipQuery) {
2068
- t.push(` ${n}${i} chartConfig auto-inferred from query.`);
2147
+ let r = [xe(e.description), xe(e.useCase)].filter(Boolean).join(". "), i = r ? ` — ${r}.` : "", a = de(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);
2148
+ if (o.length === 0 && !e.skipQuery) {
2149
+ t.push(` ${n}${i}${a} chartConfig auto-inferred from query.`);
2069
2150
  continue;
2070
2151
  }
2071
2152
  if (e.skipQuery) {
2072
2153
  t.push(` ${n}${i} No query needed.`);
2073
2154
  continue;
2074
2155
  }
2075
- let o = a.map((e) => {
2156
+ let s = o.map((e) => {
2076
2157
  let t = e.acceptTypes?.join("/") ?? "any", n = e.maxItems ? ` (max ${e.maxItems})` : "";
2077
2158
  return `${e.key}=[${t}]${n}`;
2078
2159
  });
2079
- t.push(` ${n}${i} Requires ${o.join(", ")}.`);
2160
+ t.push(` ${n}${i}${a} Requires ${s.join(", ")}.`);
2080
2161
  }
2081
2162
  return t.join("\n");
2082
2163
  }
@@ -2100,9 +2181,10 @@ var Q = [
2100
2181
  "retentionHeatmap",
2101
2182
  "retentionCombined",
2102
2183
  "boxPlot",
2103
- "markdown"
2184
+ "markdown",
2185
+ "recordsTable"
2104
2186
  ];
2105
- function ge() {
2187
+ function Ce() {
2106
2188
  return [
2107
2189
  {
2108
2190
  name: "discover_cubes",
@@ -2142,12 +2224,12 @@ function ge() {
2142
2224
  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.",
2143
2225
  parameters: {
2144
2226
  type: "object",
2145
- properties: s
2227
+ properties: c
2146
2228
  }
2147
2229
  },
2148
2230
  {
2149
2231
  name: "add_portlet",
2150
- description: "Add a chart visualization to the notebook.\n" + he(Q) + "\nThe query is validated before adding. The portlet fetches its own data.",
2232
+ description: "Add a chart visualization to the notebook.\n" + Se(Q) + "\nThe query is validated before adding. The portlet fetches its own data.",
2151
2233
  parameters: {
2152
2234
  type: "object",
2153
2235
  properties: {
@@ -2184,7 +2266,8 @@ function ge() {
2184
2266
  yAxisAssignment: {
2185
2267
  type: "object",
2186
2268
  description: "Dual Y-axis: map measure fields to \"left\" or \"right\" axis. Only for bar, line, area charts with 2+ measures of different scales. Example: {\"Sales.revenue\": \"left\", \"Sales.conversionRate\": \"right\"}"
2187
- }
2269
+ },
2270
+ ...u
2188
2271
  },
2189
2272
  description: "Chart axis configuration"
2190
2273
  },
@@ -2198,7 +2281,8 @@ function ge() {
2198
2281
  orientation: {
2199
2282
  type: "string",
2200
2283
  enum: ["horizontal", "vertical"]
2201
- }
2284
+ },
2285
+ ...l
2202
2286
  },
2203
2287
  description: "Chart display configuration"
2204
2288
  }
@@ -2280,13 +2364,15 @@ function ge() {
2280
2364
  items: { type: "string" }
2281
2365
  },
2282
2366
  sizeField: { type: "string" },
2283
- colorField: { type: "string" }
2367
+ colorField: { type: "string" },
2368
+ ...u
2284
2369
  },
2285
2370
  description: "Chart axis configuration"
2286
2371
  },
2287
2372
  displayConfig: {
2288
2373
  type: "object",
2289
- description: "Chart display configuration (for markdown: { content, hideHeader, transparentBackground, autoHeight })"
2374
+ description: "Chart display configuration (for markdown: { content, hideHeader, transparentBackground, autoHeight })",
2375
+ properties: l
2290
2376
  },
2291
2377
  dashboardFilterMapping: {
2292
2378
  type: "array",
@@ -2394,10 +2480,10 @@ function ge() {
2394
2480
  }
2395
2481
  ];
2396
2482
  }
2397
- function _e(e) {
2398
- let { semanticLayer: t, securityContext: n } = e, o = /* @__PURE__ */ new Map();
2399
- o.set("discover_cubes", async (e) => {
2400
- let n = { cubes: (await a(t, {
2483
+ function we(e) {
2484
+ let { semanticLayer: t, securityContext: n } = e, i = /* @__PURE__ */ new Map();
2485
+ i.set("discover_cubes", async (e) => {
2486
+ let r = { cubes: (await o(t, n, {
2401
2487
  topic: e.topic,
2402
2488
  intent: e.intent,
2403
2489
  limit: e.limit,
@@ -2409,6 +2495,7 @@ function _e(e) {
2409
2495
  relevanceScore: e.relevanceScore,
2410
2496
  suggestedMeasures: e.suggestedMeasures,
2411
2497
  suggestedDimensions: e.suggestedDimensions,
2498
+ ...e.fieldTitles ? { fieldTitles: e.fieldTitles } : {},
2412
2499
  capabilities: e.capabilities,
2413
2500
  ...e.capabilities.funnel || e.capabilities.flow || e.capabilities.retention ? { analysisConfig: {
2414
2501
  candidateBindingKeys: e.analysisConfig?.candidateBindingKeys?.map((e) => e.dimension) ?? [],
@@ -2416,13 +2503,13 @@ function _e(e) {
2416
2503
  ...e.analysisConfig?.candidateEventDimensions?.length ? { candidateEventDimensions: e.analysisConfig.candidateEventDimensions.map((e) => e.dimension) } : {}
2417
2504
  } } : {}
2418
2505
  })) };
2419
- return { result: JSON.stringify(n) + "\n[IMPORTANT: Your next response MUST start with a brief text message BEFORE any tool calls.]" };
2420
- }), o.set("get_cube_metadata", async () => {
2421
- let e = t.getMetadata();
2506
+ return { result: JSON.stringify(r) + "\n[IMPORTANT: Your next response MUST start with a brief text message BEFORE any tool calls.]" };
2507
+ }), i.set("get_cube_metadata", async () => {
2508
+ let e = t.getMetadata(n);
2422
2509
  return { result: JSON.stringify(e) };
2423
2510
  });
2424
2511
  let s = /* @__PURE__ */ new Map();
2425
- for (let e of t.getMetadata()) s.set(e.name, {
2512
+ for (let e of t.getMetadata(n)) s.set(e.name, {
2426
2513
  measures: (e.measures || []).map((e) => e.name),
2427
2514
  dimensions: (e.dimensions || []).map((e) => e.name)
2428
2515
  });
@@ -2430,7 +2517,7 @@ function _e(e) {
2430
2517
  let n = s.get(e), r = t === "measures" ? n?.measures : n?.dimensions;
2431
2518
  return !r || r.length === 0 ? "" : ` Available ${t}: ${r.slice(0, 5).map((e) => `"${e}"`).join(", ")}`;
2432
2519
  };
2433
- return o.set("execute_query", async (e) => {
2520
+ return i.set("execute_query", async (e) => {
2434
2521
  try {
2435
2522
  let r = (e, t) => {
2436
2523
  if (!Array.isArray(e)) return;
@@ -2443,8 +2530,8 @@ function _e(e) {
2443
2530
  if (n.length > 0) throw Error(`Invalid ${t}:\n${n.join("\n")}`);
2444
2531
  };
2445
2532
  r(e.measures, "measures"), r(e.dimensions, "dimensions");
2446
- let a;
2447
- a = e.funnel ? { funnel: e.funnel } : e.flow ? { flow: e.flow } : e.retention ? { retention: e.retention } : {
2533
+ let i;
2534
+ i = e.funnel ? { funnel: e.funnel } : e.flow ? { flow: e.flow } : e.retention ? { retention: e.retention } : {
2448
2535
  measures: e.measures,
2449
2536
  dimensions: e.dimensions,
2450
2537
  filters: e.filters,
@@ -2454,7 +2541,7 @@ function _e(e) {
2454
2541
  offset: e.offset,
2455
2542
  ungrouped: e.ungrouped
2456
2543
  };
2457
- let o = await i(t, n, { query: a });
2544
+ let o = await a(t, n, { query: i });
2458
2545
  return { result: JSON.stringify({
2459
2546
  rowCount: o.data.length,
2460
2547
  data: o.data,
@@ -2477,51 +2564,51 @@ function _e(e) {
2477
2564
  isError: !0
2478
2565
  };
2479
2566
  }
2480
- }), o.set("add_portlet", async (e) => {
2481
- let n = {
2567
+ }), i.set("add_portlet", async (e) => {
2568
+ let i = {
2482
2569
  number: "kpiNumber",
2483
2570
  retention: "retentionHeatmap"
2484
- }[e.chartType] ?? e.chartType, i;
2571
+ }[e.chartType] ?? e.chartType, a;
2485
2572
  try {
2486
- i = JSON.parse(e.query);
2573
+ a = JSON.parse(e.query);
2487
2574
  } catch {
2488
2575
  return {
2489
2576
  result: "Invalid query: could not parse JSON string. Ensure `query` is a valid JSON string.",
2490
2577
  isError: !0
2491
2578
  };
2492
2579
  }
2493
- i = r(i);
2494
- let a = t.validateQuery(i);
2495
- if (!a.isValid) return {
2496
- result: `Invalid query — fix these errors and retry:\n${a.errors.join("\n")}\n\nAttempted query:\n${JSON.stringify(i, null, 2)}`,
2580
+ a = r(a);
2581
+ let o = t.validateQuery(a, n);
2582
+ if (!o.isValid) return {
2583
+ result: `Invalid query — fix these errors and retry:\n${o.errors.join("\n")}\n\nAttempted query:\n${JSON.stringify(a, null, 2)}`,
2497
2584
  isError: !0
2498
2585
  };
2499
- let o = !!(i.funnel || i.flow || i.retention), s;
2500
- if (o) s = e.chartConfig ?? {};
2586
+ let s = !!(a.funnel || a.flow || a.retention), c;
2587
+ if (s) c = e.chartConfig ?? {};
2501
2588
  else {
2502
- let t = me(n, e.chartConfig, i), r = de(n, t, i);
2503
- if (!r.isValid) return {
2504
- result: `Chart config invalid — fix these errors and retry:\n${r.errors.join("\n")}`,
2589
+ let t = be(i, e.chartConfig, a), n = _e(i, t, a);
2590
+ if (!n.isValid) return {
2591
+ result: `Chart config invalid — fix these errors and retry:\n${n.errors.join("\n")}`,
2505
2592
  isError: !0
2506
2593
  };
2507
- s = t;
2594
+ c = t;
2508
2595
  }
2509
- let c = `portlet-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`, l = {
2510
- id: c,
2596
+ let l = `portlet-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`, u = {
2597
+ id: l,
2511
2598
  title: e.title,
2512
- query: e.query,
2513
- chartType: n,
2514
- chartConfig: s,
2599
+ query: JSON.stringify(a),
2600
+ chartType: i,
2601
+ chartConfig: c,
2515
2602
  displayConfig: e.displayConfig
2516
2603
  };
2517
2604
  return {
2518
- result: `Portlet "${e.title}" added to notebook (id: ${c}, chart: ${n}). [Reminder: in your next response, start with a brief sentence about what you will do next BEFORE making any tool calls.]`,
2605
+ result: `Portlet "${e.title}" added to notebook (id: ${l}, chart: ${i}). [Reminder: in your next response, start with a brief sentence about what you will do next BEFORE making any tool calls.]`,
2519
2606
  sideEffect: {
2520
2607
  type: "add_portlet",
2521
- data: l
2608
+ data: u
2522
2609
  }
2523
2610
  };
2524
- }), o.set("add_markdown", async (e) => {
2611
+ }), i.set("add_markdown", async (e) => {
2525
2612
  let t = `markdown-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`, n = e.content || e.text || e.markdown || "", r = {
2526
2613
  id: t,
2527
2614
  title: e.title,
@@ -2534,59 +2621,69 @@ function _e(e) {
2534
2621
  data: r
2535
2622
  }
2536
2623
  };
2537
- }), o.set("save_as_dashboard", async (e) => {
2624
+ }), i.set("save_as_dashboard", async (e) => {
2538
2625
  try {
2539
- let n = e.portlets;
2540
- if (!n || n.length === 0) return {
2626
+ let i = e.portlets;
2627
+ if (!i || i.length === 0) return {
2541
2628
  result: "Dashboard must contain at least one portlet.",
2542
2629
  isError: !0
2543
2630
  };
2544
- let i = [];
2545
- for (let e of n) {
2546
- if (e.chartType === "markdown") continue;
2547
- let n = e.query;
2548
- if (!n) {
2549
- i.push(`Portlet "${e.title}": missing query`);
2631
+ let a = [], o = /* @__PURE__ */ new Map();
2632
+ for (let e of i) {
2633
+ let i = e.chartType;
2634
+ if (i === "markdown") continue;
2635
+ let s = e.query;
2636
+ if (!s) {
2637
+ a.push(`Portlet "${e.title}": missing query`);
2550
2638
  continue;
2551
2639
  }
2552
- let a;
2640
+ let c;
2553
2641
  try {
2554
- a = JSON.parse(n);
2642
+ c = JSON.parse(s);
2555
2643
  } catch {
2556
- i.push(`Portlet "${e.title}": invalid JSON query`);
2644
+ a.push(`Portlet "${e.title}": invalid JSON query`);
2645
+ continue;
2646
+ }
2647
+ c = r(c);
2648
+ let l = t.validateQuery(c, n);
2649
+ if (!l.isValid) {
2650
+ a.push(`Portlet "${e.title}": ${l.errors.join(", ")}`);
2651
+ continue;
2652
+ }
2653
+ let u = be(i, e.chartConfig, c), d = _e(i, u, c);
2654
+ if (!d.isValid) {
2655
+ a.push(`Portlet "${e.title}": ${d.errors.join(", ")}`);
2557
2656
  continue;
2558
2657
  }
2559
- a = r(a);
2560
- let o = t.validateQuery(a);
2561
- o.isValid || i.push(`Portlet "${e.title}": ${o.errors.join(", ")}`);
2658
+ o.set(e, u);
2562
2659
  }
2563
- if (i.length > 0) return {
2564
- result: `Dashboard has invalid portlets — fix these errors and retry:\n${i.join("\n")}`,
2660
+ if (a.length > 0) return {
2661
+ result: `Dashboard has invalid portlets — fix these errors and retry:\n${a.join("\n")}`,
2565
2662
  isError: !0
2566
2663
  };
2567
- let a = {
2568
- portlets: n.map((e) => {
2569
- let t = e.chartType, n = t === "markdown", r = n ? "query" : e.analysisType || "query", i = r === "funnel" ? "funnel" : r === "flow" ? "flow" : r === "retention" ? "retention" : "query", a = e.query || "{}", o;
2664
+ let s = {
2665
+ portlets: i.map((e) => {
2666
+ let t = e.chartType, n = t === "markdown", r = n ? "query" : e.analysisType || "query", i = r === "funnel" ? "funnel" : r === "flow" ? "flow" : r === "retention" ? "retention" : "query", a = e.query || "{}", s;
2570
2667
  try {
2571
- o = JSON.parse(a);
2668
+ s = JSON.parse(a);
2572
2669
  } catch {
2573
- o = {};
2670
+ s = {};
2574
2671
  }
2575
- let s = {
2672
+ let c = {
2576
2673
  version: 1,
2577
2674
  analysisType: i,
2578
2675
  activeView: "chart",
2579
2676
  charts: { [i]: {
2580
2677
  chartType: t,
2581
- chartConfig: e.chartConfig || {},
2678
+ chartConfig: o.get(e) ?? e.chartConfig ?? {},
2582
2679
  displayConfig: e.displayConfig || {}
2583
2680
  } },
2584
- query: n ? {} : o
2681
+ query: n ? {} : s
2585
2682
  };
2586
2683
  return {
2587
2684
  id: e.id,
2588
2685
  title: e.title,
2589
- analysisConfig: s,
2686
+ analysisConfig: c,
2590
2687
  dashboardFilterMapping: e.dashboardFilterMapping,
2591
2688
  w: e.w,
2592
2689
  h: e.h,
@@ -2596,15 +2693,15 @@ function _e(e) {
2596
2693
  }),
2597
2694
  filters: e.filters,
2598
2695
  colorPalette: e.colorPalette
2599
- }, o = e.title;
2696
+ }, c = e.title;
2600
2697
  return {
2601
- result: `Dashboard "${o}" created with ${a.portlets.length} portlets and ${a.filters?.length || 0} filters.`,
2698
+ result: `Dashboard "${c}" created with ${s.portlets.length} portlets and ${s.filters?.length || 0} filters.`,
2602
2699
  sideEffect: {
2603
2700
  type: "dashboard_saved",
2604
2701
  data: {
2605
- title: o,
2702
+ title: c,
2606
2703
  description: e.description,
2607
- dashboardConfig: a
2704
+ dashboardConfig: s
2608
2705
  }
2609
2706
  }
2610
2707
  };
@@ -2614,22 +2711,22 @@ function _e(e) {
2614
2711
  isError: !0
2615
2712
  };
2616
2713
  }
2617
- }), o;
2714
+ }), i;
2618
2715
  }
2619
2716
  //#endregion
2620
2717
  //#region src/server/agent/providers/factory.ts
2621
- async function ve(e, t, n) {
2718
+ async function Te(e, t, n) {
2622
2719
  switch (e) {
2623
2720
  case "anthropic": {
2624
2721
  let { AnthropicProvider: e } = await import("./anthropic-CZh4hB-m.js");
2625
2722
  return new e(t);
2626
2723
  }
2627
2724
  case "openai": {
2628
- let { OpenAIProvider: e } = await import("./openai-Crp3X_zg.js");
2725
+ let { OpenAIProvider: e } = await import("./openai-BZ48ioYp.js");
2629
2726
  return new e(t, n);
2630
2727
  }
2631
2728
  case "google": {
2632
- let { GoogleProvider: e } = await import("./google-eKAc20al.js");
2729
+ let { GoogleProvider: e } = await import("./google-DRY7jnOh.js");
2633
2730
  return new e(t);
2634
2731
  }
2635
2732
  default: throw Error(`Unknown LLM provider: "${e}". Supported providers: anthropic, openai, google`);
@@ -2637,7 +2734,7 @@ async function ve(e, t, n) {
2637
2734
  }
2638
2735
  //#endregion
2639
2736
  //#region src/server/agent/handler-steps.ts
2640
- function ye(e, t) {
2737
+ function Ee(e, t) {
2641
2738
  if (Array.isArray(t)) for (let n of t) e.push(n);
2642
2739
  else e.push(t);
2643
2740
  }
@@ -2646,7 +2743,7 @@ function $(e) {
2646
2743
  e();
2647
2744
  } catch {}
2648
2745
  }
2649
- function be(e, t) {
2746
+ function De(e, t) {
2650
2747
  let n = [];
2651
2748
  if (!e || e.length === 0) return n;
2652
2749
  for (let r of e) {
@@ -2679,7 +2776,7 @@ function be(e, t) {
2679
2776
  content: typeof e.result == "string" ? e.result : JSON.stringify(e.result ?? ""),
2680
2777
  isError: e.status === "error"
2681
2778
  }));
2682
- ye(n, t.formatToolResults(i));
2779
+ Ee(n, t.formatToolResults(i));
2683
2780
  } else e.length > 0 && n.push({
2684
2781
  role: "assistant",
2685
2782
  content: r.content
@@ -2687,21 +2784,21 @@ function be(e, t) {
2687
2784
  }
2688
2785
  return n;
2689
2786
  }
2690
- function xe(e, t) {
2787
+ function Oe(e, t) {
2691
2788
  if (!(e?.type !== "tool_use" || !t)) try {
2692
2789
  e.input = JSON.parse(t);
2693
2790
  } catch {
2694
2791
  e.input = {};
2695
2792
  }
2696
2793
  }
2697
- function Se(e, t) {
2794
+ function ke(e, t) {
2698
2795
  let n = e.contentBlocks[e.contentBlocks.length - 1];
2699
2796
  n && n.type === "text" ? n.text = (n.text || "") + t : e.contentBlocks.push({
2700
2797
  type: "text",
2701
2798
  text: t
2702
2799
  });
2703
2800
  }
2704
- function Ce(e, t) {
2801
+ function Ae(e, t) {
2705
2802
  if (e.currentBlockIsToolUse && e.currentToolInputJson) {
2706
2803
  let t = e.contentBlocks[e.contentBlocks.length - 1];
2707
2804
  if (t?.type === "tool_use") try {
@@ -2716,16 +2813,16 @@ function Ce(e, t) {
2716
2813
  ...t.metadata ? { metadata: t.metadata } : {}
2717
2814
  }), e.currentToolInputJson = "", e.currentBlockIsToolUse = !0;
2718
2815
  }
2719
- function we(e, t) {
2816
+ function je(e, t) {
2720
2817
  if (t.id && t.input) {
2721
2818
  let n = e.contentBlocks.find((e) => e.type === "tool_use" && e.id === t.id);
2722
2819
  n && (n.input = t.input);
2723
2820
  } else if (e.currentBlockIsToolUse) {
2724
2821
  let t = e.contentBlocks[e.contentBlocks.length - 1];
2725
- t?.type === "tool_use" && e.currentToolInputJson && (xe(t, e.currentToolInputJson), e.currentToolInputJson = ""), e.currentBlockIsToolUse = !1;
2822
+ t?.type === "tool_use" && e.currentToolInputJson && (Oe(t, e.currentToolInputJson), e.currentToolInputJson = ""), e.currentBlockIsToolUse = !1;
2726
2823
  }
2727
2824
  }
2728
- async function* Te(e, t) {
2825
+ async function* Me(e, t) {
2729
2826
  let n = {
2730
2827
  contentBlocks: [],
2731
2828
  currentToolInputJson: "",
@@ -2736,13 +2833,13 @@ async function* Te(e, t) {
2736
2833
  let e = r;
2737
2834
  switch (e.type) {
2738
2835
  case "text_delta":
2739
- Se(n, e.text), yield {
2836
+ ke(n, e.text), yield {
2740
2837
  type: "text_delta",
2741
2838
  data: e.text
2742
2839
  };
2743
2840
  break;
2744
2841
  case "tool_use_start":
2745
- Ce(n, e), yield {
2842
+ Ae(n, e), yield {
2746
2843
  type: "tool_use_start",
2747
2844
  data: {
2748
2845
  id: e.id,
@@ -2755,7 +2852,7 @@ async function* Te(e, t) {
2755
2852
  n.currentToolInputJson += e.json;
2756
2853
  break;
2757
2854
  case "tool_use_end":
2758
- we(n, e);
2855
+ je(n, e);
2759
2856
  break;
2760
2857
  case "message_meta": e.inputTokens != null && (n.inputTokens = e.inputTokens), e.outputTokens != null && (n.outputTokens = e.outputTokens), e.stopReason && (n.stopReason = e.stopReason);
2761
2858
  }
@@ -2767,7 +2864,7 @@ async function* Te(e, t) {
2767
2864
  outputTokens: n.outputTokens
2768
2865
  };
2769
2866
  }
2770
- async function* Ee(e, t) {
2867
+ async function* Ne(e, t) {
2771
2868
  let { executor: n, observability: r, traceId: i, turn: a } = t, o = e.name, s = e.input || {}, c = e.id, l = n.get(o);
2772
2869
  if (!l) return yield {
2773
2870
  type: "tool_use_result",
@@ -2832,26 +2929,26 @@ async function* Ee(e, t) {
2832
2929
  };
2833
2930
  }
2834
2931
  }
2835
- async function* De(e, t) {
2932
+ async function* Pe(e, t) {
2836
2933
  let n = [];
2837
2934
  for (let r of e) {
2838
2935
  if (r.type !== "tool_use") continue;
2839
- let e = yield* Ee(r, t);
2936
+ let e = yield* Ne(r, t);
2840
2937
  n.push(e);
2841
2938
  }
2842
2939
  return n;
2843
2940
  }
2844
2941
  //#endregion
2845
2942
  //#region src/server/agent/handler.ts
2846
- var Oe = {
2943
+ var Fe = {
2847
2944
  anthropic: "claude-sonnet-4-6",
2848
2945
  openai: "gpt-4.1-mini",
2849
2946
  google: "gemini-3-flash-preview"
2850
2947
  };
2851
- async function* ke(t) {
2852
- let { message: n, history: r, semanticLayer: i, securityContext: a, agentConfig: o, apiKey: s } = t, c = t.sessionId || crypto.randomUUID(), l = o.observability, u = crypto.randomUUID(), d = Date.now(), f = t.providerOverride || o.provider || "anthropic", p = t.modelOverride || o.model || Oe[f] || "claude-sonnet-4-6", m = t.baseURLOverride || o.baseURL, h = o.maxTurns || 25, g = o.maxTokens || 4096, _;
2948
+ async function* Ie(t) {
2949
+ let { message: n, history: r, semanticLayer: i, securityContext: a, agentConfig: o, apiKey: s } = t, c = t.sessionId || crypto.randomUUID(), l = o.observability, u = crypto.randomUUID(), d = Date.now(), f = t.providerOverride || o.provider || "anthropic", p = t.modelOverride || o.model || Fe[f] || "claude-sonnet-4-6", m = t.baseURLOverride || o.baseURL, h = o.maxTurns || 25, g = o.maxTokens || 4096, _;
2853
2950
  try {
2854
- _ = await ve(f, s, { baseURL: m });
2951
+ _ = await Te(f, s, { baseURL: m });
2855
2952
  } catch (t) {
2856
2953
  console.error("[agent] Failed to create %s provider: %s", String(f).replace(/\n|\r/g, ""), String(t instanceof Error ? t.message : t).replace(/\n|\r/g, "")), yield {
2857
2954
  type: "error",
@@ -2859,10 +2956,10 @@ async function* ke(t) {
2859
2956
  };
2860
2957
  return;
2861
2958
  }
2862
- let v = ge(), y = _e({
2959
+ let v = Ce(), y = we({
2863
2960
  semanticLayer: i,
2864
2961
  securityContext: a
2865
- }), b = te(i.getMetadata());
2962
+ }), b = ie(i.getMetadata(a));
2866
2963
  t.systemContext && (b += `\n\n## User Context\n\n${t.systemContext}`), $(() => l?.onChatStart?.({
2867
2964
  traceId: u,
2868
2965
  sessionId: c,
@@ -2870,7 +2967,7 @@ async function* ke(t) {
2870
2967
  model: p,
2871
2968
  historyLength: r?.length ?? 0
2872
2969
  }));
2873
- let x = be(r, _);
2970
+ let x = De(r, _);
2874
2971
  x.push({
2875
2972
  role: "user",
2876
2973
  content: n
@@ -2885,7 +2982,7 @@ async function* ke(t) {
2885
2982
  system: b,
2886
2983
  tools: v,
2887
2984
  messages: x
2888
- }), n = Date.now(), { contentBlocks: r, stopReason: i, inputTokens: a, outputTokens: o } = yield* Te(_, t);
2985
+ }), n = Date.now(), { contentBlocks: r, stopReason: i, inputTokens: a, outputTokens: o } = yield* Me(_, t);
2889
2986
  if ($(() => l?.onGenerationEnd?.({
2890
2987
  traceId: u,
2891
2988
  turn: e,
@@ -2900,7 +2997,7 @@ async function* ke(t) {
2900
2997
  role: "assistant",
2901
2998
  content: r
2902
2999
  }), !_.shouldContinue(i)) break;
2903
- let s = yield* De(r, {
3000
+ let s = yield* Pe(r, {
2904
3001
  executor: y,
2905
3002
  observability: l,
2906
3003
  traceId: u,
@@ -2909,7 +3006,7 @@ async function* ke(t) {
2909
3006
  yield {
2910
3007
  type: "turn_complete",
2911
3008
  data: {}
2912
- }, ye(x, _.formatToolResults(s));
3009
+ }, Ee(x, _.formatToolResults(s));
2913
3010
  }
2914
3011
  $(() => l?.onChatEnd?.({
2915
3012
  traceId: u,
@@ -2940,4 +3037,4 @@ async function* ke(t) {
2940
3037
  }
2941
3038
  }
2942
3039
  //#endregion
2943
- export { T as C, w as D, ne as E, E as S, re as T, j as _, U as a, O as b, B as c, L as d, I as f, M as g, N as h, ke as handleAgentChat, W as i, z as l, P as m, K as n, H as o, F as p, G as r, V as s, q as t, R as u, A as v, ie as w, D as x, k as y };
3040
+ export { D as C, oe as D, w as E, ae as O, O as S, T, N as _, G as a, A as b, H as c, z as d, R as f, P as g, F as h, Ie as handleAgentChat, K as i, V as l, I as m, J as n, W as o, L as p, q as r, U as s, se as t, B as u, M as v, E as w, k as x, j as y };