import { type JwkSet } from './jws.js'; import type { AgentCard } from './types.js'; export interface FetchAgentCardOptions { /** Pre-loaded JWKS — preferred when the JWKS path is known up-front. */ jwks?: JwkSet; /** File path or URL to the JWKS. Resolved if `jwks` is not set and * verification is requested. */ jwksSource?: string; /** Bearer token, if the card endpoint requires one. */ bearer?: string; /** Skip JWS verification (NOT recommended; reserved for bootstrap flows). */ skipVerify?: boolean; /** Custom fetch implementation. */ fetch?: typeof fetch; /** AbortSignal. */ signal?: AbortSignal; } export interface VerifiedAgentCard { card: AgentCard; /** RFC 3339 timestamp of when this card was fetched and verified. */ verifiedAt: string; /** The `kid` from the JWS header used to verify; undefined when skipVerify. */ kid?: string; /** Raw bytes of the card as served (preserved for re-verification). */ raw: string; } export declare class AgentCardCache { private readonly ttlMs; private readonly entries; constructor(ttlMs?: number); get(key: string): VerifiedAgentCard | undefined; set(key: string, verified: VerifiedAgentCard): void; /** Invalidate a single instance (call this on `instance state change` events). */ invalidate(key: string): void; clear(): void; size(): number; } /** * Fetch + verify an AgentCard. Bypasses any cache the caller may have. * Throws on fetch failure or signature mismatch. */ export declare function fetchAgentCard(host: string, instanceId: string, opts?: FetchAgentCardOptions): Promise; /** * Cache-aware variant: returns the cached entry when fresh, otherwise * fetches and stores. Cache key is `${host}|${instanceId}`. */ export declare function fetchAgentCardCached(cache: AgentCardCache, host: string, instanceId: string, opts?: FetchAgentCardOptions): Promise; /** * Extract the required-set extension URIs from an AgentCard. * Used by A2AClient to know which `A2A-Extensions: ` values to inject * on every mutating call (#1254). */ export declare function requiredExtensionUris(card: AgentCard): string[]; //# sourceMappingURL=agent-card.d.ts.map