@mcp-use/inspector 20.0.0-beta.5 → 20.0.0-beta.50
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/README.md +31 -78
- package/dist/app/inspector.css.gz +0 -0
- package/dist/app/inspector.js.gz +0 -0
- package/dist/app/providers/anthropic.png +0 -0
- package/dist/app/providers/google.png +0 -0
- package/dist/app/providers/openai.png +0 -0
- package/dist/cli.js +332 -1384
- package/dist/client/index.d.ts +1405 -50
- package/dist/client/index.js +165 -24019
- package/dist/server/index.d.ts +79 -7
- package/dist/server/index.js +370 -22
- package/package.json +77 -35
- package/dist/cdn/AnimatePresence-Dcw-FOy8.js +0 -393
- package/dist/cdn/ChatTab-B255lH5i.js +0 -6744
- package/dist/cdn/CheckboxIndicator-Bt4IICtv.js +0 -251
- package/dist/cdn/ConnectionSettingsForm-DF-NS58d.js +0 -929
- package/dist/cdn/ConnectionSettingsTab-dI-Cqe79.js +0 -150
- package/dist/cdn/ElicitationTab-CL1KJ0bz.js +0 -654
- package/dist/cdn/FormContext-tmgN_Vdr.js +0 -135
- package/dist/cdn/InspectorContext-UjtEbNod.js +0 -123
- package/dist/cdn/JSONDisplay-BFxf5oEu.js +0 -324
- package/dist/cdn/ListTabHeader-Cv-GmtGF.js +0 -88
- package/dist/cdn/ManufactOAuthCallback-B98kSYCj.js +0 -31
- package/dist/cdn/MarkdownRenderer-Ba7nA4Ie.js +0 -3610
- package/dist/cdn/NotificationsTab-CeImSrhx.js +0 -290
- package/dist/cdn/OAuthCallback-Blc2Asxc.js +0 -58
- package/dist/cdn/PromptsTab-BYKnY7Rp.js +0 -901
- package/dist/cdn/ResourcesTab-BGualKW-.js +0 -564
- package/dist/cdn/SamplingTab-BeZBUeni.js +0 -658
- package/dist/cdn/ServerMetadataTab-CvrKX8fz.js +0 -244
- package/dist/cdn/StatusIcon-D0-ARyOh.js +0 -66
- package/dist/cdn/ToolsTab-j6n4O_3s.js +0 -2033
- package/dist/cdn/ViewPreview-DihyG6Qd.js +0 -238
- package/dist/cdn/WidgetDebugContext-D4usL_MA.js +0 -324
- package/dist/cdn/WidgetWrapper-B4H3Fek7.js +0 -2210
- package/dist/cdn/basePath-B8HuhIMu.js +0 -25
- package/dist/cdn/bell-CGjAO_0s.js +0 -10
- package/dist/cdn/browser-CbQIH4w2.js +0 -42
- package/dist/cdn/brush-B_mKhyxG.js +0 -17
- package/dist/cdn/card-DgiYnSg-.js +0 -41
- package/dist/cdn/cfWorker-Bxcs9rNe.js +0 -10799
- package/dist/cdn/checkbox-By0FklhG.js +0 -20
- package/dist/cdn/chunk-QUQL4437-XnDcYQEx.js +0 -1508
- package/dist/cdn/clock-CmUbSx_B.js +0 -12
- package/dist/cdn/code-V_0nf5rg.js +0 -10
- package/dist/cdn/createLucideIcon-C5fZZ6oB.js +0 -38
- package/dist/cdn/dialog-BsDpuJd3.js +0 -1028
- package/dist/cdn/dist-DaMB0Su9.js +0 -616
- package/dist/cdn/dist-DbX5yidW.js +0 -2306
- package/dist/cdn/external-link-CjmfT6rW.js +0 -17
- package/dist/cdn/eye-B7H96av8.js +0 -29
- package/dist/cdn/folder-open-B3lu2rG_.js +0 -7
- package/dist/cdn/hash-BVQnWi7q.js +0 -33
- package/dist/cdn/history-Csw4rb44.js +0 -17
- package/dist/cdn/index-browser-DkQOzkvX.js +0 -1934
- package/dist/cdn/info-CNiOwqkf.js +0 -19
- package/dist/cdn/input-C2OBd4PJ.js +0 -12160
- package/dist/cdn/inspector-settings-layout-0VDsjeqb.js +0 -4
- package/dist/cdn/inspector.css +0 -2
- package/dist/cdn/inspector.js +0 -24523
- package/dist/cdn/jsx-runtime-CIxvMpEo.js +0 -180
- package/dist/cdn/label-B9Jmm9be.js +0 -60
- package/dist/cdn/loader-circle-BLy9A_pp.js +0 -7
- package/dist/cdn/manufact-auth-BQMHhbLV.js +0 -423
- package/dist/cdn/maximize-2-CH5Lq90B.js +0 -21
- package/dist/cdn/maximize-BALCV_ep.js +0 -21
- package/dist/cdn/message-square-BnxdpJxZ.js +0 -7
- package/dist/cdn/not-found-DEtSM_Wd.js +0 -34
- package/dist/cdn/play-vuZ5PLnI.js +0 -7
- package/dist/cdn/providerMeta-BQIfHuNL.js +0 -379
- package/dist/cdn/providers/anthropic.png +0 -0
- package/dist/cdn/providers/google.png +0 -0
- package/dist/cdn/providers/openai.png +0 -0
- package/dist/cdn/react-BIs9pQ3H.js +0 -926
- package/dist/cdn/react-BajV-X4P.js +0 -5425
- package/dist/cdn/refresh-cw-BXY-Pa0U.js +0 -21
- package/dist/cdn/save-Tgil_AJZ.js +0 -34
- package/dist/cdn/schemaHelpers-DTV38jGq.js +0 -16
- package/dist/cdn/select-DDdiIPR2.js +0 -2594
- package/dist/cdn/servers-Dm72iTpY.js +0 -26
- package/dist/cdn/shared-DaILIQPP.js +0 -1700
- package/dist/cdn/sheet-Br_l2kry.js +0 -2077
- package/dist/cdn/sparkles-BntO2rDR.js +0 -23
- package/dist/cdn/spinner-jQtC7EBj.js +0 -15
- package/dist/cdn/square-check-big-BvwQ17Bl.js +0 -10
- package/dist/cdn/switch-C3IyQuid.js +0 -664
- package/dist/cdn/tabs-subtle-CkdI6Mac.js +0 -787
- package/dist/cdn/telemetry-DabTAQ8x.js +0 -240
- package/dist/cdn/textarea-DSbwcFVt.js +0 -14
- package/dist/cdn/trash-2-RwpJY5SL.js +0 -25
- package/dist/cdn/useAriaLabelledBy-DqAdnppm.js +0 -29
- package/dist/cdn/useCompositeItem-BRqEzYh-.js +0 -26
- package/dist/cdn/useConfig-Btmh8wjJ.js +0 -235
- package/dist/cdn/useSavedRequests-Ci2I919u.js +0 -51
- package/dist/cdn/useViewHostProps-B6SKeeH9.js +0 -349
- package/dist/cdn/wrench-DzGmCfnb.js +0 -7
- package/dist/cdn/x-C3vRQIYu.js +0 -10
- package/dist/cdn/zap-Mb-pbw2X.js +0 -10
- package/dist/client/auth/manufact-auth.d.ts +0 -32
- package/dist/client/auth/manufact-auth.d.ts.map +0 -1
- package/dist/client/chat-history/ChatHistoryHeader.d.ts +0 -4
- package/dist/client/chat-history/ChatHistoryHeader.d.ts.map +0 -1
- package/dist/client/chat-history/ChatHistoryPanel.d.ts +0 -28
- package/dist/client/chat-history/ChatHistoryPanel.d.ts.map +0 -1
- package/dist/client/chat-history/ChatHistoryRail.d.ts +0 -5
- package/dist/client/chat-history/ChatHistoryRail.d.ts.map +0 -1
- package/dist/client/chat-history/ChatList.d.ts +0 -18
- package/dist/client/chat-history/ChatList.d.ts.map +0 -1
- package/dist/client/chat-history/ChatTitleReveal.d.ts +0 -10
- package/dist/client/chat-history/ChatTitleReveal.d.ts.map +0 -1
- package/dist/client/chat-history/chat-events-to-inspector-messages.d.ts +0 -13
- package/dist/client/chat-history/chat-events-to-inspector-messages.d.ts.map +0 -1
- package/dist/client/chat-history/chat-title.d.ts +0 -10
- package/dist/client/chat-history/chat-title.d.ts.map +0 -1
- package/dist/client/chat-history/providers/local-storage.d.ts +0 -21
- package/dist/client/chat-history/providers/local-storage.d.ts.map +0 -1
- package/dist/client/chat-history/types.d.ts +0 -39
- package/dist/client/chat-history/types.d.ts.map +0 -1
- package/dist/client/chat-history/useChatHistory.d.ts +0 -20
- package/dist/client/chat-history/useChatHistory.d.ts.map +0 -1
- package/dist/client/chat-history/useChatTitleGeneration.d.ts +0 -17
- package/dist/client/chat-history/useChatTitleGeneration.d.ts.map +0 -1
- package/dist/client/components/AddToClientDropdown.d.ts +0 -52
- package/dist/client/components/AddToClientDropdown.d.ts.map +0 -1
- package/dist/client/components/ChatTab.d.ts +0 -98
- package/dist/client/components/ChatTab.d.ts.map +0 -1
- package/dist/client/components/IframeConsole.d.ts +0 -7
- package/dist/client/components/IframeConsole.d.ts.map +0 -1
- package/dist/client/components/MCPAppsDebugControls.d.ts +0 -19
- package/dist/client/components/MCPAppsDebugControls.d.ts.map +0 -1
- package/dist/client/components/PromptsTab.d.ts +0 -34
- package/dist/client/components/PromptsTab.d.ts.map +0 -1
- package/dist/client/components/ResourcesTab.d.ts +0 -31
- package/dist/client/components/ResourcesTab.d.ts.map +0 -1
- package/dist/client/components/ToolsTab.d.ts +0 -39
- package/dist/client/components/ToolsTab.d.ts.map +0 -1
- package/dist/client/components/chat/AssistantMessage.d.ts +0 -10
- package/dist/client/components/chat/AssistantMessage.d.ts.map +0 -1
- package/dist/client/components/chat/ChatHeader.d.ts +0 -70
- package/dist/client/components/chat/ChatHeader.d.ts.map +0 -1
- package/dist/client/components/chat/ChatInput.d.ts +0 -29
- package/dist/client/components/chat/ChatInput.d.ts.map +0 -1
- package/dist/client/components/chat/ChatInputArea.d.ts +0 -65
- package/dist/client/components/chat/ChatInputArea.d.ts.map +0 -1
- package/dist/client/components/chat/ChatLandingForm.d.ts +0 -15
- package/dist/client/components/chat/ChatLandingForm.d.ts.map +0 -1
- package/dist/client/components/chat/ChatManagedNotice.d.ts +0 -10
- package/dist/client/components/chat/ChatManagedNotice.d.ts.map +0 -1
- package/dist/client/components/chat/ChatScrollToBottomButton.d.ts +0 -7
- package/dist/client/components/chat/ChatScrollToBottomButton.d.ts.map +0 -1
- package/dist/client/components/chat/ChatScrollTopFade.d.ts +0 -7
- package/dist/client/components/chat/ChatScrollTopFade.d.ts.map +0 -1
- package/dist/client/components/chat/ChatTraceView.d.ts +0 -7
- package/dist/client/components/chat/ChatTraceView.d.ts.map +0 -1
- package/dist/client/components/chat/ConfigurationDialog.d.ts +0 -42
- package/dist/client/components/chat/ConfigurationDialog.d.ts.map +0 -1
- package/dist/client/components/chat/ConfigureEmptyState.d.ts +0 -6
- package/dist/client/components/chat/ConfigureEmptyState.d.ts.map +0 -1
- package/dist/client/components/chat/CopyButton.d.ts +0 -10
- package/dist/client/components/chat/CopyButton.d.ts.map +0 -1
- package/dist/client/components/chat/FloatingChatElicitation.d.ts +0 -10
- package/dist/client/components/chat/FloatingChatElicitation.d.ts.map +0 -1
- package/dist/client/components/chat/McpReconnectBanner.d.ts +0 -10
- package/dist/client/components/chat/McpReconnectBanner.d.ts.map +0 -1
- package/dist/client/components/chat/MessageList.d.ts +0 -47
- package/dist/client/components/chat/MessageList.d.ts.map +0 -1
- package/dist/client/components/chat/MessageMetaActions.d.ts +0 -7
- package/dist/client/components/chat/MessageMetaActions.d.ts.map +0 -1
- package/dist/client/components/chat/PromptResultsList.d.ts +0 -8
- package/dist/client/components/chat/PromptResultsList.d.ts.map +0 -1
- package/dist/client/components/chat/PromptsDropdown.d.ts +0 -11
- package/dist/client/components/chat/PromptsDropdown.d.ts.map +0 -1
- package/dist/client/components/chat/StreamingAssistantContent.d.ts +0 -7
- package/dist/client/components/chat/StreamingAssistantContent.d.ts.map +0 -1
- package/dist/client/components/chat/SystemPromptButton.d.ts +0 -11
- package/dist/client/components/chat/SystemPromptButton.d.ts.map +0 -1
- package/dist/client/components/chat/ToolCallDisplay.d.ts +0 -10
- package/dist/client/components/chat/ToolCallDisplay.d.ts.map +0 -1
- package/dist/client/components/chat/ToolResultRenderer.d.ts +0 -15
- package/dist/client/components/chat/ToolResultRenderer.d.ts.map +0 -1
- package/dist/client/components/chat/ToolSelector.d.ts +0 -13
- package/dist/client/components/chat/ToolSelector.d.ts.map +0 -1
- package/dist/client/components/chat/UserMessage.d.ts +0 -10
- package/dist/client/components/chat/UserMessage.d.ts.map +0 -1
- package/dist/client/components/chat/chat-bar-styles.d.ts +0 -6
- package/dist/client/components/chat/chat-bar-styles.d.ts.map +0 -1
- package/dist/client/components/chat/chatModeStorage.d.ts +0 -11
- package/dist/client/components/chat/chatModeStorage.d.ts.map +0 -1
- package/dist/client/components/chat/conversion.d.ts +0 -19
- package/dist/client/components/chat/conversion.d.ts.map +0 -1
- package/dist/client/components/chat/freeTier.d.ts +0 -32
- package/dist/client/components/chat/freeTier.d.ts.map +0 -1
- package/dist/client/components/chat/managedChatNotice.d.ts +0 -16
- package/dist/client/components/chat/managedChatNotice.d.ts.map +0 -1
- package/dist/client/components/chat/providerMeta.d.ts +0 -27
- package/dist/client/components/chat/providerMeta.d.ts.map +0 -1
- package/dist/client/components/chat/system-prompt/local-storage.d.ts +0 -5
- package/dist/client/components/chat/system-prompt/local-storage.d.ts.map +0 -1
- package/dist/client/components/chat/system-prompt/types.d.ts +0 -8
- package/dist/client/components/chat/system-prompt/types.d.ts.map +0 -1
- package/dist/client/components/chat/system-prompt/useLocalSystemPrompt.d.ts +0 -3
- package/dist/client/components/chat/system-prompt/useLocalSystemPrompt.d.ts.map +0 -1
- package/dist/client/components/chat/system-prompt-default.d.ts +0 -2
- package/dist/client/components/chat/system-prompt-default.d.ts.map +0 -1
- package/dist/client/components/chat/trace.d.ts +0 -84
- package/dist/client/components/chat/trace.d.ts.map +0 -1
- package/dist/client/components/chat/types.d.ts +0 -75
- package/dist/client/components/chat/types.d.ts.map +0 -1
- package/dist/client/components/chat/useChatMessages.d.ts +0 -76
- package/dist/client/components/chat/useChatMessages.d.ts.map +0 -1
- package/dist/client/components/chat/useChatMessagesClientSide.d.ts +0 -43
- package/dist/client/components/chat/useChatMessagesClientSide.d.ts.map +0 -1
- package/dist/client/components/chat/useChatScrollToBottom.d.ts +0 -14
- package/dist/client/components/chat/useChatScrollToBottom.d.ts.map +0 -1
- package/dist/client/components/chat/useConfig.d.ts +0 -24
- package/dist/client/components/chat/useConfig.d.ts.map +0 -1
- package/dist/client/components/chat/useHostedChatMode.d.ts +0 -14
- package/dist/client/components/chat/useHostedChatMode.d.ts.map +0 -1
- package/dist/client/components/chat/useManagedCloudModel.d.ts +0 -14
- package/dist/client/components/chat/useManagedCloudModel.d.ts.map +0 -1
- package/dist/client/components/chat/utils.d.ts +0 -11
- package/dist/client/components/chat/utils.d.ts.map +0 -1
- package/dist/client/components/elicitation/shared/ElicitationAskUserPanel.d.ts +0 -12
- package/dist/client/components/elicitation/shared/ElicitationAskUserPanel.d.ts.map +0 -1
- package/dist/client/components/elicitation/shared/elicitationToAskUserQuestions.d.ts +0 -9
- package/dist/client/components/elicitation/shared/elicitationToAskUserQuestions.d.ts.map +0 -1
- package/dist/client/components/elicitation/shared/schemaHelpers.d.ts +0 -8
- package/dist/client/components/elicitation/shared/schemaHelpers.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptExecutionPanel.d.ts +0 -13
- package/dist/client/components/prompts/PromptExecutionPanel.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptInputForm.d.ts +0 -9
- package/dist/client/components/prompts/PromptInputForm.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptMessageCard.d.ts +0 -29
- package/dist/client/components/prompts/PromptMessageCard.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptResultDisplay.d.ts +0 -34
- package/dist/client/components/prompts/PromptResultDisplay.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptsList.d.ts +0 -10
- package/dist/client/components/prompts/PromptsList.d.ts.map +0 -1
- package/dist/client/components/prompts/SavedPromptsList.d.ts +0 -19
- package/dist/client/components/prompts/SavedPromptsList.d.ts.map +0 -1
- package/dist/client/components/resources/PropsConfigDialog.d.ts +0 -16
- package/dist/client/components/resources/PropsConfigDialog.d.ts.map +0 -1
- package/dist/client/components/resources/ResourceResultDisplay.d.ts +0 -30
- package/dist/client/components/resources/ResourceResultDisplay.d.ts.map +0 -1
- package/dist/client/components/resources/ResourcesList.d.ts +0 -10
- package/dist/client/components/resources/ResourcesList.d.ts.map +0 -1
- package/dist/client/components/shared/CollapsibleJSON.d.ts +0 -6
- package/dist/client/components/shared/CollapsibleJSON.d.ts.map +0 -1
- package/dist/client/components/shared/InspectorScrollArea.d.ts +0 -9
- package/dist/client/components/shared/InspectorScrollArea.d.ts.map +0 -1
- package/dist/client/components/shared/JSONDisplay.d.ts +0 -12
- package/dist/client/components/shared/JSONDisplay.d.ts.map +0 -1
- package/dist/client/components/shared/ListItem.d.ts +0 -24
- package/dist/client/components/shared/ListItem.d.ts.map +0 -1
- package/dist/client/components/shared/ListTabHeader.d.ts +0 -47
- package/dist/client/components/shared/ListTabHeader.d.ts.map +0 -1
- package/dist/client/components/shared/MarkdownRenderer.d.ts +0 -15
- package/dist/client/components/shared/MarkdownRenderer.d.ts.map +0 -1
- package/dist/client/components/shared/SchemaFormField.d.ts +0 -12
- package/dist/client/components/shared/SchemaFormField.d.ts.map +0 -1
- package/dist/client/components/shared/SearchTabHeader.d.ts +0 -28
- package/dist/client/components/shared/SearchTabHeader.d.ts.map +0 -1
- package/dist/client/components/shared/StatusIcon.d.ts +0 -12
- package/dist/client/components/shared/StatusIcon.d.ts.map +0 -1
- package/dist/client/components/shared/index.d.ts +0 -7
- package/dist/client/components/shared/index.d.ts.map +0 -1
- package/dist/client/components/tools/SaveRequestDialog.d.ts +0 -11
- package/dist/client/components/tools/SaveRequestDialog.d.ts.map +0 -1
- package/dist/client/components/tools/SavedRequestsList.d.ts +0 -19
- package/dist/client/components/tools/SavedRequestsList.d.ts.map +0 -1
- package/dist/client/components/tools/ToolExecutionPanel.d.ts +0 -20
- package/dist/client/components/tools/ToolExecutionPanel.d.ts.map +0 -1
- package/dist/client/components/tools/ToolInputForm.d.ts +0 -14
- package/dist/client/components/tools/ToolInputForm.d.ts.map +0 -1
- package/dist/client/components/tools/ToolResultDisplay.d.ts +0 -24
- package/dist/client/components/tools/ToolResultDisplay.d.ts.map +0 -1
- package/dist/client/components/tools/ToolsList.d.ts +0 -10
- package/dist/client/components/tools/ToolsList.d.ts.map +0 -1
- package/dist/client/components/tools/schema-utils.d.ts +0 -13
- package/dist/client/components/tools/schema-utils.d.ts.map +0 -1
- package/dist/client/components/tools/useToolExecution.d.ts +0 -26
- package/dist/client/components/tools/useToolExecution.d.ts.map +0 -1
- package/dist/client/components/tools/useToolsTabNavigation.d.ts +0 -35
- package/dist/client/components/tools/useToolsTabNavigation.d.ts.map +0 -1
- package/dist/client/components/ui/MeshGradientCanvas.d.ts +0 -13
- package/dist/client/components/ui/MeshGradientCanvas.d.ts.map +0 -1
- package/dist/client/components/ui/WidgetWrapper.d.ts +0 -12
- package/dist/client/components/ui/WidgetWrapper.d.ts.map +0 -1
- package/dist/client/components/ui/alert-dialog.d.ts +0 -15
- package/dist/client/components/ui/alert-dialog.d.ts.map +0 -1
- package/dist/client/components/ui/ask-user-questions.d.ts +0 -80
- package/dist/client/components/ui/ask-user-questions.d.ts.map +0 -1
- package/dist/client/components/ui/badge.d.ts +0 -34
- package/dist/client/components/ui/badge.d.ts.map +0 -1
- package/dist/client/components/ui/blur-fade.d.ts +0 -25
- package/dist/client/components/ui/blur-fade.d.ts.map +0 -1
- package/dist/client/components/ui/button.d.ts +0 -34
- package/dist/client/components/ui/button.d.ts.map +0 -1
- package/dist/client/components/ui/chat-message.d.ts +0 -23
- package/dist/client/components/ui/chat-message.d.ts.map +0 -1
- package/dist/client/components/ui/checkbox.d.ts +0 -4
- package/dist/client/components/ui/checkbox.d.ts.map +0 -1
- package/dist/client/components/ui/client-icons.d.ts +0 -20
- package/dist/client/components/ui/client-icons.d.ts.map +0 -1
- package/dist/client/components/ui/command.d.ts +0 -17
- package/dist/client/components/ui/command.d.ts.map +0 -1
- package/dist/client/components/ui/dialog.d.ts +0 -37
- package/dist/client/components/ui/dialog.d.ts.map +0 -1
- package/dist/client/components/ui/dropdown-menu.d.ts +0 -25
- package/dist/client/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/client/components/ui/dropdown.d.ts +0 -30
- package/dist/client/components/ui/dropdown.d.ts.map +0 -1
- package/dist/client/components/ui/file-thumbnail.d.ts +0 -9
- package/dist/client/components/ui/file-thumbnail.d.ts.map +0 -1
- package/dist/client/components/ui/input.d.ts +0 -4
- package/dist/client/components/ui/input.d.ts.map +0 -1
- package/dist/client/components/ui/kbd.d.ts +0 -3
- package/dist/client/components/ui/kbd.d.ts.map +0 -1
- package/dist/client/components/ui/label.d.ts +0 -4
- package/dist/client/components/ui/label.d.ts.map +0 -1
- package/dist/client/components/ui/menu-item.d.ts +0 -52
- package/dist/client/components/ui/menu-item.d.ts.map +0 -1
- package/dist/client/components/ui/mesh-tab-background.d.ts +0 -12
- package/dist/client/components/ui/mesh-tab-background.d.ts.map +0 -1
- package/dist/client/components/ui/not-found.d.ts +0 -9
- package/dist/client/components/ui/not-found.d.ts.map +0 -1
- package/dist/client/components/ui/popover.d.ts +0 -6
- package/dist/client/components/ui/popover.d.ts.map +0 -1
- package/dist/client/components/ui/resizable.d.ts +0 -10
- package/dist/client/components/ui/resizable.d.ts.map +0 -1
- package/dist/client/components/ui/scroll-area.d.ts +0 -4
- package/dist/client/components/ui/scroll-area.d.ts.map +0 -1
- package/dist/client/components/ui/select.d.ts +0 -52
- package/dist/client/components/ui/select.d.ts.map +0 -1
- package/dist/client/components/ui/sheet.d.ts +0 -14
- package/dist/client/components/ui/sheet.d.ts.map +0 -1
- package/dist/client/components/ui/skeleton.d.ts +0 -4
- package/dist/client/components/ui/skeleton.d.ts.map +0 -1
- package/dist/client/components/ui/spinner.d.ts +0 -3
- package/dist/client/components/ui/spinner.d.ts.map +0 -1
- package/dist/client/components/ui/switch.d.ts +0 -22
- package/dist/client/components/ui/switch.d.ts.map +0 -1
- package/dist/client/components/ui/table.d.ts +0 -9
- package/dist/client/components/ui/table.d.ts.map +0 -1
- package/dist/client/components/ui/tabs-subtle.d.ts +0 -25
- package/dist/client/components/ui/tabs-subtle.d.ts.map +0 -1
- package/dist/client/components/ui/text-shimmer.d.ts +0 -11
- package/dist/client/components/ui/text-shimmer.d.ts.map +0 -1
- package/dist/client/components/ui/textarea.d.ts +0 -4
- package/dist/client/components/ui/textarea.d.ts.map +0 -1
- package/dist/client/components/ui/tooltip.d.ts +0 -43
- package/dist/client/components/ui/tooltip.d.ts.map +0 -1
- package/dist/client/components/ui-playground/shared/SafeAreaInsetsEditor.d.ts +0 -19
- package/dist/client/components/ui-playground/shared/SafeAreaInsetsEditor.d.ts.map +0 -1
- package/dist/client/console-log-bus.d.ts +0 -24
- package/dist/client/console-log-bus.d.ts.map +0 -1
- package/dist/client/constants/debug-options.d.ts +0 -16
- package/dist/client/constants/debug-options.d.ts.map +0 -1
- package/dist/client/context/InspectorContext.d.ts +0 -134
- package/dist/client/context/InspectorContext.d.ts.map +0 -1
- package/dist/client/context/ThemeContext.d.ts +0 -17
- package/dist/client/context/ThemeContext.d.ts.map +0 -1
- package/dist/client/context/WidgetDebugContext.d.ts +0 -121
- package/dist/client/context/WidgetDebugContext.d.ts.map +0 -1
- package/dist/client/hooks/use-merge-split.d.ts +0 -36
- package/dist/client/hooks/use-merge-split.d.ts.map +0 -1
- package/dist/client/hooks/use-proximity-hover-index.d.ts +0 -27
- package/dist/client/hooks/use-proximity-hover-index.d.ts.map +0 -1
- package/dist/client/hooks/use-proximity-hover.d.ts +0 -26
- package/dist/client/hooks/use-proximity-hover.d.ts.map +0 -1
- package/dist/client/hooks/use-touch-primary.d.ts +0 -2
- package/dist/client/hooks/use-touch-primary.d.ts.map +0 -1
- package/dist/client/hooks/useDeviceViewport.d.ts +0 -18
- package/dist/client/hooks/useDeviceViewport.d.ts.map +0 -1
- package/dist/client/hooks/useHostedSession.d.ts +0 -9
- package/dist/client/hooks/useHostedSession.d.ts.map +0 -1
- package/dist/client/hooks/useIframeConsole.d.ts +0 -24
- package/dist/client/hooks/useIframeConsole.d.ts.map +0 -1
- package/dist/client/hooks/useKeyboardShortcuts.d.ts +0 -28
- package/dist/client/hooks/useKeyboardShortcuts.d.ts.map +0 -1
- package/dist/client/hooks/useMCPPrompts.d.ts +0 -94
- package/dist/client/hooks/useMCPPrompts.d.ts.map +0 -1
- package/dist/client/hooks/useMcpAppsHostContext.d.ts +0 -27
- package/dist/client/hooks/useMcpAppsHostContext.d.ts.map +0 -1
- package/dist/client/hooks/usePropsLLM.d.ts +0 -20
- package/dist/client/hooks/usePropsLLM.d.ts.map +0 -1
- package/dist/client/hooks/useResourceProps.d.ts +0 -14
- package/dist/client/hooks/useResourceProps.d.ts.map +0 -1
- package/dist/client/hooks/useSavedRequests.d.ts +0 -6
- package/dist/client/hooks/useSavedRequests.d.ts.map +0 -1
- package/dist/client/hooks/useViewHostProps.d.ts +0 -19
- package/dist/client/hooks/useViewHostProps.d.ts.map +0 -1
- package/dist/client/index.d.ts.map +0 -1
- package/dist/client/lib/elevated.d.ts +0 -28
- package/dist/client/lib/elevated.d.ts.map +0 -1
- package/dist/client/lib/font-weight.d.ts +0 -10
- package/dist/client/lib/font-weight.d.ts.map +0 -1
- package/dist/client/lib/icon-context.d.ts +0 -15
- package/dist/client/lib/icon-context.d.ts.map +0 -1
- package/dist/client/lib/shape-context.d.ts +0 -21
- package/dist/client/lib/shape-context.d.ts.map +0 -1
- package/dist/client/lib/springs.d.ts +0 -32
- package/dist/client/lib/springs.d.ts.map +0 -1
- package/dist/client/lib/surface-classes.d.ts +0 -2
- package/dist/client/lib/surface-classes.d.ts.map +0 -1
- package/dist/client/lib/surface-context.d.ts +0 -7
- package/dist/client/lib/surface-context.d.ts.map +0 -1
- package/dist/client/lib/utils.d.ts +0 -3
- package/dist/client/lib/utils.d.ts.map +0 -1
- package/dist/client/mcp-apps/csp.d.ts +0 -26
- package/dist/client/mcp-apps/csp.d.ts.map +0 -1
- package/dist/client/mcp-apps/debug/csp-suggestions.d.ts +0 -17
- package/dist/client/mcp-apps/debug/csp-suggestions.d.ts.map +0 -1
- package/dist/client/mcp-apps/logging-transport.d.ts +0 -13
- package/dist/client/mcp-apps/logging-transport.d.ts.map +0 -1
- package/dist/client/rpc-traffic-coalesce.d.ts +0 -7
- package/dist/client/rpc-traffic-coalesce.d.ts.map +0 -1
- package/dist/client/rpc-traffic-store.d.ts +0 -37
- package/dist/client/rpc-traffic-store.d.ts.map +0 -1
- package/dist/client/telemetry/capture.d.ts +0 -7
- package/dist/client/telemetry/capture.d.ts.map +0 -1
- package/dist/client/telemetry/events.d.ts +0 -168
- package/dist/client/telemetry/events.d.ts.map +0 -1
- package/dist/client/telemetry/index.d.ts +0 -5
- package/dist/client/telemetry/index.d.ts.map +0 -1
- package/dist/client/telemetry/init.d.ts +0 -2
- package/dist/client/telemetry/init.d.ts.map +0 -1
- package/dist/client/telemetry/utils.d.ts +0 -7
- package/dist/client/telemetry/utils.d.ts.map +0 -1
- package/dist/client/types/message-content-block.d.ts +0 -19
- package/dist/client/types/message-content-block.d.ts.map +0 -1
- package/dist/client/types/pending-requests.d.ts +0 -17
- package/dist/client/types/pending-requests.d.ts.map +0 -1
- package/dist/client/utils/basePath.d.ts +0 -34
- package/dist/client/utils/basePath.d.ts.map +0 -1
- package/dist/client/utils/browser.d.ts +0 -5
- package/dist/client/utils/browser.d.ts.map +0 -1
- package/dist/client/utils/format.d.ts +0 -4
- package/dist/client/utils/format.d.ts.map +0 -1
- package/dist/client/utils/highlightJson.d.ts +0 -11
- package/dist/client/utils/highlightJson.d.ts.map +0 -1
- package/dist/client/utils/jsonUtils.d.ts +0 -24
- package/dist/client/utils/jsonUtils.d.ts.map +0 -1
- package/dist/client/utils/mcpClientUtils.d.ts +0 -131
- package/dist/client/utils/mcpClientUtils.d.ts.map +0 -1
- package/dist/client/utils/servers.d.ts +0 -14
- package/dist/client/utils/servers.d.ts.map +0 -1
- package/dist/server/asset-urls.d.ts +0 -18
- package/dist/server/asset-urls.d.ts.map +0 -1
- package/dist/server/asset-urls.js +0 -17
- package/dist/server/cdn-shell.d.ts +0 -18
- package/dist/server/cdn-shell.d.ts.map +0 -1
- package/dist/server/cdn-shell.js +0 -12
- package/dist/server/chunk-DSTNUYWX.js +0 -148
- package/dist/server/chunk-H6ZCIKBS.js +0 -63
- package/dist/server/chunk-IKTZUWSX.js +0 -0
- package/dist/server/chunk-J4FNYLBF.js +0 -54
- package/dist/server/chunk-K2F2AJOI.js +0 -619
- package/dist/server/chunk-KD7K27XK.js +0 -77
- package/dist/server/chunk-M5TZA42I.js +0 -54
- package/dist/server/chunk-OWR2BIBW.js +0 -40
- package/dist/server/chunk-PKBMQBKP.js +0 -7
- package/dist/server/chunk-SQ4XNMLT.js +0 -72
- package/dist/server/chunk-UJLXHNQP.js +0 -43
- package/dist/server/chunk-WFT4JHYI.js +0 -24
- package/dist/server/chunk-XCNS5CIW.js +0 -199
- package/dist/server/chunk-ZCGLU5T7.js +0 -156
- package/dist/server/cli.d.ts +0 -3
- package/dist/server/cli.d.ts.map +0 -1
- package/dist/server/cli.js +0 -141
- package/dist/server/create-dev-api-app.d.ts +0 -4
- package/dist/server/create-dev-api-app.d.ts.map +0 -1
- package/dist/server/create-dev-api-app.js +0 -11
- package/dist/server/dev-callback-redirect.d.ts +0 -3
- package/dist/server/dev-callback-redirect.d.ts.map +0 -1
- package/dist/server/dev-callback-redirect.js +0 -18
- package/dist/server/favicon-links.d.ts +0 -12
- package/dist/server/favicon-links.d.ts.map +0 -1
- package/dist/server/favicon-links.js +0 -11
- package/dist/server/favicon-static.d.ts +0 -4
- package/dist/server/favicon-static.d.ts.map +0 -1
- package/dist/server/favicon-static.js +0 -8
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/middleware.d.ts +0 -40
- package/dist/server/middleware.d.ts.map +0 -1
- package/dist/server/middleware.js +0 -17
- package/dist/server/proxy/index.d.ts +0 -3
- package/dist/server/proxy/index.d.ts.map +0 -1
- package/dist/server/proxy/index.js +0 -12
- package/dist/server/proxy/mcp-proxy.d.ts +0 -101
- package/dist/server/proxy/mcp-proxy.d.ts.map +0 -1
- package/dist/server/proxy/mcp-proxy.js +0 -10
- package/dist/server/proxy/oauth-proxy.d.ts +0 -26
- package/dist/server/proxy/oauth-proxy.d.ts.map +0 -1
- package/dist/server/proxy/oauth-proxy.js +0 -9
- package/dist/server/proxy-routes.d.ts +0 -16
- package/dist/server/proxy-routes.d.ts.map +0 -1
- package/dist/server/proxy-routes.js +0 -10
- package/dist/server/rpc-log-bus.d.ts +0 -17
- package/dist/server/rpc-log-bus.d.ts.map +0 -1
- package/dist/server/rpc-log-bus.js +0 -77
- package/dist/server/server.d.ts +0 -15
- package/dist/server/server.d.ts.map +0 -1
- package/dist/server/server.js +0 -66
- package/dist/server/static-assets.d.ts +0 -5
- package/dist/server/static-assets.d.ts.map +0 -1
- package/dist/server/static-assets.js +0 -9
- package/dist/server/utils.d.ts +0 -33
- package/dist/server/utils.d.ts.map +0 -1
- package/dist/server/utils.js +0 -17
- package/dist/server/version.d.ts +0 -7
- package/dist/server/version.d.ts.map +0 -1
- package/dist/server/version.js +0 -9
- package/dist/server/vite-dev-api-plugin.d.ts +0 -4
- package/dist/server/vite-dev-api-plugin.d.ts.map +0 -1
- package/dist/server/vite-dev-api-plugin.js +0 -30
- package/dist/web/apple-touch-icon.png +0 -0
- package/dist/web/assets/AnimatePresence-C5p0yiY1.js +0 -9
- package/dist/web/assets/ChatTab-BCobuZDc.js +0 -18
- package/dist/web/assets/ConnectionSettingsTab-BjGkLwVu.js +0 -1
- package/dist/web/assets/ElicitationTab-D3ZUKHND.js +0 -1
- package/dist/web/assets/FormContext-DH2caWKO.js +0 -1
- package/dist/web/assets/ListTabHeader-R17w_JsB.js +0 -1
- package/dist/web/assets/ManufactOAuthCallback-CS3ydSZg.js +0 -1
- package/dist/web/assets/MarkdownRenderer-BeeBfQhv.js +0 -47
- package/dist/web/assets/NotificationsTab-Uj0_DrmK.js +0 -1
- package/dist/web/assets/OAuthCallback-C0ljgCiw.js +0 -1
- package/dist/web/assets/PromptsTab-Bns2u0G-.js +0 -15
- package/dist/web/assets/ResourcesTab-CO24312V.js +0 -2
- package/dist/web/assets/SamplingTab-7gtN7FwU.js +0 -1
- package/dist/web/assets/ServerMetadataTab-CQwqYSjL.js +0 -1
- package/dist/web/assets/ToolsTab-bDdRxI1b.js +0 -8
- package/dist/web/assets/ViewPreview-Ba1Ec5uA.js +0 -1
- package/dist/web/assets/WidgetWrapper-CYHfzrtb.js +0 -34
- package/dist/web/assets/brush--0LobUi4.js +0 -1
- package/dist/web/assets/checkbox-CzBkaNKa.js +0 -1
- package/dist/web/assets/code-tME-5H6D.js +0 -1
- package/dist/web/assets/createLucideIcon-B3b8EU0b.js +0 -1
- package/dist/web/assets/dist-C5JjLJN9.js +0 -21
- package/dist/web/assets/index-TQ5V7cM9.js +0 -492
- package/dist/web/assets/index-fBX3akc8.css +0 -1
- package/dist/web/assets/input-CLYhA7PK.js +0 -1
- package/dist/web/assets/inspector-settings-layout-yjKRJDai.js +0 -1
- package/dist/web/assets/jsx-runtime-Cjj9sGSy.js +0 -1
- package/dist/web/assets/label-Cdim77Jw.js +0 -1
- package/dist/web/assets/maximize-2-BTT9QQU9.js +0 -1
- package/dist/web/assets/maximize-_O55kFcr.js +0 -1
- package/dist/web/assets/react-CU_d2d5K.js +0 -1
- package/dist/web/assets/refresh-cw-C9wQl8_d.js +0 -1
- package/dist/web/assets/save-B-MsgxX9.js +0 -1
- package/dist/web/assets/schemaHelpers-DLNTQr_6.js +0 -1
- package/dist/web/assets/select-CJ57-Bor.js +0 -1
- package/dist/web/assets/shared-BF0rJNdE.js +0 -1
- package/dist/web/assets/sparkles-2OAsc1aP.js +0 -1
- package/dist/web/assets/tabs-subtle-6D79T1xd.js +0 -1
- package/dist/web/assets/textarea-DLAmNVf_.js +0 -1
- package/dist/web/assets/useConfig-BAgALiZg.js +0 -1
- package/dist/web/assets/useViewHostProps-BYitt_6K.js +0 -1
- package/dist/web/assets/zap-Du2Uc5pa.js +0 -1
- package/dist/web/favicon-96x96.png +0 -0
- package/dist/web/favicon-black.svg +0 -5
- package/dist/web/favicon-white.svg +0 -5
- package/dist/web/favicon.ico +0 -0
- package/dist/web/favicon.svg +0 -5
- package/dist/web/index.html +0 -89
- package/dist/web/providers/anthropic.png +0 -0
- package/dist/web/providers/google.png +0 -0
- package/dist/web/providers/openai.png +0 -0
- package/dist/web/site.webmanifest +0 -21
- package/dist/web/web-app-manifest-192x192.png +0 -0
- package/dist/web/web-app-manifest-512x512.png +0 -0
- /package/dist/{cdn → app}/apple-touch-icon.png +0 -0
- /package/dist/{cdn → app}/favicon-96x96.png +0 -0
- /package/dist/{cdn → app}/favicon-black.svg +0 -0
- /package/dist/{cdn → app}/favicon-white.svg +0 -0
- /package/dist/{cdn → app}/favicon.ico +0 -0
- /package/dist/{cdn → app}/favicon.svg +0 -0
- /package/dist/{cdn → app}/site.webmanifest +0 -0
- /package/dist/{cdn → app}/web-app-manifest-192x192.png +0 -0
- /package/dist/{cdn → app}/web-app-manifest-512x512.png +0 -0
package/dist/client/index.d.ts
CHANGED
|
@@ -1,51 +1,1406 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Tool, Resource, Prompt, McpServer, ElicitRequestFormParams, ElicitRequestURLParams, GetPromptResult, ElicitResult } from '@mcp-use/client/react';
|
|
3
|
+
export { ViewRenderer, getViewResourceUri, isViewTool } from '@mcp-use/client/react';
|
|
4
|
+
import { ProviderName, McpConnectionLike } from '@mcp-use/agent';
|
|
5
|
+
import * as react from 'react';
|
|
6
|
+
import react__default, { ReactNode, RefObject } from 'react';
|
|
7
|
+
|
|
8
|
+
interface AddToClientDropdownProps {
|
|
9
|
+
serverConfig: {
|
|
10
|
+
url: string;
|
|
11
|
+
name: string;
|
|
12
|
+
headers?: Record<string, string>;
|
|
13
|
+
serverId?: string;
|
|
14
|
+
};
|
|
15
|
+
additionalItems?: Array<{
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
icon?: React.ReactNode;
|
|
19
|
+
onClick: () => void | Promise<void>;
|
|
20
|
+
}>;
|
|
21
|
+
showClients?: {
|
|
22
|
+
cursor?: boolean;
|
|
23
|
+
vsCode?: boolean;
|
|
24
|
+
vsCodeInsiders?: boolean;
|
|
25
|
+
claudeDesktop?: boolean;
|
|
26
|
+
claudeCode?: boolean;
|
|
27
|
+
geminiCli?: boolean;
|
|
28
|
+
codexCli?: boolean;
|
|
29
|
+
};
|
|
30
|
+
className?: string;
|
|
31
|
+
onSuccess?: (client: string) => void;
|
|
32
|
+
onError?: (error: Error) => void;
|
|
33
|
+
trigger?: React.ReactNode | ((props: {
|
|
34
|
+
isOpen: boolean;
|
|
35
|
+
onClick: () => void;
|
|
36
|
+
}) => React.ReactNode);
|
|
37
|
+
}
|
|
1
38
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
39
|
+
* Reusable dropdown component for adding MCP servers to various clients
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```tsx
|
|
43
|
+
* <AddToClientDropdown
|
|
44
|
+
* serverConfig={{
|
|
45
|
+
* url: "https://mcp.example.com/mcp",
|
|
46
|
+
* name: "My Server",
|
|
47
|
+
* headers: { Authorization: "Bearer token" }
|
|
48
|
+
* }}
|
|
49
|
+
* additionalItems={[{
|
|
50
|
+
* id: "agent",
|
|
51
|
+
* label: "Add to mcp-use Agent",
|
|
52
|
+
* onClick: () => handleAddToAgent()
|
|
53
|
+
* }]}
|
|
54
|
+
* />
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
declare function AddToClientDropdown({ serverConfig, additionalItems, showClients, className, onSuccess, onError, trigger, }: AddToClientDropdownProps): react_jsx_runtime.JSX.Element;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Utility functions for generating MCP client configurations and commands
|
|
61
|
+
*/
|
|
62
|
+
/**
|
|
63
|
+
* Builds a Cursor deep link that installs an MCP configured with the provided URL and optional headers.
|
|
64
|
+
*
|
|
65
|
+
* @param name - Display name for the server; will be sanitized for use in the link
|
|
66
|
+
* @param headers - Optional mapping of header names to values; headers are represented in the generated config as environment-variable placeholders (e.g., `{{HEADER_ENV_VAR}}`)
|
|
67
|
+
* @returns A Cursor deep link URL containing a base64-encoded JSON config with the `url` and optional header placeholders, and a sanitized `name` query parameter
|
|
68
|
+
*/
|
|
69
|
+
declare function generateCursorDeepLink(url: string, name: string, headers?: Record<string, string>): string;
|
|
70
|
+
/**
|
|
71
|
+
* Build a VS Code deep link that installs an MCP server configuration.
|
|
72
|
+
*
|
|
73
|
+
* If `headers` are provided, each header name is mapped to a placeholder value of the form `your-<ENVVAR>-value`.
|
|
74
|
+
*
|
|
75
|
+
* @param url - The server URL to include in the configuration
|
|
76
|
+
* @param name - The display name for the server; it will be sanitized for use in the config
|
|
77
|
+
* @param headers - Optional map of HTTP header names to values; header names are converted to environment-variable-style placeholders in the generated config
|
|
78
|
+
* @returns A VS Code deep link (`vscode:mcp/install?...`) containing the URL-encoded JSON configuration
|
|
79
|
+
*/
|
|
80
|
+
declare function generateVSCodeDeepLink(url: string, name: string, headers?: Record<string, string>): string;
|
|
81
|
+
/**
|
|
82
|
+
* Build a VS Code Insiders deep link that installs an MCP server configuration.
|
|
83
|
+
*
|
|
84
|
+
* If `headers` are provided, each header name is mapped to a placeholder value of the form `your-<ENVVAR>-value`.
|
|
85
|
+
*
|
|
86
|
+
* @param url - The server URL to include in the configuration
|
|
87
|
+
* @param name - The display name for the server; it will be sanitized for use in the config
|
|
88
|
+
* @param headers - Optional map of HTTP header names to values; header names are converted to environment-variable-style placeholders in the generated config
|
|
89
|
+
* @returns A VS Code Insiders deep link (`vscode-insiders:mcp/install?...`) containing the URL-encoded JSON configuration
|
|
90
|
+
*/
|
|
91
|
+
declare function generateVSCodeInsidersDeepLink(url: string, name: string, headers?: Record<string, string>): string;
|
|
92
|
+
/**
|
|
93
|
+
* Builds a .mcpb configuration object for an MCP server.
|
|
94
|
+
*
|
|
95
|
+
* @param url - The server URL to include in the configuration
|
|
96
|
+
* @param name - The server name; it will be sanitized for use in the config
|
|
97
|
+
* @param headers - Optional mapping of header names to values; when provided each header value is replaced with a placeholder of the form `your-ENVVAR-value` where `ENVVAR` is derived from the header name
|
|
98
|
+
* @returns An object containing `url`, a sanitized `name`, and, if provided, a `headers` mapping of header names to placeholder values
|
|
99
|
+
*/
|
|
100
|
+
declare function generateMcpbConfig(url: string, name: string, headers?: Record<string, string>): object;
|
|
101
|
+
/**
|
|
102
|
+
* Triggers a browser download of a generated .mcpb configuration file.
|
|
103
|
+
*
|
|
104
|
+
* @param url - The MCP server URL to include in the generated configuration
|
|
105
|
+
* @param name - The server name used for the configuration and as the downloaded filename (sanitized)
|
|
106
|
+
* @param headers - Optional map of HTTP headers to include in the configuration
|
|
107
|
+
* @throws Rethrows any error encountered while generating the configuration or initiating the download
|
|
108
|
+
*/
|
|
109
|
+
declare function downloadMcpbFile(url: string, name: string, headers?: Record<string, string>): void;
|
|
110
|
+
/**
|
|
111
|
+
* Builds a Claude Code CLI command to add an MCP using HTTP transport and collects environment variable metadata for any provided headers.
|
|
112
|
+
*
|
|
113
|
+
* @param url - The server URL to include in the CLI command
|
|
114
|
+
* @param name - The display name for the server; it will be sanitized for use in the command
|
|
115
|
+
* @param headers - Optional map of header names to header values; header names will be converted to environment variable placeholders in the command
|
|
116
|
+
* @returns An object containing:
|
|
117
|
+
* - `command`: the complete `claude mcp add` CLI command string with header values referenced as environment variable placeholders, and
|
|
118
|
+
* - `envVars`: an array of `{ name, header }` entries where `name` is the generated environment variable and `header` is the original header name
|
|
119
|
+
*/
|
|
120
|
+
declare function generateClaudeCodeCommand(url: string, name: string, headers?: Record<string, string>): {
|
|
121
|
+
command: string;
|
|
122
|
+
envVars: Array<{
|
|
123
|
+
name: string;
|
|
124
|
+
header: string;
|
|
125
|
+
}>;
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Builds a Gemini CLI command to add an MCP using HTTP transport and returns any environment-variable mappings needed for headers.
|
|
129
|
+
*
|
|
130
|
+
* If `headers` are provided, the command includes header entries that reference environment variable placeholders, and `envVars` lists the placeholder names with their corresponding header names.
|
|
131
|
+
*
|
|
132
|
+
* @param url - The MCP server URL
|
|
133
|
+
* @param name - A human-readable server name used to derive a sanitized identifier for the command
|
|
134
|
+
* @param headers - Optional mapping of header names to values; header names are converted to environment-variable placeholders in the returned command
|
|
135
|
+
* @returns An object with `command`, the assembled CLI command string, and `envVars`, an array of `{ name, header }` pairs linking environment variable names to header names
|
|
136
|
+
*/
|
|
137
|
+
declare function generateGeminiCLICommand(url: string, name: string, headers?: Record<string, string>): {
|
|
138
|
+
command: string;
|
|
139
|
+
envVars: Array<{
|
|
140
|
+
name: string;
|
|
141
|
+
header: string;
|
|
142
|
+
}>;
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* Build a Codex-style INI configuration string for an MCP server and collect environment-variable metadata for any HTTP headers.
|
|
146
|
+
*
|
|
147
|
+
* @param url - The server URL to include in the configuration
|
|
148
|
+
* @param name - The server display name; used to produce a sanitized section key
|
|
149
|
+
* @param headers - Optional mapping of HTTP header names; header keys will be added to `http_headers` in the config with placeholder values and returned as environment-variable metadata
|
|
150
|
+
* @returns An object with `config`, the generated INI-style configuration string, and `envVars`, an array of `{ name, header }` pairs where `name` is the suggested environment variable and `header` is the original header name
|
|
151
|
+
*/
|
|
152
|
+
declare function generateCodexConfig(url: string, name: string, headers?: Record<string, string>): {
|
|
153
|
+
config: string;
|
|
154
|
+
envVars: Array<{
|
|
155
|
+
name: string;
|
|
156
|
+
header: string;
|
|
157
|
+
}>;
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* Generate shell instructions to export required environment variables.
|
|
161
|
+
*
|
|
162
|
+
* @param envVars - Array of environment variable metadata; each item should include `name` (the environment variable name) and `header` (the corresponding HTTP header)
|
|
163
|
+
* @returns A shell snippet that exports each environment variable (one `export NAME="your-NAME-value"` line per variable), or an empty string if `envVars` is empty
|
|
164
|
+
*/
|
|
165
|
+
declare function getEnvVarInstructions(envVars: Array<{
|
|
166
|
+
name: string;
|
|
167
|
+
header: string;
|
|
168
|
+
}>): string;
|
|
169
|
+
/**
|
|
170
|
+
* Produce a TypeScript code snippet that initializes an MCPClient configured for the given server.
|
|
171
|
+
*
|
|
172
|
+
* @param url - The server URL to include in the generated client configuration
|
|
173
|
+
* @param name - The human-readable server name used when deriving a default server id
|
|
174
|
+
* @param serverId - Optional explicit server id to use instead of a sanitized `name`
|
|
175
|
+
* @param headers - Optional HTTP headers to include in the server configuration
|
|
176
|
+
* @returns A TypeScript code snippet (as a string) that registers the server with MCPClient, creates sessions, and demonstrates common session operations
|
|
177
|
+
*/
|
|
178
|
+
declare function generateTypeScriptSDKCode(url: string, name: string, serverId?: string, headers?: Record<string, string>): string;
|
|
179
|
+
/**
|
|
180
|
+
* Produce a Python code snippet that initializes an MCPClient with the provided server configuration and demonstrates basic session usage.
|
|
181
|
+
*
|
|
182
|
+
* @param url - The MCP server URL to include in the generated configuration.
|
|
183
|
+
* @param name - The server name; used to derive a sanitized identifier when `serverId` is not provided.
|
|
184
|
+
* @param serverId - Optional explicit server identifier to use in the config; if omitted, a sanitized form of `name` is used.
|
|
185
|
+
* @param headers - Optional HTTP headers to include in the server configuration (mapped directly into the generated config).
|
|
186
|
+
* @returns A Python source string that defines an `MCPClient` configured with the specified server and includes example calls for creating sessions, listing tools/resources, and placeholders for tool/resource usage.
|
|
187
|
+
*/
|
|
188
|
+
declare function generatePythonSDKCode(url: string, name: string, serverId?: string, headers?: Record<string, string>): string;
|
|
189
|
+
|
|
190
|
+
interface ToolInputFormProps {
|
|
191
|
+
selectedTool: Tool;
|
|
192
|
+
toolArgs: Record<string, unknown>;
|
|
193
|
+
onArgChange: (key: string, value: string) => void;
|
|
194
|
+
onBulkPaste?: (pastedText: string, fieldKey: string) => Promise<boolean>;
|
|
195
|
+
autoFilledFields?: Set<string>;
|
|
196
|
+
setFields?: Set<string>;
|
|
197
|
+
sendEmptyFields?: Set<string>;
|
|
198
|
+
onToggleEmpty?: (key: string, expectedType: "string" | "object" | "array", pressed: boolean) => void;
|
|
199
|
+
}
|
|
200
|
+
declare function ToolInputForm({ selectedTool, toolArgs, onArgChange, onBulkPaste, autoFilledFields, setFields, sendEmptyFields, onToggleEmpty, }: ToolInputFormProps): react_jsx_runtime.JSX.Element;
|
|
201
|
+
|
|
202
|
+
interface ToolResult {
|
|
203
|
+
toolName: string;
|
|
204
|
+
args: Record<string, unknown>;
|
|
205
|
+
result: any;
|
|
206
|
+
error?: string;
|
|
207
|
+
timestamp: number;
|
|
208
|
+
duration?: number;
|
|
209
|
+
toolMeta?: Record<string, any>;
|
|
210
|
+
}
|
|
211
|
+
interface ToolResultDisplayProps {
|
|
212
|
+
results: ToolResult[];
|
|
213
|
+
copiedResult: number | null;
|
|
214
|
+
serverId: string;
|
|
215
|
+
readResource: (uri: string) => Promise<any>;
|
|
216
|
+
onCopy: (index: number, text: string) => void;
|
|
217
|
+
onDelete: (index: number) => void;
|
|
218
|
+
onFullscreen: (index: number) => void;
|
|
219
|
+
onMaximize?: () => void;
|
|
220
|
+
isMaximized?: boolean;
|
|
221
|
+
onRerunTool?: () => void;
|
|
222
|
+
onWidgetHeightChange?: (height: number | null) => void;
|
|
223
|
+
}
|
|
224
|
+
declare function ToolResultDisplay({ results, copiedResult, serverId, readResource, onCopy, onMaximize, isMaximized, onRerunTool, onWidgetHeightChange, }: ToolResultDisplayProps): react_jsx_runtime.JSX.Element;
|
|
225
|
+
|
|
226
|
+
/** SEP-1865 `ui/message` content block (follow-up messages from MCP Apps). */
|
|
227
|
+
type MessageContentBlock = {
|
|
228
|
+
type: "text";
|
|
229
|
+
text: string;
|
|
230
|
+
} | {
|
|
231
|
+
type: "image";
|
|
232
|
+
data: string;
|
|
233
|
+
mimeType: string;
|
|
234
|
+
} | {
|
|
235
|
+
type: "resource";
|
|
236
|
+
resource: {
|
|
237
|
+
uri: string;
|
|
238
|
+
[key: string]: unknown;
|
|
239
|
+
};
|
|
240
|
+
} | {
|
|
241
|
+
type: string;
|
|
242
|
+
[key: string]: unknown;
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
interface MessageAttachment {
|
|
246
|
+
type: "image" | "file";
|
|
247
|
+
data: string;
|
|
248
|
+
mimeType: string;
|
|
249
|
+
name?: string;
|
|
250
|
+
size?: number;
|
|
251
|
+
}
|
|
252
|
+
interface Message$1 {
|
|
253
|
+
id: string;
|
|
254
|
+
role: "user" | "assistant";
|
|
255
|
+
content: string | Array<{
|
|
256
|
+
index: number;
|
|
257
|
+
type: string;
|
|
258
|
+
text: string;
|
|
259
|
+
}>;
|
|
260
|
+
timestamp: number;
|
|
261
|
+
attachments?: MessageAttachment[];
|
|
262
|
+
parts?: Array<{
|
|
263
|
+
type: "text" | "tool-invocation";
|
|
264
|
+
text?: string;
|
|
265
|
+
toolInvocation?: {
|
|
266
|
+
toolCallId?: string;
|
|
267
|
+
toolName: string;
|
|
268
|
+
args: Record<string, unknown>;
|
|
269
|
+
result?: any;
|
|
270
|
+
state?: "pending" | "streaming" | "result" | "error";
|
|
271
|
+
/** Best-effort parsed partial arguments while the LLM is still generating */
|
|
272
|
+
partialArgs?: Record<string, unknown>;
|
|
273
|
+
};
|
|
274
|
+
}>;
|
|
275
|
+
toolCalls?: Array<{
|
|
276
|
+
toolName: string;
|
|
277
|
+
args: Record<string, unknown>;
|
|
278
|
+
result?: any;
|
|
279
|
+
}>;
|
|
280
|
+
}
|
|
281
|
+
interface ChatSerializedMessage {
|
|
282
|
+
role: string;
|
|
283
|
+
content: unknown;
|
|
284
|
+
attachments?: unknown;
|
|
285
|
+
}
|
|
286
|
+
interface ChatBodyContext {
|
|
287
|
+
disabledTools: string[];
|
|
288
|
+
widgetModelContext?: string;
|
|
289
|
+
}
|
|
290
|
+
type ChatBodyBuilder = (messages: ChatSerializedMessage[], context: ChatBodyContext) => unknown;
|
|
291
|
+
interface SendMessageOptions {
|
|
292
|
+
throwOnError?: boolean;
|
|
293
|
+
onAccepted?: () => void;
|
|
294
|
+
}
|
|
295
|
+
interface LLMConfig {
|
|
296
|
+
provider: ProviderName;
|
|
297
|
+
apiKey: string;
|
|
298
|
+
model: string;
|
|
299
|
+
temperature?: number;
|
|
300
|
+
baseUrl?: string;
|
|
301
|
+
credentials?: RequestCredentials;
|
|
302
|
+
}
|
|
303
|
+
interface AuthConfig {
|
|
304
|
+
type: "none" | "basic" | "bearer" | "oauth";
|
|
305
|
+
username?: string;
|
|
306
|
+
password?: string;
|
|
307
|
+
token?: string;
|
|
308
|
+
oauthTokens?: {
|
|
309
|
+
access_token?: string;
|
|
310
|
+
refresh_token?: string;
|
|
311
|
+
token_type?: string;
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
interface MCPServerConfig {
|
|
315
|
+
url?: string;
|
|
316
|
+
transport?: "http" | "sse";
|
|
317
|
+
headers?: Record<string, string>;
|
|
318
|
+
authToken?: string;
|
|
319
|
+
auth_token?: string;
|
|
320
|
+
command?: string;
|
|
321
|
+
args?: string[];
|
|
322
|
+
env?: Record<string, string>;
|
|
323
|
+
preferSse?: boolean;
|
|
324
|
+
}
|
|
325
|
+
interface MCPConfig {
|
|
326
|
+
mcpServers: Record<string, MCPServerConfig>;
|
|
327
|
+
}
|
|
328
|
+
type StreamProtocol = "sse" | "data-stream";
|
|
329
|
+
|
|
330
|
+
interface ToolResultRendererProps {
|
|
331
|
+
toolName: string;
|
|
332
|
+
toolArgs: Record<string, unknown>;
|
|
333
|
+
result: any;
|
|
334
|
+
serverId?: string;
|
|
335
|
+
readResource?: (uri: string) => Promise<any>;
|
|
336
|
+
toolMeta?: Record<string, any>;
|
|
337
|
+
onSendFollowUp?: (content: MessageContentBlock[]) => Promise<void>;
|
|
338
|
+
modelContextScope?: string;
|
|
339
|
+
llmConfig?: LLMConfig | null;
|
|
340
|
+
partialToolArgs?: Record<string, unknown>;
|
|
341
|
+
cancelled?: boolean;
|
|
342
|
+
}
|
|
343
|
+
declare function ToolResultRenderer({ toolName, toolArgs, result, serverId, readResource, toolMeta, onSendFollowUp, modelContextScope, llmConfig, partialToolArgs, cancelled, }: ToolResultRendererProps): react_jsx_runtime.JSX.Element | null;
|
|
344
|
+
|
|
345
|
+
type Theme = "light" | "dark" | "system";
|
|
346
|
+
interface ThemeProviderProps {
|
|
347
|
+
children: ReactNode;
|
|
348
|
+
defaultTheme?: Theme;
|
|
349
|
+
storageKey?: string;
|
|
350
|
+
forcedTheme?: Theme;
|
|
351
|
+
}
|
|
352
|
+
declare function ThemeProvider({ children, defaultTheme, storageKey, forcedTheme, }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
353
|
+
|
|
354
|
+
interface WidgetModelContext {
|
|
355
|
+
content?: Array<{
|
|
356
|
+
type: "text";
|
|
357
|
+
text: string;
|
|
358
|
+
}>;
|
|
359
|
+
structuredContent?: Record<string, unknown>;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Provider for widget debugging context
|
|
364
|
+
*
|
|
365
|
+
* Manages widget debug state following the same pattern as InspectorProvider
|
|
366
|
+
*/
|
|
367
|
+
declare function WidgetDebugProvider({ children }: {
|
|
368
|
+
children: ReactNode;
|
|
369
|
+
}): react_jsx_runtime.JSX.Element;
|
|
370
|
+
|
|
371
|
+
type TabType = "tools" | "prompts" | "resources" | "chat" | "sampling" | "elicitation" | "notifications" | "server-metadata" | "connection-settings";
|
|
372
|
+
/**
|
|
373
|
+
* Configuration injected by a host application when the inspector runs in
|
|
374
|
+
* embedded / hosted mode (e.g. inside inspector.manufact.com or the Vibe IDE).
|
|
375
|
+
*
|
|
376
|
+
* ── Hosted-inspector chat flow ──────────────────────────────────────────────
|
|
377
|
+
* The Chat tab uses a managed backend by default:
|
|
378
|
+
*
|
|
379
|
+
* 1. `InspectorProvider` (below) prefers the runtime MANUFACT_CHAT_URL,
|
|
380
|
+
* then VITE_MANUFACT_CHAT_URL, and finally the Manufact Cloud endpoint.
|
|
381
|
+
*
|
|
382
|
+
* 2. `LayoutContent` passes these down to `ChatTab` as props; `ChatTab`
|
|
383
|
+
* then passes `useClientSide={false}` to `useChatMessages`.
|
|
384
|
+
*
|
|
385
|
+
* 3. If the user already has their own API key in localStorage, `ChatTab`
|
|
386
|
+
* overrides this with `effectiveClientSide=true` (see forceClientSide
|
|
387
|
+
* logic there), bypassing the backend entirely.
|
|
388
|
+
*
|
|
389
|
+
* 4. The backend endpoint (`/api/v1/inspector/chat/stream`, cloud.mcp-use)
|
|
390
|
+
* requires an OAuth bearer token and meters the user's organization.
|
|
391
|
+
*
|
|
392
|
+
* 5. On a 429 response the frontend offers cloud OAuth sign-in or BYOK.
|
|
393
|
+
*
|
|
394
|
+
* ── Related files ────────────────────────────────────────────────────────────
|
|
395
|
+
* • cloud.mcp-use/src/routes/v1/inspector-chat.ts — rate-limited endpoint
|
|
396
|
+
* • cloud.mcp-use/src/lib/mcp-chat-stream.ts — shared OpenRouter streamer
|
|
397
|
+
* • inspector/src/client/components/ChatTab.tsx — effectiveClientSide logic
|
|
398
|
+
* • inspector/src/client/auth/manufact-auth.ts — cloud OAuth session
|
|
399
|
+
* • inspector/src/client/components/HostedUserMenu.tsx — avatar / authorization
|
|
400
|
+
*/
|
|
401
|
+
interface EmbeddedConfig {
|
|
402
|
+
backgroundColor?: string;
|
|
403
|
+
padding?: string;
|
|
404
|
+
/** Show only a single tab with no tab bar / header chrome */
|
|
405
|
+
singleTab?: boolean;
|
|
406
|
+
/** Which tabs to show. If omitted, all tabs are visible. */
|
|
407
|
+
visibleTabs?: TabType[];
|
|
408
|
+
/** Override the default tab to open on load */
|
|
409
|
+
defaultTab?: TabType;
|
|
410
|
+
/** Custom API URL for the Chat tab's server-side streaming */
|
|
411
|
+
chatApiUrl?: string;
|
|
412
|
+
/**
|
|
413
|
+
* Wire protocol for the `chatApiUrl` streaming endpoint.
|
|
414
|
+
* - `"sse"` (default): Inspector SSE protocol
|
|
415
|
+
* - `"data-stream"`: Vercel AI SDK data-stream protocol
|
|
416
|
+
*/
|
|
417
|
+
chatStreamProtocol?: StreamProtocol;
|
|
418
|
+
/**
|
|
419
|
+
* Credentials policy for chat fetch requests.
|
|
420
|
+
* Set to `"include"` when the chat endpoint requires session cookies (e.g. when the
|
|
421
|
+
* inspector iframe is on a subdomain that shares cookies with the API).
|
|
422
|
+
*/
|
|
423
|
+
chatCredentials?: RequestCredentials;
|
|
424
|
+
/** Externally-managed LLM config passed to ChatTab (bypasses config UI) */
|
|
425
|
+
managedLlmConfig?: LLMConfig;
|
|
426
|
+
/** Opt in to the Manufact free-tier sign-in / upgrade UI in the chat. */
|
|
427
|
+
chatEnableFreeTierUpgrade?: boolean;
|
|
428
|
+
/** Hide the "Chat" title in the header */
|
|
429
|
+
chatHideTitle?: boolean;
|
|
430
|
+
/** Hide the model badge on the landing form and header */
|
|
431
|
+
chatHideModelBadge?: boolean;
|
|
432
|
+
/** Hide the MCP server URL on the landing form */
|
|
433
|
+
chatHideServerUrl?: boolean;
|
|
434
|
+
/** Hide the API key / provider configuration dialog */
|
|
435
|
+
chatHideConfigButton?: boolean;
|
|
436
|
+
/** Custom label for the clear / new-chat button */
|
|
437
|
+
chatClearButtonLabel?: string;
|
|
438
|
+
/** Hide the icon on the clear / new-chat button */
|
|
439
|
+
chatClearButtonHideIcon?: boolean;
|
|
440
|
+
/** Hide the keyboard shortcut (⌘O) on the clear / new-chat button */
|
|
441
|
+
chatClearButtonHideShortcut?: boolean;
|
|
442
|
+
/** Button variant for the clear / new-chat button (e.g. "secondary", "ghost") */
|
|
443
|
+
chatClearButtonVariant?: "default" | "secondary" | "ghost" | "outline";
|
|
444
|
+
/** Initial quick questions shown below the landing input. */
|
|
445
|
+
chatQuickQuestions?: string[];
|
|
446
|
+
/** Initial followup suggestions shown above input in chat mode. */
|
|
447
|
+
chatFollowups?: string[];
|
|
448
|
+
/** When true, hides the "New Chat" / clear button in the chat header. */
|
|
449
|
+
chatHideClearButton?: boolean;
|
|
450
|
+
/** When true, hides the tool selector (wrench icon) in the chat input. */
|
|
451
|
+
chatHideToolSelector?: boolean;
|
|
452
|
+
/**
|
|
453
|
+
* When true, treat the chat as already connected even when no MCP server is
|
|
454
|
+
* selected. Use this together with `chatApiUrl` when the backend manages the
|
|
455
|
+
* MCP connections and no client-side server URL is required.
|
|
456
|
+
*/
|
|
457
|
+
forceConnected?: boolean;
|
|
458
|
+
}
|
|
459
|
+
interface InspectorState {
|
|
460
|
+
selectedServerId: string | null;
|
|
461
|
+
activeTab: TabType;
|
|
462
|
+
selectedToolName: string | null;
|
|
463
|
+
selectedPromptName: string | null;
|
|
464
|
+
selectedResourceUri: string | null;
|
|
465
|
+
selectedSamplingRequestId: string | null;
|
|
466
|
+
selectedElicitationRequestId: string | null;
|
|
467
|
+
tunnelUrl: string | null;
|
|
468
|
+
isTunnelStarting: boolean;
|
|
469
|
+
isEmbedded: boolean;
|
|
470
|
+
embeddedConfig: EmbeddedConfig;
|
|
471
|
+
}
|
|
472
|
+
interface InspectorContextType extends InspectorState {
|
|
473
|
+
setSelectedServerId: (serverId: string | null) => void;
|
|
474
|
+
setActiveTab: (tab: TabType) => void;
|
|
475
|
+
setSelectedToolName: (toolName: string | null) => void;
|
|
476
|
+
setSelectedPromptName: (promptName: string | null) => void;
|
|
477
|
+
setSelectedResourceUri: (resourceUri: string | null) => void;
|
|
478
|
+
setSelectedSamplingRequestId: (requestId: string | null) => void;
|
|
479
|
+
setSelectedElicitationRequestId: (requestId: string | null) => void;
|
|
480
|
+
setTunnelUrl: (tunnelUrl: string | null) => void;
|
|
481
|
+
setIsTunnelStarting: (starting: boolean) => void;
|
|
482
|
+
setEmbeddedMode: (isEmbedded: boolean, config?: EmbeddedConfig) => void;
|
|
483
|
+
navigateToItem: (serverId: string, tab: TabType, itemIdentifier?: string) => void;
|
|
484
|
+
clearSelection: () => void;
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Provides Inspector context and state to descendant components.
|
|
488
|
+
*
|
|
489
|
+
* Initializes and supplies the inspector UI state (selected server, active tab,
|
|
490
|
+
* per-tab selections, tunnel URL, and embedded mode/config) along with updater
|
|
491
|
+
* callbacks and navigation/clearing helpers through React context.
|
|
492
|
+
*
|
|
493
|
+
* @param children - Elements that will receive the Inspector context
|
|
494
|
+
* @returns A context provider element that supplies inspector state and mutator functions to its children
|
|
495
|
+
*/
|
|
496
|
+
declare function InspectorProvider({ children }: {
|
|
497
|
+
children: ReactNode;
|
|
498
|
+
}): react_jsx_runtime.JSX.Element;
|
|
499
|
+
declare function useInspector(): InspectorContextType;
|
|
500
|
+
|
|
501
|
+
interface ToolsTabRef {
|
|
502
|
+
focusSearch: () => void;
|
|
503
|
+
blurSearch: () => void;
|
|
504
|
+
}
|
|
505
|
+
interface ToolsTabProps {
|
|
506
|
+
tools: Tool[];
|
|
507
|
+
callTool: (name: string, args?: Record<string, unknown>, options?: {
|
|
508
|
+
timeout?: number;
|
|
509
|
+
maxTotalTimeout?: number;
|
|
510
|
+
resetTimeoutOnProgress?: boolean;
|
|
511
|
+
signal?: AbortSignal;
|
|
512
|
+
}) => Promise<any>;
|
|
513
|
+
readResource: (uri: string) => Promise<any>;
|
|
514
|
+
serverId: string;
|
|
515
|
+
isConnected: boolean;
|
|
516
|
+
refreshTools?: () => Promise<void>;
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Render the Tools tab UI for browsing, executing, and managing tools and saved requests.
|
|
520
|
+
*
|
|
521
|
+
* Renders a responsive interface with a searchable tools list and saved-requests list, a tool execution panel, a results history (with copying, deleting, fullscreen, preview and MCP Apps widget integration), and an RPC message logger. Supports mobile-specific navigation, resizable panels for desktop, saved request persistence, keyboard navigation, execution abort/timeout handling, and telemetry for executions and saved requests.
|
|
522
|
+
*
|
|
523
|
+
* @param ref - Optional imperative ref exposing `focusSearch` and `blurSearch` methods.
|
|
524
|
+
* @param tools - Array of available tools to list and execute.
|
|
525
|
+
* @param callTool - Function to invoke a tool by name with arguments and options (timeout, reset behavior, abort signal).
|
|
526
|
+
* @param readResource - Function to fetch a resource by URI (used for MCP Apps widget prefetch).
|
|
527
|
+
* @param serverId - Identifier for the current server (used for telemetry and RPC filtering).
|
|
528
|
+
* @param isConnected - Whether the inspector is connected to the server (affects execution UI).
|
|
529
|
+
* @returns The React element for the Tools tab.
|
|
530
|
+
*/
|
|
531
|
+
declare function ToolsTab({ ref, tools, callTool, readResource, serverId, isConnected, refreshTools, }: ToolsTabProps & {
|
|
532
|
+
ref?: React.RefObject<ToolsTabRef | null>;
|
|
533
|
+
}): react_jsx_runtime.JSX.Element;
|
|
534
|
+
declare namespace ToolsTab {
|
|
535
|
+
var displayName: string;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
interface ResourcesTabRef {
|
|
539
|
+
focusSearch: () => void;
|
|
540
|
+
blurSearch: () => void;
|
|
541
|
+
}
|
|
542
|
+
interface ResourcesTabProps {
|
|
543
|
+
resources: Resource[];
|
|
544
|
+
readResource: (uri: string) => Promise<any>;
|
|
545
|
+
serverId: string;
|
|
546
|
+
isConnected: boolean;
|
|
547
|
+
mcpServerUrl: string;
|
|
548
|
+
refreshResources?: () => Promise<void>;
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Render the Resources tab UI and manage its interactions (resource list, selection, result display, search, keyboard navigation, mobile/desktop layouts, copy/download/fullscreen actions, and RPC logger).
|
|
552
|
+
*
|
|
553
|
+
* @param ref - Optional ref exposing `focusSearch()` and `blurSearch()` methods for programmatic search focus control.
|
|
554
|
+
* @param resources - Array of resources to show and filter.
|
|
555
|
+
* @param readResource - Function to read a resource by its URI; used when a resource is selected.
|
|
556
|
+
* @param serverId - Identifier for the server; used for telemetry and RPC logger scope.
|
|
557
|
+
* @param isConnected - When `true`, selecting a resource triggers `readResource`; when `false`, reads are skipped.
|
|
558
|
+
* @returns The ResourcesTab React element.
|
|
559
|
+
*/
|
|
560
|
+
declare function ResourcesTab({ ref, resources, readResource, serverId, isConnected, mcpServerUrl, refreshResources, }: ResourcesTabProps & {
|
|
561
|
+
ref?: React.RefObject<ResourcesTabRef | null>;
|
|
562
|
+
}): react_jsx_runtime.JSX.Element;
|
|
563
|
+
declare namespace ResourcesTab {
|
|
564
|
+
var displayName: string;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
interface PromptsTabRef {
|
|
568
|
+
focusSearch: () => void;
|
|
569
|
+
blurSearch: () => void;
|
|
570
|
+
}
|
|
571
|
+
interface PromptsTabProps {
|
|
572
|
+
prompts: Prompt[];
|
|
573
|
+
callPrompt: (name: string, args?: Record<string, unknown>) => Promise<any>;
|
|
574
|
+
serverId: string;
|
|
575
|
+
isConnected: boolean;
|
|
576
|
+
refreshPrompts?: () => Promise<void>;
|
|
577
|
+
}
|
|
578
|
+
/**
|
|
579
|
+
* Render the Prompts tab UI for browsing, selecting, executing, saving, and inspecting prompts.
|
|
580
|
+
*
|
|
581
|
+
* The component manages prompt selection, argument state, execution results, saved prompts (persisted
|
|
582
|
+
* to localStorage), keyboard navigation, responsive mobile/desktop layouts, RPC message viewing,
|
|
583
|
+
* and exposes `focusSearch` / `blurSearch` via the forwarded ref.
|
|
584
|
+
*
|
|
585
|
+
* @param ref - Optional forwarded ref exposing `focusSearch` and `blurSearch` methods.
|
|
586
|
+
* @param prompts - The list of available prompts to display.
|
|
587
|
+
* @param callPrompt - Function invoked to execute a prompt by name with an arguments object.
|
|
588
|
+
* @param serverId - Identifier for the current server; used for RPC scoping and telemetry.
|
|
589
|
+
* @param isConnected - Whether the application is currently connected to the backend (controls execution availability).
|
|
590
|
+
* @returns The PromptsTab UI element.
|
|
591
|
+
*/
|
|
592
|
+
declare function PromptsTab({ ref, prompts, callPrompt, serverId, isConnected, refreshPrompts, }: PromptsTabProps & {
|
|
593
|
+
ref?: React.RefObject<PromptsTabRef | null>;
|
|
594
|
+
}): react_jsx_runtime.JSX.Element;
|
|
595
|
+
declare namespace PromptsTab {
|
|
596
|
+
var displayName: string;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/** Chat session kind from the chats API. */
|
|
600
|
+
type ChatType = string;
|
|
601
|
+
type ChatSession = {
|
|
602
|
+
id: string;
|
|
603
|
+
title: string;
|
|
604
|
+
agent_id: string;
|
|
605
|
+
/** Omitted on some API rows — treat as regular chat unless `"agent_execution"`. */
|
|
606
|
+
type?: ChatType;
|
|
607
|
+
agent_name: string;
|
|
608
|
+
created_at: string;
|
|
609
|
+
updated_at: string;
|
|
610
|
+
};
|
|
611
|
+
interface ListChatsParams {
|
|
612
|
+
agentId?: string;
|
|
613
|
+
take?: number;
|
|
614
|
+
skip?: number;
|
|
615
|
+
}
|
|
616
|
+
interface ChatStorageProvider {
|
|
617
|
+
listChats(params: ListChatsParams): Promise<{
|
|
618
|
+
items: ChatSession[];
|
|
619
|
+
total: number;
|
|
620
|
+
}>;
|
|
621
|
+
getMessages(chatId: string): Promise<Message$1[]>;
|
|
622
|
+
createChat(params: {
|
|
623
|
+
agentId: string;
|
|
624
|
+
title?: string;
|
|
625
|
+
agentName?: string;
|
|
626
|
+
}): Promise<ChatSession>;
|
|
627
|
+
updateChat(chatId: string, patch: {
|
|
628
|
+
title?: string;
|
|
629
|
+
}): Promise<ChatSession>;
|
|
630
|
+
deleteChat(chatId: string): Promise<void>;
|
|
631
|
+
/** Optional — local provider implements; cloud relies on /stream event writes */
|
|
632
|
+
saveMessages?(chatId: string, messages: Message$1[]): Promise<void>;
|
|
633
|
+
/** Optional — cloud uses API; standalone may use built-in LLM fallback in ChatTab */
|
|
634
|
+
generateTitle?(chatId: string): Promise<string | null>;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
interface CloudModel {
|
|
638
|
+
id: string;
|
|
639
|
+
name: string;
|
|
640
|
+
provider: string;
|
|
641
|
+
}
|
|
642
|
+
declare function useManagedCloudModel(chatApiUrl: string | undefined, accessToken: string | null | undefined, authMode: "session" | "oauth" | null, enabled: boolean): {
|
|
643
|
+
models: CloudModel[];
|
|
644
|
+
selectedModelId: string;
|
|
645
|
+
setSelectedModelId: (id: string) => void;
|
|
646
|
+
isLoading: boolean;
|
|
647
|
+
selectedModel: CloudModel | null;
|
|
648
|
+
defaultModelId: string;
|
|
649
|
+
};
|
|
650
|
+
|
|
651
|
+
interface InspectorTokenUsage {
|
|
652
|
+
inputTokens?: number;
|
|
653
|
+
outputTokens?: number;
|
|
654
|
+
totalTokens?: number;
|
|
655
|
+
cachedInputTokens?: number;
|
|
656
|
+
reasoningTokens?: number;
|
|
657
|
+
}
|
|
658
|
+
interface TraceEventBase {
|
|
659
|
+
id: string;
|
|
660
|
+
timestamp: number;
|
|
661
|
+
raw?: unknown;
|
|
662
|
+
}
|
|
663
|
+
type InspectorTraceEvent = (TraceEventBase & {
|
|
664
|
+
type: "request";
|
|
665
|
+
request: unknown;
|
|
666
|
+
}) | (TraceEventBase & {
|
|
667
|
+
type: "text-delta";
|
|
668
|
+
delta: string;
|
|
669
|
+
}) | (TraceEventBase & {
|
|
670
|
+
type: "tool-call-start";
|
|
671
|
+
toolCallId: string;
|
|
672
|
+
toolName: string;
|
|
673
|
+
}) | (TraceEventBase & {
|
|
674
|
+
type: "tool-call-args";
|
|
675
|
+
toolCallId: string;
|
|
676
|
+
toolName: string;
|
|
677
|
+
args: Record<string, unknown>;
|
|
678
|
+
}) | (TraceEventBase & {
|
|
679
|
+
type: "tool-result";
|
|
680
|
+
toolCallId?: string;
|
|
681
|
+
toolName: string;
|
|
682
|
+
result: unknown;
|
|
683
|
+
isError?: boolean;
|
|
684
|
+
}) | (TraceEventBase & {
|
|
685
|
+
type: "usage";
|
|
686
|
+
usage: InspectorTokenUsage;
|
|
687
|
+
}) | (TraceEventBase & {
|
|
688
|
+
type: "error";
|
|
689
|
+
message: string;
|
|
690
|
+
}) | (TraceEventBase & {
|
|
691
|
+
type: "done";
|
|
692
|
+
});
|
|
693
|
+
interface InspectorTraceSpan {
|
|
694
|
+
id: string;
|
|
695
|
+
kind: "llm" | "tool";
|
|
696
|
+
name: string;
|
|
697
|
+
status: "running" | "success" | "error";
|
|
698
|
+
startedAt: number;
|
|
699
|
+
endedAt?: number;
|
|
700
|
+
preview?: string;
|
|
701
|
+
usage?: InspectorTokenUsage;
|
|
702
|
+
}
|
|
703
|
+
interface InspectorTraceState {
|
|
704
|
+
events: InspectorTraceEvent[];
|
|
705
|
+
spans: InspectorTraceSpan[];
|
|
706
|
+
usage?: InspectorTokenUsage;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
type ChatView = "conv" | "raw";
|
|
710
|
+
|
|
711
|
+
interface ChatSystemPromptProvider {
|
|
712
|
+
prompt: string | null;
|
|
713
|
+
savePrompt: (prompt: string) => Promise<void>;
|
|
714
|
+
isLoading?: boolean;
|
|
715
|
+
isSaving?: boolean;
|
|
716
|
+
disabled?: boolean;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
type MCPConnection$1 = {
|
|
720
|
+
[K in keyof McpServer]: McpServer[K];
|
|
721
|
+
};
|
|
722
|
+
interface ChatTabProps {
|
|
723
|
+
connection: MCPConnection$1;
|
|
724
|
+
isConnected: boolean;
|
|
725
|
+
useClientSide?: boolean;
|
|
726
|
+
/** Enable global keyboard shortcuts (Cmd+O for new chat). Default: true.
|
|
727
|
+
* Set to false when embedding to avoid conflicts with host app shortcuts. */
|
|
728
|
+
enableKeyboardShortcuts?: boolean;
|
|
729
|
+
prompts: Prompt[];
|
|
730
|
+
serverId: string;
|
|
731
|
+
readResource?: (uri: string) => Promise<any>;
|
|
732
|
+
callPrompt: (name: string, args?: Record<string, unknown>) => Promise<any>;
|
|
733
|
+
/** Custom API endpoint URL for server-side chat streaming (used when useClientSide=false).
|
|
734
|
+
* Defaults to "/inspector/api/chat/stream". */
|
|
735
|
+
chatApiUrl?: string;
|
|
736
|
+
/** When chatApiUrl is not yet available, called before sending to resolve the URL. Useful for background initialization. */
|
|
737
|
+
waitForChatApiUrl?: () => Promise<string | undefined>;
|
|
738
|
+
/** Pre-populate the chat with messages from a previous session (e.g. when restoring history). */
|
|
739
|
+
initialMessages?: Message$1[];
|
|
740
|
+
/** Externally-managed LLM config. When provided, bypasses localStorage-based config
|
|
741
|
+
* and hides the API key configuration UI. Useful for host apps that provide their own backend. */
|
|
742
|
+
managedLlmConfig?: LLMConfig;
|
|
743
|
+
/** Curated cloud model state when signed in on hosted inspector. */
|
|
744
|
+
managedCloudModel?: ReturnType<typeof useManagedCloudModel>;
|
|
745
|
+
/** Opt in to the Manufact free-tier sign-in / upgrade UI. Default: false. */
|
|
746
|
+
enableFreeTierUpgrade?: boolean;
|
|
747
|
+
/** Label for the clear/new-chat button. Default: "New Chat". */
|
|
748
|
+
clearButtonLabel?: string;
|
|
749
|
+
/** When true, hides the "Chat" title in the header. Default: false. */
|
|
750
|
+
hideTitle?: boolean;
|
|
751
|
+
/** When true, hides the model badge on the landing form. Default: false. */
|
|
752
|
+
hideModelBadge?: boolean;
|
|
753
|
+
/** When true, hides the MCP server URL on the landing form. Default: false. */
|
|
754
|
+
hideServerUrl?: boolean;
|
|
755
|
+
/** When true, hides the icon on the clear/new-chat button. */
|
|
756
|
+
clearButtonHideIcon?: boolean;
|
|
757
|
+
/** When true, hides the keyboard shortcut (⌘O) on the clear/new-chat button. */
|
|
758
|
+
clearButtonHideShortcut?: boolean;
|
|
759
|
+
/** Button variant for the clear/new-chat button. Default: "default". */
|
|
760
|
+
clearButtonVariant?: "default" | "secondary" | "ghost" | "outline";
|
|
761
|
+
/** When true, hides the "New Chat" / clear button entirely. */
|
|
762
|
+
hideClearButton?: boolean;
|
|
763
|
+
/** When true, hides the tool selector (wrench icon) in the chat input. */
|
|
764
|
+
hideToolSelector?: boolean;
|
|
765
|
+
/** Initial quick questions shown below the landing input. */
|
|
766
|
+
chatQuickQuestions?: string[];
|
|
767
|
+
/** Initial followups shown above input in active chat mode. */
|
|
768
|
+
chatFollowups?: string[];
|
|
769
|
+
/**
|
|
770
|
+
* Wire protocol used by the streaming endpoint.
|
|
771
|
+
* - `"sse"` (default): Inspector SSE protocol
|
|
772
|
+
* - `"data-stream"`: Vercel AI SDK data-stream protocol
|
|
773
|
+
*/
|
|
774
|
+
streamProtocol?: StreamProtocol;
|
|
775
|
+
/** Credentials policy for the fetch request (e.g. `"include"` for cross-origin cookie auth). */
|
|
776
|
+
credentials?: RequestCredentials;
|
|
777
|
+
/** Extra headers to send with every streaming request. */
|
|
778
|
+
extraHeaders?: Record<string, string>;
|
|
779
|
+
/**
|
|
780
|
+
* Custom body builder for the streaming request.
|
|
781
|
+
* The second argument contains the effective disabled tools and serialized
|
|
782
|
+
* scoped widget context. Existing one-argument callbacks remain valid.
|
|
783
|
+
*/
|
|
784
|
+
body?: ChatBodyBuilder;
|
|
785
|
+
/** Pluggable chat history storage. Defaults to localStorage in standalone mode. */
|
|
786
|
+
chatStorageProvider?: ChatStorageProvider;
|
|
787
|
+
/** When false, hides the built-in history sidebar even if a provider is available. */
|
|
788
|
+
enableChatHistory?: boolean;
|
|
789
|
+
/** Controlled active chat thread id */
|
|
790
|
+
activeChatId?: string;
|
|
791
|
+
onActiveChatIdChange?: (chatId: string | null) => void;
|
|
792
|
+
/** When false, defer title generation until host signals persisted events (cloud embed). Default: true. */
|
|
793
|
+
titleGenerationReady?: boolean;
|
|
794
|
+
/** Known title for the active chat; skips generation when not the placeholder. */
|
|
795
|
+
activeChatTitle?: string;
|
|
796
|
+
/** Called after a title is generated and persisted via the storage provider. */
|
|
797
|
+
onChatTitleGenerated?: (chatId: string, title: string) => void;
|
|
798
|
+
/** Initial focused chat view. Default: "conv". */
|
|
799
|
+
defaultView?: ChatView;
|
|
800
|
+
/** Pluggable system prompt source. Defaults to localStorage per serverId. */
|
|
801
|
+
systemPromptProvider?: ChatSystemPromptProvider;
|
|
802
|
+
/** Raise ChatHeader above host chrome (cloud embed). */
|
|
803
|
+
elevatedHeader?: boolean;
|
|
804
|
+
}
|
|
805
|
+
declare function ChatTab({ connection, isConnected, useClientSide, enableKeyboardShortcuts, prompts, serverId, callPrompt, readResource, chatApiUrl, waitForChatApiUrl, initialMessages, managedLlmConfig, managedCloudModel, enableFreeTierUpgrade, clearButtonLabel, hideTitle, hideModelBadge, clearButtonHideIcon, clearButtonHideShortcut, clearButtonVariant, hideClearButton, hideToolSelector, chatQuickQuestions, chatFollowups, streamProtocol, credentials, extraHeaders, body, chatStorageProvider, enableChatHistory, activeChatId: controlledActiveChatId, onActiveChatIdChange, titleGenerationReady, activeChatTitle, onChatTitleGenerated, defaultView, systemPromptProvider: externalSystemPromptProvider, elevatedHeader, }: ChatTabProps): react_jsx_runtime.JSX.Element;
|
|
806
|
+
|
|
807
|
+
interface Message {
|
|
808
|
+
id: string;
|
|
809
|
+
role: "user" | "assistant";
|
|
810
|
+
content: string | Array<{
|
|
811
|
+
index: number;
|
|
812
|
+
type: string;
|
|
813
|
+
text: string;
|
|
814
|
+
}>;
|
|
815
|
+
timestamp: number;
|
|
816
|
+
attachments?: MessageAttachment[];
|
|
817
|
+
parts?: Array<{
|
|
818
|
+
type: "text" | "tool-invocation";
|
|
819
|
+
text?: string;
|
|
820
|
+
toolInvocation?: {
|
|
821
|
+
toolCallId?: string;
|
|
822
|
+
toolName: string;
|
|
823
|
+
args: Record<string, unknown>;
|
|
824
|
+
result?: any;
|
|
825
|
+
state?: "pending" | "streaming" | "result" | "error";
|
|
826
|
+
partialArgs?: Record<string, unknown>;
|
|
827
|
+
};
|
|
828
|
+
}>;
|
|
829
|
+
toolCalls?: Array<{
|
|
830
|
+
toolName: string;
|
|
831
|
+
args: Record<string, unknown>;
|
|
832
|
+
result?: any;
|
|
833
|
+
}>;
|
|
834
|
+
}
|
|
835
|
+
interface MessageListProps {
|
|
836
|
+
messages: Message[];
|
|
837
|
+
isLoading: boolean;
|
|
838
|
+
serverId?: string;
|
|
839
|
+
readResource?: (uri: string) => Promise<any>;
|
|
840
|
+
tools?: any[];
|
|
841
|
+
sendMessage?: (message: string, attachments?: MessageAttachment[]) => Promise<void>;
|
|
842
|
+
/** When provided, passed to widget renderers to avoid useMcpClient() context lookup. */
|
|
843
|
+
serverBaseUrl?: string;
|
|
844
|
+
/** Anchor at the end of the thread — owned by useChatScrollToBottom in ChatTab. */
|
|
845
|
+
messagesEndRef?: RefObject<HTMLDivElement | null>;
|
|
846
|
+
/** Trace events used to derive per-message token counts on hover. */
|
|
847
|
+
traceEvents?: InspectorTraceEvent[];
|
|
848
|
+
modelContextScope?: string;
|
|
849
|
+
llmConfig?: LLMConfig | null;
|
|
850
|
+
}
|
|
851
|
+
declare const MessageList: react.MemoExoticComponent<({ messages, isLoading, serverId, readResource, tools, sendMessage, messagesEndRef, traceEvents, modelContextScope, llmConfig, }: MessageListProps) => react_jsx_runtime.JSX.Element>;
|
|
852
|
+
|
|
853
|
+
interface ChatHeaderProps {
|
|
854
|
+
llmConfig: LLMConfig | null;
|
|
855
|
+
hasMessages: boolean;
|
|
856
|
+
configDialogOpen: boolean;
|
|
857
|
+
onConfigDialogOpenChange: (open: boolean) => void;
|
|
858
|
+
onClearChat: () => void;
|
|
859
|
+
onCopyChat?: () => void;
|
|
860
|
+
onExportChat?: (format: "json" | "markdown") => void;
|
|
861
|
+
tempProvider: ProviderName;
|
|
862
|
+
tempModel: string;
|
|
863
|
+
tempApiKey: string;
|
|
864
|
+
tempBaseUrl: string;
|
|
865
|
+
onProviderChange: (provider: ProviderName) => void;
|
|
866
|
+
onModelChange: (model: string) => void;
|
|
867
|
+
onApiKeyChange: (apiKey: string) => void;
|
|
868
|
+
onBaseUrlChange: (baseUrl: string) => void;
|
|
869
|
+
onSaveConfig: () => void;
|
|
870
|
+
onClearConfig: () => void;
|
|
871
|
+
/** When true, hides the API key config badge/button and dialog. */
|
|
872
|
+
hideConfigButton?: boolean;
|
|
873
|
+
/** Hosted inspector — unified Configure Chat dialog layout. */
|
|
874
|
+
hostedInspector?: boolean;
|
|
875
|
+
/**
|
|
876
|
+
* When set, the header shows a "Free tier" badge (instead of the local
|
|
877
|
+
* provider/model badge) and passes this info down to the ConfigurationDialog
|
|
878
|
+
* so it renders a Sign-in CTA above the bring-your-own-key form.
|
|
879
|
+
* Used in hosted inspector mode where the LLM is managed server-side.
|
|
880
|
+
*/
|
|
881
|
+
freeTierInfo?: {
|
|
882
|
+
onLoginClick: () => void;
|
|
883
|
+
};
|
|
884
|
+
managedCloudInfo?: {
|
|
885
|
+
models: CloudModel[];
|
|
886
|
+
selectedModelId: string;
|
|
887
|
+
onModelChange: (modelId: string) => void;
|
|
888
|
+
isLoading?: boolean;
|
|
889
|
+
};
|
|
890
|
+
useManagedCloud?: boolean;
|
|
891
|
+
onSaveManagedCloud?: () => void;
|
|
892
|
+
/** When true, shows Clear Config in the BYOK tab of the config dialog. */
|
|
893
|
+
showClearButton?: boolean;
|
|
894
|
+
/** Label for the clear/new-chat button. Default: "New Chat". */
|
|
895
|
+
clearButtonLabel?: string;
|
|
896
|
+
/** When true, hides the "Chat" title in the header. */
|
|
897
|
+
hideTitle?: boolean;
|
|
898
|
+
/** When true, hides the icon on the clear/new-chat button. */
|
|
899
|
+
clearButtonHideIcon?: boolean;
|
|
900
|
+
/** When true, hides the keyboard shortcut (⌘O) on the clear/new-chat button. */
|
|
901
|
+
clearButtonHideShortcut?: boolean;
|
|
902
|
+
/** Button variant for the clear/new-chat button. Default: "default". */
|
|
903
|
+
clearButtonVariant?: "default" | "secondary" | "ghost" | "outline";
|
|
904
|
+
/** When true, hides the "New Chat" / clear button entirely. */
|
|
905
|
+
hideClearButton?: boolean;
|
|
906
|
+
/** Active chat id — enables animated title reveal in the header. */
|
|
907
|
+
activeChatId?: string | null;
|
|
908
|
+
/** Title for the active chat thread. */
|
|
909
|
+
chatTitle?: string;
|
|
910
|
+
/** When true, shows Conv / Raw tabs in the header. */
|
|
911
|
+
showViewToggle?: boolean;
|
|
912
|
+
/** 0 = Conv, 1 = Raw */
|
|
913
|
+
viewIndex?: 0 | 1;
|
|
914
|
+
onViewIndexChange?: (index: number) => void;
|
|
915
|
+
/** Raise header above host chrome (cloud embed). */
|
|
916
|
+
elevatedHeader?: boolean;
|
|
917
|
+
}
|
|
918
|
+
declare function ChatHeader({ llmConfig, hasMessages, configDialogOpen, onConfigDialogOpenChange, onClearChat, tempProvider, tempModel, tempApiKey, tempBaseUrl, onProviderChange, onModelChange, onApiKeyChange, onBaseUrlChange, onSaveConfig, onClearConfig, hideConfigButton, hostedInspector, freeTierInfo, managedCloudInfo, useManagedCloud, onSaveManagedCloud, showClearButton, clearButtonLabel, hideTitle, clearButtonHideIcon, clearButtonHideShortcut, clearButtonVariant, hideClearButton, onCopyChat, onExportChat, activeChatId, chatTitle, showViewToggle, viewIndex, onViewIndexChange, elevatedHeader, }: ChatHeaderProps): react_jsx_runtime.JSX.Element;
|
|
919
|
+
|
|
920
|
+
/** Frosted pill for chat header controls — chat scrolls underneath the absolute header. */
|
|
921
|
+
declare const chatBarFrostedPill = "rounded-full bg-background/80 backdrop-blur-md supports-[backdrop-filter]:bg-background/60 dark:bg-zinc-950/75 dark:supports-[backdrop-filter]:bg-zinc-950/55";
|
|
922
|
+
/** Title pill: no extra padding so text stays aligned with other tab headers. */
|
|
923
|
+
declare const chatBarTitleFrostedClass: string;
|
|
924
|
+
declare const chatBarActionButtonClass: string;
|
|
925
|
+
|
|
926
|
+
interface PendingElicitationRequest {
|
|
927
|
+
id: string;
|
|
928
|
+
request: ElicitRequestFormParams | ElicitRequestURLParams;
|
|
929
|
+
timestamp: number;
|
|
930
|
+
serverName: string;
|
|
931
|
+
toolName?: string;
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
interface PromptResult {
|
|
935
|
+
promptName: string;
|
|
936
|
+
args: Record<string, unknown>;
|
|
937
|
+
result: GetPromptResult | {
|
|
938
|
+
error?: string;
|
|
939
|
+
isError?: boolean;
|
|
940
|
+
};
|
|
941
|
+
error?: string;
|
|
942
|
+
timestamp: number;
|
|
943
|
+
duration?: number;
|
|
944
|
+
}
|
|
945
|
+
interface UseMCPPromptsProps {
|
|
946
|
+
prompts: Prompt[];
|
|
947
|
+
callPrompt: (name: string, args?: Record<string, unknown>) => Promise<GetPromptResult>;
|
|
948
|
+
serverId: string;
|
|
949
|
+
}
|
|
950
|
+
/**
|
|
951
|
+
* Manages prompt selection, execution, and results for an MCP server.
|
|
952
|
+
* Provides filtered prompts, execution state, and result management.
|
|
953
|
+
*/
|
|
954
|
+
declare function useMCPPrompts({ prompts, callPrompt, serverId, }: UseMCPPromptsProps): {
|
|
955
|
+
filteredPrompts: {
|
|
956
|
+
name: string;
|
|
957
|
+
description?: string | undefined;
|
|
958
|
+
arguments?: {
|
|
959
|
+
name: string;
|
|
960
|
+
description?: string | undefined;
|
|
961
|
+
required?: boolean | undefined;
|
|
962
|
+
}[] | undefined;
|
|
963
|
+
_meta?: {
|
|
964
|
+
[x: string]: unknown;
|
|
965
|
+
} | undefined;
|
|
966
|
+
icons?: {
|
|
967
|
+
src: string;
|
|
968
|
+
mimeType?: string | undefined;
|
|
969
|
+
sizes?: string[] | undefined;
|
|
970
|
+
theme?: "dark" | "light" | undefined;
|
|
971
|
+
}[] | undefined;
|
|
972
|
+
title?: string | undefined;
|
|
973
|
+
}[];
|
|
974
|
+
selectedPrompt: {
|
|
975
|
+
name: string;
|
|
976
|
+
description?: string | undefined;
|
|
977
|
+
arguments?: {
|
|
978
|
+
name: string;
|
|
979
|
+
description?: string | undefined;
|
|
980
|
+
required?: boolean | undefined;
|
|
981
|
+
}[] | undefined;
|
|
982
|
+
_meta?: {
|
|
983
|
+
[x: string]: unknown;
|
|
984
|
+
} | undefined;
|
|
985
|
+
icons?: {
|
|
986
|
+
src: string;
|
|
987
|
+
mimeType?: string | undefined;
|
|
988
|
+
sizes?: string[] | undefined;
|
|
989
|
+
theme?: "dark" | "light" | undefined;
|
|
990
|
+
}[] | undefined;
|
|
991
|
+
title?: string | undefined;
|
|
992
|
+
} | null;
|
|
993
|
+
setSelectedPrompt: react.Dispatch<react.SetStateAction<{
|
|
994
|
+
name: string;
|
|
995
|
+
description?: string | undefined;
|
|
996
|
+
arguments?: {
|
|
997
|
+
name: string;
|
|
998
|
+
description?: string | undefined;
|
|
999
|
+
required?: boolean | undefined;
|
|
1000
|
+
}[] | undefined;
|
|
1001
|
+
_meta?: {
|
|
1002
|
+
[x: string]: unknown;
|
|
1003
|
+
} | undefined;
|
|
1004
|
+
icons?: {
|
|
1005
|
+
src: string;
|
|
1006
|
+
mimeType?: string | undefined;
|
|
1007
|
+
sizes?: string[] | undefined;
|
|
1008
|
+
theme?: "dark" | "light" | undefined;
|
|
1009
|
+
}[] | undefined;
|
|
1010
|
+
title?: string | undefined;
|
|
1011
|
+
} | null>>;
|
|
1012
|
+
results: PromptResult[];
|
|
1013
|
+
handleDeleteResult: (index: number) => void;
|
|
1014
|
+
promptArgs: Record<string, unknown>;
|
|
1015
|
+
setPromptArgs: react.Dispatch<react.SetStateAction<Record<string, unknown>>>;
|
|
1016
|
+
isExecuting: boolean;
|
|
1017
|
+
handlePromptSelect: (prompt: Prompt) => void;
|
|
1018
|
+
handleArgChange: (key: string, value: any) => void;
|
|
1019
|
+
executePrompt: (prompt: Prompt, args: Record<string, unknown>) => Promise<void>;
|
|
1020
|
+
executeSelectedPrompt: () => Promise<void>;
|
|
1021
|
+
searchQuery: string;
|
|
1022
|
+
setSearchQuery: react.Dispatch<react.SetStateAction<string>>;
|
|
1023
|
+
clearPromptResults: () => void;
|
|
1024
|
+
};
|
|
1025
|
+
|
|
1026
|
+
interface ToolInfo {
|
|
1027
|
+
name: string;
|
|
1028
|
+
description?: string;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
interface ChatInputAreaProps$1 {
|
|
1032
|
+
inputValue: string;
|
|
1033
|
+
isConnected: boolean;
|
|
1034
|
+
isLoading: boolean;
|
|
1035
|
+
textareaRef: react__default.RefObject<HTMLTextAreaElement | null>;
|
|
1036
|
+
llmConfig: LLMConfig | null;
|
|
1037
|
+
promptsDropdownOpen: boolean;
|
|
1038
|
+
promptFocusedIndex: number;
|
|
1039
|
+
prompts: Prompt[];
|
|
1040
|
+
selectedPrompt: Prompt | null;
|
|
1041
|
+
promptResults: PromptResult[];
|
|
1042
|
+
attachments: MessageAttachment[];
|
|
1043
|
+
tools?: ToolInfo[];
|
|
1044
|
+
disabledTools?: Set<string>;
|
|
1045
|
+
onDisabledToolsChange?: (disabledTools: Set<string>) => void;
|
|
1046
|
+
onInputChange: (value: string) => void;
|
|
1047
|
+
onKeyDown: (e: react__default.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
1048
|
+
onKeyUp: (e: react__default.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
1049
|
+
onClick: () => void;
|
|
1050
|
+
onSendMessage: () => void;
|
|
1051
|
+
onStopStreaming: () => void;
|
|
1052
|
+
onConfigDialogOpenChange: (open: boolean) => void;
|
|
1053
|
+
onPromptSelect: (prompt: Prompt) => void;
|
|
1054
|
+
onDeletePromptResult: (index: number) => void;
|
|
1055
|
+
onAttachmentAdd: (file: File) => void;
|
|
1056
|
+
onAttachmentRemove: (index: number) => void;
|
|
1057
|
+
/** When true, hides the model badge in the input toolbar. */
|
|
1058
|
+
hideModelBadge?: boolean;
|
|
1059
|
+
/**
|
|
1060
|
+
* When set (hosted-managed mode), keeps the model badge visible for upgrade
|
|
1061
|
+
* even when `hideModelBadge` is true.
|
|
1062
|
+
*/
|
|
1063
|
+
freeTierInfo?: {
|
|
1064
|
+
onLoginClick: () => void;
|
|
1065
|
+
};
|
|
1066
|
+
managedCloudInfo?: {
|
|
1067
|
+
models: CloudModel[];
|
|
1068
|
+
selectedModelId: string;
|
|
1069
|
+
onModelChange: (modelId: string) => void;
|
|
1070
|
+
isLoading?: boolean;
|
|
1071
|
+
};
|
|
1072
|
+
modelBadgeMode?: "managed" | "byok";
|
|
1073
|
+
modelDisplayName?: string;
|
|
1074
|
+
/** Optional followup suggestions rendered above the chat input. */
|
|
1075
|
+
followups?: string[];
|
|
1076
|
+
/** Called when a followup suggestion is selected. */
|
|
1077
|
+
onFollowupSelect?: (followup: string) => void;
|
|
1078
|
+
/** Pending MCP elicitation requests — rendered floating above the composer. */
|
|
1079
|
+
pendingElicitationRequests?: PendingElicitationRequest[];
|
|
1080
|
+
onApproveElicitation?: (requestId: string, result: ElicitResult) => void;
|
|
1081
|
+
onRejectElicitation?: (requestId: string, error?: string) => void;
|
|
1082
|
+
/** Pluggable system prompt source (localStorage or host API). */
|
|
1083
|
+
systemPromptProvider?: ChatSystemPromptProvider;
|
|
1084
|
+
}
|
|
1085
|
+
declare function ChatInputArea({ inputValue, isConnected, isLoading, textareaRef, llmConfig, promptsDropdownOpen, promptFocusedIndex, prompts, selectedPrompt, promptResults, attachments, tools, disabledTools, onDisabledToolsChange, onInputChange, onKeyDown, onKeyUp, onClick, onSendMessage, onStopStreaming, onConfigDialogOpenChange, onPromptSelect, onDeletePromptResult, onAttachmentAdd, onAttachmentRemove, hideModelBadge, freeTierInfo, managedCloudInfo, modelBadgeMode, modelDisplayName, followups, onFollowupSelect, pendingElicitationRequests, onApproveElicitation, onRejectElicitation, systemPromptProvider, }: ChatInputAreaProps$1): react_jsx_runtime.JSX.Element;
|
|
1086
|
+
|
|
1087
|
+
type ChatInputAreaProps = react__default.ComponentProps<typeof ChatInputArea>;
|
|
1088
|
+
interface ChatLandingFormProps extends ChatInputAreaProps {
|
|
1089
|
+
serverDisplayName: string;
|
|
1090
|
+
/** Inline notice rendered above the composer (e.g. managed chat errors). */
|
|
1091
|
+
composerNotice?: ReactNode;
|
|
1092
|
+
/** Optional quick question suggestions displayed below the landing input. */
|
|
1093
|
+
quickQuestions?: string[];
|
|
1094
|
+
/** Called when a quick question is selected. */
|
|
1095
|
+
onQuickQuestionSelect?: (question: string) => void;
|
|
1096
|
+
}
|
|
1097
|
+
declare function ChatLandingForm({ serverDisplayName, composerNotice, quickQuestions, onQuickQuestionSelect, ...inputAreaProps }: ChatLandingFormProps): react_jsx_runtime.JSX.Element;
|
|
1098
|
+
|
|
1099
|
+
interface ConfigurationDialogProps {
|
|
1100
|
+
open: boolean;
|
|
1101
|
+
onOpenChange: (open: boolean) => void;
|
|
1102
|
+
tempProvider: ProviderName;
|
|
1103
|
+
tempModel: string;
|
|
1104
|
+
tempApiKey: string;
|
|
1105
|
+
tempBaseUrl: string;
|
|
1106
|
+
onProviderChange: (provider: ProviderName) => void;
|
|
1107
|
+
onModelChange: (model: string) => void;
|
|
1108
|
+
onApiKeyChange: (apiKey: string) => void;
|
|
1109
|
+
onBaseUrlChange: (baseUrl: string) => void;
|
|
1110
|
+
onSave: () => void;
|
|
1111
|
+
onClear?: () => void;
|
|
1112
|
+
showClearButton?: boolean;
|
|
1113
|
+
buttonLabel?: string;
|
|
1114
|
+
/** Hosted inspector — use unified Configure Chat layout. */
|
|
1115
|
+
hostedInspector?: boolean;
|
|
1116
|
+
/**
|
|
1117
|
+
* When present, the dialog renders a mesh-gradient sign-in card above the
|
|
1118
|
+
* provider/api-key form. Used in hosted inspector mode where the default
|
|
1119
|
+
* LLM is provided server-side.
|
|
1120
|
+
*/
|
|
1121
|
+
freeTierInfo?: {
|
|
1122
|
+
onLoginClick: () => void;
|
|
1123
|
+
};
|
|
1124
|
+
/** Authenticated hosted tier — Manufact cloud models + source tabs. */
|
|
1125
|
+
managedCloudInfo?: {
|
|
1126
|
+
models: CloudModel[];
|
|
1127
|
+
selectedModelId: string;
|
|
1128
|
+
onModelChange: (modelId: string) => void;
|
|
1129
|
+
isLoading?: boolean;
|
|
1130
|
+
};
|
|
1131
|
+
/** When true, chat uses Manufact cloud; drives the default config tab. */
|
|
1132
|
+
useManagedCloud?: boolean;
|
|
1133
|
+
/** Persist Manufact cloud selection and switch chat to managed mode. */
|
|
1134
|
+
onSaveManagedCloud?: () => void;
|
|
1135
|
+
}
|
|
1136
|
+
declare function ConfigurationDialog({ open, onOpenChange, tempProvider, tempModel, tempApiKey, tempBaseUrl, onProviderChange, onModelChange, onApiKeyChange, onBaseUrlChange, onSave, onClear, showClearButton, buttonLabel: _buttonLabel, hostedInspector, freeTierInfo, managedCloudInfo, useManagedCloud, onSaveManagedCloud, }: ConfigurationDialogProps): react_jsx_runtime.JSX.Element;
|
|
1137
|
+
|
|
1138
|
+
interface ConfigureEmptyStateProps {
|
|
1139
|
+
onConfigureClick: () => void;
|
|
1140
|
+
}
|
|
1141
|
+
declare function ConfigureEmptyState({ onConfigureClick, }: ConfigureEmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
1142
|
+
|
|
1143
|
+
declare const DEFAULT_CHAT_SYSTEM_PROMPT = "You are a helpful assistant with access to MCP tools. Help users interact with the MCP server.";
|
|
1144
|
+
|
|
1145
|
+
declare function getSystemPromptStorageKey(serverId: string): string;
|
|
1146
|
+
declare function readStoredSystemPrompt(serverId: string): string | null;
|
|
1147
|
+
declare function writeStoredSystemPrompt(serverId: string, prompt: string): void;
|
|
1148
|
+
declare function resolveSystemPrompt(stored: string | null | undefined): string;
|
|
1149
|
+
|
|
1150
|
+
type ManagedChatNotice = {
|
|
1151
|
+
kind: "cloud_unavailable";
|
|
1152
|
+
} | {
|
|
1153
|
+
kind: "login_required";
|
|
1154
|
+
loginUrl: string;
|
|
1155
|
+
} | {
|
|
1156
|
+
kind: "credits_exhausted";
|
|
1157
|
+
billingUrl?: string;
|
|
1158
|
+
message?: string;
|
|
1159
|
+
};
|
|
1160
|
+
|
|
1161
|
+
type MCPConnection = McpServer;
|
|
1162
|
+
interface UseChatMessagesClientSideProps {
|
|
1163
|
+
connection: MCPConnection;
|
|
1164
|
+
llmConfig: LLMConfig | null;
|
|
1165
|
+
isConnected: boolean;
|
|
1166
|
+
readResource?: (uri: string) => Promise<any>;
|
|
1167
|
+
widgetModelContexts?: Map<string, WidgetModelContext | undefined>;
|
|
1168
|
+
disabledTools?: Set<string>;
|
|
1169
|
+
appToolConnections?: McpConnectionLike[];
|
|
1170
|
+
initialMessages?: Message$1[];
|
|
1171
|
+
systemPrompt?: string;
|
|
1172
|
+
}
|
|
1173
|
+
declare function useChatMessagesClientSide({ connection, llmConfig, isConnected, readResource, widgetModelContexts, disabledTools, appToolConnections, initialMessages, systemPrompt, }: UseChatMessagesClientSideProps): {
|
|
1174
|
+
messages: Message$1[];
|
|
1175
|
+
isLoading: boolean;
|
|
1176
|
+
attachments: MessageAttachment[];
|
|
1177
|
+
managedChatNotice: ManagedChatNotice | null;
|
|
1178
|
+
sendMessage: (userInput: string, promptResults: PromptResult[], extraAttachments?: MessageAttachment[], options?: SendMessageOptions) => Promise<void>;
|
|
1179
|
+
clearMessages: () => void;
|
|
1180
|
+
clearManagedChatNotice: () => void;
|
|
1181
|
+
showManagedChatNotice: (notice: ManagedChatNotice) => void;
|
|
1182
|
+
setMessages: react.Dispatch<react.SetStateAction<Message$1[]>>;
|
|
1183
|
+
stop: () => void;
|
|
1184
|
+
addAttachment: (file: File) => Promise<void>;
|
|
1185
|
+
removeAttachment: (index: number) => void;
|
|
1186
|
+
clearAttachments: () => void;
|
|
1187
|
+
clearTrace: () => void;
|
|
1188
|
+
traceEvents: InspectorTraceEvent[];
|
|
1189
|
+
tokenUsage: InspectorTokenUsage | undefined;
|
|
1190
|
+
};
|
|
1191
|
+
|
|
1192
|
+
interface UseChatMessagesProps {
|
|
1193
|
+
mcpServerUrl: string;
|
|
1194
|
+
llmConfig: LLMConfig | null;
|
|
1195
|
+
authConfig: AuthConfig | null;
|
|
1196
|
+
/** Live OAuth tokens from the active MCP connection (preferred over saved authConfig). */
|
|
1197
|
+
mcpAuthTokens?: AuthConfig["oauthTokens"];
|
|
1198
|
+
isConnected: boolean;
|
|
1199
|
+
/** Custom API endpoint URL for chat streaming. Defaults to "/inspector/api/chat/stream". */
|
|
1200
|
+
chatApiUrl?: string;
|
|
1201
|
+
/** When chatApiUrl is not yet available, called before sending to resolve the URL. Useful for background initialization. */
|
|
1202
|
+
waitForChatApiUrl?: () => Promise<string | undefined>;
|
|
1203
|
+
/** Active widget model contexts to inject into the LLM conversation */
|
|
1204
|
+
widgetModelContexts?: Map<string, WidgetModelContext | undefined>;
|
|
1205
|
+
/** Pre-populate the chat with messages from a previous session (e.g. when restoring history). */
|
|
1206
|
+
initialMessages?: Message$1[];
|
|
1207
|
+
/** Tool names the user has disabled via the tool selector. Sent to the server so it can exclude them. */
|
|
1208
|
+
disabledTools?: Set<string>;
|
|
1209
|
+
/**
|
|
1210
|
+
* Wire protocol used by the streaming endpoint.
|
|
1211
|
+
* - `"sse"` (default): Inspector SSE protocol (`data: {"type":"text","content":"..."}\n\n`)
|
|
1212
|
+
* - `"data-stream"`: Vercel AI SDK data-stream protocol (`0:"text"`, `9:{...}`, etc.)
|
|
1213
|
+
*/
|
|
1214
|
+
streamProtocol?: StreamProtocol;
|
|
1215
|
+
/** Credentials policy for the fetch request (e.g. `"include"` for cross-origin cookie auth). */
|
|
1216
|
+
credentials?: RequestCredentials;
|
|
1217
|
+
/** Extra headers to send with every streaming request. */
|
|
1218
|
+
extraHeaders?: Record<string, string>;
|
|
1219
|
+
/**
|
|
1220
|
+
* Custom body builder. Receives the serialised messages array and returns the
|
|
1221
|
+
* object that will be JSON-stringified as the request body.
|
|
1222
|
+
* When omitted, the default body includes `mcpServerUrl`, `llmConfig`,
|
|
1223
|
+
* `authConfig`, and `messages`.
|
|
1224
|
+
* The second argument contains the effective disabled tools and serialized
|
|
1225
|
+
* scoped widget context.
|
|
1226
|
+
*/
|
|
1227
|
+
body?: ChatBodyBuilder;
|
|
1228
|
+
}
|
|
1229
|
+
declare function useChatMessages({ mcpServerUrl, llmConfig, authConfig, mcpAuthTokens, isConnected, chatApiUrl, waitForChatApiUrl, widgetModelContexts, initialMessages, disabledTools, streamProtocol, credentials, extraHeaders, body: bodyBuilder, }: UseChatMessagesProps): {
|
|
1230
|
+
messages: Message$1[];
|
|
1231
|
+
isLoading: boolean;
|
|
1232
|
+
attachments: MessageAttachment[];
|
|
1233
|
+
managedChatNotice: ManagedChatNotice | null;
|
|
1234
|
+
mcpServerAuthRequired: {
|
|
1235
|
+
mcpServerUrl: string;
|
|
1236
|
+
message?: string;
|
|
1237
|
+
} | null;
|
|
1238
|
+
sendMessage: (userInput: string, promptResults: PromptResult[], extraAttachments?: MessageAttachment[], options?: SendMessageOptions) => Promise<void>;
|
|
1239
|
+
clearMessages: () => void;
|
|
1240
|
+
clearManagedChatNotice: () => void;
|
|
1241
|
+
showManagedChatNotice: (notice: ManagedChatNotice) => void;
|
|
1242
|
+
clearMcpServerAuthRequired: () => void;
|
|
1243
|
+
setMessages: react.Dispatch<react.SetStateAction<Message$1[]>>;
|
|
1244
|
+
stop: () => void;
|
|
1245
|
+
addAttachment: (file: File) => Promise<void>;
|
|
1246
|
+
removeAttachment: (index: number) => void;
|
|
1247
|
+
clearAttachments: () => void;
|
|
1248
|
+
clearTrace: () => void;
|
|
1249
|
+
traceEvents: InspectorTraceEvent[];
|
|
1250
|
+
tokenUsage: InspectorTokenUsage | undefined;
|
|
1251
|
+
};
|
|
1252
|
+
|
|
1253
|
+
interface UseConfigProps {
|
|
1254
|
+
mcpServerUrl: string;
|
|
1255
|
+
}
|
|
1256
|
+
declare function useConfig({ mcpServerUrl }: UseConfigProps): {
|
|
1257
|
+
llmConfig: LLMConfig | null;
|
|
1258
|
+
authConfig: AuthConfig | null;
|
|
1259
|
+
configDialogOpen: boolean;
|
|
1260
|
+
setConfigDialogOpen: react.Dispatch<react.SetStateAction<boolean>>;
|
|
1261
|
+
tempProvider: ProviderName;
|
|
1262
|
+
setTempProvider: react.Dispatch<react.SetStateAction<ProviderName>>;
|
|
1263
|
+
tempApiKey: string;
|
|
1264
|
+
setTempApiKey: react.Dispatch<react.SetStateAction<string>>;
|
|
1265
|
+
tempModel: string;
|
|
1266
|
+
setTempModel: react.Dispatch<react.SetStateAction<string>>;
|
|
1267
|
+
tempBaseUrl: string;
|
|
1268
|
+
setTempBaseUrl: react.Dispatch<react.SetStateAction<string>>;
|
|
1269
|
+
tempAuthType: "none" | "basic" | "bearer" | "oauth";
|
|
1270
|
+
saveLLMConfig: () => boolean;
|
|
1271
|
+
clearConfig: () => void;
|
|
1272
|
+
};
|
|
1273
|
+
|
|
1274
|
+
interface ChatHistoryPanelProps {
|
|
1275
|
+
provider: ChatStorageProvider;
|
|
1276
|
+
open: boolean;
|
|
1277
|
+
onOpenChange: (open: boolean) => void;
|
|
1278
|
+
currentChatId?: string;
|
|
1279
|
+
container?: HTMLElement | null;
|
|
1280
|
+
agentId?: string;
|
|
1281
|
+
/** When agent relation is denied (e.g. server chat agents), use this for display instead of "Unknown Agent" */
|
|
1282
|
+
agentDisplayNameFallback?: string;
|
|
1283
|
+
/** Called on chat selection; panel closes when provided */
|
|
1284
|
+
onSelectChat?: (chatId: string) => void;
|
|
1285
|
+
/** "drawer" = Sheet overlay (default). "inline" = content only, no overlay; parent controls layout */
|
|
1286
|
+
variant?: "drawer" | "inline";
|
|
1287
|
+
/** Optional class for the inline panel container */
|
|
1288
|
+
containerClassName?: string;
|
|
1289
|
+
/** When this value changes, triggers an immediate refetch of the chat list */
|
|
1290
|
+
refetchKey?: number;
|
|
1291
|
+
/** Poll interval in ms when set (e.g. server chat) */
|
|
1292
|
+
refetchInterval?: number | false;
|
|
1293
|
+
/** Called when the currently active chat is deleted */
|
|
1294
|
+
onCurrentChatDeleted?: () => void;
|
|
1295
|
+
onDeleteSuccess?: () => void;
|
|
1296
|
+
onDeleteError?: (error: unknown) => void;
|
|
1297
|
+
}
|
|
1298
|
+
declare function ChatHistoryPanel({ provider, open, onOpenChange, currentChatId, container, agentId, agentDisplayNameFallback, onSelectChat, variant, containerClassName, refetchKey, refetchInterval, onCurrentChatDeleted, onDeleteSuccess, onDeleteError, }: ChatHistoryPanelProps): react_jsx_runtime.JSX.Element;
|
|
1299
|
+
|
|
1300
|
+
declare function ChatHistoryHeader({ count }: {
|
|
1301
|
+
count: number;
|
|
1302
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1303
|
+
|
|
1304
|
+
/** Collapse control on the drawer edge — only shown when history is open. */
|
|
1305
|
+
declare function ChatHistoryRail({ onCollapse }: {
|
|
1306
|
+
onCollapse: () => void;
|
|
1307
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1308
|
+
|
|
1309
|
+
interface ChatListProps {
|
|
1310
|
+
chats: ChatSession[];
|
|
1311
|
+
onDelete: (id: string) => void;
|
|
1312
|
+
/** When provided, render buttons that call this instead of navigation links */
|
|
1313
|
+
onSelect?: (chatId: string) => void;
|
|
1314
|
+
/** When true, align item content with header (reduced horizontal padding) */
|
|
1315
|
+
compact?: boolean;
|
|
1316
|
+
/** When true, hide the agent name line (e.g. for MCP Server Chat where it's not an agent) */
|
|
1317
|
+
hideAgentName?: boolean;
|
|
1318
|
+
/** When true and chats is empty, show skeleton placeholders instead of empty state */
|
|
1319
|
+
isLoading?: boolean;
|
|
1320
|
+
/** Highlight the active chat */
|
|
1321
|
+
currentChatId?: string;
|
|
1322
|
+
}
|
|
1323
|
+
declare function ChatList({ chats, onDelete: _onDelete, onSelect, compact, hideAgentName, isLoading, currentChatId, }: ChatListProps): react_jsx_runtime.JSX.Element;
|
|
1324
|
+
|
|
1325
|
+
interface ChatTitleRevealProps {
|
|
1326
|
+
chatId: string;
|
|
1327
|
+
title: string;
|
|
1328
|
+
className?: string;
|
|
1329
|
+
onRevealComplete?: () => void;
|
|
1330
|
+
}
|
|
1331
|
+
/** Reveals a generated title over the placeholder with blur-fade typing. */
|
|
1332
|
+
declare function ChatTitleReveal({ chatId, title, className, onRevealComplete, }: ChatTitleRevealProps): react_jsx_runtime.JSX.Element;
|
|
1333
|
+
|
|
1334
|
+
declare class LocalChatStorageProvider implements ChatStorageProvider {
|
|
1335
|
+
private saveTimers;
|
|
1336
|
+
listChats(params: ListChatsParams): Promise<{
|
|
1337
|
+
items: ChatSession[];
|
|
1338
|
+
total: number;
|
|
1339
|
+
}>;
|
|
1340
|
+
getMessages(chatId: string): Promise<Message$1[]>;
|
|
1341
|
+
createChat(params: {
|
|
1342
|
+
agentId: string;
|
|
1343
|
+
title?: string;
|
|
1344
|
+
agentName?: string;
|
|
1345
|
+
}): Promise<ChatSession>;
|
|
1346
|
+
updateChat(chatId: string, patch: {
|
|
1347
|
+
title?: string;
|
|
1348
|
+
}): Promise<ChatSession>;
|
|
1349
|
+
deleteChat(chatId: string): Promise<void>;
|
|
1350
|
+
saveMessages(chatId: string, messages: Message$1[]): Promise<void>;
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
/** Shape of rows from GET /api/v1/chats/:id/events (OpenAPI). */
|
|
1354
|
+
type ChatEventRowForMessages = {
|
|
1355
|
+
id: string;
|
|
1356
|
+
type: string;
|
|
1357
|
+
eventData: unknown;
|
|
1358
|
+
createdAt: string | Date;
|
|
1359
|
+
};
|
|
1360
|
+
/**
|
|
1361
|
+
* Convert persisted chat events → inspector `Message[]` (same contract as the backend stream).
|
|
1362
|
+
*/
|
|
1363
|
+
declare function chatEventsToInspectorMessages(events: ChatEventRowForMessages[]): Message$1[];
|
|
1364
|
+
|
|
1365
|
+
interface UseChatHistoryOptions {
|
|
1366
|
+
provider: ChatStorageProvider;
|
|
1367
|
+
enabled?: boolean;
|
|
1368
|
+
agentId?: string;
|
|
1369
|
+
refetchKey?: number;
|
|
1370
|
+
refetchInterval?: number | false;
|
|
1371
|
+
}
|
|
1372
|
+
declare function useChatHistory({ provider, enabled, agentId, refetchKey, refetchInterval, }: UseChatHistoryOptions): {
|
|
1373
|
+
chats: ChatSession[];
|
|
1374
|
+
total: number;
|
|
1375
|
+
isLoading: boolean;
|
|
1376
|
+
error: Error | null;
|
|
1377
|
+
hasNextPage: boolean;
|
|
1378
|
+
loadMore: () => void;
|
|
1379
|
+
refetch: () => void;
|
|
1380
|
+
deleteChat: (chatId: string) => Promise<void>;
|
|
1381
|
+
};
|
|
1382
|
+
|
|
1383
|
+
/** Placeholder title for new chats; must match storage default and cloud DB default. */
|
|
1384
|
+
declare const CHAT_TITLE_PLACEHOLDER = "New Chat";
|
|
1385
|
+
/** Short title when the first message has no concrete topic yet. */
|
|
1386
|
+
declare const CHAT_TITLE_SIMPLE = "Chat";
|
|
1387
|
+
declare function isPlaceholderTitle(title: string): boolean;
|
|
1388
|
+
declare function firstUserMessageFromMessages(messages: Message$1[]): string | null;
|
|
1389
|
+
/** Generate a concise title from the first user message using the connected LLM. */
|
|
1390
|
+
declare function generateChatTitleWithLlm(llmConfig: LLMConfig, message: string, signal?: AbortSignal): Promise<string | null>;
|
|
1391
|
+
|
|
1392
|
+
type UseChatTitleGenerationParams = {
|
|
1393
|
+
activeChatId: string | null;
|
|
1394
|
+
storage: ChatStorageProvider | null;
|
|
1395
|
+
messages: Message$1[];
|
|
1396
|
+
isLoading: boolean;
|
|
1397
|
+
effectiveClientSide: boolean;
|
|
1398
|
+
llmConfig: LLMConfig | null;
|
|
1399
|
+
activeChatTitle?: string;
|
|
1400
|
+
titleGenerationReady?: boolean;
|
|
1401
|
+
onTitleGenerated?: (chatId: string, title: string) => void;
|
|
1402
|
+
onHistoryRefetch?: () => void;
|
|
1403
|
+
};
|
|
1404
|
+
declare function useChatTitleGeneration({ activeChatId, storage, messages, isLoading, effectiveClientSide, llmConfig, activeChatTitle, titleGenerationReady, onTitleGenerated, onHistoryRefetch, }: UseChatTitleGenerationParams): void;
|
|
1405
|
+
|
|
1406
|
+
export { AddToClientDropdown, type AuthConfig, CHAT_TITLE_PLACEHOLDER, CHAT_TITLE_SIMPLE, type ChatBodyBuilder, type ChatBodyContext, type ChatEventRowForMessages, ChatHeader, ChatHistoryHeader, ChatHistoryPanel, ChatHistoryRail, ChatInputArea, ChatLandingForm, ChatList, type ChatSerializedMessage, type ChatSession, type ChatStorageProvider, type ChatSystemPromptProvider, ChatTab, type ChatTabProps, ChatTitleReveal, type ChatView, ConfigurationDialog, ConfigureEmptyState, DEFAULT_CHAT_SYSTEM_PROMPT, type EmbeddedConfig, InspectorProvider, type InspectorTokenUsage, type InspectorTraceEvent, type InspectorTraceSpan, type InspectorTraceState, type LLMConfig, type ListChatsParams, LocalChatStorageProvider, type MCPConfig, type MCPServerConfig, type Message$1 as Message, type MessageAttachment, MessageList, type PromptResult, PromptsTab, type PromptsTabRef, ResourcesTab, type ResourcesTabRef, type StreamProtocol, type TabType, ThemeProvider, ToolInputForm, type ToolResult, ToolResultDisplay, ToolResultRenderer, ToolsTab, type ToolsTabRef, WidgetDebugProvider, chatBarActionButtonClass, chatBarFrostedPill, chatBarTitleFrostedClass, chatEventsToInspectorMessages, downloadMcpbFile, firstUserMessageFromMessages, generateChatTitleWithLlm, generateClaudeCodeCommand, generateCodexConfig, generateCursorDeepLink, generateGeminiCLICommand, generateMcpbConfig, generatePythonSDKCode, generateTypeScriptSDKCode, generateVSCodeDeepLink, generateVSCodeInsidersDeepLink, getEnvVarInstructions, getSystemPromptStorageKey, isPlaceholderTitle, readStoredSystemPrompt, resolveSystemPrompt, useChatHistory, useChatMessages, useChatMessagesClientSide, useChatTitleGeneration, useConfig, useInspector, useMCPPrompts, writeStoredSystemPrompt };
|