import type { NativeHistoryConfig } from './types.js';
import type { NativeHistoryInput } from './native-history-executor.js';
export interface BackgroundTaskDetection {
    active: boolean;
    count: number;
    ids: string[];
}
/**
 * Detect whether the claude-cli session's active transcript has ≥1
 * unresolved background bash `tool_use` (a run_in_background Bash whose
 * completion tool_result / BashOutput has not yet appeared).
 *
 * Returns `{ active:false }` for every non-claude-cli agent, any read/parse
 * failure, and whenever no clear background bash is in flight.
 */
export declare function detectBackgroundTaskActive(cfg: NativeHistoryConfig | undefined, input: NativeHistoryInput): BackgroundTaskDetection;
/**
 * Core detection over already-parsed JSONL records (oldest→newest). Exposed
 * for tests so the pairing logic can be exercised without touching disk.
 *
 * A tool_use qualifies as a background bash only when it is a Bash tool_use
 * whose input carries `run_in_background: true`. Its completion is any later
 * `tool_result` with the same `tool_use_id`, OR a later `BashOutput` tool_use
 * whose input references the same `bash_id` (claude polls a background job via
 * BashOutput; but a resolved job also yields a tool_result for the original
 * launch id, which is the primary signal). A launch whose tool_result never
 * arrived in the scanned tail is treated as still-running.
 */
export declare function detectFromRecords(records: unknown[]): BackgroundTaskDetection;
