pub struct AgentId(pub String);Expand description
A stable agent identity (R0.7).
Tenant-namespaced like every other server id ({tenant}/researcher-7
inherits the v0.5 isolation model unchanged — a cross-tenant agent
resolves to nothing). Transparent over String: the wire shape is the
id itself. The newtype — not convention — is what keeps agent ids
distinct from run ids, task ids, and pool names at every construction
site, the same discipline crate::record::PolicyVersion applies to
policy pins.
The constructor does not validate: the server’s route layer enforces the id grammar (non-empty, bounded, no path separators) at the boundary, the same division of labor every other server id follows.
Tuple Fields§
§0: StringImplementations§
Source§impl AgentId
impl AgentId
Sourcepub fn mailbox_recipient(&self) -> String
pub fn mailbox_recipient(&self) -> String
The queue recipient addressing this agent’s mailbox:
agent:{agent_id}. A mailbox is an addressing discipline on the
existing task queue — not a new queue — so mailbox messages inherit
the R0.6 durability, retry, dead-letter, and cancellation machinery
unchanged.
Sourcepub fn thread_id(&self) -> String
pub fn thread_id(&self) -> String
The thread holding this agent’s private state: agent:{agent_id} —
a naming convention over the existing checkpointer, not a new store,
so checkpoints, time travel, and fork-on-replay work on agent state
unmodified. The checkpoint log is the private state; restart is
re-driving it.