UNPKG

agentfootprint

Version:

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

37 lines • 2.3 kB
/** * prose — the prose door (design § 5.2): negative phrases anchored in a dispatched read's * declared words, sent values or resolved names are resolved and NOTED against the record. * An anchor permits a finding, never binds an entity or establishes a claim. Observe-only: * a note never withholds, whatever the validation mode; a claim may carry no note. * * Pattern: detect (`detect.ts`) → data anchor (`anchor.ts`) → resolve (`resolve.ts`) → containment notes * (`containment.ts`), one row per claim and one per unit the grammar could not judge * (`in-code-block`, `language-unsupported`), in text order. A record that may be missing * a call, or keeps one out by redaction, notes every claim `record-incomplete` and * nothing else: nothing can be said around a hole. More than MAX_NEGATIVE_CLAIMS * returns one `too-many-claims` note for the whole text, before reading the record. * Role: integrity/ layer (L3). The agent's negativeClaims arm observes every original * model string within a whole-answer budget and files these rows; no prose enforcement. * * Rows carry spans into the text, phrase ids, the pack version, note codes and result * identities — never a word of the text or a value of the record. */ import { type ResolvedNegativeClaimPhrases } from './phrases.js'; import { type ProseWorkBudget } from './work.js'; import type { ProseRow, TurnRecord } from './types.js'; export interface ProseCheckInput { /** The answer field the text came from — names the rows. */ readonly field: string; /** The text — untrusted model output. */ readonly text: string; readonly record: TurnRecord; /** The person's last message — names a CANDIDATE for an entity-less claim, never a binding. */ readonly personMessage?: string; /** App literal extensions, admitted once at configuration time. */ readonly phrases?: ResolvedNegativeClaimPhrases; /** @internal One runtime observation shares this allowance across every field. */ readonly work?: ProseWorkBudget; } /** Note each claim, or one whole-text overflow note without judging any claim. */ export declare function judgeProseNegatives(input: ProseCheckInput): ProseRow[]; //# sourceMappingURL=prose.d.ts.map