import type { AgentMessage, AgentRunArgs, AgentRunner } from './agent-runner.js'; interface QwenRpcContentBlock { type: string; text?: string; thinking?: string; } interface QwenRpcMessage { content?: QwenRpcContentBlock[]; } /** Pure, transport-independent JSONL line decoder — same shape as * pi-rpc-runner.ts's JsonlDecoder. Exported for unit testing without a * real subprocess. */ export declare class QwenJsonlDecoder { private buf; feed(chunk: string): Record[]; } /** Encode a client→server `user` message as one LF-terminated JSON line — * the plain-string content form (see file header for why the * content-block-array form isn't used). Exported for unit testing the * exact wire format. */ export declare function encodeQwenRpcUserMessage(text: string): string; /** Extract assistant-visible text from an `assistant` event's * `message.content` array. `thinking` blocks are dropped (internal * reasoning, not meant for the bus). Exported for unit testing against * fixture content arrays. */ export declare function extractQwenRpcText(message: QwenRpcMessage): string; /** The subset of a spawned child process this runner needs — same * duck-typed seam as pi-rpc-runner.ts's PiRpcProcess, so tests can supply * a fake implementation to exercise the full turn-completion state * machine without a real `qwen` binary. */ export interface QwenRpcProcess { stdin: { write(data: string): void; } | null; stdout: { on(event: 'data', cb: (chunk: Buffer) => void): void; } | null; stderr: { on(event: 'data', cb: (chunk: Buffer) => void): void; } | null; on(event: 'close', cb: (code: number | null) => void): void; on(event: 'error', cb: (err: Error) => void): void; kill(signal?: string): void; } export type SpawnQwenRpc = (bin: string, args: string[], opts: { cwd: string; env: Record; }) => QwenRpcProcess; export declare class QwenRpcAgentRunner implements AgentRunner { private qwenBin?; private spawnFn; constructor(qwenBin?: string | undefined, spawnFn?: SpawnQwenRpc); run(args: AgentRunArgs): AsyncIterable; } export {}; //# sourceMappingURL=qwen-rpc-runner.d.ts.map