/** * Plugin Registry CRUD * * Manages the plugin registry file using atomic writes for crash safety. * The registry tracks all installed plugins, their versions, and metadata. */ import { PluginRegistry, PluginRegistryEntry, PluginScope } from "./types"; /** * Reads the plugin registry from disk. * Returns an empty registry if the file does not exist. * * @param scope - Whether to read the global or project registry * @param projectDir - Required when scope is 'project' */ export declare function readPluginRegistry(scope: PluginScope, projectDir?: string): Promise; /** * Writes the plugin registry to disk using an atomic write. * * @param registry - The full registry object to persist * @param scope - Whether to write the global or project registry * @param projectDir - Required when scope is 'project' */ export declare function writePluginRegistry(registry: PluginRegistry, scope: PluginScope, projectDir?: string): Promise; /** * Looks up a plugin entry by name in the registry. * Returns undefined if the plugin is not registered. * * @param registry - The registry to search * @param pluginName - The plugin identifier to look up */ export declare function getPluginEntry(registry: PluginRegistry, pluginName: string): PluginRegistryEntry | undefined; /** * Returns a new registry with the given entry inserted or updated. * Sets the registry's updatedAt timestamp. Does not mutate the input. * * @param registry - The current registry * @param entry - The plugin entry to insert or update */ export declare function upsertPluginEntry(registry: PluginRegistry, entry: PluginRegistryEntry): PluginRegistry; /** * Returns a new registry with the named plugin removed. * Does not mutate the input. Throws if the plugin is not found. * * @param registry - The current registry * @param pluginName - The plugin identifier to remove */ export declare function removePluginEntry(registry: PluginRegistry, pluginName: string): PluginRegistry; /** * Returns all plugin entries as a sorted array (sorted by name). * * @param registry - The registry to list */ export declare function listPluginEntries(registry: PluginRegistry): PluginRegistryEntry[]; //# sourceMappingURL=registry.d.ts.map