import type { AgentId } from '../types.js';
import type { Installation } from './types.js';
/**
 * Addressing a frozen installation.
 *
 * A selector matches either the installation's stable {@link Installation.label}
 * or the vendor release it currently carries — the label because that is what
 * every persisted reference and every `agents add` invocation uses, the release
 * because after an update the two differ and a user reading `agents view` may
 * name either. Matching both is also precisely what makes duplicate same-release
 * installations addressable at all: two installs can share a release, so the
 * release alone is not an identifier and the ambiguity has to be reported rather
 * than silently resolved to whichever sorted first.
 */
export declare class InstallationNotFoundError extends Error {
    readonly agent: AgentId;
    readonly selector: string | undefined;
    readonly available: readonly Installation[];
    constructor(agent: AgentId, selector: string | undefined, available: readonly Installation[]);
}
export declare class InstallationAmbiguousError extends Error {
    readonly agent: AgentId;
    readonly selector: string | undefined;
    readonly candidates: readonly Installation[];
    constructor(agent: AgentId, selector: string | undefined, candidates: readonly Installation[]);
}
/** `2.0.65` when frozen at its original release, `2.0.65 (release 2.0.71)` after an update. */
export declare function describeInstallation(installation: Installation): string;
export interface ResolveInstallationOptions {
    /**
     * An `agents accounts` label. Narrows to the installation currently signed
     * into that account before the selector is applied.
     */
    account?: string;
}
/**
 * Resolve `<agent>[@<selector>]` to exactly one installation.
 *
 * With no selector: the agent's default installation when one is pinned, else
 * the sole installation. Never a "newest wins" guess — picking for the user
 * across several installs is how an update lands on the wrong one.
 */
export declare function resolveInstallation(agent: AgentId, selector: string | undefined, options?: ResolveInstallationOptions): Promise<Installation>;
