[5/6] Wire executor-backed MCP stdio (#18212)

## Summary
- Add the executor-backed RMCP stdio transport.
- Wire MCP stdio placement through the executor environment config.
- Cover local and executor-backed stdio paths with the existing MCP test
helpers.

## Stack
```text
o  #18027 [6/6] Fail exec client operations after disconnect
│
@  #18212 [5/6] Wire executor-backed MCP stdio
│
o  #18087 [4/6] Abstract MCP stdio server launching
│
o  #18020 [3/6] Add pushed exec process events
│
o  #18086 [2/6] Support piped stdin in exec process API
│
o  #18085 [1/6] Add MCP server environment config
│
o  main
```

---------

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Ahmed Ibrahim
2026-04-18 21:47:43 -07:00
committed by GitHub
parent e3f44ca3b3
commit 996aa23e4c
31 changed files with 1815 additions and 76 deletions

View File

@@ -1,6 +1,9 @@
use std::collections::HashMap;
pub fn format_env_display(env: Option<&HashMap<String, String>>, env_vars: &[String]) -> String {
pub fn format_env_display<S: AsRef<str>>(
env: Option<&HashMap<String, String>>,
env_vars: &[S],
) -> String {
let mut parts: Vec<String> = Vec::new();
if let Some(map) = env {
@@ -10,7 +13,7 @@ pub fn format_env_display(env: Option<&HashMap<String, String>>, env_vars: &[Str
}
if !env_vars.is_empty() {
parts.extend(env_vars.iter().map(|var| format!("{var}=*****")));
parts.extend(env_vars.iter().map(|var| format!("{}=*****", var.as_ref())));
}
if parts.is_empty() {
@@ -26,10 +29,11 @@ mod tests {
#[test]
fn returns_dash_when_empty() {
assert_eq!(format_env_display(/*env*/ None, &[]), "-");
let empty_vars: &[String] = &[];
assert_eq!(format_env_display(/*env*/ None, empty_vars), "-");
let empty_map = HashMap::new();
assert_eq!(format_env_display(Some(&empty_map), &[]), "-");
assert_eq!(format_env_display(Some(&empty_map), empty_vars), "-");
}
#[test]
@@ -38,7 +42,10 @@ mod tests {
env.insert("B".to_string(), "two".to_string());
env.insert("A".to_string(), "one".to_string());
assert_eq!(format_env_display(Some(&env), &[]), "A=*****, B=*****");
assert_eq!(
format_env_display(Some(&env), &[] as &[String]),
"A=*****, B=*****"
);
}
#[test]