/**
 * OpenCode SSE event subscription.
 *
 * Subscribes to the OpenCode SSE stream at GET /event and forwards
 * events through the gateway tunnel. Reconnects automatically on
 * disconnect with exponential backoff.
 *
 * SECURITY: Filters all SSE events by registered project paths.
 * Only events for projects the user has registered are forwarded.
 */
import type { Message } from "@pocketcoder/shared";
import type { OpenCodeAuth } from "./spawn.js";
type SendFn = (message: Message) => void;
/**
 * Refresh the project paths cache from the database.
 * Called periodically to pick up newly added/removed projects.
 */
export declare function refreshProjectPathsCache(): void;
/**
 * Check if a directory path is a registered project.
 * Refreshes the cache if it's stale.
 */
export declare function isRegisteredProjectPath(directory: string): boolean;
/**
 * Clear the project paths cache (for testing).
 */
export declare function clearProjectPathsCache(): void;
/**
 * Set the send function used to forward SSE events through the gateway.
 */
export declare function setSseSendFn(fn: SendFn): void;
/**
 * Start subscribing to the OpenCode SSE event stream.
 * Connects to GET /event with Basic auth and forwards events.
 */
export declare function startSseSubscription(auth: OpenCodeAuth): void;
/**
 * Stop the SSE subscription and clean up resources.
 */
export declare function stopSseSubscription(): void;
export {};
//# sourceMappingURL=sse.d.ts.map