@databricks/appkit-ui 0.20.3 → 0.22.0

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 (63) hide show
  1. package/CLAUDE.md +1 -0
  2. package/README.md +3 -20
  3. package/dist/cli/commands/setup.js +2 -2
  4. package/dist/cli/commands/setup.js.map +1 -1
  5. package/dist/js/config.d.ts +24 -0
  6. package/dist/js/config.d.ts.map +1 -0
  7. package/dist/js/config.js +49 -0
  8. package/dist/js/config.js.map +1 -0
  9. package/dist/js/index.d.ts +2 -1
  10. package/dist/js/index.js +2 -1
  11. package/dist/react/charts/options.d.ts.map +1 -1
  12. package/dist/react/charts/options.js +3 -1
  13. package/dist/react/charts/options.js.map +1 -1
  14. package/dist/react/genie/genie-chart-inference.d.ts +6 -1
  15. package/dist/react/genie/genie-chart-inference.d.ts.map +1 -1
  16. package/dist/react/genie/genie-chart-inference.js +60 -6
  17. package/dist/react/genie/genie-chart-inference.js.map +1 -1
  18. package/dist/react/genie/genie-chat-message-list.d.ts.map +1 -1
  19. package/dist/react/genie/genie-chat-message-list.js +5 -4
  20. package/dist/react/genie/genie-chat-message-list.js.map +1 -1
  21. package/dist/react/genie/genie-chat-message.d.ts.map +1 -1
  22. package/dist/react/genie/genie-chat-message.js +7 -6
  23. package/dist/react/genie/genie-chat-message.js.map +1 -1
  24. package/dist/react/genie/genie-query-visualization.d.ts.map +1 -1
  25. package/dist/react/genie/genie-query-visualization.js +66 -15
  26. package/dist/react/genie/genie-query-visualization.js.map +1 -1
  27. package/dist/react/genie/index.d.ts +2 -2
  28. package/dist/react/genie/index.js +1 -1
  29. package/dist/react/genie/types.d.ts +2 -1
  30. package/dist/react/genie/types.d.ts.map +1 -1
  31. package/dist/react/genie/types.js +6 -0
  32. package/dist/react/genie/types.js.map +1 -0
  33. package/dist/react/genie/use-genie-chat.d.ts.map +1 -1
  34. package/dist/react/genie/use-genie-chat.js +60 -23
  35. package/dist/react/genie/use-genie-chat.js.map +1 -1
  36. package/dist/react/hooks/index.d.ts +2 -1
  37. package/dist/react/hooks/index.js +1 -0
  38. package/dist/react/hooks/use-plugin-config.d.ts +25 -0
  39. package/dist/react/hooks/use-plugin-config.d.ts.map +1 -0
  40. package/dist/react/hooks/use-plugin-config.js +32 -0
  41. package/dist/react/hooks/use-plugin-config.js.map +1 -0
  42. package/dist/react/index.d.ts +4 -3
  43. package/dist/react/index.js +5 -4
  44. package/dist/react/table/data-table.js +1 -1
  45. package/dist/react/ui/index.js +1 -1
  46. package/dist/shared/src/index.d.ts +1 -1
  47. package/dist/shared/src/plugin.d.ts +12 -1
  48. package/dist/shared/src/plugin.d.ts.map +1 -0
  49. package/docs/api/appkit/Class.Plugin.md +75 -17
  50. package/docs/app-management.md +1 -1
  51. package/docs/architecture.md +1 -1
  52. package/docs/development/ai-assisted-development.md +2 -2
  53. package/docs/development/local-development.md +1 -1
  54. package/docs/development/remote-bridge.md +1 -1
  55. package/docs/development/templates.md +93 -0
  56. package/docs/development.md +1 -1
  57. package/docs/plugins/caching.md +3 -1
  58. package/docs/plugins/execution-context.md +1 -1
  59. package/docs/plugins/lakebase.md +1 -1
  60. package/docs.md +2 -2
  61. package/llms.txt +1 -0
  62. package/package.json +60 -58
  63. package/sbom.cdx.json +1 -0
