export declare const SCHEDULE_PRESETS: ReadonlyArray<{
    readonly label: string;
    readonly cron: string;
}>;
/**
 * Quotes an arg for embedding inside a single-quoted shell command
 * (e.g. inside `zsh -c '…'`). Inside the outer single quotes the inner
 * string is parsed as shell, so we use double quotes and escape `\ $ ` "`.
 * Single quotes are not supported (would close the outer quote).
 */
export declare function shQuoteForCron(s: string): string;
/** Tokenises a shell-style arg string we generated (unquoted or double-quoted). */
export declare function tokenizeShellArgs(s: string): string[];
/** Quotes an arg for embedding into a Windows schtasks /tr command string. */
export declare function cmdQuoteForSchtasks(s: string): string;
export declare function buildUnixCronLine(cronExpr: string, cwd: string, nodeBin: string, aidevBin: string, extraArgs?: string[]): string;
/** Extracts the extra args (after `aidev run`) from an existing cron line. */
export declare function extractUnixCronArgs(line: string): string[];
export type LaunchdSchedule = {
    key: 'StartInterval';
    seconds: number;
} | {
    key: 'StartCalendarInterval';
    hour: number;
    minute: number;
};
/**
 * Maps a cron expression to a launchd schedule.
 * Supports the same subset as cronToSchtasksArgs.
 */
/** Inverse of {@link cronToLaunchdSchedule} for supported preset expressions. */
export declare function launchdScheduleToCron(schedule: LaunchdSchedule): string | null;
export declare function cronToLaunchdSchedule(cron: string): LaunchdSchedule | null;
export declare function buildLaunchAgentPlist(label: string, nodeBin: string, aidevBin: string, cwd: string, schedule: LaunchdSchedule, extraArgs?: string[]): string;
/** Extracts the user-supplied extra args from an existing LaunchAgent plist. */
export declare function extractLaunchAgentArgs(xml: string): string[];
/**
 * Converts a cron expression to schtasks /sc + /mo + /st arguments.
 * Supports the subset used by the preset list.
 */
export declare function cronToSchtasksArgs(cron: string): string[] | null;
/** Stable task name derived from cwd + optional cron expr — safe for Task Scheduler. */
export declare function windowsTaskName(cwd: string, cronExpr?: string): string;
/** Extracts the launchd schedule object from a plist XML string. */
export declare function extractLaunchdSchedule(xml: string): LaunchdSchedule | null;
export declare function scheduleSetCommand(cronExpr?: string, extraArgs?: string[]): Promise<void>;
export declare function scheduleGetCommand(): Promise<void>;
export declare function scheduleRemoveCommand(id?: number): Promise<void>;
export declare function scheduleFixCommand(): void;
export type ScheduleBackend = 'cron' | 'launchd' | 'schtasks';
export interface ScheduleEntry {
    id: number;
    cwd: string;
    cron: string | null;
    label: string;
    extraArgs: string[];
    current: boolean;
}
export interface SchedulesSnapshot {
    platform: NodeJS.Platform;
    backend: ScheduleBackend;
    presets: ReadonlyArray<{
        readonly label: string;
        readonly cron: string;
    }>;
    entries: ScheduleEntry[];
    currentCwd: string;
    fixSupported: boolean;
}
export interface ScheduleMutationResult {
    ok: boolean;
    message: string;
}
export interface ScheduleFixResult {
    ok: boolean;
    message: string;
    fixed: number;
    unchanged: number;
}
export declare function listSchedules(currentCwd: string): SchedulesSnapshot;
export declare function setScheduleForCwd(cwd: string, cronExpr: string, extraArgs?: string[]): ScheduleMutationResult;
export declare function removeScheduleById(id: number): ScheduleMutationResult;
export declare function fixSchedules(): ScheduleFixResult;
//# sourceMappingURL=schedule.d.ts.map