import type { Client } from "@modelcontextprotocol/sdk/client/index.js";
import type { McpServerDeclaredConfig } from "./config-schema.ts";
import type { ServerConnection } from "./connection.ts";
import type { McpListedTool as ListedTool } from "./tool-contracts.ts";
type ListedResource = Awaited<ReturnType<Client["listResources"]>>["resources"][number];
type ListedResourceTemplate = Awaited<ReturnType<Client["listResourceTemplates"]>>["resourceTemplates"][number];
type ListedPrompt = Awaited<ReturnType<Client["listPrompts"]>>["prompts"][number];
export interface McpCatalogCacheFile {
    readonly version: 1;
    readonly servers: Record<string, McpCachedServerCatalog>;
}
export interface McpCachedServerCatalog {
    readonly modern?: boolean;
    readonly configHash: string;
    readonly credentialIdentity?: string;
    readonly fetchedAt: number;
    readonly tools: ListedTool[];
    readonly resources: ListedResource[];
    readonly resourceTemplates?: ListedResourceTemplate[];
    readonly prompts: ListedPrompt[];
    readonly instructions?: string;
}
export declare function getMcpCatalogCachePath(agentDir?: string): string;
export declare function readMcpCatalogCache(agentDir?: string): Promise<McpCatalogCacheFile>;
export declare function getValidCachedServer(cache: McpCatalogCacheFile, serverName: string, configHash: string, credentialIdentity?: string): McpCachedServerCatalog | undefined;
export declare function cachedCatalogNeedsRefresh(cached: McpCachedServerCatalog, now?: number): boolean;
export declare function collectServerCatalogForCache(connection: ServerConnection, config: Pick<McpServerDeclaredConfig, "requestTimeoutMs">, configHash: string, credentialIdentity?: string): Promise<McpCachedServerCatalog>;
export declare function writeMcpCachedServer(agentDir: string | undefined, serverName: string, server: McpCachedServerCatalog, isCurrent?: () => boolean): Promise<void>;
export {};
//# sourceMappingURL=catalog-cache.d.ts.map