import type { ScopeRef, WorkLease } from "../objects/types.ts"; export interface LeaseConflict { scope: ScopeRef; heldBy: string; leaseOid: string; } /** Is the lease still in force at `nowIso`? */ export declare function isActive(lease: WorkLease, nowIso: string): boolean; /** * Two scopes overlap when one is a prefix of the other under the `kind:path` * convention. "file:src/a.ts" overlaps "file:src/a.ts"; a glob-ish "file:src/*" * (stored as "file:src/") overlaps anything beneath it. Symbol scopes nest under * their file when the file scope is held. */ export declare function scopesOverlap(a: ScopeRef, b: ScopeRef): boolean; /** * Check a requested set of write scopes against the currently-active leases. * Returns the conflicts (empty ⇒ grantable). `shared` leases never conflict with * each other; an `exclusive` request conflicts with any overlapping active lease, * and an `exclusive` holder conflicts with any new overlapping request. */ export declare function checkLease(request: { writeScopes: ScopeRef[]; mode: "exclusive" | "shared"; actorId: string; }, active: WorkLease[]): LeaseConflict[]; //# sourceMappingURL=lease.d.ts.map