/**
 * `opensquid update` — UPD.2 of T-npm-auto-update (wg-7091e922881b).
 *
 * Detects HOW this copy of opensquid is installed and either runs the right
 * package manager or refuses with the correct manual action:
 *
 *   linked-dev   → refuse, exit 1 (an update would clobber a dev tree)
 *   npx          → nothing to update, exit 0 (`npx -y opensquid@latest` floats)
 *   local-dep    → refuse, exit 1 (update the project's dependency instead)
 *   npm-global   → `npm install -g opensquid@latest` (inherited stdio)
 *   pnpm-global  → `pnpm add -g opensquid@latest` (inherited stdio)
 *
 * `--check-only` is the UPD.1 detached refresher's entrypoint: probe the
 * registry, print current vs latest, write the cache through `refreshCache`
 * (READ-MERGE-WRITE — the notice's 24h-throttle stamp must survive).
 *
 * Auto-apply deliberately does NOT exist: updating is always a foreground
 * user-invoked command, so live-session hook-binary skew cannot happen (the
 * opt-in auto-apply + SessionStart-latch design is seeded in the work-graph
 * issue for a future track).
 *
 * Imported by: src/cli.ts.
 */
import type { Command } from 'commander';
export type InstallMode = {
    kind: 'linked-dev';
    packageRoot: string;
} | {
    kind: 'npx';
    packageRoot: string;
} | {
    kind: 'pnpm-global';
    packageRoot: string;
} | {
    kind: 'npm-global';
    packageRoot: string;
} | {
    kind: 'local-dep';
    packageRoot: string;
};
export interface InstallFacts {
    /** realpath of the running package root. */
    packageRoot: string;
    /** realpath of <npm root -g>/opensquid IF it is a symlink (the npm-link
     *  target repo); null when absent or a real dir. The fact must be about
     *  THIS copy, not the machine: a prefix-installed copy on a dev machine
     *  is NOT linked-dev just because the machine has a linked entry —
     *  linked-dev iff the running copy IS the symlink's target (spiked: the
     *  temp-prefix run misclassified before this comparison existed). */
    linkedRepoRoot: string | null;
    /** realpath of `npm root -g`; null if npm absent. */
    npmGlobalRoot: string | null;
}
/** Pure classifier — all fs facts injected so tests need no real installs.
 *  Precedence is LOAD-BEARING: linked-dev FIRST (an update would clobber a
 *  dev tree — the dev machine is the live fixture), then the ephemeral /
 *  manager signatures, then the global fallthroughs. Paths are normalized
 *  to forward slashes before matching (Windows). */
export declare function classifyInstall(facts: InstallFacts): InstallMode;
/** Gather the real-world facts for the classifier (the impure shell). */
export declare function gatherInstallFacts(): InstallFacts;
export declare function registerUpdate(program: Command): void;
//# sourceMappingURL=update.d.ts.map