use codex_utils_path_uri::PathUri; use schemars::JsonSchema; use serde::Deserialize; use serde::Serialize; use ts_rs::TS; #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] pub struct EnvironmentAddParams { pub environment_id: String, pub exec_server_url: String, /// Optional WebSocket connection timeout. The server default applies when omitted. #[ts(type = "number | null")] #[ts(optional = nullable)] pub connect_timeout_ms: Option, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] pub struct EnvironmentAddResponse {} #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] pub struct EnvironmentInfoParams { pub environment_id: String, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] pub struct EnvironmentInfoResponse { pub shell: EnvironmentShellInfo, /// Default working directory reported by the environment, as a canonical file URI. pub cwd: Option, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] pub struct EnvironmentShellInfo { /// Stable shell name, for example `zsh`, `bash`, `powershell`, `sh`, or `cmd`. pub name: String, /// Target-native shell executable path or command name. pub path: String, }