/**
 * StreamJsonParser — parses Claude CLI stream-json NDJSON output into
 * typed StreamEvent values.
 *
 * Extracted from the duplicated parsing logic in platform's claude.ts
 * and cli-session.ts. Handles:
 * - stream_event wrapper unwrapping
 * - content_block lifecycle (text, tool_use, thinking)
 * - Tool argument accumulation (input_json_delta → tool_use_end)
 * - Tool result blocks from CLI's internal tool loop (user events)
 * - Usage tracking from message_start, message_delta, and result
 * - result event as text fallback and turn boundary
 *
 * The parser does NOT decide turn boundaries — consumers (one-shot vs
 * persistent session) handle that differently.
 */
import type { StreamEvent } from './types.js';
export type EventCallback = (event: StreamEvent) => void;
export declare class StreamJsonParser {
    private pushEvent;
    private hasAssistantText;
    private insideToolUse;
    private activeToolJsonChunks;
    constructor(pushEvent: EventCallback);
    /** Reset per-turn state. Call before starting a new turn in persistent sessions. */
    reset(): void;
    /** Whether any text_delta events have been emitted this turn. */
    get hasText(): boolean;
    /**
     * Feed a single NDJSON line (without trailing newline).
     * Parses and emits StreamEvent(s) via the callback.
     */
    feed(line: string): void;
    private processEvent;
}
//# sourceMappingURL=streaming.d.ts.map