Skip to main content

Module file_claims

Module file_claims 

Source
Expand description

File ownership claims for concurrent swarm agents.

When several agents edit one checkout, each mutator (write / edit / apply_patch) must claim the target path first. A second agent that tries the same path gets a structured conflict instead of a silent overwrite.

Claims are process-local (in-memory). They do not replace git worktrees for hard isolation; they are the lightweight conflict-notify layer.

Structs§

FileClaim
Who holds a path while a swarm (or multi-writer) session is active.
FileClaimRegistry
Shared registry of file claims for one swarm (or multi-writer) run.
FileConflictEvent
Emitted when a claim fails because another agent already owns the path.
FileStaleEvent
A reader opened a file another agent wrote since their last read.

Enums§

ClaimResult
Result of attempting to claim a file for writing.

Type Aliases§

ConflictListener
Optional listener for conflict notifications (TUI toast, logs, …).
StaleListener
Optional listener for stale-read notifications.