Path: blob/main/src/vs/platform/agentHost/common/agent.ts
13395 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { Event } from '../../../base/common/event.js';6import { DisposableStore, IDisposable } from '../../../base/common/lifecycle.js';7import { IChannelClient } from '../../../base/parts/ipc/common/ipc.js';89// Agent host process starter and connection abstractions.10// Used by the main process to spawn and connect to the agent host utility process.1112export interface IAgentHostConnection {13readonly client: IChannelClient;14readonly store: DisposableStore;15readonly onDidProcessExit: Event<{ code: number; signal: string }>;16}1718export interface IAgentHostStarter extends IDisposable {19readonly onRequestConnection?: Event<void>;20readonly onWillShutdown?: Event<void>;2122/**23* Creates the agent host utility process and connects to it.24*/25start(): Promise<IAgentHostConnection>;26}272829