UNPKG

agentfootprint

Version:

The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.

35 lines • 1.92 kB
/** * The "How sure" row's script lines — one per fenced block the answer SHOWED * (`.namesAndNumbersFromEvidence({ code: 'match' })`) and one per script the * library ATTACHED (`.scriptTravelsWithTheAnswer()`). * * Read from the record, never rebuilt from text: a shown block's verdict is * the answering iteration's `agent.evidence_checked.scripts`; an attached * script is `agent.turn_end.scripts`; the details a label's words need (a * service error, a withheld result, a before-tool rewrite) are the call's own * `script` row in the committed `findingsLedger`. F1 ("this is the script * submitted") and F2 ("this script ran") are said; F3 stays the evidence * lines' — no sentence here joins a script to a value. * * The program itself is never printed and never shown: it is a tool * argument (`shown.ts` keeps `text` off every allow-list). * * Each saved shape is read by its ONE reader — the verdicts by * `core/agent/scripts/match.ts` · `recordedBlocks`, the attached scripts by * `core/agent/scripts/attachment.ts` · `recordedScripts`, a call's row by * `core/agent/scripts/rows.ts` · `scriptRowIsWellFormed` — the rules the * writers and the checkpoint door share. A value no writer of * this library files never becomes a line; it is counted (`unread`). Each * kind is listed as every per-call listing of the account is (README laws 7 * and 8): the first `MAX_LISTED_CALLS`, then one "…and N more" line. */ import type { Sentence } from '../types.js'; import { type ViewEvent } from '../view.js'; import { type ReadContext } from './common.js'; /** * Every script line of the answer: the shown blocks (when the answering * iteration's verdict carries them), then the attached scripts. Empty on a * record without either arm. */ export declare function scriptLines(ctx: ReadContext, evidence: ViewEvent | undefined): Sentence[]; //# sourceMappingURL=scripts.d.ts.map