/**
 * Spectral configuration: persisted Aexol MCP credentials.
 *
 * Stored at ~/.spectral/config.json with mode 0600 (user read/write only).
 * The directory is created with mode 0700.
 *
 * Keep this module zero-side-effect so it can be imported from both the
 * CLI entry (pre-flight check) and the spectral extension.
 *
 * `getConfigDir()` honors `SPECTRAL_CONFIG_DIR` so tests can redirect to a
 * temporary directory without touching the real `~/.spectral`.
 */
export declare const DEFAULT_API_URL = "https://api.aexol.ai/mcp";
export declare const TEAM_API_KEY_PREFIX = "sk-aexol-team-";
export interface SpectralConfig {
    apiUrl: string;
    teamApiKey: string;
    /** User JWT from OAuth login. When present, used for machine registration (owns the machine). */
    userJwt?: string;
}
/**
 * Resolve the directory used to store Spectral configuration.
 *
 * Honors `SPECTRAL_CONFIG_DIR` first (used by tests and CI), then falls back
 * to `<HOMEDIR>/.spectral`. Computed lazily on every call so test-time env
 * mutation works without re-importing the module.
 */
export declare function getConfigDir(): string;
/** Path to the config JSON file. Computed lazily — see `getConfigDir`. */
export declare function getConfigFile(): string;
/**
 * Backwards-compatible aliases for code that imported the old top-level
 * constants. They eagerly resolve at import time, so they reflect the env
 * state at startup. New code should call `getConfigDir()` / `getConfigFile()`
 * directly so test-time env overrides take effect.
 */
export declare const CONFIG_DIR: string;
export declare const CONFIG_FILE: string;
/** Resolve the effective API URL: env wins, then stored value, then default. */
export declare function getApiUrl(stored?: string): string;
/** Validate the team API key prefix. The full token check happens server-side. */
export declare function validateTeamApiKey(key: unknown): key is string;
/** Read config; returns null if missing or malformed. Never throws. */
export declare function readConfig(): Promise<SpectralConfig | null>;
/** Persist config with restrictive permissions (dir 0700, file 0600). */
export declare function writeConfig(cfg: SpectralConfig): Promise<void>;
/** Delete config; returns true if a file was removed, false if there was nothing to remove. */
export declare function deleteConfig(): Promise<boolean>;
//# sourceMappingURL=config.d.ts.map