@@ -0,0 +1,25 @@
1
+ //#region src/react/hooks/use-plugin-config.d.ts
2
+ /**
3
+ * Returns the client-side config exposed by a plugin's `clientConfig()` method.
4
+ *
5
+ * The value is read once from the boot-time `<script id="__appkit__">` payload
6
+ * and cached for the lifetime of the component. Because `clientConfig()` runs
7
+ * at server startup, the data is static and never changes during a session.
8
+ *
9
+ * @param pluginName - The plugin name as registered in AppKit (e.g. `"files"`)
10
+ * @returns The plugin's client config object, typed via the generic parameter
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * interface FilesConfig { volumes: string[] }
15
+ *
16
+ * function MyComponent() {
17
+ * const { volumes } = usePluginClientConfig<FilesConfig>("files");
18
+ * return <ul>{volumes.map(v => <li key={v}>{v}</li>)}</ul>;
19
+ * }
20
+ * ```
21
+ */
22
+ declare function usePluginClientConfig<T = Record<string, unknown>>(pluginName: string): T;
23
+ //#endregion
24
+ export { usePluginClientConfig };
25
+ //# sourceMappingURL=use-plugin-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-plugin-config.d.ts","names":[],"sources":["../../../src/react/hooks/use-plugin-config.ts"],"mappings":";;AAuBA;;;;;;;;;;;;;;;;;;;iBAAgB,qBAAA,KAA0B,MAAA,kBAAA,CACxC,UAAA,WACC,CAAA"}
@@ -0,0 +1,32 @@
1
+ import { getPluginClientConfig } from "../../js/config.js";
2
+ import "../../js/index.js";
3
+ import { useMemo } from "react";
4
+
5
+ //#region src/react/hooks/use-plugin-config.ts
6
+ /**
7
+ * Returns the client-side config exposed by a plugin's `clientConfig()` method.
8
+ *
9
+ * The value is read once from the boot-time `<script id="__appkit__">` payload
10
+ * and cached for the lifetime of the component. Because `clientConfig()` runs
11
+ * at server startup, the data is static and never changes during a session.
12
+ *
13
+ * @param pluginName - The plugin name as registered in AppKit (e.g. `"files"`)
14
+ * @returns The plugin's client config object, typed via the generic parameter
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * interface FilesConfig { volumes: string[] }
19
+ *
20
+ * function MyComponent() {
21
+ * const { volumes } = usePluginClientConfig<FilesConfig>("files");
22
+ * return <ul>{volumes.map(v => <li key={v}>{v}</li>)}</ul>;
23
+ * }
24
+ * ```
25
+ */
26
+ function usePluginClientConfig(pluginName) {
27
+ return useMemo(() => getPluginClientConfig(pluginName), [pluginName]);
28
+ }
29
+
30
+ //#endregion
31
+ export { usePluginClientConfig };
32
+ //# sourceMappingURL=use-plugin-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-plugin-config.js","names":[],"sources":["../../../src/react/hooks/use-plugin-config.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { getPluginClientConfig } from \"@/js\";\n\n/**\n * Returns the client-side config exposed by a plugin's `clientConfig()` method.\n *\n * The value is read once from the boot-time `<script id=\"__appkit__\">` payload\n * and cached for the lifetime of the component. Because `clientConfig()` runs\n * at server startup, the data is static and never changes during a session.\n *\n * @param pluginName - The plugin name as registered in AppKit (e.g. `\"files\"`)\n * @returns The plugin's client config object, typed via the generic parameter\n *\n * @example\n * ```tsx\n * interface FilesConfig { volumes: string[] }\n *\n * function MyComponent() {\n * const { volumes } = usePluginClientConfig<FilesConfig>(\"files\");\n * return <ul>{volumes.map(v => <li key={v}>{v}</li>)}</ul>;\n * }\n * ```\n */\nexport function usePluginClientConfig<T = Record<string, unknown>>(\n pluginName: string,\n): T {\n return useMemo(() => getPluginClientConfig<T>(pluginName), [pluginName]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,SAAgB,sBACd,YACG;AACH,QAAO,cAAc,sBAAyB,WAAW,EAAE,CAAC,WAAW,CAAC"}
@@ -27,8 +27,8 @@ import { FilePreviewPanel, FilePreviewPanelProps } from "./file-browser/file-pre
27
27
  import { NewFolderInput, NewFolderInputProps } from "./file-browser/new-folder-input.js";
28
28
  import "./file-browser/index.js";
29
29
  import { ColumnCategory, GenieColumnMeta, TransformedGenieData, transformGenieData } from "./genie/genie-query-transform.js";
30
- import { ChartInference, inferChartType } from "./genie/genie-chart-inference.js";
31
- import { GenieChatProps, GenieChatStatus, GenieMessageItem, UseGenieChatOptions, UseGenieChatReturn } from "./genie/types.js";
30
+ import { ChartInference, getCompatibleChartTypes, inferChartType } from "./genie/genie-chart-inference.js";
31
+ import { GenieChatProps, GenieChatStatus, GenieMessageItem, TERMINAL_STATUSES, UseGenieChatOptions, UseGenieChatReturn } from "./genie/types.js";
32
32
  import { GenieChat } from "./genie/genie-chat.js";
33
33
  import { GenieChatInput } from "./genie/genie-chat-input.js";
34
34
  import { GenieChatMessage } from "./genie/genie-chat-message.js";
@@ -38,6 +38,7 @@ import { useGenieChat } from "./genie/use-genie-chat.js";
38
38
  import "./genie/index.js";
39
39
  import { AnalyticsFormat, InferResultByFormat, InferRowType, PluginRegistry, QueryRegistry, TypedArrowTable, UseAnalyticsQueryOptions, UseAnalyticsQueryResult } from "./hooks/types.js";
40
40
  import { useAnalyticsQuery } from "./hooks/use-analytics-query.js";
41
+ import { usePluginClientConfig } from "./hooks/use-plugin-config.js";
41
42
  import "./hooks/index.js";
42
43
  import { cn } from "./lib/utils.js";
43
44
  import { PortalContainerContext, PortalContainerProvider, usePortalContainer, useResolvedPortalContainer } from "./portal-container-context.js";
@@ -97,4 +98,4 @@ import { Textarea } from "./ui/textarea.js";
97
98
  import { Toggle, toggleVariants } from "./ui/toggle.js";
98
99
  import { ToggleGroup, ToggleGroupItem } from "./ui/toggle-group.js";
99
100
  import "./ui/index.js";
