import { IReference, IDisposable } from "../../../../../../base/common/lifecycle.js"; import { IObservable } from "../../../../../../base/common/observable.js"; import { ToolDefinition } from "../../../../../../platform/agentHost/common/state/sessionState.js"; import { URI } from "../../../../../../sessions/sessions.web.main.internal.js"; import { IToolData } from "../../../common/tools/languageModelToolsService.js"; import { ChatMcpAppModel } from "../../widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js"; import { IMcpAppRenderData } from "../../widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js"; import { IAgentHostMcpAppToolProvider } from "@codingame/monaco-vscode-chat-service-override/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostMcpAppToolsService"; export declare const IAgentHostMcpAppToolsService: import("../../../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier; /** * Publishes the tools of live MCP Apps as session-scoped client tools of the agent host chat * session the app was rendered in. */ export interface IAgentHostMcpAppToolsService { readonly _serviceBrand: undefined; /** Shares view models and retains hidden tool providers from the latest request and the three most recent apps. */ acquire(renderData: IMcpAppRenderData, toolCallId: string, create: () => ChatMcpAppModel): IReference; /** * Publishes the app's tools to the chat session until the returned * disposable is disposed. When several apps in a session provide a tool * with the same name, the most recently registered app wins. */ registerApp(sessionResource: URI, provider: IAgentHostMcpAppToolProvider): IDisposable; /** Tool definitions shared by frontend chats mapped to the same backend session. */ getToolDefinitions(sessionResource: URI): IObservable; /** Resolves an original app tool name only within its owning session. */ getTool(sessionResource: URI, name: string): IToolData | undefined; /** Resolves the canonical tool-owning session through authoritative connection identities. */ getToolSessionResource(sessionResource: URI): URI; }