import type { JobDefinition, JobRun, JobRunListItem, JobRunStatus, JobStep, JobStepResult } from "shared";
/** Step-target sentinels: "end" = finish run successfully, "fail" = fail the run. */
export declare const JOB_TARGET_END = "end";
export declare const JOB_TARGET_FAIL = "fail";
export declare const TERMINAL_JOB_RUN_STATUSES: ReadonlySet<JobRunStatus>;
export declare const DEFAULT_MAX_TOTAL_SESSIONS = 50;
export declare const DEFAULT_MAX_DURATION_HOURS = 168;
export declare function slugifyJobId(name: string): string;
export declare function listJobs(): JobDefinition[];
export declare function getJob(id: string): JobDefinition | null;
export interface JobDefinitionInput {
    id?: string;
    name: string;
    description?: string;
    inputs?: JobDefinition["inputs"];
    defaults?: JobDefinition["defaults"];
    limits?: JobDefinition["limits"];
    steps: JobStep[];
    createdBy?: JobDefinition["createdBy"];
}
export declare function createJob(input: JobDefinitionInput): JobDefinition;
export declare function updateJob(id: string, input: JobDefinitionInput): JobDefinition;
export declare function deleteJob(id: string): boolean;
export declare function listRuns(filter?: {
    jobId?: string;
    status?: JobRunStatus;
    limit?: number;
}): JobRunListItem[];
export declare function getRun(runId: string): JobRun | null;
export declare function saveRun(run: JobRun): void;
export declare function createRun(job: JobDefinition, inputs: Record<string, string>): JobRun;
export declare function deleteRun(runId: string): boolean;
/** All runs in a non-terminal status — what the runner resumes on boot. */
export declare function listResumableRuns(): JobRun[];
/**
 * Record the structured result reported by a step session's
 * complete_job_step call. Harvested by the runner when the session ends.
 */
export declare function recordStepResult(runId: string, stepId: string, result: JobStepResult): boolean;
export declare class JobValidationError extends Error {
    errors: string[];
    constructor(errors: string[]);
}
/** Validate a definition (sans version/timestamps). Returns human-readable errors. */
export declare function validateJobDefinition(input: JobDefinitionInput & {
    id: string;
}): string[];
/** Extract `a.b.c` paths from `{{a.b.c}}` placeholders. */
export declare function extractTemplateRefs(template: string): string[];
//# sourceMappingURL=job-store.d.ts.map