Skip to main content

AppServerClient

Trait AppServerClient 

Source
pub trait AppServerClient: Send + Sync {
    // Required methods
    fn run_turn(
        &self,
        request: AppServerTurnRequest,
        stream_tx: UnboundedSender<AppServerStreamEvent>,
    ) -> AppServerFuture<Result<AppServerTurnResponse, AppServerError>>;
    fn shutdown_session(&self, session_id: String) -> AppServerFuture<()>;
}
Expand description

Persistent app-server session boundary used by session workers.

Required Methods§

Source

fn run_turn( &self, request: AppServerTurnRequest, stream_tx: UnboundedSender<AppServerStreamEvent>, ) -> AppServerFuture<Result<AppServerTurnResponse, AppServerError>>

Executes one prompt turn for a session and returns normalized output.

Intermediate events (agent messages, progress updates) are sent through stream_tx as they arrive, enabling the caller to display streaming output before the turn completes.

Source

fn shutdown_session(&self, session_id: String) -> AppServerFuture<()>

Stops and forgets a session runtime, if one exists.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§