import type { IncomingMessage } from "node:http";
import { WebSocketServer } from "ws";
import type { WorkspaceRegistry } from "./workspace-registry.js";
import type { TerminalSessionManager } from "../terminal/session-manager.js";
export interface DisposeRuntimeStateWorkspaceOptions {
    disconnectClients?: boolean;
    closeClientErrorMessage?: string;
}
export interface CreateRuntimeStateHubDependencies {
    workspaceRegistry: Pick<WorkspaceRegistry, "resolveWorkspaceForStream" | "buildProjectsPayload" | "buildWorkspaceStateSnapshot">;
}
export interface RuntimeStateHub {
    trackTerminalManager: (workspaceId: string, manager: TerminalSessionManager) => void;
    handleUpgrade: (request: IncomingMessage, socket: Parameters<WebSocketServer["handleUpgrade"]>[1], head: Buffer, context: {
        requestedWorkspaceId: string | null;
    }) => void;
    disposeWorkspace: (workspaceId: string, options?: DisposeRuntimeStateWorkspaceOptions) => void;
    broadcastRuntimeWorkspaceStateUpdated: (workspaceId: string, workspacePath: string) => Promise<void>;
    broadcastRuntimeProjectsUpdated: (preferredCurrentProjectId: string | null) => Promise<void>;
    broadcastTaskReadyForReview: (workspaceId: string, taskId: string) => void;
    close: () => Promise<void>;
}
export declare function createRuntimeStateHub(deps: CreateRuntimeStateHubDependencies): RuntimeStateHub;
//# sourceMappingURL=runtime-state-hub.d.ts.map