UNPKG

agentfootprint

Version:

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

30 lines (29 loc) • 1.79 kB
/** * Row "It found" — what each call of this run returned, as the MODEL read it, * then the earlier answers' results that were in front of the model. * * Branches on the call's outcome first: a call that did not run "found nothing" * because it did not run; a withheld result is never judged empty (the model * read the rule's refusal, not the rows). Emptiness is typed only, read by the * one emptiness reader (`core/agent/emptiness.ts` · `readEmptiness`): * a declared absence (or an empty rowset inside a declared boundary), a * described result's data counted per kind, a question handed back, a * zero-length top-level array, or the app's declared `rowsAt` (then the line * is vouched `app`, because only the app's declaration makes it "empty"). */ import type { RecordPointer, Sentence } from '../types.js'; import { type ReadContext } from './common.js'; import { type CallsRead } from './calls.js'; import type { BeforePauseCall, PausedLegRead } from './pausedLeg.js'; import type { InViewAll, InViewRead } from './inView.js'; /** The vars every in-view line shares. */ export declare function inViewVars(read: InViewRead): { tool: import("../types.js").SentenceVar; distance: import("../types.js").SentenceVar; distanceWindowed: import("../types.js").SentenceVar; }; /** Pointers behind an in-view line: the witness, the history row, the derived emptiness. */ export declare function inViewPointers(ctx: ReadContext, read: InViewRead): RecordPointer[]; /** Pointers behind a line about what came back from a call before the pause. */ export declare function beforePausePointers(call: BeforePauseCall): RecordPointer[]; export declare function readFoundRow(ctx: ReadContext, calls: CallsRead, inView: InViewAll, pausedLeg: PausedLegRead): Sentence[];