@mcp-use/inspector 20.0.0-beta.17 → 20.0.0-beta.18
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 +1 -1
- 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 +14 -1446
- package/dist/client/index.d.ts +1399 -50
- package/dist/client/index.js +170 -24320
- package/dist/server/index.d.ts +79 -6
- package/dist/server/index.js +99 -18
- package/package.json +61 -37
- package/dist/app/inspector.css +0 -2
- package/dist/app/inspector.js +0 -92352
- 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 -48
- 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/partialToolArgs.d.ts +0 -10
- package/dist/client/components/chat/partialToolArgs.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 -76
- 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/mcp-apps/McpAppsViewPanel.d.ts +0 -29
- package/dist/client/components/mcp-apps/McpAppsViewPanel.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 -25
- 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-animation-pause.d.ts +0 -14
- package/dist/client/components/ui/mesh-animation-pause.d.ts.map +0 -1
- package/dist/client/components/ui/mesh-gradient-colors.d.ts +0 -6
- package/dist/client/components/ui/mesh-gradient-colors.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 -111
- 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 -14
- 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 -19
- package/dist/client/utils/servers.d.ts.map +0 -1
- package/dist/server/chunk-2K7OKCVV.js +0 -199
- package/dist/server/chunk-EKD2XITW.js +0 -44
- package/dist/server/chunk-EPPZCSJQ.js +0 -199
- package/dist/server/chunk-IKTZUWSX.js +0 -0
- package/dist/server/chunk-JWDVSQED.js +0 -156
- package/dist/server/chunk-KD7K27XK.js +0 -77
- package/dist/server/chunk-PKBMQBKP.js +0 -7
- package/dist/server/chunk-PZF2PUDE.js +0 -58
- package/dist/server/chunk-RFJAZOK7.js +0 -173
- package/dist/server/chunk-RKFQG67Z.js +0 -38
- package/dist/server/chunk-V5A5XLFJ.js +0 -762
- package/dist/server/chunk-WFT4JHYI.js +0 -24
- package/dist/server/cli.d.ts +0 -3
- package/dist/server/cli.d.ts.map +0 -1
- package/dist/server/cli.js +0 -136
- 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/index.d.ts.map +0 -1
- package/dist/server/inspector-shell.d.ts +0 -20
- package/dist/server/inspector-shell.d.ts.map +0 -1
- package/dist/server/inspector-shell.js +0 -10
- package/dist/server/middleware.d.ts +0 -65
- package/dist/server/middleware.d.ts.map +0 -1
- package/dist/server/middleware.js +0 -15
- 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 -28
- 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/index-Dj_E94k4.css +0 -1
- package/dist/web/assets/index-O3gsi3le.js +0 -643
- 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 -81
- 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
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
registerInspectorStaticAssets
|
|
3
|
-
} from "./chunk-PZF2PUDE.js";
|
|
4
|
-
import {
|
|
5
|
-
getInspectorVersion
|
|
6
|
-
} from "./chunk-RFJAZOK7.js";
|
|
7
|
-
import {
|
|
8
|
-
renderInspectorFaviconLinks
|
|
9
|
-
} from "./chunk-WFT4JHYI.js";
|
|
10
|
-
|
|
11
|
-
// src/server/inspector-shell.ts
|
|
12
|
-
var INSPECTOR_VERSION = getInspectorVersion();
|
|
13
|
-
var OAUTH_POPUP_CLOSED_HTML = `<!doctype html>
|
|
14
|
-
<html lang="en"><head><meta charset="utf-8"><title>Signed in</title><meta name="robots" content="noindex"><style>html,body{margin:0;height:100%;display:flex;align-items:center;justify-content:center;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#4b5563;background:#fff}</style></head>
|
|
15
|
-
<body><div>Signed in. You can close this window.</div>
|
|
16
|
-
<script>try{if(window.opener&&!window.opener.closed)window.opener.postMessage({type:"manufact:oauth-complete"},"*")}catch(e){}try{window.close()}catch(e){}</script>
|
|
17
|
-
</body></html>`;
|
|
18
|
-
function generateInspectorShellHtml(config, basePath, assets) {
|
|
19
|
-
const scripts = [];
|
|
20
|
-
if (config?.basePath !== void 0) {
|
|
21
|
-
scripts.push(
|
|
22
|
-
`<script>window.__MCP_BASE_PATH__ = ${JSON.stringify(config.basePath)};</script>`
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
if (config?.devMode) {
|
|
26
|
-
scripts.push(`<script>window.__MCP_DEV_MODE__ = true;</script>`);
|
|
27
|
-
}
|
|
28
|
-
if (config?.sandboxOrigin) {
|
|
29
|
-
scripts.push(
|
|
30
|
-
`<script>window.__MCP_SANDBOX_ORIGIN__ = ${JSON.stringify(config.sandboxOrigin)};</script>`
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
if (config?.proxyUrl !== void 0) {
|
|
34
|
-
scripts.push(
|
|
35
|
-
`<script>window.__MCP_PROXY_URL__ = ${JSON.stringify(config.proxyUrl)};</script>`
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
if (config?.inspectorMode) {
|
|
39
|
-
scripts.push(
|
|
40
|
-
`<script>window.__MCP_INSPECTOR_MODE__ = ${JSON.stringify(config.inspectorMode)};</script>`
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
if (config?.manufactChatUrl) {
|
|
44
|
-
scripts.push(
|
|
45
|
-
`<script>window.__MANUFACT_CHAT_URL__ = ${JSON.stringify(config.manufactChatUrl)};</script>`
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
if (config?.disableTelemetry) {
|
|
49
|
-
scripts.push(
|
|
50
|
-
`<script>window.__MCP_USE_ANONYMIZED_TELEMETRY__ = false;try{localStorage.setItem("MCP_USE_ANONYMIZED_TELEMETRY","false");}catch(e){}</script>`
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
if (process.env.MCP_USE_DEV_CLI === "1") {
|
|
54
|
-
scripts.push(`<script>window.__MCP_DEV_CLI__ = true;</script>`);
|
|
55
|
-
}
|
|
56
|
-
const runtimeScripts = scripts.join("\n ");
|
|
57
|
-
return `<!doctype html>
|
|
58
|
-
<html lang="en">
|
|
59
|
-
<head>
|
|
60
|
-
<meta charset="UTF-8" />
|
|
61
|
-
${renderInspectorFaviconLinks(`${basePath}/inspector/assets`)}
|
|
62
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
63
|
-
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
64
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
65
|
-
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
66
|
-
<link rel="stylesheet" href="${assets.cssUrl}" />
|
|
67
|
-
<title>Inspector | mcp-use</title>
|
|
68
|
-
<meta name="description" content="Free, open-source MCP Inspector by mcp-use. Connect to any MCP server, test tools, prompts, and resources, inspect RPC logs, and debug MCP apps \u2014 all in your browser." />
|
|
69
|
-
<style>
|
|
70
|
-
:root { color-scheme: light dark; }
|
|
71
|
-
html, body { height: 100%; margin: 0; background-color: #f3f3f3; }
|
|
72
|
-
#root { height: 100%; }
|
|
73
|
-
.mcp-boot {
|
|
74
|
-
display: flex;
|
|
75
|
-
height: 100%;
|
|
76
|
-
align-items: center;
|
|
77
|
-
justify-content: center;
|
|
78
|
-
background-color: #f3f3f3;
|
|
79
|
-
}
|
|
80
|
-
.mcp-boot-inner {
|
|
81
|
-
display: flex;
|
|
82
|
-
flex-direction: column;
|
|
83
|
-
align-items: center;
|
|
84
|
-
gap: 16px;
|
|
85
|
-
}
|
|
86
|
-
.mcp-boot-spinner {
|
|
87
|
-
width: 32px;
|
|
88
|
-
height: 32px;
|
|
89
|
-
color: #52525b;
|
|
90
|
-
animation: mcp-boot-spin 1s linear infinite;
|
|
91
|
-
}
|
|
92
|
-
.mcp-boot-label {
|
|
93
|
-
margin: 0;
|
|
94
|
-
font-family: Ubuntu, sans-serif;
|
|
95
|
-
font-size: 0.875rem;
|
|
96
|
-
line-height: 1.25rem;
|
|
97
|
-
color: #52525b;
|
|
98
|
-
}
|
|
99
|
-
@keyframes mcp-boot-spin {
|
|
100
|
-
to { transform: rotate(360deg); }
|
|
101
|
-
}
|
|
102
|
-
@media (prefers-color-scheme: dark) {
|
|
103
|
-
html, body { background-color: #000; }
|
|
104
|
-
.mcp-boot { background-color: #000; }
|
|
105
|
-
.mcp-boot-spinner, .mcp-boot-label { color: #a1a1aa; }
|
|
106
|
-
}
|
|
107
|
-
</style>
|
|
108
|
-
<script>window.__INSPECTOR_VERSION__ = ${JSON.stringify(INSPECTOR_VERSION)};</script>
|
|
109
|
-
${runtimeScripts}
|
|
110
|
-
</head>
|
|
111
|
-
<body>
|
|
112
|
-
<script>
|
|
113
|
-
if (typeof window !== "undefined" && typeof window.process === "undefined") {
|
|
114
|
-
window.process = {
|
|
115
|
-
env: {},
|
|
116
|
-
platform: "browser",
|
|
117
|
-
browser: true,
|
|
118
|
-
version: "v18.0.0",
|
|
119
|
-
versions: { node: "18.0.0" },
|
|
120
|
-
cwd: () => "/",
|
|
121
|
-
nextTick: (fn, ...args) => queueMicrotask(() => fn(...args)),
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
</script>
|
|
125
|
-
<div id="root">
|
|
126
|
-
<div class="mcp-boot">
|
|
127
|
-
<div class="mcp-boot-inner">
|
|
128
|
-
<svg
|
|
129
|
-
class="mcp-boot-spinner"
|
|
130
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
131
|
-
viewBox="0 0 24 24"
|
|
132
|
-
fill="none"
|
|
133
|
-
stroke="currentColor"
|
|
134
|
-
stroke-width="2"
|
|
135
|
-
stroke-linecap="round"
|
|
136
|
-
stroke-linejoin="round"
|
|
137
|
-
role="status"
|
|
138
|
-
aria-label="Loading"
|
|
139
|
-
>
|
|
140
|
-
<path d="M21 12a9 9 0 1 1-6.219-8.56" />
|
|
141
|
-
</svg>
|
|
142
|
-
<p class="mcp-boot-label">Connecting to MCP server...</p>
|
|
143
|
-
</div>
|
|
144
|
-
</div>
|
|
145
|
-
</div>
|
|
146
|
-
<script type="module" src="${assets.jsUrl}"></script>
|
|
147
|
-
</body>
|
|
148
|
-
</html>`;
|
|
149
|
-
}
|
|
150
|
-
function registerInspectorShell(app, config, basePath = "") {
|
|
151
|
-
const assetsPath = `${basePath}/inspector/assets`;
|
|
152
|
-
const version = encodeURIComponent(INSPECTOR_VERSION);
|
|
153
|
-
const assets = {
|
|
154
|
-
jsUrl: `${assetsPath}/inspector.js?v=${version}`,
|
|
155
|
-
cssUrl: `${assetsPath}/inspector.css?v=${version}`
|
|
156
|
-
};
|
|
157
|
-
const p = (suffix) => `${basePath}${suffix}`;
|
|
158
|
-
const effectiveConfig = {
|
|
159
|
-
...config,
|
|
160
|
-
basePath: config?.basePath ?? basePath,
|
|
161
|
-
proxyUrl: config?.proxyUrl !== void 0 ? config.proxyUrl : p("/inspector/api/proxy"),
|
|
162
|
-
disableTelemetry: config?.disableTelemetry ?? process.env.MCP_USE_ANONYMIZED_TELEMETRY === "false"
|
|
163
|
-
};
|
|
164
|
-
const serveShell = (c) => {
|
|
165
|
-
return c.html(
|
|
166
|
-
generateInspectorShellHtml(effectiveConfig, basePath, assets)
|
|
167
|
-
);
|
|
168
|
-
};
|
|
169
|
-
registerInspectorStaticAssets(app, assetsPath);
|
|
170
|
-
app.get(
|
|
171
|
-
p("/inspector/oauth-popup-closed.html"),
|
|
172
|
-
(c) => c.html(OAUTH_POPUP_CLOSED_HTML)
|
|
173
|
-
);
|
|
174
|
-
app.get(p("/inspector"), serveShell);
|
|
175
|
-
app.get(`${p("/inspector")}/`, serveShell);
|
|
176
|
-
const apiPrefix = p("/inspector/api/");
|
|
177
|
-
app.get(p("/inspector/*"), (c) => {
|
|
178
|
-
if (c.req.path.startsWith(apiPrefix)) {
|
|
179
|
-
return c.notFound();
|
|
180
|
-
}
|
|
181
|
-
return serveShell(c);
|
|
182
|
-
});
|
|
183
|
-
app.post(p("/inspector/*"), (c) => {
|
|
184
|
-
if (c.req.path.startsWith(apiPrefix)) {
|
|
185
|
-
return c.notFound();
|
|
186
|
-
}
|
|
187
|
-
return serveShell(c);
|
|
188
|
-
});
|
|
189
|
-
if (basePath === "" && config?.rootRedirect !== false) {
|
|
190
|
-
app.get("/", (c) => {
|
|
191
|
-
const url = new URL(c.req.url);
|
|
192
|
-
return c.redirect(`${p("/inspector")}${url.search}`);
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export {
|
|
198
|
-
registerInspectorShell
|
|
199
|
-
};
|
|
File without changes
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
registerInspectorShell
|
|
3
|
-
} from "./chunk-EPPZCSJQ.js";
|
|
4
|
-
import {
|
|
5
|
-
registerInspectorProxyRoutes
|
|
6
|
-
} from "./chunk-EKD2XITW.js";
|
|
7
|
-
|
|
8
|
-
// src/server/middleware.ts
|
|
9
|
-
import { Hono } from "hono";
|
|
10
|
-
import { Readable } from "stream";
|
|
11
|
-
function mountInspector(appOrOptions, maybeOptions) {
|
|
12
|
-
if (isMountableApp(appOrOptions)) {
|
|
13
|
-
const app = appOrOptions;
|
|
14
|
-
const options2 = maybeOptions;
|
|
15
|
-
const basePath2 = normalizeInspectorBasePath(options2?.basePath);
|
|
16
|
-
if (isHonoApp(app)) {
|
|
17
|
-
registerInspectorRoutes(app, options2, basePath2);
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
const inspectorApp = createInspectorApp(options2, basePath2);
|
|
21
|
-
const inspectorFetch = toInspectorFetchHandler(inspectorApp);
|
|
22
|
-
app.use(
|
|
23
|
-
createExpressInspectorMiddleware(
|
|
24
|
-
inspectorFetch,
|
|
25
|
-
inspectorApp.routes.map((route) => route.path)
|
|
26
|
-
)
|
|
27
|
-
);
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const options = appOrOptions;
|
|
31
|
-
const basePath = normalizeInspectorBasePath(options?.basePath);
|
|
32
|
-
return toInspectorFetchHandler(createInspectorApp(options, basePath));
|
|
33
|
-
}
|
|
34
|
-
function createInspectorApp(options, basePath) {
|
|
35
|
-
const app = new Hono();
|
|
36
|
-
registerInspectorRoutes(app, options, basePath);
|
|
37
|
-
return app;
|
|
38
|
-
}
|
|
39
|
-
function registerInspectorRoutes(app, options, basePath) {
|
|
40
|
-
const routesConfig = {
|
|
41
|
-
oauthProxyAllowedOrigins: options?.oauthProxyAllowedOrigins ?? [],
|
|
42
|
-
// mountInspector is development tooling. Loopback is therefore useful and
|
|
43
|
-
// safe by default, while callers embedding it elsewhere can opt out.
|
|
44
|
-
oauthProxyAllowLoopback: options?.oauthProxyAllowLoopback ?? true
|
|
45
|
-
};
|
|
46
|
-
if (options?.autoConnectUrl !== void 0) {
|
|
47
|
-
routesConfig.autoConnectUrl = options.autoConnectUrl;
|
|
48
|
-
} else {
|
|
49
|
-
app.get(`${basePath}/inspector/config.json`, (c) => {
|
|
50
|
-
const requestUrl = new URL(c.req.url);
|
|
51
|
-
return c.json({ autoConnectUrl: `${requestUrl.origin}${basePath}` });
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
registerInspectorProxyRoutes(app, routesConfig, basePath);
|
|
55
|
-
registerInspectorShell(
|
|
56
|
-
app,
|
|
57
|
-
{
|
|
58
|
-
devMode: options?.devMode ?? true,
|
|
59
|
-
sandboxOrigin: options?.sandboxOrigin,
|
|
60
|
-
inspectorMode: "embedded",
|
|
61
|
-
rootRedirect: false,
|
|
62
|
-
basePath,
|
|
63
|
-
proxyUrl: `${basePath}/inspector/api/proxy`,
|
|
64
|
-
manufactChatUrl: options?.manufactChatUrl
|
|
65
|
-
},
|
|
66
|
-
basePath
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
function toInspectorFetchHandler(app) {
|
|
70
|
-
return (request) => Promise.resolve(app.fetch(request));
|
|
71
|
-
}
|
|
72
|
-
function createExpressInspectorMiddleware(fetch, registeredPaths) {
|
|
73
|
-
const exactPaths = new Set(
|
|
74
|
-
registeredPaths.filter((path) => !path.includes("*"))
|
|
75
|
-
);
|
|
76
|
-
const prefixPaths = registeredPaths.filter((path) => path.endsWith("/*")).map((path) => path.slice(0, -1));
|
|
77
|
-
return (req, res, next) => {
|
|
78
|
-
const url = new URL(req.originalUrl || req.url || "", requestOrigin(req));
|
|
79
|
-
if (!exactPaths.has(url.pathname) && !prefixPaths.some((prefix) => url.pathname.startsWith(prefix))) {
|
|
80
|
-
next();
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
const request = expressRequestToFetchRequest(req, url);
|
|
84
|
-
void fetch(request).then((fetchResponse) => writeFetchResponse(res, fetchResponse)).catch(next);
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
function requestOrigin(req) {
|
|
88
|
-
const forwardedProtocol = firstHeaderValue(req.headers["x-forwarded-proto"]);
|
|
89
|
-
const protocol = forwardedProtocol || req.protocol || "http";
|
|
90
|
-
const forwardedHost = firstHeaderValue(req.headers["x-forwarded-host"]);
|
|
91
|
-
const host = forwardedHost || firstHeaderValue(req.headers.host) || "localhost";
|
|
92
|
-
return `${protocol}://${host}`;
|
|
93
|
-
}
|
|
94
|
-
function firstHeaderValue(value) {
|
|
95
|
-
return Array.isArray(value) ? value[0] ?? "" : (value ?? "").split(",")[0].trim();
|
|
96
|
-
}
|
|
97
|
-
function expressRequestToFetchRequest(req, url) {
|
|
98
|
-
const init = {
|
|
99
|
-
method: req.method,
|
|
100
|
-
headers: req.headers
|
|
101
|
-
};
|
|
102
|
-
if (req.method !== "GET" && req.method !== "HEAD") {
|
|
103
|
-
if (req.body !== void 0) {
|
|
104
|
-
init.body = bodyToRequestBody(req.body);
|
|
105
|
-
} else {
|
|
106
|
-
init.body = Readable.toWeb(req);
|
|
107
|
-
init.duplex = "half";
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return new globalThis.Request(url, init);
|
|
111
|
-
}
|
|
112
|
-
function bodyToRequestBody(body) {
|
|
113
|
-
if (typeof body === "string" || body instanceof ArrayBuffer || ArrayBuffer.isView(body) || body instanceof Blob || body instanceof FormData || body instanceof URLSearchParams || body instanceof ReadableStream) {
|
|
114
|
-
return body;
|
|
115
|
-
}
|
|
116
|
-
return JSON.stringify(body);
|
|
117
|
-
}
|
|
118
|
-
async function writeFetchResponse(res, fetchResponse) {
|
|
119
|
-
res.status(fetchResponse.status);
|
|
120
|
-
fetchResponse.headers.forEach((value, key) => {
|
|
121
|
-
if (key !== "set-cookie") res.setHeader(key, value);
|
|
122
|
-
});
|
|
123
|
-
const setCookies = fetchResponse.headers.getSetCookie();
|
|
124
|
-
if (setCookies.length > 0) res.setHeader("set-cookie", setCookies);
|
|
125
|
-
if (!fetchResponse.body) {
|
|
126
|
-
res.end();
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
const reader = fetchResponse.body.getReader();
|
|
130
|
-
while (true) {
|
|
131
|
-
const { done, value } = await reader.read();
|
|
132
|
-
if (done) break;
|
|
133
|
-
res.write(value);
|
|
134
|
-
}
|
|
135
|
-
res.end();
|
|
136
|
-
}
|
|
137
|
-
function isMountableApp(value) {
|
|
138
|
-
if (!value || typeof value !== "object" && typeof value !== "function") {
|
|
139
|
-
return false;
|
|
140
|
-
}
|
|
141
|
-
return typeof value.use === "function" || isHonoApp(value);
|
|
142
|
-
}
|
|
143
|
-
function isHonoApp(value) {
|
|
144
|
-
return !!value && typeof value === "object" && typeof value.fetch === "function" && typeof value.route === "function";
|
|
145
|
-
}
|
|
146
|
-
function normalizeInspectorBasePath(raw) {
|
|
147
|
-
if (raw === void 0) return "/mcp";
|
|
148
|
-
let value = raw.trim().replace(/\/{2,}/g, "/").replace(/\/+$/, "");
|
|
149
|
-
if (value === "" || value === "/") return "";
|
|
150
|
-
if (!value.startsWith("/")) value = `/${value}`;
|
|
151
|
-
return value;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export {
|
|
155
|
-
mountInspector
|
|
156
|
-
};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
// src/server/utils.ts
|
|
2
|
-
function isValidUrl(urlString) {
|
|
3
|
-
try {
|
|
4
|
-
const url = new URL(urlString);
|
|
5
|
-
return url.protocol === "http:" || url.protocol === "https:";
|
|
6
|
-
} catch {
|
|
7
|
-
return false;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
async function findAvailablePort(startPort = 8080, maxAttempts = 100) {
|
|
11
|
-
const net = await import("net");
|
|
12
|
-
for (let port = startPort; port < startPort + maxAttempts; port++) {
|
|
13
|
-
try {
|
|
14
|
-
await new Promise((resolve, reject) => {
|
|
15
|
-
const server = net.createServer();
|
|
16
|
-
server.listen(port, () => {
|
|
17
|
-
server.close(() => resolve());
|
|
18
|
-
});
|
|
19
|
-
server.on("error", (err) => reject(err));
|
|
20
|
-
});
|
|
21
|
-
return port;
|
|
22
|
-
} catch {
|
|
23
|
-
continue;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
throw new Error(
|
|
27
|
-
`No available port found after trying ${maxAttempts} ports starting from ${startPort}`
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
async function isPortAvailable(port) {
|
|
31
|
-
const net = await import("net");
|
|
32
|
-
return new Promise((resolve) => {
|
|
33
|
-
const server = net.createServer();
|
|
34
|
-
server.listen(port, () => {
|
|
35
|
-
server.close(() => resolve(true));
|
|
36
|
-
});
|
|
37
|
-
server.on("error", () => resolve(false));
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
function parsePortFromArgs() {
|
|
41
|
-
const portArgIndex = process.argv.indexOf("--port");
|
|
42
|
-
if (portArgIndex !== -1 && portArgIndex + 1 < process.argv.length) {
|
|
43
|
-
const portValue = Number.parseInt(process.argv[portArgIndex + 1], 10);
|
|
44
|
-
if (!Number.isNaN(portValue) && portValue >= 1 && portValue <= 65535) {
|
|
45
|
-
return portValue;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
function hasNoOpenFlag() {
|
|
51
|
-
return process.argv.includes("--no-open");
|
|
52
|
-
}
|
|
53
|
-
function formatErrorResponse(error, context) {
|
|
54
|
-
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
55
|
-
const errorMessage = error instanceof Error ? error.message : "Unknown error";
|
|
56
|
-
const errorStack = error instanceof Error ? error.stack : void 0;
|
|
57
|
-
console.error(`[${timestamp}] Error in ${context}:`, {
|
|
58
|
-
message: errorMessage,
|
|
59
|
-
stack: errorStack
|
|
60
|
-
});
|
|
61
|
-
return {
|
|
62
|
-
error: errorMessage,
|
|
63
|
-
context,
|
|
64
|
-
timestamp,
|
|
65
|
-
// Only include stack in development mode
|
|
66
|
-
...process.env.NODE_ENV === "development" && errorStack ? { stack: errorStack } : {}
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export {
|
|
71
|
-
isValidUrl,
|
|
72
|
-
findAvailablePort,
|
|
73
|
-
isPortAvailable,
|
|
74
|
-
parsePortFromArgs,
|
|
75
|
-
hasNoOpenFlag,
|
|
76
|
-
formatErrorResponse
|
|
77
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
__publicField
|
|
7
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
// src/server/static-assets.ts
|
|
2
|
-
import { existsSync, readFileSync } from "fs";
|
|
3
|
-
import path from "path";
|
|
4
|
-
import { fileURLToPath } from "url";
|
|
5
|
-
var CONTENT_TYPES = {
|
|
6
|
-
".js": "application/javascript",
|
|
7
|
-
".css": "text/css",
|
|
8
|
-
".svg": "image/svg+xml",
|
|
9
|
-
".png": "image/png",
|
|
10
|
-
".ico": "image/x-icon",
|
|
11
|
-
".webmanifest": "application/manifest+json"
|
|
12
|
-
};
|
|
13
|
-
function resolveInspectorAppDir() {
|
|
14
|
-
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
15
|
-
for (const dir of [
|
|
16
|
-
path.resolve(here, "app"),
|
|
17
|
-
// dist/cli.js (bundled)
|
|
18
|
-
path.resolve(here, "../app"),
|
|
19
|
-
// dist/server/*.js
|
|
20
|
-
path.resolve(here, "../../dist/app")
|
|
21
|
-
// src/server/*.ts (workspace dev)
|
|
22
|
-
]) {
|
|
23
|
-
if (existsSync(path.join(dir, "inspector.js"))) {
|
|
24
|
-
return dir;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
throw new Error(
|
|
28
|
-
"Inspector bundle not found (expected dist/app/inspector.js)"
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
function registerInspectorStaticAssets(app, mountPath = "/inspector/assets") {
|
|
32
|
-
const appDir = resolveInspectorAppDir();
|
|
33
|
-
app.get(`${mountPath}/*`, (c) => {
|
|
34
|
-
const subPath = c.req.path.slice(mountPath.length);
|
|
35
|
-
const relative = subPath.startsWith("/") ? subPath.slice(1) : subPath;
|
|
36
|
-
if (!relative || relative.includes("..")) {
|
|
37
|
-
return c.notFound();
|
|
38
|
-
}
|
|
39
|
-
const file = path.resolve(appDir, relative);
|
|
40
|
-
const root = appDir.endsWith(path.sep) ? appDir : `${appDir}${path.sep}`;
|
|
41
|
-
if (!file.startsWith(root) || !existsSync(file)) {
|
|
42
|
-
return c.notFound();
|
|
43
|
-
}
|
|
44
|
-
const ext = path.extname(file);
|
|
45
|
-
return c.body(readFileSync(file), 200, {
|
|
46
|
-
"Content-Type": CONTENT_TYPES[ext] ?? "application/octet-stream",
|
|
47
|
-
// Standalone assets use stable URLs across CLI restarts. Revalidate them
|
|
48
|
-
// so a rebuilt or upgraded Inspector cannot keep running an hour-old UI
|
|
49
|
-
// bundle that predates its storage migrations or proxy contract.
|
|
50
|
-
"Cache-Control": "no-cache"
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export {
|
|
56
|
-
resolveInspectorAppDir,
|
|
57
|
-
registerInspectorStaticAssets
|
|
58
|
-
};
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
// package.json
|
|
2
|
-
var package_default = {
|
|
3
|
-
name: "@mcp-use/inspector",
|
|
4
|
-
type: "module",
|
|
5
|
-
version: "20.0.0-beta.16",
|
|
6
|
-
description: "MCP Inspector - A tool for inspecting and debugging MCP servers",
|
|
7
|
-
author: "",
|
|
8
|
-
license: "MIT",
|
|
9
|
-
homepage: "https://github.com/mcp-use/mcp-use#readme",
|
|
10
|
-
repository: {
|
|
11
|
-
type: "git",
|
|
12
|
-
url: "git+https://github.com/mcp-use/mcp-use.git",
|
|
13
|
-
directory: "libraries/typescript/packages/inspector"
|
|
14
|
-
},
|
|
15
|
-
bugs: {
|
|
16
|
-
url: "https://github.com/mcp-use/mcp-use/issues"
|
|
17
|
-
},
|
|
18
|
-
keywords: [
|
|
19
|
-
"mcp",
|
|
20
|
-
"inspector",
|
|
21
|
-
"debug",
|
|
22
|
-
"tools"
|
|
23
|
-
],
|
|
24
|
-
exports: {
|
|
25
|
-
".": {
|
|
26
|
-
types: "./dist/server/index.d.ts",
|
|
27
|
-
import: "./dist/server/index.js",
|
|
28
|
-
default: "./dist/server/index.js"
|
|
29
|
-
},
|
|
30
|
-
"./dev": {
|
|
31
|
-
types: "./dist/server/index.d.ts",
|
|
32
|
-
import: "./dist/server/index.js",
|
|
33
|
-
default: "./dist/server/index.js"
|
|
34
|
-
},
|
|
35
|
-
"./proxy": {
|
|
36
|
-
types: "./dist/server/proxy-routes.d.ts",
|
|
37
|
-
import: "./dist/server/proxy-routes.js"
|
|
38
|
-
},
|
|
39
|
-
"./client": {
|
|
40
|
-
types: "./dist/client/index.d.ts",
|
|
41
|
-
import: "./dist/client/index.js"
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
main: "./dist/server/index.js",
|
|
45
|
-
types: "./dist/server/index.d.ts",
|
|
46
|
-
bin: {
|
|
47
|
-
"mcp-inspect": "./dist/cli.js"
|
|
48
|
-
},
|
|
49
|
-
files: [
|
|
50
|
-
"dist"
|
|
51
|
-
],
|
|
52
|
-
scripts: {
|
|
53
|
-
dev: "rimraf node_modules/.vite && VITE_MANUFACT_CHAT_URL=${VITE_MANUFACT_CHAT_URL:-http://localhost:8000/api/v1/inspector/chat/stream} vite --strictPort",
|
|
54
|
-
"dev:client": "pnpm run dev",
|
|
55
|
-
"dev:server": "VITE_DEV=true tsx watch src/server/server.ts",
|
|
56
|
-
"dev:standalone": "tsx watch src/server/server.ts",
|
|
57
|
-
clean: "rimraf dist",
|
|
58
|
-
build: "npm run clean && npm run build:client && npm run build:client-exports && npm run build:server && npm run build:cli && npm run build:app",
|
|
59
|
-
"build:app": "vite build --config vite.app.config.ts",
|
|
60
|
-
"watch:app": "vite build --watch --config vite.app.config.ts",
|
|
61
|
-
"preview:app": "vite preview --config vite.app.config.ts --host 127.0.0.1",
|
|
62
|
-
"serve:app": "pnpm build:app && pnpm preview:app",
|
|
63
|
-
"analyze:app": "ANALYZE=true vite build --config vite.app.config.ts",
|
|
64
|
-
"build:client": "vite build",
|
|
65
|
-
"build:client-exports": "tsup --config tsup.client.ts && tsc -p tsconfig.client.json --emitDeclarationOnly --declaration",
|
|
66
|
-
"build:server": "tsup 'src/server/**/*.ts' --format esm --out-dir dist/server && tsc -p tsconfig.server.json --emitDeclarationOnly --declaration",
|
|
67
|
-
"build:cli": "tsup src/server/cli.ts --format esm --out-dir dist/",
|
|
68
|
-
prepublishOnly: "pnpm --filter @mcp-use/client build && pnpm build",
|
|
69
|
-
start: "node dist/cli.js --port 3000",
|
|
70
|
-
preview: "vite preview",
|
|
71
|
-
"type-check": "tsc --noEmit",
|
|
72
|
-
lint: "eslint .",
|
|
73
|
-
"lint:fix": "eslint . --fix",
|
|
74
|
-
"test:e2e": "playwright test",
|
|
75
|
-
"test:e2e:ui": "playwright test --ui",
|
|
76
|
-
"test:e2e:debug": "playwright test --debug",
|
|
77
|
-
"test:e2e:builtin": "node tests/e2e/scripts/run-test-matrix.mjs builtin",
|
|
78
|
-
"test:e2e:prod": "node tests/e2e/scripts/run-test-matrix.mjs prod",
|
|
79
|
-
"test:e2e:mix": "node tests/e2e/scripts/run-test-matrix.mjs mix",
|
|
80
|
-
"test:e2e:prod:ui": "TEST_MODE=production playwright test --ui",
|
|
81
|
-
"test:e2e:codegen": "playwright codegen http://localhost:3000/inspector",
|
|
82
|
-
"test:e2e:report": "playwright show-report",
|
|
83
|
-
"test:e2e:python": "node tests/e2e/scripts/run-python-e2e.mjs",
|
|
84
|
-
"test:unit": "vitest run",
|
|
85
|
-
"test:unit:watch": "vitest",
|
|
86
|
-
"test:e2e:tunnel": "node tests/e2e/scripts/run-tunnel-test.mjs",
|
|
87
|
-
"install:pnpm": "pnpm install",
|
|
88
|
-
"install:npm": "npm install",
|
|
89
|
-
"lint:npm": "npm run lint:fix",
|
|
90
|
-
"lint:pnpm": "pnpm lint:fix"
|
|
91
|
-
},
|
|
92
|
-
engines: {
|
|
93
|
-
node: ">=22.22.2"
|
|
94
|
-
},
|
|
95
|
-
peerDependencies: {
|
|
96
|
-
"@mcp-use/client": "^2.0.0-alpha.0",
|
|
97
|
-
express: "^4.21.2 || ^5.0.0",
|
|
98
|
-
react: "^18.0.0 || ^19.0.0",
|
|
99
|
-
"react-dom": "^18.0.0 || ^19.0.0",
|
|
100
|
-
"react-router": "^7.12.0"
|
|
101
|
-
},
|
|
102
|
-
peerDependenciesMeta: {
|
|
103
|
-
"@mcp-use/client": {
|
|
104
|
-
optional: true
|
|
105
|
-
},
|
|
106
|
-
express: {
|
|
107
|
-
optional: true
|
|
108
|
-
},
|
|
109
|
-
react: {
|
|
110
|
-
optional: true
|
|
111
|
-
},
|
|
112
|
-
"react-dom": {
|
|
113
|
-
optional: true
|
|
114
|
-
},
|
|
115
|
-
"react-router": {
|
|
116
|
-
optional: true
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
dependencies: {
|
|
120
|
-
"@base-ui/react": "^1.6.0",
|
|
121
|
-
"@hono/node-server": "^1.19.13",
|
|
122
|
-
"@mcp-use/agent": "workspace:*",
|
|
123
|
-
"@mcp-use/client": "workspace:*",
|
|
124
|
-
"class-variance-authority": "^0.7.1",
|
|
125
|
-
clsx: "^2.1.1",
|
|
126
|
-
hono: "^4.12.12",
|
|
127
|
-
"lucide-react": "^0.562.0",
|
|
128
|
-
"markdown-to-jsx": "^9.7.4",
|
|
129
|
-
motion: "^12.34.2",
|
|
130
|
-
open: "^11.0.0",
|
|
131
|
-
"react-resizable-panels": "^4.6.4",
|
|
132
|
-
sonner: "^2.0.7",
|
|
133
|
-
"tailwind-merge": "^3.5.0"
|
|
134
|
-
},
|
|
135
|
-
publishConfig: {
|
|
136
|
-
access: "public"
|
|
137
|
-
},
|
|
138
|
-
devDependencies: {
|
|
139
|
-
"@playwright/test": "^1.58.2",
|
|
140
|
-
"@tailwindcss/vite": "^4.2.0",
|
|
141
|
-
"@types/express": "^5.0.6",
|
|
142
|
-
"mcp-use": "workspace:*",
|
|
143
|
-
"@vitejs/plugin-react": "^6.0.0",
|
|
144
|
-
emulate: "0.5.0",
|
|
145
|
-
eslint: "^9.39.2",
|
|
146
|
-
express: "^5.2.1",
|
|
147
|
-
"oauth2-mock-server": "^8.2.2",
|
|
148
|
-
react: "^19.2.3",
|
|
149
|
-
"react-dom": "^19.2.3",
|
|
150
|
-
"react-router": "^7.12.0",
|
|
151
|
-
"rollup-plugin-visualizer": "^6.0.3",
|
|
152
|
-
tailwindcss: "^4.2.0",
|
|
153
|
-
tsup: "^8.5.1",
|
|
154
|
-
tsx: "^4.21.0",
|
|
155
|
-
"tw-animate-css": "^1.4.0",
|
|
156
|
-
typescript: "^5.9.3",
|
|
157
|
-
vite: "^8.0.16",
|
|
158
|
-
vitest: "^4.1.0",
|
|
159
|
-
"wait-on": "^9.0.4",
|
|
160
|
-
zod: "^4.2.0"
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
// src/server/version.ts
|
|
165
|
-
var VERSION = package_default.version;
|
|
166
|
-
function getInspectorVersion() {
|
|
167
|
-
return VERSION;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export {
|
|
171
|
-
VERSION,
|
|
172
|
-
getInspectorVersion
|
|
173
|
-
};
|