/** Sub-directory of the session dir that owns every `peaks web` artifact. */ export declare const WEB_SUBDIR = "web"; /** Sub-directory of the session dir that owns the per-dispatch storage state. */ export declare const WEB_PROFILES_SUBDIR = "pw-profiles"; /** `/.peaks/_runtime//web/` — the root of every web artifact. */ export declare function webDir(projectRoot: string, sessionId: string): string; /** * `/.peaks/_runtime//pw-profiles/` — the per-dispatch storage-state * root. A SIBLING of `web/`, which is why the guard for `webContextStatePath` * must use this resolver and never `webDir` (getting that wrong threw * `WEB_PATH_ESCAPE` for every dispatch). */ export declare function webProfilesDir(projectRoot: string, sessionId: string): string; /** `/.peaks/_runtime//web/daemon/` — daemon info, lock, and log. */ export declare function webDaemonDir(projectRoot: string, sessionId: string): string; /** * `/.peaks/_runtime//web/shot-.png`. * `` is `YYYYMMDDTHHMMSSmmmZ` — no colons, so the name is Windows-safe * (tech-doc §7.1). */ export declare function webShotPath(projectRoot: string, sessionId: string, ts: string): string; /** `/.peaks/_runtime//web/daemon/daemon.json`. */ export declare function webDaemonInfoPath(projectRoot: string, sessionId: string): string; /** `/.peaks/_runtime//web/daemon/daemon.lock` — the cold-start lock. */ export declare function webSpawnLockPath(projectRoot: string, sessionId: string): string; /** * `/.peaks/web/install.lock` — the chromium install lock. * * MACHINE-GLOBAL, deliberately not per session (S3 repair, R4). The resource it * guards is Playwright's own browser cache (`%LOCALAPPDATA%\ms-playwright`, * `~/.cache/ms-playwright`), which every session, every project and every * daemon of this user shares. A lock under `/.peaks/_runtime//web/` * serialized nothing across sessions: N sessions could run N concurrent * installers into that one cache, and `install --force` in one session could * delete a browser another session's daemon has open. `~/.peaks` is the * existing per-user peaks location (`config.json`, `logs/`), so this adds no * new convention, and it stays outside the project root — AC1's "no root * pollution" is untouched. */ export declare function webInstallLockPath(): string; /** * `/.peaks/web-profiles/` — the root of the user-level login profiles * (S4, design §10.2). * * Deliberately CROSS-PROJECT: one logged-in session reused across every project * and worktree is the feature's whole value, so it is scoped to the user, not to * `(projectRoot, sessionId)`. AC1's "no root pollution" is untouched — this * lives under the user's home, never under the project root. * * The name lives HERE rather than in `web-login-profile.ts` for the same reason * `webInstallLockPath` does: this module is the only one under * `src/services/web/` allowed to contain the `.peaks` literal (tech-doc §7.2 * rule 1). */ export declare function userWebProfilesDir(): string; /** `/.peaks/_runtime//web/daemon/daemon.log` — daemon stdout/stderr. */ export declare function webLogPath(projectRoot: string, sessionId: string): string; /** * `/.peaks/_runtime//pw-profiles//storageState.json`. * * The DIRECTORY convention is the existing `pw-profiles/` one * (`src/services/worktree/playwright-profile.ts:21`), reused rather than * re-implemented. The FILE inside it is a Playwright `storageState.json`, not * a Chromium `userDataDir`: orchestrator decision C1 — a persistent context * per dispatch would spawn one browser process per dispatch and violate Q8. * * Note the sibling relationship: this path is NOT under `webDir(...)`. The * guard parent for it is `webProfilesDir(...)`. */ export declare function webContextStatePath(projectRoot: string, sessionId: string, dispatchId: string): string; /** * Throw unless `child` resolves to `parent` or to a path strictly inside it. * * The single write guard for the slice: every write site calls this before * touching disk, and a violation surfaces as `WEB_PATH_ESCAPE` in a `fail()` * envelope. Uses the shared `isInsidePath` so a bare `startsWith` sibling-prefix * collision (`/proj2` vs `/proj`) cannot pass. */ export declare function assertUnder(child: string, parent: string): void;