UNPKG

@juspay/neurolink

Version:

Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio

41 lines (40 loc) 1.24 kB
/** * Service Registry for Dependency Injection * Breaks circular dependencies by providing lazy loading and centralized service management */ import type { ServiceFactory } from "../types/index.js"; export declare class ServiceRegistry { private static services; private static initializing; /** * Register a service with optional singleton behavior */ static register<T>(name: string, factory: ServiceFactory<T>, options?: { singleton?: boolean; }): void; /** * Get a service instance with circular dependency detection */ static get<T>(name: string): Promise<T>; /** * Get a service synchronously (throws if async initialization required) */ static getSync<T>(name: string): T; /** * Check if a service is registered */ static has(name: string): boolean; /** * Clear all services (useful for testing) */ static clear(): void; /** * Get all registered service names */ static getRegisteredServices(): string[]; /** * Register multiple services at once */ static registerBatch(services: Record<string, ServiceFactory>): void; } export declare const serviceRegistry: typeof ServiceRegistry;