export declare const AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES: { readonly HOST_CONTEXT: "agentNative.mcpHostContext"; readonly UPDATE_MODEL_CONTEXT: "agentNative.mcpHost.updateModelContext"; readonly OPEN_LINK: "agentNative.mcpHost.openLink"; readonly REQUEST_DISPLAY_MODE: "agentNative.mcpHost.requestDisplayMode"; readonly RESPONSE: "agentNative.mcpHost.response"; }; export type AgentNativeMcpAppHostMessageType = (typeof AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES)[keyof typeof AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES]; export type McpAppDisplayMode = "inline" | "pip" | "fullscreen" | (string & {}); export interface McpAppModelContextContentPart { type: string; [key: string]: unknown; } export interface McpAppModelContextUpdate { content?: McpAppModelContextContentPart[]; structuredContent?: unknown; } export type McpAppHostRequestMode = "act" | "plan"; export interface McpAppHostChatMessage { message: string; context?: string; content?: McpAppModelContextContentPart[]; structuredContent?: unknown; mode?: McpAppHostRequestMode; requestMode?: McpAppHostRequestMode; } export interface McpAppHostCapabilities { updateModelContext?: boolean; openLink?: boolean; displayModes?: McpAppDisplayMode[]; [key: string]: unknown; } export interface McpAppHostContext { capabilities?: McpAppHostCapabilities; [key: string]: unknown; } export interface McpAppHostInfo { name?: string; version?: string; [key: string]: unknown; } export interface McpAppHostContextSnapshot { context: McpAppHostContext | null; capabilities: McpAppHostCapabilities | null; version: unknown; hostInfo?: McpAppHostInfo; } /** * True when this document is an app running inside an MCP App widget (a * ChatGPT, Codex, or Claude card or panel). The host, not the app, owns * navigation and chat there, so apps drop their own navigation chrome. * * Being a widget is a property of the document, not of its current URL: the * first positive answer is kept (and marked on ``, where the first-paint * script in `getMcpAppWidgetEmbedBootScriptBody` also marks it), so a client * navigation that drops the embed query params, or a token swap that * de-enrolls the chat bridge, never brings the app's own chrome back. */ export declare function isMcpAppWidgetEmbed(): boolean; export declare function useIsMcpAppWidgetEmbed(): boolean; /** * True for a directory widget, whose scoped session can only read its own * resource. Apps skip application-state writes and save-failure surfaces there * instead of showing errors for requests that can never land. */ export declare function useIsMcpDirectoryWidgetReadOnlyEmbed(): boolean; export declare function useIsMcpDirectoryWidgetWriteEmbed(): boolean; export declare function isOpenAiMcpAppHost(): boolean; export declare function initializeMcpAppHost(): Promise; export declare function sendMcpAppHostMessage(chat: McpAppHostChatMessage): Promise | false; export declare function getMcpAppHostContext(): McpAppHostContextSnapshot; export declare function useMcpAppHostContext(): McpAppHostContextSnapshot; export declare function updateMcpAppModelContext(update: McpAppModelContextUpdate): Promise | false; export declare function openMcpAppHostLink(url: string): Promise | false; export declare function requestMcpAppDisplayMode(mode: McpAppDisplayMode): Promise | false; export declare function _resetMcpAppHostForTests(): void;