import { TracedEventEmitter } from "@superblocksteam/shared";
import type { AiService } from "./ai-service/index.js";
import type { FileSystemManager } from "./file-system-manager.js";
import type { LockService } from "./lock-service/index.js";
import type { CheckAuthorization } from "./plugin-options.js";
import type { SyncService } from "./sync-service/index.js";
import type { Tracer } from "@opentelemetry/api";
import type { EditorClientMethods, LibraryClientMethods } from "@superblocksteam/library-shared/types";
import type { ISocketClient } from "@superblocksteam/shared";
import type http from "node:http";
type SocketManagerEvents = {
    "connect:editor": [ISocketClient<EditorClientMethods>, string];
    "connect:library": [ISocketClient<LibraryClientMethods>];
    "disconnect:editor": [string];
};
export declare function isClarkVerboseLogsEnabled(): boolean;
export declare function setClarkVerboseLogsEnabled(enabled: boolean): void;
export declare function createSocketManager(tracer: Tracer): SocketManager;
export declare function disposeSocketManager(): void;
declare class SocketManager extends TracedEventEmitter<SocketManagerEvents> {
    private peerIds;
    private editorSockets;
    private librarySockets;
    private _disposer;
    constructor(tracer: Tracer);
    private socketServer;
    startSocketServer({ server, fileSyncManager, syncService, lockService, aiService, checkAuthorization, path, tracer, }: {
        server: http.Server;
        fileSyncManager: FileSystemManager;
        syncService?: SyncService;
        lockService?: LockService;
        aiService?: AiService;
        checkAuthorization: CheckAuthorization;
        path: string;
        tracer: Tracer;
    }): void;
    callEditorClients(fn: (socket: ISocketClient<EditorClientMethods>) => Promise<void>): void;
    callLibraryClients(fn: (socket: ISocketClient<LibraryClientMethods>) => Promise<void>): void;
    getAnyLibraryClient(): ISocketClient<LibraryClientMethods> | undefined;
    getEditorClients(): Iterable<ISocketClient<EditorClientMethods>>;
    closeAllClients(): void;
    dispose(): void;
}
export {};
//# sourceMappingURL=socket-manager.d.ts.map