/**
 * Phase B (olam-fresh-install-self-bootstrap) — B6.
 *
 * `installRoot()` + `isDevMode()` — the seam between an installed
 * @pleri/olam-cli and a monorepo clone. Three CLI commands need to
 * shell out to `packages/adapters/src/docker/build-*.sh` (legacy
 * source-build paths from before Phase B's image registry):
 *
 *   - olam auth upgrade --from-source
 *   - olam upgrade --from-source
 *   - olam create --rebuild-base
 *
 * From an installed CLI, those scripts don't exist (the published
 * tarball ships dist/ + plugin/ + host-cp/ — not the build scripts).
 * From a monorepo clone, they do.
 *
 * Decision #1 (Phase B) carries-forward Decision #1 (Phase C revision):
 * dev mode is a 2-condition opt-in:
 *   1. OLAM_DEV=1 in the environment
 *   2. A `packages/` sibling exists at the installRoot
 *
 * Both must be true. The OLAM_DEV flag prevents a stray `packages/`
 * directory adjacent to a global npm install from accidentally
 * activating source-build paths (still imperfect — see S10's deferred
 * 4-condition opt-in for full path-traversal hardening — but adequate
 * for the local-dev / dogfood audience the epic targets).
 *
 * S10 simplified the 4-condition opt-in (uid match + sentinel file)
 * to 2-condition per the user's "perf + leak/logic over security
 * hardening" reframe in pass 3.
 */
/**
 * Returns the absolute path to the package's install root.
 *
 *   - Locally (from src/): /<repo>/packages/cli
 *   - Globally installed: /<global-prefix>/lib/node_modules/@pleri/olam-cli
 *   - From dist/index.js: /<global-prefix>/lib/node_modules/@pleri/olam-cli
 *
 * Implementation: this file lives at <pkg>/src/install-root.ts (dev)
 * or <pkg>/dist/install-root.js (when bundled). Walking up one directory
 * from this file's location lands at <pkg> in both cases — the
 * `import.meta.url`-resolved dirname. The fileURLToPath conversion
 * handles `file:` URLs cleanly across platforms (Windows-forward-slash
 * tolerance comes for free from path.dirname).
 */
export declare function installRoot(metaUrl?: string): string;
/**
 * 2-condition dev-mode detection.
 *
 * @param env - Process env. Defaults to `process.env`. Injectable for tests.
 * @param installRootDir - Where to look for the `packages/` sibling. Defaults
 *   to `installRoot()`. Injectable for tests.
 */
export declare function isDevMode(env?: NodeJS.ProcessEnv, installRootDir?: string): boolean;
/**
 * Resolve the path to a build script under packages/adapters/src/docker/.
 * In dev mode → returns the absolute path to the source script.
 * In install mode → throws `MissingBuildScriptError` with a named remedy.
 *
 * The exception, not exit-code path, lets call sites decide whether to
 * recover gracefully (e.g. fall back to a pull-by-digest path) or just
 * surface to stderr + exit. Phase C's C6 will use the recover-gracefully
 * path; today's three call sites just exit.
 */
export declare class MissingBuildScriptError extends Error {
    constructor(scriptRelPath: string);
}
export interface ResolveBuildScriptInput {
    readonly scriptRelPath: string;
    readonly env?: NodeJS.ProcessEnv;
    readonly installRootDir?: string;
}
export declare function resolveBuildScript(input: ResolveBuildScriptInput): string;
//# sourceMappingURL=install-root.d.ts.map