import { type LeaseReleaseOutcome, type WorkspaceLease } from "./lease-record.ts"; export type { LeaseReleaseOutcome, WorkspaceLease } from "./lease-record.ts"; import type { ValidatedWorkspace, WorkspaceAccess } from "../kernel/workspace.ts"; export { ENV_WORKSPACE_LEASE_DIR } from "../kernel/env-names.ts"; export declare function defaultWorkspaceLeaseDir(env?: NodeJS.ProcessEnv): string; /** * The ledger outcome for a release. Exported because call sites had their own copies and the check runner's * asserted `released` unconditionally — reproducing in the evidence path the exact defect this union was * added to expose (R-100/R-103). * * **It is NOT the only definition, and saying so here was wrong.** `extensions/workspace-runtime.ts` keeps a * private copy with no `not-held` arm, and it is the one the whole delegation path uses — so releasing a * *read* lease on a delegated child is still recorded `released`, a handover the kernel never performed. * Measured; open as R-141; the sentence claiming a single definition survived two review passes because * `test/workspace.test.ts` pins the `not-held` arm on THIS function, which no delegation path calls. */ export declare function leaseReleaseLedgerOutcome(outcome: LeaseReleaseOutcome | "retained", reason: string): "timeout" | "released" | "released-unrecorded" | "lost" | "retained" | "uncontended"; /** * `acquired` must mean the kernel actually excluded somebody. A read lease takes no lock (R-105), and an * unreadable predecessor record is not proof of a crash (R-100) — so neither may be reported as one. */ export declare function leaseAcquisitionOutcome(access: "read" | "write", recovered: boolean | "unknown"): "acquired" | "uncontended" | "recovered"; export declare function acquireWorkspaceLease(input: { workspace: ValidatedWorkspace; access: WorkspaceAccess; leaseDir: string; ownerId: string; signal?: AbortSignal; flockCommand?: string; acquisitionTimeoutMs?: number; /** * Bound on how long ONE `herdr tab close` attempt may take before it counts as failed (R-146). A hung * herdr is not a failed herdr: without this the attempt never returns and the retry bound below is * unreachable. */ herdrCloseTimeoutMs?: number; /** Bound on the helper's `herdr tab close` retries before it releases the lock anyway (R-102). */ herdrCloseAttempts?: number; }): Promise; //# sourceMappingURL=workspace-lease.d.ts.map