Split exec process into local and remote implementations

Match the filesystem structure from #15232 for exec process: expose the trait on Environment, keep LocalProcess as the real implementation, use RemoteProcess as the network proxy, and make ProcessHandler a thin RPC adapter over LocalProcess.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
starr-openai
2026-03-19 16:22:03 -07:00
parent 3001e1e7b4
commit fa160b1699
12 changed files with 857 additions and 890 deletions

View File

@@ -25,6 +25,7 @@ const EVENT_TIMEOUT: Duration = Duration::from_secs(5);
pub(crate) struct ExecServerHarness {
child: Child,
websocket_url: String,
websocket: tokio_tungstenite::WebSocketStream<
tokio_tungstenite::MaybeTlsStream<tokio::net::TcpStream>,
>,
@@ -50,12 +51,17 @@ pub(crate) async fn exec_server() -> anyhow::Result<ExecServerHarness> {
let (websocket, _) = connect_websocket_when_ready(&websocket_url).await?;
Ok(ExecServerHarness {
child,
websocket_url,
websocket,
next_request_id: 1,
})
}
impl ExecServerHarness {
pub(crate) fn websocket_url(&self) -> &str {
&self.websocket_url
}
pub(crate) async fn send_request(
&mut self,
method: &str,