UNPKG

agentfootprint

Version:

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

41 lines (40 loc) • 2.48 kB
/** * containment — the prose door's notes (design § 5.2, § 5.3): what a typed citation would have * made exact, said about a prose claim against the reads it rests on. A note never withholds. * * Pattern: the reads of one entity are grouped by search (`readings.ts · readingKey`) and each * search's reads merged. Each search gets its OWN notes: how it read (`call-not-read`, * `empty-undeclared`, `clarify-open`, the rows rule), its row (`coverage-unverified`, * `declaration-overclaimed`), its gaps by facet (`coverage-gap`, `cap-reached`, `paged`, * `partial`, `gap-relevance-unknown`), its period (`period-*` where the unheld time * overlaps the claim's window), containment (`scope-wider`: a fixed qualifier or a * filter in effect the claim does not name through the declared words, no window over * a search with one, a window wider than the one read, an unbounded word), and the * sequence (`later-read-failed`, `superseded-by-write`). * * A search with no note ESTABLISHES the claim; the claim is then noted only by what the * other searches BEAR — rows that contradict it, reads that disagree, unheld time over * its window. With no establishing search, every search's notes stand. So an extra * read clears no other read's objection. * Role: integrity/ layer (L3), read by `prose.ts`. * * Words decide only through declared `said` lists; a hedge never scopes; a host-filled identity * filter is the caller's own view and is never asked of a prose claim. */ import { type TimeRange } from '../../time/range.js'; import type { DetectedClaim } from './detect.js'; import type { ProseNote, TurnCall, TurnRecord } from './types.js'; import type { ProseWorkBudget } from './work.js'; /** What the unit says, read once. */ interface ClaimWords { readonly claim: DetectedClaim; readonly text: string; readonly window: TimeRange | undefined; readonly unbounded: boolean; readonly sourceMarker: boolean; readonly work?: ProseWorkBudget; } export declare function claimWordsOf(claim: DetectedClaim, text: string, clock: string, work?: ProseWorkBudget): ClaimWords; /** The notes of one entity's reads: establishing searches clear all but what siblings bear. */ export declare function entityNotes(calls: readonly TurnCall[], words: ClaimWords, record: TurnRecord, peers: readonly TurnCall[]): ProseNote[]; export {};