/** * Record classification for the JSONL store — pure, no I/O, no imports beyond types. * * WHY THIS FILE EXISTS * * These predicates decide what a line in the store IS. They were private to * jsonl-preservation.ts, which cannot be imported by a renderer because its first line * is `import fs`. So the read contract re-implemented them by hand — and got it wrong: * it dropped the legacy `type:"narrative_beat"` dialect this package still writes and * reads, losing real beats AND reporting them as corruption. * * Splitting them out costs nothing and means classification has exactly one definition. * jsonl-preservation.ts imports it, so the writer round-trips through these; contract.ts * imports it, so a reader classifies identically. They cannot drift, because there is * no second copy to drift from. */ import type { Entity, JsonlRecord } from './types.js'; export declare function isObject(value: unknown): value is Record; export declare function removeUndefined>(record: T): T; export declare function isEntityRecord(record: JsonlRecord): boolean; /** * The older on-disk dialect: a beat written with `type:"narrative_beat"` at the top * level instead of `type:"entity"` + `entityType:"narrative_beat"`. Still present in * live stores, still round-tripped by serializeEntity, still asserted by * test-metadata-preservation.js. A reader that does not know this dialect silently * renders fewer beats than exist. */ export declare function isLegacyNarrativeBeatRecord(record: JsonlRecord): boolean; export declare function isRelationRecord(record: JsonlRecord): boolean; export declare function normalizeLegacyNarrativeBeat(record: JsonlRecord): Entity;