UNPKG

agentfootprint

Version:

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

27 lines • 1.15 kB
"use strict"; /** * ToolsRecorder — forwards `agentfootprint.tools.*` emits to the dispatcher. * * Pattern: Factory over EmitBridge. * Role: Bridges tool-domain events. Today: discovery_failed (emitted by * buildToolsSlot when an external `ToolProvider.list(ctx)` throws * or rejects). The other tools.* events (offered/activated/ * deactivated) are declared in the registry for consumer code * that wants to emit them; the same prefix bridge forwards all * of them. * Emits: agentfootprint.tools.offered / tools.activated / tools.deactivated * / tools.discovery_failed */ Object.defineProperty(exports, "__esModule", { value: true }); exports.toolsRecorder = void 0; const EmitBridge_js_1 = require("./EmitBridge.js"); function toolsRecorder(options) { return new EmitBridge_js_1.EmitBridge({ id: options.id ?? 'agentfootprint.tools-recorder', prefix: 'agentfootprint.tools.', dispatcher: options.dispatcher, getRunContext: options.getRunContext, }); } exports.toolsRecorder = toolsRecorder; //# sourceMappingURL=ToolsRecorder.js.map