UNPKG

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.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UnsafeThinkingReplayError = void 0; /** Required active-turn thinking cannot be replayed safely. Not retryable. */ class UnsafeThinkingReplayError extends Error { provider; model; messageIndex; reason; code = 'UNSAFE_THINKING_REPLAY'; retryable = false; constructor(provider, model, messageIndex, reason) { super(`Cannot replay thinking in an unfinished tool turn (${reason}, message ${messageIndex}). ` + 'Keep the system prompt, tool definitions and earlier messages stable within the turn, ' + 'and preserve the original assistant content and signatures. Finish that turn before editing its context.'); this.provider = provider; this.model = model; this.messageIndex = messageIndex; this.reason = reason; this.name = 'UnsafeThinkingReplayError'; } } exports.UnsafeThinkingReplayError = UnsafeThinkingReplayError; //# sourceMappingURL=replay.js.map