pub struct AgentRegistry { /* private fields */ }Expand description
Registry over the server’s own durable store. No pass or message is retained.
Implementations§
Source§impl AgentRegistry
impl AgentRegistry
Sourcepub fn open(
store: Arc<dyn DurableStore>,
bounds: AgentsConfig,
network: String,
placer: Option<Arc<dyn Placer>>,
seats: Option<Arc<dyn AgentSeats>>,
) -> Result<Arc<Self>, AgentError>
pub fn open( store: Arc<dyn DurableStore>, bounds: AgentsConfig, network: String, placer: Option<Arc<dyn Placer>>, seats: Option<Arc<dyn AgentSeats>>, ) -> Result<Arc<Self>, AgentError>
Restores every transition in bounded pages, including retired agents.
placer and seats are production Lys bindings, never authority to
approve a draft. Only the authenticated approved-draft connector may
call Self::execute_approved.
§Errors
Invalid bounds, corrupt history, or a failed store read.
Sourcepub fn record(&self, name: &str) -> Result<AgentRecord, AgentError>
pub fn record(&self, name: &str) -> Result<AgentRecord, AgentError>
Reads one whole history, without inventing a transition after restart.
§Errors
The name is unknown or the store outcome is unresolved.
Sourcepub fn records(&self) -> Result<Vec<AgentRecord>, AgentError>
pub fn records(&self) -> Result<Vec<AgentRecord>, AgentError>
Sourcepub fn station_records(&self) -> Result<Vec<AgentRecord>, AgentError>
pub fn station_records(&self) -> Result<Vec<AgentRecord>, AgentError>
Compact station metadata; topology never clones a transition history.
§Errors
The index is unavailable.
Sourcepub fn held(&self, action: &str, draft: &str) -> AgentError
pub fn held(&self, action: &str, draft: &str) -> AgentError
A held response cannot mutate the registry.
Sourcepub fn execute_approved(
&self,
draft: &ApprovedDraft,
) -> Result<Execution, AgentError>
pub fn execute_approved( &self, draft: &ApprovedDraft, ) -> Result<Execution, AgentError>
Executes only a draft pulled from Lys by the authenticated connector. Its target and immutable digest are checked again here. Receipt and transition share one event, so a crash cannot keep one without the other. Lys starts and stops use the draft id as their idempotency operation.
§Errors
Foreign or changed drafts, a bound, Lys’s refusal, or an unresolved write.
Sourcepub fn execute_approved_at(
&self,
draft: &ApprovedDraft,
at_ms: u64,
) -> Result<Execution, AgentError>
pub fn execute_approved_at( &self, draft: &ApprovedDraft, at_ms: u64, ) -> Result<Execution, AgentError>
Uses the execution owner’s observed time, not the draft’s preparation time.
§Errors
The same refusals as Self::execute_approved.