mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
Cache executor metadata from initialization (#40343)
## What changed - Include `environmentInfo` in the exec-server `initialize` response and seed the Rust client's metadata cache from it. - Fall back to one lazy `environment/info` request when connecting to older servers that omit initialization metadata, then share the cached result across client clones and session recovery. - Keep app-server `environment/info` requests uncached so they continue to probe the executor. ## Testing - Cover initialization metadata, the legacy-server fallback, shared caching, accepted WebSocket environments, and repeated uncached app-server probes. GitOrigin-RevId: 380132d9db183998d73e8c6b0954e4d70c7e8406
This commit is contained in:
@@ -83,6 +83,10 @@ pub struct InitializeParams {
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct InitializeResponse {
|
||||
pub session_id: String,
|
||||
/// Executor metadata at initialization, with the same shape as `environment/info`.
|
||||
// TODO: Make this required once all supported exec-server versions return environmentInfo.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub environment_info: Option<EnvironmentInfo>,
|
||||
}
|
||||
|
||||
/// Information about an execution/filesystem environment.
|
||||
|
||||
Reference in New Issue
Block a user