UNPKG

agentfootprint

Version:

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

30 lines • 1.68 kB
"use strict"; /** * agentfootprint/resilience — provider decorators for production reliability. * * Three composable wrappers around `LLMProvider`. Each preserves the * `LLMProvider` interface (drop-in replacement) and stacks freely: * * const provider = withRetry( * fallbackProvider( * anthropic({ apiKey }), * openai({ apiKey }), * ), * { maxAttempts: 5 }, * ); * * Reads as: try anthropic; on failure fall back to openai; the whole * chain is wrapped in retry with 5 attempts. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.CircuitOpenError = exports.withCircuitBreaker = exports.fallbackProvider = exports.withFallback = exports.withRetry = void 0; var withRetry_js_1 = require("./withRetry.js"); Object.defineProperty(exports, "withRetry", { enumerable: true, get: function () { return withRetry_js_1.withRetry; } }); var withFallback_js_1 = require("./withFallback.js"); Object.defineProperty(exports, "withFallback", { enumerable: true, get: function () { return withFallback_js_1.withFallback; } }); var fallbackProvider_js_1 = require("./fallbackProvider.js"); Object.defineProperty(exports, "fallbackProvider", { enumerable: true, get: function () { return fallbackProvider_js_1.fallbackProvider; } }); var withCircuitBreaker_js_1 = require("./withCircuitBreaker.js"); Object.defineProperty(exports, "withCircuitBreaker", { enumerable: true, get: function () { return withCircuitBreaker_js_1.withCircuitBreaker; } }); Object.defineProperty(exports, "CircuitOpenError", { enumerable: true, get: function () { return withCircuitBreaker_js_1.CircuitOpenError; } }); //# sourceMappingURL=index.js.map