/**
 * Pure scheduling logic for the maintenance timer (auto-update / auto-restart).
 * No I/O — the timer in core/maintenance.ts feeds it the current time and the
 * per-task last-handled date, then acts on the decision.
 *
 * Times are interpreted in a fixed local timezone (Asia/Shanghai, matching the
 * scheduler) and fire at most once per local day. "Handled" covers both fired
 * and skipped-because-busy, so a busy collision deterministically slips to the
 * next day rather than retrying.
 */
import type { MaintenanceTask } from '../global-config.js';
export declare const MAINTENANCE_TZ = "Asia/Shanghai";
/** How late a run may fire after its scheduled minute before it's "missed"
 *  (e.g. the daemon was down at the scheduled time). */
export declare const DEFAULT_GRACE_MINUTES = 60;
export type MaintenanceDecision = 'disabled' | 'already-handled' | 'not-yet' | 'due' | 'missed';
export interface DueResult {
    decision: MaintenanceDecision;
    /** For 'due'/'missed': the local date the handled occurrence belongs to.
     *  Usually today, but the PREVIOUS day for a late run that crossed midnight
     *  within grace — so the caller marks the run's own day, not "today". */
    markDate?: string;
}
/** Local date ('YYYY-MM-DD') and minutes-since-midnight for `nowMs` in `tz`. */
export declare function localParts(nowMs: number, tz?: string): {
    dateStr: string;
    minutesOfDay: number;
};
export declare function parseHhMmToMinutes(time: string): number | null;
export declare function evaluateDue(task: MaintenanceTask, lastDate: string | undefined, nowMs: number, opts?: {
    tz?: string;
    graceMinutes?: number;
}): DueResult;
//# sourceMappingURL=maintenance-schedule.d.ts.map