100
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnalyticsFormat, AreaChart, AreaChartProps, AreaChartSpecificProps, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BarChart, BarChartProps, BarChartSpecificProps, BaseChart, BaseChartProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CHART_COLOR_VARS, CHART_COLOR_VARS_CATEGORICAL, CHART_COLOR_VARS_DIVERGING, CHART_COLOR_VARS_SEQUENTIAL, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, CartesianContext, ChartBaseProps, ChartColorPalette, ChartConfig, ChartContainer, ChartData, ChartInference, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChartType, ChartWrapper, ChartWrapperProps, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, ColumnCategory, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DATE_FIELD_PATTERNS, DataFormat, DataProps, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectoryEntry, DirectoryList, DirectoryListProps, DonutChart, DonutChartProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FALLBACK_COLORS_CATEGORICAL, FALLBACK_COLORS_DIVERGING, FALLBACK_COLORS_SEQUENTIAL, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FileBreadcrumb, FileBreadcrumbProps, FileBrowserLabels, FileEntry, FileEntryProps, FilePreview, FilePreviewPanel, FilePreviewPanelProps, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, GenieAttachmentResponse, GenieChat, GenieChatInput, GenieChatMessage, GenieChatMessageList, GenieChatProps, GenieChatStatus, GenieColumnMeta, GenieMessageItem, GenieMessageResponse, GenieQueryVisualization, GenieStatementResponse, GenieStreamEvent, HeatmapChart, HeatmapChartProps, HeatmapChartSpecificProps, HeatmapContext, HoverCard, HoverCardContent, HoverCardTrigger, InferResultByFormat, InferRowType, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, LineChart, LineChartProps, LineChartSpecificProps, METADATA_DATE_PATTERNS, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NAME_FIELD_PATTERNS, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NewFolderInput, NewFolderInputProps, NormalizedChartData, NormalizedChartDataBase, NormalizedHeatmapData, OptionBuilderContext, Orientation, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PieChart, PieChartProps, PieChartSpecificProps, PluginRegistry, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalContainerContext, PortalContainerProvider, Progress, QueryProps, QueryRegistry, RadarChart, RadarChartProps, RadarChartSpecificProps, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScatterChart, ScatterChartProps, ScatterChartSpecificProps, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransformedGenieData, TypedArrowTable, UnifiedChartProps, UseAnalyticsQueryOptions, UseAnalyticsQueryResult, UseChartDataOptions, UseChartDataResult, UseGenieChatOptions, UseGenieChatReturn, badgeVariants, buildCartesianOption, buildHeatmapOption, buildHorizontalBarOption, buildPieOption, buildRadarOption, buttonGroupVariants, buttonVariants, cn, createChart, createTimeSeriesData, formatFileSize, formatLabel, inferChartType, isArrowTable, isDataProps, isQueryProps, navigationMenuTriggerStyle, normalizeChartData, normalizeHeatmapData, sortTimeSeriesAscending, toChartArray, toChartValue, toggleVariants, transformGenieData, truncateLabel, useAllThemeColors, useAnalyticsQuery, useChartData, useFormField, useGenieChat, usePortalContainer, useResolvedPortalContainer, useSidebar, useThemeColors };
101
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnalyticsFormat, AreaChart, AreaChartProps, AreaChartSpecificProps, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BarChart, BarChartProps, BarChartSpecificProps, BaseChart, BaseChartProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CHART_COLOR_VARS, CHART_COLOR_VARS_CATEGORICAL, CHART_COLOR_VARS_DIVERGING, CHART_COLOR_VARS_SEQUENTIAL, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, CartesianContext, ChartBaseProps, ChartColorPalette, ChartConfig, ChartContainer, ChartData, ChartInference, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChartType, ChartWrapper, ChartWrapperProps, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, ColumnCategory, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DATE_FIELD_PATTERNS, DataFormat, DataProps, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectoryEntry, DirectoryList, DirectoryListProps, DonutChart, DonutChartProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FALLBACK_COLORS_CATEGORICAL, FALLBACK_COLORS_DIVERGING, FALLBACK_COLORS_SEQUENTIAL, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FileBreadcrumb, FileBreadcrumbProps, FileBrowserLabels, FileEntry, FileEntryProps, FilePreview, FilePreviewPanel, FilePreviewPanelProps, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, GenieAttachmentResponse, GenieChat, GenieChatInput, GenieChatMessage, GenieChatMessageList, GenieChatProps, GenieChatStatus, GenieColumnMeta, GenieMessageItem, GenieMessageResponse, GenieQueryVisualization, GenieStatementResponse, GenieStreamEvent, HeatmapChart, HeatmapChartProps, HeatmapChartSpecificProps, HeatmapContext, HoverCard, HoverCardContent, HoverCardTrigger, InferResultByFormat, InferRowType, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, LineChart, LineChartProps, LineChartSpecificProps, METADATA_DATE_PATTERNS, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NAME_FIELD_PATTERNS, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NewFolderInput, NewFolderInputProps, NormalizedChartData, NormalizedChartDataBase, NormalizedHeatmapData, OptionBuilderContext, Orientation, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PieChart, PieChartProps, PieChartSpecificProps, PluginRegistry, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalContainerContext, PortalContainerProvider, Progress, QueryProps, QueryRegistry, RadarChart, RadarChartProps, RadarChartSpecificProps, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScatterChart, ScatterChartProps, ScatterChartSpecificProps, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Switch, TERMINAL_STATUSES, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransformedGenieData, TypedArrowTable, UnifiedChartProps, UseAnalyticsQueryOptions, UseAnalyticsQueryResult, UseChartDataOptions, UseChartDataResult, UseGenieChatOptions, UseGenieChatReturn, badgeVariants, buildCartesianOption, buildHeatmapOption, buildHorizontalBarOption, buildPieOption, buildRadarOption, buttonGroupVariants, buttonVariants, cn, createChart, createTimeSeriesData, formatFileSize, formatLabel, getCompatibleChartTypes, inferChartType, isArrowTable, isDataProps, isQueryProps, navigationMenuTriggerStyle, normalizeChartData, normalizeHeatmapData, sortTimeSeriesAscending, toChartArray, toChartValue, toggleVariants, transformGenieData, truncateLabel, useAllThemeColors, useAnalyticsQuery, useChartData, useFormField, useGenieChat, usePluginClientConfig, usePortalContainer, useResolvedPortalContainer, useSidebar, useThemeColors };
@@ -30,11 +30,13 @@ import { FileBreadcrumb } from "./file-browser/file-breadcrumb.js";
30
30
  import { FilePreviewPanel } from "./file-browser/file-preview-panel.js";
