/** * Agent Service * SSE-based streaming agent service for communicating with Paean AI cloud */ import type { CliModeOptions } from './cli-mode.js'; import type { AgentStreamCallbacks, McpState, McpToolResult } from './types.js'; /** * Extract a human-readable error message from an unknown value. * Handles: string, Error, { error: string | { message } }, { message }, plain objects. */ export declare function extractErrorMessage(value: unknown): string; /** CLI model tier: Paean Lite / Flash / Pro */ export type CliModelTier = 'lite' | 'flash' | 'pro'; /** * Stream options for agent messages */ export interface StreamOptions { conversationId?: string; mcpState?: McpState; cliMode?: Partial; references?: Array<{ type: string; id: string; content?: string; }>; modelTier?: CliModelTier; } /** * Agent Service class for streaming communication */ export declare class AgentService { private abortController; /** * Stream a message to the agent and handle SSE events */ streamMessage(message: string, callbacks: AgentStreamCallbacks, options?: StreamOptions): Promise<{ abort: () => void; }>; /** * Process SSE stream */ private processStream; /** * Handle individual SSE events */ private handleEvent; /** * Submit MCP tool result back to the API */ submitMcpResult(conversationId: string, callId: string, result: McpToolResult): Promise; /** * Abort the current stream */ abort(): void; } export declare const agentService: AgentService; //# sourceMappingURL=service.d.ts.map