export interface CurrentCardMarker {
    cardId: string;
    stage: string;
    dispatchedAt: string;
    /** ACP session ID — set after spawn succeeds (optional for backward compat). */
    sessionId?: string;
    /** Claude-agent-acp PID — set after spawn succeeds (optional for backward compat). */
    pid?: number;
}
/**
 * Build the marker file path from project + slot name.
 * Reads HOME fresh each call so tests can override via `process.env.HOME`.
 */
export declare function getMarkerPath(project: string, slot: string): string;
/**
 * Build the marker file path from an existing state file path (worker-manager usage).
 * Keeps all runtime artifacts in the same directory.
 */
export declare function getMarkerPathFromStateFile(stateFile: string, slot: string): string;
/**
 * Atomically write the marker file. Uses tmp + rename so readers never see
 * a half-written file. Errors are non-fatal (logged via onError callback) —
 * hook downstream will fail closed (exit 2) rather than silently mis-mark.
 *
 * `extra` adds post-spawn metadata (sessionId, pid) via a second atomic write.
 */
export declare function writeCurrentCardFile(finalPath: string, cardId: string, stage: string, onError?: (err: unknown) => void, extra?: {
    sessionId?: string;
    pid?: number;
}): void;
/**
 * Patch an existing marker file with post-spawn metadata (sessionId, pid).
 * Reads current contents → merges new fields → atomic rewrites. Preserves
 * `dispatchedAt` so the ACK-timeout clock is not reset.
 */
export declare function patchCurrentCardFile(finalPath: string, patch: {
    sessionId?: string;
    pid?: number;
}, onError?: (err: unknown) => void): void;
/**
 * Read the marker file. Returns null if missing or malformed — callers should
 * treat a null result as "no authoritative current card" and fail closed.
 */
export declare function readCurrentCardMarker(project: string, slot: string): CurrentCardMarker | null;
//# sourceMappingURL=markerFile.d.ts.map