#[non_exhaustive]pub struct SessionOptionsRequest {
pub cwd: AbsolutePath,
pub additional_directories: Vec<AbsolutePath>,
pub session_id: Option<SessionId>,
pub meta: Option<Map<String, Value>>,
}unstable_protocol_v2 only.Expand description
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Request parameters for session/options, which returns the config options a session
would start with, without creating or resuming a session.
Only available if the Agent supports the session.options capability.
session/options MUST NOT create or resume a session, send session/update
notifications, add an entry to session/list, or change an existing session. Agents
SHOULD NOT connect to MCP servers to answer it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.cwd: AbsolutePathThe working directory to resolve options for. Must be an absolute path.
additional_directories: Vec<AbsolutePath>Additional workspace roots to resolve options for. Each path must be absolute.
Optional. Omitted and null are equivalent to an empty list.
session_id: Option<SessionId>The session to resolve options for.
Optional. Omitted and null are equivalent and mean a new session. When present,
the Agent returns what session/resume with the same cwd and
additionalDirectories would return, with the same cwd rules. A session the
Agent does not know gets -32002.
meta: Option<Map<String, Value>>The _meta property is reserved by ACP to allow clients and agents to attach additional
metadata to their interactions. Omitted and null are equivalent and mean no metadata.
Implementations MUST NOT assign meaning to keys they do not recognize.
See protocol docs: Extensibility
Implementations§
Source§impl SessionOptionsRequest
impl SessionOptionsRequest
Sourcepub fn new(cwd: impl Into<AbsolutePath>) -> SessionOptionsRequest
Available on crate feature unstable_session_options only.
pub fn new(cwd: impl Into<AbsolutePath>) -> SessionOptionsRequest
unstable_session_options only.Builds SessionOptionsRequest with the required request fields set. Optional fields start unset or empty.
Sourcepub fn additional_directories<I, P>(
self,
additional_directories: I,
) -> SessionOptionsRequest
Available on crate feature unstable_session_options only.
pub fn additional_directories<I, P>( self, additional_directories: I, ) -> SessionOptionsRequest
unstable_session_options only.Additional workspace roots to resolve options for. Each path must be absolute.
Sourcepub fn session_id(
self,
session_id: impl IntoOption<SessionId>,
) -> SessionOptionsRequest
Available on crate feature unstable_session_options only.
pub fn session_id( self, session_id: impl IntoOption<SessionId>, ) -> SessionOptionsRequest
unstable_session_options only.The session to resolve options for. Unset means a new session.
Sourcepub fn meta(
self,
meta: impl IntoOption<Map<String, Value>>,
) -> SessionOptionsRequest
Available on crate feature unstable_session_options only.
pub fn meta( self, meta: impl IntoOption<Map<String, Value>>, ) -> SessionOptionsRequest
unstable_session_options only.The _meta property is reserved by ACP to allow clients and agents to attach additional
metadata to their interactions. Omitted and null are equivalent and mean no metadata.
Implementations MUST NOT assign meaning to keys they do not recognize.
See protocol docs: Extensibility
Trait Implementations§
Source§impl Clone for SessionOptionsRequest
impl Clone for SessionOptionsRequest
Source§fn clone(&self) -> SessionOptionsRequest
fn clone(&self) -> SessionOptionsRequest
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 SessionOptionsRequest
impl Debug for SessionOptionsRequest
Source§impl<'de> Deserialize<'de> for SessionOptionsRequest
impl<'de> Deserialize<'de> for SessionOptionsRequest
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionOptionsRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionOptionsRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for SessionOptionsRequest
Source§impl JsonRpcMessage for SessionOptionsRequest
impl JsonRpcMessage for SessionOptionsRequest
Source§fn matches_method(method: &str) -> bool
fn matches_method(method: &str) -> bool
Source§fn to_untyped_message(&self) -> Result<UntypedMessage, Error>
fn to_untyped_message(&self) -> Result<UntypedMessage, Error>
Source§impl JsonRpcRequest for SessionOptionsRequest
impl JsonRpcRequest for SessionOptionsRequest
Source§type Response = SessionOptionsResponse
type Response = SessionOptionsResponse
Source§impl JsonSchema for SessionOptionsRequest
impl JsonSchema for SessionOptionsRequest
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for SessionOptionsRequest
impl PartialEq for SessionOptionsRequest
Source§impl Serialize for SessionOptionsRequest
impl Serialize for SessionOptionsRequest
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for SessionOptionsRequest
Auto Trait Implementations§
impl Forget for SessionOptionsRequest
impl Freeze for SessionOptionsRequest
impl RefUnwindSafe for SessionOptionsRequest
impl Send for SessionOptionsRequest
impl Sync for SessionOptionsRequest
impl Unpin for SessionOptionsRequest
impl UnsafeUnpin for SessionOptionsRequest
impl UnwindSafe for SessionOptionsRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.