agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
16 lines (15 loc) • 827 B
TypeScript
/**
* StreamRecorder — forwards `agentfootprint.stream.*` emits to the dispatcher.
*
* Pattern: Factory (GoF) returning an EmitBridge instance.
* Role: Convenience constructor for the stream-domain bridge recorder.
* Stage code in LLMCall/Agent calls `typedEmit(scope, 'agentfootprint.stream.llm_start', {...})`;
* this recorder observes via footprintjs's EmitRecorder channel
* and re-dispatches with typed payloads + enriched meta.
* Emits: agentfootprint.stream.llm_start / llm_end / token / tool_start / tool_end
*/
import { EmitBridge, type EmitBridgeOptions } from './EmitBridge.js';
export type StreamRecorderOptions = Omit<EmitBridgeOptions, 'id' | 'prefix'> & {
readonly id?: string;
};
export declare function streamRecorder(options: StreamRecorderOptions): EmitBridge;