pub struct TierPolicy {
pub hot_timeout: Duration,
pub warm_timeout: Duration,
pub cold_timeout: Duration,
pub hot_max_output: usize,
pub warm_max_output: usize,
pub cold_max_output: usize,
}Expand description
Per-tier budgets used when constructing CallContext for a tool call.
Warm defaults match the pre-SP-12 server config (1 MiB / 60 s) to keep
the 9 existing tools’ behavior unchanged.
Fields§
§hot_timeout: Duration§warm_timeout: Duration§cold_timeout: Duration§hot_max_output: usize§warm_max_output: usize§cold_max_output: usizeImplementations§
Source§impl TierPolicy
impl TierPolicy
Sourcepub fn defaults() -> Self
pub fn defaults() -> Self
Canonical defaults:
- Hot: 500 ms / 64 KiB — latency-critical tools (sensors, cached state).
- Warm: 5 s / 1 MiB — typical tool invocations (current server default).
- Cold: 60 s / 16 MiB — long-running / large-output tools.
pub fn timeout(&self, tier: ToolTier) -> Duration
pub fn max_output(&self, tier: ToolTier) -> usize
Trait Implementations§
Source§impl Clone for TierPolicy
impl Clone for TierPolicy
Source§fn clone(&self) -> TierPolicy
fn clone(&self) -> TierPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TierPolicy
impl Debug for TierPolicy
Auto Trait Implementations§
impl Freeze for TierPolicy
impl RefUnwindSafe for TierPolicy
impl Send for TierPolicy
impl Sync for TierPolicy
impl Unpin for TierPolicy
impl UnsafeUnpin for TierPolicy
impl UnwindSafe for TierPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more