/** * The learn schedule (DES-learn-workflow ยง5): a durable record per learned topic saying how often * the daemon re-runs the `learn` workflow on it. Crew is the single source of truth for a * schedule; the topic's files in the repository do not repeat it. * * Same storage posture as `projects/settings.ts`: a small JSON map in the daemon's state home * (`learn-schedules.json`, following `--db`; `WICKED_CREW_LEARN_SCHEDULES` overrides), written * atomically (tmp + rename), read tolerantly per row (a malformed row is dropped, never the map). */ import type { LearnSchedule, LearnScheduleOutcome } from 'wicked-crew-api-types'; export type { LearnSchedule, LearnScheduleOutcome }; export declare const LEARN_SLUG: RegExp; export declare const MIN_EVERY_HOURS = 24; export declare const MAX_EVERY_HOURS = 2160; export declare function scheduleId(repoRef: string, slug: string): string; export declare function defaultSchedulesPath(env?: NodeJS.ProcessEnv): string; /** What a caller asks to save (`PUT /learn/schedules/:id`). */ export interface LearnScheduleInput { repoRef: string; slug: string; topic: string; everyHours: number; enabled?: boolean | undefined; projectId?: string | undefined; } export declare class LearnScheduleStore { private readonly path; private readonly rows; constructor(path?: string); list(): LearnSchedule[]; get(id: string): LearnSchedule | undefined; /** Create or update. A new row is first due one interval from now; an update keeps its run * history and moves `nextDueAt` only when the interval changed. */ put(input: LearnScheduleInput, now: Date): LearnSchedule; /** Merge a patch into an existing row (the scheduler's bookkeeping). `undefined` when unknown. */ update(id: string, patch: Partial>, now: Date): LearnSchedule | undefined; delete(id: string): boolean; private persist; } export declare const HOURS = 3600000; //# sourceMappingURL=schedule-store.d.ts.map