@sqlrooms/mosaic 0.29.0-rc.7 → 0.29.0-rc.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +2 -1
- package/README.md +179 -35
- package/dist/MosaicSlice.d.ts +1 -0
- package/dist/MosaicSlice.d.ts.map +1 -1
- package/dist/MosaicSlice.js.map +1 -1
- package/dist/VgPlotChart.d.ts.map +1 -1
- package/dist/VgPlotChart.js +9 -3
- package/dist/VgPlotChart.js.map +1 -1
- package/dist/ai/agentIntent.d.ts +5 -0
- package/dist/ai/agentIntent.d.ts.map +1 -0
- package/dist/ai/agentIntent.js +8 -0
- package/dist/ai/agentIntent.js.map +1 -0
- package/dist/ai/block-document/constants.d.ts +9 -0
- package/dist/ai/block-document/constants.d.ts.map +1 -0
- package/dist/ai/block-document/constants.js +9 -0
- package/dist/ai/block-document/constants.js.map +1 -0
- package/dist/ai/block-document/createAddMosaicDashboardBlockTool.d.ts +48 -0
- package/dist/ai/block-document/createAddMosaicDashboardBlockTool.d.ts.map +1 -0
- package/dist/ai/block-document/createAddMosaicDashboardBlockTool.js +59 -0
- package/dist/ai/block-document/createAddMosaicDashboardBlockTool.js.map +1 -0
- package/dist/ai/block-document/createBlockDocumentChartTools.d.ts +19 -0
- package/dist/ai/block-document/createBlockDocumentChartTools.d.ts.map +1 -0
- package/dist/ai/block-document/createBlockDocumentChartTools.js +37 -0
- package/dist/ai/block-document/createBlockDocumentChartTools.js.map +1 -0
- package/dist/ai/block-document/createBlockDocumentDataTableExplorerTool.d.ts +32 -0
- package/dist/ai/block-document/createBlockDocumentDataTableExplorerTool.d.ts.map +1 -0
- package/dist/ai/block-document/createBlockDocumentDataTableExplorerTool.js +37 -0
- package/dist/ai/block-document/createBlockDocumentDataTableExplorerTool.js.map +1 -0
- package/dist/ai/constants.d.ts +3 -0
- package/dist/ai/constants.d.ts.map +1 -0
- package/dist/ai/constants.js +3 -0
- package/dist/ai/constants.js.map +1 -0
- package/dist/ai/createDataTableExplorerTool.d.ts +69 -0
- package/dist/ai/createDataTableExplorerTool.d.ts.map +1 -0
- package/dist/ai/createDataTableExplorerTool.js +68 -0
- package/dist/ai/createDataTableExplorerTool.js.map +1 -0
- package/dist/ai/dashboard/constants.d.ts +6 -0
- package/dist/ai/dashboard/constants.d.ts.map +1 -0
- package/dist/ai/dashboard/constants.js +6 -0
- package/dist/ai/dashboard/constants.js.map +1 -0
- package/dist/ai/dashboard/createDashboardAgentTool.d.ts +17 -0
- package/dist/ai/dashboard/createDashboardAgentTool.d.ts.map +1 -0
- package/dist/ai/dashboard/createDashboardAgentTool.js +205 -0
- package/dist/ai/dashboard/createDashboardAgentTool.js.map +1 -0
- package/dist/ai/dashboard/createDashboardAiAdapter.d.ts +14 -0
- package/dist/ai/dashboard/createDashboardAiAdapter.d.ts.map +1 -0
- package/dist/ai/dashboard/createDashboardAiAdapter.js +75 -0
- package/dist/ai/dashboard/createDashboardAiAdapter.js.map +1 -0
- package/dist/ai/dashboard/createDashboardAiTools.d.ts +26 -0
- package/dist/ai/dashboard/createDashboardAiTools.d.ts.map +1 -0
- package/dist/ai/dashboard/createDashboardAiTools.js +40 -0
- package/dist/ai/dashboard/createDashboardAiTools.js.map +1 -0
- package/dist/ai/dashboard/createDashboardChartTools.d.ts +27 -0
- package/dist/ai/dashboard/createDashboardChartTools.d.ts.map +1 -0
- package/dist/ai/dashboard/createDashboardChartTools.js +55 -0
- package/dist/ai/dashboard/createDashboardChartTools.js.map +1 -0
- package/dist/ai/dashboard/createDashboardDataTableExplorerTool.d.ts +23 -0
- package/dist/ai/dashboard/createDashboardDataTableExplorerTool.d.ts.map +1 -0
- package/dist/ai/dashboard/createDashboardDataTableExplorerTool.js +29 -0
- package/dist/ai/dashboard/createDashboardDataTableExplorerTool.js.map +1 -0
- package/dist/ai/dashboard/createListDashboardPanelsTool.d.ts +28 -0
- package/dist/ai/dashboard/createListDashboardPanelsTool.d.ts.map +1 -0
- package/dist/ai/dashboard/createListDashboardPanelsTool.js +54 -0
- package/dist/ai/dashboard/createListDashboardPanelsTool.js.map +1 -0
- package/dist/ai/dashboard/dashboard-types.d.ts +59 -0
- package/dist/ai/dashboard/dashboard-types.d.ts.map +1 -0
- package/dist/ai/dashboard/dashboard-types.js +2 -0
- package/dist/ai/dashboard/dashboard-types.js.map +1 -0
- package/dist/ai/database-types.d.ts +12 -0
- package/dist/ai/database-types.d.ts.map +1 -0
- package/dist/ai/database-types.js +2 -0
- package/dist/ai/database-types.js.map +1 -0
- package/dist/ai/errors.d.ts +8 -0
- package/dist/ai/errors.d.ts.map +1 -0
- package/dist/ai/errors.js +11 -0
- package/dist/ai/errors.js.map +1 -0
- package/dist/ai/tool-helpers.d.ts +28 -29
- package/dist/ai/tool-helpers.d.ts.map +1 -1
- package/dist/ai/tool-helpers.js +38 -76
- package/dist/ai/tool-helpers.js.map +1 -1
- package/dist/ai/tool-schemas.d.ts +9 -4
- package/dist/ai/tool-schemas.d.ts.map +1 -1
- package/dist/ai/tool-schemas.js +12 -12
- package/dist/ai/tool-schemas.js.map +1 -1
- package/dist/ai/tool-types.d.ts +19 -1
- package/dist/ai/tool-types.d.ts.map +1 -1
- package/dist/ai/tool-types.js.map +1 -1
- package/dist/ai/types.d.ts +64 -0
- package/dist/ai/types.d.ts.map +1 -0
- package/dist/ai/types.js +2 -0
- package/dist/ai/types.js.map +1 -0
- package/dist/ai.d.ts +16 -2
- package/dist/ai.d.ts.map +1 -1
- package/dist/ai.js +14 -5
- package/dist/ai.js.map +1 -1
- package/dist/charts/MosaicChart.d.ts +3 -1
- package/dist/charts/MosaicChart.d.ts.map +1 -1
- package/dist/charts/MosaicChart.js +2 -2
- package/dist/charts/MosaicChart.js.map +1 -1
- package/dist/charts/MosaicChartError.d.ts +8 -2
- package/dist/charts/MosaicChartError.d.ts.map +1 -1
- package/dist/charts/MosaicChartError.js +29 -3
- package/dist/charts/MosaicChartError.js.map +1 -1
- package/dist/charts/MosaicChartSettingsButton.d.ts +15 -0
- package/dist/charts/MosaicChartSettingsButton.d.ts.map +1 -0
- package/dist/charts/MosaicChartSettingsButton.js +7 -0
- package/dist/charts/MosaicChartSettingsButton.js.map +1 -0
- package/dist/charts/MosaicChartView.d.ts +2 -0
- package/dist/charts/MosaicChartView.d.ts.map +1 -1
- package/dist/charts/MosaicChartView.js +19 -7
- package/dist/charts/MosaicChartView.js.map +1 -1
- package/dist/charts/chart-settings/MosaicChartSettings.d.ts.map +1 -1
- package/dist/charts/chart-settings/MosaicChartSettings.js +3 -3
- package/dist/charts/chart-settings/MosaicChartSettings.js.map +1 -1
- package/dist/charts/chart-settings/MosaicChartSettingsPanel.js +1 -1
- package/dist/charts/chart-settings/MosaicChartSettingsPanel.js.map +1 -1
- package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.d.ts.map +1 -1
- package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.js +2 -1
- package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.js.map +1 -1
- package/dist/charts/chart-settings/MosaicChartTypeSelector.d.ts.map +1 -1
- package/dist/charts/chart-settings/MosaicChartTypeSelector.js +3 -3
- package/dist/charts/chart-settings/MosaicChartTypeSelector.js.map +1 -1
- package/dist/charts/chart-types/base-types.d.ts +40 -25
- package/dist/charts/chart-types/base-types.d.ts.map +1 -1
- package/dist/charts/chart-types/base-types.js +5 -0
- package/dist/charts/chart-types/base-types.js.map +1 -1
- package/dist/charts/chart-types/box-plot/definition.d.ts.map +1 -1
- package/dist/charts/chart-types/box-plot/definition.js +1 -0
- package/dist/charts/chart-types/box-plot/definition.js.map +1 -1
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.d.ts +37 -3
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.d.ts.map +1 -1
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.js +28 -13
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.js.map +1 -1
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js +2 -2
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js.map +1 -1
- package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.d.ts +12 -1
- package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.d.ts.map +1 -1
- package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.js +13 -3
- package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.js.map +1 -1
- package/dist/charts/chart-types/box-plot/tool.d.ts +20 -24
- package/dist/charts/chart-types/box-plot/tool.d.ts.map +1 -1
- package/dist/charts/chart-types/box-plot/tool.js +25 -33
- package/dist/charts/chart-types/box-plot/tool.js.map +1 -1
- package/dist/charts/chart-types/box-plot/validation.d.ts +9 -0
- package/dist/charts/chart-types/box-plot/validation.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/validation.js +32 -0
- package/dist/charts/chart-types/box-plot/validation.js.map +1 -0
- package/dist/charts/chart-types/chart-config.d.ts +3 -1
- package/dist/charts/chart-types/chart-config.d.ts.map +1 -1
- package/dist/charts/chart-types/chart-config.js +2 -2
- package/dist/charts/chart-types/chart-config.js.map +1 -1
- package/dist/charts/chart-types/column-types.d.ts +8 -0
- package/dist/charts/chart-types/column-types.d.ts.map +1 -0
- package/dist/charts/chart-types/column-types.js +2 -0
- package/dist/charts/chart-types/column-types.js.map +1 -0
- package/dist/charts/chart-types/count-plot/definition.d.ts.map +1 -1
- package/dist/charts/chart-types/count-plot/definition.js +1 -0
- package/dist/charts/chart-types/count-plot/definition.js.map +1 -1
- package/dist/charts/chart-types/count-plot/spec.d.ts +2 -1
- package/dist/charts/chart-types/count-plot/spec.d.ts.map +1 -1
- package/dist/charts/chart-types/count-plot/spec.js +47 -34
- package/dist/charts/chart-types/count-plot/spec.js.map +1 -1
- package/dist/charts/chart-types/count-plot/tool.d.ts +19 -24
- package/dist/charts/chart-types/count-plot/tool.d.ts.map +1 -1
- package/dist/charts/chart-types/count-plot/tool.js +26 -33
- package/dist/charts/chart-types/count-plot/tool.js.map +1 -1
- package/dist/charts/chart-types/count-plot/validation.d.ts +8 -0
- package/dist/charts/chart-types/count-plot/validation.d.ts.map +1 -0
- package/dist/charts/chart-types/count-plot/validation.js +20 -0
- package/dist/charts/chart-types/count-plot/validation.js.map +1 -0
- package/dist/charts/chart-types/createChartInstructions.d.ts +3 -0
- package/dist/charts/chart-types/createChartInstructions.d.ts.map +1 -0
- package/dist/charts/chart-types/createChartInstructions.js +12 -0
- package/dist/charts/chart-types/createChartInstructions.js.map +1 -0
- package/dist/charts/chart-types/createChartTools.d.ts +15 -9
- package/dist/charts/chart-types/createChartTools.d.ts.map +1 -1
- package/dist/charts/chart-types/createChartTools.js +16 -10
- package/dist/charts/chart-types/createChartTools.js.map +1 -1
- package/dist/charts/chart-types/createDefaultChartTypes.js +2 -2
- package/dist/charts/chart-types/createDefaultChartTypes.js.map +1 -1
- package/dist/charts/chart-types/custom-spec/definition.d.ts.map +1 -1
- package/dist/charts/chart-types/custom-spec/definition.js +1 -0
- package/dist/charts/chart-types/custom-spec/definition.js.map +1 -1
- package/dist/charts/chart-types/custom-spec/spec.d.ts +2 -1
- package/dist/charts/chart-types/custom-spec/spec.d.ts.map +1 -1
- package/dist/charts/chart-types/custom-spec/spec.js +16 -12
- package/dist/charts/chart-types/custom-spec/spec.js.map +1 -1
- package/dist/charts/chart-types/errors.d.ts +35 -0
- package/dist/charts/chart-types/errors.d.ts.map +1 -1
- package/dist/charts/chart-types/errors.js +56 -0
- package/dist/charts/chart-types/errors.js.map +1 -1
- package/dist/charts/chart-types/heatmap/definition.d.ts.map +1 -1
- package/dist/charts/chart-types/heatmap/definition.js +1 -0
- package/dist/charts/chart-types/heatmap/definition.js.map +1 -1
- package/dist/charts/chart-types/heatmap/spec.d.ts +2 -1
- package/dist/charts/chart-types/heatmap/spec.d.ts.map +1 -1
- package/dist/charts/chart-types/heatmap/spec.js +21 -21
- package/dist/charts/chart-types/heatmap/spec.js.map +1 -1
- package/dist/charts/chart-types/heatmap/tool.d.ts +20 -24
- package/dist/charts/chart-types/heatmap/tool.d.ts.map +1 -1
- package/dist/charts/chart-types/heatmap/tool.js +27 -37
- package/dist/charts/chart-types/heatmap/tool.js.map +1 -1
- package/dist/charts/chart-types/heatmap/validation.d.ts +9 -0
- package/dist/charts/chart-types/heatmap/validation.d.ts.map +1 -0
- package/dist/charts/chart-types/heatmap/validation.js +34 -0
- package/dist/charts/chart-types/heatmap/validation.js.map +1 -0
- package/dist/charts/chart-types/histogram/HistogramSettings.d.ts.map +1 -1
- package/dist/charts/chart-types/histogram/HistogramSettings.js +3 -1
- package/dist/charts/chart-types/histogram/HistogramSettings.js.map +1 -1
- package/dist/charts/chart-types/histogram/definition.d.ts.map +1 -1
- package/dist/charts/chart-types/histogram/definition.js +1 -0
- package/dist/charts/chart-types/histogram/definition.js.map +1 -1
- package/dist/charts/chart-types/histogram/schema.d.ts +2 -0
- package/dist/charts/chart-types/histogram/schema.d.ts.map +1 -1
- package/dist/charts/chart-types/histogram/schema.js +1 -0
- package/dist/charts/chart-types/histogram/schema.js.map +1 -1
- package/dist/charts/chart-types/histogram/spec.d.ts +2 -1
- package/dist/charts/chart-types/histogram/spec.d.ts.map +1 -1
- package/dist/charts/chart-types/histogram/spec.js +31 -28
- package/dist/charts/chart-types/histogram/spec.js.map +1 -1
- package/dist/charts/chart-types/histogram/tool.d.ts +39 -24
- package/dist/charts/chart-types/histogram/tool.d.ts.map +1 -1
- package/dist/charts/chart-types/histogram/tool.js +39 -33
- package/dist/charts/chart-types/histogram/tool.js.map +1 -1
- package/dist/charts/chart-types/histogram/validation.d.ts +9 -0
- package/dist/charts/chart-types/histogram/validation.d.ts.map +1 -0
- package/dist/charts/chart-types/histogram/validation.js +22 -0
- package/dist/charts/chart-types/histogram/validation.js.map +1 -0
- package/dist/charts/chart-types/index.d.ts +5 -11
- package/dist/charts/chart-types/index.d.ts.map +1 -1
- package/dist/charts/chart-types/index.js +6 -12
- package/dist/charts/chart-types/index.js.map +1 -1
- package/dist/charts/chart-types/line-chart/LineChartSettings.d.ts.map +1 -1
- package/dist/charts/chart-types/line-chart/LineChartSettings.js +4 -13
- package/dist/charts/chart-types/line-chart/LineChartSettings.js.map +1 -1
- package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.d.ts +7 -0
- package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.js +22 -0
- package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.js.map +1 -0
- package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.d.ts +7 -0
- package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.js +42 -0
- package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.js.map +1 -0
- package/dist/charts/chart-types/line-chart/definition.d.ts.map +1 -1
- package/dist/charts/chart-types/line-chart/definition.js +1 -0
- package/dist/charts/chart-types/line-chart/definition.js.map +1 -1
- package/dist/charts/chart-types/line-chart/schema.d.ts +2 -0
- package/dist/charts/chart-types/line-chart/schema.d.ts.map +1 -1
- package/dist/charts/chart-types/line-chart/schema.js +5 -0
- package/dist/charts/chart-types/line-chart/schema.js.map +1 -1
- package/dist/charts/chart-types/line-chart/spec.d.ts +2 -1
- package/dist/charts/chart-types/line-chart/spec.d.ts.map +1 -1
- package/dist/charts/chart-types/line-chart/spec.js +56 -65
- package/dist/charts/chart-types/line-chart/spec.js.map +1 -1
- package/dist/charts/chart-types/line-chart/tool.d.ts +28 -24
- package/dist/charts/chart-types/line-chart/tool.d.ts.map +1 -1
- package/dist/charts/chart-types/line-chart/tool.js +27 -39
- package/dist/charts/chart-types/line-chart/tool.js.map +1 -1
- package/dist/charts/chart-types/line-chart/utils.d.ts +7 -0
- package/dist/charts/chart-types/line-chart/utils.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/utils.js +17 -0
- package/dist/charts/chart-types/line-chart/utils.js.map +1 -0
- package/dist/charts/chart-types/line-chart/validation.d.ts +16 -0
- package/dist/charts/chart-types/line-chart/validation.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/validation.js +43 -0
- package/dist/charts/chart-types/line-chart/validation.js.map +1 -0
- package/dist/charts/chart-types/mosaicChartTypes.d.ts +4 -2
- package/dist/charts/chart-types/mosaicChartTypes.d.ts.map +1 -1
- package/dist/charts/chart-types/mosaicChartTypes.js +2 -2
- package/dist/charts/chart-types/mosaicChartTypes.js.map +1 -1
- package/dist/charts/chart-types/resolveChartTypes.d.ts +3 -0
- package/dist/charts/chart-types/resolveChartTypes.d.ts.map +1 -0
- package/dist/charts/chart-types/resolveChartTypes.js +8 -0
- package/dist/charts/chart-types/resolveChartTypes.js.map +1 -0
- package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.d.ts +3 -0
- package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/{bubble-chart/BubbleChartSettings.js → scatter-plot/ScatterPlotSettings.js} +4 -4
- package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.js.map +1 -0
- package/dist/charts/chart-types/scatter-plot/definition.d.ts +4 -0
- package/dist/charts/chart-types/scatter-plot/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/scatter-plot/definition.js +25 -0
- package/dist/charts/chart-types/scatter-plot/definition.js.map +1 -0
- package/dist/charts/chart-types/{bubble-chart → scatter-plot}/schema.d.ts +5 -5
- package/dist/charts/chart-types/scatter-plot/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/{bubble-chart → scatter-plot}/schema.js +5 -5
- package/dist/charts/chart-types/scatter-plot/schema.js.map +1 -0
- package/dist/charts/chart-types/scatter-plot/spec.d.ts +5 -0
- package/dist/charts/chart-types/scatter-plot/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/scatter-plot/spec.js +37 -0
- package/dist/charts/chart-types/scatter-plot/spec.js.map +1 -0
- package/dist/charts/chart-types/scatter-plot/tool.d.ts +39 -0
- package/dist/charts/chart-types/scatter-plot/tool.d.ts.map +1 -0
- package/dist/charts/chart-types/scatter-plot/tool.js +57 -0
- package/dist/charts/chart-types/scatter-plot/tool.js.map +1 -0
- package/dist/charts/chart-types/scatter-plot/validation.d.ts +13 -0
- package/dist/charts/chart-types/scatter-plot/validation.d.ts.map +1 -0
- package/dist/charts/chart-types/scatter-plot/validation.js +52 -0
- package/dist/charts/chart-types/scatter-plot/validation.js.map +1 -0
- package/dist/charts/chart-types/tool-types.d.ts +43 -0
- package/dist/charts/chart-types/tool-types.d.ts.map +1 -0
- package/dist/charts/chart-types/tool-types.js +2 -0
- package/dist/charts/chart-types/tool-types.js.map +1 -0
- package/dist/charts/chart-types/utils.d.ts +3 -0
- package/dist/charts/chart-types/utils.d.ts.map +1 -0
- package/dist/charts/chart-types/utils.js +4 -0
- package/dist/charts/chart-types/utils.js.map +1 -0
- package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.d.ts.map +1 -1
- package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.js +12 -5
- package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.js.map +1 -1
- package/dist/charts/dashboard/MosaicDashboardChartRenderer.d.ts.map +1 -1
- package/dist/charts/dashboard/MosaicDashboardChartRenderer.js +6 -4
- package/dist/charts/dashboard/MosaicDashboardChartRenderer.js.map +1 -1
- package/dist/charts/useChartDataPolicy.d.ts.map +1 -1
- package/dist/charts/useChartDataPolicy.js +2 -1
- package/dist/charts/useChartDataPolicy.js.map +1 -1
- package/dist/charts/useChartPanelClients.d.ts +8 -0
- package/dist/charts/useChartPanelClients.d.ts.map +1 -0
- package/dist/charts/useChartPanelClients.js +22 -0
- package/dist/charts/useChartPanelClients.js.map +1 -0
- package/dist/charts/useMosaicChartRenderContext.d.ts +2 -3
- package/dist/charts/useMosaicChartRenderContext.d.ts.map +1 -1
- package/dist/charts/useMosaicChartRenderContext.js +15 -15
- package/dist/charts/useMosaicChartRenderContext.js.map +1 -1
- package/dist/charts/worksheet/ChartBlockHeader.d.ts.map +1 -1
- package/dist/charts/worksheet/ChartBlockHeader.js +4 -3
- package/dist/charts/worksheet/ChartBlockHeader.js.map +1 -1
- package/dist/charts/worksheet/ChartBlockRenderer.d.ts.map +1 -1
- package/dist/charts/worksheet/ChartBlockRenderer.js +3 -13
- package/dist/charts/worksheet/ChartBlockRenderer.js.map +1 -1
- package/dist/column-types-utils.d.ts.map +1 -1
- package/dist/column-types-utils.js +12 -4
- package/dist/column-types-utils.js.map +1 -1
- package/dist/components/AggregationSelector.d.ts.map +1 -1
- package/dist/components/AggregationSelector.js +9 -2
- package/dist/components/AggregationSelector.js.map +1 -1
- package/dist/components/BlockCaptionEditor.d.ts +20 -0
- package/dist/components/BlockCaptionEditor.d.ts.map +1 -0
- package/dist/components/BlockCaptionEditor.js +15 -0
- package/dist/components/BlockCaptionEditor.js.map +1 -0
- package/dist/components/ColorSelector.d.ts +12 -0
- package/dist/components/ColorSelector.d.ts.map +1 -0
- package/dist/components/ColorSelector.js +13 -0
- package/dist/components/ColorSelector.js.map +1 -0
- package/dist/components/ColumnSelector.d.ts +1 -0
- package/dist/components/ColumnSelector.d.ts.map +1 -1
- package/dist/components/ColumnSelector.js +2 -2
- package/dist/components/ColumnSelector.js.map +1 -1
- package/dist/components/FieldSelectorInput.d.ts +1 -0
- package/dist/components/FieldSelectorInput.d.ts.map +1 -1
- package/dist/components/FieldSelectorInput.js +4 -9
- package/dist/components/FieldSelectorInput.js.map +1 -1
- package/dist/components/MultiFieldSelector.d.ts +4 -1
- package/dist/components/MultiFieldSelector.d.ts.map +1 -1
- package/dist/components/MultiFieldSelector.js +4 -13
- package/dist/components/MultiFieldSelector.js.map +1 -1
- package/dist/components/TemporalGranularitySelector.d.ts.map +1 -1
- package/dist/components/TemporalGranularitySelector.js +13 -9
- package/dist/components/TemporalGranularitySelector.js.map +1 -1
- package/dist/constants/chart-colors.d.ts +3 -0
- package/dist/constants/chart-colors.d.ts.map +1 -0
- package/dist/constants/chart-colors.js +5 -0
- package/dist/constants/chart-colors.js.map +1 -0
- package/dist/dashboard/DefaultMosaicDashboardBlock.d.ts +2 -1
- package/dist/dashboard/DefaultMosaicDashboardBlock.d.ts.map +1 -1
- package/dist/dashboard/DefaultMosaicDashboardBlock.js +1 -1
- package/dist/dashboard/DefaultMosaicDashboardBlock.js.map +1 -1
- package/dist/dashboard/MosaicDashboardCommands.d.ts +19 -0
- package/dist/dashboard/MosaicDashboardCommands.d.ts.map +1 -0
- package/dist/dashboard/MosaicDashboardCommands.js +226 -0
- package/dist/dashboard/MosaicDashboardCommands.js.map +1 -0
- package/dist/dashboard/MosaicDashboardSlice.d.ts +22 -4
- package/dist/dashboard/MosaicDashboardSlice.d.ts.map +1 -1
- package/dist/dashboard/MosaicDashboardSlice.js +55 -0
- package/dist/dashboard/MosaicDashboardSlice.js.map +1 -1
- package/dist/dashboard/components/ResetFiltersButton.d.ts +14 -0
- package/dist/dashboard/components/ResetFiltersButton.d.ts.map +1 -0
- package/dist/dashboard/components/ResetFiltersButton.js +15 -0
- package/dist/dashboard/components/ResetFiltersButton.js.map +1 -0
- package/dist/dashboard/dashboard-types.d.ts +9 -3
- package/dist/dashboard/dashboard-types.d.ts.map +1 -1
- package/dist/dashboard/dashboard-types.js.map +1 -1
- package/dist/dashboard/hooks/useDashboardResetFilters.d.ts +14 -0
- package/dist/dashboard/hooks/useDashboardResetFilters.d.ts.map +1 -0
- package/dist/dashboard/hooks/useDashboardResetFilters.js +39 -0
- package/dist/dashboard/hooks/useDashboardResetFilters.js.map +1 -0
- package/dist/dashboard/hooks/usePanelResetFilters.d.ts +16 -0
- package/dist/dashboard/hooks/usePanelResetFilters.d.ts.map +1 -0
- package/dist/dashboard/hooks/usePanelResetFilters.js +47 -0
- package/dist/dashboard/hooks/usePanelResetFilters.js.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanel.d.ts.map +1 -1
- package/dist/dashboard/panel/MosaicDashboardPanel.js +1 -1
- package/dist/dashboard/panel/MosaicDashboardPanel.js.map +1 -1
- package/dist/dashboard/panel/MosaicDashboardPanelLayout.d.ts.map +1 -1
- package/dist/dashboard/panel/MosaicDashboardPanelLayout.js +3 -3
- package/dist/dashboard/panel/MosaicDashboardPanelLayout.js.map +1 -1
- package/dist/dashboard/panel/MosaicDashboardPanels.d.ts.map +1 -1
- package/dist/dashboard/panel/MosaicDashboardPanels.js +4 -2
- package/dist/dashboard/panel/MosaicDashboardPanels.js.map +1 -1
- package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.d.ts.map +1 -1
- package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.js +3 -3
- package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.js.map +1 -1
- package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.d.ts +7 -0
- package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.d.ts.map +1 -0
- package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.js +18 -0
- package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.js.map +1 -0
- package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.d.ts.map +1 -1
- package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.js +4 -32
- package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.js.map +1 -1
- package/dist/dashboard/toolbar/MosaicDashboardToolbar.d.ts +2 -2
- package/dist/dashboard/toolbar/MosaicDashboardToolbar.d.ts.map +1 -1
- package/dist/dashboard/toolbar/MosaicDashboardToolbar.js +14 -10
- package/dist/dashboard/toolbar/MosaicDashboardToolbar.js.map +1 -1
- package/dist/dashboard/usePanelClientRegistration.d.ts +7 -0
- package/dist/dashboard/usePanelClientRegistration.d.ts.map +1 -0
- package/dist/dashboard/usePanelClientRegistration.js +30 -0
- package/dist/dashboard/usePanelClientRegistration.js.map +1 -0
- package/dist/dashboard/usePanelClients.d.ts +7 -0
- package/dist/dashboard/usePanelClients.d.ts.map +1 -0
- package/dist/dashboard/usePanelClients.js +13 -0
- package/dist/dashboard/usePanelClients.js.map +1 -0
- package/dist/dashboard/useSelectedOrFirstTable.d.ts +1 -1
- package/dist/dashboard/useSelectedOrFirstTable.d.ts.map +1 -1
- package/dist/dashboard/useSelectedOrFirstTable.js +10 -8
- package/dist/dashboard/useSelectedOrFirstTable.js.map +1 -1
- package/dist/data-table-explorer/DataTableExplorer.d.ts +4 -2
- package/dist/data-table-explorer/DataTableExplorer.d.ts.map +1 -1
- package/dist/data-table-explorer/DataTableExplorer.js +4 -4
- package/dist/data-table-explorer/DataTableExplorer.js.map +1 -1
- package/dist/data-table-explorer/DataTableExplorerCategoryClient.d.ts +3 -2
- package/dist/data-table-explorer/DataTableExplorerCategoryClient.d.ts.map +1 -1
- package/dist/data-table-explorer/DataTableExplorerCategoryClient.js +4 -3
- package/dist/data-table-explorer/DataTableExplorerCategoryClient.js.map +1 -1
- package/dist/data-table-explorer/DataTableExplorerCountClient.d.ts +3 -1
- package/dist/data-table-explorer/DataTableExplorerCountClient.d.ts.map +1 -1
- package/dist/data-table-explorer/DataTableExplorerCountClient.js +3 -3
- package/dist/data-table-explorer/DataTableExplorerCountClient.js.map +1 -1
- package/dist/data-table-explorer/DataTableExplorerHistogramClient.d.ts +3 -2
- package/dist/data-table-explorer/DataTableExplorerHistogramClient.d.ts.map +1 -1
- package/dist/data-table-explorer/DataTableExplorerHistogramClient.js +4 -4
- package/dist/data-table-explorer/DataTableExplorerHistogramClient.js.map +1 -1
- package/dist/data-table-explorer/DataTableExplorerPageClient.d.ts +3 -1
- package/dist/data-table-explorer/DataTableExplorerPageClient.d.ts.map +1 -1
- package/dist/data-table-explorer/DataTableExplorerPageClient.js +3 -1
- package/dist/data-table-explorer/DataTableExplorerPageClient.js.map +1 -1
- package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.d.ts +3 -2
- package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.d.ts.map +1 -1
- package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.js +3 -3
- package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.js.map +1 -1
- package/dist/data-table-explorer/createDataTableExplorerStore.d.ts +3 -0
- package/dist/data-table-explorer/createDataTableExplorerStore.d.ts.map +1 -1
- package/dist/data-table-explorer/createDataTableExplorerStore.js +6 -0
- package/dist/data-table-explorer/createDataTableExplorerStore.js.map +1 -1
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.d.ts +4 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.d.ts.map +1 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.js +13 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.js.map +1 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.d.ts.map +1 -1
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.js +26 -8
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.js.map +1 -1
- package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.d.ts +13 -0
- package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.d.ts.map +1 -0
- package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.js +32 -0
- package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.js.map +1 -0
- package/dist/data-table-explorer/dataTableExplorerController.d.ts +63 -3
- package/dist/data-table-explorer/dataTableExplorerController.d.ts.map +1 -1
- package/dist/data-table-explorer/dataTableExplorerController.js +73 -10
- package/dist/data-table-explorer/dataTableExplorerController.js.map +1 -1
- package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.d.ts +12 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.js +19 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.js.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.d.ts +52 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.js +153 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.js.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.d.ts +42 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.js +43 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.js.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.d.ts +13 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.js +40 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.js.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.d.ts +18 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.js +23 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.js.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.d.ts +27 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.js +28 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.js.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.d.ts +15 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.js +21 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.js.map +1 -0
- package/dist/data-table-explorer/types.d.ts +16 -3
- package/dist/data-table-explorer/types.d.ts.map +1 -1
- package/dist/data-table-explorer/types.js.map +1 -1
- package/dist/data-table-explorer/useDataTableExplorer.d.ts.map +1 -1
- package/dist/data-table-explorer/useDataTableExplorer.js +20 -279
- package/dist/data-table-explorer/useDataTableExplorer.js.map +1 -1
- package/dist/data-table-explorer/utils.d.ts +64 -6
- package/dist/data-table-explorer/utils.d.ts.map +1 -1
- package/dist/data-table-explorer/utils.js +58 -0
- package/dist/data-table-explorer/utils.js.map +1 -1
- package/dist/data-table-explorer/worksheet/DataTableBlockHeader.d.ts +1 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockHeader.d.ts.map +1 -1
- package/dist/data-table-explorer/worksheet/DataTableBlockHeader.js +4 -2
- package/dist/data-table-explorer/worksheet/DataTableBlockHeader.js.map +1 -1
- package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.d.ts.map +1 -1
- package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.js +4 -4
- package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.js.map +1 -1
- package/dist/index.d.ts +55 -31
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +86 -26
- package/dist/index.js.map +1 -1
- package/dist/mosaicTableReference.d.ts +59 -0
- package/dist/mosaicTableReference.d.ts.map +1 -0
- package/dist/mosaicTableReference.js +68 -0
- package/dist/mosaicTableReference.js.map +1 -0
- package/dist/useVgPlotChartRender.d.ts.map +1 -1
- package/dist/useVgPlotChartRender.js +151 -25
- package/dist/useVgPlotChartRender.js.map +1 -1
- package/dist/useVgPlotChartRetention.d.ts +11 -0
- package/dist/useVgPlotChartRetention.d.ts.map +1 -1
- package/dist/useVgPlotChartRetention.js.map +1 -1
- package/dist/utils/table-lookup.d.ts +7 -0
- package/dist/utils/table-lookup.d.ts.map +1 -0
- package/dist/utils/table-lookup.js +10 -0
- package/dist/utils/table-lookup.js.map +1 -0
- package/package.json +14 -14
- package/dist/ai/ai.d.ts +0 -103
- package/dist/ai/ai.d.ts.map +0 -1
- package/dist/ai/ai.js +0 -419
- package/dist/ai/ai.js.map +0 -1
- package/dist/ai/data-table-explorer-tool.d.ts +0 -40
- package/dist/ai/data-table-explorer-tool.d.ts.map +0 -1
- package/dist/ai/data-table-explorer-tool.js +0 -75
- package/dist/ai/data-table-explorer-tool.js.map +0 -1
- package/dist/ai/list-panels-tool.d.ts +0 -35
- package/dist/ai/list-panels-tool.d.ts.map +0 -1
- package/dist/ai/list-panels-tool.js +0 -66
- package/dist/ai/list-panels-tool.js.map +0 -1
- package/dist/ai/remove-panel-tool.d.ts +0 -31
- package/dist/ai/remove-panel-tool.d.ts.map +0 -1
- package/dist/ai/remove-panel-tool.js +0 -55
- package/dist/ai/remove-panel-tool.js.map +0 -1
- package/dist/ai/tool-validation.d.ts +0 -3
- package/dist/ai/tool-validation.d.ts.map +0 -1
- package/dist/ai/tool-validation.js +0 -11
- package/dist/ai/tool-validation.js.map +0 -1
- package/dist/charts/chart-types/bubble-chart/BubbleChartSettings.d.ts +0 -3
- package/dist/charts/chart-types/bubble-chart/BubbleChartSettings.d.ts.map +0 -1
- package/dist/charts/chart-types/bubble-chart/BubbleChartSettings.js.map +0 -1
- package/dist/charts/chart-types/bubble-chart/definition.d.ts +0 -4
- package/dist/charts/chart-types/bubble-chart/definition.d.ts.map +0 -1
- package/dist/charts/chart-types/bubble-chart/definition.js +0 -24
- package/dist/charts/chart-types/bubble-chart/definition.js.map +0 -1
- package/dist/charts/chart-types/bubble-chart/schema.d.ts.map +0 -1
- package/dist/charts/chart-types/bubble-chart/schema.js.map +0 -1
- package/dist/charts/chart-types/bubble-chart/spec.d.ts +0 -4
- package/dist/charts/chart-types/bubble-chart/spec.d.ts.map +0 -1
- package/dist/charts/chart-types/bubble-chart/spec.js +0 -31
- package/dist/charts/chart-types/bubble-chart/spec.js.map +0 -1
- package/dist/charts/chart-types/bubble-chart/tool.d.ts +0 -42
- package/dist/charts/chart-types/bubble-chart/tool.d.ts.map +0 -1
- package/dist/charts/chart-types/bubble-chart/tool.js +0 -66
- package/dist/charts/chart-types/bubble-chart/tool.js.map +0 -1
- package/dist/hooks/useDataTable.d.ts +0 -3
- package/dist/hooks/useDataTable.d.ts.map +0 -1
- package/dist/hooks/useDataTable.js +0 -28
- package/dist/hooks/useDataTable.js.map +0 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { tool } from 'ai';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
const ListDashboardPanelsToolInput = z.object({
|
|
4
|
+
reasoning: z
|
|
5
|
+
.string()
|
|
6
|
+
.optional()
|
|
7
|
+
.describe('Brief rationale for inspecting dashboard panels.'),
|
|
8
|
+
});
|
|
9
|
+
function summarizePanel(panel, getPanelIssue) {
|
|
10
|
+
const issue = getPanelIssue?.(panel.id);
|
|
11
|
+
return {
|
|
12
|
+
id: panel.id,
|
|
13
|
+
type: panel.type,
|
|
14
|
+
title: panel.title,
|
|
15
|
+
config: panel.config,
|
|
16
|
+
...(issue !== undefined ? { issue } : {}),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Creates a tool for inspecting the current dashboard's selected table,
|
|
21
|
+
* panels, and panel runtime issues.
|
|
22
|
+
*/
|
|
23
|
+
export function createListDashboardPanelsTool({ dashboardAdapter, }) {
|
|
24
|
+
return tool({
|
|
25
|
+
description: `List panels in the current dashboard, including the selected table and any panel runtime issues.
|
|
26
|
+
|
|
27
|
+
Use this before updating existing dashboard panels, when deciding which table the dashboard currently targets, and after creating map panels to check for render issues.`,
|
|
28
|
+
inputSchema: ListDashboardPanelsToolInput,
|
|
29
|
+
execute: async () => {
|
|
30
|
+
try {
|
|
31
|
+
const panels = dashboardAdapter.getPanels?.();
|
|
32
|
+
if (!panels) {
|
|
33
|
+
return {
|
|
34
|
+
success: false,
|
|
35
|
+
errorMessage: 'Dashboard adapter does not support listing panels.',
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
const selectedTable = dashboardAdapter.getSelectedTable?.();
|
|
39
|
+
return {
|
|
40
|
+
success: true,
|
|
41
|
+
...(selectedTable !== undefined ? { selectedTable } : {}),
|
|
42
|
+
panels: panels.map((panel) => summarizePanel(panel, dashboardAdapter.getPanelIssue)),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
return {
|
|
47
|
+
success: false,
|
|
48
|
+
errorMessage: error instanceof Error ? error.message : String(error),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=createListDashboardPanelsTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createListDashboardPanelsTool.js","sourceRoot":"","sources":["../../../src/ai/dashboard/createListDashboardPanelsTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,IAAI,CAAC;AACxB,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAMtB,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,kDAAkD,CAAC;CAChE,CAAC,CAAC;AAwBH,SAAS,cAAc,CACrB,KAAiC,EACjC,aAAmD;IAEnD,MAAM,KAAK,GAAG,aAAa,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAExC,OAAO;QACL,EAAE,EAAE,KAAK,CAAC,EAAE;QACZ,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAC,KAAK,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KACxC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,6BAA6B,CAAC,EAC5C,gBAAgB,GACqB;IACrC,OAAO,IAAI,CAA8D;QACvE,WAAW,EAAE;;yKAEwJ;QACrK,WAAW,EAAE,4BAA4B;QACzC,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,gBAAgB,CAAC,SAAS,EAAE,EAAE,CAAC;gBAE9C,IAAI,CAAC,MAAM,EAAE,CAAC;oBACZ,OAAO;wBACL,OAAO,EAAE,KAAK;wBACd,YAAY,EAAE,oDAAoD;qBACnE,CAAC;gBACJ,CAAC;gBAED,MAAM,aAAa,GAAG,gBAAgB,CAAC,gBAAgB,EAAE,EAAE,CAAC;gBAE5D,OAAO;oBACL,OAAO,EAAE,IAAI;oBACb,GAAG,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAC,aAAa,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC;oBACvD,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAC3B,cAAc,CAAC,KAAK,EAAE,gBAAgB,CAAC,aAAa,CAAC,CACtD;iBACF,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO;oBACL,OAAO,EAAE,KAAK;oBACd,YAAY,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;iBACrE,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {tool} from 'ai';\nimport {z} from 'zod';\nimport type {MosaicDashboardPanelConfig} from '../../dashboard/dashboard-types';\nimport type {ChartRuntimeIssue} from '../../chart-runtime';\nimport type {ToolOutput} from '../tool-types';\nimport type {DashboardAiAdapter} from './dashboard-types';\n\nconst ListDashboardPanelsToolInput = z.object({\n reasoning: z\n .string()\n .optional()\n .describe('Brief rationale for inspecting dashboard panels.'),\n});\n\ntype ListDashboardPanelsToolInput = z.infer<\n typeof ListDashboardPanelsToolInput\n>;\n\ntype DashboardPanelSummary = {\n id: string;\n type: string;\n title: string;\n config: MosaicDashboardPanelConfig['config'];\n issue?: ChartRuntimeIssue;\n};\n\ntype ListDashboardPanelsToolOutput = ToolOutput<{\n selectedTable?: string;\n panels?: DashboardPanelSummary[];\n}>;\n\nexport type CreateListDashboardPanelsToolOptions = {\n /** Adapter for dashboard operations */\n dashboardAdapter: DashboardAiAdapter;\n};\n\nfunction summarizePanel(\n panel: MosaicDashboardPanelConfig,\n getPanelIssue?: DashboardAiAdapter['getPanelIssue'],\n): DashboardPanelSummary {\n const issue = getPanelIssue?.(panel.id);\n\n return {\n id: panel.id,\n type: panel.type,\n title: panel.title,\n config: panel.config,\n ...(issue !== undefined ? {issue} : {}),\n };\n}\n\n/**\n * Creates a tool for inspecting the current dashboard's selected table,\n * panels, and panel runtime issues.\n */\nexport function createListDashboardPanelsTool({\n dashboardAdapter,\n}: CreateListDashboardPanelsToolOptions) {\n return tool<ListDashboardPanelsToolInput, ListDashboardPanelsToolOutput>({\n description: `List panels in the current dashboard, including the selected table and any panel runtime issues.\n\nUse this before updating existing dashboard panels, when deciding which table the dashboard currently targets, and after creating map panels to check for render issues.`,\n inputSchema: ListDashboardPanelsToolInput,\n execute: async () => {\n try {\n const panels = dashboardAdapter.getPanels?.();\n\n if (!panels) {\n return {\n success: false,\n errorMessage: 'Dashboard adapter does not support listing panels.',\n };\n }\n\n const selectedTable = dashboardAdapter.getSelectedTable?.();\n\n return {\n success: true,\n ...(selectedTable !== undefined ? {selectedTable} : {}),\n panels: panels.map((panel) =>\n summarizePanel(panel, dashboardAdapter.getPanelIssue),\n ),\n };\n } catch (error) {\n return {\n success: false,\n errorMessage: error instanceof Error ? error.message : String(error),\n };\n }\n },\n });\n}\n"]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { PanelPatch } from '../../charts/chart-types/base-types';
|
|
2
|
+
import type { MosaicDashboardPanelConfig } from '../../dashboard/dashboard-types';
|
|
3
|
+
import type { ChartRuntimeIssue } from '../../chart-runtime';
|
|
4
|
+
import type { BaseAgentToolOptions } from '../types';
|
|
5
|
+
import { DatabaseAiAdapter } from '../database-types';
|
|
6
|
+
import { Tool } from 'ai';
|
|
7
|
+
import { AgentResultMetadata } from '../tool-types';
|
|
8
|
+
/**
|
|
9
|
+
* Dashboard adapter with full dashboard panel management capabilities.
|
|
10
|
+
* Extends BaseAiAdapter with dashboard-specific operations.
|
|
11
|
+
*/
|
|
12
|
+
export type DashboardAiAdapter = {
|
|
13
|
+
getPanelIssue?: (panelId: string) => ChartRuntimeIssue | undefined;
|
|
14
|
+
getSelectedTable?: () => string | undefined;
|
|
15
|
+
getPanels?: () => MosaicDashboardPanelConfig[];
|
|
16
|
+
setSelectedTable: (tableName: string) => void | Promise<void>;
|
|
17
|
+
getPanel(panelId: string): MosaicDashboardPanelConfig | undefined;
|
|
18
|
+
updatePanel(panelId: string, patch: Partial<PanelPatch>): void | Promise<void>;
|
|
19
|
+
removePanel(panelId: string): void | Promise<void>;
|
|
20
|
+
addPanel(panel: MosaicDashboardPanelConfig): string | Promise<string>;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Result returned by the dashboard agent after completing a task.
|
|
24
|
+
* Contains execution status, final output, and optional metadata about the run.
|
|
25
|
+
*/
|
|
26
|
+
export type DashboardAgentResult = {
|
|
27
|
+
success: boolean;
|
|
28
|
+
finalOutput: string;
|
|
29
|
+
dashboardId: string;
|
|
30
|
+
error?: string;
|
|
31
|
+
metadata?: AgentResultMetadata;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Parameters passed to extra dashboard AI tools factory.
|
|
35
|
+
* Provides adapters for dashboard and database operations.
|
|
36
|
+
*/
|
|
37
|
+
export type ExtraDashboardAiToolsParams = {
|
|
38
|
+
dashboardAdapter: DashboardAiAdapter;
|
|
39
|
+
databaseAdapter: DatabaseAiAdapter;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Factory function for creating additional dashboard AI tools.
|
|
43
|
+
* Allows hosts to register custom tools that extend the dashboard agent's capabilities.
|
|
44
|
+
*/
|
|
45
|
+
export type ExtraDashboardAiToolsFactory = (params: ExtraDashboardAiToolsParams) => Record<string, Tool>;
|
|
46
|
+
/**
|
|
47
|
+
* Options for creating a dashboard agent tool.
|
|
48
|
+
* Extends base agent options with dashboard-specific database adapter and optional extra tools.
|
|
49
|
+
*/
|
|
50
|
+
export type CreateDashboardAgentToolOptions<TState> = BaseAgentToolOptions<TState> & {
|
|
51
|
+
databaseAdapter: DatabaseAiAdapter;
|
|
52
|
+
/**
|
|
53
|
+
* Host-provided dashboard tools keyed by their registered tool name.
|
|
54
|
+
* Register geospatial map tools under MAP_TOOL_KEY so prompts and tools
|
|
55
|
+
* stay in sync.
|
|
56
|
+
*/
|
|
57
|
+
extraTools?: ExtraDashboardAiToolsFactory;
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=dashboard-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-types.d.ts","sourceRoot":"","sources":["../../../src/ai/dashboard/dashboard-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,qCAAqC,CAAC;AACpE,OAAO,KAAK,EAAC,0BAA0B,EAAC,MAAM,iCAAiC,CAAC;AAChF,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,UAAU,CAAC;AACnD,OAAO,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAC,IAAI,EAAC,MAAM,IAAI,CAAC;AACxB,OAAO,EAAC,mBAAmB,EAAC,MAAM,eAAe,CAAC;AAElD;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,iBAAiB,GAAG,SAAS,CAAC;IACnE,gBAAgB,CAAC,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,0BAA0B,EAAE,CAAC;IAC/C,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,0BAA0B,GAAG,SAAS,CAAC;IAClE,WAAW,CACT,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,GACzB,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,QAAQ,CAAC,KAAK,EAAE,0BAA0B,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACvE,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,mBAAmB,CAAC;CAChC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,gBAAgB,EAAE,kBAAkB,CAAC;IACrC,eAAe,EAAE,iBAAiB,CAAC;CACpC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GAAG,CACzC,MAAM,EAAE,2BAA2B,KAChC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAE1B;;;GAGG;AACH,MAAM,MAAM,+BAA+B,CAAC,MAAM,IAChD,oBAAoB,CAAC,MAAM,CAAC,GAAG;IAC7B,eAAe,EAAE,iBAAiB,CAAC;IACnC;;;;OAIG;IACH,UAAU,CAAC,EAAE,4BAA4B,CAAC;CAC3C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-types.js","sourceRoot":"","sources":["../../../src/ai/dashboard/dashboard-types.ts"],"names":[],"mappings":"","sourcesContent":["import type {PanelPatch} from '../../charts/chart-types/base-types';\nimport type {MosaicDashboardPanelConfig} from '../../dashboard/dashboard-types';\nimport type {ChartRuntimeIssue} from '../../chart-runtime';\nimport type {BaseAgentToolOptions} from '../types';\nimport {DatabaseAiAdapter} from '../database-types';\nimport {Tool} from 'ai';\nimport {AgentResultMetadata} from '../tool-types';\n\n/**\n * Dashboard adapter with full dashboard panel management capabilities.\n * Extends BaseAiAdapter with dashboard-specific operations.\n */\nexport type DashboardAiAdapter = {\n getPanelIssue?: (panelId: string) => ChartRuntimeIssue | undefined;\n getSelectedTable?: () => string | undefined;\n getPanels?: () => MosaicDashboardPanelConfig[];\n setSelectedTable: (tableName: string) => void | Promise<void>;\n getPanel(panelId: string): MosaicDashboardPanelConfig | undefined;\n updatePanel(\n panelId: string,\n patch: Partial<PanelPatch>,\n ): void | Promise<void>;\n removePanel(panelId: string): void | Promise<void>;\n addPanel(panel: MosaicDashboardPanelConfig): string | Promise<string>;\n};\n\n/**\n * Result returned by the dashboard agent after completing a task.\n * Contains execution status, final output, and optional metadata about the run.\n */\nexport type DashboardAgentResult = {\n success: boolean;\n finalOutput: string;\n dashboardId: string;\n error?: string;\n metadata?: AgentResultMetadata;\n};\n\n/**\n * Parameters passed to extra dashboard AI tools factory.\n * Provides adapters for dashboard and database operations.\n */\nexport type ExtraDashboardAiToolsParams = {\n dashboardAdapter: DashboardAiAdapter;\n databaseAdapter: DatabaseAiAdapter;\n};\n\n/**\n * Factory function for creating additional dashboard AI tools.\n * Allows hosts to register custom tools that extend the dashboard agent's capabilities.\n */\nexport type ExtraDashboardAiToolsFactory = (\n params: ExtraDashboardAiToolsParams,\n) => Record<string, Tool>;\n\n/**\n * Options for creating a dashboard agent tool.\n * Extends base agent options with dashboard-specific database adapter and optional extra tools.\n */\nexport type CreateDashboardAgentToolOptions<TState> =\n BaseAgentToolOptions<TState> & {\n databaseAdapter: DatabaseAiAdapter;\n /**\n * Host-provided dashboard tools keyed by their registered tool name.\n * Register geospatial map tools under MAP_TOOL_KEY so prompts and tools\n * stay in sync.\n */\n extraTools?: ExtraDashboardAiToolsFactory;\n };\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DataTable, QualifiedTableName } from '@sqlrooms/db';
|
|
2
|
+
/**
|
|
3
|
+
* Database-specific AI adapter interface.
|
|
4
|
+
* Provides access to tables and database queries for AI tools.
|
|
5
|
+
*/
|
|
6
|
+
export type DatabaseAiAdapter = {
|
|
7
|
+
/** Get all available tables */
|
|
8
|
+
getTables: () => DataTable[];
|
|
9
|
+
/** Find table by name, returns undefined if not found */
|
|
10
|
+
findTable(tableName: string | QualifiedTableName): DataTable | undefined;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=database-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database-types.d.ts","sourceRoot":"","sources":["../../src/ai/database-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAE,kBAAkB,EAAC,MAAM,cAAc,CAAC;AAEhE;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,+BAA+B;IAC/B,SAAS,EAAE,MAAM,SAAS,EAAE,CAAC;IAE7B,yDAAyD;IACzD,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,GAAG,SAAS,CAAC;CAC1E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database-types.js","sourceRoot":"","sources":["../../src/ai/database-types.ts"],"names":[],"mappings":"","sourcesContent":["import type {DataTable, QualifiedTableName} from '@sqlrooms/db';\n\n/**\n * Database-specific AI adapter interface.\n * Provides access to tables and database queries for AI tools.\n */\nexport type DatabaseAiAdapter = {\n /** Get all available tables */\n getTables: () => DataTable[];\n\n /** Find table by name, returns undefined if not found */\n findTable(tableName: string | QualifiedTableName): DataTable | undefined;\n};\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error thrown by AI agents when validation or execution fails.
|
|
3
|
+
* Used for reporting issues like missing tables, invalid columns, or constraint violations.
|
|
4
|
+
*/
|
|
5
|
+
export declare class AiAgentError extends Error {
|
|
6
|
+
constructor(message: string);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/ai/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,YAAa,SAAQ,KAAK;gBACzB,OAAO,EAAE,MAAM;CAI5B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error thrown by AI agents when validation or execution fails.
|
|
3
|
+
* Used for reporting issues like missing tables, invalid columns, or constraint violations.
|
|
4
|
+
*/
|
|
5
|
+
export class AiAgentError extends Error {
|
|
6
|
+
constructor(message) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.name = 'AiAgentError';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/ai/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK;IACrC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF","sourcesContent":["/**\n * Error thrown by AI agents when validation or execution fails.\n * Used for reporting issues like missing tables, invalid columns, or constraint violations.\n */\nexport class AiAgentError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'AiAgentError';\n }\n}\n"]}
|
|
@@ -1,34 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
config: ChartConfig | DataTableExplorerPanelConfig;
|
|
9
|
-
}
|
|
10
|
-
export interface CreateOrUpdateChartPanelParams {
|
|
11
|
-
panelId?: string;
|
|
12
|
-
dashboardId: string;
|
|
13
|
-
tableName: string;
|
|
14
|
-
title: string;
|
|
15
|
-
config: ChartConfig;
|
|
16
|
-
}
|
|
17
|
-
export interface CreateOrUpdateDataTableExplorerPanelParams {
|
|
18
|
-
panelId?: string;
|
|
19
|
-
dashboardId: string;
|
|
20
|
-
tableName: string;
|
|
21
|
-
title: string;
|
|
22
|
-
config: DataTableExplorerPanelConfig;
|
|
23
|
-
}
|
|
1
|
+
import { MosaicDashboardPanelConfig } from '../dashboard/dashboard-types';
|
|
2
|
+
import { DashboardAiAdapter } from './dashboard/dashboard-types';
|
|
3
|
+
import { DataTable } from '@sqlrooms/duckdb';
|
|
4
|
+
import { Tool } from 'ai';
|
|
5
|
+
import { DatabaseAiAdapter } from './database-types';
|
|
6
|
+
import { AgentResultMetadata } from './tool-types';
|
|
7
|
+
import { AgentToolCall } from './types';
|
|
24
8
|
/**
|
|
25
|
-
*
|
|
26
|
-
* Handles everything: panel config creation, add/update logic, artifact switching.
|
|
27
|
-
* When updating, both source and config are updated to allow changing the data source.
|
|
9
|
+
* Validates that a table exists. Throws if not found.
|
|
28
10
|
*/
|
|
29
|
-
export declare function
|
|
11
|
+
export declare function ensureTable(adapter: DatabaseAiAdapter, tableName: string): DataTable;
|
|
30
12
|
/**
|
|
31
|
-
*
|
|
13
|
+
* Validates that a panel exists in a dashboard. Throws if not found.
|
|
32
14
|
*/
|
|
33
|
-
export declare function
|
|
15
|
+
export declare function ensurePanel(adapter: DashboardAiAdapter, panelId: string, type?: string): MosaicDashboardPanelConfig;
|
|
16
|
+
/**
|
|
17
|
+
* Validates that extra tools do not override built-in tools.
|
|
18
|
+
* Prevents accidental shadowing of core functionality by custom tools.
|
|
19
|
+
*
|
|
20
|
+
* @param builtInTools - Record of built-in tool names to tools
|
|
21
|
+
* @param extraTools - Record of extra tool names to tools being registered
|
|
22
|
+
* @throws {AiAgentError} When a key from extraTools exists in builtInTools
|
|
23
|
+
*/
|
|
24
|
+
export declare function ensureNoOverride(builtInTools: Record<string, Tool>, extraTools: Record<string, Tool>): void;
|
|
25
|
+
/**
|
|
26
|
+
* Calculate metadata about agent execution results.
|
|
27
|
+
*
|
|
28
|
+
* @param tableName - Optional table name associated with the agent execution
|
|
29
|
+
* @param agentToolCalls - Array of tool calls made during agent execution
|
|
30
|
+
* @returns Metadata including steps executed and queries run
|
|
31
|
+
*/
|
|
32
|
+
export declare function calculateAgentResultMetadata(tableName: string | undefined, agentToolCalls?: AgentToolCall[]): AgentResultMetadata;
|
|
34
33
|
//# sourceMappingURL=tool-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-helpers.d.ts","sourceRoot":"","sources":["../../src/ai/tool-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"tool-helpers.d.ts","sourceRoot":"","sources":["../../src/ai/tool-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,0BAA0B,EAAC,MAAM,8BAA8B,CAAC;AAExE,OAAO,EAAC,kBAAkB,EAAC,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAC,IAAI,EAAC,MAAM,IAAI,CAAC;AACxB,OAAO,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AACjD,OAAO,EAAC,aAAa,EAAC,MAAM,SAAS,CAAC;AAEtC;;GAEG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,iBAAiB,EAC1B,SAAS,EAAE,MAAM,GAChB,SAAS,CAQX;AAED;;GAEG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,GACZ,0BAA0B,CAc5B;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,EAClC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,QASjC;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,cAAc,GAAE,aAAa,EAAO,GACnC,mBAAmB,CAOrB"}
|
package/dist/ai/tool-helpers.js
CHANGED
|
@@ -1,93 +1,55 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AiAgentError } from './errors';
|
|
2
2
|
/**
|
|
3
|
-
* Validates that a
|
|
3
|
+
* Validates that a table exists. Throws if not found.
|
|
4
4
|
*/
|
|
5
|
-
function
|
|
6
|
-
const
|
|
7
|
-
if (!
|
|
8
|
-
throw new
|
|
5
|
+
export function ensureTable(adapter, tableName) {
|
|
6
|
+
const table = adapter.findTable(tableName);
|
|
7
|
+
if (!table) {
|
|
8
|
+
throw new AiAgentError(`Table "${tableName}" not found.`);
|
|
9
9
|
}
|
|
10
|
-
return
|
|
10
|
+
return table;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Validates that a panel exists in a dashboard. Throws if not found.
|
|
14
14
|
*/
|
|
15
|
-
function ensurePanel(
|
|
16
|
-
const
|
|
17
|
-
if (!
|
|
18
|
-
throw new
|
|
15
|
+
export function ensurePanel(adapter, panelId, type) {
|
|
16
|
+
const panel = adapter.getPanel(panelId);
|
|
17
|
+
if (!panel) {
|
|
18
|
+
throw new AiAgentError(`Panel not found.`);
|
|
19
19
|
}
|
|
20
|
+
if (type !== undefined && panel.type !== type) {
|
|
21
|
+
throw new AiAgentError(`Panel is of type "${panel.type}", expected type "${type}".`);
|
|
22
|
+
}
|
|
23
|
+
return panel;
|
|
20
24
|
}
|
|
21
25
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
26
|
+
* Validates that extra tools do not override built-in tools.
|
|
27
|
+
* Prevents accidental shadowing of core functionality by custom tools.
|
|
28
|
+
*
|
|
29
|
+
* @param builtInTools - Record of built-in tool names to tools
|
|
30
|
+
* @param extraTools - Record of extra tool names to tools being registered
|
|
31
|
+
* @throws {AiAgentError} When a key from extraTools exists in builtInTools
|
|
25
32
|
*/
|
|
26
|
-
export function
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
// Update existing panel - update both source and config
|
|
32
|
-
deps.updatePanel(params.dashboardId, params.panelId, {
|
|
33
|
-
title: params.title,
|
|
34
|
-
source: { tableName: params.tableName },
|
|
35
|
-
config: params.config,
|
|
36
|
-
});
|
|
37
|
-
return {
|
|
38
|
-
panelId: params.panelId,
|
|
39
|
-
artifactId: params.dashboardId,
|
|
40
|
-
title: params.title,
|
|
41
|
-
config: params.config,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
// Create new panel - create config and add to dashboard
|
|
46
|
-
const panel = createMosaicDashboardChartPanelConfig(params.title, params.config);
|
|
47
|
-
const panelId = deps.addPanel(params.dashboardId, panel);
|
|
48
|
-
deps.setCurrentArtifact(params.dashboardId);
|
|
49
|
-
return {
|
|
50
|
-
panelId,
|
|
51
|
-
artifactId: params.dashboardId,
|
|
52
|
-
title: params.title,
|
|
53
|
-
config: params.config,
|
|
54
|
-
};
|
|
33
|
+
export function ensureNoOverride(builtInTools, extraTools) {
|
|
34
|
+
for (const key of Object.keys(extraTools)) {
|
|
35
|
+
if (key in builtInTools) {
|
|
36
|
+
throw new AiAgentError(`Dashboard extraTools cannot override built-in tool "${key}". Register the host tool under a unique key.`);
|
|
37
|
+
}
|
|
55
38
|
}
|
|
56
39
|
}
|
|
57
40
|
/**
|
|
58
|
-
*
|
|
41
|
+
* Calculate metadata about agent execution results.
|
|
42
|
+
*
|
|
43
|
+
* @param tableName - Optional table name associated with the agent execution
|
|
44
|
+
* @param agentToolCalls - Array of tool calls made during agent execution
|
|
45
|
+
* @returns Metadata including steps executed and queries run
|
|
59
46
|
*/
|
|
60
|
-
export function
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
source: { tableName: params.tableName },
|
|
68
|
-
title: params.title,
|
|
69
|
-
});
|
|
70
|
-
return {
|
|
71
|
-
panelId: params.panelId,
|
|
72
|
-
artifactId: params.dashboardId,
|
|
73
|
-
title: params.title,
|
|
74
|
-
config: params.config,
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
// Create new panel - create full panel config
|
|
79
|
-
const panel = createMosaicDashboardDataTableExplorerPanelConfig({
|
|
80
|
-
title: params.title,
|
|
81
|
-
config: params.config,
|
|
82
|
-
});
|
|
83
|
-
const panelId = deps.addPanel(params.dashboardId, panel);
|
|
84
|
-
deps.setCurrentArtifact(params.dashboardId);
|
|
85
|
-
return {
|
|
86
|
-
panelId,
|
|
87
|
-
artifactId: params.dashboardId,
|
|
88
|
-
title: panel.title,
|
|
89
|
-
config: panel.config,
|
|
90
|
-
};
|
|
91
|
-
}
|
|
47
|
+
export function calculateAgentResultMetadata(tableName, agentToolCalls = []) {
|
|
48
|
+
return {
|
|
49
|
+
tableName,
|
|
50
|
+
stepsExecuted: agentToolCalls.length,
|
|
51
|
+
queriesRun: agentToolCalls.filter((call) => call.toolName === 'query')
|
|
52
|
+
.length,
|
|
53
|
+
};
|
|
92
54
|
}
|
|
93
55
|
//# sourceMappingURL=tool-helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-helpers.js","sourceRoot":"","sources":["../../src/ai/tool-helpers.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"tool-helpers.js","sourceRoot":"","sources":["../../src/ai/tool-helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,UAAU,CAAC;AAQtC;;GAEG;AACH,MAAM,UAAU,WAAW,CACzB,OAA0B,EAC1B,SAAiB;IAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAE3C,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,YAAY,CAAC,UAAU,SAAS,cAAc,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CACzB,OAA2B,EAC3B,OAAe,EACf,IAAa;IAEb,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAExC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,YAAY,CAAC,kBAAkB,CAAC,CAAC;IAC7C,CAAC;IAED,IAAI,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,MAAM,IAAI,YAAY,CACpB,qBAAqB,KAAK,CAAC,IAAI,qBAAqB,IAAI,IAAI,CAC7D,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAC9B,YAAkC,EAClC,UAAgC;IAEhC,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;QAC1C,IAAI,GAAG,IAAI,YAAY,EAAE,CAAC;YACxB,MAAM,IAAI,YAAY,CACpB,uDAAuD,GAAG,+CAA+C,CAC1G,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,4BAA4B,CAC1C,SAA6B,EAC7B,iBAAkC,EAAE;IAEpC,OAAO;QACL,SAAS;QACT,aAAa,EAAE,cAAc,CAAC,MAAM;QACpC,UAAU,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,OAAO,CAAC;aACnE,MAAM;KACV,CAAC;AACJ,CAAC","sourcesContent":["import {MosaicDashboardPanelConfig} from '../dashboard/dashboard-types';\nimport {AiAgentError} from './errors';\nimport {DashboardAiAdapter} from './dashboard/dashboard-types';\nimport {DataTable} from '@sqlrooms/duckdb';\nimport {Tool} from 'ai';\nimport {DatabaseAiAdapter} from './database-types';\nimport {AgentResultMetadata} from './tool-types';\nimport {AgentToolCall} from './types';\n\n/**\n * Validates that a table exists. Throws if not found.\n */\nexport function ensureTable(\n adapter: DatabaseAiAdapter,\n tableName: string,\n): DataTable {\n const table = adapter.findTable(tableName);\n\n if (!table) {\n throw new AiAgentError(`Table \"${tableName}\" not found.`);\n }\n\n return table;\n}\n\n/**\n * Validates that a panel exists in a dashboard. Throws if not found.\n */\nexport function ensurePanel(\n adapter: DashboardAiAdapter,\n panelId: string,\n type?: string,\n): MosaicDashboardPanelConfig {\n const panel = adapter.getPanel(panelId);\n\n if (!panel) {\n throw new AiAgentError(`Panel not found.`);\n }\n\n if (type !== undefined && panel.type !== type) {\n throw new AiAgentError(\n `Panel is of type \"${panel.type}\", expected type \"${type}\".`,\n );\n }\n\n return panel;\n}\n\n/**\n * Validates that extra tools do not override built-in tools.\n * Prevents accidental shadowing of core functionality by custom tools.\n *\n * @param builtInTools - Record of built-in tool names to tools\n * @param extraTools - Record of extra tool names to tools being registered\n * @throws {AiAgentError} When a key from extraTools exists in builtInTools\n */\nexport function ensureNoOverride(\n builtInTools: Record<string, Tool>,\n extraTools: Record<string, Tool>,\n) {\n for (const key of Object.keys(extraTools)) {\n if (key in builtInTools) {\n throw new AiAgentError(\n `Dashboard extraTools cannot override built-in tool \"${key}\". Register the host tool under a unique key.`,\n );\n }\n }\n}\n\n/**\n * Calculate metadata about agent execution results.\n *\n * @param tableName - Optional table name associated with the agent execution\n * @param agentToolCalls - Array of tool calls made during agent execution\n * @returns Metadata including steps executed and queries run\n */\nexport function calculateAgentResultMetadata(\n tableName: string | undefined,\n agentToolCalls: AgentToolCall[] = [],\n): AgentResultMetadata {\n return {\n tableName,\n stepsExecuted: agentToolCalls.length,\n queriesRun: agentToolCalls.filter((call) => call.toolName === 'query')\n .length,\n };\n}\n"]}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Base input schema shared by chart AI tools.
|
|
4
|
+
*
|
|
5
|
+
* Includes the source table, optional chart title, optional dashboard panel to
|
|
6
|
+
* update, and the model's rationale for the chart choice.
|
|
7
|
+
*/
|
|
8
|
+
export declare const BaseChartToolInput: z.ZodObject<{
|
|
9
|
+
tableName: z.ZodString;
|
|
10
|
+
title: z.ZodOptional<z.ZodString>;
|
|
6
11
|
panelId: z.ZodOptional<z.ZodString>;
|
|
7
12
|
reasoning: z.ZodString;
|
|
8
13
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-schemas.d.ts","sourceRoot":"","sources":["../../src/ai/tool-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"tool-schemas.d.ts","sourceRoot":"","sources":["../../src/ai/tool-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;iBAe7B,CAAC"}
|
package/dist/ai/tool-schemas.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Base input schema shared by chart AI tools.
|
|
4
|
+
*
|
|
5
|
+
* Includes the source table, optional chart title, optional dashboard panel to
|
|
6
|
+
* update, and the model's rationale for the chart choice.
|
|
7
|
+
*/
|
|
8
|
+
export const BaseChartToolInput = z.object({
|
|
7
9
|
tableName: z
|
|
10
|
+
.string()
|
|
11
|
+
.describe('REQUIRED table name to create the chart from.'),
|
|
12
|
+
title: z
|
|
8
13
|
.string()
|
|
9
14
|
.optional()
|
|
10
|
-
.describe('Optional
|
|
11
|
-
createArtifactIfMissing: z
|
|
12
|
-
.boolean()
|
|
13
|
-
.optional()
|
|
14
|
-
.default(true)
|
|
15
|
-
.describe('If true, create dashboard artifact if missing.'),
|
|
15
|
+
.describe('Optional title for the chart artifact'),
|
|
16
16
|
panelId: z
|
|
17
17
|
.string()
|
|
18
18
|
.optional()
|
|
19
|
-
.describe('Optional panel ID
|
|
19
|
+
.describe('Optional existing dashboard panel ID to update instead of creating a new panel.'),
|
|
20
20
|
reasoning: z.string().describe('Brief rationale for the chart choice.'),
|
|
21
21
|
});
|
|
22
22
|
//# sourceMappingURL=tool-schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-schemas.js","sourceRoot":"","sources":["../../src/ai/tool-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"tool-schemas.js","sourceRoot":"","sources":["../../src/ai/tool-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,QAAQ,CAAC,+CAA+C,CAAC;IAC5D,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,uCAAuC,CAAC;IACpD,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,iFAAiF,CAClF;IACH,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;CACxE,CAAC,CAAC","sourcesContent":["import {z} from 'zod';\n\n/**\n * Base input schema shared by chart AI tools.\n *\n * Includes the source table, optional chart title, optional dashboard panel to\n * update, and the model's rationale for the chart choice.\n */\nexport const BaseChartToolInput = z.object({\n tableName: z\n .string()\n .describe('REQUIRED table name to create the chart from.'),\n title: z\n .string()\n .optional()\n .describe('Optional title for the chart artifact'),\n panelId: z\n .string()\n .optional()\n .describe(\n 'Optional existing dashboard panel ID to update instead of creating a new panel.',\n ),\n reasoning: z.string().describe('Brief rationale for the chart choice.'),\n});\n"]}
|
package/dist/ai/tool-types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChartConfig } from '../charts/chart-types/chart-config';
|
|
2
|
-
import type { ChartBuilderColumn } from '../charts/chart-types/
|
|
2
|
+
import type { ChartBuilderColumn } from '../charts/chart-types/column-types';
|
|
3
3
|
export interface ResolvedChartResourcesParams {
|
|
4
4
|
artifactId?: string;
|
|
5
5
|
tableName?: string;
|
|
@@ -23,4 +23,22 @@ export interface CreateChartResult {
|
|
|
23
23
|
title: string;
|
|
24
24
|
config: ChartConfig;
|
|
25
25
|
}
|
|
26
|
+
type ToolOutputDefaultError = {
|
|
27
|
+
errorMessage?: string;
|
|
28
|
+
};
|
|
29
|
+
export type ToolOutput<TSuccess, TError extends ToolOutputDefaultError = ToolOutputDefaultError> = ({
|
|
30
|
+
success: true;
|
|
31
|
+
} & TSuccess) | ({
|
|
32
|
+
success: false;
|
|
33
|
+
} & TError);
|
|
34
|
+
/**
|
|
35
|
+
* Metadata about agent execution.
|
|
36
|
+
* Tracks statistics like steps executed and queries run during agent operation.
|
|
37
|
+
*/
|
|
38
|
+
export type AgentResultMetadata = {
|
|
39
|
+
tableName?: string;
|
|
40
|
+
stepsExecuted: number;
|
|
41
|
+
queriesRun: number;
|
|
42
|
+
};
|
|
43
|
+
export {};
|
|
26
44
|
//# sourceMappingURL=tool-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-types.d.ts","sourceRoot":"","sources":["../../src/ai/tool-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,oCAAoC,CAAC;AAC/D,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"tool-types.d.ts","sourceRoot":"","sources":["../../src/ai/tool-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,oCAAoC,CAAC;AAC/D,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,oCAAoC,CAAC;AAE3E,MAAM,WAAW,4BAA4B;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,KAAK,sBAAsB,GAAG;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC;AAEtD,MAAM,MAAM,UAAU,CACpB,QAAQ,EACR,MAAM,SAAS,sBAAsB,GAAG,sBAAsB,IAE5D,CAAC;IACC,OAAO,EAAE,IAAI,CAAC;CACf,GAAG,QAAQ,CAAC,GACb,CAAC;IACC,OAAO,EAAE,KAAK,CAAC;CAChB,GAAG,MAAM,CAAC,CAAC;AAEhB;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-types.js","sourceRoot":"","sources":["../../src/ai/tool-types.ts"],"names":[],"mappings":"","sourcesContent":["import {ChartConfig} from '../charts/chart-types/chart-config';\nimport type {ChartBuilderColumn} from '../charts/chart-types/
|
|
1
|
+
{"version":3,"file":"tool-types.js","sourceRoot":"","sources":["../../src/ai/tool-types.ts"],"names":[],"mappings":"","sourcesContent":["import {ChartConfig} from '../charts/chart-types/chart-config';\nimport type {ChartBuilderColumn} from '../charts/chart-types/column-types';\n\nexport interface ResolvedChartResourcesParams {\n artifactId?: string;\n tableName?: string;\n createArtifactIfMissing?: boolean;\n}\n\nexport interface ResolvedChartResources {\n artifactId: string;\n tableName: string;\n columns: ChartBuilderColumn[];\n}\n\nexport interface CreateChartParams {\n artifactId: string;\n tableName: string;\n title: string;\n config: ChartConfig;\n}\n\nexport interface CreateChartResult {\n panelId: string;\n artifactId: string;\n tableName: string;\n title: string;\n config: ChartConfig;\n}\n\ntype ToolOutputDefaultError = {errorMessage?: string};\n\nexport type ToolOutput<\n TSuccess,\n TError extends ToolOutputDefaultError = ToolOutputDefaultError,\n> =\n | ({\n success: true;\n } & TSuccess)\n | ({\n success: false;\n } & TError);\n\n/**\n * Metadata about agent execution.\n * Tracks statistics like steps executed and queries run during agent operation.\n */\nexport type AgentResultMetadata = {\n tableName?: string;\n stepsExecuted: number;\n queriesRun: number;\n};\n"]}
|