/** * Unified MCP config generation for all agent types. * * Reads the canonical `mcpServers` from settings.json, injects the * sensorium-mcp entry, and formats for each agent's native config format. * * All builders take a `SensoriumTransport` param — the caller (agent-spawn) * is responsible for reading env vars and gating on port availability. */ export interface SensoriumTransport { httpPort: number; secret: string | null; } /** * HTTP header carrying a per-process spawn token. Set once at spawn time and * re-sent by the agent SDK on every request — including transport reconnects * (e.g. after an SSE idle/network blip). The server uses it as a STABLE process * identity for thread ownership, so a reconnect (same token, new transport id) * is not mistaken for a competing/zombie process, and a genuine second process * (different token) is reliably detected. */ export declare const SPAWN_TOKEN_HEADER = "X-Sensorium-Spawn-Token"; /** * Generates a per-thread Claude MCP config file and returns the path. * * Format: `{ "mcpServers": { "": { "type": "http"|"stdio", ... } } }` */ export declare function buildClaudeMcpConfig(transport: SensoriumTransport, threadId: number): string; /** * Writes the Copilot MCP config to `/mcp-config.json`. * * Same JSON schema as Claude (both use `mcpServers` wrapper). * * CAVEAT: COPILOT_HOME is shared across all Copilot threads (it holds login * state), so this file is not per-thread. Each spawn rewrites it, and the CLI * reads it at startup — so per-thread servers apply to the thread being spawned, * but a *concurrent* Copilot thread that reconnects could observe another * thread's merged servers. Per-thread injection is therefore reliable only for * Claude (per-thread file) and Codex (per-invocation argv); on Copilot treat it * as best-effort. Isolating it would require a per-thread COPILOT_HOME, which * would fork login/session state. */ export declare function buildCopilotMcpConfig(transport: SensoriumTransport, copilotHomeDir: string, threadId: number): void; /** * Returns an array of `-c` CLI arguments for Codex (TOML-style config overrides). * * Codex supports stdio (`command`/`args`) and streamable HTTP (`url`). */ export declare function buildCodexMcpArgs(transport: SensoriumTransport, threadId: number): { args: string[]; env: Record; }; //# sourceMappingURL=mcp-config.service.d.ts.map