import { type GrawkusConfig } from './types.js';
export declare const CONFIG_DIR_NAME = ".grawkus";
/**
 * Resolve the per-project state dir (codemap cache, project memory,
 * package-manager pref). Prefers `<cwd>/.grawkus`; falls back to
 * the legacy `<cwd>/.grawkus` only if it exists and the new one
 * doesn't. Project dirs are NOT auto-renamed — they often live inside
 * repos and migrating them silently could surprise teammates / CI.
 */
export declare function getProjectStateDir(cwd: string): string;
export declare function getConfigDir(): string;
/**
 * Same as getConfigDir() but exported under a clearer name for
 * other modules that want the home-dir state root. Used by
 * sessions, debug log, gateguard state, etc.
 */
export declare function getHomeStateDir(): string;
export declare function loadConfig(): GrawkusConfig;
/**
 * Build a runtime config from environment variables for headless harnesses.
 * This intentionally does not write config.json; it lets benchmark containers
 * run grawkus with `--prompt` from API-key env vars only.
 */
export declare function loadConfigFromEnv(): GrawkusConfig | null;
/**
 * Apply per-invocation overrides from CLI/env without mutating config.json.
 * These are intentionally separate from loadConfigFromEnv(): env bootstrap
 * builds a full config for fresh headless containers, while runtime overrides
 * tweak an already-loaded config for harness adapters (`--model`, `--max-turns`,
 * `--base-url`, etc.).
 */
export declare function applyRuntimeConfigOverrides(config: GrawkusConfig): GrawkusConfig;
export declare function saveConfig(config: GrawkusConfig): void;
export declare function configExists(): boolean;
