agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
27 lines (26 loc) • 1.07 kB
TypeScript
/**
* compaction/errors — the one refusal compaction makes out loud.
*
* Pattern: Typed terminal error (peer of PolicyHaltError).
* Role: core/ layer.
* Emits: N/A.
*/
/**
* Thrown when compaction is configured but the provider reports no token
* usage, so the threshold cannot be COUNTED.
*
* Compaction is counted, not guessed. Given a provider that reports nothing,
* the library has three options: guess the window size (a lie), silently do
* nothing (a configured budget that never applies — config that lies), or say
* so. It says so, by name, at the first iteration boundary where a completed
* call reported zero tokens in AND zero out.
*
* Terminal: `Agent.run` does not wrap this in `RunCheckpointError`, because
* resuming would walk into the same wall with the same provider.
*/
export declare class CompactionUnmeasurableError extends Error {
readonly name = "CompactionUnmeasurableError";
/** `provider.name` of the adapter that reported nothing. */
readonly provider: string;
constructor(provider: string);
}