UNPKG

@juspay/neurolink

Version:

The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002

59 lines (58 loc) • 2.16 kB
import type { ProviderRegistryOptions } from "../types/index.js"; /** * Provider Registry - registers all providers with the factory * This is where we migrate providers one by one to the new pattern */ export declare class ProviderRegistry { private static registered; private static registrationPromise; private static options; /** * NEW4: per-handler registration outcomes for the realtime voice * providers. `"ok"` = registered; any other string = the error message. * Empty until the first `registerAllProviders()` call. */ static realtimeRegistration: Record<string, "ok" | string>; /** * Returns a snapshot of voice provider registration outcomes so callers * can detect at runtime which voice handlers are usable. Useful in * health-check endpoints and CI startup probes. */ static getRegistrationReport(): { realtime: Record<string, "ok" | string>; }; /** * Register all providers with the factory */ static registerAllProviders(): Promise<void>; /** * Internal registration implementation * * Flat list of ProviderFactory.registerProvider() calls. Providers load via * dynamic import() of ../providers/<module>.js only - never static imports * (avoids circular dependencies; see CLAUDE.md). * * Not registered (by design): index.ts, providerTypeUtils.ts, * anthropicBaseProvider.ts (legacy; anthropic.ts is live), * googleNativeGemini3.ts (shared helpers). Filename != provider ID * (e.g. amazonBedrock -> "bedrock"); static scanners that miss dynamic * imports may false-positive (Pattern Analysis #1178). */ private static _doRegister; /** * Check if providers are registered */ static isRegistered(): boolean; /** * Clear registrations (for testing) */ static clearRegistrations(): void; /** * Set registry options (should be called before initialization) */ static setOptions(options: ProviderRegistryOptions): void; /** * Get current registry options */ static getOptions(): ProviderRegistryOptions; }