import { spawn as childProcessSpawn } from 'node:child_process'; /** * lease by shelling out to `peaks worktree spawn` (avoid re-implementing * the lease-write + git-worktree-add sequence in this file). The CLI * does the lease write, the git worktree add, AND the error handling; * we just parse the JSON envelope and surface the leaseId + path. * * Throws on spawn failure; the caller converts the error to a * ISOLATION_SPAWN_FAILED envelope. Synchronous wait is acceptable: the * dispatch is already async, the lease is a few hundred ms of FS work, * and we need the leaseId before we build the dispatch record. */ export declare function spawnWorktreeLease(args: { projectRoot: string; sessionId: string; rid: string; role: string; purpose: string; }, spawnImplOverride?: typeof childProcessSpawn): Promise<{ leaseId: string; path: string; branch: string; expiresAt: number; }>; /** * isolation bridge. Shells out to `peaks container spawn` to * run `docker run` + write the container lease. Returns the * leaseId the dispatch record needs to persist. The shape is * a subset of the spawnWorktreeLease return (just leaseId); * we do not need the path/branch/expiresAt for the container * path because the envelope surfaces a different set of * fields (image + containerId; see container-lease.ts). */ export declare function spawnContainerLease(args: { projectRoot: string; sessionId: string; rid: string; role: string; purpose: string; }, spawnImplOverride?: typeof childProcessSpawn): Promise<{ leaseId: string; }>;