#[non_exhaustive]pub struct NewSessionRequest {
pub cwd: PathBuf,
pub additional_directories: Vec<PathBuf>,
pub mcp_servers: Vec<McpServer>,
pub meta: Option<Meta>,
}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<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 NewSessionRequest
impl NewSessionRequest
pub fn new(cwd: impl Into<PathBuf>) -> Self
Sourcepub fn additional_directories(
self,
additional_directories: Vec<PathBuf>,
) -> Self
pub fn additional_directories( self, additional_directories: Vec<PathBuf>, ) -> Self
Additional workspace roots for this session. Each path must be absolute.
Sourcepub fn mcp_servers(self, mcp_servers: Vec<McpServer>) -> Self
pub fn mcp_servers(self, mcp_servers: Vec<McpServer>) -> Self
List of MCP (Model Context Protocol) servers the agent should connect to.
Sourcepub fn meta(self, meta: impl IntoOption<Meta>) -> Self
pub fn meta(self, meta: impl IntoOption<Meta>) -> Self
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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 ==.