pub struct ResourceQuota {
pub max_concurrent_subagents: Option<u32>,
pub max_total_subagents: Option<u32>,
pub max_spawn_depth: Option<u32>,
pub memory_writes_per_window: Option<(u32, u64)>,
pub max_workflow_nodes: Option<usize>,
}Expand description
Opt-in resource limits. An unset field imposes no limit; an unset ResourceQuota (the default,
when [crate::scheduler::state_machine::LoopStateMachine::set_resource_quota] is never called)
preserves the pre-M2 behavior of unconditional Allow for spawn / memory syscalls.
Fields§
§max_concurrent_subagents: Option<u32>Max sub-agents in the Running state at once. Further Spawns are denied while at cap.
Instantaneous — vehicle-scoped (cannot span stateless replicas; spec §2.5).
max_total_subagents: Option<u32>L1 (RunGroup): max sub-agents spawned cumulatively over the whole governance domain. Unlike
max_concurrent_subagents this counts every spawn ever (running + completed), seeded across
members via group_spawns_base, so it spans N stateless top-level runs. A hard Deny at cap
(a completed sibling never frees a cumulative slot).
max_spawn_depth: Option<u32>Max sub-agent nesting depth (direct children of the root loop are depth 1).
memory_writes_per_window: Option<(u32, u64)>Rolling-window memory-write rate limit as (max_writes, window_ms): at most max_writes
successful WriteMemory syscalls may occur within any window_ms span.
max_workflow_nodes: Option<usize>R3-1: max total nodes a single workflow DAG may grow to via runtime SubmitNodes. Once the
DAG (existing + submitted) would exceed this, the submission is denied — a backstop against an
unbounded loop-until-done. None = no cap.
Trait Implementations§
Source§impl Clone for ResourceQuota
impl Clone for ResourceQuota
Source§fn clone(&self) -> ResourceQuota
fn clone(&self) -> ResourceQuota
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more