UNPKG

agentfootprint

Version:

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

34 lines • 1.93 kB
import type { AnswerCheck } from './types.js'; /** Host-authored obligations for one claim at one exact finding and window. */ export interface ClaimRequirementPolicy { /** Also the AnswerCheck id: at most 128 characters, with no whitespace. */ readonly claimRef: string; readonly findingRef: string; readonly windowRef: string; /** Nonempty, distinct expected obligations; at most 16 opaque references. */ readonly requirementRefs: readonly string[]; } /** The check concerns prerequisites only; it does not establish a factual value's truth. */ export interface ClaimRequirementAssessment { readonly check: AnswerCheck; /** Matched RequirementResult.id selectors, NOT artifact refs or AnswerCheck.evidenceRefs. */ readonly requirementResultRefs: readonly string[]; } /** * Check every expected prerequisite for one exact claim/finding/window binding. * Any same-scope unresolved report affecting this claim denies it, including an * extra obligation; a satisfied report never overrides that denial. Missing * expected obligations are unreachable, not a successful empty check. * * The host must authenticate the producer and current query/run/scope, authorize * receipt access and establish domain validity BEFORE supplying results. The * public Foottrace reader admits structure only; neither it nor this helper * verifies provenance, freshness, a claim's value, or permission to disclose it. * Use the returned check only when the candidate actually asserts this claim. * Requirement result IDs are selectors, never artifact evidence references. * * A malformed host policy throws code ERR_CLAIM_REQUIREMENT_POLICY. Malformed * receipt sets produce unreachable/invalid-data without exposing parser errors. */ export declare function checkClaimRequirements(policy: ClaimRequirementPolicy, results: unknown): ClaimRequirementAssessment; //# sourceMappingURL=requirements.d.ts.map