/** * Server-side period resolution for the prompt runbooks (issue #260). * * The prompts used to hand the model a relative phrase — "cette semaine", * "le mois en cours", "aujourd'hui (D) → D+H" — and let it work out the ISO * bounds. The server knows the date; the model regularly got a week boundary * or a month end wrong, and every mistake silently shifted the whole runbook. * Resolving here means the bounds are computed once, deterministically, and * appear in the runbook as literal `YYYY-MM-DD` values the model only copies. * * Dates are computed in the server's local calendar (the `Date` getters, not * UTC): a runbook is read by a person whose "today" is the server's day. */ export interface PeriodBounds { /** Inclusive first day, `YYYY-MM-DD`. */ startDate: string; /** Inclusive last day, `YYYY-MM-DD`. */ endDate: string; /** First month covered, `YYYY-MM` (for the `startMonth` / `endMonth` filters). */ startMonth: string; /** Last month covered, `YYYY-MM`. */ endMonth: string; /** Human wording of what was resolved, for the runbook's first line. */ label: string; } export type PeriodKind = "week" | "month"; /** `YYYY-MM-DD` of a local date. */ export declare function toIsoDate(d: Date): string; /** `YYYY-MM` of a local date. */ export declare function toIsoMonth(d: Date): string; /** A new local date `days` after `d` (midnight, DST-safe through setDate). */ export declare function addDays(d: Date, days: number): Date; /** * Resolve a period argument to ISO bounds. * * Understood: nothing (→ the current `defaultKind`), "cette semaine" / * "semaine en cours" / "this week", "semaine dernière" / "la semaine passée", * "semaine prochaine", "ce mois" / "mois en cours" / "ce mois-ci", "mois * dernier", "mois prochain", `YYYY-MM`, `YYYY-Www` (ISO week), a French month * name with a year ("avril 2026"), and a `YYYY-MM-DD..YYYY-MM-DD` range. * Anything else returns `null`: the runbook then keeps the caller's wording * and tells the model today's date, so it still has an anchor. */ export declare function periodBounds(arg: string | undefined, now: Date, defaultKind: PeriodKind): PeriodBounds | null; //# sourceMappingURL=periods.d.ts.map