UNPKG

agentfootprint

Version:

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

19 lines (18 loc) • 1.27 kB
/** Pure message matching for durable omissions; no second conversation store. */ import type { LLMMessage } from '../provider-contract/types.js'; import type { ReplayPreparation } from './replay.js'; /** Only an approved thinking edit, never a replacement conversation or tool result. */ export interface ReplayRetirement { readonly replayId?: string; readonly messageFingerprint: string; readonly thinkingBlocks: LLMMessage['thinkingBlocks']; readonly replay?: LLMMessage['replay']; } /** Narrow a transport report before a checkpoint owner retains it. */ export declare function replayRetirements(preparation: ReplayPreparation): readonly ReplayRetirement[]; /** A local matching key, not a signature validator or public authentication. */ export declare function replayMessageFingerprint(message: LLMMessage): string; /** Apply only reported thinking omissions, retaining all host-owned metadata. */ export declare function retireReplayHistory(history: readonly LLMMessage[], preparation: ReplayPreparation): readonly LLMMessage[]; /** One identity rule for live history, retries and both checkpoint doors. */ export declare function applyReplayRetirements(history: readonly LLMMessage[], retirements: readonly ReplayRetirement[]): readonly LLMMessage[];