Skip to main content

serve_over

Function serve_over 

Source
pub async fn serve_over<R, W>(
    reader: R,
    writer: W,
    control: ControlClient,
    args: AgentClientArgs,
    runs_dir: PathBuf,
    default_cwd: String,
) -> Result<()>
where R: AsyncBufRead + Send + 'static, W: AsyncWrite + Send + 'static,
Expand description

The protocol server. Generic over transport at the boundary, then erased to trait objects internally (see the body).

Reads newline-delimited JSON-RPC messages from reader, drives the session state machine, and writes responses/notifications to writer. control reaches the shared-world daemon; runs_dir is the run-state root the output tailer reads from (injected so tests use a temp dir). Returns Ok(()) when the client closes the input stream (EOF).