import { Event } from "../../../sessions/sessions.web.main.internal.js"; import { IRelayMessage } from "./relayTransport.js"; import { IWSLConnectProgress, IWSLAgentHostConnection, IWSLDistro, IWSLAgentHostConfig, IWSLCachedDistro, type IWSLConnectResult } from "@codingame/monaco-vscode-chat-service-override/vscode/vs/platform/agentHost/common/wslRemoteAgentHost"; export declare const IWSLRemoteAgentHostService: import("../../instantiation/common/instantiation.js").ServiceIdentifier; /** * Manages WSL-bootstrapped connections to remote agent host processes. * * Each connection enters a WSL 2 distro, ensures the VS Code CLI is * available inside the distro, starts `code agent-host`, and creates a * stdio relay through the shared process. */ export interface IWSLRemoteAgentHostService { readonly _serviceBrand: undefined; readonly onDidChangeConnections: Event; readonly onDidReportConnectProgress: Event; readonly connections: readonly IWSLAgentHostConnection[]; isWSLAvailable(): Promise; listDistros(): Promise; listRunningDistros(): Promise; connect(config: IWSLAgentHostConfig): Promise; disconnect(distro: string): Promise; /** Reconnect a cached distro, optionally as an automatic recovery attempt. */ reconnect(distro: string, name: string, userInitiated?: boolean): Promise; /** * Distros the user has connected to, persisted across windows. Drives the * remote agent host service's startup auto-connect. WSL connections * themselves live in-memory, mirroring how tunnels are handled. */ getCachedDistros(): readonly IWSLCachedDistro[]; /** Register a distro for the location picker without explicitly connecting. */ cacheDistro(distro: IWSLCachedDistro): void; } export declare const IWSLRemoteAgentHostMainService: import("../../instantiation/common/instantiation.js").ServiceIdentifier; /** * Main-process service that performs the actual WSL work. The renderer * calls this over IPC; the renderer-side WSL connection factory owns protocol * client creation and registration with {@link IRemoteAgentHostService}. */ export interface IWSLRemoteAgentHostMainService { readonly _serviceBrand: undefined; readonly onDidChangeConnections: Event; readonly onDidCloseConnection: Event; readonly onDidReportConnectProgress: Event; readonly onDidRelayMessage: Event; readonly onDidRelayActivity: Event; readonly onDidRelayClose: Event; relaySend(connectionId: string, message: string): Promise; /** Release one renderer-owned relay lease; the shared WSL bootstrap stops after its final lease is released. */ releaseRelay(connectionId: string): Promise; isWSLAvailable(): Promise; listDistros(): Promise; listRunningDistros(): Promise; connect(config: IWSLAgentHostConfig): Promise; disconnect(distro: string): Promise; reconnect(distro: string, name: string, remoteAgentHostCommand?: string, userInitiated?: boolean, expectedConnectionId?: string): Promise; }