agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
27 lines • 1.05 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.unavailableDetail = exports.invalidDetail = exports.ArtifactDetailError = void 0;
const messages = {
ERR_ARTIFACT_DETAIL_INVALID: 'Invalid artifact detail request.',
ERR_ARTIFACT_DETAIL_UNAVAILABLE: 'Artifact detail is unavailable.',
ERR_ARTIFACT_DETAIL_CANCELLED: 'Artifact detail request was cancelled.',
};
/** A bounded detail request was malformed, could not be admitted, or was cancelled. */
class ArtifactDetailError extends Error {
code;
constructor(code) {
super(messages[code]);
this.code = code;
this.name = 'ArtifactDetailError';
}
}
exports.ArtifactDetailError = ArtifactDetailError;
function invalidDetail() {
throw new ArtifactDetailError('ERR_ARTIFACT_DETAIL_INVALID');
}
exports.invalidDetail = invalidDetail;
function unavailableDetail() {
throw new ArtifactDetailError('ERR_ARTIFACT_DETAIL_UNAVAILABLE');
}
exports.unavailableDetail = unavailableDetail;
//# sourceMappingURL=detailError.js.map