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 • 2.36 kB
TypeScript
/**
* citation — the typed door's rules (design § 5.1, § 5.4): a typed negative claim CITES the
* reads it rests on by their library-minted result identity, and is established only from
* those reads themselves.
*
* Pattern: one verdict per cited read, then the first code by a fixed precedence. A read must
* resolve in THIS turn of this recording (a pause between legs of one turn does not make
* it stale; an earlier turn does), have run and returned, carry a local composed row,
* and fit the claim's kind (a `none` on a read with a next page proves nothing about the
* other pages). Then the monotone withholds, read off the call sequence: rows on the
* same or a narrower search (`contradicted-by-rows`); rows on a wider search not
* provably outside the cited filters (`wider-search-has-rows`); for `complete`, a read
* of the same search with more rows, or a row provably inside the cited scope that the
* list does not hold; a same-search call that failed after the read
* (`later-read-failed`); and any dispatched call the caller does not classify as a
* read after it — or in its batch, where order is unknown (`superseded-by-write`). A
* gap never withholds: the statement says it.
* Role: integrity/ layer (L3), read by `judge.ts`. Pure; another call never establishes a
* claim, and nothing here binds by a provider call id or by an entity's name.
*/
import type { CitationInterpretation, NegativeKind, StaleSince, TurnCall, TurnRecord, TypedVerdict } from './types.js';
/** The verdict on one citation, with the reads it rests on when established. */
export interface CitationVerdict {
readonly kind: NegativeKind | 'unknown';
readonly code: TypedVerdict;
readonly results: readonly string[];
readonly tools: readonly string[];
readonly staleSince?: StaleSince;
readonly reads: readonly TurnCall[];
}
/** At most this many distinct reads in one claim; beyond it the claim is `too-many-claims`. */
export declare const MAX_CITED_READS = 16;
/** Judge one entry of the typed field. */
export declare function judgeCitation(entry: unknown, record: TurnRecord, citable?: readonly string[], interpretation?: CitationInterpretation): CitationVerdict;
//# sourceMappingURL=citation.d.ts.map