/** `disabled` is applied by the caller that knows the operator's lists, not here. */ export type PluginStatus = "loaded" | "disabled" | "error"; /** One inventory row. A directory that fails validation still gets one, because a * plugin that vanishes from the settings list when it breaks is one nobody can fix. */ export interface PluginRecord { id: string; name: string; version: string; kind: "client" | "client+server"; status: PluginStatus; error?: string; } /** An inventory row plus the paths the gateway serves that plugin from. */ export interface DiscoveredPlugin extends PluginRecord { /** Absolute plugin directory. */ dir: string; /** Absolute client entry, or null when the plugin failed to load. */ client: string | null; /** Absolute server entry, or null when it is absent or was rejected. */ server: string | null; } /** The wire shape, built field by field so a resolved local path cannot ride along. */ export declare function inventoryRow(plugin: DiscoveredPlugin): PluginRecord; /** * The whole inventory, read from disk. * * Concurrent callers share one scan: reads can outlast the watcher's debounce * window, and a rescan landing on top of a scan that is still running would * report an inventory assembled from two different moments. */ export declare function scanPlugins(): Promise; /** The one plugin an `/api/plugins//…` request names, or null when nothing is * installed under that id. */ export declare function loadPlugin(id: string): Promise; //# sourceMappingURL=discovery.d.ts.map