import { Event } from "../../../base/common/event.js";
import * as performance from "../../../base/common/performance.js";
import { IProcessEnvironment, OperatingSystem } from "../../../base/common/platform.js";
import { IPtyHostProcessReplayEvent } from "@codingame/monaco-vscode-0b087f42-a5a3-5eb9-9bfd-1eebc1bba163-common/vscode/vs/platform/terminal/common/capabilities/capabilities";
import { IProcessDataEvent, IProcessReadyEvent, IProcessProperty, IShellLaunchConfig, ITerminalProcessOptions, IPtyHostLatencyMeasurement, ITerminalLaunchError, TitleEventSource, TerminalIcon, ITerminalsLayoutInfo, ISerializedTerminalState, ProcessPropertyType, IProcessPropertyMap, type IPtyHostService } from "./terminal.js";
import { IProcessDetails, ISetTerminalLayoutInfoArgs, IGetTerminalLayoutInfoArgs } from "./terminalProcess.js";
import { ILogService } from "../../log/common/log.service.js";
export interface IPtyService {
    readonly _serviceBrand: undefined;
    readonly onProcessData: Event<{
        id: number;
        event: IProcessDataEvent | string;
    }>;
    readonly onProcessReady: Event<{
        id: number;
        event: IProcessReadyEvent;
    }>;
    readonly onProcessReplay: Event<{
        id: number;
        event: IPtyHostProcessReplayEvent;
    }>;
    readonly onProcessOrphanQuestion: Event<{
        id: number;
    }>;
    readonly onDidRequestDetach: Event<{
        requestId: number;
        workspaceId: string;
        instanceId: number;
    }>;
    readonly onDidChangeProperty: Event<{
        id: number;
        property: IProcessProperty<any>;
    }>;
    readonly onProcessExit: Event<{
        id: number;
        event: number | undefined;
    }>;
    createProcess(shellLaunchConfig: IShellLaunchConfig, cwd: string, cols: number, rows: number, unicodeVersion: "6" | "11", env: IProcessEnvironment, executableEnv: IProcessEnvironment, options: ITerminalProcessOptions, shouldPersist: boolean, workspaceId: string, workspaceName: string): Promise<number>;
    attachToProcess(id: number): Promise<void>;
    detachFromProcess(id: number, forcePersist?: boolean): Promise<void>;
    shutdownAll(): Promise<void>;
    listProcesses(): Promise<IProcessDetails[]>;
    getPerformanceMarks(): Promise<performance.PerformanceMark[]>;
    getLatency(): Promise<IPtyHostLatencyMeasurement[]>;
    start(id: number): Promise<ITerminalLaunchError | {
        injectedArgs: string[];
    } | undefined>;
    shutdown(id: number, immediate: boolean): Promise<void>;
    input(id: number, data: string): Promise<void>;
    resize(id: number, cols: number, rows: number): Promise<void>;
    clearBuffer(id: number): Promise<void>;
    getInitialCwd(id: number): Promise<string>;
    getCwd(id: number): Promise<string>;
    acknowledgeDataEvent(id: number, charCount: number): Promise<void>;
    setUnicodeVersion(id: number, version: "6" | "11"): Promise<void>;
    processBinary(id: number, data: string): Promise<void>;
    orphanQuestionReply(id: number): Promise<void>;
    updateTitle(id: number, title: string, titleSource: TitleEventSource): Promise<void>;
    updateIcon(id: number, userInitiated: boolean, icon: TerminalIcon, color?: string): Promise<void>;
    getDefaultSystemShell(osOverride?: OperatingSystem): Promise<string>;
    getEnvironment(): Promise<IProcessEnvironment>;
    getWslPath(original: string, direction: "unix-to-win" | "win-to-unix"): Promise<string>;
    getRevivedPtyNewId(workspaceId: string, id: number): Promise<number | undefined>;
    setTerminalLayoutInfo(args: ISetTerminalLayoutInfoArgs): Promise<void>;
    getTerminalLayoutInfo(args: IGetTerminalLayoutInfoArgs): Promise<ITerminalsLayoutInfo | undefined>;
    reduceConnectionGraceTime(): Promise<void>;
    requestDetachInstance(workspaceId: string, instanceId: number): Promise<IProcessDetails | undefined>;
    acceptDetachInstanceReply(requestId: number, persistentProcessId?: number): Promise<void>;
    freePortKillProcess(port: string): Promise<{
        port: string;
        processId: string;
    }>;
    serializeTerminalState(ids: number[]): Promise<string>;
    reviveTerminalProcesses(workspaceId: string, state: ISerializedTerminalState[], dateTimeFormatLocate: string): Promise<void>;
    refreshProperty<T extends ProcessPropertyType>(id: number, property: T): Promise<IProcessPropertyMap[T]>;
    updateProperty<T extends ProcessPropertyType>(id: number, property: T, value: IProcessPropertyMap[T]): Promise<void>;
    refreshIgnoreProcessNames?(names: string[]): Promise<void>;
    installAutoReply(match: string, reply: string): Promise<void>;
    uninstallAllAutoReplies(): Promise<void>;
}
export declare const IPtyService: import("../../instantiation/common/instantiation.js").ServiceIdentifier<IPtyService>;
export declare const ILocalPtyService: import("../../instantiation/common/instantiation.js").ServiceIdentifier<ILocalPtyService>;
export interface ILocalPtyService extends IPtyHostService {
}
export declare const ITerminalLogService: import("../../instantiation/common/instantiation.js").ServiceIdentifier<ITerminalLogService>;
export interface ITerminalLogService extends ILogService {
    readonly _logBrand: undefined;
}
