/** * MCPAppsRenderer - SEP-1865 MCP Apps Renderer * * Renders MCP Apps widgets using the SEP-1865 protocol: * - JSON-RPC 2.0 over postMessage * - Double-iframe sandbox architecture * - AppBridge SDK for communication * - tools/call, resources/read, ui/message, ui/open-link support * * Reuses existing inspector infrastructure: * - Widget storage (WidgetData) * - RPC logging (rpcLogBus) * - Console capture (useIframeConsole) * - Theme context (useTheme) */ import type { MessageContentBlock } from "mcp-use/react"; type DisplayMode = "inline" | "pip" | "fullscreen"; interface MCPAppsRendererProps { serverId: string; toolCallId: string; toolName: string; toolInput?: Record; toolOutput?: unknown; toolMetadata?: Record; invoking?: string; invoked?: string; /** Partial/streaming tool arguments (forwarded to widget via sendToolInputPartial) */ partialToolInput?: Record; resourceUri: string; readResource: (uri: string) => Promise; onSendFollowUp?: (content: MessageContentBlock[]) => void; className?: string; displayMode?: DisplayMode; onDisplayModeChange?: (mode: DisplayMode) => void; noWrapper?: boolean; customProps?: Record; /** When provided, used directly instead of looking up via useMcpClient(). */ serverBaseUrl?: string; /** When true, sends ui/notifications/tool-cancelled to the widget. */ cancelled?: boolean; /** Called when the CSP mode changes after the widget is already loaded, requesting the tool to be re-executed. */ onRerun?: () => void; /** Called once when the iframe has loaded and the AppBridge handshake completes. Used by the preview/screenshot route. */ onReady?: () => void; /** When true in fullscreen mode, suppresses the fullscreen navbar + top padding so the iframe fills the viewport edge-to-edge. Used by the preview/screenshot route. */ chromeless?: boolean; /** Override the inline-mode max-width cap (default: 768 on desktop, device width on mobile). Used by the preview/screenshot route to render widgets wider than the chat-column width. */ inlineWidthOverride?: number; } declare function MCPAppsRendererBase({ serverId, toolCallId, toolName, toolInput, toolOutput, toolMetadata, invoking, invoked, partialToolInput, resourceUri, readResource, onSendFollowUp, className, displayMode: displayModeProp, onDisplayModeChange, noWrapper, customProps, cancelled, onRerun, onReady, chromeless, inlineWidthOverride, }: MCPAppsRendererProps): import("react/jsx-runtime").JSX.Element; export declare const MCPAppsRenderer: import("react").MemoExoticComponent; export {}; //# sourceMappingURL=MCPAppsRenderer.d.ts.map