#[non_exhaustive]pub struct SessionOptionsRequest {
pub cwd: PathBuf,
pub additional_directories: Vec<PathBuf>,
pub session_id: Option<SessionId>,
pub meta: Option<Meta>,
}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 sessionCapabilities.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. Agents MAY start their runtime to resolve
the options. The rules above still hold for 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: PathBufThe working directory to resolve options for. Must be an absolute path.
additional_directories: Vec<PathBuf>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/load or session/resume with the same cwd and
additionalDirectories would return, with the same cwd rules. A session the
Agent does not know gets -32002.
Clients MUST only send this when the Agent supports session/load (loadSession)
or session/resume (sessionCapabilities.resume).
meta: Option<Meta>The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Implementations§
Source§impl SessionOptionsRequest
impl SessionOptionsRequest
Sourcepub fn new(cwd: impl Into<PathBuf>) -> Self
Available on crate feature unstable_session_options only.
pub fn new(cwd: impl Into<PathBuf>) -> Self
unstable_session_options only.Builds SessionOptionsRequest with the required request fields set. Optional fields start unset or empty.
Sourcepub fn additional_directories(
self,
additional_directories: Vec<PathBuf>,
) -> Self
Available on crate feature unstable_session_options only.
pub fn additional_directories( self, additional_directories: Vec<PathBuf>, ) -> Self
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>) -> Self
Available on crate feature unstable_session_options only.
pub fn session_id(self, session_id: impl IntoOption<SessionId>) -> Self
unstable_session_options only.The session to resolve options for. Unset means a new session.
Sourcepub fn meta(self, meta: impl IntoOption<Meta>) -> Self
Available on crate feature unstable_session_options only.
pub fn meta(self, meta: impl IntoOption<Meta>) -> Self
unstable_session_options only.The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Trait Implementations§
Source§impl Clone for SessionOptionsRequest
impl Clone for SessionOptionsRequest
Source§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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for SessionOptionsRequest
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
impl StructuralPartialEq for SessionOptionsRequest
Auto Trait Implementations§
impl Forget for SessionOptionsRequest
impl Freeze for SessionOptionsRequest
impl Move 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.