Skip to main content

Module claims

Module claims 

Source
Expand description

Work claims, the pure half (docs/specs/SPEC_AGENT_OVERLAP_AWARENESS_2026_10_10.md §3.4): which claims touch a WhoIsWorkingOn question or an edited file, and how a claim reads. Claims themselves are stored by storage::work_claims; ClaimWork and ReleaseWork are server::work_facts_handlers.

Constants§

DEFAULT_TTL_MINUTES
How long a claim lasts when the claimer doesn’t say.
MAX_TTL_MINUTES
MIN_TTL_MINUTES
The shortest and longest a claim may last.

Functions§

add_claim_matches
Add every claim in claims that touches t to results, under the agent that made it (a result of its own when its facts matched nothing), then sort as WhoIsWorkingOn does. facts supplies the status, goal, repository and branch of a claimer that has no result yet. The caller’s own claims must already be left out.
ago
“just now”, “1 minute ago”, “25 minutes ago”, “3 hours ago”.
claim_matches
Whether claim c touches the question t: a path either holds the other, the same branch, the repository as a whole, or the query’s words all in the claim’s topic, note or path.
covering
The live claims that cover an edited file, by agents other than me_agent: a claimed path in the same repository that holds the file (or the whole repository).
describe
What a claim names, for a reader: crates/srv/src/muxbus in o/r, branch agent5/x in o/r, "presence", or several of those.
detail
One claim as a WhoIsWorkingOn match detail: claimed crates/srv in o/r 40 minutes ago: "presence work" (expires in 80 minutes).
is_own
Whether c was made by the caller: by UID when both have one, else by name.
paths_overlap 🔒
Two repository-relative paths overlap when either holds the other.
ttl_ms
A claim’s lifetime in ms: the asked minutes within the bounds, else the default.