mirror of
https://github.com/openai/codex.git
synced 2026-11-17 22:10:37 +00:00
Report selected environment connection transitions (#33251)
## What changed - Track connected and disconnected states across initial remote exec-server connections and reconnection attempts. - Emit experimental `thread/environment/connected` and `thread/environment/disconnected` app-server notifications for each thread selecting the environment. Each payload identifies the thread and environment; current state is not replayed when a thread starts. - Stop forwarding connection events when an environment selection is removed or replaced. ## Testing - Cover connection, disconnection, reconnection, shared-environment notifications, and replacement of a selected environment. GitOrigin-RevId: 5dd767372363c4a2a8319fc16164be117d5bd20c
This commit is contained in:
@@ -1268,6 +1268,11 @@ pub struct Event {
|
||||
pub msg: EventMsg,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq, JsonSchema, TS)]
|
||||
pub struct EnvironmentConnectionEvent {
|
||||
pub environment_id: String,
|
||||
}
|
||||
|
||||
/// Response event from the agent
|
||||
/// NOTE: Make sure none of these values have optional types, as it will mess up the extension code-gen.
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, Display, JsonSchema, TS)]
|
||||
@@ -1351,6 +1356,12 @@ pub enum EventMsg {
|
||||
/// Ack the client's configure message.
|
||||
SessionConfigured(SessionConfiguredEvent),
|
||||
|
||||
/// A selected environment completed its connection handshake.
|
||||
EnvironmentConnected(EnvironmentConnectionEvent),
|
||||
|
||||
/// A selected environment lost its established connection.
|
||||
EnvironmentDisconnected(EnvironmentConnectionEvent),
|
||||
|
||||
/// Updated long-running goal metadata for the thread.
|
||||
ThreadGoalUpdated(ThreadGoalUpdatedEvent),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user