pub struct SupervisorSessionService { /* private fields */ }Expand description
Trusted host service; not a model tool or an automatic Session startup hook. Storage owns atomic publication and identity validation. This service never creates an ordinary Session, changes a cache, or launches a run.
Implementations§
Source§impl SupervisorSessionService
impl SupervisorSessionService
pub fn new(storage: Arc<dyn Storage>) -> Self
Sourcepub async fn get_or_create_default(
&self,
initial_model: &str,
) -> Result<SupervisorBootstrapReceipt>
pub async fn get_or_create_default( &self, initial_model: &str, ) -> Result<SupervisorBootstrapReceipt>
Get the stable identity, using initial_model only on first creation.
Sourcepub async fn inspect_scope(
&self,
supervisor: &SupervisorReference,
) -> Result<SupervisorScopeObservation>
pub async fn inspect_scope( &self, supervisor: &SupervisorReference, ) -> Result<SupervisorScopeObservation>
Read the bounded host scope and current CAS revision. Defaults to empty.
Sourcepub async fn configure_project_scope(
&self,
supervisor: &SupervisorReference,
expected_state_revision: u64,
allowed_projects: BTreeSet<ProjectId>,
) -> Result<SupervisorManagementReceipt>
pub async fn configure_project_scope( &self, supervisor: &SupervisorReference, expected_state_revision: u64, allowed_projects: BTreeSet<ProjectId>, ) -> Result<SupervisorManagementReceipt>
Replace trusted Project scope. Removal disables associated links; subsequent regrant never silently enables those tombstones.
Sourcepub async fn attach(
&self,
supervisor: &SupervisorReference,
expected_state_revision: u64,
target_session_id: &str,
) -> Result<SupervisorManagementReceipt>
pub async fn attach( &self, supervisor: &SupervisorReference, expected_state_revision: u64, target_session_id: &str, ) -> Result<SupervisorManagementReceipt>
Attach/revalidate an existing Ordinary Root in configured Project scope. Storage captures its exact current birth and metadata revision atomically.
Sourcepub async fn detach(
&self,
supervisor: &SupervisorReference,
expected_state_revision: u64,
target_session_id: &str,
) -> Result<SupervisorManagementReceipt>
pub async fn detach( &self, supervisor: &SupervisorReference, expected_state_revision: u64, target_session_id: &str, ) -> Result<SupervisorManagementReceipt>
Disable a stored link even if the target is now absent or damaged.
Sourcepub async fn inspect_link(
&self,
supervisor: &SupervisorReference,
target_session_id: &str,
) -> Result<SupervisorLinkObservation>
pub async fn inspect_link( &self, supervisor: &SupervisorReference, target_session_id: &str, ) -> Result<SupervisorLinkObservation>
Strict single-link observation. A later command must validate again at durable admission; this returned value carries no retained lock/grant.
Trait Implementations§
Source§impl Clone for SupervisorSessionService
impl Clone for SupervisorSessionService
Source§fn clone(&self) -> SupervisorSessionService
fn clone(&self) -> SupervisorSessionService
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more