/** * Widget protocol detection utilities * * Determines which rendering protocol to use based on tool metadata and result. * Priority: MCP Apps → ChatGPT Apps SDK → MCP-UI → None */ export type WidgetProtocol = "mcp-apps" | "chatgpt-app" | "mcp-ui" | "both" | null; /** * Detect if a tool supports BOTH MCP Apps and ChatGPT Apps SDK * * @param toolMeta - Tool metadata from tool definition (_meta field) * @returns True if tool has both protocols */ export declare function hasBothProtocols(toolMeta?: Record): boolean; /** * Detect which widget protocol to use for rendering * * @param toolMeta - Tool metadata from tool definition (_meta field) * @param toolResult - Tool execution result * @returns The detected protocol or null if no custom UI */ export declare function detectWidgetProtocol(toolMeta?: Record, toolResult?: any): WidgetProtocol; /** * Extract resource URI for a specific protocol (used when toggling between protocols) * * @param protocol - The specific protocol to get URI for * @param toolMeta - Tool metadata from tool definition (_meta field) * @returns The resource URI or null */ export declare function getResourceUriForProtocol(protocol: "mcp-apps" | "chatgpt-app", toolMeta?: Record): string | null; //# sourceMappingURL=widget-detection.d.ts.map