mirror of
https://github.com/openai/codex.git
synced 2026-05-05 13:51:29 +03:00
Add a high-level remote shell exec RPC
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -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, ¶ms)
|
||||
.await
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
pub async fn write(
|
||||
&self,
|
||||
process_id: &str,
|
||||
|
||||
Reference in New Issue
Block a user