/**
 * Boulder State Storage
 *
 * Handles reading/writing boulder.json for active plan tracking.
 */
import type { BoulderSessionOrigin, BoulderState, BoulderWorkResumeOption, BoulderWorkState, PlanProgress, TaskSessionState } from "./types";
export declare function getBoulderFilePath(directory: string): string;
export declare function resolveBoulderPlanPath(directory: string, state: Pick<BoulderState, "active_plan" | "worktree_path">): string;
export declare function readBoulderState(directory: string): BoulderState | null;
export declare function writeBoulderState(directory: string, state: BoulderState): boolean;
export declare function appendSessionId(directory: string, sessionId: string, origin?: "direct" | "appended"): BoulderState | null;
export declare function clearBoulderState(directory: string): boolean;
export declare function getTaskSessionState(directory: string, taskKey: string): TaskSessionState | null;
export declare function upsertTaskSessionState(directory: string, input: {
    taskKey: string;
    taskLabel: string;
    taskTitle: string;
    sessionId: string;
    agent?: string;
    category?: string;
}): BoulderState | null;
/**
 * Find Prometheus plan files for this project.
 * Prometheus stores plans at: {project}/.omo/plans/{name}.md
 */
export declare function findPrometheusPlans(directory: string): string[];
/**
 * Parse a plan file and count checkbox progress.
 *
 * Only top-level (zero-indent) checkboxes under `## TODOs` and
 * `## Final Verification Wave` sections are counted. The checkbox
 * body must carry a valid task label (`N.` for TODOs, `FN.` for
 * Final Verification Wave). Nested acceptance-criteria checkboxes
 * and checkboxes in other sections are intentionally ignored so
 * that progress tracking stays aligned with `readCurrentTopLevelTask`.
 */
export declare function getPlanProgress(planPath: string): PlanProgress;
/**
 * Extract plan name from file path.
 */
export declare function getPlanName(planPath: string): string;
/**
 * Create a new boulder state for a plan.
 */
export declare function createBoulderState(planPath: string, sessionId: string, agent?: string, worktreePath?: string): BoulderState;
export declare function generateWorkId(planName: string): string;
export declare function getBoulderWorks(state: BoulderState): BoulderWorkState[];
export declare function getActiveWorks(directory: string): BoulderWorkState[];
export declare function getWorkById(directory: string, workId: string): BoulderWorkState | null;
export declare function getWorkByPlanName(directory: string, planName: string, options?: {
    worktreePath?: string;
}): BoulderWorkState | null;
export declare function getWorkForSession(directory: string, sessionId: string): BoulderWorkState | null;
export declare function resolveBoulderPlanPathForWork(directory: string, work: Pick<BoulderWorkState, "active_plan" | "worktree_path">): string;
export declare function getWorkResumeOptions(directory: string): BoulderWorkResumeOption[];
export declare function selectActiveWork(directory: string, workId: string): BoulderState | null;
export declare function addBoulderWork(directory: string, input: {
    planPath: string;
    sessionId: string;
    agent?: string;
    worktreePath?: string;
    startedAt?: string;
}): BoulderState | null;
export declare function appendSessionIdForWork(directory: string, workId: string, sessionId: string, origin?: BoulderSessionOrigin): BoulderState | null;
export declare function upsertTaskSessionStateForWork(directory: string, workId: string, input: {
    taskKey: string;
    taskLabel: string;
    taskTitle: string;
    sessionId: string;
    agent?: string;
    category?: string;
}): BoulderState | null;
export declare function startTaskTimer(directory: string, workId: string, input: {
    taskKey: string;
    taskLabel: string;
    taskTitle: string;
    sessionId: string;
    agent?: string;
    category?: string;
    startedAt?: string;
}): BoulderState | null;
export declare function endTaskTimer(directory: string, workId: string, taskKey: string, endedAt?: string): BoulderState | null;
export declare function completeBoulder(directory: string, workId?: string, endedAt?: string): BoulderState | null;
