UNPKG

agentfootprint

Version:

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

60 lines • 2.61 kB
"use strict"; /** * hosting/signin/errors — the sign-in pieces' construction and capacity * refusals, each naming what is at fault. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.PasswordCheckUnreachableError = exports.SignInStoreFullError = exports.MemorySignInsConfigError = exports.SignInDoorConfigError = void 0; /** A sign-in door option that cannot be honoured — `option` names it. */ class SignInDoorConfigError extends TypeError { code = 'ERR_SIGN_IN_DOOR_CONFIG'; /** The option at fault (`publicUrl`, `hours`, `guard`, `trustedProxies`, …). */ option; constructor(option, sentence) { super(`[hosting] signInDoor: ${sentence}.`); this.name = 'SignInDoorConfigError'; this.option = option; } } exports.SignInDoorConfigError = SignInDoorConfigError; /** A `memorySignIns` option that cannot be honoured — `option` names it. */ class MemorySignInsConfigError extends TypeError { code = 'ERR_MEMORY_SIGN_INS_CONFIG'; option; constructor(option, sentence) { super(`[hosting] memorySignIns: ${sentence}.`); this.name = 'MemorySignInsConfigError'; this.option = option; } } exports.MemorySignInsConfigError = MemorySignInsConfigError; /** * The sign-in store is full of LIVE sign-ins and will not evict another * person's to make room — the new sign-in is refused (the door answers 503) * instead of signing somebody else out. */ class SignInStoreFullError extends Error { code = 'ERR_SIGN_IN_STORE_FULL'; constructor(max) { super(`[hosting] the sign-in store holds ${max} live sign-ins, its cap. A new sign-in is ` + `refused rather than ending somebody else's; raise the cap or use a shared store.`); this.name = 'SignInStoreFullError'; } } exports.SignInStoreFullError = SignInStoreFullError; /** * A password check that never reached its backend — the directory could not * be connected to, or its TLS handshake failed — so the password was never * sent and nobody's lockout counter moved. The door un-counts the attempt. * Any OTHER error from a check (a bind that timed out after it was sent) keeps * the attempt counted: the directory may have charged it (review idI57 S-6). */ class PasswordCheckUnreachableError extends Error { code = 'ERR_PASSWORD_CHECK_UNREACHABLE'; constructor(sentence, options) { super(`[hosting] ${sentence}`, options); this.name = 'PasswordCheckUnreachableError'; } } exports.PasswordCheckUnreachableError = PasswordCheckUnreachableError; //# sourceMappingURL=errors.js.map