31
31
  import { NewFolderInput } from "./file-browser/new-folder-input.js";
32
32
  import "./file-browser/index.js";
33
- import { inferChartType } from "./genie/genie-chart-inference.js";
33
+ import { getCompatibleChartTypes, inferChartType } from "./genie/genie-chart-inference.js";
34
34
  import { GenieChatInput } from "./genie/genie-chat-input.js";
35
35
  import { ScrollArea, ScrollBar } from "./ui/scroll-area.js";
36
36
  import { Spinner } from "./ui/spinner.js";
37
37
  import { Avatar, AvatarFallback, AvatarImage } from "./ui/avatar.js";
38
+ import { PortalContainerContext, PortalContainerProvider, usePortalContainer, useResolvedPortalContainer } from "./portal-container-context.js";
39
+ import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./ui/dropdown-menu.js";
38
40
  import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "./ui/table.js";
39
41
  import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs.js";
40
42
  import { transformGenieData } from "./genie/genie-query-transform.js";
@@ -44,9 +46,8 @@ import { GenieChatMessageList } from "./genie/genie-chat-message-list.js";
44
46
  import { useGenieChat } from "./genie/use-genie-chat.js";
45
47
  import { GenieChat } from "./genie/genie-chat.js";
46
48
  import "./genie/index.js";
49
+ import { usePluginClientConfig } from "./hooks/use-plugin-config.js";
47
50
  import "./hooks/index.js";
48
- import { PortalContainerContext, PortalContainerProvider, usePortalContainer, useResolvedPortalContainer } from "./portal-container-context.js";
49
- import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./ui/dropdown-menu.js";
50
51
  import { Input } from "./ui/input.js";
51
52
  import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "./ui/select.js";
52
53
  import { Checkbox } from "./ui/checkbox.js";
@@ -94,4 +95,4 @@ import { Toggle, toggleVariants } from "./ui/toggle.js";
94
95
  import { ToggleGroup, ToggleGroupItem } from "./ui/toggle-group.js";
95
96
  import "./ui/index.js";
96
97
 
97
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AreaChart, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BarChart, BaseChart, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CHART_COLOR_VARS, CHART_COLOR_VARS_CATEGORICAL, CHART_COLOR_VARS_DIVERGING, CHART_COLOR_VARS_SEQUENTIAL, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChartWrapper, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DATE_FIELD_PATTERNS, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectoryList, DonutChart, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FALLBACK_COLORS_CATEGORICAL, FALLBACK_COLORS_DIVERGING, FALLBACK_COLORS_SEQUENTIAL, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FileBreadcrumb, FileEntry, FilePreviewPanel, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, GenieChat, GenieChatInput, GenieChatMessage, GenieChatMessageList, GenieQueryVisualization, HeatmapChart, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, LineChart, METADATA_DATE_PATTERNS, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NAME_FIELD_PATTERNS, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NewFolderInput, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PieChart, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalContainerContext, PortalContainerProvider, Progress, RadarChart, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScatterChart, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buildCartesianOption, buildHeatmapOption, buildHorizontalBarOption, buildPieOption, buildRadarOption, buttonGroupVariants, buttonVariants, cn, createChart, createTimeSeriesData, formatFileSize, formatLabel, inferChartType, isArrowTable, isDataProps, isQueryProps, navigationMenuTriggerStyle, normalizeChartData, normalizeHeatmapData, sortTimeSeriesAscending, toChartArray, toChartValue, toggleVariants, transformGenieData, truncateLabel, useAllThemeColors, useAnalyticsQuery, useChartData, useFormField, useGenieChat, usePortalContainer, useResolvedPortalContainer, useSidebar, useThemeColors };
98
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AreaChart, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BarChart, BaseChart, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CHART_COLOR_VARS, CHART_COLOR_VARS_CATEGORICAL, CHART_COLOR_VARS_DIVERGING, CHART_COLOR_VARS_SEQUENTIAL, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChartWrapper, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DATE_FIELD_PATTERNS, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectoryList, DonutChart, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FALLBACK_COLORS_CATEGORICAL, FALLBACK_COLORS_DIVERGING, FALLBACK_COLORS_SEQUENTIAL, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FileBreadcrumb, FileEntry, FilePreviewPanel, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, GenieChat, GenieChatInput, GenieChatMessage, GenieChatMessageList, GenieQueryVisualization, HeatmapChart, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, LineChart, METADATA_DATE_PATTERNS, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NAME_FIELD_PATTERNS, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NewFolderInput, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PieChart, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalContainerContext, PortalContainerProvider, Progress, RadarChart, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScatterChart, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buildCartesianOption, buildHeatmapOption, buildHorizontalBarOption, buildPieOption, buildRadarOption, buttonGroupVariants, buttonVariants, cn, createChart, createTimeSeriesData, formatFileSize, formatLabel, getCompatibleChartTypes, inferChartType, isArrowTable, isDataProps, isQueryProps, navigationMenuTriggerStyle, normalizeChartData, normalizeHeatmapData, sortTimeSeriesAscending, toChartArray, toChartValue, toggleVariants, transformGenieData, truncateLabel, useAllThemeColors, useAnalyticsQuery, useChartData, useFormField, useGenieChat, usePluginClientConfig, usePortalContainer, useResolvedPortalContainer, useSidebar, useThemeColors };
@@ -1,7 +1,7 @@
1
1
  import { formatFieldLabel } from "../lib/format.js";
2
2
  import { Button } from "../ui/button.js";
3
- import { Table as Table$1, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../ui/table.js";
4
3
  import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuTrigger } from "../ui/dropdown-menu.js";
