UNPKG

agentfootprint

Version:

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

25 lines • 668 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createRunIdObserver = void 0; function createRunIdObserver(onNewRun) { let lastRunId; return { observe(runId) { if (!runId) return; if (lastRunId === undefined) { lastRunId = runId; return; } if (runId !== lastRunId) { onNewRun(); lastRunId = runId; } }, reset() { lastRunId = undefined; }, }; } exports.createRunIdObserver = createRunIdObserver; //# sourceMappingURL=observeRunId.js.map