agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
20 lines • 862 B
JavaScript
/** Required active-turn thinking cannot be replayed safely. Not retryable. */
export 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';
}
}
//# sourceMappingURL=replay.js.map