import { ae as AgentCard } from './extensions-DvruCIzw.cjs'; /** * Agent Card Utilities * * This module contains shared agent card handling logic. * Server-specific adapters should use these functions to retrieve * agent cards consistently across all implementations. */ /** * Provider for agent card data. * Can be either: * - An object with a `getAgentCard()` method (like A2ARequestHandler) * - A function that returns a Promise */ type AgentCardProvider = { getAgentCard(): Promise; } | (() => Promise); /** * Result of fetching an agent card. */ interface AgentCardResult { success: true; agentCard: AgentCard; } /** * Error result when fetching agent card fails. */ interface AgentCardErrorResult { success: false; error: string; } /** * Union type for agent card fetch results. */ type AgentCardFetchResult = AgentCardResult | AgentCardErrorResult; /** * Resolves an AgentCardProvider to a function. * * @param provider - The agent card provider (object or function) * @returns A function that returns Promise */ declare function resolveAgentCardProvider(provider: AgentCardProvider): () => Promise; /** * Fetches an agent card from the provider. * * This is the core business logic that all server adapters should use. * It handles error wrapping consistently. * * @param provider - The agent card provider * @returns The agent card or an error result */ declare function fetchAgentCard(provider: AgentCardProvider): Promise; export { type AgentCardProvider as A, type AgentCardResult as a, type AgentCardErrorResult as b, type AgentCardFetchResult as c, fetchAgentCard as f, resolveAgentCardProvider as r };