Remove legacy turn context environment fields

Switch TurnContext to carry only the selected environment list and explicit-selection marker. Preserve the no-list rollout path by representing the default environment internally with no environment id while keeping multi-environment tool rendering disabled unless explicit selections are present.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
starr-openai
2026-04-21 12:25:04 -07:00
co-authored by Codex
parent 590262b840
commit 841e2f0e85
46 changed files with 602 additions and 357 deletions
+7
View File
@@ -956,6 +956,9 @@ pub struct SearchToolCallParams {
#[derive(Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
pub struct ShellToolCallParams {
pub command: Vec<String>,
#[serde(default, alias = "environmentId")]
#[ts(optional)]
pub environment_id: Option<String>,
pub workdir: Option<String>,
/// This is the maximum time in milliseconds that the command is allowed to run.
@@ -980,6 +983,9 @@ pub struct ShellToolCallParams {
#[derive(Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
pub struct ShellCommandToolCallParams {
pub command: String,
#[serde(default, alias = "environmentId")]
#[ts(optional)]
pub environment_id: Option<String>,
pub workdir: Option<String>,
/// Whether to run the shell with login shell semantics
@@ -2021,6 +2027,7 @@ mod tests {
assert_eq!(
ShellToolCallParams {
command: vec!["ls".to_string(), "-l".to_string()],
environment_id: None,
workdir: Some("/tmp".to_string()),
timeout_ms: Some(1000),
sandbox_permissions: None,