/**
 * Shared pre-flight check: every authenticated `spectral` subcommand (and the
 * fall-through to spectral) must verify that credentials exist in
 * `~/.spectral/config.json` before proceeding.
 *
 * Extracted from `cli.ts` so `serve` (and any future subcommand) reuses the
 * exact same UX — message wording, exit code, stderr formatting.
 *
 * `requireLogin()` writes to stderr and calls `process.exit(1)` on failure;
 * `checkLogin()` is the testable variant that just reports the result so we
 * can assert on it without killing the test runner.
 */
import { type SpectralConfig } from "./config.js";
export interface LoginCheckResult {
    ok: boolean;
    config: SpectralConfig | null;
    /** Path that was inspected. Surfaced so callers can include it in messages. */
    configFile: string;
}
/** Inspect login state without side effects. Safe to call from tests. */
export declare function checkLogin(): Promise<LoginCheckResult>;
/**
 * Enforce login: returns the config on success, prints a friendly error and
 * exits 1 on failure. Matches the wording used by the main spawn path.
 */
export declare function requireLogin(): Promise<SpectralConfig>;
//# sourceMappingURL=preflight.d.ts.map