import type http from "node:http";
import type { Tracer } from "@opentelemetry/api";
import type { EditorClientMethods, LibraryClientMethods } from "@superblocksteam/library-shared/types";
import { TracedEventEmitter } from "@superblocksteam/shared";
import type { ISocketClient } from "@superblocksteam/shared";
import type { AiService } from "./ai-service/index.js";
import type { FileSystemManager } from "./file-system-manager.js";
import { type GitOperationLock } from "./git-operation-lock.js";
import type { GitService } from "./git-service/index.js";
import type { LockService } from "./lock-service/index.js";
import type { CheckAuthorization } from "./plugin-options.js";
import type { SyncService } from "./sync-service/index.js";
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, gitService, activateGitService, checkAuthorization, path, tracer, gitOperationLock, superblocksBaseUrl, }: {
        server: http.Server;
        fileSyncManager: FileSystemManager;
        syncService?: SyncService;
        lockService?: LockService;
        aiService?: AiService;
        gitService?: GitService;
        activateGitService?: () => Promise<GitService | undefined>;
        checkAuthorization: CheckAuthorization;
        path: string;
        tracer: Tracer;
        gitOperationLock?: GitOperationLock;
        superblocksBaseUrl?: string;
    }): 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