pub struct AgentRunOverrides {
pub security: Option<Arc<SecurityPolicy>>,
pub memory: Option<Arc<dyn Memory>>,
pub is_subagent: bool,
}Expand description
Optional per-call overrides for run.
SubAgent spawn paths use this to inject the validated child policy
returned from SecurityPolicy::ensure_no_escalation_beyond (and,
once v0.8.1 plumbs caller-supplied allowlist narrowing, the
validated agent-scoped memory wrapper). Without this hook the run
path rebuilds both surfaces from config, so the validator’s
guarantees never reach the agent loop. None on either field
preserves the from-config behavior — the same shape as a fresh
interactive launch.
Fields§
§security: Option<Arc<SecurityPolicy>>§memory: Option<Arc<dyn Memory>>§is_subagent: booltrue when the run is a SubAgent invocation. SubAgents must not
spawn further subagents (depth-1 cap). The agent loop reads this
when constructing the spawn_subagent tool so the depth-cap
refusal fires at the tool, not after a child run is already
underway. Default false keeps top-level / cron-launched /
CLI-launched agents at depth 0.
Trait Implementations§
Source§impl Default for AgentRunOverrides
impl Default for AgentRunOverrides
Source§fn default() -> AgentRunOverrides
fn default() -> AgentRunOverrides
Auto Trait Implementations§
impl Freeze for AgentRunOverrides
impl !RefUnwindSafe for AgentRunOverrides
impl Send for AgentRunOverrides
impl Sync for AgentRunOverrides
impl Unpin for AgentRunOverrides
impl UnsafeUnpin for AgentRunOverrides
impl !UnwindSafe for AgentRunOverrides
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more