mirror of
https://github.com/openai/codex.git
synced 2026-12-06 01:10:58 +00:00
Require a local runtime for MCP HTTP headers helpers (#65119)
## Why MCP servers can use the host's HTTP client without a local runtime. That fallback also let locally configured `http_headers_helper` commands run on the host when only remote executors were attached. ## What changed Reject locally configured HTTP headers helpers unless the host has a local runtime. A host that retains its startup runtime can still run helpers when it exposes only remote executors. HTTP servers without a headers helper can still use the host's HTTP client. ## Testing Cover helper rejection with no executors and with both laptop and cloud executors attached. Verify that the helper command leaves no marker file, local stdio startup still fails, and plain HTTP still works. Cover helper client resolution when a local runtime is available, including when only remote executors are exposed. GitOrigin-RevId: 0aff6cc1f9f6122aace54ed4c19ef93e26817c64
This commit is contained in:
@@ -409,6 +409,12 @@ impl EnvironmentManager {
|
||||
self.local_environment.as_ref().map(Arc::clone)
|
||||
}
|
||||
|
||||
/// Whether the host configured a local runtime at startup. A local app can
|
||||
/// retain this runtime even when it exposes only remote executors.
|
||||
pub fn has_local_runtime(&self) -> bool {
|
||||
self.local_environment.is_some() || self.local_runtime_paths.is_some()
|
||||
}
|
||||
|
||||
/// Returns a named environment instance.
|
||||
pub fn get_environment(&self, environment_id: &str) -> Option<Arc<Environment>> {
|
||||
self.environments
|
||||
|
||||
Reference in New Issue
Block a user