/** * One lock for every botmux-internal mutation of the shared PM2_HOME * (~/.botmux/pm2): core fleet stop/start/restart AND plugin service * lifecycle. Core and plugin apps live under the same God, so two separate * locks would let a concurrent plugin start slip between an include-pm2 * restart's plugin stop and its `pm2 kill`, or between the kill and the fresh * fleet start. Computed lazily so tests can repoint HOME. */ export declare function pm2FleetMutationLockTarget(): string; /** True only within the async call chain that currently holds the lock. */ export declare function pm2FleetMutationLockHeld(): boolean; /** * Serialize a PM2_HOME mutation against every other botmux flow — other * processes via the file lock, other async chains in THIS process via the * same file lock (file-lock treats a live same-pid holder as held, not * stale). Lock order is fixed: fleet lock FIRST, then the plugin service * lock — never the reverse. */ export declare function withPm2FleetMutationLock(fn: () => Promise | T, opts?: { maxWaitMs?: number; }): Promise; /** Sync variant for sync call sites (plugin service lock wrapper). */ export declare function withPm2FleetMutationLockSync(fn: () => T, opts?: { maxWaitMs?: number; }): T; //# sourceMappingURL=pm2-fleet-lock.d.ts.map