mirror of
https://github.com/openai/codex.git
synced 2026-04-29 02:41:12 +03:00
Introduce executor-backed environment APIs
Route unified exec through Environment executor sessions and move AGENTS, skill content, and read_file reads onto the environment filesystem. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
use std::io;
|
||||
use std::sync::Arc;
|
||||
|
||||
use base64::Engine as _;
|
||||
@@ -24,6 +23,7 @@ use crate::environment::Environment;
|
||||
use crate::fs::CopyOptions;
|
||||
use crate::fs::CreateDirectoryOptions;
|
||||
use crate::fs::ExecutorFileSystem;
|
||||
use crate::fs::FsError;
|
||||
use crate::fs::RemoveOptions;
|
||||
use crate::rpc::internal_error;
|
||||
use crate::rpc::invalid_request;
|
||||
@@ -161,10 +161,10 @@ impl ExecServerFileSystem {
|
||||
}
|
||||
}
|
||||
|
||||
fn map_fs_error(err: io::Error) -> JSONRPCErrorError {
|
||||
if err.kind() == io::ErrorKind::InvalidInput {
|
||||
invalid_request(err.to_string())
|
||||
fn map_fs_error(err: FsError) -> JSONRPCErrorError {
|
||||
if err.0.kind() == std::io::ErrorKind::InvalidInput {
|
||||
invalid_request(err.0.to_string())
|
||||
} else {
|
||||
internal_error(err.to_string())
|
||||
internal_error(err.0.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user