mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
Expose environment status through app-server (#32920)
## What changed - Add the experimental `environment/status` request for inspecting a configured environment without starting or reconnecting it. - Report `ready`, `pending`, `disconnected`, or `unknown`, including error details for disconnected and unknown environments. - Probe ready remote environments over their existing exec-server connection. ## Testing - Add an app-server integration test covering local and remote ready, pending, disconnected, and unknown environments. GitOrigin-RevId: 397bba603aa9e0b59008ee6cb7cbde46e357652c
This commit is contained in:
committed by
copyberry
parent
80c6cd3014
commit
f96cf4d1c3
@@ -297,19 +297,6 @@ impl EnvironmentManager {
|
||||
environment_ids
|
||||
}
|
||||
|
||||
/// Returns every configured environment id in deterministic order.
|
||||
pub fn environment_ids(&self) -> Vec<String> {
|
||||
let mut environment_ids = self
|
||||
.environments
|
||||
.read()
|
||||
.unwrap_or_else(std::sync::PoisonError::into_inner)
|
||||
.keys()
|
||||
.cloned()
|
||||
.collect::<Vec<_>>();
|
||||
environment_ids.sort_unstable();
|
||||
environment_ids
|
||||
}
|
||||
|
||||
/// Returns the local environment instance when one is configured.
|
||||
pub fn try_local_environment(&self) -> Option<Arc<Environment>> {
|
||||
self.local_environment.as_ref().map(Arc::clone)
|
||||
|
||||
Reference in New Issue
Block a user