Add a high-level remote shell exec RPC

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
starr-openai
2026-03-20 17:40:35 -07:00
parent f5ffc0373d
commit e6c9f12a40
9 changed files with 304 additions and 20 deletions

View File

@@ -50,6 +50,9 @@ use crate::protocol::InitializeParams;
use crate::protocol::InitializeResponse;
use crate::protocol::ReadParams;
use crate::protocol::ReadResponse;
use crate::protocol::SHELL_EXEC_METHOD;
use crate::protocol::ShellExecParams;
use crate::protocol::ShellExecResponse;
use crate::protocol::TerminateParams;
use crate::protocol::TerminateResponse;
use crate::protocol::WriteParams;
@@ -202,6 +205,17 @@ impl ExecServerClient {
.map_err(Into::into)
}
pub async fn shell_exec(
&self,
params: ShellExecParams,
) -> Result<ShellExecResponse, ExecServerError> {
self.inner
.client
.call(SHELL_EXEC_METHOD, &params)
.await
.map_err(Into::into)
}
pub async fn write(
&self,
process_id: &str,