Expand description
§aura-zones
File and function ownership zones for multi-agent codebases.
When multiple AI agents (or humans) edit the same codebase concurrently,
they need a lightweight mutex to prevent stepping on each other’s work.
aura-zones provides:
- Function claims — an agent claims the functions it’s editing; other agents see collisions before they start.
- Zone rules — mark file patterns as Warn or Block so other agents know to stay away.
- Inter-agent messaging — broadcast or direct messages between concurrent sessions.
- Stale cleanup — dead PIDs and old messages are automatically reaped.
Storage is file-based (one JSON file per session/zone/message), so there’s no database and no daemon — just the filesystem.
§Example
use std::path::PathBuf;
use aura_zones::SentinelManager;
let mgr = SentinelManager::new(PathBuf::from(".aura/sentinel"));
// Claim functions before editing
let collisions = mgr.claim_functions("sess-1", "claude", std::process::id(), "src/auth.rs", &["login".into()]);
if !collisions.is_empty() {
eprintln!("collision: another agent holds login()");
}
// Check zone rules
if let Some(zone) = mgr.check_zone("sess-1", "src/auth.rs") {
eprintln!("zone {:?} applies: {:?}", zone.mode, zone.patterns);
}
// Send a message
mgr.send_message("sess-1", "claude", None, "heads up: refactoring auth");Originally extracted from Aura, the semantic version control engine.