pub trait FleetProvider: Send + Sync {
// Required methods
fn ensure_agent<'life0, 'async_trait>(
&'life0 self,
spec: TaskSpec,
) -> Pin<Box<dyn Future<Output = Result<AgentHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn watch_fleet(&self) -> BoxStream<'static, FleetChange>;
fn stop_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AgentId,
drain: DrainPolicy,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn restart_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AgentId,
) -> Pin<Box<dyn Future<Output = Result<AgentId>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn remove_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AgentId,
force: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn snapshot<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = FleetSnapshot> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn readiness<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Readiness> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn metrics(&self) -> MetricsSnapshot;
fn send_input<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AgentId,
input: AttachInbound,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Required Methods§
Sourcefn ensure_agent<'life0, 'async_trait>(
&'life0 self,
spec: TaskSpec,
) -> Pin<Box<dyn Future<Output = Result<AgentHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ensure_agent<'life0, 'async_trait>(
&'life0 self,
spec: TaskSpec,
) -> Pin<Box<dyn Future<Output = Result<AgentHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Ensure an agent for spec exists and is attachable. Idempotent.
Sourcefn watch_fleet(&self) -> BoxStream<'static, FleetChange>
fn watch_fleet(&self) -> BoxStream<'static, FleetChange>
Observe the fleet: an initial listing followed by live change events.
Sourcefn stop_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AgentId,
drain: DrainPolicy,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn stop_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AgentId,
drain: DrainPolicy,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Stop an agent per drain policy.
Sourcefn restart_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AgentId,
) -> Pin<Box<dyn Future<Output = Result<AgentId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn restart_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AgentId,
) -> Pin<Box<dyn Future<Output = Result<AgentId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Restart an agent; returns the (possibly new) id.
Sourcefn remove_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AgentId,
force: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AgentId,
force: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Forget an agent entirely (local: remove from caliband’s registry; k8s:
delete its CalibanTask CR). (#76)
Sourcefn snapshot<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = FleetSnapshot> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn snapshot<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = FleetSnapshot> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
A point-in-time view of the whole fleet. Local builds it from the poll
snapshot; k8s projects the live CalibanTasks. (#76)
Sourcefn readiness<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Readiness> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn readiness<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Readiness> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Readiness of the backend + its store. Local reports store-writability + per-workspace poll health; k8s reports store-writability + kube API reachability. (#76)
Sourcefn metrics(&self) -> MetricsSnapshot
fn metrics(&self) -> MetricsSnapshot
Backend counters for /api/metrics. (#76)
Sourcefn send_input<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AgentId,
input: AttachInbound,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_input<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AgentId,
input: AttachInbound,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Steer an interactive agent: deliver an inbound frame to its session plane (local: over the per-agent Unix socket; k8s: dial the agent’s caliband endpoint over the network). (#76)