import type { McpStreamableHttpServerConfig } from './config';
import { McpSdkClient } from './sdk-client';
export type McpDeclaredServerRuntimeStatus = Readonly<{
    serverId: string;
    transport: 'stdio' | 'streamable_http' | 'invalid' | 'unknown';
    status: 'loaded' | 'temporarily_unavailable' | 'config_invalid' | 'disabled';
    errorText?: string;
}>;
export declare function isMcpToolsetLeasedToDialog(serverId: string, dialogKey: string): boolean;
export declare function releaseMcpToolsetLeaseForDialog(serverId: string, dialogKey: string): {
    ok: true;
    released: boolean;
} | {
    ok: false;
    errorText: string;
};
export declare function getMcpRuntimeLeasesForDialog(dialogKey: string): ReadonlyArray<{
    serverId: string;
    transport: 'stdio' | 'streamable_http';
}>;
export declare function withMcpCatalogClient<T>(serverId: string, fn: (client: McpSdkClient) => Promise<T>): Promise<T>;
export declare function getMcpDeclaredServerRuntimeStatuses(): readonly McpDeclaredServerRuntimeStatus[];
export declare function startMcpSupervisor(): void;
export declare function stopMcpSupervisor(): void;
export declare function requestMcpServerRestart(serverId: string): Promise<{
    ok: true;
} | {
    ok: false;
    errorText: string;
}>;
export declare function requestMcpServerDisable(serverId: string): Promise<{
    ok: true;
} | {
    ok: false;
    errorText: string;
}>;
export declare function requestMcpConfigReload(reason?: string): Promise<{
    ok: true;
} | {
    ok: false;
    errorText: string;
}>;
export declare function buildHttpHeaders(cfg: McpStreamableHttpServerConfig, serverId: string): Record<string, string>;
