import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event"; import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; import { OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform"; import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service"; import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation"; import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service"; import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service"; import { ISerializedCommandDetectionCapability } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/capabilities/capabilities"; import { TerminalCapabilityStore } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/capabilities/terminalCapabilityStore"; import { ITerminalLaunchResult, IProcessDataEvent, IProcessProperty, IProcessPropertyMap, IProcessReadyEvent, IReconnectionProperties, IShellLaunchConfig, ITerminalBackend, ITerminalLaunchError, ProcessPropertyType } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal"; import { ITerminalLogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal.service"; import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service"; import { ITerminalInstanceService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service"; import { ITerminalConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service"; import { ITerminalService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service"; import { IEnvironmentVariableInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/common/environmentVariable"; import { IEnvironmentVariableService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/common/environmentVariable.service"; import { IBeforeProcessDataEvent, ITerminalProcessManager, ProcessState } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/common/terminal"; import { ITerminalProfileResolverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/common/terminal.service"; import { IConfigurationResolverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/configurationResolver/common/configurationResolver.service"; import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service"; import { IHistoryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/history/common/history.service"; import { IPathService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service"; import { IRemoteAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/remote/common/remoteAgentService.service"; import { INotificationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service"; import { IEnvironmentVariableCollection, IMergedEnvironmentVariableCollection } from "../../../../platform/terminal/common/environmentVariable.js"; import { IAccessibilityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service"; /** * Holds all state related to the creation and management of terminal processes. * * Internal definitions: * - Process: The process launched with the terminalProcess.ts file, or the pty as a whole * - Pty Process: The pseudoterminal parent process (or the conpty agent process) * - Shell Process: The pseudoterminal child process (ie. the shell) */ export declare class TerminalProcessManager extends Disposable implements ITerminalProcessManager { private readonly _instanceId; private readonly _historyService; private readonly _instantiationService; private readonly _logService; private readonly _workspaceContextService; private readonly _configurationResolverService; private readonly _workbenchEnvironmentService; private readonly _productService; private readonly _remoteAgentService; private readonly _pathService; private readonly _environmentVariableService; private readonly _terminalConfigurationService; private readonly _terminalProfileResolverService; private readonly _configurationService; private readonly _terminalInstanceService; private readonly _telemetryService; private readonly _notificationService; private readonly _accessibilityService; private readonly _terminalService; processState: ProcessState; ptyProcessReady: Promise; shellProcessId: number | undefined; readonly remoteAuthority: string | undefined; os: OperatingSystem | undefined; userHome: string | undefined; environmentVariableInfo: IEnvironmentVariableInfo | undefined; backend: ITerminalBackend | undefined; readonly capabilities: TerminalCapabilityStore; readonly shellIntegrationNonce: string; processReadyTimestamp: number; private _isDisposed; private _process; private _processType; private _preLaunchInputQueue; private _initialCwd; private _extEnvironmentVariableCollection; private _ackDataBufferer; private _hasWrittenData; private _hasChildProcesses; private _ptyResponsiveListener; private _ptyListenersAttached; private _dataFilter; private _processListeners?; private _isDisconnected; private _processTraits; private _shellLaunchConfig?; private _dimensions; private readonly _onPtyDisconnect; readonly onPtyDisconnect: Event; private readonly _onPtyReconnect; readonly onPtyReconnect: Event; private readonly _onProcessReady; readonly onProcessReady: Event; private readonly _onProcessStateChange; readonly onProcessStateChange: Event; private readonly _onBeforeProcessData; readonly onBeforeProcessData: Event; private readonly _onProcessData; readonly onProcessData: Event; private readonly _onProcessReplayComplete; readonly onProcessReplayComplete: Event; private readonly _onDidChangeProperty; readonly onDidChangeProperty: Event>; private readonly _onEnvironmentVariableInfoChange; readonly onEnvironmentVariableInfoChanged: Event; private readonly _onProcessExit; readonly onProcessExit: Event; private readonly _onRestoreCommands; readonly onRestoreCommands: Event; private _cwdWorkspaceFolder; get persistentProcessId(): number | undefined; get shouldPersist(): boolean; get hasWrittenData(): boolean; get hasChildProcesses(): boolean; get reconnectionProperties(): IReconnectionProperties | undefined; get extEnvironmentVariableCollection(): IMergedEnvironmentVariableCollection | undefined; get processTraits(): IProcessReadyEvent | undefined; constructor(_instanceId: number, cwd: string | URI | undefined, environmentVariableCollections: ReadonlyMap | undefined, shellIntegrationNonce: string | undefined, _historyService: IHistoryService, _instantiationService: IInstantiationService, _logService: ITerminalLogService, _workspaceContextService: IWorkspaceContextService, _configurationResolverService: IConfigurationResolverService, _workbenchEnvironmentService: IWorkbenchEnvironmentService, _productService: IProductService, _remoteAgentService: IRemoteAgentService, _pathService: IPathService, _environmentVariableService: IEnvironmentVariableService, _terminalConfigurationService: ITerminalConfigurationService, _terminalProfileResolverService: ITerminalProfileResolverService, _configurationService: IConfigurationService, _terminalInstanceService: ITerminalInstanceService, _telemetryService: ITelemetryService, _notificationService: INotificationService, _accessibilityService: IAccessibilityService, _terminalService: ITerminalService); freePortKillProcess(port: string): Promise; dispose(immediate?: boolean): void; private _createPtyProcessReadyPromise; detachFromProcess(forcePersist?: boolean): Promise; createProcess(shellLaunchConfig: IShellLaunchConfig, cols: number, rows: number, reset?: boolean): Promise; relaunch(shellLaunchConfig: IShellLaunchConfig, cols: number, rows: number, reset: boolean): Promise; private _resolveEnvironment; private _launchLocalProcess; private _setupPtyHostListeners; getBackendOS(): Promise; setDimensions(cols: number, rows: number, sync?: undefined, pixelWidth?: number, pixelHeight?: number): Promise; setDimensions(cols: number, rows: number, sync: false, pixelWidth?: number, pixelHeight?: number): Promise; setDimensions(cols: number, rows: number, sync: true, pixelWidth?: number, pixelHeight?: number): void; setUnicodeVersion(version: "6" | "11"): Promise; setNextCommandId(commandLine: string, commandId: string): Promise; private _resize; write(data: string): Promise; sendSignal(signal: string): Promise; processBinary(data: string): Promise; get initialCwd(): string; refreshProperty(type: T): Promise; updateProperty(type: T, value: IProcessPropertyMap[T]): Promise; acknowledgeDataEvent(charCount: number): void; private _onExit; private _setProcessState; private _onEnvironmentVariableCollectionChange; clearBuffer(): Promise; }