/** * Skill scheduler — cron-based scheduling for skills * * Schedules are stored in .skills/schedules.json in the project directory. * Each schedule entry defines a skill to run on a cron expression. * * Cron format: standard 5-field (minute hour dom month dow) * e.g. "0 9 * * *" = every day at 9am */ export interface SkillSchedule { id: string; name: string; skill: string; cron: string; args?: string[]; enabled: boolean; createdAt: string; lastRun?: string; lastRunStatus?: "success" | "error"; nextRun?: string; } /** Validate a 5-field cron expression with range checking. */ export declare function validateCron(expr: string): { valid: boolean; error?: string; }; /** Compute the next run time for a cron expression relative to a given date. */ export declare function getNextRun(cron: string, from?: Date): Date | null; /** Add a new schedule. Returns the created schedule. */ export declare function addSchedule(skill: string, cron: string, options?: { name?: string; args?: string[]; targetDir?: string; }): { schedule: SkillSchedule | null; error?: string; }; /** List all schedules. */ export declare function listSchedules(targetDir?: string): SkillSchedule[]; /** Remove a schedule by id or name. Returns true if removed. */ export declare function removeSchedule(idOrName: string, targetDir?: string): boolean; /** Enable or disable a schedule by id or name. */ export declare function setScheduleEnabled(idOrName: string, enabled: boolean, targetDir?: string): boolean; /** Get all schedules that are due now (nextRun <= now and enabled). */ export declare function getDueSchedules(targetDir?: string): SkillSchedule[]; /** Mark a schedule as having just run. Updates lastRun and nextRun. */ export declare function recordScheduleRun(id: string, status: "success" | "error", targetDir?: string): void;