pub struct AgentSessionScope {
pub namespace_id: String,
pub owner_id: Option<String>,
pub source_product: String,
pub source_session_id: Option<SessionId>,
pub source_run_id: Option<RunId>,
pub operations: BTreeSet<AgentSessionOperation>,
pub allowed_session_ids: BTreeSet<SessionId>,
pub allow_self_query: bool,
pub allow_self_control: bool,
pub policy_fingerprint: String,
pub deadline: Option<DateTime<Utc>>,
pub max_page_size: u32,
}Expand description
Host-derived authority supplied separately from model arguments.
Fields§
§namespace_id: StringAuthorized namespace.
owner_id: Option<String>Principal/owner represented by this capability.
source_product: StringProduct that constructed the scope.
source_session_id: Option<SessionId>Controlling session, used for self-target denial.
source_run_id: Option<RunId>Controlling run, used for self-target denial.
operations: BTreeSet<AgentSessionOperation>Effective operation intersection. Model input cannot alter this set.
allowed_session_ids: BTreeSet<SessionId>Optional allowlist; empty means the host’s namespace/owner policy decides.
allow_self_query: boolWhether the current session may be queried.
allow_self_control: boolWhether the current run/session may be controlled. Hosts should normally leave false.
policy_fingerprint: StringStable fingerprint of the intersected server/profile/caller/grant policy.
deadline: Option<DateTime<Utc>>Absolute deadline for commands made through this capability.
max_page_size: u32Maximum page size after host policy intersection.
Implementations§
Source§impl AgentSessionScope
impl AgentSessionScope
Sourcepub fn allows(&self, operation: AgentSessionOperation) -> bool
pub fn allows(&self, operation: AgentSessionOperation) -> bool
Return whether an operation is in the effective grant.
Sourcepub fn allows_session(&self, session_id: &SessionId) -> bool
pub fn allows_session(&self, session_id: &SessionId) -> bool
Return whether a session id is inside the host allowlist.
Sourcepub fn is_self_run(&self, target: &ManagedRunTarget) -> bool
pub fn is_self_run(&self, target: &ManagedRunTarget) -> bool
Return whether a run target is the controlling run.
Sourcepub fn is_self_session(&self, target: &ManagedSessionTarget) -> bool
pub fn is_self_session(&self, target: &ManagedSessionTarget) -> bool
Return whether a session target is the controlling session.
Trait Implementations§
Source§impl Clone for AgentSessionScope
impl Clone for AgentSessionScope
Source§fn clone(&self) -> AgentSessionScope
fn clone(&self) -> AgentSessionScope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more