pub struct SingleSessionBuilder { /* private fields */ }Expand description
High-level builder for seeding one harness, one agent, and one session.
This is the compact path used by embedders that want a runnable runtime without constructing each core model separately.
Implementations§
Source§impl SingleSessionBuilder
impl SingleSessionBuilder
Sourcepub fn harness(
self,
name: impl Into<String>,
system_prompt: impl Into<String>,
) -> Self
pub fn harness( self, name: impl Into<String>, system_prompt: impl Into<String>, ) -> Self
Configure the seeded harness. Mutates the existing HarnessBuilder
in place so previously configured fields (e.g. network_access) are
preserved regardless of call order.
Sourcepub fn agent(
self,
name: impl Into<String>,
system_prompt: impl Into<String>,
) -> Self
pub fn agent( self, name: impl Into<String>, system_prompt: impl Into<String>, ) -> Self
Configure the seeded agent. Mutates the existing AgentBuilder in
place so previously configured fields (e.g. network_access) are
preserved regardless of call order.
Sourcepub fn with_capability(
self,
capability: impl Into<AgentCapabilityConfig>,
) -> Self
pub fn with_capability( self, capability: impl Into<AgentCapabilityConfig>, ) -> Self
Add a harness-level capability.
Sourcepub fn harness_capability(
self,
capability: impl Into<AgentCapabilityConfig>,
) -> Self
pub fn harness_capability( self, capability: impl Into<AgentCapabilityConfig>, ) -> Self
Add a harness-level capability.
Sourcepub fn agent_capability(
self,
capability: impl Into<AgentCapabilityConfig>,
) -> Self
pub fn agent_capability( self, capability: impl Into<AgentCapabilityConfig>, ) -> Self
Add an agent-level capability.
Sourcepub fn session_capability(
self,
capability: impl Into<AgentCapabilityConfig>,
) -> Self
pub fn session_capability( self, capability: impl Into<AgentCapabilityConfig>, ) -> Self
Add a session-level capability.
Sourcepub fn session_mcp_servers(self, mcp_servers: ScopedMcpServers) -> Self
pub fn session_mcp_servers(self, mcp_servers: ScopedMcpServers) -> Self
Configure session-scoped MCP servers (specs/runtime-mcp.md). Discovered and executed by the runtime alongside built-in tools.
pub fn harness_display_name(self, display_name: impl Into<String>) -> Self
pub fn agent_display_name(self, display_name: impl Into<String>) -> Self
pub fn harness_description(self, description: impl Into<String>) -> Self
pub fn agent_description(self, description: impl Into<String>) -> Self
pub fn session_title(self, title: impl Into<String>) -> Self
pub fn locale(self, locale: impl Into<String>) -> Self
pub fn tag(self, tag: impl Into<String>) -> Self
pub fn session_model_id(self, model_id: ModelId) -> Self
pub fn harness_default_model_id(self, model_id: ModelId) -> Self
pub fn agent_default_model_id(self, model_id: ModelId) -> Self
pub fn agent_max_iterations(self, max_iterations: usize) -> Self
pub fn session_max_iterations(self, max_iterations: usize) -> Self
pub fn agent_tool(self, tool: ToolDefinition) -> Self
pub fn session_tool(self, tool: ToolDefinition) -> Self
pub fn harness_initial_file(self, file: InitialFile) -> Self
pub fn agent_initial_file(self, file: InitialFile) -> Self
pub fn session_initial_file(self, file: InitialFile) -> Self
pub fn harness_network_access(self, network_access: NetworkAccessList) -> Self
pub fn agent_network_access(self, network_access: NetworkAccessList) -> Self
pub fn session_network_access(self, network_access: NetworkAccessList) -> Self
pub fn harness_id(&self) -> HarnessId
pub fn agent_id(&self) -> AgentId
Sourcepub fn session_id(self, id: SessionId) -> Self
pub fn session_id(self, id: SessionId) -> Self
Pin the seeded session’s id. When unset, the underlying
SessionBuilder generates a fresh SessionId at build time.
Useful for embedders that need the id ahead of build — e.g. the
examples/coding-cli JSONL session log uses <id>.jsonl as the
filename and must open the file before the runtime exists.
Trait Implementations§
Source§impl Clone for SingleSessionBuilder
impl Clone for SingleSessionBuilder
Source§fn clone(&self) -> SingleSessionBuilder
fn clone(&self) -> SingleSessionBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SingleSessionBuilder
impl Debug for SingleSessionBuilder
Auto Trait Implementations§
impl Freeze for SingleSessionBuilder
impl RefUnwindSafe for SingleSessionBuilder
impl Send for SingleSessionBuilder
impl Sync for SingleSessionBuilder
impl Unpin for SingleSessionBuilder
impl UnsafeUnpin for SingleSessionBuilder
impl UnwindSafe for SingleSessionBuilder
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request