pub struct ReadyPayload {Show 18 fields
pub gateway_version: String,
pub machine_name: String,
pub computer_view: ComputerView,
pub bots: Vec<BotRecord>,
pub sessions: Vec<SessionRecord>,
pub background_approvals: Vec<BackgroundApproval>,
pub providers: Vec<ProviderStatus>,
pub provider_instances: Vec<ProviderInstance>,
pub bot_defaults: Option<VersionedAgentConfig>,
pub models: Vec<ModelChoice>,
pub model_providers: BTreeMap<String, String>,
pub middleware_features: Vec<MiddlewareFeature>,
pub extensions: Vec<ExtensionRecord>,
pub contributions: Vec<FrontendContribution>,
pub max_active_sessions: usize,
pub session_file_limits: SessionFileLimits,
pub revisions: BTreeMap<ReadySection, String>,
pub omitted: BTreeSet<ReadySection>,
}Expand description
Gateway-wide frontend-safe state sent after authentication.
Fields§
§gateway_version: StringRelease version of the connected gateway process.
machine_name: StringThe machine name.
computer_view: ComputerViewThe interactive computer view available to this connection.
bots: Vec<BotRecord>The bots.
sessions: Vec<SessionRecord>The sessions.
background_approvals: Vec<BackgroundApproval>The background approvals.
providers: Vec<ProviderStatus>The providers.
provider_instances: Vec<ProviderInstance>The provider instances.
bot_defaults: Option<VersionedAgentConfig>The bot defaults.
models: Vec<ModelChoice>The models.
model_providers: BTreeMap<String, String>The model providers.
middleware_features: Vec<MiddlewareFeature>The middleware features.
extensions: Vec<ExtensionRecord>The extensions.
contributions: Vec<FrontendContribution>The contributions.
max_active_sessions: usizeThe max active sessions.
session_file_limits: SessionFileLimitsThe session file limits.
revisions: BTreeMap<ReadySection, String>Content revision of each cacheable section.
omitted: BTreeSet<ReadySection>Sections sent empty because the client holds them at these revisions or skips them.
Implementations§
Source§impl ReadyPayload
impl ReadyPayload
Sourcepub fn swap_section(&mut self, other: &mut Self, section: ReadySection)
pub fn swap_section(&mut self, other: &mut Self, section: ReadySection)
Exchanges one cacheable section with other.
Sourcepub fn restore_omitted(&mut self, held: &mut Self)
pub fn restore_omitted(&mut self, held: &mut Self)
Moves the sections the gateway omitted back in from the catalog the client holds.
Sourcepub fn update(&mut self, next: Self)
pub fn update(&mut self, next: Self)
Replaces this held catalog with a newer Ready, keeping the sections it omitted.
Sourcepub fn revision(&self, section: ReadySection) -> String
pub fn revision(&self, section: ReadySection) -> String
Content revision of one section, comparable across connections to one gateway build.