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 (36 loc) • 1.55 kB
TypeScript
/**
* search/review — what a person should LOOK AT in a `Tool.search`, never a
* refusal.
*
* Pattern: one pure lister, two readers: the `check:semantics` gate (warnings,
* errors only under `--strict`) and `defineTool`'s dev-mode warning.
* Role: semantics/ layer, pure.
* Emits: N/A.
*
* • `source-said` — every word a claim may use to scope itself to the
* source. A word wider than the source ("the estate") would let a claim
* about everything read as a claim about this store, so a person reviews
* the list, like an `authoritative` use. No word ever removes a gap.
* • `said-overlap` — a `subject.said` word that repeats a qualifier: a
* filter value's word (a qualifier NOT in `fixed`), or a fixed
* qualifier's own word. The subject says WHAT was looked for and the
* qualifiers say WHICH; a subject word carrying a qualifier lets a claim
* match the subject without naming the qualifier the search applied.
*/
import type { ToolSearch } from './types.js';
export type SearchReviewCode = 'source-said' | 'said-overlap';
/** One thing a reviewer should read. */
export interface SearchReviewItem {
readonly code: SearchReviewCode;
readonly field: string;
readonly message: string;
}
/**
* The review items of one search — `[]` when there is nothing to look at.
*
* @example
* ```ts
* searchReviewItems(search).map((i) => i.code); // ['source-said']
* ```
*/
export declare function searchReviewItems(search: ToolSearch): readonly SearchReviewItem[];