/** * temporal_narratives reads — latest/current/child narrative lookups and the * per-resolution regeneration cooldown check. */ import type { Database } from "./schema.js"; import type { NarrativeResolution, TemporalNarrative } from "./narrative-types.js"; export declare function getChildNarratives(db: Database, threadId: number, resolution: NarrativeResolution, start: string, end: string): TemporalNarrative[]; export declare function getLastNarrative(db: Database, threadId: number, resolution: NarrativeResolution): TemporalNarrative | null; export declare function getCurrentNarrative(db: Database, threadId: number, resolution: NarrativeResolution): TemporalNarrative | null; export declare function isCooldownActive(db: Database, threadId: number, resolution: NarrativeResolution): boolean; /** * Whether a resolution's inputs changed since its last narrative was generated. * * Cooldowns bound how *often* a narrative may regenerate, not whether its source * data actually changed — so a lapsed cooldown otherwise re-summarises identical * episodes at OpenAI cost. A rolling narrative is only worth regenerating when a * new episode landed in the period, or (for composed month+ resolutions) a child * narrative was (re)generated more recently than the parent. * * Returns true when no prior narrative exists (first-ever generation must run). * Comparisons use julianday() so ISO episode timestamps ("...T..Z") and the * space-separated datetime('now') stored on narratives compare on one UTC scale. */ export declare function hasNewNarrativeInput(db: Database, threadId: number, resolution: NarrativeResolution, start: string, end: string): boolean; //# sourceMappingURL=narrative-store.d.ts.map