import type { ConductorRunStatus } from "./conductor-types.js"; import type { PersistedRunState } from "./run-persistence.js"; export declare const ISSUE_DELIVERY_STATUS_PATH = ".issue-delivery/status.json"; export declare const CONDUCTOR_STATE_ENV_PATHS: readonly ["state.env", ".issue-delivery/state.env"]; export interface ConductorStateEnvSource { path: string; env: Record; } export interface ConductorReconciliationSignals { /** Back-compat/test shorthand; treated as a single state.env source. */ stateEnv?: Record; stateEnvs?: ConductorStateEnvSource[]; issueDeliveryStatus?: unknown; } export interface ConductorReconciliationDecision { status: PersistedRunState["status"]; semanticStatus: ConductorRunStatus; } /** * Parse a simple KEY=value state.env file. Quoted values are unwrapped, comments * and blank lines are ignored, and malformed lines are skipped. */ export declare function parseConductorStateEnv(text: string): Record; /** * Reconcile a persisted run that was still marked running after its owning * process/pane disappeared. Engine state becomes paused so resume remains * possible, while semanticStatus gives conductor-specific recovery guidance. */ export declare function reconcileStaleWorkflowRun(run: PersistedRunState, signals?: ConductorReconciliationSignals): ConductorReconciliationDecision | null;