import { type Envelope } from '@redonvn/cli-protocol'; /** * Route inbound TOOL_CALL envelope → đúng tool implementation. * * Trả về tuple { ok, result } | { ok:false, error } để daemon emit lại * TOOL_RESULT về backend. * * `onStream` (optional): daemon truyền callback để LLMRequest (stream=true) * forward SSE chunks qua TOOL_STREAM event ngược lên BE. */ export declare function handleToolCall(env: Envelope, opts?: { onStream?: (chunk: string) => void; }): Promise<{ ok: boolean; result?: unknown; error?: string; }>;