import net from 'net';
import { ExtensionConnectOption } from '@opensumi/ide-core-common';
import { IReporter, IReporterService } from '@opensumi/ide-core-node';
import { ICreateProcessOptions, IExtensionMetaData, IExtensionNodeClientService, IExtensionNodeService, IExtraMetaData } from '../common';
export declare class ExtensionNodeServiceImpl implements IExtensionNodeService {
    private LOG_TAG;
    static MaxExtProcessCount: number;
    static ProcessCloseExitThreshold: number;
    private readonly logger;
    private readonly extHostLogger;
    private appConfig;
    reporterService: IReporterService;
    reporter: IReporter;
    private extensionHostManager;
    private commonChannelPathHandler;
    private clientExtProcessMap;
    private clientExtProcessInspectPortMap;
    private clientExtProcessInitDeferredMap;
    private clientExtProcessExtConnection;
    private clientExtProcessExtConnectionDeferredMap;
    private clientExtProcessExtConnectionServer;
    private clientExtProcessFinishDeferredMap;
    private clientExtProcessThresholdExitTimerMap;
    private clientServiceMap;
    private maybeZombieClients;
    private latestExtProcessId;
    private inspectPort;
    private extensionScanner;
    private readonly onDidSetInspectPort;
    setConnectionServiceClient(clientId: string, serviceClient: IExtensionNodeClientService): void;
    private extServerListenOptions;
    private electronMainThreadListenPaths;
    initialize(): Promise<void>;
    getAllExtensions(scan: string[], extensionCandidate: string[], localization: string, extraMetaData?: IExtraMetaData): Promise<IExtensionMetaData[]>;
    getExtension(extensionPath: string, localization: string, extraMetaData?: IExtraMetaData): Promise<IExtensionMetaData | undefined>;
    private getIPCHandlerPath;
    getExtServerListenOption(clientId: string, extensionConnectOption?: ExtensionConnectOption): Promise<net.ListenOptions>;
    getElectronMainThreadListenPath(clientId: string): Promise<string>;
    private setExtProcessConnectionForward;
    createProcess(clientId: string, options?: ICreateProcessOptions): Promise<void>;
    private _createExtServer;
    private _createExtHostProcess;
    ensureProcessReady(clientId: string): Promise<boolean>;
    private processHandshake;
    tryEnableInspectPort(clientId: string, delay?: number): Promise<boolean>;
    getProcessInspectPort(clientId: string): Promise<number | undefined>;
    private _setMainThreadConnection;
    private closeExtProcessWhenConnectionClose;
    private infoProcessNotExist;
    /**
     * 如果插件进程已被销毁，如 websocket 连接断开超过 `ExtensionNodeServiceImpl.ProcessCloseExitThreshold` 时
     * 那么当用户重新连接至服务时，需要通知重启整个插件进程
     */
    private restartExtProcessByClient;
    private infoProcessCrash;
    disposeClientExtProcess(clientId: string, info?: boolean, killProcess?: boolean): Promise<void>;
    getExtProcessId(clientId: string): Promise<number | null>;
    disposeAllClientExtProcess(): Promise<void>;
    private destoryZombineClients;
}
//# sourceMappingURL=extension.service.d.ts.map