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

32 lines (31 loc) • 1.12 kB
/** * TaskBackendRegistry — registration point for all task backend implementations. * Follows the same pattern as ProviderRegistry: dynamic imports, lazy registration. */ import type { TaskBackendName, TaskBackendFactoryFn, TaskManagerConfig, TaskBackend } from "../../types/index.js"; export declare class TaskBackendRegistry { private static factories; private static registered; /** * Register a backend factory function. * Can be called externally to add custom backends (e.g., "pg-boss"). */ static register(name: string, factory: TaskBackendFactoryFn): void; /** * Register the built-in backends (BullMQ, NodeTimeout). * Idempotent — safe to call multiple times. */ static registerDefaults(): void; /** * Create a backend instance by name. */ static create(name: TaskBackendName | string, config: TaskManagerConfig): Promise<TaskBackend>; /** * Check if a backend is registered. */ static has(name: string): boolean; /** * List all registered backend names. */ static getAvailable(): string[]; }