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

100 lines (99 loc) 3.27 kB
/** * Metadata Extractor Registry * * Centralized registry for all metadata extractor implementations with metadata * and discovery capabilities. Follows the BaseRegistry pattern. */ import { BaseRegistry } from "../../core/infrastructure/index.js"; import type { MetadataExtractor, MetadataExtractorConfig, MetadataExtractorMetadata, MetadataExtractorType } from "../../types/index.js"; /** * Metadata Extractor Registry * * Manages registration and discovery of all metadata extractor implementations. * Extends BaseRegistry for consistent lifecycle management. */ export declare class MetadataExtractorRegistry extends BaseRegistry<MetadataExtractor, MetadataExtractorMetadata> { private static instance; private aliasMap; private constructor(); /** * Get singleton instance */ static getInstance(): MetadataExtractorRegistry; /** * Reset singleton (for testing) */ static resetInstance(): void; /** * Register all built-in extractors */ protected registerAll(): Promise<void>; /** * Create extractor instance wrapper */ private createExtractorInstance; /** * Register an extractor with aliases */ registerExtractor(type: MetadataExtractorType, factory: () => Promise<MetadataExtractor>, metadata: MetadataExtractorMetadata): void; /** * Resolve type from alias */ resolveType(nameOrAlias: string): MetadataExtractorType; /** * Get an extractor by type or alias */ getExtractor(typeOrAlias: string): Promise<MetadataExtractor>; /** * Get list of available extractor types */ getAvailableExtractors(): MetadataExtractorType[]; /** * Get metadata for a specific extractor */ getExtractorMetadata(typeOrAlias: string): MetadataExtractorMetadata | undefined; /** * Get all aliases for a type */ getAliasesForType(type: MetadataExtractorType): string[]; /** * Get all registered aliases */ getAllAliases(): Map<string, MetadataExtractorType>; /** * Check if a type or alias exists */ hasExtractor(typeOrAlias: string): boolean; /** * Get extractors by use case */ getExtractorsByUseCase(useCase: string): MetadataExtractorType[]; /** * Get extractors that can produce a specific extraction type */ getExtractorsByExtractionType(extractionType: string): MetadataExtractorType[]; /** * Get default configuration for an extractor */ getDefaultConfig(typeOrAlias: string): Partial<MetadataExtractorConfig> | undefined; /** * Clear the registry (also clears aliases) */ clear(): void; } /** * Global metadata extractor registry singleton */ export declare const metadataExtractorRegistry: MetadataExtractorRegistry; /** * Convenience function to get available extractors */ export declare function getAvailableExtractors(): MetadataExtractorType[]; /** * Convenience function to get extractor by type */ export declare function getExtractor(typeOrAlias: string): Promise<MetadataExtractor>; /** * Convenience function to get extractor metadata */ export declare function getRegisteredExtractorMetadata(typeOrAlias: string): MetadataExtractorMetadata | undefined;