UNPKG

agentfootprint

Version:

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

33 lines (32 loc) • 1.9 kB
import type { TurnCall, TurnRecord, TypedNegativeRow } from '../../../integrity/negative-claim/types.js'; import type { AnswerValidationReport } from '../../../answer-validation/types.js'; export interface NegativeDeliveryConfig { readonly field: string; readonly tools: readonly string[]; readonly unestablished: 'withhold' | 'state-searched'; } export type RuntimeNegativeCode = TypedNegativeRow['code'] | 'outside-trusted-context' | 'other-read-has-rows'; export interface RuntimeNegativeRow extends Omit<TypedNegativeRow, 'code' | 'disposition'> { readonly code: RuntimeNegativeCode; readonly disposition: 'checked-fail' | 'not-applicable' | 'unreachable'; /** Audit-only notice; it cannot confirm, block or select evidence. */ readonly notes?: readonly 'absence-kind-normalized'[]; } export type { DeliveredNegative } from '../../../events/payloads.js'; export type AnswerNegatives = import('../../../events/payloads.js').AnswerNegativesPayload; export declare function renderNegativeCandidate(candidate: unknown, config: NegativeDeliveryConfig, record: TurnRecord, trusted: (call: TurnCall) => boolean, interpretation?: 'kind-only' | 'evidence-owned'): { candidate: unknown; answer: AnswerNegatives; correction: boolean; allowed: boolean; }; /** * Merge negative verdicts without manufacturing a successful host comparison. * * THE ONE PROJECTION of a negative row onto the report: its code becomes the * check's `reason`, and the tools it names stay `tools` — the answer's fold * reads both off this row (`assessment/assess.ts` · `readAnswerRows`, * `assessment/sources.ts` · `callsOfCheck`), so a field it reads is never * left behind here. A row that names no tool carries no `tools`. */ export declare function reportWithNegatives(report: AnswerValidationReport, answer: AnswerNegatives, allowed: boolean): AnswerValidationReport;