Standardize shell execution on unified exec (#39772)

## What changed

- Use `exec_command` and `write_stdin` as the shell tool surface.
- Treat legacy `default`, `local`, and `shell_command` model metadata as `unified_exec`.
- Remove obsolete shell-selection configuration and runtime paths while preserving the feature and policy gates for zsh fork execution.

GitOrigin-RevId: d743cbe598630d73052f1fecad680c4cde17977d
This commit is contained in:
jif
2026-08-20 18:19:32 +00:00
committed by copyberry
parent 5bcd7b0fbc
commit bce5f2fcfc
40 changed files with 189 additions and 992 deletions

View File

@@ -297,9 +297,7 @@ pub enum ModelVisibility {
#[serde(rename_all = "snake_case")]
#[strum(serialize_all = "snake_case")]
pub enum ConfigShellToolType {
Default,
Local,
#[serde(alias = "shell_command")]
#[serde(alias = "default", alias = "local", alias = "shell_command")]
UnifiedExec,
Disabled,
}
@@ -888,10 +886,13 @@ mod tests {
#[test]
fn legacy_shell_model_metadata_deserializes_as_unified_exec() {
assert_eq!(
from_str::<ConfigShellToolType>("\"shell_command\"").expect("legacy shell type"),
ConfigShellToolType::UnifiedExec
);
for legacy_shell_type in ["default", "local", "shell_command"] {
assert_eq!(
from_str::<ConfigShellToolType>(&format!("\"{legacy_shell_type}\""))
.expect("legacy shell type"),
ConfigShellToolType::UnifiedExec
);
}
assert_eq!(
to_string(&ConfigShellToolType::UnifiedExec).expect("serialize unified shell type"),
"\"unified_exec\""