pub enum StateScope {
Private,
Team,
User,
Tenant,
}Expand description
A state scope an agent may read and write (R0.7): the closed taxonomy
naming where agent state lives, declared per agent in its
CapabilityManifest::scopes.
Each scope maps onto a store that already exists — the contract is the name and the declaration, not a new mechanism. Access is checked against the manifest’s declaration: an undeclared access fails fast before any I/O, the same shape as a write to an undeclared channel failing at the barrier.
Variants§
Private
The agent’s own thread (agent:{agent_id}). The checkpoint log is
the private state: per-turn writes land in channels, the boundary
checkpoint persists them, restart restores them.
Team
A thread shared by a team’s members (team:{team_id}), written only
through mailbox-driven turns so every mutation has a journaled
author. Shared mutable team state outside the turn discipline is not
offered — that is the shared-state bug class the channel/reducer
model was built to kill.
User
The server KV store under a user:{user_id} namespace (inside the
tenant’s {tenant}/ isolation prefix).
Tenant
The server KV store’s tenant namespace itself — configuration and reference data shared by every agent and run in the tenant.