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.03 kB
/** * EmbeddingRecorder — forwards `agentfootprint.embedding.*` emits to the dispatcher. * * Pattern: Factory over EmitBridge. * Role: Bridges the embedding domain — the two-phase cost model. Without a * bridge an emit never reaches `agent.on(...)` no matter how correctly * it is fired, which is the shape this domain was in until 8.9.0: it * had a payload type, a registry entry and a `DomainWildcard` arm, and * no way for the event to arrive. * Emits: agentfootprint.embedding.generated * * Always-on and zero-cost: an agent with no memory pipeline embeds nothing and * this bridge sees nothing. */ import { EmitBridge } from './EmitBridge.js'; export function embeddingRecorder(options) { return new EmitBridge({ id: options.id ?? 'agentfootprint.embedding-recorder', prefix: 'agentfootprint.embedding.', dispatcher: options.dispatcher, getRunContext: options.getRunContext, }); } //# sourceMappingURL=EmbeddingRecorder.js.map