@databricks/appkit-ui 0.31.0 → 0.33.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.
- package/CLAUDE.md +54 -1
- package/NOTICE.md +2 -0
- package/dist/react/hooks/index.d.ts +1 -0
- package/dist/react/hooks/index.js +1 -0
- package/dist/react/hooks/types.d.ts +11 -5
- package/dist/react/hooks/types.d.ts.map +1 -1
- package/dist/react/hooks/use-agent-chat.d.ts +128 -0
- package/dist/react/hooks/use-agent-chat.d.ts.map +1 -0
- package/dist/react/hooks/use-agent-chat.js +133 -0
- package/dist/react/hooks/use-agent-chat.js.map +1 -0
- package/dist/react/hooks/use-analytics-query.d.ts +4 -4
- package/dist/react/hooks/use-analytics-query.d.ts.map +1 -1
- package/dist/react/hooks/use-analytics-query.js +4 -4
- package/dist/react/hooks/use-analytics-query.js.map +1 -1
- package/dist/react/hooks/use-chart-data.js +9 -9
- package/dist/react/hooks/use-chart-data.js.map +1 -1
- package/dist/react/index.d.ts +2 -1
- package/dist/react/index.js +2 -1
- package/dist/shared/src/plugin.d.ts.map +1 -1
- package/docs/api/appkit/Class.AppKitMcpClient.md +157 -0
- package/docs/api/appkit/Class.DatabricksAdapter.md +151 -0
- package/docs/api/appkit/Class.Plugin.md +65 -23
- package/docs/api/appkit/Function.agentIdFromMarkdownPath.md +18 -0
- package/docs/api/appkit/Function.createAgent.md +33 -0
- package/docs/api/appkit/Function.createApp.md +10 -8
- package/docs/api/appkit/Function.defineTool.md +26 -0
- package/docs/api/appkit/Function.executeFromRegistry.md +25 -0
- package/docs/api/appkit/Function.functionToolToDefinition.md +16 -0
- package/docs/api/appkit/Function.isFunctionTool.md +16 -0
- package/docs/api/appkit/Function.isHostedTool.md +16 -0
- package/docs/api/appkit/Function.isToolkitEntry.md +18 -0
- package/docs/api/appkit/Function.loadAgentFromFile.md +21 -0
- package/docs/api/appkit/Function.loadAgentsFromDir.md +26 -0
- package/docs/api/appkit/Function.mcpServer.md +28 -0
- package/docs/api/appkit/Function.parseTextToolCalls.md +26 -0
- package/docs/api/appkit/Function.resolveHostedTools.md +16 -0
- package/docs/api/appkit/Function.runAgent.md +26 -0
- package/docs/api/appkit/Function.tool.md +28 -0
- package/docs/api/appkit/Function.toolsFromRegistry.md +20 -0
- package/docs/api/appkit/Interface.AgentAdapter.md +21 -0
- package/docs/api/appkit/Interface.AgentDefinition.md +112 -0
- package/docs/api/appkit/Interface.AgentInput.md +37 -0
- package/docs/api/appkit/Interface.AgentRunContext.md +32 -0
- package/docs/api/appkit/Interface.AgentToolDefinition.md +37 -0
- package/docs/api/appkit/Interface.AgentsPluginConfig.md +241 -0
- package/docs/api/appkit/Interface.AutoInheritToolsConfig.md +27 -0
- package/docs/api/appkit/Interface.BasePluginConfig.md +1 -0
- package/docs/api/appkit/Interface.FunctionTool.md +80 -0
- package/docs/api/appkit/Interface.McpConnectAllResult.md +38 -0
- package/docs/api/appkit/Interface.Message.md +55 -0
- package/docs/api/appkit/Interface.PluginToolkitProvider.md +22 -0
- package/docs/api/appkit/Interface.PromptContext.md +30 -0
- package/docs/api/appkit/Interface.RegisteredAgent.md +75 -0
- package/docs/api/appkit/Interface.RunAgentInput.md +34 -0
- package/docs/api/appkit/Interface.RunAgentResult.md +23 -0
- package/docs/api/appkit/Interface.Thread.md +46 -0
- package/docs/api/appkit/Interface.ThreadStore.md +103 -0
- package/docs/api/appkit/Interface.ToolAnnotations.md +56 -0
- package/docs/api/appkit/Interface.ToolConfig.md +72 -0
- package/docs/api/appkit/Interface.ToolEntry.md +73 -0
- package/docs/api/appkit/Interface.ToolProvider.md +38 -0
- package/docs/api/appkit/Interface.ToolkitEntry.md +59 -0
- package/docs/api/appkit/Interface.ToolkitOptions.md +45 -0
- package/docs/api/appkit/TypeAlias.AgentEvent.md +299 -0
- package/docs/api/appkit/TypeAlias.AgentTool.md +11 -0
- package/docs/api/appkit/TypeAlias.AgentTools.md +8 -0
- package/docs/api/appkit/TypeAlias.AgentToolsFn.md +20 -0
- package/docs/api/appkit/TypeAlias.BaseSystemPromptOption.md +9 -0
- package/docs/api/appkit/TypeAlias.HostedTool.md +10 -0
- package/docs/api/appkit/TypeAlias.Plugins.md +26 -0
- package/docs/api/appkit/TypeAlias.ResolvedToolEntry.md +29 -0
- package/docs/api/appkit/TypeAlias.ToolRegistry.md +6 -0
- package/docs/api/appkit/Variable.agents.md +19 -0
- package/docs/api/appkit.md +113 -62
- package/docs/plugins/agents.md +441 -0
- package/docs/privacy.md +41 -0
- package/llms.txt +54 -1
- package/package.json +1 -1
- package/sbom.cdx.json +1 -1
|
@@ -8,17 +8,17 @@ const ARROW_THRESHOLD = 500;
|
|
|
8
8
|
* Resolves the data format based on hints and preferences
|
|
9
9
|
*/
|
|
10
10
|
function resolveFormat(format, parameters) {
|
|
11
|
-
if (format === "json") return "
|
|
12
|
-
if (format === "arrow") return "
|
|
11
|
+
if (format === "json") return "JSON_ARRAY";
|
|
12
|
+
if (format === "arrow") return "ARROW_STREAM";
|
|
13
13
|
if (format === "auto") {
|
|
14
|
-
if (parameters?._preferArrow === true) return "
|
|
15
|
-
if (parameters?._preferJson === true) return "
|
|
14
|
+
if (parameters?._preferArrow === true) return "ARROW_STREAM";
|
|
15
|
+
if (parameters?._preferJson === true) return "JSON_ARRAY";
|
|
16
16
|
const limit = parameters?.limit;
|
|
17
|
-
if (typeof limit === "number" && limit > ARROW_THRESHOLD) return "
|
|
18
|
-
if (parameters?.startDate && parameters?.endDate) return "
|
|
19
|
-
return "
|
|
17
|
+
if (typeof limit === "number" && limit > ARROW_THRESHOLD) return "ARROW_STREAM";
|
|
18
|
+
if (parameters?.startDate && parameters?.endDate) return "ARROW_STREAM";
|
|
19
|
+
return "JSON_ARRAY";
|
|
20
20
|
}
|
|
21
|
-
return "
|
|
21
|
+
return "JSON_ARRAY";
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Hook for fetching chart data in either JSON or Arrow format.
|
|
@@ -42,7 +42,7 @@ function resolveFormat(format, parameters) {
|
|
|
42
42
|
function useChartData(options) {
|
|
43
43
|
const { queryKey, parameters, format = "auto", transformer } = options;
|
|
44
44
|
const resolvedFormat = useMemo(() => resolveFormat(format, parameters), [format, parameters]);
|
|
45
|
-
const isArrowFormat = resolvedFormat === "
|
|
45
|
+
const isArrowFormat = resolvedFormat === "ARROW_STREAM";
|
|
46
46
|
const { data: rawData, loading, error } = useAnalyticsQuery(queryKey, parameters, {
|
|
47
47
|
autoStart: true,
|
|
48
48
|
format: resolvedFormat
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-chart-data.js","names":[],"sources":["../../../src/react/hooks/use-chart-data.ts"],"sourcesContent":["import type { Table } from \"apache-arrow\";\nimport { useMemo } from \"react\";\nimport type { ChartData, DataFormat } from \"../charts/types\";\nimport { useAnalyticsQuery } from \"./use-analytics-query\";\n\n/** Threshold for auto-selecting Arrow format (row count hint) */\nconst ARROW_THRESHOLD = 500;\n\n// ============================================================================\n// Hook Options & Result Types\n// ============================================================================\n\nexport interface UseChartDataOptions {\n /** Analytics query key */\n queryKey: string;\n /** Query parameters */\n parameters?: Record<string, unknown>;\n /**\n * Data format preference\n * - \"json\": Force JSON format\n * - \"arrow\": Force Arrow format\n * - \"auto\": Auto-select based on heuristics\n * @default \"auto\"\n */\n format?: DataFormat;\n /** Transform data after fetching */\n transformer?: <T>(data: T) => T;\n}\n\nexport interface UseChartDataResult {\n /** The fetched data (Arrow Table or JSON array) */\n data: ChartData | null;\n /** Whether the data is in Arrow format */\n isArrow: boolean;\n /** Loading state */\n loading: boolean;\n /** Error message if any */\n error: string | null;\n /** Whether the data is empty */\n isEmpty: boolean;\n}\n\n// ============================================================================\n// Format Resolution\n// ============================================================================\n\n/**\n * Resolves the data format based on hints and preferences\n */\nfunction resolveFormat(\n format: DataFormat,\n parameters?: Record<string, unknown>,\n): \"
|
|
1
|
+
{"version":3,"file":"use-chart-data.js","names":[],"sources":["../../../src/react/hooks/use-chart-data.ts"],"sourcesContent":["import type { Table } from \"apache-arrow\";\nimport { useMemo } from \"react\";\nimport type { ChartData, DataFormat } from \"../charts/types\";\nimport { useAnalyticsQuery } from \"./use-analytics-query\";\n\n/** Threshold for auto-selecting Arrow format (row count hint) */\nconst ARROW_THRESHOLD = 500;\n\n// ============================================================================\n// Hook Options & Result Types\n// ============================================================================\n\nexport interface UseChartDataOptions {\n /** Analytics query key */\n queryKey: string;\n /** Query parameters */\n parameters?: Record<string, unknown>;\n /**\n * Data format preference\n * - \"json\": Force JSON format\n * - \"arrow\": Force Arrow format\n * - \"auto\": Auto-select based on heuristics\n * @default \"auto\"\n */\n format?: DataFormat;\n /** Transform data after fetching */\n transformer?: <T>(data: T) => T;\n}\n\nexport interface UseChartDataResult {\n /** The fetched data (Arrow Table or JSON array) */\n data: ChartData | null;\n /** Whether the data is in Arrow format */\n isArrow: boolean;\n /** Loading state */\n loading: boolean;\n /** Error message if any */\n error: string | null;\n /** Whether the data is empty */\n isEmpty: boolean;\n}\n\n// ============================================================================\n// Format Resolution\n// ============================================================================\n\n/**\n * Resolves the data format based on hints and preferences\n */\nfunction resolveFormat(\n format: DataFormat,\n parameters?: Record<string, unknown>,\n): \"JSON_ARRAY\" | \"ARROW_STREAM\" {\n // Explicit format selection\n if (format === \"json\") return \"JSON_ARRAY\";\n if (format === \"arrow\") return \"ARROW_STREAM\";\n\n // Auto-selection heuristics\n if (format === \"auto\") {\n // Check for explicit hint in parameters\n if (parameters?._preferArrow === true) return \"ARROW_STREAM\";\n if (parameters?._preferJson === true) return \"JSON_ARRAY\";\n\n // Check limit parameter as data size hint\n const limit = parameters?.limit;\n if (typeof limit === \"number\" && limit > ARROW_THRESHOLD) {\n return \"ARROW_STREAM\";\n }\n\n // Check for date range queries (often large)\n if (parameters?.startDate && parameters?.endDate) {\n return \"ARROW_STREAM\";\n }\n\n return \"JSON_ARRAY\";\n }\n\n return \"JSON_ARRAY\";\n}\n\n// ============================================================================\n// Main Hook\n// ============================================================================\n\n/**\n * Hook for fetching chart data in either JSON or Arrow format.\n * Automatically selects the best format based on query hints.\n *\n * @example\n * ```tsx\n * // Auto-select format\n * const { data, isArrow, loading } = useChartData({\n * queryKey: \"spend_data\",\n * parameters: { limit: 1000 }\n * });\n *\n * // Force Arrow format\n * const { data } = useChartData({\n * queryKey: \"big_query\",\n * format: \"arrow\"\n * });\n * ```\n */\nexport function useChartData(options: UseChartDataOptions): UseChartDataResult {\n const { queryKey, parameters, format = \"auto\", transformer } = options;\n\n // Resolve the format to use\n const resolvedFormat = useMemo(\n () => resolveFormat(format, parameters),\n [format, parameters],\n );\n\n const isArrowFormat = resolvedFormat === \"ARROW_STREAM\";\n\n // Fetch data using the analytics query hook\n const {\n data: rawData,\n loading,\n error,\n } = useAnalyticsQuery(queryKey, parameters, {\n autoStart: true,\n format: resolvedFormat,\n });\n\n // Process and transform data\n const processedData = useMemo(() => {\n if (!rawData) return null;\n\n // Apply transformer if provided\n if (transformer) {\n try {\n return transformer(rawData);\n } catch (err) {\n console.error(\"[useChartData] Transformer error:\", err);\n return rawData;\n }\n }\n\n return rawData;\n }, [rawData, transformer]);\n\n // Determine if data is empty\n const isEmpty = useMemo(() => {\n if (!processedData) return true;\n\n // Arrow Table - check using duck typing\n if (\n typeof processedData === \"object\" &&\n \"numRows\" in processedData &&\n typeof (processedData as Table).numRows === \"number\"\n ) {\n return (processedData as Table).numRows === 0;\n }\n\n // JSON Array\n if (Array.isArray(processedData)) {\n return processedData.length === 0;\n }\n\n return true;\n }, [processedData]);\n\n // Detect actual data type (may differ from requested if server doesn't support format)\n const isArrow = useMemo(() => {\n if (!processedData) return isArrowFormat;\n // Duck type check for Arrow Table\n return (\n typeof processedData === \"object\" &&\n processedData !== null &&\n \"schema\" in processedData &&\n \"numRows\" in processedData &&\n typeof (processedData as Table).getChild === \"function\"\n );\n }, [processedData, isArrowFormat]);\n\n return {\n data: processedData as ChartData | null,\n isArrow,\n loading,\n error,\n isEmpty,\n };\n}\n"],"mappings":";;;;;AAMA,MAAM,kBAAkB;;;;AA2CxB,SAAS,cACP,QACA,YAC+B;AAE/B,KAAI,WAAW,OAAQ,QAAO;AAC9B,KAAI,WAAW,QAAS,QAAO;AAG/B,KAAI,WAAW,QAAQ;AAErB,MAAI,YAAY,iBAAiB,KAAM,QAAO;AAC9C,MAAI,YAAY,gBAAgB,KAAM,QAAO;EAG7C,MAAM,QAAQ,YAAY;AAC1B,MAAI,OAAO,UAAU,YAAY,QAAQ,gBACvC,QAAO;AAIT,MAAI,YAAY,aAAa,YAAY,QACvC,QAAO;AAGT,SAAO;;AAGT,QAAO;;;;;;;;;;;;;;;;;;;;;AA0BT,SAAgB,aAAa,SAAkD;CAC7E,MAAM,EAAE,UAAU,YAAY,SAAS,QAAQ,gBAAgB;CAG/D,MAAM,iBAAiB,cACf,cAAc,QAAQ,WAAW,EACvC,CAAC,QAAQ,WAAW,CACrB;CAED,MAAM,gBAAgB,mBAAmB;CAGzC,MAAM,EACJ,MAAM,SACN,SACA,UACE,kBAAkB,UAAU,YAAY;EAC1C,WAAW;EACX,QAAQ;EACT,CAAC;CAGF,MAAM,gBAAgB,cAAc;AAClC,MAAI,CAAC,QAAS,QAAO;AAGrB,MAAI,YACF,KAAI;AACF,UAAO,YAAY,QAAQ;WACpB,KAAK;AACZ,WAAQ,MAAM,qCAAqC,IAAI;AACvD,UAAO;;AAIX,SAAO;IACN,CAAC,SAAS,YAAY,CAAC;CAG1B,MAAM,UAAU,cAAc;AAC5B,MAAI,CAAC,cAAe,QAAO;AAG3B,MACE,OAAO,kBAAkB,YACzB,aAAa,iBACb,OAAQ,cAAwB,YAAY,SAE5C,QAAQ,cAAwB,YAAY;AAI9C,MAAI,MAAM,QAAQ,cAAc,CAC9B,QAAO,cAAc,WAAW;AAGlC,SAAO;IACN,CAAC,cAAc,CAAC;AAenB,QAAO;EACL,MAAM;EACN,SAdc,cAAc;AAC5B,OAAI,CAAC,cAAe,QAAO;AAE3B,UACE,OAAO,kBAAkB,YACzB,kBAAkB,QAClB,YAAY,iBACZ,aAAa,iBACb,OAAQ,cAAwB,aAAa;KAE9C,CAAC,eAAe,cAAc,CAAC;EAKhC;EACA;EACA;EACD"}
|
package/dist/react/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ import { GenieQueryVisualization } from "./genie/genie-query-visualization.js";
|
|
|
37
37
|
import { useGenieChat } from "./genie/use-genie-chat.js";
|
|
38
38
|
import "./genie/index.js";
|
|
39
39
|
import { AnalyticsFormat, InferResultByFormat, InferRowType, InferServingChunk, InferServingRequest, InferServingResponse, PluginRegistry, QueryRegistry, ServingAlias, ServingEndpointRegistry, TypedArrowTable, UseAnalyticsQueryOptions, UseAnalyticsQueryResult } from "./hooks/types.js";
|
|
40
|
+
import { AgentChatEvent, UseAgentChatOptions, UseAgentChatResult, useAgentChat } from "./hooks/use-agent-chat.js";
|
|
40
41
|
import { useAnalyticsQuery } from "./hooks/use-analytics-query.js";
|
|
41
42
|
import { usePluginClientConfig } from "./hooks/use-plugin-config.js";
|
|
42
43
|
import { UseServingInvokeOptions, UseServingInvokeResult, useServingInvoke } from "./hooks/use-serving-invoke.js";
|
|
@@ -100,4 +101,4 @@ import { Textarea } from "./ui/textarea.js";
|
|
|
100
101
|
import { Toggle, toggleVariants } from "./ui/toggle.js";
|
|
101
102
|
import { ToggleGroup, ToggleGroupItem } from "./ui/toggle-group.js";
|
|
102
103
|
import "./ui/index.js";
|
|
103
|
-
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, InferServingChunk, InferServingRequest, InferServingResponse, 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, ServingAlias, ServingEndpointRegistry, 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, UseServingInvokeOptions, UseServingInvokeResult, UseServingStreamOptions, UseServingStreamResult, 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, useServingInvoke, useServingStream, useSidebar, useThemeColors };
|
|
104
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AgentChatEvent, 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, InferServingChunk, InferServingRequest, InferServingResponse, 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, ServingAlias, ServingEndpointRegistry, 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, UseAgentChatOptions, UseAgentChatResult, UseAnalyticsQueryOptions, UseAnalyticsQueryResult, UseChartDataOptions, UseChartDataResult, UseGenieChatOptions, UseGenieChatReturn, UseServingInvokeOptions, UseServingInvokeResult, UseServingStreamOptions, UseServingStreamResult, 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, useAgentChat, useAllThemeColors, useAnalyticsQuery, useChartData, useFormField, useGenieChat, usePluginClientConfig, usePortalContainer, useResolvedPortalContainer, useServingInvoke, useServingStream, useSidebar, useThemeColors };
|
package/dist/react/index.js
CHANGED
|
@@ -46,6 +46,7 @@ import { GenieChatMessageList } from "./genie/genie-chat-message-list.js";
|
|
|
46
46
|
import { useGenieChat } from "./genie/use-genie-chat.js";
|
|
47
47
|
import { GenieChat } from "./genie/genie-chat.js";
|
|
48
48
|
import "./genie/index.js";
|
|
49
|
+
import { useAgentChat } from "./hooks/use-agent-chat.js";
|
|
49
50
|
import { usePluginClientConfig } from "./hooks/use-plugin-config.js";
|
|
50
51
|
import { useServingInvoke } from "./hooks/use-serving-invoke.js";
|
|
51
52
|
import { useServingStream } from "./hooks/use-serving-stream.js";
|
|
@@ -97,4 +98,4 @@ import { Toggle, toggleVariants } from "./ui/toggle.js";
|
|
|
97
98
|
import { ToggleGroup, ToggleGroupItem } from "./ui/toggle-group.js";
|
|
98
99
|
import "./ui/index.js";
|
|
99
100
|
|
|
100
|
-
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, useServingInvoke, useServingStream, useSidebar, useThemeColors };
|
|
101
|
+
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, useAgentChat, useAllThemeColors, useAnalyticsQuery, useChartData, useFormField, useGenieChat, usePluginClientConfig, usePortalContainer, useResolvedPortalContainer, useServingInvoke, useServingStream, useSidebar, useThemeColors };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","names":[],"sources":["../../../../shared/src/plugin.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","names":[],"sources":["../../../../shared/src/plugin.ts"],"mappings":";;;;;KAgOY,iBAAA,GAAoB,MAAA;;KAGpB,eAAA,GAAkB,MAAA,SAAe,iBAAA;;KAGjC,mBAAA,GAAsB,MAAA,SAAe,MAAA"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# Class: AppKitMcpClient
|
|
2
|
+
|
|
3
|
+
Lightweight MCP client for Databricks-hosted MCP servers.
|
|
4
|
+
|
|
5
|
+
Uses raw fetch() with JSON-RPC 2.0 over HTTP — no @modelcontextprotocol/sdk or LangChain dependency. Supports the Streamable HTTP transport only (POST with JSON-RPC request, single JSON-RPC response). Implements exactly four methods: `initialize`, `notifications/initialized`, `tools/list`, `tools/call`. No prompts/resources/completion/sampling.
|
|
6
|
+
|
|
7
|
+
All outbound URLs are gated by an McpHostPolicy: unallowlisted hosts are rejected before the first byte is sent, and workspace credentials are only forwarded to the same-origin workspace. See `mcp-host-policy.ts`.
|
|
8
|
+
|
|
9
|
+
Rationale for hand-rolling JSON-RPC instead of `@modelcontextprotocol/sdk`: see the file-level comment at the top of this module.
|
|
10
|
+
|
|
11
|
+
## Constructors[](#constructors "Direct link to Constructors")
|
|
12
|
+
|
|
13
|
+
### Constructor[](#constructor "Direct link to Constructor")
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
new AppKitMcpClient(
|
|
17
|
+
workspaceHost: string,
|
|
18
|
+
authenticate: () => Promise<Record<string, string>>,
|
|
19
|
+
policy: McpHostPolicy,
|
|
20
|
+
options: {
|
|
21
|
+
dnsLookup?: DnsLookup;
|
|
22
|
+
fetchImpl?: (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
23
|
+
}): AppKitMcpClient;
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
#### Parameters[](#parameters "Direct link to Parameters")
|
|
28
|
+
|
|
29
|
+
| Parameter | Type |
|
|
30
|
+
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
|
31
|
+
| `workspaceHost` | `string` |
|
|
32
|
+
| `authenticate` | () => `Promise`<`Record`<`string`, `string`>> |
|
|
33
|
+
| `policy` | `McpHostPolicy` |
|
|
34
|
+
| `options` | { `dnsLookup?`: `DnsLookup`; `fetchImpl?`: (`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`<`Response`>; } |
|
|
35
|
+
| `options.dnsLookup?` | `DnsLookup` |
|
|
36
|
+
| `options.fetchImpl?` | (`input`: `string` \| `URL` \| `Request`, `init?`: `RequestInit`) => `Promise`<`Response`> |
|
|
37
|
+
|
|
38
|
+
#### Returns[](#returns "Direct link to Returns")
|
|
39
|
+
|
|
40
|
+
`AppKitMcpClient`
|
|
41
|
+
|
|
42
|
+
## Methods[](#methods "Direct link to Methods")
|
|
43
|
+
|
|
44
|
+
### callTool()[](#calltool "Direct link to callTool()")
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
callTool(
|
|
48
|
+
qualifiedName: string,
|
|
49
|
+
args: unknown,
|
|
50
|
+
authHeaders?: Record<string, string>,
|
|
51
|
+
callerSignal?: AbortSignal): Promise<string>;
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
#### Parameters[](#parameters-1 "Direct link to Parameters")
|
|
56
|
+
|
|
57
|
+
| Parameter | Type |
|
|
58
|
+
| --------------- | ---------------------------- |
|
|
59
|
+
| `qualifiedName` | `string` |
|
|
60
|
+
| `args` | `unknown` |
|
|
61
|
+
| `authHeaders?` | `Record`<`string`, `string`> |
|
|
62
|
+
| `callerSignal?` | `AbortSignal` |
|
|
63
|
+
|
|
64
|
+
#### Returns[](#returns-1 "Direct link to Returns")
|
|
65
|
+
|
|
66
|
+
`Promise`<`string`>
|
|
67
|
+
|
|
68
|
+
***
|
|
69
|
+
|
|
70
|
+
### canForwardWorkspaceAuth()[](#canforwardworkspaceauth "Direct link to canForwardWorkspaceAuth()")
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
canForwardWorkspaceAuth(serverName: string): boolean;
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Whether the named MCP server may receive workspace-scoped auth headers (e.g., an OBO bearer token from an end-user request). Callers should gate auth-forwarding decisions on this to prevent credential exfiltration to non-workspace hosts.
|
|
78
|
+
|
|
79
|
+
#### Parameters[](#parameters-2 "Direct link to Parameters")
|
|
80
|
+
|
|
81
|
+
| Parameter | Type |
|
|
82
|
+
| ------------ | -------- |
|
|
83
|
+
| `serverName` | `string` |
|
|
84
|
+
|
|
85
|
+
#### Returns[](#returns-2 "Direct link to Returns")
|
|
86
|
+
|
|
87
|
+
`boolean`
|
|
88
|
+
|
|
89
|
+
***
|
|
90
|
+
|
|
91
|
+
### close()[](#close "Direct link to close()")
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
close(): Promise<void>;
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
#### Returns[](#returns-3 "Direct link to Returns")
|
|
99
|
+
|
|
100
|
+
`Promise`<`void`>
|
|
101
|
+
|
|
102
|
+
***
|
|
103
|
+
|
|
104
|
+
### connect()[](#connect "Direct link to connect()")
|
|
105
|
+
|
|
106
|
+
```ts
|
|
107
|
+
connect(endpoint: McpEndpointConfig): Promise<void>;
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
#### Parameters[](#parameters-3 "Direct link to Parameters")
|
|
112
|
+
|
|
113
|
+
| Parameter | Type |
|
|
114
|
+
| ---------- | ------------------- |
|
|
115
|
+
| `endpoint` | `McpEndpointConfig` |
|
|
116
|
+
|
|
117
|
+
#### Returns[](#returns-4 "Direct link to Returns")
|
|
118
|
+
|
|
119
|
+
`Promise`<`void`>
|
|
120
|
+
|
|
121
|
+
***
|
|
122
|
+
|
|
123
|
+
### connectAll()[](#connectall "Direct link to connectAll()")
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
connectAll(endpoints: McpEndpointConfig[]): Promise<McpConnectAllResult>;
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Connects every endpoint in parallel and returns a structured summary so callers can distinguish "all connected" from "some failed".
|
|
131
|
+
|
|
132
|
+
Returning the result instead of throwing is deliberate: one misconfigured MCP server should not take down the entire agents plugin at boot, and the agents plugin uses the summary to warn at startup with the failed-endpoint names. Errors are also logged here so a caller that ignores the return still gets per-endpoint diagnostics.
|
|
133
|
+
|
|
134
|
+
#### Parameters[](#parameters-4 "Direct link to Parameters")
|
|
135
|
+
|
|
136
|
+
| Parameter | Type |
|
|
137
|
+
| ----------- | ---------------------- |
|
|
138
|
+
| `endpoints` | `McpEndpointConfig`\[] |
|
|
139
|
+
|
|
140
|
+
#### Returns[](#returns-5 "Direct link to Returns")
|
|
141
|
+
|
|
142
|
+
`Promise`<[`McpConnectAllResult`](./docs/api/appkit/Interface.McpConnectAllResult.md)>
|
|
143
|
+
|
|
144
|
+
`connected` lists the endpoint names that initialised successfully; `failed` carries `{ name, error }` for the rest.
|
|
145
|
+
|
|
146
|
+
***
|
|
147
|
+
|
|
148
|
+
### getAllToolDefinitions()[](#getalltooldefinitions "Direct link to getAllToolDefinitions()")
|
|
149
|
+
|
|
150
|
+
```ts
|
|
151
|
+
getAllToolDefinitions(): AgentToolDefinition[];
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
#### Returns[](#returns-6 "Direct link to Returns")
|
|
156
|
+
|
|
157
|
+
[`AgentToolDefinition`](./docs/api/appkit/Interface.AgentToolDefinition.md)\[]
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Class: DatabricksAdapter
|
|
2
|
+
|
|
3
|
+
Adapter that talks directly to Databricks Model Serving `/invocations` endpoint.
|
|
4
|
+
|
|
5
|
+
No dependency on the Vercel AI SDK or LangChain. Uses raw `fetch()` to POST OpenAI-compatible payloads and parses the SSE stream itself. Calls `authenticate()` per-request so tokens are always fresh.
|
|
6
|
+
|
|
7
|
+
Handles both structured `tool_calls` responses and text-based tool call fallback parsing for models that output tool calls as text.
|
|
8
|
+
|
|
9
|
+
## Examples[](#examples "Direct link to Examples")
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { createApp, createAgent, agents } from "@databricks/appkit";
|
|
13
|
+
import { DatabricksAdapter } from "@databricks/appkit/beta";
|
|
14
|
+
import { WorkspaceClient } from "@databricks/sdk-experimental";
|
|
15
|
+
|
|
16
|
+
const adapter = DatabricksAdapter.fromServingEndpoint({
|
|
17
|
+
workspaceClient: new WorkspaceClient({}),
|
|
18
|
+
endpointName: "my-endpoint",
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
await createApp({
|
|
22
|
+
plugins: [
|
|
23
|
+
agents({
|
|
24
|
+
agents: {
|
|
25
|
+
assistant: createAgent({
|
|
26
|
+
instructions: "You are a helpful assistant.",
|
|
27
|
+
model: adapter,
|
|
28
|
+
}),
|
|
29
|
+
},
|
|
30
|
+
}),
|
|
31
|
+
],
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
const adapter = new DatabricksAdapter({
|
|
38
|
+
endpointUrl: "https://host/serving-endpoints/my-endpoint/invocations",
|
|
39
|
+
authenticate: async () => ({ Authorization: `Bearer ${token}` }),
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Implements[](#implements "Direct link to Implements")
|
|
45
|
+
|
|
46
|
+
* [`AgentAdapter`](./docs/api/appkit/Interface.AgentAdapter.md)
|
|
47
|
+
|
|
48
|
+
## Constructors[](#constructors "Direct link to Constructors")
|
|
49
|
+
|
|
50
|
+
### Constructor[](#constructor "Direct link to Constructor")
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
new DatabricksAdapter(options: DatabricksAdapterOptions): DatabricksAdapter;
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### Parameters[](#parameters "Direct link to Parameters")
|
|
58
|
+
|
|
59
|
+
| Parameter | Type |
|
|
60
|
+
| --------- | -------------------------- |
|
|
61
|
+
| `options` | `DatabricksAdapterOptions` |
|
|
62
|
+
|
|
63
|
+
#### Returns[](#returns "Direct link to Returns")
|
|
64
|
+
|
|
65
|
+
`DatabricksAdapter`
|
|
66
|
+
|
|
67
|
+
## Methods[](#methods "Direct link to Methods")
|
|
68
|
+
|
|
69
|
+
### run()[](#run "Direct link to run()")
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
run(input: AgentInput, context: AgentRunContext): AsyncGenerator<AgentEvent, void, unknown>;
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
#### Parameters[](#parameters-1 "Direct link to Parameters")
|
|
77
|
+
|
|
78
|
+
| Parameter | Type |
|
|
79
|
+
| --------- | ------------------------------------------------------------------------- |
|
|
80
|
+
| `input` | [`AgentInput`](./docs/api/appkit/Interface.AgentInput.md) |
|
|
81
|
+
| `context` | [`AgentRunContext`](./docs/api/appkit/Interface.AgentRunContext.md) |
|
|
82
|
+
|
|
83
|
+
#### Returns[](#returns-1 "Direct link to Returns")
|
|
84
|
+
|
|
85
|
+
`AsyncGenerator`<[`AgentEvent`](./docs/api/appkit/TypeAlias.AgentEvent.md), `void`, `unknown`>
|
|
86
|
+
|
|
87
|
+
#### Implementation of[](#implementation-of "Direct link to Implementation of")
|
|
88
|
+
|
|
89
|
+
[`AgentAdapter`](./docs/api/appkit/Interface.AgentAdapter.md).[`run`](./docs/api/appkit/Interface.AgentAdapter.md#run)
|
|
90
|
+
|
|
91
|
+
***
|
|
92
|
+
|
|
93
|
+
### fromModelServing()[](#frommodelserving "Direct link to fromModelServing()")
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
static fromModelServing(endpointName?: string, options?: ModelServingOptions): Promise<DatabricksAdapter>;
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Creates a DatabricksAdapter from a Model Serving endpoint name. Auto-creates a WorkspaceClient internally. Reads the endpoint name from the argument or the `DATABRICKS_SERVING_ENDPOINT_NAME` env var.
|
|
101
|
+
|
|
102
|
+
#### Parameters[](#parameters-2 "Direct link to Parameters")
|
|
103
|
+
|
|
104
|
+
| Parameter | Type |
|
|
105
|
+
| --------------- | --------------------- |
|
|
106
|
+
| `endpointName?` | `string` |
|
|
107
|
+
| `options?` | `ModelServingOptions` |
|
|
108
|
+
|
|
109
|
+
#### Returns[](#returns-2 "Direct link to Returns")
|
|
110
|
+
|
|
111
|
+
`Promise`<`DatabricksAdapter`>
|
|
112
|
+
|
|
113
|
+
#### Example[](#example "Direct link to Example")
|
|
114
|
+
|
|
115
|
+
```ts
|
|
116
|
+
// Reads endpoint from DATABRICKS_SERVING_ENDPOINT_NAME env var
|
|
117
|
+
const adapter = await DatabricksAdapter.fromModelServing();
|
|
118
|
+
|
|
119
|
+
// Explicit endpoint
|
|
120
|
+
const adapter = await DatabricksAdapter.fromModelServing("my-endpoint");
|
|
121
|
+
|
|
122
|
+
// With options
|
|
123
|
+
const adapter = await DatabricksAdapter.fromModelServing("my-endpoint", {
|
|
124
|
+
maxSteps: 5,
|
|
125
|
+
maxTokens: 2048,
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
***
|
|
131
|
+
|
|
132
|
+
### fromServingEndpoint()[](#fromservingendpoint "Direct link to fromServingEndpoint()")
|
|
133
|
+
|
|
134
|
+
```ts
|
|
135
|
+
static fromServingEndpoint(options: ServingEndpointOptions): Promise<DatabricksAdapter>;
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Creates a DatabricksAdapter for a Databricks Model Serving endpoint.
|
|
140
|
+
|
|
141
|
+
Routes through the shared `connectors/serving/stream` helper, which delegates to the SDK's `apiClient.request({ raw: true })`. That gives the adapter centralised URL encoding + authentication with the rest of the serving surface — no bespoke `fetch()` + `authenticate()` plumbing.
|
|
142
|
+
|
|
143
|
+
#### Parameters[](#parameters-3 "Direct link to Parameters")
|
|
144
|
+
|
|
145
|
+
| Parameter | Type |
|
|
146
|
+
| --------- | ------------------------ |
|
|
147
|
+
| `options` | `ServingEndpointOptions` |
|
|
148
|
+
|
|
149
|
+
#### Returns[](#returns-3 "Direct link to Returns")
|
|
150
|
+
|
|
151
|
+
`Promise`<`DatabricksAdapter`>
|