pub struct SessionBuildOptions {Show 37 fields
pub provider: Option<Provider>,
pub self_hosted_server_id: Option<String>,
pub output_schema: Option<OutputSchema>,
pub structured_output_retries: u32,
pub hooks_override: HookRunOverrides,
pub comms_name: Option<String>,
pub peer_meta: Option<PeerMeta>,
pub resume_session: Option<Session>,
pub budget_limits: Option<BudgetLimits>,
pub provider_params: Option<Value>,
pub external_tools: Option<Arc<dyn AgentToolDispatcher>>,
pub recoverable_tool_defs: Option<Vec<ToolDef>>,
pub blob_store_override: Option<Arc<dyn BlobStore>>,
pub llm_client_override: Option<Arc<dyn Any + Send + Sync>>,
pub override_builtins: ToolCategoryOverride,
pub override_shell: ToolCategoryOverride,
pub override_memory: ToolCategoryOverride,
pub override_schedule: ToolCategoryOverride,
pub override_mob: ToolCategoryOverride,
pub schedule_tools: Option<Arc<dyn AgentToolDispatcher>>,
pub preload_skills: Option<Vec<SkillId>>,
pub realm_id: Option<String>,
pub instance_id: Option<String>,
pub backend: Option<String>,
pub config_generation: Option<u64>,
pub keep_alive: bool,
pub checkpointer: Option<Arc<dyn SessionCheckpointer>>,
pub silent_comms_intents: Vec<String>,
pub max_inline_peer_notifications: Option<i32>,
pub app_context: Option<Value>,
pub additional_instructions: Option<Vec<String>>,
pub shell_env: Option<HashMap<String, String>>,
pub call_timeout_override: CallTimeoutOverride,
pub resume_override_mask: ResumeOverrideMask,
pub mob_tools: Option<Arc<dyn MobToolsFactory>>,
pub runtime_build_mode: RuntimeBuildMode,
pub mob_tool_authority_context: Option<MobToolAuthorityContext>,
}Expand description
Optional build-time options used by factory-backed session builders.
Fields§
§provider: Option<Provider>§self_hosted_server_id: Option<String>§output_schema: Option<OutputSchema>§structured_output_retries: u32§hooks_override: HookRunOverrides§comms_name: Option<String>§peer_meta: Option<PeerMeta>§resume_session: Option<Session>§budget_limits: Option<BudgetLimits>§provider_params: Option<Value>§external_tools: Option<Arc<dyn AgentToolDispatcher>>§recoverable_tool_defs: Option<Vec<ToolDef>>Serializable tool definitions used to reconstruct recoverable surface-owned dispatchers during session resume/rebuild.
blob_store_override: Option<Arc<dyn BlobStore>>Blob store used to externalize durable image content and hydrate refs back to bytes at execution seams.
llm_client_override: Option<Arc<dyn Any + Send + Sync>>Opaque transport for an optional per-request LLM override.
Factory builders may downcast this to their concrete client trait.
override_builtins: ToolCategoryOverride§override_shell: ToolCategoryOverride§override_memory: ToolCategoryOverride§override_schedule: ToolCategoryOverridePer-build override for the factory-level scheduler capability.
override_mob: ToolCategoryOverride§schedule_tools: Option<Arc<dyn AgentToolDispatcher>>Agent-facing scheduler tools supplied by the embedding surface.
Scheduler remains surface-owned. This dispatcher only controls tool visibility/composition for the built agent.
preload_skills: Option<Vec<SkillId>>§realm_id: Option<String>§instance_id: Option<String>§backend: Option<String>§config_generation: Option<u64>§keep_alive: boolWhether this session runs as a keep-alive (long-running, interrupt-to-stop) agent. Surfaces use this to decide blocking vs fire-and-return semantics.
checkpointer: Option<Arc<dyn SessionCheckpointer>>Optional session checkpointer for keep-alive persistence.
silent_comms_intents: Vec<String>Comms intents that should be silently injected into the session without triggering an LLM turn.
max_inline_peer_notifications: Option<i32>Maximum peer-count threshold for inline peer lifecycle context injection.
None: use runtime default0: never inline peer lifecycle notifications-1: always inline peer lifecycle notifications>0: inline only when post-drain peer count is <= threshold<-1: invalid
app_context: Option<Value>Opaque application context passed through to custom SessionAgentBuilder
implementations. Not consumed by the standard build pipeline.
Uses Value rather than Box<RawValue> because SessionBuildOptions
must be Clone and Box<RawValue> does not implement Clone.
Same tradeoff as provider_params.
additional_instructions: Option<Vec<String>>Additional instruction sections appended to the system prompt after skill assembly, before tool instructions. Order preserved.
shell_env: Option<HashMap<String, String>>Environment variables injected into shell tool subprocesses for this agent.
Set by the application’s SessionAgentBuilder — never by the LLM.
Values are not included in the agent’s context window.
call_timeout_override: CallTimeoutOverrideExplicit call-timeout override at the build seam.
Inherit(default): defer to config override, then profile defaultDisabled: explicitly disable call timeout regardless of profileValue(d): explicitly set call timeout tod
resume_override_mask: ResumeOverrideMaskTyped explicit-override intent for resumed-session merges.
Surfaces set bits only for fields they can prove were explicitly supplied by the caller. Resumed metadata then fills only the non-explicit fields.
mob_tools: Option<Arc<dyn MobToolsFactory>>Late-binding mob tool factory, called inside build_agent() with
session-scoped args to produce the mob tool dispatcher.
Surfaces that enable mob tools pass an Arc<dyn MobToolsFactory> here.
The factory calls MobToolsFactory::build_mob_tools during agent
construction with the session ID, ops lifecycle registry, and optional
comms runtime — then composes the result into the tool gateway.
runtime_build_mode: RuntimeBuildModeRuntime build mode — determines how the factory resolves the ops lifecycle registry and completion feed.
SessionOwned(bindings): runtime-backed build with epoch-owned bindings. Factory validatesbindings.session_id == session.id().StandaloneEphemeral: factory creates local-only ephemeral bindings. Suitable for WASM, tests, embedded, and standalone surfaces.
Runtime-injected mob operator authority context.
This is the only source of mob operator tool authority. Tool visibility may depend on this context being present, but dispatch-time authorization must still re-check the typed create/scope fields on every operator call.
Implementations§
Source§impl SessionBuildOptions
impl SessionBuildOptions
Sourcepub fn apply_persisted_mob_operator_access(
&mut self,
enable_mob: ToolCategoryOverride,
persisted_authority_context: Option<MobToolAuthorityContext>,
)
pub fn apply_persisted_mob_operator_access( &mut self, enable_mob: ToolCategoryOverride, persisted_authority_context: Option<MobToolAuthorityContext>, )
Apply the shared rehydration rule for mob operator access.
This preserves exact persisted authority when available and otherwise falls back to generated create-only authority for explicit mob enablement.
Sourcepub fn apply_generated_create_only_mob_operator_access(
&mut self,
enable_mob: ToolCategoryOverride,
)
pub fn apply_generated_create_only_mob_operator_access( &mut self, enable_mob: ToolCategoryOverride, )
Apply the shared host/runtime default for explicit mob operator enablement.
This keeps override_mob and the generated create-only authority
context aligned at the composition seam. Existing-mob scope must be
injected explicitly elsewhere; this helper never infers it.
Trait Implementations§
Source§impl Clone for SessionBuildOptions
impl Clone for SessionBuildOptions
Source§fn clone(&self) -> SessionBuildOptions
fn clone(&self) -> SessionBuildOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more