4
+ import { Table as Table$1, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../ui/table.js";
5
5
  import { Input } from "../ui/input.js";
6
6
  import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../ui/select.js";
7
7
  import { TableWrapper } from "./table-wrapper.js";
@@ -5,9 +5,9 @@ import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, Breadcr
5
5
  import { ScrollArea, ScrollBar } from "./scroll-area.js";
6
6
  import { Spinner } from "./spinner.js";
7
7
  import { Avatar, AvatarFallback, AvatarImage } from "./avatar.js";
8
+ import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./dropdown-menu.js";
8
9
  import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "./table.js";
9
10
  import { Tabs, TabsContent, TabsList, TabsTrigger } from "./tabs.js";
10
- import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./dropdown-menu.js";
11
11
  import { Input } from "./input.js";
12
12
  import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "./select.js";
13
13
  import { Checkbox } from "./checkbox.js";
@@ -1,4 +1,4 @@
1
- import "./plugin.js";
1
+ import { PluginClientConfigs, PluginEndpointMap, PluginEndpoints } from "./plugin.js";
2
2
  import "./cache.js";
3
3
  import "./execute.js";
4
4
  import { GenieAttachmentResponse, GenieMessageResponse, GenieStatementResponse, GenieStreamEvent } from "./genie.js";
@@ -1,2 +1,13 @@
1
1
  import "express";
2
- import "json-schema";
2
+ import "json-schema";
3
+
4
+ //#region ../shared/src/plugin.d.ts
5
+ /** Map of endpoint names to their full paths for a plugin */
6
+ type PluginEndpointMap = Record<string, string>;
7
+ /** Map of plugin names to their endpoint maps */
8
+ type PluginEndpoints = Record<string, PluginEndpointMap>;
9
+ /** Map of plugin names to their client-exposed config */
10
+ type PluginClientConfigs = Record<string, Record<string, unknown>>;
11
+ //#endregion
12
+ export { PluginClientConfigs, PluginEndpointMap, PluginEndpoints };
13
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","names":[],"sources":["../../../../shared/src/plugin.ts"],"mappings":";;;;;KAuNY,iBAAA,GAAoB,MAAA;;KAGpB,eAAA,GAAkB,MAAA,SAAe,iBAAA;;KAGjC,mBAAA,GAAsB,MAAA,SAAe,MAAA"}
@@ -251,7 +251,65 @@ A proxied plugin instance that executes as the user
251
251
 
252
252
  #### Throws[​](#throws "Direct link to Throws")
253
253
 
254
- AuthenticationError if user token is not available in request headers (production only). In development mode (`NODE_ENV=development`), falls back to the service principal instead of throwing.
254
+ AuthenticationError if user token is not available in request headers (production only). In development mode (`NODE_ENV=development`), skips user impersonation instead of throwing.
255
+
256
+ ***
257
+
258
+ ### clientConfig()[​](#clientconfig "Direct link to clientConfig()")
259
+
260
+ ```ts
261
+ clientConfig(): Record<string, unknown>;
262
+
263
+ ```
264
+
265
+ Returns startup config to expose to the client. Override this to surface server-side values that are safe to publish to the frontend, such as feature flags, resource IDs, or other app boot settings.
266
+
267
+ This runs once when the server starts, so it should not depend on request-scoped or user-specific state.
268
+
269
+ String values that match non-public environment variables are redacted unless you intentionally expose them via a matching `PUBLIC_APPKIT_` env var.
270
+
271
+ Values must be JSON-serializable plain data (no functions, Dates, classes, Maps, Sets, BigInts, or circular references). By default returns an empty object (plugin contributes nothing to client config).
272
+
273
+ On the client, read the config with the `usePluginClientConfig` hook (React) or the `getPluginClientConfig` function (vanilla JS), both from `@databricks/appkit-ui`.
274
+
275
+ #### Returns[​](#returns-3 "Direct link to Returns")
276
+
277
+ `Record`<`string`, `unknown`>
278
+
279
+ #### Example[​](#example "Direct link to Example")
280
+
281
+ ```ts
282
+ // Server — plugin definition
283
+ class MyPlugin extends Plugin<MyConfig> {
284
+ clientConfig() {
285
+ return {
286
+ warehouseId: this.config.warehouseId,
287
+ features: { darkMode: true },
288
+ };
289
+ }
290
+ }
291
+
292
+ // Client — React component
293
+ import { usePluginClientConfig } from "@databricks/appkit-ui/react";
294
+
295
+ interface MyPluginConfig { warehouseId: string; features: { darkMode: boolean } }
296
+
297
+ const config = usePluginClientConfig<MyPluginConfig>("myPlugin");
298
+ config.warehouseId; // "abc-123"
299
+
300
+ // Client — vanilla JS
301
+ import { getPluginClientConfig } from "@databricks/appkit-ui/js";
302
+
303
+ const config = getPluginClientConfig<MyPluginConfig>("myPlugin");
304
+
305
+ ```
306
+
307
+ #### Implementation of[​](#implementation-of-2 "Direct link to Implementation of")
308
+
309
+ ```ts
310
+ BasePlugin.clientConfig
311
+
312
+ ```
255
313
 
256
314
  ***
257
315
 
@@ -283,7 +341,7 @@ All errors are caught and `undefined` is returned (production-safe). Route handl
283
341
  | `options` | `PluginExecutionSettings` |
284
342
  | `userKey?` | `string` |
285
343
 
286
- #### Returns[​](#returns-3 "Direct link to Returns")
344
+ #### Returns[​](#returns-4 "Direct link to Returns")
287
345
 
288
346
  `Promise`<`T` | `undefined`>
289
347
 
@@ -315,7 +373,7 @@ userKey?: string): Promise<void>;
315
373
  | `options` | [`StreamExecutionSettings`](./docs/api/appkit/Interface.StreamExecutionSettings.md) |
