import type { DiscoveredPlugin, InstalledPluginInfo, MarketplaceInfo } from "../types.js"; export type PluginManagerTab = "installed" | "discover" | "marketplaces" | "issues"; export type PluginManagerView = "list" | "detail" | "confirm" | "batch"; export interface PluginManagerRow { readonly id: string; readonly name: string; readonly marketplace: string; readonly description?: string | undefined; readonly version?: string | undefined; readonly availableVersion?: string | undefined; readonly installed: boolean; readonly enabled?: boolean | undefined; readonly autoUpdate?: boolean | undefined; readonly issue?: string | undefined; } export type PluginManagerMarketplaceRow = Readonly<{ kind: "add"; label: string; }> | Readonly<{ kind: "check-now"; label: string; }> | Readonly<{ kind: "check-on-open"; label: string; enabled: boolean; }> | Readonly<{ kind: "marketplace"; marketplace: MarketplaceInfo; }>; export declare function pluginManagerMarketplaceRows(marketplaces: readonly MarketplaceInfo[], checkOnOpen: boolean): readonly PluginManagerMarketplaceRow[]; export interface PluginManagerInstalledDetail { readonly installPath: string; readonly dataPath: string; readonly skills: readonly string[]; readonly hooks: readonly string[]; readonly mcpServers: readonly string[]; } export declare function projectInstalledPluginDetail(plugin: InstalledPluginInfo, runtimePlugin: DiscoveredPlugin | undefined): PluginManagerInstalledDetail; export declare function pluginIdentity(plugin: string, marketplace: string): string; export declare function filterPluginRows(rows: readonly PluginManagerRow[], query: string): readonly PluginManagerRow[]; export declare function prunePluginSelection(selected: ReadonlySet, currentRows: readonly PluginManagerRow[]): { readonly selected: ReadonlySet; readonly vanished: readonly string[]; }; export declare function movePluginCursor(cursor: number, delta: -1 | 1, length: number): number; export declare function restorePluginCursor(rows: readonly PluginManagerRow[], cursor: number, previousId: string | undefined): number; export type PluginManagerKeyAction = "up" | "down" | "left" | "right" | "select" | "select-all" | "details" | "check" | "install" | "update" | "enable" | "disable" | "remove" | "back" | "close" | "search" | "search-input"; export interface PluginManagerKeyState { readonly view: PluginManagerView; readonly tab: PluginManagerTab; readonly selectedCount: number; readonly searchFocused?: boolean; } /** * Keep the key map independent from rendering and filesystem work. The custom * component can then route one semantic action to either local state or one * explicit host operation, while tests pin the user-facing keyboard contract. */ export declare function pluginManagerKeyAction(data: string, state: PluginManagerKeyState): PluginManagerKeyAction | undefined;