/** * a2a/client.ts — AIBroker as an A2A client: task an OUTSIDE agent's * exposed skill and poll for its answer. * * Fetch-only, no dependencies, works against any A2A v0.3.0 server — * that is the point of `aibroker a2a check` in a2a-cli.ts, which runs * this client against an arbitrary remote agent and reports pass/fail per * step rather than assuming aibroker's own server is the only target. */ import type { AgentCard, Task } from "./schema/types.js"; export interface FetchAgentCardResult { ok: boolean; card?: AgentCard; errors: string[]; } /** GET /.well-known/agent-card.json, validated against the vendored schema. */ export declare function fetchAgentCard(baseUrl: string): Promise; export interface SendMessageResult { ok: boolean; task?: Task; error?: string; } export interface SendMessageOptions { /** Which exposed skill/session to target. Optional because a generic A2A * agent — the target of `aibroker a2a check` — need not have this concept * at all; aibroker's own server requires it (or message.metadata.session). */ skillId?: string; text: string; /** Tag the text part as an AG2 (Agentish v2) message per the extension. */ ag2?: boolean; token?: string; contextId?: string; agentName?: string; } export declare function sendMessage(a2aUrl: string, opts: SendMessageOptions): Promise; export declare function getTask(a2aUrl: string, taskId: string, token?: string): Promise; export declare function cancelTask(a2aUrl: string, taskId: string, token?: string): Promise; export interface PollOptions { intervalMs?: number; timeoutMs?: number; token?: string; } /** Poll tasks/get until the task reaches a terminal state or the timeout elapses. */ export declare function pollUntilDone(a2aUrl: string, taskId: string, opts?: PollOptions): Promise; //# sourceMappingURL=client.d.ts.map