export { ALLURE_AGENT_STATE_DIR_ENV, resolveAgentStateDir } from "./utils.js"; export type AgentRunState = { schema: "allure-agent-run/v1"; runId: string; cwd: string; outputDir: string; managedOutput: boolean; expectationsPath?: string; command: string; startedAt: number; finishedAt?: number; status: "running" | "finished"; exitCode?: number | null; pid?: number; }; export type AgentLatestState = AgentRunState; export type AgentStateCleanupResult = { deleted: AgentRunState[]; failed: { state: AgentRunState; error: unknown; }[]; retained: AgentRunState[]; }; export type AgentOrphanOutputCleanupResult = { deleted: string[]; failed: { outputDir: string; error: unknown; }[]; retained: string[]; }; export type AgentStaleStateCleanupResult = AgentStateCleanupResult & { checked: number; orphaned: AgentOrphanOutputCleanupResult; skipped: { cwd: string; statePath: string; reason: "locked"; }[]; }; export declare const writeAgentRunState: (value: Omit) => Promise; export declare const writeLatestAgentState: (value: Omit) => Promise; export declare const readAgentRunStates: (cwd: string) => Promise; export declare const readLatestAgentState: (cwd: string) => Promise; export declare const cleanupAgentRunState: (params: { cwd: string; currentRunId?: string; keepManagedRuns?: number; managedOutputGraceMs?: number; now?: number; }) => Promise; export declare const cleanupStaleAgentRunStates: (params: { cwd: string; currentRunId?: string; staleOutputTtlMs?: number; now?: number; }) => Promise;