import type { IncomingMessage } from "node:http";
import { WebSocketServer } from "ws";
import type { ClineTaskMessage, ClineTaskSessionService } from "../cline-sdk/cline-task-session-service.js";
import type { RuntimeClineMcpServerAuthStatus } from "../core/api-contract.js";
import type { TerminalSessionManager } from "../terminal/session-manager.js";
import type { WorkspaceRegistry } from "./workspace-registry.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;
    trackClineTaskSessionService: (workspaceId: string, workspacePath: string, service: ClineTaskSessionService) => void;
    broadcastTaskChatMessage: (workspaceId: string, taskId: string, message: ClineTaskMessage) => 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>;
    broadcastClineMcpAuthStatusesUpdated: (statuses: RuntimeClineMcpServerAuthStatus[]) => void;
    bumpClineSessionContextVersion: () => void;
    broadcastTaskReadyForReview: (workspaceId: string, taskId: string) => void;
    close: () => Promise<void>;
}
export declare function createRuntimeStateHub(deps: CreateRuntimeStateHubDependencies): RuntimeStateHub;
//# sourceMappingURL=runtime-state-hub.d.ts.map