/** * A2A (Agent-to-Agent) — remote agent communication. * * Mirrors Python's `RemoteAgent`, `A2AServer`, and `AgentRegistry`. The TS * port is interface-only at this stage: it produces tagged config objects * that a future runtime layer (or `.native()` hook) can wire to a real * A2A transport. The fluent surface is identical to the Python version. */ import { BuilderBase } from "../core/builder-base.js"; /** * Consume a remote A2A agent. Behaves like a regular builder so it can be * used inside Pipeline / FanOut / Loop / Fallback chains. * * const remote = new RemoteAgent("researcher", { * agentCard: "http://researcher:8001/.well-known/agent.json", * }) * .describe("Remote research specialist") * .timeout(30) * .sends("query") * .receives("findings") * .persistentContext(); */ export interface RemoteAgentOptions { agentCard?: string; env?: string; } export declare class RemoteAgent extends BuilderBase> { constructor(name: string, opts?: RemoteAgentOptions); describe(text: string): this; timeout(seconds: number): this; /** State keys to serialize into the outgoing A2A message. */ sends(...keys: string[]): this; /** State keys to deserialize from the A2A response. */ receives(...keys: string[]): this; /** Maintain ``contextId`` across calls in the same session. */ persistentContext(enabled?: boolean): this; build(): Record; /** Discover a remote agent via DNS-based ``.well-known`` lookup. */ static discover(host: string, name?: string): RemoteAgent; } /** * Publish a local agent via the A2A protocol. * * const server = new A2AServer(myAgent) * .port(8001) * .version("1.0.0") * .provider("Acme Corp", "https://acme.com") * .skill("research", "Academic Research", { tags: ["citations"] }) * .healthCheck() * .gracefulShutdown(30); */ export declare class A2AServer extends BuilderBase> { private _agent; private _skills; private _provider; constructor(agent: BuilderBase | unknown, name?: string); protected _clone(): this; port(p: number): this; version(v: string): this; provider(name: string, url?: string): this; skill(id: string, title: string, opts?: { description?: string; tags?: string[]; }): this; healthCheck(enabled?: boolean): this; gracefulShutdown(timeoutSeconds?: number): this; build(): Record; } /** * Registry-based discovery of remote agents. * * const registry = new AgentRegistry("http://registry:9000"); * const remote = await registry.find({ name: "researcher" }); */ export declare class AgentRegistry { readonly url: string; constructor(url: string); /** * Look up a remote agent by name. Returns a stub ``RemoteAgent`` * pre-configured with the registry-provided agent-card URL. * * The runtime layer is responsible for actually contacting the registry * — this stub records the lookup metadata. */ find(query?: { name?: string; tags?: string[]; }): RemoteAgent; } //# sourceMappingURL=index.d.ts.map