UNPKG

@entro314labs/ai-changelog-generator

Version:

AI-powered changelog generator with MCP server support - works with most providers, online and local models

127 lines (126 loc) 4.04 kB
export declare class ProviderManagerService { [key: string]: any; constructor(config?: Record<string, any>, options?: Record<string, any>); /** * Load all provider implementations */ loadProviders(): void; /** * Determine the active provider based on configuration and availability */ determineActiveProvider(): void; /** * Get the active provider instance */ getActiveProvider(): any; /** * Get all loaded providers */ getAllProviders(): any; /** * Find provider by name */ findProviderByName(name: any): any; /** * Switch to a different provider. * * On success the selection is made durable so the generation flow actually * uses it: the resolved provider name is written back to `this.config` * (so any subsequent reload re-resolves to it) and, when a * ConfigurationManager is available, persisted to `.ai-changelog.json` via * `setActiveProvider`. */ switchProvider(providerName: any): { success: boolean; error: string; provider?: undefined; } | { error?: undefined; success: boolean; provider: any; }; /** * List all providers with their status. * * Development providers (dummy/mock) are surfaced with `development: true` * so callers never present them as real providers. This is synchronous; the * provider's ACTUAL available models are fetched separately via the async * `getProviderModels(name)` (used by the `providers models` command). */ listProviders(): any; /** * Resolve a provider instance's actual available models, tolerating both sync * and async `getAvailableModels()` implementations and surfacing failures as * an empty list rather than throwing. */ resolveProviderModels(instance: any): Promise<any[]>; /** * Read a provider's default model without letting an abstract/unimplemented * method break the listing. */ safeGetDefaultModel(instance: any): any; /** * Test connection to a specific provider */ testProvider(providerName: any): Promise<any>; /** * Get provider capabilities */ getProviderCapabilities(providerName: any): any; /** * Validate all providers */ validateAll(): Promise<Record<string, any>>; /** * Get provider statistics. * * `available`/`configured` reflect only real production providers so * development providers (dummy/mock) never inflate the "ready" counts. * `development` exposes how many development providers are loaded, and each * provider entry is flagged truthfully. */ getStats(): { total: any; available: any; configured: any; development: any; active: any; providers: any; }; /** * Reload providers (useful for configuration changes) */ reload(newConfig?: any): void; /** * Check if any provider is available */ hasAvailableProvider(): boolean; /** * Get available providers with full details */ getAvailableProviders(): any; /** * Get simple list of available provider names */ getAvailableProviderNames(): any; /** * Get a provider's ACTUAL available models by delegating to the provider * instance's `getAvailableModels()`. Returns the real descriptor list so the * `providers models` command no longer renders a hardcoded list. Returns * `null` when the provider is unknown so callers can surface a clear error. */ getProviderModels(name: any): Promise<any[] | null>; /** * Get configured provider priority order */ getProviderPriority(): string[]; /** * Validate if provider name exists in available providers */ validateProviderName(name: any): boolean; /** * Get the default fallback provider */ getDefaultProvider(): any; } export default ProviderManagerService;