/**
 * config.ts — `~/.olam/config.json` helper for olam-cli.
 *
 * Phase 1b A1 of olam-host-suite-phase-1b-k3s-beta-flavour (plan
 * ~/.claude/plans/olam-host-suite-phase-1b-k3s-beta-flavour.md).
 *
 * Schema v1 (Decision 1 — config is the substrate-state seam):
 *   {
 *     "config.schema": 1,
 *     "host": { "substrate": "compose" | "kubernetes" },
 *     "install_id": "<uuid-v4>"
 *   }
 *
 * - `install_id` is generated once on first config write; persists thereafter;
 *   never rotated. Used by instrumentation events (D21) to enable
 *   distinct-operator counting at month-6 retro.
 * - Graceful fallback to `{config.schema: 1, host: {substrate: 'compose'}, install_id}`
 *   if file missing or invalid (T1 — never crash).
 * - `~/.olam/state/` directory ensured to exist (recursive mkdir) before any
 *   state-file writes elsewhere in olam-cli (Phase A1 closes feasibility F3-03
 *   from pass-3 review).
 */
export declare const OLAM_HOME: string;
export declare const OLAM_STATE_DIR: string;
export declare const OLAM_CONFIG_PATH: string;
export type Substrate = 'compose' | 'kubernetes';
export type OlamConfig = {
    'config.schema': 1;
    host: {
        substrate: Substrate;
    };
    install_id: string;
};
/**
 * Read `~/.olam/config.json` (or `configPath` override). Returns a valid
 * OlamConfig regardless of file state:
 *   - File missing → write default + return.
 *   - File present + valid → return parsed.
 *   - File present + malformed → emit WARN to stderr; write default + return.
 *
 * Always ensures `~/.olam/state/` exists as a side-effect.
 *
 * @param opts.configPath — override for tests (default: `~/.olam/config.json`)
 * @param opts.stateDir — override for tests (default: `~/.olam/state`)
 * @param opts.stderr — override for tests (default: `process.stderr`)
 */
export declare function readConfig(opts?: {
    configPath?: string;
    stateDir?: string;
    stderr?: NodeJS.WritableStream;
}): OlamConfig;
/**
 * Apply a partial update to the config and persist atomically.
 *
 * Preserves `install_id` (never rotated by writeConfig). Caller MUST NOT
 * pass `install_id` in updates; if they do, the existing value wins.
 *
 * @param updates — partial config (only `host` is settable via this surface)
 * @param opts — same as readConfig for test injection
 * @returns the new OlamConfig that was persisted
 */
export declare function writeConfig(updates: {
    host?: Partial<OlamConfig['host']>;
}, opts?: {
    configPath?: string;
    stateDir?: string;
    stderr?: NodeJS.WritableStream;
}): OlamConfig;
//# sourceMappingURL=config.d.ts.map