agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
19 lines • 749 B
JavaScript
import { typedEmit } from '../../recorders/core/typedEmit.js';
/**
* Bind at dispatch, including resumed and nested dispatch. Copy the two
* primitives now: a provider may finish later, after another call started.
* Never read "current call" from mutable state at delivery time.
*/
export function bindToolSecurityEvents(scope, call) {
const { toolCallId, iteration } = call;
return (type, payload) => {
// The mapped payload omits exactly the two keys restored here. TS cannot
// prove that generic Omit + reconstruction equals the indexed payload.
typedEmit(scope, type, {
...payload,
toolCallId,
iteration,
});
};
}
//# sourceMappingURL=toolSecurityEvents.js.map