pub struct Agents { /* private fields */ }Expand description
Agent metadata never hosts a provider, harness pipe or process.
Implementations§
Source§impl Agents
impl Agents
Sourcepub fn bind_console(&self, console: &Arc<ConsoleHub>) -> Result<(), AgentError>
pub fn bind_console(&self, console: &Arc<ConsoleHub>) -> Result<(), AgentError>
Binds the console once; subscription resources never keep it alive.
§Errors
A console was already installed.
Sourcepub fn listened_subjects(
&self,
connection: u64,
) -> Result<Vec<String>, AgentError>
pub fn listened_subjects( &self, connection: u64, ) -> Result<Vec<String>, AgentError>
Sourcepub fn track_listen(
&self,
connection: u64,
id: u64,
subject: &str,
resource: Box<dyn SubscriptionResource>,
) -> Result<Box<dyn SubscriptionResource>, AgentError>
pub fn track_listen( &self, connection: u64, id: u64, subject: &str, resource: Box<dyn SubscriptionResource>, ) -> Result<Box<dyn SubscriptionResource>, AgentError>
Wraps the real resource so unsubscribe, overflow and Drop remove its stop.
§Errors
A listen bound or index failure.
Sourcepub fn execute_approved(
&self,
draft: &ApprovedDraft,
) -> Result<Execution, AgentError>
pub fn execute_approved( &self, draft: &ApprovedDraft, ) -> Result<Execution, AgentError>
Applies an agent draft pulled and authenticated by AGT-004, then seeds the retained subjects. Replays reuse the committed mutation receipt.
§Errors
Draft, bound, store or retained-subject failure.
Sourcepub fn open(
store: Arc<dyn DurableStore>,
bounds: AgentsConfig,
network: String,
supervisor: ChannelSupervisor,
device: &str,
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, supervisor: ChannelSupervisor, device: &str, placer: Option<Arc<dyn Placer>>, seats: Option<Arc<dyn AgentSeats>>, ) -> Result<Arc<Self>, AgentError>
Opens over the server’s own store and channel scheduler. Previously present tickets are durably recorded gone before admission opens.
§Errors
Invalid configuration, corrupt history, or a store or clock failure.
Sourcepub const fn registry(&self) -> &Arc<AgentRegistry> ⓘ
pub const fn registry(&self) -> &Arc<AgentRegistry> ⓘ
The one registry shared with the approved-draft executor.
Sourcepub const fn retained(&self) -> &Arc<Retained> ⓘ
pub const fn retained(&self) -> &Arc<Retained> ⓘ
The one retained-subject writer shared with approvals.
Sourcepub const fn bounds(&self) -> &AgentsConfig
pub const fn bounds(&self) -> &AgentsConfig
The configured positive bounds.
Sourcepub const fn presence(&self) -> &Presence
pub const fn presence(&self) -> &Presence
The observed presence, never inferred from a lifecycle request.
Sourcepub fn created(&self, name: &str) -> Result<(), AgentError>
pub fn created(&self, name: &str) -> Result<(), AgentError>
Seeds subjects after a draft created a station. Existing presence is preserved; a second executor notification cannot mark a live seat gone.
§Errors
Unknown station or failed retained delivery.
Sourcepub fn subscribe(
&self,
request: AgentSubscription<'_>,
ordinary: impl FnOnce(Option<InboxInstall>) -> Result<ConnectionSubscription, AgentError>,
) -> Result<ConnectionSubscription, AgentError>
pub fn subscribe( &self, request: AgentSubscription<'_>, ordinary: impl FnOnce(Option<InboxInstall>) -> Result<ConnectionSubscription, AgentError>, ) -> Result<ConnectionSubscription, AgentError>
Opens the real inbox or a retained metadata watcher after both identity
and subject rights are decided. The caller’s revocation and membership checks still precede this method and still run at delivery release.
§Errors
The pass, station, duplicate seat, schema or subscription is refused.