import type { SynomemStorage } from './storage.js'; import type { ProjectionWriter } from './ports/projections.js'; import type { SynomemEvent, KudosRecord, MemoRecord, NoteRecord, PostRecord, TaskDue, TaskRecord, TodoRecord } from './types.js'; /** * The instant a deadline has passed. * * A date-only deadline does not invent a time of day; it lapses at the end of * that UTC day, which is the latest reading that cannot call work late while * the stated day is still running. Every projection must use this one rule, or * two stores would disagree about what is overdue. */ export declare function dueInstant(due: TaskDue | undefined): string | undefined; export declare function escapeMarkdown(value: string): string; export declare function recordsFromEvents(events: SynomemEvent[]): KudosRecord[]; export declare function memoRecordsFromEvents(events: SynomemEvent[]): MemoRecord[]; /** * Rebuilds posts from their events, acknowledgements included. * * Edits are kept as a list rather than collapsed into the current text. A reader * has to be able to see that a post changed after somebody acknowledged it — * silently rewriting what was acknowledged is how a record becomes a lie. */ export declare function postRecordsFromEvents(events: SynomemEvent[]): PostRecord[]; export declare function noteRecordsFromEvents(events: SynomemEvent[]): NoteRecord[]; /** * Builds private Todo records. * * Deliberately simpler than the Task reducer: there is no acceptance state and * no response history, because there is nobody to negotiate with. A Todo goes * open → completed / canceled / archived, and back to open on reopen. */ export declare function todoRecordsFromEvents(events: SynomemEvent[]): TodoRecord[]; export declare function taskRecordsFromEvents(events: SynomemEvent[]): TaskRecord[]; /** Render a portable human-readable export without reading generated projections. */ export declare function renderMarkdownExport(events: SynomemEvent[]): string; export declare class ProjectionManager implements ProjectionWriter { private readonly storage; constructor(storage: SynomemStorage); rebuild(): { generated: string[]; removed: string[]; }; /** * Move an agent's directory when its handle changes. * * Without this a rename left the old directory behind, and with it `NOTES.md` * -- the one file in there that is the reader's rather than Synomem's, and so * the one file a rebuild will never delete. The generated files moved to the * new handle and the hand-written notes stayed at the old one. * * Moving rather than copy-and-delete, and moving rather than letting the * rebuild sort it out, because a rename is a known identity change: the * destination is new, so nothing is overwritten, and the human file arrives * intact instead of being stranded. */ renameAgentDirectory(previousHandle: string, nextHandle: string): void; syncAgent(agentId: string): { generated: string[]; removed: string[]; }; expectedPaths(): string[]; } //# sourceMappingURL=projections.d.ts.map