import type { Theme, ThemeData } from '../themes/index.js'; import type { CodeAnalysis } from '../analyzers/code-analyzer.js'; import type { ScanResult } from '../analyzers/file-scanner.js'; import type { DependencyAnalysis } from '../analyzers/dependency-analyzer.js'; export interface AnalyzerPlugin { name: string; /** Hook that runs after built-in analysis and can augment results. */ analyze: (context: AnalyzerContext) => Promise; } export interface AnalyzerContext { scan: ScanResult; codeAnalysis: CodeAnalysis; deps: DependencyAnalysis; } export interface AnalyzerResult { /** Extra sections appended to the README (markdown strings keyed by heading). */ sections?: Record; /** Extra badges in shields.io format. */ badges?: Array<{ label: string; message: string; color: string; url?: string; }>; } export interface ThemePlugin { name: string; render: (data: ThemeData) => string; } export type Plugin = { name: string; analyzers?: AnalyzerPlugin[]; themes?: ThemePlugin[]; }; export declare function registerPlugin(plugin: Plugin): void; export declare function getAnalyzerPlugins(): AnalyzerPlugin[]; export declare function getThemePlugin(name: string): Theme | undefined; export declare function listPluginThemes(): string[]; /** * Loads plugins from: * 1. Project config `readme-ai.config.js` → `plugins: [...]` * 2. `readme-ai-plugin-*` packages found in node_modules */ export declare function loadPlugins(repoPath: string): Promise; /** * Run all registered analyzer plugins and collect their results. */ export declare function runAnalyzerPlugins(context: AnalyzerContext): Promise; //# sourceMappingURL=index.d.ts.map