export interface CronSchedule {
    kind: 'once' | 'interval' | 'cron';
    value?: string;
    intervalMs?: number;
    cronExpr?: string;
    runAt?: string;
}
export interface CronRepeat {
    times: number | null;
    completed: number;
}
export interface CronJob {
    id: string;
    name: string;
    prompt: string;
    skills: string[];
    skill: string | null;
    model: string | null;
    provider: string | null;
    base_url: string | null;
    script: string | null;
    no_agent: boolean;
    context_from: string[] | null;
    schedule: CronSchedule;
    schedule_display: string;
    repeat: CronRepeat;
    enabled: boolean;
    state: 'scheduled' | 'paused' | 'completed' | 'error';
    paused_at: string | null;
    paused_reason: string | null;
    created_at: string;
    next_run_at: string | null;
    last_run_at: string | null;
    last_status: 'ok' | 'error' | null;
    last_error: string | null;
    last_delivery_error: string | null;
    deliver: string;
    origin: {
        platform: string;
        chat_id: string;
        thread_id?: string;
    } | null;
    enabled_toolsets: string[] | null;
    workdir: string | null;
    profile: string | null;
}
export declare function parseDuration(s: string): number;
export declare function parseSchedule(scheduleStr: string): CronSchedule;
export declare function computeNextRun(schedule: CronSchedule, lastRunAt?: string | null): string | null;
export declare function loadJobs(): CronJob[];
export declare function saveJobs(jobs: CronJob[]): void;
export declare function createJob(options: {
    prompt?: string;
    schedule: string;
    name?: string;
    repeat?: number;
    deliver?: string;
    skills?: string[];
    model?: string;
    script?: string;
    no_agent?: boolean;
    workdir?: string;
}): CronJob;
export declare function getJob(jobId: string): CronJob | null;
export declare function resolveJobRef(ref: string): CronJob | null;
export declare function listJobs(includeDisabled?: boolean): CronJob[];
export declare function updateJob(jobId: string, updates: Partial<CronJob>): CronJob | null;
export declare function pauseJob(jobId: string, reason?: string): CronJob | null;
export declare function resumeJob(jobId: string): CronJob | null;
export declare function triggerJob(jobId: string): CronJob | null;
export declare function removeJob(jobId: string): boolean;
export declare function markJobRun(jobId: string, success: boolean, error?: string, deliveryError?: string): void;
export declare function advanceNextRun(jobId: string): boolean;
export declare function getDueJobs(): CronJob[];
export declare function saveJobOutput(jobId: string, output: string): void;
//# sourceMappingURL=jobs.d.ts.map