agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
23 lines • 898 B
JavaScript
;
/**
* CostRecorder — forwards `agentfootprint.cost.*` emits to the dispatcher.
*
* Pattern: Factory (GoF) returning an EmitBridge instance.
* Role: Bridges `cost.tick` + `cost.limit_hit` emits from LLMCall / Agent
* stages (via `emitCostTick`) to the EventDispatcher so typed
* consumer listeners fire.
* Emits: agentfootprint.cost.tick / cost.limit_hit
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.costRecorder = void 0;
const EmitBridge_js_1 = require("./EmitBridge.js");
function costRecorder(options) {
return new EmitBridge_js_1.EmitBridge({
id: options.id ?? 'agentfootprint.cost-recorder',
prefix: 'agentfootprint.cost.',
dispatcher: options.dispatcher,
getRunContext: options.getRunContext,
});
}
exports.costRecorder = costRecorder;
//# sourceMappingURL=CostRecorder.js.map