/**
 * Opensquid host-level config at `<data-root>/config.json`.
 *
 * Persists machine-state that's relevant across sessions but doesn't
 * belong in per-project files or in the engine's lesson store. v0.4
 * uses it to remember the engine binary path so moving the loop-engine
 * checkout doesn't silently break opensquid.
 *
 * Resolution order for the engine binary (v0.6c):
 *   1. `OPENSQUID_ENGINE_BIN` env var — explicit override, always wins
 *   2. `<data-root>/config.json` `engine_bin` field — persisted choice
 *   3. Bundled npm optional dep (`opensquid-engine-<platform>-<arch>`) —
 *      shipped with `opensquid` for published installs (v0.6c)
 *   4. Auto-search common dev paths (~/projects/{,*}/{loop/engine,engine}/target/release/loop-engine)
 *   5. `loop-engine` on $PATH (manually-installed binary)
 *   6. `null` — caller surfaces a helpful error
 *
 * The first successful resolution writes itself back to config.json so
 * the next session picks up the same path immediately. Bundled-binary
 * hits are NOT persisted to config because the path is deterministic
 * from the npm install layout — re-resolving is free and stale-safe
 * across opensquid upgrades.
 */
export interface OpensquidConfig {
    version: 1;
    /** Last-known path to the loop-engine binary. */
    engine_bin?: string;
    /** ISO timestamp the engine_bin was last resolved. */
    engine_bin_resolved_at?: string;
}
export declare function loadConfig(dataRoot?: string): Promise<OpensquidConfig>;
export declare function saveConfig(config: OpensquidConfig, dataRoot?: string): Promise<void>;
/**
 * Resolve the engine binary path using the priority chain above.
 * Writes the resolved path back to config when discovered via search
 * so the next session is instant.
 *
 * Returns `null` if no working binary could be located.
 */
export declare function resolveEngineBin(dataRoot?: string): Promise<string | null>;
/**
 * Set the engine binary path explicitly and persist. Validates that the
 * path points at an executable file before writing.
 */
export declare function setEngineBin(binPath: string, dataRoot?: string): Promise<{
    resolved: string;
}>;
/**
 * Forget the persisted engine binary path. Forces re-discovery on the
 * next `resolveEngineBin` call.
 */
export declare function forgetEngineBin(dataRoot?: string): Promise<void>;
//# sourceMappingURL=config.d.ts.map