/**
 * --claude-home — per-world Claude Code instance isolation.
 *
 * Today, every world inherits the operator's single `~/.claude/` (host login,
 * settings, hooks, MCP topology, 429 bucket). When the operator wants to run
 * one world against their personal Anthropic account and another against
 * their work account on the same host, they have no clean seam — both worlds
 * share `~/.claude/.credentials.json` and the same 429 cooldown.
 *
 * Inspired by t3code (pingdotgg/t3code) — one server process hosts N Claude
 * Code instances, each with its own `HOME` env var pointing at a separate
 * `~/.claude.instance-N` directory. Zero containers, zero processes-per-
 * account, just `env: { HOME: '...' }` on the spawn.
 *
 * This module exports two pure helpers used by `olam create --claude-home`:
 *
 *   - {@link resolveClaudeHome} — pick the directory to use as HOME for the
 *     world's Claude Code config snapshot. Precedence:
 *       1. Explicit `--claude-home <id-or-path>` flag.
 *       2. Stored claudeHome from a prior `olam create` (re-runs of
 *          `olam enter <worldId>` honour the original choice).
 *       3. Operator's default `$HOME` (legacy behaviour — no behavioural
 *          change for worlds created without the flag).
 *
 *   - {@link ensureClaudeHomeDir} — `mkdir -p` the target dir and write a
 *     `.olam-claude-home` sentinel so first-use detection works.
 *
 * Composes with @olam/auth-client's vault: the vault still rotates
 * credentials WITHIN a HOME; `--claude-home` isolates DIFFERENT HOMEs from
 * each other.
 *
 * See `docs/decisions/045-claude-home-override.md` for the full rationale
 * + operator workflow.
 */
/** Relative path under `$HOME` where bare-id homes are materialised. */
export declare const CLAUDE_HOMES_BASE: string;
/** First-use sentinel filename — written into a freshly-created home. */
export declare const SENTINEL_FILENAME = ".olam-claude-home";
/**
 * Allowed shape of a bare `--claude-home <id>` argument.
 *
 * Same shape rule as world ids and skill prefixes: a leading lowercase-or-
 * digit char, then 0–63 more of `[a-z0-9_-]`. Rejects `..`, spaces,
 * absolute-path injections, uppercase. Absolute paths are handled
 * separately (see {@link resolveClaudeHome}) — they don't go through this
 * regex.
 */
export declare const HOME_ID_RE: RegExp;
export interface ResolveClaudeHomeArgs {
    /** `--claude-home <id-or-path>` flag value from CLI parse. Optional. */
    readonly flag?: string;
    /**
     * Prior `claudeHome` stored on the world's metadata. When set and the
     * caller didn't pass `flag`, this wins over the operator's `$HOME`.
     */
    readonly existingWorldConfig?: {
        readonly claudeHome?: string;
    };
    /** Test hook — defaults to `os.homedir()`. */
    readonly homeDir?: string;
    /** Test hook — defaults to `process.env.HOME ?? os.homedir()`. */
    readonly envHome?: string;
}
/**
 * Resolve the absolute filesystem path to use as the world's Claude Code
 * HOME. Pure function — no IO, no env reads beyond the injected hooks.
 *
 * @throws Error if `flag` (or `existingWorldConfig.claudeHome`) is a
 *   relative path that doesn't match {@link HOME_ID_RE}.
 */
export declare function resolveClaudeHome(args: ResolveClaudeHomeArgs): string;
/**
 * Ensure the resolved Claude home directory exists and carries the
 * `.olam-claude-home` sentinel. Idempotent — re-running on an existing
 * home leaves the sentinel byte-identical (so `olam enter` re-runs don't
 * mutate the home's mtime gratuitously).
 *
 * Does NOT seed credentials, settings, or MCP config — that's the
 * operator's job (one-time `HOME=<resolved-path> claude login`).
 */
export declare function ensureClaudeHomeDir(targetPath: string): Promise<void>;
//# sourceMappingURL=home-override.d.ts.map