Align exec-server handler naming and fs defaults

Restore the app-server fs default onto Environment::default(), bring back a sync local Environment default for that path, and rename the process RPC adapter to match the filesystem handler style.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
starr-openai
2026-03-19 16:31:44 -07:00
co-authored by Codex
parent 1734a1fef0
commit b0b16a2693
5 changed files with 17 additions and 8 deletions
+2 -2
View File
@@ -20,8 +20,8 @@ use codex_app_server_protocol::FsWriteFileResponse;
use codex_app_server_protocol::JSONRPCErrorError;
use codex_exec_server::CopyOptions;
use codex_exec_server::CreateDirectoryOptions;
use codex_exec_server::Environment;
use codex_exec_server::ExecutorFileSystem;
use codex_exec_server::LocalFileSystem;
use codex_exec_server::RemoveOptions;
use std::io;
use std::sync::Arc;
@@ -34,7 +34,7 @@ pub(crate) struct FsApi {
impl Default for FsApi {
fn default() -> Self {
Self {
file_system: Arc::new(LocalFileSystem),
file_system: Arc::new(Environment::default().get_filesystem()),
}
}
}
+9
View File
@@ -19,6 +19,15 @@ pub struct Environment {
executor: Arc<dyn ExecProcess>,
}
impl Default for Environment {
fn default() -> Self {
Self {
experimental_exec_server_url: None,
executor: Arc::new(LocalProcess::default()),
}
}
}
impl std::fmt::Debug for Environment {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("Environment")
@@ -36,7 +36,7 @@ pub(crate) struct ExecServerFileSystem {
impl Default for ExecServerFileSystem {
fn default() -> Self {
Self {
file_system: Arc::new(Environment.get_filesystem()),
file_system: Arc::new(Environment::default().get_filesystem()),
}
}
}
+3 -3
View File
@@ -25,17 +25,17 @@ use crate::protocol::WriteParams;
use crate::protocol::WriteResponse;
use crate::rpc::RpcNotificationSender;
use crate::server::filesystem::ExecServerFileSystem;
use crate::server::process_handler::ProcessHandler;
use crate::server::process_handler::ExecServerProcess;
pub(crate) struct ExecServerHandler {
process: ProcessHandler,
process: ExecServerProcess,
file_system: ExecServerFileSystem,
}
impl ExecServerHandler {
pub(crate) fn new(notifications: RpcNotificationSender) -> Self {
Self {
process: ProcessHandler::new(notifications),
process: ExecServerProcess::new(notifications),
file_system: ExecServerFileSystem::default(),
}
}
@@ -13,11 +13,11 @@ use crate::protocol::WriteResponse;
use crate::rpc::RpcNotificationSender;
#[derive(Clone)]
pub(crate) struct ProcessHandler {
pub(crate) struct ExecServerProcess {
process: LocalProcess,
}
impl ProcessHandler {
impl ExecServerProcess {
pub(crate) fn new(notifications: RpcNotificationSender) -> Self {
Self {
process: LocalProcess::new(notifications),