import type { FasedAgentConfig } from "../config/config.js";
import type { PluginInstallRecord } from "../config/types.plugins.js";
export type UninstallActions = {
    entry: boolean;
    install: boolean;
    allowlist: boolean;
    loadPath: boolean;
    memorySlot: boolean;
    directory: boolean;
};
export type UninstallPluginResult = {
    ok: true;
    config: FasedAgentConfig;
    pluginId: string;
    actions: UninstallActions;
    warnings: string[];
} | {
    ok: false;
    error: string;
};
export declare function resolveUninstallDirectoryTarget(params: {
    pluginId: string;
    hasInstall: boolean;
    installRecord?: PluginInstallRecord;
    extensionsDir?: string;
}): string | null;
/**
 * Remove plugin references from config (pure config mutation).
 * Returns a new config with the plugin removed from entries, installs, allow, load.paths, and slots.
 */
export declare function removePluginFromConfig(cfg: FasedAgentConfig, pluginId: string): {
    config: FasedAgentConfig;
    actions: Omit<UninstallActions, "directory">;
};
export type UninstallPluginParams = {
    config: FasedAgentConfig;
    pluginId: string;
    deleteFiles?: boolean;
    extensionsDir?: string;
};
/**
 * Uninstall a plugin by removing it from config and optionally deleting installed files.
 * Linked plugins (source === "path") never have their source directory deleted.
 */
export declare function uninstallPlugin(params: UninstallPluginParams): Promise<UninstallPluginResult>;
