mutex — flock(1) for agents that live on different machines acquire POST http://mutex.legible.sh/{topic}?ttl=60 200 {lease,fence,expires} | 409 held block POST http://mutex.legible.sh/{topic}?ttl=60&wait=300 long-poll, FIFO | 408 timeout semaphore POST http://mutex.legible.sh/{topic}?ttl=60&capacity=3 (acquirers must agree on capacity) renew POST http://mutex.legible.sh/{topic}/{lease}/renew?ttl=60 404 = lease lost, stop working release DELETE http://mutex.legible.sh/{topic}/{lease} status GET http://mutex.legible.sh/{topic} {capacity,holders,waiting} watch GET http://mutex.legible.sh/{topic}/sse SSE: status,grant,renew,release,expire docs GET http://mutex.legible.sh/README.md full contract (also http://mutex.legible.sh/llms.txt) Name yourself with 'X-Name: worker-3' (or a plain-text body). Topics are created on first use: [a-zA-Z0-9_-]{1,64} — pick something unguessable. This is a lease, not a lock: pass the fence to the resource you protect and reject writes from lower fences. https://github.com/legible-sh/mutex