export declare const WA_CHANNEL_SERVER_NAME = "whatsapp-channel"; export interface WaChannelMcpParams { sessionId: string; /** The WhatsApp sender this session serves (== spawn senderId). */ senderId: string; /** Loopback base URL of the gateway in the UI process. */ gatewayUrl: string; /** Absolute path to the built channel server entrypoint (dist/server.js). */ serverPath: string; /** Absolute path to the node binary that runs the channel server. On darwin * the launchd server PATH excludes an nvm node, so a bare `node` command * fails to spawn and the channel never boots (Task 1402); callers pass the * installer-resolved NODE_BIN. */ nodeBin: string; } export interface WaChannelMcpServerEntry { command: string; args: string[]; env: Record; } export declare function buildWaChannelMcpServers(p: WaChannelMcpParams): Record; /** Argv that activates the channel server as a development channel. */ export declare function waChannelDevChannelsArgv(): string[]; /** Per-session mcp-config file path. The sessionId is sanitised to the * filename-safe charset so a hostile/odd id can't escape `dir`. Pure — the * caller writes the file. Shared by the gateway and resume paths so both * produce the identical path. */ export declare function waChannelMcpConfigPath(sessionId: string, dir: string): string; /** Full argv fragment that attaches + activates the channel server: the * per-session `--mcp-config` followed by the development-channels flag. */ export declare function buildWaChannelArgv(mcpConfigPath: string): string[]; /** * True when accumulated child output contains the development-channels * confirmation prompt ("Loading development channels … Enter to confirm"). * The prompt is rendered with cursor-position escapes and no literal spaces, * so match on the ANSI/space/punctuation-stripped letter stream rather than a * literal phrase. The manager sends one Enter to confirm when this returns * true, unblocking a programmatic spawn that cannot answer interactively. */ export declare function isDevChannelPrompt(rawOutput: string): boolean; //# sourceMappingURL=wa-channel-mcp.d.ts.map