agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
27 lines (26 loc) • 1.6 kB
TypeScript
/** Request-local structural identity, not assertion truth or a second findings ledger. */
import type { LLMMessage, LLMRequest } from '../../../provider-contract/types.js';
import type { FindingsDeclaration } from './types.js';
export type ReferenceReason = 'not-served' | 'ambiguous' | 'not-a-result' | 'missing-request' | 'capture-limit';
export interface ReferenceObservation {
readonly identified: boolean;
readonly execution: 'result' | 'not-dispatched' | 'unknown';
readonly visibility: 'body' | 'ticket' | 'unknown';
readonly reason?: ReferenceReason;
readonly toolName?: string;
readonly ref?: string;
}
export interface FindingsRequest {
readonly version: 1;
readonly iteration: number;
readonly complete: boolean;
readonly results: readonly ({
readonly toolCallId: string;
} & ReferenceObservation)[];
}
/** Capture before transport; source origin is read before framework markers are stripped. */
export declare function captureFindingsRequest(request: LLMRequest, origins: readonly LLMMessage[], iteration: number): FindingsRequest;
/** No receipt/hash, current ledger or future batch result can fill a missing boundary. */
export declare function referenceObservation(request: FindingsRequest | undefined, iteration: number, id: string): ReferenceObservation;
/** Fixed teaching words contain no untrusted IDs or foreign-run existence signal. */
export declare function findingsReferenceRefusal(declaration: FindingsDeclaration | undefined, request: FindingsRequest | undefined, iteration: number, malformed?: number): string | undefined;