import { EventEmitter } from 'events'; import { Router } from 'express'; import { AgentCardRegistry, AgentCard } from './a2a'; export interface A2AHttpServerConfig { card: AgentCard; registry?: AgentCardRegistry; basePath?: string; } export declare class A2AHttpServer extends EventEmitter { readonly router: Router; private card; private registry; private logger; constructor(config: A2AHttpServerConfig); private setupRoutes; /** Update the agent card at runtime */ updateCard(card: Partial): void; getRegistry(): AgentCardRegistry; } export declare class A2AHttpClient { private logger; /** Fetch the agent card from a remote A2A endpoint */ fetchCard(url: string): Promise; /** Discover agents on a remote A2A server */ discover(url: string, query: string): Promise; /** Send an A2A message to a remote agent */ send(url: string, from: string, capability: string, payload: string): Promise<{ status: string; response?: string; error?: string; }>; /** Ping a remote A2A server */ ping(url: string): Promise<{ status: string; agent: string; }>; } export interface RemoteAgent { url: string; card: AgentCard; } export declare class NetworkRegistry extends EventEmitter { private localRegistry; private remotes; private client; private logger; constructor(localRegistry?: AgentCardRegistry); /** Register a local agent */ registerLocal(card: AgentCard): void; /** Register a remote agent by URL — fetches card automatically */ registerRemote(url: string): Promise; /** Unregister an agent by name */ unregister(name: string): void; /** Find agent — check local first, then remote */ get(name: string): { type: 'local' | 'remote'; card: AgentCard; url?: string; } | undefined; /** List all agents (local + remote) */ listAll(): Array<{ type: 'local' | 'remote'; card: AgentCard; url?: string; }>; /** Route a call to local handler or remote HTTP endpoint */ call(from: string, to: string, capability: string, payload: string): Promise<{ status: string; response?: string; error?: string; }>; getLocalRegistry(): AgentCardRegistry; getClient(): A2AHttpClient; } //# sourceMappingURL=a2a-http.d.ts.map