/** * RuntimeRegistry.ts * * Central registry for HoloScript runtime modules. * Allows Hololand to discover and execute runtimes dynamically. */ import type { HoloComposition } from '@holoscript/core'; export interface RuntimeModule { /** Runtime identifier */ id: string; /** Runtime name */ name: string; /** Runtime version */ version: string; /** Supported composition types */ supportedTypes: string[]; /** Initialize runtime from composition */ initialize(composition: HoloComposition, config?: any): RuntimeExecutor; /** Runtime capabilities */ capabilities: RuntimeCapabilities; /** Runtime metadata */ metadata: RuntimeMetadata; } export interface RuntimeExecutor { /** Start execution */ start(): void; /** Stop execution */ stop(): void; /** Pause execution */ pause(): void; /** Resume execution */ resume(): void; /** Update runtime (called per frame) */ update(dt: number): void; /** Get runtime statistics */ getStatistics(): any; /** Get runtime state */ getState(): any; /** Reset runtime */ reset(): void; } export interface RuntimeCapabilities { /** Physics simulation */ physics?: { gravity: boolean; collision: boolean; constraints: boolean; softBody: boolean; fluids: boolean; }; /** Rendering capabilities */ rendering?: { particles: boolean; lighting: boolean; shadows: boolean; postProcessing: boolean; }; /** Interaction capabilities */ interaction?: { userInput: boolean; gestures: boolean; voice: boolean; haptics: boolean; }; /** Platform support */ platforms?: string[]; /** Performance metrics */ performance?: { maxEntities: number; maxParticles: number; targetFPS: number; }; } export interface RuntimeMetadata { /** Author */ author?: string; /** Description */ description?: string; /** Documentation URL */ documentation?: string; /** Repository URL */ repository?: string; /** License */ license?: string; /** Tags */ tags?: string[]; } /** * Runtime Registry - Central registry for all HoloScript runtimes */ declare class RuntimeRegistryClass { private runtimes; /** * Register a runtime module */ register(runtime: RuntimeModule): void; /** * Unregister a runtime module */ unregister(runtimeId: string): boolean; /** * Get runtime by ID */ get(runtimeId: string): RuntimeModule | undefined; /** * Check if runtime is registered */ has(runtimeId: string): boolean; /** * Get all registered runtimes */ getAll(): RuntimeModule[]; /** * Get runtime IDs */ getIds(): string[]; /** * Find runtimes by type */ findByType(type: string): RuntimeModule[]; /** * Find runtimes by capability */ findByCapability(capability: string): RuntimeModule[]; /** * Find runtimes by tag */ findByTag(tag: string): RuntimeModule[]; /** * Execute composition with appropriate runtime */ execute(composition: HoloComposition, config?: any): RuntimeExecutor | null; /** * Get registry statistics */ getStatistics(): { totalRuntimes: number; runtimes: { id: string; name: string; version: string; types: string[]; tags: string[]; }[]; }; /** * Clear all runtimes (mainly for testing) */ clear(): void; } export declare const RuntimeRegistry: RuntimeRegistryClass; /** * Decorator for registering runtime modules */ export declare function registerRuntime(runtime: RuntimeModule): RuntimeModule; export {}; //# sourceMappingURL=RuntimeRegistry.d.ts.map