import { type ActiveTenantOptions } from "./active-tenant.js";
import { type TenantSummary } from "../api/client.js";
export interface ResolveTenantOptions {
    /** Highest priority — usually the CLI `--tenant` flag. */
    flag?: string | null;
    /** Override env reader (tests). Defaults to `process.env.VSKILL_TENANT`. */
    envValue?: string | null;
    /** Override config-dir resolution (tests). */
    activeTenantOptions?: ActiveTenantOptions;
    /** Override tenants fetcher (tests / offline mode). */
    listTenants?: () => Promise<TenantSummary[]>;
    /**
     * When true, the resolver may make a network call to /account/tenants for
     * the N=1 auto-pick fallback. Defaults to true. Setting false skips
     * step (4) — useful for offline-first commands where the caller would
     * rather error than block on the network.
     */
    enableAutoPick?: boolean;
}
export type ResolvedTenant = {
    kind: "flag" | "env" | "config" | "auto-pick";
    slug: string;
} | {
    kind: "none";
    /** Why no tenant was resolved (for caller-side messaging). */
    reason: "anonymous" | "no-tenants" | "multiple-tenants-no-default" | "fetch-failed";
    /** Available tenants when reason === "multiple-tenants-no-default". */
    tenants?: TenantSummary[];
    /** Network error string when reason === "fetch-failed". */
    error?: string;
};
export declare function resolveTenant(opts?: ResolveTenantOptions): Promise<ResolvedTenant>;
/**
 * Helper for callers that just want the slug (or null) without inspecting
 * the resolution kind. The caller is responsible for handling the null
 * case (typically by surfacing a clear error message).
 */
export declare function resolveTenantSlug(opts?: ResolveTenantOptions): Promise<string | null>;
