/** Upper bound on how long a single turn's wait for `result` may run before * the mid-session silence watchdog (below) considers qwen wedged. */ export declare const SETTLE_TIMEOUT_MS: number; export declare const STARTUP_GRACE_MS = 45000; export interface QwenRpcContentBlock { type: string; text?: string; thinking?: string; } export 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; /** Optional so the test fakes stay minimal; the real ChildProcess has it. */ on?(event: 'error', cb: (err: Error) => void): 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 const defaultSpawnQwenRpc: SpawnQwenRpc; //# sourceMappingURL=qwen-rpc-runner-helpers.d.ts.map