UNPKG

agentfootprint

Version:

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

18 lines • 762 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.causeContextAssessment = void 0; const storedCauseBinding_js_1 = require("./storedCauseBinding.js"); /** A saved assessment belongs only to graph-only serving, never a mixed snapshot bag. */ function causeContextAssessment(context) { try { const assessed = (0, storedCauseBinding_js_1.storedCauseAssessment)(context.kind === 'graph' ? context.cause : context.artifacts.cause); return context.kind === 'snapshot' && assessed.kind !== 'none' ? { kind: 'invalid' } : assessed; } catch { return { kind: 'invalid' }; } } exports.causeContextAssessment = causeContextAssessment; //# sourceMappingURL=causeContext.js.map