/** * launch-tolerant-registry.ts, a `ProviderRegistry` construction that never * dies at boot because a provider's API key env var is unset. * * `ProviderRegistry`'s constructor eagerly constructs every built-in provider * from its current environment; several provider constructors throw when * their expected API key env var is missing (a fail-fast that is correct for * an interactive surface the user is actively configuring, but wrong for a * host process that must boot regardless of which providers happen to be * configured). {@link createLaunchTolerantProviderRegistry} makes registry * construction itself launch-tolerant: for every known provider whose env * vars are ALL unset, a placeholder API key is planted just long enough for * construction to succeed, the real environment is restored immediately * after (in a `finally`, so a construction failure never leaves the * placeholder behind), and then each placeholder-constructed provider is * explicitly reset to an unconfigured, empty-key state, so the registry * construction never fails, but the resulting registry is exactly as honest * about which providers are actually configured as one built from a real * environment with those keys absent. * * ── Hoist provenance (2026-07-30 daemon/TUI split) ─────────────────────────── * * This existed only in the agent (`runtime/services.ts`), which needed it * because it is itself a daemon-grade host process. The parity gap the * daemon/TUI split checklist calls out is that the *standalone* daemon has * the identical must-boot property, a real deployment will not always have * every provider's API key set, so this is hoisted here rather than staying * agent-only, unchanged from the agent's implementation (it has no * agent-specific dependency: only `ProviderRegistry`, its constructor * options, and `process.env`). */ import { ProviderRegistry } from './registry.js'; type ProviderRegistryConstructionOptions = ConstructorParameters[0]; /** * Construct a `ProviderRegistry` that never throws at construction over a * missing provider API key. Every known provider whose env vars are all * unset gets a placeholder value planted just for construction, the real * environment is restored immediately after (success or failure), and every * placeholder-constructed provider is reset to an honest unconfigured, * empty-key state before the registry is returned. */ export declare function createLaunchTolerantProviderRegistry(options: ProviderRegistryConstructionOptions): ProviderRegistry; export {}; //# sourceMappingURL=launch-tolerant-registry.d.ts.map