import type { RawRecord } from './sidecar.js'; import type { BlockDef, CompiledDefinition, Finding, Row } from './types.js'; /** * Validate raw records against a block's declared rules — THE funnel, public. * * Everything the referee holds a committed record to runs here: id grammar, * uniqueness, enums, declared types, required cells, ref extraction, identity * presence/shape, row and block checks. The finding CODES are byte-identical * to what `dj lint` reports for the same mistake, because they come from the * same lines of code — a write door answering 400 with these findings is * telling the author exactly what lint would have told them. * * `file` labels the findings (a cloud door passes the document path so the * refusal names something the author can open); it defaults to a synthetic * label rather than being required because the RECORDS, not a file, are what * this facade judges. */ export declare function validateRecords(block: BlockDef, records: RawRecord[], def: CompiledDefinition, findings: Finding[], file?: string): Row[]; /** * A record's cells as one searchable text — the flattening `buildGraph` has * always projected into `row_.text`, exported so the op read door's degraded * answer (L8: `renderedCellsFor` passed open, no rendered cells to serve) is * built from the SAME text the graph indexes. One flattener; the 2026-08-08 * incident class (render failure → blank board) degrades to this instead. * * Value order is the record's own key order — for a parsed `Row` that is the * table header / declared column order the parser built, and `buildGraph`'s * output through this function is byte-identical to what it produced inline. * * `block` is for RAW records ONLY — an op_record's cells JSON, which still * carries its identity among the cells: an uncarried identity value is * dropped, exactly as `rowsFromRecords` lifts it out of `Row.cells`, so raw * and parsed spellings of one record flatten to one text. For a PARSED Row, * callers pass null, always: the parser already decided what is display text * (sidecar rows arrive with identity lifted; a markdown table carrying a * literal identity column the format never declared keeps it — warned, * untyped, but the author's visible prose), and re-judging that decision here * would drop a table-carried identity cell from the graph text of a tier-less * format — a byte change in the projection, and the dropped value's ONLY * carrier, since the table path never sets Row.uuid. With no block, every * cell is a cell. */ export declare function flattenRecordText(block: BlockDef | null | undefined, cells: Record): string;