import { ConnectionErrorHandler, ContributionProvider, ILogger, MessageService } from '@theia/core/lib/common';
import { DeployedPlugin, HostedPluginClient, PluginHostEnvironmentVariable, PluginIdentifiers, ServerPluginRunner } from '../../common/plugin-protocol';
import { HostedPluginCliContribution } from './hosted-plugin-cli-contribution';
import { HostedPluginLocalizationService } from './hosted-plugin-localization-service';
export interface IPCConnectionOptions {
    readonly serverName: string;
    readonly logger: ILogger;
    readonly args: string[];
    readonly errorHandler?: ConnectionErrorHandler;
}
export declare const HostedPluginProcessConfiguration: unique symbol;
export interface HostedPluginProcessConfiguration {
    readonly path: string;
}
export declare class HostedPluginProcess implements ServerPluginRunner {
    protected configuration: HostedPluginProcessConfiguration;
    protected readonly logger: ILogger;
    protected readonly cli: HostedPluginCliContribution;
    protected readonly pluginHostEnvironmentVariables: ContributionProvider<PluginHostEnvironmentVariable>;
    protected readonly messageService: MessageService;
    protected readonly localizationService: HostedPluginLocalizationService;
    private childProcess;
    private messagePipe?;
    private client;
    private terminatingPluginServer;
    setClient(client: HostedPluginClient): void;
    clientClosed(): void;
    setDefault(defaultRunner: ServerPluginRunner): void;
    acceptMessage(pluginHostId: string, message: Uint8Array): boolean;
    onMessage(pluginHostId: string, message: Uint8Array): void;
    terminatePluginServer(): Promise<void>;
    killProcessTree(parentPid: number): void;
    protected killProcess(pid: number): void;
    runPluginServer(): void;
    readonly HOSTED_PLUGIN_ENV_REGEXP_EXCLUSION: RegExp;
    private fork;
    private onChildProcessExit;
    private onChildProcessError;
    /**
     * Provides additional plugin ids.
     */
    getExtraDeployedPluginIds(): Promise<PluginIdentifiers.VersionedId[]>;
    /**
     * Provides additional deployed plugins.
     */
    getExtraDeployedPlugins(): Promise<DeployedPlugin[]>;
}
//# sourceMappingURL=hosted-plugin-process.d.ts.map