UNPKG

agentfootprint

Version:

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

19 lines • 704 B
/** Internal control flow, translated to the existing input-limit observation. */ export class ProseWorkLimit extends Error { } /** Tokens visited and characters prepared/compared share the same allowance. * The runtime shares one instance across all fields; pure callers default to * one per text. There is no process cache or application-configurable bypass. */ export function createProseWorkBudget() { let remaining = 8_000_000; return { charge(units) { if (remaining < 0 || units > remaining) { remaining = -1; throw new ProseWorkLimit(); } remaining -= units; }, }; } //# sourceMappingURL=work.js.map