pub struct WorkItem {Show 20 fields
pub id: String,
pub title: String,
pub payload: String,
pub kind: String,
pub target_agent: String,
pub target_group: String,
pub priority: i64,
pub state: String,
pub claimed_by: String,
pub target_agent_uid: String,
pub claimed_by_uid: String,
pub claim_expires: Option<i64>,
pub attempts: i64,
pub max_attempts: i64,
pub created_by: String,
pub created_by_uid: String,
pub created_at: i64,
pub updated_at: i64,
pub not_before: Option<i64>,
pub result: String,
}Fields§
§id: String§title: String§payload: StringThe instruction injected into whichever agent claims this.
kind: StringFree-form tag for filtering ("review", "repro", …). Empty = untyped.
target_agent: StringEmpty = any agent may claim. Non-empty = only this agent id.
target_group: StringEmpty = no group restriction. Non-empty = a db_agent_groups id; any
member may claim. Group membership is resolved by the CALLER (which
holds the per-channel store where groups live), not here — this module
stays a pure queue and does not reach across stores.
priority: i64Higher claims first. Ties broken by created_at ascending (FIFO).
state: String§claimed_by: String§target_agent_uid: StringIdentity M1b/M3 (SPEC_AGENT_IDENTITY_CARRIED_NOT_DERIVED_2026_09_23.md
§9.1): the UID (db_agents.id) of target_agent, resolved once at
the authoring boundary and carried in — spec §5.4, never at claim
time. Since M3, an item with a target_agent_uid is claimable by that
identity only. Empty = untargeted, or no UID was carried: the name
path applies.
claimed_by_uid: StringThe claimer’s UID — its token’s (M4c-1), else carried from its own
AGENTMUX_AGENT_UID, else its block’s row. Empty when unknown. Since
M4c-2 the holder transitions match it against the caller’s UID when
both are known, and claimed_by otherwise (HolderMatch).
claim_expires: Option<i64>ms epoch; None unless state == claimed.
attempts: i64§max_attempts: i64§created_by: String§created_by_uid: StringIdentity M4c-1 (SPEC_AGENT_IDENTITY_CARRIED_NOT_DERIVED_2026_09_23.md
§6.5.9): the enqueuer’s UID, taken from the request’s Caller — its
X-Agent-Token — never from a body field. Empty = the enqueue was
Unattributed; never guessed. Dual-written beside created_by;
nothing branches on it.
created_at: i64§updated_at: i64§not_before: Option<i64>ms epoch; not claimable before this. None = claimable immediately.
result: StringCompletion note or failure reason.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WorkItem
impl<'de> Deserialize<'de> for WorkItem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for WorkItem
Auto Trait Implementations§
impl Freeze for WorkItem
impl RefUnwindSafe for WorkItem
impl Send for WorkItem
impl Sync for WorkItem
impl Unpin for WorkItem
impl UnsafeUnpin for WorkItem
impl UnwindSafe for WorkItem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more