/** * A2A Agent Card consumption — fetch + validate a remote card and map it * into the bespoke federation registry so A2A peers appear in federation * discovery. Cards only (no A2A Tasks/messaging in this iteration). */ import type { DiscoveryService } from '../domain/services/discovery-service.js'; import type { FederationNode } from '../domain/entities/federation-node.js'; import { type A2AAgentCard } from './agent-card.js'; export interface FetchAgentCardOptions { /** Injectable fetch for tests / restricted environments. Default: globalThis.fetch. */ readonly fetchImpl?: typeof fetch; readonly timeoutMs?: number; /** Response size cap in bytes (defense against decompression floods). Default 256 KiB. */ readonly maxBytes?: number; } export interface FetchAgentCardResult { readonly card: A2AAgentCard; readonly sourceUrl: string; } /** * Resolve the card URL: a bare base URL (`https://host[:port]` or a path-less * URL) gets the A2A well-known path appended; anything already pointing at a * JSON document is used as-is. */ export declare function resolveAgentCardUrl(baseOrCardUrl: string): string; /** Fetch and structurally validate a remote A2A Agent Card. */ export declare function fetchAgentCard(baseOrCardUrl: string, options?: FetchAgentCardOptions): Promise; /** * Fetch a remote Agent Card and register the peer in federation discovery. * The peer enters at TrustLevel.UNTRUSTED (see fromAgentCard) — the card is * self-asserted metadata, and trust is earned through the normal handshake. */ export declare function consumeAgentCard(discovery: DiscoveryService, baseOrCardUrl: string, options?: FetchAgentCardOptions): Promise; //# sourceMappingURL=consume.d.ts.map