#[non_exhaustive]pub struct NewSessionRequest {
pub cwd: PathBuf,
pub additional_directories: Vec<PathBuf>,
pub mcp_servers: Vec<McpServer>,
pub meta: Option<Map<String, Value>>,
}Expand description
Request parameters for creating a new session.
See protocol docs: Creating a Session
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 for this session. Must be an absolute path.
additional_directories: Vec<PathBuf>Additional workspace roots for this session. Each path must be absolute.
These expand the session’s filesystem scope without changing cwd, which
remains the base for relative paths. When omitted or empty, no
additional roots are activated for the new session.
mcp_servers: Vec<McpServer>List of MCP (Model Context Protocol) servers the agent should connect to.
meta: Option<Map<String, Value>>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 NewSessionRequest
impl NewSessionRequest
pub fn new(cwd: impl Into<PathBuf>) -> NewSessionRequest
Sourcepub fn additional_directories(
self,
additional_directories: Vec<PathBuf>,
) -> NewSessionRequest
pub fn additional_directories( self, additional_directories: Vec<PathBuf>, ) -> NewSessionRequest
Additional workspace roots for this session. Each path must be absolute.
Sourcepub fn mcp_servers(self, mcp_servers: Vec<McpServer>) -> NewSessionRequest
pub fn mcp_servers(self, mcp_servers: Vec<McpServer>) -> NewSessionRequest
List of MCP (Model Context Protocol) servers the agent should connect to.
Sourcepub fn meta(
self,
meta: impl IntoOption<Map<String, Value>>,
) -> NewSessionRequest
pub fn meta( self, meta: impl IntoOption<Map<String, Value>>, ) -> NewSessionRequest
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 NewSessionRequest
impl Clone for NewSessionRequest
Source§fn clone(&self) -> NewSessionRequest
fn clone(&self) -> NewSessionRequest
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 NewSessionRequest
impl Debug for NewSessionRequest
Source§impl<'de> Deserialize<'de> for NewSessionRequest
impl<'de> Deserialize<'de> for NewSessionRequest
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NewSessionRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NewSessionRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonRpcMessage for NewSessionRequest
impl JsonRpcMessage for NewSessionRequest
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 NewSessionRequest
impl JsonRpcRequest for NewSessionRequest
Source§type Response = NewSessionResponse
type Response = NewSessionResponse
Source§impl JsonSchema for NewSessionRequest
impl JsonSchema for NewSessionRequest
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 NewSessionRequest
impl PartialEq for NewSessionRequest
Source§fn eq(&self, other: &NewSessionRequest) -> bool
fn eq(&self, other: &NewSessionRequest) -> bool
self and other values to be equal, and is used by ==.