agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
24 lines • 1.94 kB
TypeScript
/**
* Lossless layout of the Messages content this adapter actually understands.
* The carrier stores indices/lengths, inert metadata and digests, never a second content copy.
* Replay policy lives elsewhere: undefined here means no fidelity proof.
*/
import type { LLMMessage } from '../../provider-contract/types.js';
import type { MessageReplay } from '../../thinking/replay.js';
import type { AnthropicContentBlock } from './anthropicMessagesWire.js';
/** One domain-separated digest owner for response fidelity and request binding. */
export declare function replayDigest(value: unknown, salt: string): string;
/** Capture only a complete, representable response; unknown fields are not silently lost. */
export declare function captureAnthropicReplay(content: readonly AnthropicContentBlock[], id: string, stopReason: string, binding?: MessageReplay['binding']): MessageReplay | undefined;
/** Durable negative evidence, without retaining unsupported response values. */
export declare function lossyAnthropicReplay(content: readonly AnthropicContentBlock[], id: string, stopReason: string, binding?: MessageReplay['binding'], observedThinking?: boolean): MessageReplay;
/** Missing identities on old text-only mocks are unknown, not known content loss. */
export declare function captureAnthropicResponseReplay(content: readonly AnthropicContentBlock[], id: string, stopReason: string, binding?: MessageReplay['binding']): MessageReplay | undefined;
/** Exact replay additionally requires the original full-content digest. */
export declare function restoreAnthropicReplay(message: LLMMessage): AnthropicContentBlock[] | undefined;
/**
* Retire thinking without changing the remaining text/tool order. Invalid or
* edited history is projected as it is now; there is no stored text to revive.
*/
export declare function omitAnthropicThinking(message: LLMMessage): LLMMessage;
//# sourceMappingURL=anthropicReplayLayout.d.ts.map