/**
 * agent_bridge — MCP config materialization helper (WAB-SUB.2, 0.5.106).
 *
 * Spec: WAB-SUB.2 task — "Pass MCP config path through to subscription-mode
 * opts so spawned claude can find opensquid's tools".
 *
 * Responsibility:
 *   When the agent-bridge daemon runs in subscription mode, the spawned
 *   `claude --print` subprocess needs to know how to reach opensquid's MCP
 *   servers (`opensquid-mcp` read-only inspection + `opensquid-chat-bridge-mcp`
 *   mutation surface). We materialize a JSON file at a known path with the
 *   stdio-transport entries the host expects (`mcpServers: { name: { command,
 *   args, env } }` shape — matches `.mcp.json` / `claude_desktop_config.json`
 *   convention).
 *
 * Default path: `${OPENSQUID_HOME()}/agent-bridge/mcp-config.json`. The
 * file is OWNED by the daemon — overwritten on every start so a stale
 * config from a previous opensquid install never silently misroutes the
 * subscription subprocess. Users who want a custom config can point
 * `OPENSQUID_AGENT_BRIDGE_MCP_CONFIG` at their own file; the materializer
 * skips writing in that case (custom config is the user's responsibility).
 *
 * Why JSON not YAML: the MCP host convention (Anthropic + others) reads
 * JSON. We emit what claude --mcp-config will accept verbatim.
 *
 * Why an opt-in helper not always-on: keeps api-mode daemons from paying
 * the I/O cost for nothing; keeps test fixtures clean.
 *
 * Tool enumeration: we ship BOTH `opensquid-mcp` (read-only) and
 * `opensquid-chat-bridge-mcp` (chat_send + chat_poll_inbox) so the spawned
 * agent has full read+chat surface. Both bins live under `node_modules/.bin/`
 * after `pnpm add opensquid`; the resolver below tries node_modules then
 * falls back to PATH lookup so a globally-installed opensquid works too.
 *
 * Imports from: node:fs/promises, node:path, ../paths.js.
 * Imported by: ./daemon.ts (subscription-mode start path),
 *   ./mcp_config.test.ts.
 */
export interface McpServerEntry {
    command: string;
    args?: string[];
    env?: Record<string, string>;
}
export interface McpConfigDocument {
    mcpServers: Record<string, McpServerEntry>;
}
export interface MaterializeMcpConfigOptions {
    /** Override target path (tests + custom-config users). */
    targetPath?: string;
    /** Override the OPENSQUID_HOME base (tests). */
    daemonHome?: string;
    /** Override env passthrough (e.g. forward OPENSQUID_HOME to the child). */
    envPassthrough?: Record<string, string>;
}
/** Default location for the agent-bridge MCP config. */
export declare const defaultMcpConfigPath: (home?: string) => string;
export declare function defaultMcpServers(env?: Record<string, string>): Record<string, McpServerEntry>;
export declare function materializeDefaultMcpConfig(opts?: MaterializeMcpConfigOptions): Promise<string>;
export interface ResolveMcpConfigOptions {
    /** Caller-supplied path override (skips materialization). */
    explicitPath?: string;
    /** Override env source (tests). Defaults to `process.env`. */
    env?: NodeJS.ProcessEnv;
    /** Override daemon home (tests). */
    daemonHome?: string;
}
export declare function resolveMcpConfigPath(opts?: ResolveMcpConfigOptions): Promise<string>;
//# sourceMappingURL=mcp_config.d.ts.map