import type { TemporalConfig } from './entity-type-config.js'; /** Add (or subtract) days from a YYYY-MM-DD string. Returns YYYY-MM-DD. */ export declare function addDays(dateStr: string, days: number): string; /** Today's date as YYYY-MM-DD in local time. */ export declare function todayStr(): string; export interface WindowBounds { /** First date (inclusive) that falls within the window — YYYY-MM-DD */ from: string; /** Last date (inclusive) that falls within the window — YYYY-MM-DD */ to: string; } /** * Compute the inclusive date window [from, to] for a context type relative to today. * * from = today − windowDaysBefore * to = today + windowDaysAfter */ export declare function getWindowBounds(temporal: TemporalConfig, today?: string): WindowBounds; /** * Extract the anchor date string (YYYY-MM-DD) from a node's metadata. * Returns null if the field is absent or empty. */ export declare function getNodeAnchorDate(meta: Record, temporal: TemporalConfig): string | null; /** * Returns true if the node falls within its type's window of importance. * * A node with no anchor date is always considered relevant — it has no * temporal constraint so it should never be excluded by the filter. */ export declare function isNodeTemporallyRelevant(meta: Record, temporal: TemporalConfig, today?: string): boolean; /** * Returns true if the node has passed its archive threshold. * * Condition: anchor + deleteAfterDays < today * * Returns false if deleteAfterDays is not set on the type (no auto-archive). * Returns false if the node has no anchor date. */ export declare function shouldArchiveNode(meta: Record, temporal: TemporalConfig, today?: string): boolean; /** * Filter a list of entity metadata records to only those within the * type's window of importance. Records without an anchor date pass through. */ export declare function filterByTemporalWindow>(records: T[], temporal: TemporalConfig, today?: string): T[]; /** * Partition records into two groups: those to archive and those to keep. * Only applies to types with deleteAfterDays set. */ export declare function partitionForArchive>(records: T[], temporal: TemporalConfig, today?: string): { archive: T[]; keep: T[]; }; //# sourceMappingURL=temporal-filter.d.ts.map