agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
15 lines (14 loc) • 648 B
TypeScript
/**
* 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
*/
import { EmitBridge, type EmitBridgeOptions } from './EmitBridge.js';
export type CostRecorderOptions = Omit<EmitBridgeOptions, 'id' | 'prefix'> & {
readonly id?: string;
};
export declare function costRecorder(options: CostRecorderOptions): EmitBridge;