pub struct GatewayConfig {
pub runtime: RuntimeConfig,
pub connections: ConnectionPolicy,
pub auth: AuthConfig,
pub computer: ComputerConfig,
pub model_transport: ModelTransportSettings,
pub execution: ExecutionConfig,
pub telemetry: TelemetryConfig,
pub listen: SocketAddr,
pub tls: Option<TlsConfig>,
pub cloudflare: Option<CloudflareConfig>,
pub desktop_enabled: bool,
pub bot_defaults: Option<VersionedAgentConfig>,
/* private fields */
}Expand description
Durable machine-wide settings and defaults for one gateway process.
Fields§
§runtime: RuntimeConfigGateway lifecycle and private ingress.
connections: ConnectionPolicyConnection and active-chat resource limits.
auth: AuthConfigOperator-controlled pairing policy.
computer: ComputerConfigComputer runtime and desktop launch options.
model_transport: ModelTransportSettingsModel network and retry policy.
execution: ExecutionConfigHost execution policy independent of Bot permissions.
telemetry: TelemetryConfigExplicit outbound collectors.
listen: SocketAddrThe listen.
tls: Option<TlsConfig>The TLS.
cloudflare: Option<CloudflareConfig>The cloudflare.
desktop_enabled: boolOwn a persistent headed browser and, on Linux, a private virtual desktop.
bot_defaults: Option<VersionedAgentConfig>The bot defaults.
Implementations§
Source§impl GatewayConfig
impl GatewayConfig
Sourcepub fn new(listen: SocketAddr, tls: Option<TlsConfig>) -> Result<Self>
pub fn new(listen: SocketAddr, tls: Option<TlsConfig>) -> Result<Self>
Builds validated machine-wide settings and Bot-creation defaults.
§Errors
Returns an error if configuration is invalid or a required resource cannot be initialized.
Sourcepub fn new_cloudflare(
listen: SocketAddr,
cloudflare: CloudflareConfig,
) -> Result<Self>
pub fn new_cloudflare( listen: SocketAddr, cloudflare: CloudflareConfig, ) -> Result<Self>
Builds a loopback gateway exposed through Cloudflare Tunnel.
§Errors
Returns an error if configuration is invalid or a required resource cannot be initialized.
Sourcepub fn observe_usage(
&mut self,
provider: &str,
usage: &TokenUsage,
) -> Result<bool>
pub fn observe_usage( &mut self, provider: &str, usage: &TokenUsage, ) -> Result<bool>
Records one live token-usage increment and reports whether daily usage changed.
§Errors
Returns an error if validation or an operation required by this function fails.
Sourcepub fn profile(&self) -> ProfileSnapshot
pub fn profile(&self) -> ProfileSnapshot
Returns frontend-safe local identity and daily aggregate usage.