import { type McpCachedServerCatalog, type McpCatalogCacheFile } from "./catalog-cache.ts";
import type { McpServerDeclaredConfig } from "./config-schema.ts";
export interface McpCacheIdentity {
    readonly configHash: string;
    readonly credentialIdentity: string;
}
export interface McpCacheAdoption {
    readonly cache: McpCatalogCacheFile;
    readonly agentDir: string | undefined;
    readonly serverName: string;
    readonly current: McpCacheIdentity;
    readonly legacy: () => McpCacheIdentity | undefined;
}
/** The identities an earlier, unkeyed build persisted for this server, when its credential resolves now. */
export declare function legacyMcpCacheIdentity(config: McpServerDeclaredConfig, serverName: string, scope: {
    readonly agentDir?: string;
    readonly env?: Record<string, string | undefined>;
}): McpCacheIdentity | undefined;
/**
 * The cached catalog for the current keyed identity. An entry written under the unkeyed identities is adopted only
 * when both its config and its credential match, so a changed account never inherits another account's catalog,
 * and it is rewritten under the keyed identities.
 */
export declare function adoptMcpCachedServer(adoption: McpCacheAdoption): Promise<McpCachedServerCatalog | undefined>;
//# sourceMappingURL=catalog-cache-adoption.d.ts.map