import { CancellationToken } from "../../base/common/cancellation.js"; import { Event } from "../../base/common/event.js"; import { IDisposable } from "../../base/common/lifecycle.js"; import type { IAgentHostClientCertificatesProvider } from "../../platform/agentHost/common/clientCertificatesProtocol.js"; import type { IAgentHostClientProxyProvider } from "../../platform/agentHost/common/clientProxyProtocol.js"; import { URI } from "../../base/common/uri.js"; import { IProtocolTransport } from "../../platform/agentHost/common/state/sessionTransport.js"; import { IDevContainerRepository } from "../../platform/agentHost/common/devContainerSamples.js"; import { IConfigurationService } from "../../platform/configuration/common/configuration.service.js"; /** Experimental setting that enables Dev Container Agent Host sessions. */ export declare const DevContainerAgentHostEnabledSettingId = "chat.agentHost.devContainer.enabled"; export declare const DevContainerSamplesEnabledSettingId = "chat.agentHost.devContainer.samples.enabled"; export declare const DevContainerIdleTimeoutSettingId = "chat.agentHost.devContainer.idleTimeout"; /** Hidden experimental setting that enables combining Dev Container execution with a new worktree. */ export declare const DevContainerWorktreeEnabledSettingId = "chat.agentHost.devContainer.worktree.enabled"; /** Whether new sample workspaces can be selected, independently of already-created sessions. */ export declare function areDevContainerSamplesEnabled(configurationService: IConfigurationService): boolean; /** Whether a session in `workspaceUri` that runs on a Dev Container can also use New Worktree isolation. */ export declare function isDevContainerWorktreeEnabled(workspaceUri: URI | undefined, configurationService: IConfigurationService): boolean; /** Agent Host transport and workspace mapping produced by a Dev Container connector. */ export interface IDevContainerAgentHostConnection { /** * Stable address that uniquely identifies this source workspace's running * container while the connection is active. */ readonly address: string; readonly name: string; readonly transportFactory: () => IProtocolTransport; readonly transportDisposable?: IDisposable; readonly workspaceUri: URI; /** Native source path reported by the host that launched the container. */ readonly hostWorkspaceFolder?: string; readonly repository?: IDevContainerRepository; readonly sandboxSupported?: boolean; readonly defaultDirectory?: string; readonly clientCertificates?: IAgentHostClientCertificatesProvider; readonly clientProxy?: IAgentHostClientProxyProvider; } /** Creates a Dev Container and connects to its Agent Host. */ export interface IDevContainerAgentHostConnector { readonly onDidChangeSandboxSupport?: Event<{ readonly workspaceUri: URI; readonly supported: boolean; }>; /** Whether the workspace has a supported configuration and Docker is available on its host. */ isAvailable(workspaceUri: URI): Promise; createConnection(workspaceUri: URI, address: string, token: CancellationToken, options?: { readonly resume: boolean; readonly sandboxEnabled?: boolean; }): Promise; stopContainer?(workspaceUri: URI): Promise; removeContainer?(workspaceUri: URI): Promise; showLog(workspaceUri: URI): Promise; } /** Sessions provider and workspace selected after connecting a Dev Container. */ export interface IDevContainerAgentHostTarget { readonly providerId: string; readonly workspaceUri: URI; /** Release this caller's ownership of the shared workspace connection. */ release(): Promise; }