#[non_exhaustive]pub struct ScopeAttributes {
pub agent_id: Option<String>,
pub delegates: bool,
pub flow_id: Option<String>,
pub run_id: Option<String>,
}Expand description
The authority attributes the daemon copies into scope stamps unchanged.
Only an owner module named in the daemon config’s scope_authority_owners
list (by default the module that owns agent sessions) may set them; a scope
owned by any other module must leave them empty.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.agent_id: Option<String>The agent the scope’s session belongs to. Identity, never permission.
delegates: boolWhether a provider may act as agent_id. Refused without agent_id.
flow_id: Option<String>This scope belongs to the named flow, an automated workflow run on an
agent’s behalf. Set only by an authority owner (see above), validated
with validate_flow_id, and stamped verbatim. It needs neither
agent_id nor delegates. Providers treat a module other than the
owner that opens a route under a flow scope as the flow’s carrier.
Like an agent_id change, changing this within the same scope epoch is
accepted: the scope’s content version increases (the number providers
compare to notice a change), and every route under the scope is closed
with the reason scope_delegation_changed, so no live route keeps the
old identity.
A target must provide FLOW_SCOPES_CAPABILITY before the daemon may
send a bind stamped with this field. Decoding it alone is not enough:
the target must also apply flow behaviour instead of agent behaviour.
run_id: Option<String>Identifies one run carried out on behalf of agent_id. Requires
agent_id, forbids flow_id and delegates, and uses
validate_run_id’s token rule.
Adding, changing or removing it within an epoch increments the scope’s
content version and closes routes under the scope with
scope_delegation_changed. The daemon sends this field in a bind only to
a target module providing AGENT_RUN_SCOPES_CAPABILITY.