@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
67 lines (66 loc) • 2.6 kB
TypeScript
import type { DecideCatalogJson, ProviderRegistryOptions } from "../types/index.js";
/**
* Registers the config-driven `decide` providers described by catalog JSON
* (inferenceKinds ["decide"]). Each one is built by ConfiguredDecisionProvider,
* loaded lazily like every other provider; its descriptor declares
* inferenceKinds ["decide"], so nothing in the generation fallback chain can
* reach it.
*/
export declare function registerDecideCatalogProviders(entries: readonly DecideCatalogJson[]): void;
/**
* 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;
}