/**
 * Claude Code session state parser — Phase 2 of issue #27.
 *
 * Reads the TAIL of a session jsonl (last 32KB max) to derive whether
 * Claude Code is currently:
 *
 *   - "working"  — Claude is mid-turn (tool call in flight, or assistant
 *                  streaming, or user just sent something)
 *   - "waiting"  — Claude finished (stopReason: end_turn) and is now
 *                  awaiting the next user message; OR Claude requested a
 *                  tool that needs permission
 *   - "error"    — most recent meaningful line has is_error: true,
 *                  hookErrors > 0, or an explicit error envelope
 *   - "unknown"  — couldn't decide (file empty, malformed, only meta
 *                  entries)
 *
 * ── PRIVACY CONTRACT (extends watcher.ts) ──────────────────────────
 *
 *   We DO read jsonl in this module — necessary to derive state —
 *   but we ONLY ever inspect structural / metadata fields:
 *
 *     • type
 *     • stopReason
 *     • is_error / error
 *     • hookErrors / hookCount
 *     • subtype
 *
 *   We NEVER read, log, transmit, or persist `content`, `text`,
 *   `message.content`, prompts, or replies. The parser destructures
 *   only the fields above and discards the rest. A reviewer can audit
 *   the entire module in 60 seconds — search for `content` or `text`
 *   should produce zero hits except in comments like this one.
 *
 * ── ROBUSTNESS ──────────────────────────────────────────────────────
 *
 *   Claude Code's jsonl format may change between versions. Unknown
 *   shapes return "unknown" rather than throwing. Malformed JSON lines
 *   are skipped. Partial writes during streaming are tolerated (we
 *   take the LAST complete line). File deletion mid-parse returns
 *   "unknown".
 */
import type { SessionActivity } from "../types.js";
export type ClaudeSessionState = "working" | "waiting" | "error" | "unknown";
export interface SessionStateInfo {
    state: ClaudeSessionState;
    /** Short label for tooltips / debugging — never user content. */
    reason: string;
    /**
     * Working directory recorded by Claude Code in the jsonl's `.cwd`
     * field (top-level, schema metadata — not message content). Used
     * by the island UI for the "Open in Finder" / "Copy resume command"
     * actions. May be undefined if the jsonl doesn't include it.
     */
    cwd?: string;
}
export declare function parseSessionState(filePath: string): Promise<SessionStateInfo>;
export declare function parseSessionActivity(filePath: string): Promise<SessionActivity | undefined>;
//# sourceMappingURL=parser.d.ts.map