/**
 * Installation Health Checker - detects legacy commands dirs, stale cache,
 * lockfile integrity issues, and plugin cache hook freshness in ~/.claude/
 *
 * @since 1.0.279
 * @updated 1.0.356 - Migrated from commands-based to native plugin cache checks
 */
import type { HealthChecker, CategoryResult, DoctorOptions } from '../types.js';
interface InstallationHealthOptions {
    commandsDir?: string;
    cacheDir?: string;
}
export declare class InstallationHealthChecker implements HealthChecker {
    category: string;
    private commandsDir;
    private cacheDir;
    constructor(opts?: InstallationHealthOptions);
    check(projectRoot: string, options: DoctorOptions): Promise<CategoryResult>;
    /**
     * Detect legacy ~/.claude/commands/<name>/ directories.
     *
     * Since 1.0.356, plugins are installed via Claude Code's native plugin system
     * to ~/.claude/plugins/cache/. Any remaining dirs in ~/.claude/commands/ are
     * legacy artifacts that should be removed to avoid duplicate slash commands.
     */
    private checkLegacyCommandsDirs;
    /**
     * Detect stale/orphaned cache directories.
     * - temp_local_* dirs are always orphaned (interrupted installs)
     * - Other dirs are reported but not auto-deleted
     */
    private checkStaleCacheDirs;
    /**
     * Verify installed plugin hashes match vskill.lock entries.
     * Checks the native plugin cache (~/.claude/plugins/cache/specweave/<name>/).
     */
    private checkLockfileIntegrity;
    /**
     * Detect stale hooks in ~/.claude/plugins/cache/specweave/.
     *
     * Claude Code's plugin system copies hooks to its own cache directory when
     * `claude plugin install` runs. If the source (npm package) is updated but
     * the cache isn't refreshed, hooks run stale code. This check compares the
     * UserPromptSubmit hook in the cache against the source and fixes mismatches.
     *
     * @since 1.0.306
     */
    private checkPluginCacheHookFreshness;
    /**
     * Locate the authoritative source of user-prompt-submit.sh.
     *
     * Resolution order:
     * 1. Walk up from __dirname to find package.json with name "specweave"
     * 2. Global npm install via `npm root -g`
     * 3. ~/.claude/plugins/marketplaces/specweave/
     */
    private findSourceHookPath;
    /**
     * Detect (and optionally remove) stale lockfiles:
     *   - Legacy `skills-lock.json` files (dead format)
     *   - Orphaned child-repo `vskill.lock` files in umbrella projects
     *
     * @since 1.0.541
     */
    private checkStaleLockfiles;
    /**
     * Check if specweave can be updated successfully.
     * Detects stale npm cache and CDN propagation issues.
     * When fix=true: clears npm cache.
     *
     * @since 1.0.395
     */
    /**
     * Run an npm command against the public registry with a clean environment.
     * Always bypasses user auth config to prevent E401 from stale tokens.
     */
    private npmPublicExec;
    private checkUpdateHealth;
    /** List immediate subdirectories of a path. */
    private listDirs;
}
export {};
//# sourceMappingURL=installation-health-checker.d.ts.map