UNPKG

agentfootprint

Version:

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

52 lines • 2.96 kB
/** * Rows "It checked" and "It did not check" — one block per tool call of THIS * run, in call order, from what each tool DECLARED (`tools.absent` / * `tools.coverage_declared`). An item prints its declared `short` form, else its * full `what`, verbatim. More than five calls fold into `row.more@1`. * * A resumed leg never says "did not run any tools": the calls answered before * the pause are read from the committed state this record holds * (`pausedLeg.ts` · `readPausedLeg`) — each with what its tool declared, from * its `coverageDeclared` rows — and, when the record holds no committed * history, said to be out of this record. */ import type { Chip, RecordPointer, Sentence, SentenceVar } from '../types.js'; import { type CallsRead, type CoverageRead } from './calls.js'; import { type ReadContext } from './common.js'; import type { BeforePauseCall, PausedLegRead } from './pausedLeg.js'; /** Calls listed per row before folding. */ export declare const MAX_LISTED_CALLS = 5; /** What a declaration's lines need of a call — one of this leg's, or one answered before the pause. */ interface Declared { readonly coverage?: CoverageRead; readonly tool: SentenceVar; /** The tool name the `tool:<name>` voucher carries (cut at 200, like the fact's). */ readonly toolName: string; /** Where the call is on the record — an undeclared line points here. */ readonly pointers: readonly RecordPointer[]; } /** A call answered before the pause, as its declaration's lines read it. */ export declare const declaredBeforePause: (call: BeforePauseCall) => Declared; /** The chip every line about the part before the pause carries, read from the state. */ export declare const heldChip: () => Chip; export interface CheckedRows { readonly checked: readonly Sentence[]; readonly checkedMore?: Sentence; readonly notChecked: readonly Sentence[]; readonly notCheckedMore?: Sentence; } /** The anchor a "nothing ran" line points at: the end of the turn, else its start. */ export declare function anchorPointer(ctx: ReadContext): RecordPointer[]; /** "…and N more tool calls from before the pause." — past `MAX_LISTED_CALLS` of them. */ export declare function beforePauseMore(ctx: ReadContext, before: readonly BeforePauseCall[]): Sentence | undefined; /** * The committed history holds no tool result from before the pause. Said as * exactly that — never "nothing ran": a window strategy may have dropped an * earlier result, and the record cannot tell the two apart. A history the * record keeps out (a redaction policy's placeholder) is said to be kept out. */ export declare function noResultsBeforePause(ctx: ReadContext): Sentence; export declare function foldMore(ctx: ReadContext, calls: CallsRead): Sentence | undefined; export declare function readCheckedRows(ctx: ReadContext, calls: CallsRead, pausedLeg: PausedLegRead): CheckedRows; export {}; //# sourceMappingURL=checked.d.ts.map