Skip to main content

Session

Struct Session 

Source
pub struct Session {
Show 48 fields pub session_id: String, pub title: String, pub chat_id: String, pub root_message_id: String, pub chat_type: Option<String>, pub quote_target_id: Option<String>, pub scope: SessionScope, pub status: SessionStatus, pub created_at: DateTime<Utc>, pub closed_at: Option<DateTime<Utc>>, pub working_dir: Option<String>, pub lark_app_id: String, pub owner_open_id: Option<String>, pub quote_target_sender_open_id: Option<String>, pub worker_pid: Option<u32>, pub cli_id: Option<String>, pub cli_bin: Option<String>, pub cli_args: Vec<String>, pub cli_session_id: Option<String>, pub last_cli_input: Option<String>, pub stream_card_id: Option<String>, pub stream_card_nonce: Option<String>, pub display_mode: Option<DisplayMode>, pub current_screen: Option<String>, pub last_screen_status: Option<ScreenStatus>, pub usage_limit: Option<CliUsageLimitState>, pub current_image_key: Option<String>, pub tui_prompt_card_id: Option<String>, pub tui_prompt_options: Vec<TuiPromptOption>, pub tui_prompt_multi_select: Option<bool>, pub tui_toggled_indices: Vec<usize>, pub pending_response_card_id: Option<String>, pub pending_response_card_state: Option<PendingResponseCardState>, pub last_patched_response_card_id: Option<String>, pub terminal_url: Option<String>, pub last_final_output_turn_id: Option<String>, pub last_final_output: Option<String>, pub last_explicit_send_at: Option<DateTime<Utc>>, pub adopted_from: Option<AdoptedFrom>, pub model: Option<String>, pub locale: Option<String>, pub bot_name: Option<String>, pub bot_open_id: Option<String>, pub resume_session_id: Option<String>, pub disable_cli_bypass: bool, pub initial_prompt: Option<String>, pub thread_id: Option<String>, pub agent_attention: Option<AgentAttention>,
}

Fields§

§session_id: String§title: String§chat_id: String§root_message_id: String§chat_type: Option<String>§quote_target_id: Option<String>§scope: SessionScope§status: SessionStatus§created_at: DateTime<Utc>§closed_at: Option<DateTime<Utc>>§working_dir: Option<String>§lark_app_id: String§owner_open_id: Option<String>§quote_target_sender_open_id: Option<String>

Sender open_id of the trigger/quote message for the current turn. Aligns with botmux quoteTargetSenderOpenId. May differ from owner_open_id in multi-user group chats where a non-owner triggers a follow-up turn.

§worker_pid: Option<u32>§cli_id: Option<String>§cli_bin: Option<String>§cli_args: Vec<String>§cli_session_id: Option<String>§last_cli_input: Option<String>§stream_card_id: Option<String>§stream_card_nonce: Option<String>§display_mode: Option<DisplayMode>§current_screen: Option<String>§last_screen_status: Option<ScreenStatus>§usage_limit: Option<CliUsageLimitState>§current_image_key: Option<String>§tui_prompt_card_id: Option<String>§tui_prompt_options: Vec<TuiPromptOption>§tui_prompt_multi_select: Option<bool>§tui_toggled_indices: Vec<usize>§pending_response_card_id: Option<String>§pending_response_card_state: Option<PendingResponseCardState>§last_patched_response_card_id: Option<String>§terminal_url: Option<String>§last_final_output_turn_id: Option<String>§last_final_output: Option<String>§last_explicit_send_at: Option<DateTime<Utc>>

Timestamp of the most recent explicit beam send (structured final output). Set by handle_final_output_request; NOT set by worker bridge delivery. Used by should_skip_worker_final_output to suppress duplicate worker output when the model already sent the same content via explicit send. Minimal botmux-equivalent: botmux records turn-sends markers; Beam only needs a single timestamp for the 10-minute dedupe window.

§adopted_from: Option<AdoptedFrom>§model: Option<String>§locale: Option<String>§bot_name: Option<String>§bot_open_id: Option<String>§resume_session_id: Option<String>§disable_cli_bypass: bool§initial_prompt: Option<String>§thread_id: Option<String>

Feishu thread_id (omt_*), stable topic identifier. Present for topic-group messages and p2p thread follow-ups that carry thread metadata. Used as the session-matching anchor for Thread-scoped sessions. For p2p, thread_id may be backfilled from a follow-up message after the initial session is created (first p2p session starts with thread_id=None and matches follow-ups via root_message_id).

§agent_attention: Option<AgentAttention>

Agent attention state set via --attention flag. Cleared on next user inbound message.

Trait Implementations§

Source§

impl Clone for Session

Source§

fn clone(&self) -> Session

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Session

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Session

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for Session

Source§

impl From<&Session> for SessionSummary

Source§

fn from(value: &Session) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Session

Source§

fn eq(&self, other: &Session) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Session

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Session

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.