Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/sharer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,15 @@ pub enum Lifetime {
Lingering,
}

/// The reasons the sharer may request extended retention for a shared session.
#[derive(Serialize, Deserialize, Clone, Copy, Debug, Default)]
pub enum SessionRetentionReason {
/// Environment setup failed. The session should remain available so users can inspect setup
/// command output from the shared session link after the sandbox shuts down.
#[default]
SetupFailed,
}

/// The initial state that the sharer must supply when starting
/// a shared session.
#[derive(Debug, Deserialize, Serialize)]
Expand Down Expand Up @@ -499,6 +508,13 @@ pub enum UpstreamMessage {
/// and notify viewers before the websocket closes.
EndSession { reason: SessionEndedReason },

/// The client sends this message to request that the server retain session data longer than
/// normal after sharing ends.
ExtendSessionRetention {
#[serde(default)]
reason: SessionRetentionReason,
},

/// Update to the sharer's active prompt.
UpdateActivePrompt(ActivePromptUpdate),

Expand Down