pub struct HostCatalog { /* private fields */ }Expand description
Administrative state only. Does not create Agent backends or stop external tools. The eventual service owner must drain actual backends before shutdown.
Implementations§
Source§impl HostCatalog
impl HostCatalog
pub async fn open(directory: PathBuf, config: HostConfig) -> CatalogResult<Self>
pub fn epoch(&self) -> HostEpoch
pub fn guard(&self, record: &AgentRecord) -> CatalogGuard
pub async fn register(&self, spec: AgentSpec) -> CatalogResult<AgentRecord>
pub async fn get(&self, id: AgentId) -> CatalogResult<AgentRecord>
pub async fn list( &self, after: Option<AgentId>, limit: usize, ) -> CatalogResult<AgentPage>
pub async fn transition( &self, id: AgentId, guard: CatalogGuard, next: AgentState, ) -> CatalogResult<AgentRecord>
pub async fn status(&self) -> CatalogResult<CatalogStatus>
Sourcepub async fn set_max_agents(
&self,
limit: Option<NonZeroUsize>,
) -> CatalogResult<()>
pub async fn set_max_agents( &self, limit: Option<NonZeroUsize>, ) -> CatalogResult<()>
Runtime policy only; the caller remains responsible for saving Host config.
Sourcepub async fn prepare_lifecycle(
&self,
request: LifecycleRequest,
) -> CatalogResult<LifecycleAdmission>
pub async fn prepare_lifecycle( &self, request: LifecycleRequest, ) -> CatalogResult<LifecycleAdmission>
Commit administrative custody only. The trusted coordinator must own
prepare+action+finish independently of a client waiter, and may act ONLY
when fresh is true. This API executes nothing and grants no permission.
Sourcepub async fn finish_lifecycle(
&self,
request: LifecycleRequest,
status: LifecycleState,
) -> CatalogResult<LifecycleReceipt>
pub async fn finish_lifecycle( &self, request: LifecycleRequest, status: LifecycleState, ) -> CatalogResult<LifecycleReceipt>
Trusted coordinator publication, never a client-supplied result. A final state is immutable; errors require reconciliation rather than replay.
Sourcepub async fn lifecycle_receipt(
&self,
scope: ControlScopeId,
request_id: RequestId,
) -> CatalogResult<Option<LifecycleReceipt>>
pub async fn lifecycle_receipt( &self, scope: ControlScopeId, request_id: RequestId, ) -> CatalogResult<Option<LifecycleReceipt>>
No Agent load, action replay, or ownership transfer. Found records pass a strict SQLite checkpoint before they are returned as journal evidence.
Sourcepub async fn shutdown(&self) -> CatalogResult<()>
pub async fn shutdown(&self) -> CatalogResult<()>
Waits for storage/lock cleanup, not for Agent execution cleanup.