UNPKG

agentfootprint

Version:

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

42 lines • 2.3 kB
/** * judge — the typed door's rows: one row per entry of the app's negatives field, its verdict * mapped to the disposition the validation door already reads (design § 5.4), and the * library's statement beside an established one. * * Pattern: `citation.ts` decides; this file names the row (`agent:negative-claims:<field>#<n>`), * maps the verdict to a disposition and composes the statement (`statement.ts`). An * established claim CLEARS the claim (`not-applicable`) — it never verifies the answer, * so no row is `checked-pass`. * Role: integrity/ layer (L3). Not wired: PR 4 mounts it behind `.negativeClaims()` and * `agentChecks: ['negative-claims']`. * * A row carries identities, tool names and codes — never a value and never a sentence; the * statement travels beside it. */ import type { Disposition } from '../disposition/types.js'; import { MAX_CITED_READS } from './citation.js'; import { MAX_NEGATIVE_CLAIMS } from './limits.js'; import type { CitationInterpretation, TurnRecord, TypedJudgement, TypedVerdict } from './types.js'; export { MAX_CITED_READS }; export { MAX_NEGATIVE_CLAIMS }; /** The disposition a typed verdict files (§ 5.4). */ export declare function dispositionOf(code: TypedVerdict): Disposition; export interface TypedCheckInput { /** The answer field that holds the citations — names the rows. */ readonly field: string; /** The field's value as the model filled it — untrusted. */ readonly negatives: unknown; readonly record: TurnRecord; /** The tools the app lets a claim cite (`.negativeClaims({ tools })`). */ readonly citable?: readonly string[]; /** Internal staged comparison: corrected kind only, then the recorded-subject label check. * Omitted retains the historical explicit-kind/exact-about pure interpretation. */ readonly interpretation?: CitationInterpretation; } /** * Judge every citation of the field. No field, or an empty list, is no claim. A field that is * not a list is one unresolved citation; a field of more than {@link MAX_NEGATIVE_CLAIMS} * claims withholds every one of them (`too-many-claims`). */ export declare function judgeTypedNegatives(input: TypedCheckInput): TypedJudgement[]; //# sourceMappingURL=judge.d.ts.map