/** * Strategy Registry for the Framework Router. * Manages strategy registration and lifecycle. * @module */ import type { BaseStrategy } from "../../strategies/shared/base-strategy.js"; import type { OutputApproach } from "./types.js"; /** * Factory function that creates a strategy instance. */ type StrategyFactory = () => BaseStrategy; /** * Strategy Registry - manages strategy registration and instantiation. * * Features: * - Lazy instantiation for performance * - Singleton support for stateless strategies * - Version tracking for debugging * * @example * ```typescript * registry.register('speckit', () => new SpecKitStrategy(), { * version: '2.0.0', * description: 'Generate project specification artifacts', * singleton: true, * }); * * const strategy = registry.get('speckit'); * ``` */ export declare class StrategyRegistry { private readonly strategies; /** * Register a strategy factory. */ register(approach: OutputApproach, factory: StrategyFactory, options: { version: string; description: string; singleton?: boolean; }): void; /** * Get a strategy instance for an approach. * * @throws If no strategy registered for approach */ get(approach: OutputApproach): BaseStrategy; /** * Check if an approach is registered. */ has(approach: OutputApproach): boolean; /** * Get the registered version for an approach. */ getVersion(approach: OutputApproach): string | undefined; /** * Get metadata for all registered strategies. */ list(): Array<{ approach: OutputApproach; version: string; description: string; }>; /** * Clear all registered strategies (for testing). */ clear(): void; } /** * Default singleton instance. */ export declare const strategyRegistry: StrategyRegistry; export {}; //# sourceMappingURL=strategy-registry.d.ts.map