/** * Shared research-corpus cadence + staleness config (#1498, #1502). * * Single source of truth for refresh-cadence → window math. Consumed by: * - renderers.ts `radar-stale-queue` view (#1492) * - the radar subsystem: radar-init GRADE→cadence default, radar-status (#1498) * - the profile subsystem: profile-status staleness (#1502) * * Ports `corpus/radar_staleness.py` CADENCE_DAYS, `corpus/radar_init.py` * CADENCE_BY_GRADE, and `profiles/find_stale_profiles.py`'s cadence map into one * module so the date-math lives in exactly one place — the explicit #1498/#1502 * "one staleness helper" requirement. * * @source historical: corpus/radar_staleness.py, corpus/radar_init.py */ /** * Refresh-cadence enum word → staleness window in days. * * `null` = on-demand: never auto-overdue. `biennial` is accepted as a synonym * for `biannual` (180d); both spellings appear in corpus sidecars. The Python * sources used distinct on-demand sentinels (radar_staleness: None; * find_stale_profiles: 9999) — both mean "never auto-stale", normalized to * `null` here. */ export declare const CADENCE_DAYS: Record; /** * Default refresh cadence by GRADE letter (radar-init scaffold default). * A→quarterly, B/C→biannual, D→on-demand. Ports `radar_init.py` CADENCE_BY_GRADE. */ export declare const CADENCE_BY_GRADE: Record; /** * Look up the staleness window for a cadence word. * Returns `null` for on-demand and `undefined` for an unknown/absent cadence — * callers distinguish "never stale" (null) from "can't tell" (undefined). */ export declare function cadenceWindowDays(cadence: string | null | undefined): number | null | undefined; /** Default cadence for a GRADE letter; falls back to `biannual` for unknown/absent grades. */ export declare function cadenceForGrade(grade: string | null | undefined): string; /** * Default affiliation canonicalization map (#1503): canonical `PROF-O-{slug}` * → variant org-name strings that should resolve to it. Ports * `corpus/normalize_affiliation.py` CANONICAL_MAP. Per epic #1496 principle #3 * (externalize hardcoded data), this default is overridable per-corpus via a * `documentation/profiles/orgs/affiliation-map.yaml` data file (loaded by the * sidecar-repair tool); this module keeps only the pure default + reverse-map * builder so it stays dependency-free. */ export declare const DEFAULT_AFFILIATION_MAP: Record; /** * Reverse a canonical map (slug → variants) into variant-name → slug, plus * self-mapping each slug. All keys lowercased/trimmed for direct lookup. */ export declare function buildAffiliationReverse(map: Record): Map; export interface Staleness { /** Whole days between `lastRefreshed` and `today` (UTC), or null when undatable. */ daysSince: number | null; /** Cadence window in days; null = on-demand; undefined = unknown cadence word. */ windowDays: number | null | undefined; /** `daysSince − windowDays`; null when not computable (on-demand / unknown / bad date). */ overdueDays: number | null; /** True iff overdueDays is a positive number. */ isStale: boolean; } /** * Compute staleness for a `refresh-cadence` + `last-refreshed` ISO date as of * `today`. Mirrors `radar_staleness.compute_staleness`: whole-day floor, * UTC-midnight anchoring, and on-demand / unknown-cadence / undatable inputs all * yield `overdueDays === null` (not stale). * * `today` should be a UTC-midnight Date (e.g. `new Date('2026-05-26T00:00:00Z')`) * so day deltas are exact. */ export declare function computeStaleness(cadence: string | null | undefined, lastRefreshed: string | null | undefined, today: Date): Staleness; //# sourceMappingURL=corpus-config.d.ts.map