pub struct AppServerAgentChannel { /* private fields */ }Expand description
AgentChannel adapter backed by a persistent app-server session.
Turn execution is delegated to AppServerClient::run_turn.
AppServerStreamEvents emitted by the provider are bridged to
TurnEvent::ThoughtDelta values when transient loader text should be
updated.
Implementations§
Source§impl AppServerAgentChannel
impl AppServerAgentChannel
Sourcepub fn new(client: Arc<dyn AppServerClient>, kind: AgentKind) -> Self
pub fn new(client: Arc<dyn AppServerClient>, kind: AgentKind) -> Self
Creates a new app-server channel backed by the given client.
Trait Implementations§
Source§impl AgentChannel for AppServerAgentChannel
impl AgentChannel for AppServerAgentChannel
Source§fn start_session(
&self,
req: StartSessionRequest,
) -> AgentFuture<Result<SessionRef, AgentError>>
fn start_session( &self, req: StartSessionRequest, ) -> AgentFuture<Result<SessionRef, AgentError>>
Returns a SessionRef immediately; the app-server session is
initialised lazily on the first turn.
Source§fn run_turn(
&self,
session_id: String,
req: TurnRequest,
events: UnboundedSender<TurnEvent>,
) -> AgentFuture<Result<TurnResult, AgentError>>
fn run_turn( &self, session_id: String, req: TurnRequest, events: UnboundedSender<TurnEvent>, ) -> AgentFuture<Result<TurnResult, AgentError>>
Runs one app-server turn and bridges stream events to TurnEvents.
Assistant stream chunks are never appended directly to the transcript.
Instead, Codex thought-style deltas (phase: thinking/plan) and
provider progress updates are bridged to TurnEvent::ThoughtDelta so
the UI loader can reflect transient state while the final persisted
output still comes only from the parsed TurnResult.
§Errors
Returns AgentError when AppServerClient::run_turn fails.
Source§fn shutdown_session(
&self,
session_id: String,
) -> AgentFuture<Result<(), AgentError>>
fn shutdown_session( &self, session_id: String, ) -> AgentFuture<Result<(), AgentError>>
Shuts down the underlying app-server session.