/** * v1.3.3 §C — friendly schedule input → node-cron expression. * * Referenced from OpenClaw (`--every "1h"`, `--cron`) and Hermes (`every 30m`, * `@daily`) cron UX: users shouldn't have to hand-write 5-field cron strings for * the common cases. `normalizeSchedule` accepts: * - a raw cron expression (passthrough, validated) * - `@hourly|@daily|@weekly|@monthly|@yearly` shortcuts * - `every ` / `` recurring intervals (m=minute, h=hour, d=day) * and returns the canonical cron string the rest of the system stores. * * One-shot schedules (a bare ISO timestamp / relative `20m` delay) are NOT * recurring crons and need a different execution path — deferred (see PRD §C * 비범위). They are rejected here with a clear message. */ export interface NormalizeResult { cron?: string; /** Human-readable readback of what was parsed (for preview). */ describe?: string; error?: string; } /** Normalize a friendly schedule string into a node-cron expression. */ export declare function normalizeSchedule(input: string): NormalizeResult; /** * v1.3.3 §C — parse a one-shot "when" into an absolute ISO timestamp. * Accepts an ISO 8601 timestamp or a relative delay `s|m|h|d` (from now). * Rejects past times and unparseable input. */ export declare function parseWhen(input: string, now?: number): { at?: string; error?: string; }; /** * v1.3.4 §A — parse a `s|m|h` jitter/delay string into seconds. * Returns null for empty/invalid input (treated as "no jitter"). */ export declare function parseDelaySeconds(input: string | undefined | null): number | null; /** * v1.3.4 §B — the next N fire times for a recurring expression. Steps minute by * minute (tz/DST-aware) and collects matches. Empty array if invalid. For the * save-time preview; minute resolution (seconds field, if any, is ignored). */ export declare function nextRuns(expr: string, n?: number, timezone?: string, now?: number): Date[]; /** Best-effort human description of a 5-field cron expression. Falls back to * the raw expression when the pattern isn't one of the common shapes. */ export declare function describeSchedule(expr: string): string; /** * Estimate a cron's cadence in minutes for the common shapes `normalizeSchedule` * produces (interval / daily / weekly / monthly). Returns null when the shape * isn't recognised — callers treat null as "can't judge overdue". */ export declare function estimatePeriodMinutes(expr: string): number | null; /** * Dead-man's-switch: is a cron overdue? True when its last successful run is * older than `graceFactor` × its estimated period. Returns false when the * period can't be estimated or there's no prior run (nothing to compare). */ export declare function isOverdue(lastSuccessIso: string | null, expr: string, now?: number, graceFactor?: number): boolean; /** The next fire time for an expression (authoritative — uses node-cron's own * scheduler). Returns null if the expression is invalid. */ export declare function nextRun(expr: string, timezone?: string): Date | null;