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:
Adam Perry @ OpenAI
2026-07-14 01:49:16 +00:00
committed by copyberry
parent 80c6cd3014
commit f96cf4d1c3
10 changed files with 301 additions and 13 deletions
-13
View File
@@ -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)