/** * usePlugins Hook * * Plugin state management using the data architecture: * - PreferencesService for user flags (enable/disable, skip migrate, pinned) * - ScanCacheService for caching scan results between sessions * - RegistryService for plugin source information * * @since v1.50.0 */ import type { CombinedPlugin, ScannedPlugin } from '../../core/types/index.js'; export type { CombinedPlugin } from '../../core/types/index.js'; export interface UsePluginsOptions { /** Production server plugins path */ prodPath?: string; /** Test server plugins path */ testPath?: string; /** Auto-load from cache on mount */ autoLoad?: boolean; /** Auto-scan if cache is stale */ autoScanIfStale?: boolean; } export interface PluginsState { /** Combined plugin data from scans + preferences */ plugins: CombinedPlugin[]; /** Scanned plugins from production server */ prodPlugins: ScannedPlugin[]; /** Scanned plugins from test server */ testPlugins: ScannedPlugin[]; /** Scan both servers, returns scanned plugins */ scan: () => Promise<{ prod: ScannedPlugin[]; test: ScannedPlugin[]; } | undefined>; /** Scan production server only */ scanProd: () => Promise; /** Scan test server only */ scanTest: () => Promise; /** Refresh from cache */ refresh: () => Promise; /** Set plugin disabled state (returns true if JAR file was renamed) */ setDisabled: (pluginName: string, server: 'prod' | 'test' | 'both', disabled: boolean) => Promise; /** Set plugin skip migrate flag */ setSkipMigrate: (pluginName: string, skip: boolean) => Promise; /** Set plugin pinned flag */ setPinned: (pluginName: string, pinned: boolean) => Promise; /** Set plugin favorite flag */ setFavorite: (pluginName: string, favorite: boolean) => Promise; /** Toggle plugin favorite flag, returns new state */ toggleFavorite: (pluginName: string) => Promise; /** Set plugin note */ setNote: (pluginName: string, note: string) => Promise; /** Loading state */ loading: boolean; /** Error message if any */ error: string | null; /** Last scan timestamp */ lastScanned: Date | null; /** Whether cache is valid */ cacheValid: boolean; /** Whether hook has initialized */ initialized: boolean; } /** * Hook for managing plugins */ export declare function usePlugins({ prodPath, testPath, autoLoad, autoScanIfStale }?: UsePluginsOptions): PluginsState; //# sourceMappingURL=usePlugins.d.ts.map