import type { ScheduleJob, ScheduleRunResult } from "./types.js"; /** Atomic write (tmp + rename), mirroring task-store.writeTask. */ export declare function writeJob(jobPath: string, job: ScheduleJob): void; export declare function readJob(jobPath: string): ScheduleJob | undefined; export declare function listJobs(jobsDir: string): ScheduleJob[]; export declare function deleteJob(jobPath: string): void; /** Append a result line. Append-only — never read-modify-write (race-free under concurrent runs). */ export declare function appendRunResult(resultsPath: string, result: ScheduleRunResult): void; /** Atomic write of the byte-offset cursor (tmp + rename). */ export declare function advanceCursor(cursorPath: string, bytes: number): void; export interface ResultsScan { results: ScheduleRunResult[]; newCursor: number; cursor: number; } /** * Read result lines from the stored byte offset to EOF, parsing only complete * lines. Mirrors outbox.scanFromCursor. `maxBytes` bounds the read so a hook * with a tight time budget never scans an unbounded file. */ export declare function readResultsFrom(resultsPath: string, cursorPath: string, maxBytes?: number): ResultsScan;