agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
23 lines • 943 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.bindToolSecurityEvents = void 0;
const typedEmit_js_1 = require("../../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.
*/
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.
(0, typedEmit_js_1.typedEmit)(scope, type, {
...payload,
toolCallId,
iteration,
});
};
}
exports.bindToolSecurityEvents = bindToolSecurityEvents;
//# sourceMappingURL=toolSecurityEvents.js.map