UNPKG

agentfootprint

Version:

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

24 lines • 1.08 kB
"use strict"; /** * 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 */ Object.defineProperty(exports, "__esModule", { value: true }); exports.streamRecorder = void 0; const EmitBridge_js_1 = require("./EmitBridge.js"); function streamRecorder(options) { return new EmitBridge_js_1.EmitBridge({ id: options.id ?? 'agentfootprint.stream-recorder', prefix: 'agentfootprint.stream.', dispatcher: options.dispatcher, getRunContext: options.getRunContext, }); } exports.streamRecorder = streamRecorder; //# sourceMappingURL=StreamRecorder.js.map