Skip to main content

SessionConfig

Struct SessionConfig 

Source
pub struct SessionConfig {
    pub mcp_servers: BTreeMap<String, SessionMcpServerConfig>,
    pub settings_overrides: Option<SessionSettingsOverrides>,
    pub model_endpoint_transport_override: Option<SessionModelEndpointTransportOverride>,
    pub max_tool_output_bytes: Option<u64>,
    pub allowed_built_in_tools: Option<Vec<String>>,
    pub admit_session_mcp_servers: Option<bool>,
    pub developer_prompt: Option<String>,
}
Expand description

The open configuration extension object shared by session/start and session/resume.

Unknown keys are ignored on the wire, never rejected: the live decoder tolerates them, and no exported bundle carries additionalProperties: false. The Rust typed model’s deny_unknown_fields is internal and never exported — the closedness export applies nowhere, and the x-msp-closed opt-in mechanism stays inert. Recognized mcpServers values are typed and validated before they leave the wire boundary.

Fields§

§mcp_servers: BTreeMap<String, SessionMcpServerConfig>

Native MCP servers added only to this session runtime.

§settings_overrides: Option<SessionSettingsOverrides>

Experimental: a flat settings patch composing for this session’s loads only. Secret-shaped keys fail the decode.

§model_endpoint_transport_override: Option<SessionModelEndpointTransportOverride>

Experimental: the model endpoint transport this session’s model consumers resolve against at load.

§max_tool_output_bytes: Option<u64>

Experimental: this session’s tool-output byte budget, as muse exec --max-tool-output-bytes sets it for a headless run. 0 means no limit; a positive value must be at least 9. The budget applies only on a host whose default-off tool_output_budget gate serves it: there, each model-visible tool result, from workspace and MCP tools alike, is bounded at this many bytes from the runtime’s construction. Other hosts accept a valid value and ignore it.

§allowed_built_in_tools: Option<Vec<String>>

Experimental (owner decision: build tools and MCP first, design kt-2n1z): the per-session built-in tool restriction on session/start and session/resume: omitted = no restriction, [] = no built-in tools, a non-empty list = exactly those tools. Names are exact, case-sensitive built-in names; order is insignificant. This decoder checks the SHAPE only. Until the last enforcing piece lands, a host refuses any spelled member (P5, kt-kqr8).

§admit_session_mcp_servers: Option<bool>

Experimental: per-session admission of this session’s config.mcpServers roster. Spelled true admits exactly that roster; spelled false is withheld, spelled. Omitted keeps today’s withheld behaviour. Explicit null and any non-boolean fail the decode. Until the admission gate and its enforcing pieces land, the doors refuse every spelled value unconditionally, so no host can believe a roster was admitted.

§developer_prompt: Option<String>

Developer instructions for this session only, on session/start and session/resume. The text is trimmed. A nonblank value replaces the settings-derived developer instructions; an omitted member is no override and keeps the full developer context. Explicit null and blank text are the explicit clear (the Rust value is an empty string): no override, and on a host that serves developer instructions they also turn off the session’s suppressible developer context (the agent catalog and the memory snapshot). Any other type fails the decode. A host that does not serve developer instructions ignores a valid member.

Trait Implementations§

Source§

impl Clone for SessionConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SessionConfig

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SessionConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for SessionConfig

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for SessionConfig

Source§

impl PartialEq for SessionConfig

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for SessionConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for SessionConfig

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.