/** * answer — how a ledger survives into the final answer. * * Pattern: composed by the FRAMEWORK, not requested from the model. Pure * function of the run's declarations; the stage that calls it is a * two-line wrapper (see `stages/prepareFinal.ts`). * Role: core/ layer, pure. * Emits: N/A. * * ## Why this is an append and not a check * * A ledger the model can drop is worthless, and every mechanism that ASKS the * model to carry it can be dropped: a note in the tool result is advice, a * system-prompt rule is advice, and a judge that reads the answer back and * asks "did it state its limits?" needs a second model to decide what * counts — which would put a language judgement in the one place this library * refuses to put one (see `evidence/README.md`: the guard may not need a * bigger model than the thing it guards). * * So the limits are APPENDED. The model does not write them, so the model * cannot drop them, and the mechanism is a string concatenation over data the * tools declared — deterministic, auditable, and cheap. It changes the bytes * of the answer, which is why it is opt-in * (`.limitsTravelWithTheAnswer()`): an agent that never asks for it is * byte-identical. * * ## Why an absence contributes too * * `absent()` and `coverage()` make the same kind of statement about the same * run. A search that found nothing in the fcns database really did cover the * fcns database, and a search that could not reach the archive really is a * limit on the answer. Folding both into one block is the only way the reader * gets ONE boundary instead of a boundary per tool — and duplicates are * dropped, so five tools naming the same missing collector say it once. */ import type { DeclaredCoverage } from './types.js'; /** The block's opening line. Stable — tests and readers match on it. */ export declare const COVERAGE_BLOCK_HEADING = "Coverage of this answer"; /** * Fold the run's declarations into one block and append it to the answer. * * Returns the answer UNCHANGED when nothing was declared — the identity case * matters, because it is the one every agent that never returns a coverage * shape takes. */ export declare function composeAnswerWithCoverage(answer: string, declared: readonly DeclaredCoverage[]): string;