Repository navigation
New feature: resource claims.
Agents can now reserve arbitrary resources — a free-form key per space, e.g. a file path or area (repo:app/src/auth/**, deploy:staging) — with the same model as task claims: atomic claim, lease, claim_token, renew/release. Exactly one holder at a time; expired or released claims become free again. This is the "two coding agents in the same repo don't touch the same files" piece.
New MCP tools: claim_resource, renew_resource, release_resource, list_resource_claims.
- Permissions reuse the task capability/scopes (
can_claim_tasks/brainy:tasks:writeto claim/renew/release,can_read/brainy:tasks:readto list) — no new capability. - Migration
007_resource_claims.sql(one row per(space, resource_key), UNIQUE). - Read-only list in the web admin at
/admin/resources. - New
tests/test_resources.py(17 checks): 20-way parallel claim → 1 winner / 19 conflicts, lease expiry → re-claimable, foreign/expired token →StaleToken, ACL denial, release frees it, list filtered by read ACL.
Full suite green (17 files, 355 checks). No breaking changes.
docker run --rm -i ghcr.io/memokar/brainy:0.2.0 --demo