/**
 * Package Manager Detector Utilities
 *
 * Detect the package manager and install root that own the CURRENT CCS binary.
 * This is intentionally different from "which package manager has CCS installed
 * somewhere on the machine" because self-update must target the current install.
 */
/// <reference types="node" />
/// <reference types="bun-types" />
export type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun';
export interface CurrentInstall {
    manager: PackageManager;
    scriptPath: string;
    resolvedScriptPath: string;
    packageRoot: string | null;
    prefix: string | null;
    detectionSource: 'path' | 'package-root' | 'default';
}
export interface InstalledPackageState {
    version: string | null;
    packageJsonMtimeMs: number | null;
    scriptMtimeMs: number | null;
}
/**
 * Detect the current install owner from the path of the running script.
 * Defaults to npm when the path is ambiguous because npm's global layout is
 * the safest fallback for the existing manual remediation commands.
 */
export declare function detectCurrentInstall(scriptPath?: string): CurrentInstall;
/**
 * Backward-compatible helper for callers that only need the package manager.
 */
export declare function detectPackageManager(scriptPath?: string): PackageManager;
export declare function buildPackageManagerEnv(install: CurrentInstall, baseEnv?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
export declare function readInstalledPackageVersion(install: CurrentInstall): string | null;
export declare function readInstalledPackageState(install: CurrentInstall): InstalledPackageState;
export declare function formatManualUpdateCommand(targetTag: string, install?: CurrentInstall, platform?: NodeJS.Platform): string;
//# sourceMappingURL=package-manager-detector.d.ts.map