import type { McpCompletionBridge, McpCompletionListener } from '../../../../modules/claude-invocation/entities/sessionCompletion/mcpCompletion.gateway.js';
import { type SessionCompletion } from '../../../../modules/claude-invocation/entities/sessionCompletion/sessionCompletion.schema.js';
export interface FileSystemMcpCompletionBridgeOptions {
    directory?: string;
    pollIntervalMs?: number;
    setIntervalImpl?: (handler: () => void, ms: number) => ReturnType<typeof setInterval>;
    clearIntervalImpl?: (timer: ReturnType<typeof setInterval>) => void;
}
/**
 * Cross-process implementation of the MCP completion bridge. The MCP server
 * runs as a sub-process spawned by `claude --bg`, so an in-memory pub/sub
 * cannot reach the Fastify host. Instead, the publisher (MCP handler) writes
 * a small JSON file under ~/.claude-review/completions/<jobId>.json, and the
 * subscriber (Fastify, inside awaitSessionCompletion) polls that path until
 * it appears, then notifies its listener and removes the file.
 *
 * The 1s poll cadence is much faster than the 30s agents-json fallback so the
 * MCP signal remains "primary" in practice. If the host crashes between
 * publish and subscribe consumption, the file lingers; the next subscription
 * picks it up as a buffered event (same semantics as the in-memory variant).
 */
export declare class FileSystemMcpCompletionBridge implements McpCompletionBridge {
    private readonly directory;
    private readonly pollIntervalMs;
    private readonly setIntervalImpl;
    private readonly clearIntervalImpl;
    private readonly subscriptions;
    constructor(options?: FileSystemMcpCompletionBridgeOptions);
    publish(jobId: string, completion: SessionCompletion): void;
    subscribe(jobId: string, listener: McpCompletionListener): void;
    unsubscribe(jobId: string): void;
    private fileFor;
}
//# sourceMappingURL=mcpCompletion.fileSystem.gateway.d.ts.map