UNPKG

agentfootprint

Version:

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

22 lines (21 loc) • 1.26 kB
/** * Anthropic replay policy, shared by every Messages transport. * * A local consistency check, NOT signature authentication. Unknown provenance * passes through. Known unsafe active-tool replay is refused; eligible completed * turns lose thinking explicitly, with one report per block. No beta policy is * enabled and switching models alone never removes thinking. * * Contract (2026-10-10): * https://platform.claude.com/docs/en/build-with-claude/thinking#preserving-thinking-blocks * https://platform.claude.com/docs/en/build-with-claude/preserved-thinking */ import type { LLMRequest } from '../../provider-contract/types.js'; import type { MessageReplay, ReplayPreparation } from '../../thinking/replay.js'; import type { AnthropicMessagesBody } from './anthropicMessagesWire.js'; type Binding = NonNullable<MessageReplay['binding']>; /** Capture actual serialized request values BEFORE awaiting transport. */ export declare function thinkingReplayBinding(body: AnthropicMessagesBody, model: string): (id: string) => Binding; /** Pure and idempotent. No caller mutation; all refusals precede any report. */ export declare function prepareAnthropicReplay(request: LLMRequest, model: string, provider: string): ReplayPreparation; export {};