pub struct RestRouterOptions {
pub enable_text_turn_route: bool,
pub enable_bridge_routes: bool,
pub allow_unsafe_client_options: bool,
pub limits: RestLimits,
}Expand description
REST router behavior knobs.
Default is intentionally non-executing: only health and compatibility are
mounted. Enable the text-turn helper or raw bridge routes explicitly when the
caller mounts the router behind its own authz boundary.
Fields§
§enable_text_turn_route: bool§enable_bridge_routes: bool§allow_unsafe_client_options: bool§limits: RestLimitsImplementations§
Source§impl RestRouterOptions
impl RestRouterOptions
Sourcepub fn text_turn() -> Self
pub fn text_turn() -> Self
Enables the one-shot text-turn helper without raw callable/session routes.
Sourcepub fn trusted_bridge() -> Self
pub fn trusted_bridge() -> Self
Enables the full raw callable bridge for trusted deployments.
Sourcepub fn with_unsafe_client_options(self, allow: bool) -> Self
pub fn with_unsafe_client_options(self, allow: bool) -> Self
Allows request bodies to override the Codex command, extra arguments, and
app-server config. This is intentionally separate from
Self::trusted_bridge: admitting a caller to the bridge is not the same
as allowing that caller to choose host executables or weaken sandboxing.
pub fn with_max_sessions(self, max_sessions: usize) -> Self
pub fn with_max_poll_timeout_ms(self, timeout_ms: u64) -> Self
pub fn with_max_text_turn_duration_ms(self, timeout_ms: u64) -> Self
pub fn with_max_text_turn_output_bytes(self, max_bytes: usize) -> Self
Sourcepub fn with_sse_keep_alive_interval_ms(self, interval_ms: u64) -> Self
pub fn with_sse_keep_alive_interval_ms(self, interval_ms: u64) -> Self
Sets the interval between SSE keep-alive frames on
GET /v1/sessions/{sessionId}/events/stream. See
RestLimits::sse_keep_alive_interval.
Sourcepub fn with_limits(self, limits: RestLimits) -> Self
pub fn with_limits(self, limits: RestLimits) -> Self
Replaces the whole RestLimits set in one call, e.g. with
RestLimits::from_env or RestLimits::try_from_env:
let options = RestRouterOptions::trusted_bridge().with_limits(RestLimits::from_env());Trait Implementations§
Source§impl Clone for RestRouterOptions
impl Clone for RestRouterOptions
Source§fn clone(&self) -> RestRouterOptions
fn clone(&self) -> RestRouterOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more