pub struct HttpFrontendRuntime { /* private fields */ }Expand description
Authenticated HTTP implementation of FrontendRuntime.
It owns only an RPC/SSE connection. The remote RpcEngine remains the
sole owner of the agent loop, transcript, scheduler, and persistence.
Implementations§
Source§impl HttpFrontendRuntime
impl HttpFrontendRuntime
Sourcepub async fn connect(
base_url: impl Into<String>,
token: impl Into<String>,
) -> Result<Arc<HttpFrontendRuntime>, SdkError>
pub async fn connect( base_url: impl Into<String>, token: impl Into<String>, ) -> Result<Arc<HttpFrontendRuntime>, SdkError>
Authenticate, verify the frontend descriptor, and establish the sequenced SSE stream before returning.
Sourcepub async fn connect_with_client_id(
base_url: impl Into<String>,
token: impl Into<String>,
client_id: RuntimeClientId,
) -> Result<Arc<HttpFrontendRuntime>, SdkError>
pub async fn connect_with_client_id( base_url: impl Into<String>, token: impl Into<String>, client_id: RuntimeClientId, ) -> Result<Arc<HttpFrontendRuntime>, SdkError>
Connect with a caller-owned stable client identity. Reconnect tests and external bindings use this to retain deterministic lease state.
Connect while requesting an exact subset of the bearer credential’s permissions. The server intersects this with the authenticated grant; this header can narrow authority but can never elevate it.
Sourcepub fn client_id(&self) -> &RuntimeClientId
pub fn client_id(&self) -> &RuntimeClientId
Current authenticated client identity.
Sourcepub fn is_disconnected(&self) -> bool
pub fn is_disconnected(&self) -> bool
Whether the remote event stream has already ended or this client explicitly detached/closed.
Sourcepub async fn take_control(&self) -> Result<RuntimeLeaseSnapshot, SdkError>
pub async fn take_control(&self) -> Result<RuntimeLeaseSnapshot, SdkError>
Explicitly acquire the controller lease, displacing another interactive client only through this named operation.
Sourcepub async fn heartbeat(&self) -> Result<RuntimeLeaseSnapshot, SdkError>
pub async fn heartbeat(&self) -> Result<RuntimeLeaseSnapshot, SdkError>
Renew observer activity and any controller lease owned by this client.
Sourcepub async fn lease_snapshot(&self) -> Result<RuntimeLeaseSnapshot, SdkError>
pub async fn lease_snapshot(&self) -> Result<RuntimeLeaseSnapshot, SdkError>
Read the coordinated ownership state.
Sourcepub async fn detach(&self) -> Result<RuntimeLeaseSnapshot, SdkError>
pub async fn detach(&self) -> Result<RuntimeLeaseSnapshot, SdkError>
Release observer and controller state without stopping the runtime.