316
374
  | `userKey?` | `string` |
317
375
 
318
- #### Returns[​](#returns-4 "Direct link to Returns")
376
+ #### Returns[​](#returns-5 "Direct link to Returns")
319
377
 
320
378
  `Promise`<`void`>
321
379
 
@@ -332,11 +390,11 @@ Returns the public exports for this plugin. Override this to define a custom pub
332
390
 
333
391
  The returned object becomes the plugin's public API on the AppKit instance (e.g. `appkit.myPlugin.method()`). AppKit automatically binds method context and adds `asUser(req)` for user-scoped execution.
334
392
 
335
- #### Returns[​](#returns-5 "Direct link to Returns")
393
+ #### Returns[​](#returns-6 "Direct link to Returns")
336
394
 
337
395
  `unknown`
338
396
 
339
- #### Example[​](#example "Direct link to Example")
397
+ #### Example[​](#example-1 "Direct link to Example")
340
398
 
341
399
  ```ts
342
400
  class MyPlugin extends Plugin {
@@ -353,7 +411,7 @@ appkit.myPlugin.getData();
353
411
 
354
412
  ```
355
413
 
356
- #### Implementation of[​](#implementation-of-2 "Direct link to Implementation of")
414
+ #### Implementation of[​](#implementation-of-3 "Direct link to Implementation of")
357
415
 
358
416
  ```ts
359
417
  BasePlugin.exports
@@ -369,11 +427,11 @@ getEndpoints(): PluginEndpointMap;
369
427
 
370
428
  ```
371
429
 
372
- #### Returns[​](#returns-6 "Direct link to Returns")
430
+ #### Returns[​](#returns-7 "Direct link to Returns")
373
431
 
374
432
  `PluginEndpointMap`
375
433
 
376
- #### Implementation of[​](#implementation-of-3 "Direct link to Implementation of")
434
+ #### Implementation of[​](#implementation-of-4 "Direct link to Implementation of")
377
435
 
378
436
  ```ts
379
437
  BasePlugin.getEndpoints
@@ -389,11 +447,11 @@ getSkipBodyParsingPaths(): ReadonlySet<string>;
389
447
 
390
448
  ```
391
449
 
392
- #### Returns[​](#returns-7 "Direct link to Returns")
450
+ #### Returns[​](#returns-8 "Direct link to Returns")
393
451
 
394
452
  `ReadonlySet`<`string`>
395
453
 
396
- #### Implementation of[​](#implementation-of-4 "Direct link to Implementation of")
454
+ #### Implementation of[​](#implementation-of-5 "Direct link to Implementation of")
397
455
 
398
456
  ```ts
399
457
  BasePlugin.getSkipBodyParsingPaths
@@ -415,11 +473,11 @@ injectRoutes(_: Router): void;
415
473
  | --------- | -------- |
416
474
  | `_` | `Router` |
417
475
 
418
- #### Returns[​](#returns-8 "Direct link to Returns")
476
+ #### Returns[​](#returns-9 "Direct link to Returns")
419
477
 
420
478
  `void`
421
479
 
422
- #### Implementation of[​](#implementation-of-5 "Direct link to Implementation of")
480
+ #### Implementation of[​](#implementation-of-6 "Direct link to Implementation of")
423
481
 
424
482
  ```ts
425
483
  BasePlugin.injectRoutes
@@ -442,7 +500,7 @@ protected registerEndpoint(name: string, path: string): void;
442
500
  | `name` | `string` |
443
501
  | `path` | `string` |
444
502
 
445
- #### Returns[​](#returns-9 "Direct link to Returns")
503
+ #### Returns[​](#returns-10 "Direct link to Returns")
446
504
 
447
505
  `void`
448
506
 
