import { Disposable, IDisposable, IReference } from "../../../../../../base/common/lifecycle.js"; import { IObservable } from "../../../../../../base/common/observable.js"; import { type IExtUri } from "../../../../../../base/common/resources.js"; import { URI } from "../../../../../../base/common/uri.js"; import type { AgentCustomization, SessionActiveClient, ToolDefinition } from "../../../../../../platform/agentHost/common/state/protocol/state.js"; import type { ClientPluginCustomization } from "../../../../../../platform/agentHost/common/state/sessionState.js"; import { IInstantiationService } from "../../../../../../platform/instantiation/common/instantiation.js"; import { IStorageService } from "../../../../../../platform/storage/common/storage.service.js"; import { IUriIdentityService } from "../../../../../../platform/uriIdentity/common/uriIdentity.service.js"; import type { ICustomizationSyncProvider } from "../../../common/customizationHarnessService.js"; import { ILanguageModelToolsService } from "../../../common/tools/languageModelToolsService.service.js"; import { IWorkbenchEnvironmentService } from "../../../../../services/environment/common/environmentService.service.js"; import { IAgentHostToolSetEnablementService } from "./agentHostToolSetEnablementService.service.js"; import { IAgentHostMcpServerSupportScope } from "./agentHostMcpServerSupportScope.js"; import { type ISyncedCustomizationOrigin } from "./syncedCustomizationBundler.js"; import { type IAgentHostResourceUriMapper } from "../../../../../../platform/agentHost/common/agentHostUri.js"; import { IAgentHostActiveClientService } from "./agentHostActiveClientService.service.js"; /** Appends session tool lists to an active client, preserving earlier definitions on name collisions. */ export declare function composeSessionActiveClient(activeClient: SessionActiveClient, ...toolLists: readonly (readonly ToolDefinition[])[]): SessionActiveClient; /** Identity a published customization set is resolved against. Refcounted; disposed by each holder. */ export interface IAgentCustomizationScope extends IDisposable { readonly customizations: IObservable; readonly customAgents: IObservable; /** Tools available to this scope's active client. */ readonly tools: IObservable; /** Composed publication view; the scope's original client-side customization URIs stay unchanged. */ activeClient(clientId: string, resourceUris: IAgentHostResourceUriMapper): IObservable; /** * `false` until the initial customization resolution completes. Publishing an * unresolved scope would transiently wipe the host's customization state. */ readonly isResolved: IObservable; /** Resolves once the scope's initial customization resolution has completed. */ whenResolved(): Promise; /** Finds the bundled URI for a source file in this scope. */ getSyncedUri(sourceUri: URI): URI | undefined; } export declare class AgentHostActiveClientService extends Disposable implements IAgentHostActiveClientService { private readonly _toolsService; private readonly _storageService; private readonly _instantiationService; private readonly _toolSetEnablementService; private readonly _uriIdentityService; private readonly _environmentService; readonly _serviceBrand: undefined; private readonly _allToolsObs; private readonly _allToolSetsObs; private readonly _clientToolsByType; private readonly _sessionTools; private readonly _sessionToolObservers; private readonly _sessionToolAliases; private readonly _scopes; private readonly _mcpServerSupportScopes; private readonly _syncProviders; private _isDisposed; constructor(_toolsService: ILanguageModelToolsService, _storageService: IStorageService, _instantiationService: IInstantiationService, _toolSetEnablementService: IAgentHostToolSetEnablementService, _uriIdentityService: IUriIdentityService, _environmentService: IWorkbenchEnvironmentService); acquireScope(sessionType: string, roots: readonly URI[]): IAgentCustomizationScope; acquireMcpServerSupportScope(sessionType: string, roots: readonly URI[] | undefined): IAgentHostMcpServerSupportScope | undefined; getSyncProvider(sessionType: string): ICustomizationSyncProvider; getOrigin(syncedUri: URI): ISyncedCustomizationOrigin | undefined; areScopeRootsEqual(first: readonly URI[] | undefined, second: readonly URI[]): boolean; isBundledMcpServer(pluginUri: string, serverName: string): boolean; setSessionTools(sessionResource: URI, toolIds: readonly string[]): void; moveSessionTools(source: URI, target: URI): void; clearSessionTools(sessionResource: URI): void; acquireSessionTools(sessionResource: URI): IReference>; private _getSessionTools; private _getClientTools; dispose(): void; private _removeScope; private _removeMcpServerSupportScope; } /** Returns whether two working-directory sets describe the same customization scope. */ export declare function areCustomizationScopeRootsEqual(first: readonly URI[] | undefined, second: readonly URI[], extUri: IExtUri): boolean;