/** * NitroStack App Mode * * Central utility for detecting and switching between OpenAI Apps SDK * and MCP Apps protocol conventions. * * Set via the `NITROSTACK_APP_MODE` or `APP_MODE` environment variable: * - 'universal' (default) — Supports both MCP Apps (Claude) and OpenAI Apps SDK (ChatGPT) * - 'openai' — OpenAI Apps SDK / ChatGPT conventions only * - 'mcp-app' — MCP Apps spec (Claude, universal MCP hosts) only * * @module */ /** * Supported app modes */ export type AppMode = 'openai' | 'mcp-app' | 'universal'; /** * MIME type used by MCP Apps spec for UI resources. * Hosts use this MIME type to activate the MCP Apps bridge (JSON-RPC over postMessage). */ export declare const RESOURCE_MIME_TYPE_MCP_APP = "text/html;profile=mcp-app"; /** * MIME type used by OpenAI Apps SDK for UI resources (standard HTML). */ export declare const RESOURCE_MIME_TYPE_OPENAI = "text/html"; /** * Get the current NitroStack app mode from environment. * * Reads `NITROSTACK_APP_MODE` or `APP_MODE` env variable with lenient parsing: * - 'openai', 'chatgpt' → 'openai' * - 'mcp-app', 'mcpapp', 'mcp_app' → 'mcp-app' * - 'universal', 'all', 'both' → 'universal' * - anything else (or unset) → 'universal' (default) * * @returns The active app mode */ export declare function getAppMode(): AppMode; /** * Check if the server is running in MCP Apps mode. * Returns true if mode is 'mcp-app' or 'universal'. */ export declare function isMcpAppMode(): boolean; /** * Check if the server is running in OpenAI Apps SDK mode. * Returns true if mode is 'openai' or 'universal'. */ export declare function isOpenAiMode(): boolean; /** * Get the appropriate MIME type for widget resources based on current mode. * * - OpenAI mode: `text/html` (standard) * - MCP Apps/Universal mode: `text/html;profile=mcp-app` */ export declare function getWidgetMimeType(): string; //# sourceMappingURL=app-mode.d.ts.map