agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
14 lines • 562 B
JavaScript
import { storedCauseAssessment } from './storedCauseBinding.js';
/** A saved assessment belongs only to graph-only serving, never a mixed snapshot bag. */
export function causeContextAssessment(context) {
try {
const assessed = storedCauseAssessment(context.kind === 'graph' ? context.cause : context.artifacts.cause);
return context.kind === 'snapshot' && assessed.kind !== 'none'
? { kind: 'invalid' }
: assessed;
}
catch {
return { kind: 'invalid' };
}
}
//# sourceMappingURL=causeContext.js.map