/** * query() — The main entry point for creating a Qoder Agent SDK query. * * This function: * 1. Parses the Options object * 2. Resolves the CLI path * 3. Separates SDK MCP servers (in-process) from process-based MCP servers * 4. Creates the configured query transport with all launch options * 5. Creates a QueryRunner with transport and callbacks * 6. If prompt is a string, writes the initial user message * 7. If prompt is an AsyncIterable, calls streamInput to wire it up * 8. Returns the QueryRunner as a Query * * @example Single-turn (string prompt) * ```ts * const q = query({ * prompt: 'What is the capital of France?', * options: { model: 'performance' }, * }); * * for await (const msg of q) { * if (msg.type === 'assistant') console.log(msg); * } * ``` * * @example Multi-turn (async iterable) * ```ts * async function* conversation() { * yield { type: 'user', message: { role: 'user', content: [{ type: 'text', text: 'Hello' }] }, parent_tool_use_id: null }; * // ... yield more messages based on responses * } * * const q = query({ prompt: conversation(), options: { ... } }); * for await (const msg of q) { ... } * ``` */ import type { Options, Query } from '../types/options.js'; import type { SDKUserMessage } from '../types/messages.js'; /** * Create and start a new query session. * * @param params.prompt - Either a string prompt (single-turn) or an * async iterable of user messages (multi-turn / streaming) * @param params.options - Optional configuration for the session * @returns A Query (AsyncGenerator) with control methods */ export declare function query(params: { prompt: string | AsyncIterable; options?: Options; }): Query;