/** * 0826: Add a Claude Code plugin marketplace via the claude CLI. * * Delegates to: claude plugin marketplace add --scope -- * * Required when installing plugins from a marketplace that hasn't been * registered yet — `claude plugin install foo@bar` fails with "Plugin foo * not found in marketplace bar" until the marketplace itself is added. * * Safe to call against an already-registered marketplace: claude prints a * "marketplace already exists" message and exits 0. * * @throws if the claude binary is not found or the add fails (network, * invalid source, etc.). Callers should `try/catch` and surface a * user-friendly error. */ export declare function claudePluginMarketplaceAdd(source: string, scope?: "user" | "project"): void; /** * 0826: List Claude Code marketplace names registered with the CLI. * * Cheap probe used by the install flow to decide whether to call * `claudePluginMarketplaceAdd` before `claudePluginInstall`. Returns an * empty list (instead of throwing) when claude isn't installed or the * subcommand fails — callers fall through to "treat as not registered". */ export declare function claudePluginMarketplaceList(): string[]; /** * Install a marketplace plugin via the claude CLI. * * Delegates to: claude plugin install --scope -- * * This is the only sanctioned way to add entries to settings.json's * enabledPlugins field and populate the plugin cache. * * @throws if the claude binary is not found or the install fails */ export declare function claudePluginInstall(pluginId: string, scope?: "user" | "project" | "local", opts?: { cwd?: string; }): void; /** * Uninstall a marketplace plugin via the claude CLI. * * Delegates to: claude plugin uninstall --scope -- * * This is the only sanctioned way to remove entries from settings.json's * enabledPlugins field and the associated plugin cache. * * **Note**: `scope: "project"` operates on the project in `process.cwd()`. * Callers must ensure they are in the correct working directory, or pass * a `cwd` option to override. * * @throws if the claude binary is not found — callers should wrap in try/catch * when the plugin may not have been installed via the claude CLI */ export declare function claudePluginUninstall(pluginId: string, scope?: "user" | "project" | "local", opts?: { cwd?: string; }): void; /** * Detect and uninstall stale plugins from both user and project scopes. * * Combines `purgeStalePlugins()` (read-only detection) with * `claudePluginUninstall()` (CLI-delegated removal) in a single call. * * @returns Array of `{ id, scope, ok }` for each stale plugin processed */ export declare function uninstallStalePlugins(lockfileSkills: Record, opts?: { log?: (msg: string) => void; }): Array<{ id: string; scope: "user" | "project"; ok: boolean; }>;