Skip to main content

RuntimeOptions

Struct RuntimeOptions 

Source
pub struct RuntimeOptions {
Show 35 fields pub provider: Box<dyn LLMProvider>, pub execution_plane: Option<Box<dyn ExecutionPlane>>, pub session_log: Option<Arc<dyn SessionLog>>, pub compression_store: Option<Arc<dyn ArchiveStore>>, pub session_id: Option<String>, pub max_tokens: u32, pub max_turns: Option<u32>, pub timeout_ms: Option<u64>, pub extensions: Option<Value>, pub agent_id: Option<String>, pub pre_query_memory: Option<Arc<dyn Fn(&str) -> Vec<String> + Send + Sync>>, pub system_prompt: Option<String>, pub initial_memory: Vec<String>, pub skill_dir: Option<PathBuf>, pub dream_store: Option<Box<dyn DreamStore>>, pub knowledge_source: Option<Box<dyn KnowledgeSource>>, pub signal_source: Option<Box<dyn SignalSource>>, pub governance: Option<Arc<Mutex<Governance>>>, pub os_profile: Option<OsProfile>, pub governance_policy: Option<GovernancePolicy>, pub attention_policy: Option<AttentionPolicy>, pub scheduler_budget: Option<SchedulerBudget>, pub resource_quota: Option<ResourceQuota>, pub memory_policy: Option<MemoryPolicy>, pub tokenizer: Option<String>, pub enable_plan_tool: Option<bool>, pub on_tool_suspend: Option<ToolSuspendHandler>, pub on_permission_request: Option<PermissionRequestHandler>, pub milestone_policy: MilestonePolicy, pub milestone_contract: Option<MilestoneContract>, pub run_spec: Option<AgentRunSpec>, pub allowed_tool_ids: Option<Vec<String>>, pub on_turn_metrics: Option<OnTurnMetricsHandler>, pub stable_core_tool_ids: Vec<String>, pub on_milestone_evaluate: Option<MilestoneEvaluationHandler>,
}
Expand description

Configuration for a RuntimeRunner (aligned with Node/Python RuntimeOptions).

Fields§

§provider: Box<dyn LLMProvider>§execution_plane: Option<Box<dyn ExecutionPlane>>§session_log: Option<Arc<dyn SessionLog>>§compression_store: Option<Arc<dyn ArchiveStore>>§session_id: Option<String>

When set, execute reuses this session id.

§max_tokens: u32§max_turns: Option<u32>§timeout_ms: Option<u64>§extensions: Option<Value>§agent_id: Option<String>§pre_query_memory: Option<Arc<dyn Fn(&str) -> Vec<String> + Send + Sync>>

I4: optional run-start memory pre-fetch hook. The runner calls this once per run, before the first LLM turn, with the goal string; each returned query becomes a dream_store.search and the resulting hits page into the knowledge partition before turn 1. Mirrors the Node SDK preQueryMemory. Sync-only in Rust today — async hosts can pre-compute. Errs-open when dream_store or agent_id is missing.

§system_prompt: Option<String>§initial_memory: Vec<String>§skill_dir: Option<PathBuf>§dream_store: Option<Box<dyn DreamStore>>§knowledge_source: Option<Box<dyn KnowledgeSource>>§signal_source: Option<Box<dyn SignalSource>>§governance: Option<Arc<Mutex<Governance>>>§os_profile: Option<OsProfile>§governance_policy: Option<GovernancePolicy>§attention_policy: Option<AttentionPolicy>§scheduler_budget: Option<SchedulerBudget>§resource_quota: Option<ResourceQuota>§memory_policy: Option<MemoryPolicy>

Opt-in long-term memory policy (set_memory_policy), enforced at the kernel memory traps.

§tokenizer: Option<String>§enable_plan_tool: Option<bool>§on_tool_suspend: Option<ToolSuspendHandler>§on_permission_request: Option<PermissionRequestHandler>§milestone_policy: MilestonePolicy

How to handle EvaluateMilestone actions. Default: RequireVerifier.

§milestone_contract: Option<MilestoneContract>§run_spec: Option<AgentRunSpec>§allowed_tool_ids: Option<Vec<String>>

P0-A tool gating: a static per-run tool profile — only these tool ids (plus the skill/memory/knowledge/update_plan meta-tools) are exposed to the model each turn. Lowers to the same capability_filter sub-agents use; byte-stable across the run, so it never busts the prompt-cache prefix. Augments run_spec’s filter when both are set; synthesizes a minimal top-level spec otherwise. None/empty ⇒ no gating (no config = old).

§on_turn_metrics: Option<OnTurnMetricsHandler>

P0-C: optional per-turn metrics sink for tool-gating telemetry (see TurnMetrics). Pure observation; invoked once per LLM turn. Panics are not caught — keep the sink trivial.

§stable_core_tool_ids: Vec<String>

P1-B/D stable-core: tool ids always exposed under skill gating. Empty ⇒ skills narrow to exactly their declared tools + meta-tools. Opt-in: no skill declaring tools ⇒ never engages.

§on_milestone_evaluate: Option<MilestoneEvaluationHandler>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more