Skip to main content

levi_core/entities/
claim.rs

1use myko::prelude::*;
2
3/// Advisory claim. id = task_id, so a SET overwrites any prior claim and
4/// "newest wins" falls out of LWW replay order. Ignored after ttl expires.
5#[myko_item]
6pub struct Claim {
7    pub project_id: String,
8    pub task_id: String,
9    pub dev: String,
10    /// Display name (hostname). Identity comparisons use `machine_id`.
11    pub machine: String,
12    /// Minted per-machine UUID (empty on legacy events — compare by
13    /// `machine` display name then).
14    #[serde(default)]
15    pub machine_id: String,
16    pub worktree: String,
17    /// RFC3339
18    pub created: String,
19    pub ttl_secs: u64,
20}