/**
 * Transcript-derived active task (T-ATM ATM.1).
 *
 * THIS Claude Code version keeps the task list in the session transcript
 * (`.jsonl`), NOT at `~/.claude/tasks/<session>/<id>.json` (that path is empty
 * for live sessions). So the active-task signal must be derived from the
 * transcript the PreToolUse hook receives:
 *   - `TaskCreate` tool_use carries `input.{subject,metadata}` + a `tool_use_id`;
 *     the harness-assigned id is in the matching `tool_result` text
 *     ("Task #<id> created …") — correlate by `tool_use_id`.
 *   - `TaskUpdate` tool_use carries `{taskId, status, metadata}`.
 * The active task = the one most-recently set `in_progress` and not since
 * `completed`/`deleted`.
 *
 * Defensive per-line parse (the transcript schema is harness-owned + can shift):
 * any failure resolves to `null` (no active task) — NEVER a wrong task.
 *
 * Imports from: node:fs/promises, ../session_state.js.
 * Imported by: src/runtime/hooks/active_task_mirror.ts.
 */
import type { ActiveTask } from '../session_state.js';
/** The in-flight TaskUpdate that triggered THIS PreToolUse — not yet in the
 *  transcript (PreToolUse fires pre-execution). Overlaid last (H4a).
 *  T-FIX-TASKSTART-GUARD-MIRROR: `status` is optional — a metadata-only
 *  TaskUpdate is a real mutation and must be overlaid too. */
export interface PendingUpdate {
    taskId: string;
    status?: string;
    metadata?: Record<string, unknown>;
}
/**
 * Resolve the active task from the session transcript, or `null` if none /
 * unreadable. Most-recent `in_progress` (not later closed) wins. `pending`
 * overlays the in-flight TaskUpdate (H4a) so a task being activated THIS tick
 * wins even though disk/transcript still lags.
 */
export declare function readActiveTaskFromTranscript(transcriptPath: string, pending?: PendingUpdate): Promise<ActiveTask | null>;
/**
 * Latest transcript status for one harness task id (with the in-flight TaskUpdate
 * overlaid, H4a), or `null` if the id is absent/unreadable. Reuses the ATM.1 walk —
 * no forked semantics. FC.6 uses this to tell genuine transcript lag (prior still
 * `pending`/`in_progress`) from a real completion (clear).
 */
export declare function transcriptTaskStatus(transcriptPath: string, id: string, pending?: PendingUpdate): Promise<string | null>;
/**
 * A CLOSED status is the only case where a stale prior active-task signal must be
 * cleared. `null` (transcript hasn't caught up — genuine lag) and the open statuses
 * (`pending`/`in_progress`) both KEEP, so the ATM.3 lag-keep is preserved; only an
 * explicit `completed`/`deleted` clears (FC.6).
 */
export declare const isClosedStatus: (s: string | null) => boolean;
/** An OPEN task (latest status `pending`|`in_progress`) + its generator provenance. */
export interface OpenTask {
    id: string;
    status: string;
    taskId?: string;
}
/**
 * The OPEN tasks from the transcript (latest status ∈ {`pending`,
 * `in_progress`}), each with its `metadata.taskId` provenance if present.
 * Consumed by Gate B (`task_list_generated`) to flag tasks smuggled into the
 * list without going through scope→task-spec-author. Empty on an unreadable
 * transcript (fail-open). Shares the ATM.1 walk via `parseTranscriptTasks`.
 */
export declare function readOpenTasksFromTranscript(transcriptPath: string, pending?: PendingUpdate): Promise<OpenTask[]>;
//# sourceMappingURL=transcript_tasks.d.ts.map