pub struct CreateAgentSessionResult {Show 14 fields
pub model: Option<Model>,
pub thinking_level: ModelThinkingLevel,
pub initial_active_tool_names: Vec<String>,
pub allowed_tool_names: Option<Vec<String>>,
pub excluded_tool_names: Option<Vec<String>>,
pub scoped_models: Vec<ScopedModel>,
pub model_fallback_message: Option<String>,
pub diagnostics: Vec<AgentSessionRuntimeDiagnostic>,
pub cwd: PathBuf,
pub agent_dir: PathBuf,
pub model_runtime: ModelRuntime,
pub resource_loader: DefaultResourceLoader,
pub session_start_event: Option<SessionStartEvent>,
pub extension_runner: Option<Arc<HostExtensionRunner>>,
}Expand description
Result of creating an agent session from services.
The concrete crate::core::agent_session::AgentSession constructor is
owned by a sibling slice. This factory packages the resolved inputs and
fallback message so callers (and later the real constructor) share one
resolution path. When AgentSession::new lands, this result can carry the
live session without changing the resolution contract.
Fields§
§model: Option<Model>Resolved model after restore / initial selection.
thinking_level: ModelThinkingLevelResolved thinking level.
initial_active_tool_names: Vec<String>Initial active tool names after allow/exclude/no_tools resolution.
allowed_tool_names: Option<Vec<String>>Optional allowlist (None = default set).
excluded_tool_names: Option<Vec<String>>Optional denylist.
scoped_models: Vec<ScopedModel>Scoped models for cycling.
model_fallback_message: Option<String>Warning when a saved model could not be restored or no model is available.
diagnostics: Vec<AgentSessionRuntimeDiagnostic>Diagnostics accumulated during session creation (in addition to services).
cwd: PathBufWorking directory bound into the session.
agent_dir: PathBufAgent directory bound into the session.
model_runtime: ModelRuntimeShared model runtime.
resource_loader: DefaultResourceLoaderResource loader retained for extension-driven reloads.
session_start_event: Option<SessionStartEvent>Session-start metadata forwarded from the creation options.
extension_runner: Option<Arc<HostExtensionRunner>>Concrete host runner moved out of services (if any).
Auto Trait Implementations§
impl !Freeze for CreateAgentSessionResult
impl !RefUnwindSafe for CreateAgentSessionResult
impl !UnwindSafe for CreateAgentSessionResult
impl Send for CreateAgentSessionResult
impl Sync for CreateAgentSessionResult
impl Unpin for CreateAgentSessionResult
impl UnsafeUnpin for CreateAgentSessionResult
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> 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> 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