import { Event } from "../../../../base/common/event.js";
import { IDisposable } from "../../../../base/common/lifecycle.js";
import { IObservable } from "../../../../base/common/observable.js";
import { ILogger, LogLevel } from "../../../../platform/log/common/log.js";
import { McpCollectionDefinition, McpCollectionReference, McpConnectionState, McpDefinitionReference, McpServerDefinition, McpServerLaunch } from "./mcpTypes.js";
import { MCP } from "@codingame/monaco-vscode-mcp-service-override/vscode/vs/workbench/contrib/mcp/common/modelContextProtocol";
export interface IMcpMessageTransport extends IDisposable {
    readonly state: IObservable<McpConnectionState>;
    readonly onDidLog: Event<{
        level: LogLevel;
        message: string;
    }>;
    readonly onDidReceiveMessage: Event<MCP.JSONRPCMessage>;
    send(message: MCP.JSONRPCMessage): void;
    stop(): void;
}
export interface IMcpHostDelegate {
    readonly priority: number;
    waitForInitialProviderPromises(): Promise<void>;
    canStart(collectionDefinition: McpCollectionDefinition, serverDefinition: McpServerDefinition): boolean;
    start(collectionDefinition: McpCollectionDefinition, serverDefinition: McpServerDefinition, resolvedLaunch: McpServerLaunch): IMcpMessageTransport;
}
export interface IMcpResolveConnectionOptions {
    logger: ILogger;
    collectionRef: McpCollectionReference;
    definitionRef: McpDefinitionReference;
    forceTrust?: boolean;
}
