/**
 * Catch-up digest extractors.
 *
 * Pure functions that turn a session's events into the signals a developer needs
 * to reload a task fast when switching between many agents: which files changed
 * and how (created / modified / deleted), which tools dominated the work, and the
 * last test/build result. Consumed by the single-session view and the picker
 * preview. No I/O — fully unit-testable.
 */
import type { SessionEvent } from './types.js';
export type FileOp = 'created' | 'modified' | 'deleted';
export interface FileChange {
    path: string;
    op: FileOp;
}
export declare const READ_TOOLS: Set<string>;
export declare const WRITE_TOOLS: Set<string>;
export declare const EDIT_TOOLS: Set<string>;
/**
 * Path-shaped noise that must never surface as a session "change": shell
 * redirect tokens (`2>&1`), unexpanded env-var prefixes (`$WT/...`), dependency
 * dirs (`node_modules`), and agents-cli's internal `.system` marker. Filtered at
 * the source so every consumer (summary, picker, digest counts) agrees.
 */
export declare function isNoisePath(p: string): boolean;
/** Extract file paths deleted by a shell command (rm / git rm / unlink). Conservative. */
export declare function extractDeletedPaths(command: string): string[];
/**
 * Classify every touched file as created / modified / deleted from the event
 * stream. Heuristics: a Write to a path never previously Read and not seen
 * before is a *creation*; an Edit (or a Write to a known/read path) is a
 * *modification*; a path in an `rm`/`git rm` command is a *deletion* (and wins
 * over create/modify — a created-then-deleted file nets to gone). Plan files
 * (`.claude/plans/*.md`) are excluded; they're surfaced by detectPlan.
 */
export declare function classifyFileChanges(events: SessionEvent[]): FileChange[];
/** Net change summary: counts per op. */
export declare function changeCounts(changes: FileChange[]): {
    created: number;
    modified: number;
    deleted: number;
};
/** Tool histogram sorted highest-first, capped to `top` entries. */
export declare function toolHistogram(toolCounts: Record<string, number>, top?: number): Array<{
    tool: string;
    count: number;
}>;
/**
 * Aggregate recognized external tools invoked via Bash across a session.
 * Unknown one-off commands are bucketed as `other` so the ranking surface
 * only surfaces repeatable tools.
 */
export declare function bashToolCounts(events: SessionEvent[]): Record<string, number>;
export interface TestResult {
    runner: string;
    passed?: number;
    failed?: number;
    /** True when we could parse a pass/fail verdict. */
    ok: boolean;
    ts: number;
}
/**
 * The most recent test/build run and its verdict. Correlates a runner command
 * (tool_use) with the next tool_result's output. Returns undefined if none ran.
 */
export declare function detectTestResult(events: SessionEvent[]): TestResult | undefined;
