/**
 * Path resolution helpers for opensquid's filesystem layout.
 *
 * Layout (per `docs/opensquid-real-design.md` §"Phase 1 — Runtime skeleton"
 * + §"Phases 2–7 summary" Phase 5):
 *
 *   ~/.opensquid/
 *     sessions/<session-id>/
 *       state/
 *         <key>.json      — `write_state` / `read_state` primitives
 *         <name>.jsonl    — `append_log` primitive
 *     packs/<pack-id>/
 *       state/
 *         <key>.json      — per-pack state (Task 5.3)
 *         <name>.jsonl    — per-pack logs (e.g. drift-catalog.jsonl)
 *
 * `OPENSQUID_HOME` env-var override is intentional: tests point it at
 * `os.tmpdir()` for filesystem isolation, and self-hosting deployments
 * may relocate state to a non-`$HOME` data directory.
 *
 * Always `path.join` — never raw string concat — so Windows backslashes
 * stay sane.
 *
 * Imported by: src/functions/state.ts, src/runtime/drift_catalog.ts.
 */
export declare const OPENSQUID_HOME: () => string;
/**
 * Returns the user-scope opensquid root (`~/.opensquid/` by default; honors
 * `OPENSQUID_HOME` env override). Always returns a path; the directory may
 * not exist yet (`discoverActivePacks` treats absent active.json as empty).
 */
export declare const resolveUserScopeRoot: () => string;
/**
 * BPDISC — Returns the built-in pack scope root: the directory whose
 * `<root>/<name>/manifest.yaml` paths hold the packs that ship inside the
 * opensquid npm install (`packs/builtin/`). When a user's `active.json`
 * names a pack not found under user or project scope, the loader falls back
 * to this root. Mirrors the OPENSQUID_HOME pattern: `OPENSQUID_BUILTIN_PACKS_ROOT`
 * env var wins for test isolation; otherwise the path is computed relative
 * to the dist file location at module import time.
 *
 * From a dist file at `<npm-root>/dist/runtime/paths.js`, the built-in
 * packs sit at `<npm-root>/packs/builtin/` — three dirs up + `packs/builtin`.
 * Works for both the local checkout layout (`src/runtime/paths.ts` → up to
 * `opensquid/packs/builtin/`) and the npm-install layout (`node_modules/opensquid/dist/...`).
 */
export declare const resolveBuiltinScopeRoot: () => string;
/**
 * Walks up from `cwd` looking for a `.opensquid/` directory. Returns its
 * absolute path on first hit, or `null` if the walk reaches the filesystem
 * root without finding one (no project scope in effect).
 *
 * The 64-level cap protects against pathological symlink cycles. Real
 * project trees bottom out well before 64 levels.
 *
 * Important: this probes for the `.opensquid/` DIRECTORY's existence, NOT
 * the `.opensquid/project.json` FILE. The two walks have different purposes
 * (this one answers "is there pack config here?"; `walkForProjectUuid`
 * below answers "is there a UUID-bound project here?"). Both share the
 * 64-level cap discipline.
 */
export declare const resolveProjectScopeRoot: (cwd: string) => Promise<string | null>;
/** The `.opensquid/project.json` schema. `version` is the on-disk discriminator. */
export interface ProjectCard {
    version: 1;
    id: string;
    uuid: string;
}
/**
 * Env-only project-UUID lookup. Returns the value of `OPENSQUID_PROJECT_UUID`
 * if set + non-empty, else `null`. Synchronous — no I/O.
 *
 * Defaults to `process.env` when called without an argument; the optional
 * `env` parameter exists for test injection.
 */
export declare function resolveProjectUuidFromEnv(env?: NodeJS.ProcessEnv): string | null;
/**
 * Walks up from `startDir` looking for `.opensquid/project.json`. Returns
 * the parsed `uuid` on first hit (strict schema check: `version === 1 &&
 * uuid && id`), or `null` when the walk exhausts the 64-level cap or
 * reaches the filesystem root without a valid card.
 *
 * Malformed JSON, missing fields, and version mismatches all silently
 * continue the walk — a bad ancestor card must not mask a good descendant
 * one, and the same file might be valid under a different `version`-future
 * revision that this consumer doesn't recognize.
 */
export declare function walkForProjectUuid(startDir: string): Promise<string | null>;
/**
 * Canonical combinator: env-first then cwd-walk. The pattern 5 call sites
 * reimplemented before T-PUC consolidated them.
 *
 * Returns the first non-null source, else `null`. `env` defaults to
 * `process.env` when omitted; `cwd` is required (callers always know which
 * directory to walk from — there is no sensible default).
 */
export declare function resolveProjectUuid(opts: {
    cwd: string;
    env?: NodeJS.ProcessEnv;
}): Promise<string | null>;
export declare const sessionStateDir: (sessionId: string) => string;
export declare const sessionStateFile: (sessionId: string, key: string) => string;
export declare const sessionLogFile: (sessionId: string, name: string) => string;
/**
 * The active-task signal file (AP.2). Lives at the session ROOT, deliberately
 * NOT under `state/`: `state/` holds pack-authored `read_state`/`write_state`
 * keys, and the active-task signal is runtime-owned — keeping it at the root
 * prevents a pack's `write_state` from clobbering the gate's trigger. Absent
 * file = no active task (the "tasks-loaded" signal is off).
 */
export declare const activeTaskFile: (sessionId: string) => string;
/** Archive destination for the active-task file on SessionEnd (rule #16 — archive, never silently drop). */
export declare const activeTaskArchiveFile: (sessionId: string, stamp: string) => string;
export declare const packStateDir: (packId: string) => string;
export declare const packStateFile: (packId: string, key: string) => string;
export declare const packLogFile: (packId: string, name: string) => string;
export declare const daemonLockPath: () => string;
export declare const daemonPidPath: () => string;
export declare const daemonLogPath: () => string;
export declare const chatDaemonSockPath: () => string;
export declare const chatDaemonPidPath: () => string;
export declare const chatDaemonLogPath: () => string;
export declare const inboxFile: (projectUuid: string, platform: string) => string;
export declare const inboxDir: (projectUuid: string) => string;
export declare const inboxAckedPath: (projectUuid: string) => string;
export declare const liveSessionLease: (projectUuid: string) => string;
export declare const projectCurrentSessionPath: (projectUuid: string) => string;
export declare const umbrellaInboxFile: (umbrellaId: string, platform: string) => string;
export declare const umbrellaInboxDir: (umbrellaId: string) => string;
export declare const umbrellaInboxAckedPath: (umbrellaId: string) => string;
export declare const umbrellaLiveSessionLease: (umbrellaId: string) => string;
export declare const umbrellaCurrentSessionPath: (umbrellaId: string) => string;
export declare const umbrellaChatDrivenMarker: (umbrellaId: string) => string;
export declare const inboundMediaDir: () => string;
export declare const orphanInboxFile: (platform: string) => string;
//# sourceMappingURL=paths.d.ts.map