/**
 * MCP server stderr tee — dual-destination log capture.
 *
 * Claude Code spawns MCP servers as child processes and consumes their stderr
 * internally. The platform cannot intercept at the spawn level. Each server
 * must tee its own stderr so diagnostic output is retrievable.
 *
 * ┌─────────────────────────┐
 * │ MCP server process      │
 * │                         │
 * │ console.error("[x] ..") │
 * │           │             │
 * │           ▼             │
 * │ patched stderr.write()  │
 * │     │                   │
 * │     ├──► original stderr (consumed by Claude Code — opaque)
 * │     │
 * │     ├──► mcp-{name}-stderr-{YYYY-MM-DD}.log    (raw chunks, per-plugin)
 * │     │
 * │     └──► $STREAM_LOG_PATH                      (per-line, prefixed)
 * │           "[<iso>] [mcp:{name}] <line>"
 * └─────────────────────────┘
 *
 * $STREAM_LOG_PATH is set by the spawner (`getMcpServers` in `claude-agent.ts`)
 * to the per-conversation stream log file. The MCP server code itself knows
 * nothing about conversations — it just trusts the spawner's path. This is
 * the scope boundary introduced: the tee is attached per spawn,
 * not per MCP-server process lifetime. Servers spawned for conversation A
 * write to conversation A's file; servers for B write to B's file.
 *
 * Every decision is logged via `[mcp-tee-*]` markers on both the target file
 * and the original stderr so an investigator can confirm from the stream log
 * which tees were wired up, which were skipped, and why.
 */
/**
 * Patch process.stderr.write to tee to:
 *   1. Per-server raw log (`mcp-<serverName>-stderr-<date>.log` under LOG_DIR).
 *   2. The per-conversation stream log at `STREAM_LOG_PATH` — per-line, prefixed.
 *   3. The original stderr (consumed by Claude Code) — always preserved.
 *
 * LOG_DIR absent → skip per-server raw file (dev mode / tool discovery).
 * STREAM_LOG_PATH absent → skip stream-log destination (older spawner or
 *   standalone invocation). In both absent cases, stderr works unchanged —
 *   a `[mcp-tee-skip]` marker is written to original stderr so the skip is
 *   visible to journalctl-level readers.
 *
 * Safe to call once at MCP server module load. Refused on second call to
 * prevent stacking patches.
 */
export declare function initStderrTee(serverName: string): void;
//# sourceMappingURL=index.d.ts.map