import type { LocaleCode } from "../localization/shared.js"; export type McpConnectGuideId = "claude" | "chatgpt" | "cursor" | "vscode" | "claude-code" | "codex" | "grok" | "other"; export interface McpConnectHost { id: string; label: string; aliases: readonly string[]; guideId: McpConnectGuideId; } export interface McpConnectTemplateValues { appName: string; appUrl: string; mcpUrl: string; serverId: string; } export type McpConnectEnvironment = "local" | "beta" | "production" | "preview"; /** * What an MCP client stores for this app: the name its config entry goes * under and the URL it connects to. It never carries a credential, so every * surface can render it and write it into an install link. */ export interface McpConnectIdentity { serverName: string; appName: string; appUrl: string; mcpUrl: string; environment: McpConnectEnvironment; /** * False when `mcp.connect` is off: the identity route still answers, but * there is no connect page, token minting, or OAuth discovery, so a client * installed from a link cannot sign in. */ connect: boolean; } export type McpInstallClient = "cursor" | "vscode" | "vscode-insiders"; export interface McpConnectInstallOption { client: McpInstallClient; label: string; } export interface McpConnectGuide { id: McpConnectGuideId; label: string; install?: readonly McpConnectInstallOption[]; steps?: readonly string[]; intro?: string; commandTemplate?: string; configTemplate?: string; action?: { kind: "link" | "copy"; label: string; href?: string; }; note?: string; } export declare const MCP_CONNECT_MCP_URL_TEMPLATE = "{appUrl}/mcp"; export declare const MCP_CONNECT_GUIDES: readonly McpConnectGuide[]; export declare const MCP_CONNECT_HOSTS: readonly McpConnectHost[]; export declare const MCP_CONNECT_HOST_SEARCH_TEXT: string; export declare function resolveMcpConnectGuideId(query: string | null | undefined): McpConnectGuideId; export declare function resolveMcpConnectHostId(query: string): string | undefined; export declare function matchesMcpConnectHost(query: string): boolean; export declare function getMcpConnectGuides(locale: LocaleCode): readonly McpConnectGuide[]; export declare const MCP_STATIC_TOKEN_FALLBACK: { title: string; state: string; resultTitle: string; resultCopy: string; }; export declare function getMcpStaticTokenFallback(locale: LocaleCode): typeof MCP_STATIC_TOKEN_FALLBACK; export declare function interpolateMcpConnectTemplate(template: string, values: McpConnectTemplateValues): string; /** * A server chooses this name before anyone has signed in, and it becomes the * entry's key in every client config, the label each client shows, and an * unquoted argument in the copyable `claude mcp add` / `codex mcp add` * commands, so only the identifier shape first-party server names use is * accepted. */ export declare const PLAIN_MCP_SERVER_NAME: RegExp; /** * A name the framework derives from the app id or hostname is its own guess, * so it is fitted to the plain shape rather than refused: a 63-character * hostname label is valid DNS but pushes `preview-agent-native-