@ottili/foundation-runtime
v1.0.13
Published
Bootstrap loader, generated-client transport, contribution assembly and error boundaries (SoT §8.5).
Downloads
893
Readme
@ottili/foundation-runtime
Bootstrap loader, generated-client transport, contribution assembly and error boundaries (SoT §8.5).
Install
npm install @ottili/foundation-runtimeThis package is part of the Ottili Foundation Framework. See docs/OTTILI_FOUNDATION_FRAMEWORK_SOURCE_OF_TRUTH.md for the canonical spec.
Public API
FoundationClientis the unified transport for all Foundation endpoints, with idempotency, tracing, and circuit breakers.FoundationApiErrorandFoundationTransportErrorfor typed error handling.isRetryableandfromWirePreferencesfor retry classification and preference mapping.
Usage
import { FoundationClient, isRetryable } from "@ottili/foundation-runtime";
const client = new FoundationClient({ baseUrl: "/api/v1/foundation" });
try {
const bootstrap = await client.fetchBootstrap("acme", "hq");
} catch (error) {
if (isRetryable(error)) {
// schedule a retry
}
}