@@ -465,7 +523,7 @@ Returns the `x-forwarded-user` header when present. In development mode (`NODE_E
465
523
  | --------- | --------- |
466
524
  | `req` | `Request` |
467
525
 
468
- #### Returns[​](#returns-10 "Direct link to Returns")
526
+ #### Returns[​](#returns-11 "Direct link to Returns")
469
527
 
470
528
  `string`
471
529
 
@@ -495,7 +553,7 @@ protected route<_TResponse>(router: Router, config: RouteConfig): void;
495
553
  | `router` | `Router` |
496
554
  | `config` | `RouteConfig` |
497
555
 
498
- #### Returns[​](#returns-11 "Direct link to Returns")
556
+ #### Returns[​](#returns-12 "Direct link to Returns")
499
557
 
500
558
  `void`
501
559
 
@@ -508,11 +566,11 @@ setup(): Promise<void>;
508
566
 
509
567
  ```
510
568
 
511
- #### Returns[​](#returns-12 "Direct link to Returns")
569
+ #### Returns[​](#returns-13 "Direct link to Returns")
512
570
 
513
571
  `Promise`<`void`>
514
572
 
515
- #### Implementation of[​](#implementation-of-6 "Direct link to Implementation of")
573
+ #### Implementation of[​](#implementation-of-7 "Direct link to Implementation of")
516
574
 
517
575
  ```ts
518
576
  BasePlugin.setup
@@ -5,7 +5,7 @@ Manage your AppKit application throughout its lifecycle using the Databricks CLI
5
5
  ## Prerequisites[​](#prerequisites "Direct link to Prerequisites")
6
6
 
7
7
  * [Node.js](https://nodejs.org) v22+ environment with `npm`
8
- * Databricks CLI (v0.287.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
8
+ * Databricks CLI (v0.295.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
9
9
 
10
10
  ## Create app[​](#create-app "Direct link to Create app")
11
11
 
@@ -59,7 +59,7 @@ The Node.js backend layer built with `@databricks/appkit`:
59
59
  Integration with Databricks services:
60
60
 
61
61
  * **SQL Warehouses**: Execute analytical queries with Arrow or JSON format
62
- * **Lakebase V1 (Provisioned)**: Access data from Lakebase Provisioned. Support for Lakebase Autoscaling coming soon.
62
+ * **Lakebase Autoscaling**: OLTP database access with automatic OAuth token refresh
63
63
 
64
64
  ## See also[​](#see-also "Direct link to See also")
65
65
 
@@ -3,7 +3,7 @@
3
3
  ## Prerequisites[​](#prerequisites "Direct link to Prerequisites")
4
4
 
5
5
  * [Node.js](https://nodejs.org) v22+ environment with `npm`
6
- * Databricks CLI (v0.287.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
6
+ * Databricks CLI (v0.295.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
7
7
  * A new Databricks app with AppKit installed. See [Bootstrap a new Databricks app](./docs.md#quick-start-options) for more details.
8
8
 
9
9
  AppKit integrates with AI coding assistants through the Agent Skills.
@@ -13,7 +13,7 @@ AppKit integrates with AI coding assistants through the Agent Skills.
13
13
  To install the Databricks Agent Skills for your preferred AI assistant, run:
14
14
 
15
15
  ```bash
16
- databricks experimental aitools skills install
16
+ databricks experimental aitools install
17
17
 
18
18
  ```
19
19
 
@@ -3,7 +3,7 @@
3
3
  ## Prerequisites[​](#prerequisites "Direct link to Prerequisites")
4
4
 
5
5
  * [Node.js](https://nodejs.org) v22+ environment with `npm`
6
- * Databricks CLI (v0.287.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
6
+ * Databricks CLI (v0.295.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
7
7
  * A new Databricks app with AppKit installed. See [Bootstrap a new Databricks app](./docs.md#quick-start-options) for more details.
8
8
 
9
9
  Once your app is bootstrapped according to the [Manual quick start](./docs.md#manual-quick-start) guide, you can start the development server with hot reload for both UI and backend code.
@@ -3,7 +3,7 @@
3
3
  ## Prerequisites[​](#prerequisites "Direct link to Prerequisites")
4
4
 
5
5
  * [Node.js](https://nodejs.org) v22+ environment with `npm`
6
- * Databricks CLI (v0.287.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
6
+ * Databricks CLI (v0.295.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
7
7
  * A new Databricks app with AppKit installed. See [Bootstrap a new Databricks app](./docs.md#quick-start-options) for more details.
8
8
 
9
9
  Remote bridge allows you to develop against a deployed backend while keeping your UI and queries local. This is useful for testing against production data or debugging deployed backend code without redeploying your app.
@@ -0,0 +1,93 @@
1
+ # Templates
2
+
3
+ AppKit uses a template system powered by the Databricks CLI's `databricks apps init` command. Templates define the project structure, and `.tmpl` files are processed with Go's `text/template` engine to generate customized output.
4
+
5
+ ## How `.tmpl` files work[​](#how-tmpl-files-work "Direct link to how-tmpl-files-work")
6
+
7
+ Any file ending in `.tmpl` is processed by the CLI during `databricks apps init`:
8
+
9
+ 1. The `.tmpl` suffix is stripped (e.g. `.env.tmpl` → `.env`)
10
+ 2. Go template expressions are evaluated and substituted
11
+ 3. The rendered file is written to the output directory
12
+
13
+ Files named with a `_` prefix are renamed to `.` prefix (e.g. `_gitignore` → `.gitignore`).
14
+
15
+ ### Template variables[​](#template-variables "Direct link to Template variables")
16
+
17
+ | Variable | Description |
18
+ | ----------------- | ---------------------------------------------------------------------------- |
19
+ | `.projectName` | Project name from `--name` or interactive prompt |
20
+ | `.workspaceHost` | Databricks workspace URL |
21
+ | `.profile` | Databricks CLI profile name (empty if using host-based auth) |
22
+ | `.appDescription` | App description |
23
+ | `.plugins.<name>` | Non-nil for each selected plugin, enabling conditionals |
24
+ | `.dotEnv.content` | Generated `.env` content from plugin resources |
25
+ | `.dotEnv.example` | Generated `.env.example` content with placeholders |
26
+ | `.bundle.*` | Generated `databricks.yml` sections (variables, resources, target variables) |
27
+ | `.appEnv` | Generated `app.yaml` env entries |
28
+
29
+ ### Conditional content[​](#conditional-content "Direct link to Conditional content")
30
+
31
+ Use Go template conditionals to include/exclude code based on selected plugins:
32
+
33
+ ```go
34
+ {{- if .plugins.analytics}}
35
+ import { analytics } from '@databricks/appkit';
36
+ {{- end}}
37
+
38
+ ```
39
+
40
+ ## `appkit.plugins.json`[​](#appkitpluginsjson "Direct link to appkitpluginsjson")
41
+
42
+ The plugin manifest drives the CLI's behavior during `databricks apps init`:
43
+
44
+ * **Plugin selection UI** — selectable plugins shown in the interactive prompt
45
+ * **Resource prompts** — required/optional resources prompt the user for values (e.g. SQL Warehouse ID)
46
+ * **`.dotEnv` population** — resource fields with an `env` property are written to `.env`
47
+ * **`app.yaml` generation** — resource fields produce `env` + `valueFrom` entries
48
+ * **`databricks.yml` generation** — resource fields produce bundle variables and app resource entries
49
+
50
+ ### Resource field properties[​](#resource-field-properties "Direct link to Resource field properties")
51
+
52
+ Each resource field in the manifest can have these properties:
53
+
54
+ | Property | Description |
55
+ | -------------- | ----------------------------------------------------------------------------------- |
56
+ | `env` | Environment variable name written to `.env` and `app.yaml` |
57
+ | `description` | Shown in the interactive prompt and bundle variable description |
58
+ | `localOnly` | Only written to `.env` for local dev; excluded from `app.yaml` and bundle variables |
59
+ | `bundleIgnore` | Excluded from `databricks.yml` variables (but still in `.env`) |
60
+ | `value` | Default value used when no user input is provided |
61
+ | `resolve` | Auto-populated by CLI from API calls instead of prompting (see below) |
62
+ | `examples` | Example values shown in field descriptions |
63
+
64
+ ### Resolvers[​](#resolvers "Direct link to Resolvers")
65
+
66
+ Fields with a `resolve` property are auto-populated by the CLI from API calls rather than user prompts. The format is `<type>:<field>`.
67
+
68
+ Currently only the `postgres` resource type has a resolver. Given the user-provided `branch` and `database` resource names, it derives:
69
+
70
+ | Resolve key | Description |
71
+ | ----------------------- | ----------------------------------------------------------- |
72
+ | `postgres:host` | Postgres host from the branch's read-write endpoint |
73
+ | `postgres:databaseName` | Postgres database name from the database resource |
74
+ | `postgres:endpointPath` | Lakebase endpoint resource name from the branch's endpoints |
75
+
76
+ Example field definition:
77
+
78
+ ```json
79
+ {
80
+ "host": {
81
+ "env": "PGHOST",
82
+ "localOnly": true,
83
+ "resolve": "postgres:host",
84
+ "description": "Postgres host for local development."
85
+ }
86
+ }
87
+
88
+ ```
89
+
90
+ ## See also[​](#see-also "Direct link to See also")
91
+
92
+ * [Plugin management](./docs/plugins/plugin-management.md) — `appkit plugin sync`, `appkit plugin create`
93
+ * [Configuration](./docs/configuration.md) — environment variables
@@ -5,7 +5,7 @@ AppKit provides multiple development workflows to suit different needs: local de
5
5
  ## Prerequisites[​](#prerequisites "Direct link to Prerequisites")
6
6
 
7
7
  * [Node.js](https://nodejs.org) v22+ environment with `npm`
8
- * Databricks CLI (v0.287.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
8
+ * Databricks CLI (v0.295.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
9
9
  * A new Databricks app with AppKit installed. See [Bootstrap a new Databricks app](./docs.md#quick-start-options) for more details.
10
10
 
11
11
  ## Development flows[​](#development-flows "Direct link to Development flows")
@@ -16,7 +16,9 @@ await createApp({
16
16
 
17
17
  ```
18
18
 
19
- Storage auto-selects **Lakebase V1 (Provisioned) persistent cache when healthy**, otherwise falls back to in-memory. Support for Lakebase Autoscaling coming soon.
19
+ Storage auto-selects **Lakebase Autoscaling persistent cache when healthy**, otherwise falls back to in-memory.
20
+
21
+ The database-backed cache requires the same Lakebase environment variables as the [Lakebase plugin](./docs/plugins/lakebase.md#environment-variables) (`PGHOST`, `PGDATABASE`, `LAKEBASE_ENDPOINT`, `PGSSLMODE`).
20
22
 
21
23
  ## Plugin-level caching[​](#plugin-level-caching "Direct link to Plugin-level caching")
22
24
 
@@ -42,4 +42,4 @@ Exported from `@databricks/appkit`:
42
42
 
43
43
  ## Development mode behavior[​](#development-mode-behavior "Direct link to Development mode behavior")
44
44
 
45
- In local development (`NODE_ENV=development`), if `asUser(req)` is called without a user token, it logs a warning and falls back to the service principal.
45
+ In local development (`NODE_ENV=development`), if `asUser(req)` is called without a user token, it logs a warning and skips user impersonation the operation runs with the default credentials configured for the app instead.
@@ -17,7 +17,7 @@ The easiest way to get started with the Lakebase plugin is to use the Databricks
17
17
  ### Prerequisites[​](#prerequisites "Direct link to Prerequisites")
18
18
 
19
19
  * [Node.js](https://nodejs.org) v22+ environment with `npm`
20
- * Databricks CLI (v0.287.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
20
+ * Databricks CLI (v0.295.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
21
21
  * A new Databricks app with AppKit installed. See [Bootstrap a new Databricks app](./docs.md#quick-start-options) for more details.
22
22
 
23
23
  ### Steps[​](#steps "Direct link to Steps")
package/docs.md CHANGED
@@ -19,7 +19,7 @@ AppKit simplifies building data applications on Databricks by providing:
19
19
  ## Prerequisites[​](#prerequisites "Direct link to Prerequisites")
20
20
 
21
21
  * [Node.js](https://nodejs.org) v22+ environment with `npm`
22
- * Databricks CLI (v0.287.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
22
+ * Databricks CLI (v0.295.0 or higher): install and configure it according to the [official tutorial](https://docs.databricks.com/aws/en/dev-tools/cli/tutorial).
23
23
 
24
24
  ## Quick start options[​](#quick-start-options "Direct link to Quick start options")
25
25
 
@@ -37,7 +37,7 @@ Databricks AppKit is designed to work with AI coding assistants through Agent Sk
37
37
  Install Agent Skills and configure it for use with your preferred AI assistant:
38
38
 
39
39
  ```bash
40
- databricks experimental aitools skills install
40
+ databricks experimental aitools install
41
41
 
42
42
  ```
43
43