UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

23 lines • 1.17 kB
import type { EffectiveInterval, RequestedInterval } from "./types.ts"; export type { EffectiveInterval, RequestedInterval }; /** * Converts a user-requested interval into an effective cadence the scheduler * can express with the restricted display cron forms. Seconds are coarsened to * minutes; large minute/hour values roll up to hours/days with half-up * rounding. Whenever the effective value differs from the request, the result * carries a notice naming both the requested and effective cadence. */ export declare function normalizeInterval(requested: RequestedInterval): EffectiveInterval & { intervalMs: number; }; /** * Returns a restricted 5-field cron expression for DISPLAY ONLY. The scheduler * uses intervalMs + absolute nextFireAt; this string is shown to the user. */ export declare function describeCron(effective: Pick<EffectiveInterval, "value" | "unit">): string; /** * Computes the absolute timestamp of the next scheduled fire. Pure: takes * nowMs as a parameter and never reads the clock internally. */ export declare function computeNextFireAt(nowMs: number, intervalMs: number): number; //# sourceMappingURL=cron-planner.d.ts.map