import type { ChatMessage } from '../../../core/types.js'; import type { ACPAgentConfig, ACPManifest } from './types.js'; /** * Build auth headers from ACP config. Extracted as a shared helper * so both ACPClient and CLI config validation use the same logic. */ export declare function buildAuthHeaders(config: { auth?: ACPAgentConfig['auth']; }): Record | undefined; /** Merge caller abort with the hard timeout. Node 22+ provides AbortSignal.any. */ export declare function mergeAbortSignals(...signals: Array): AbortSignal; export declare class ACPClient { private baseUrl; private authHeaders?; private manifest?; constructor(config: ACPAgentConfig); /** Fetch and cache the Agent Manifest (GET /agent/card) */ fetchManifest(): Promise; /** Check if the agent endpoint is reachable */ healthCheck(): Promise; /** * Send prompt and stream response chunks via SSE. * Parses Server-Sent Events per the W3C spec: * - Multiple `data:` lines for a single event are joined with newlines * - Events separated by blank lines * * `sessionId` is forwarded as `session_id` in the request body so the * remote agent can persist context across turns (P2-C). * `signal` aborts the underlying fetch (merged with the 5min hard timeout). */ streamPrompt(prompt: string, history?: ChatMessage[], sessionId?: string, signal?: AbortSignal): AsyncGenerator; /** Send prompt and wait for complete response (non-streaming fallback) */ sendPromptSync(prompt: string, history?: ChatMessage[], sessionId?: string, signal?: AbortSignal): Promise; } //# sourceMappingURL=acp-client.d.ts.map