agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
21 lines • 770 B
JavaScript
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. */
export class ArtifactDetailError extends Error {
code;
constructor(code) {
super(messages[code]);
this.code = code;
this.name = 'ArtifactDetailError';
}
}
export function invalidDetail() {
throw new ArtifactDetailError('ERR_ARTIFACT_DETAIL_INVALID');
}
export function unavailableDetail() {
throw new ArtifactDetailError('ERR_ARTIFACT_DETAIL_UNAVAILABLE');
}
//# sourceMappingURL=detailError.js.map