/**
 * Run session reader for interactive mode
 *
 * Scans .takt/runs/ for recent runs, loads NDJSON logs and reports,
 * and formats them for injection into the interactive system prompt.
 */
import type { SessionLog } from '../../shared/utils/index.js';
/** Summary of a run for selection UI */
export interface RunSummary {
    readonly slug: string;
    readonly task: string;
    readonly workflow: string;
    readonly status: string;
    readonly startTime: string;
}
/** A single step log entry for display */
type SessionHistoryEntry = SessionLog['history'][number];
interface StepLogEntry {
    readonly step: string;
    readonly persona: string;
    readonly status: string;
    readonly content: string;
    readonly workflow?: SessionHistoryEntry['workflow'];
    readonly stack?: SessionHistoryEntry['stack'];
}
/** A report file entry */
interface ReportEntry {
    readonly filename: string;
    readonly content: string;
}
/** Full context loaded from a run for prompt injection */
export interface RunSessionContext {
    readonly task: string;
    readonly workflow: string;
    readonly status: string;
    readonly stepLogs: readonly StepLogEntry[];
    readonly reports: readonly ReportEntry[];
}
/** Absolute paths to a run's logs and reports directories */
export interface RunPaths {
    readonly logsDir: string;
    readonly reportsDir: string;
}
/**
 * List recent runs sorted by startTime descending.
 */
export declare function listRecentRuns(cwd: string): RunSummary[];
/**
 * Find the most recent run matching the given task content.
 *
 * @returns The run slug if found, null otherwise.
 */
export declare function findRunForTask(cwd: string, taskContent: string): string | null;
/**
 * Get absolute paths to a run's logs and reports directories.
 */
export declare function getRunPaths(cwd: string, slug: string): RunPaths;
/**
 * Load full run session context for prompt injection.
 */
export declare function loadRunSessionContext(cwd: string, slug: string): RunSessionContext;
/**
 * Load the previous order.md content from the run directory.
 *
 * Uses findRunForTask to locate the matching run by task content,
 * then reads order.md from its context/task directory.
 *
 * @returns The order.md content if found, null otherwise.
 */
export declare function loadPreviousOrderContent(cwd: string, taskContent: string): string | null;
/**
 * Format run session context into a text block for the system prompt.
 */
export declare function formatRunSessionForPrompt(ctx: RunSessionContext): {
    runTask: string;
    runWorkflow: string;
    runStatus: string;
    runStepLogs: string;
    runReports: string;
};
export {};
//# sourceMappingURL=runSessionReader.d.ts.map