@bobmatnyc/ai-code-review
Version:
A TypeScript-based tool for automated code reviews using AI models from Google Gemini, Anthropic Claude, and OpenRouter
52 lines (51 loc) • 1.55 kB
TypeScript
/**
* @fileoverview Plugin manager for custom review strategies.
*
* This module provides a singleton manager for loading and registering plugins
* that provide custom review strategies.
*/
import { IReviewStrategy } from '../strategies/ReviewStrategy';
import { PluginRegistration } from './PluginInterface';
/**
* Singleton manager for plugins
*/
export declare class PluginManager {
private static instance;
private plugins;
/**
* Private constructor to enforce singleton pattern
*/
private constructor();
/**
* Get the singleton instance
* @returns The plugin manager instance
*/
static getInstance(): PluginManager;
/**
* Register a plugin strategy
* @param registration Plugin registration information
*/
registerPlugin(registration: PluginRegistration): void;
/**
* Get a plugin strategy by name
* @param name Plugin name
* @returns The strategy or undefined if not found
*/
getPlugin(name: string): IReviewStrategy | undefined;
/**
* Get plugin information by name
* @param name Plugin name
* @returns Plugin information or undefined if not found
*/
getPluginInfo(name: string): PluginRegistration | undefined;
/**
* List all registered plugins
* @returns Array of plugin registrations
*/
listPlugins(): PluginRegistration[];
/**
* Load plugins from a directory
* @param pluginsDir Directory containing plugins
*/
loadPlugins(pluginsDir: string): Promise<void>;
}