#[non_exhaustive]pub struct ForkSessionRequest {
pub session_id: SessionId,
pub cwd: PathBuf,
pub additional_directories: Vec<PathBuf>,
pub mcp_servers: Vec<McpServer>,
pub meta: Option<Map<String, Value>>,
}Expand description
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Request parameters for forking an existing session.
Creates a new session based on the context of an existing one, allowing operations like generating summaries without affecting the original session’s history.
Only available if the Agent supports the session.fork capability.
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.session_id: SessionIdThe ID of the session to fork.
cwd: PathBufThe working directory for this session.
additional_directories: Vec<PathBuf>Additional workspace roots to activate for this session. Each path must be absolute.
When omitted or empty, no additional roots are activated. When non-empty, this is the complete resulting additional-root list for the forked session.
mcp_servers: Vec<McpServer>List of MCP servers to connect to for this session.
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 ForkSessionRequest
impl ForkSessionRequest
pub fn new( session_id: impl Into<SessionId>, cwd: impl Into<PathBuf>, ) -> ForkSessionRequest
unstable_session_fork only.Sourcepub fn additional_directories(
self,
additional_directories: Vec<PathBuf>,
) -> ForkSessionRequest
Available on crate feature unstable_session_fork only.
pub fn additional_directories( self, additional_directories: Vec<PathBuf>, ) -> ForkSessionRequest
unstable_session_fork only.Additional workspace roots to activate for this session. Each path must be absolute.
Sourcepub fn mcp_servers(self, mcp_servers: Vec<McpServer>) -> ForkSessionRequest
Available on crate feature unstable_session_fork only.
pub fn mcp_servers(self, mcp_servers: Vec<McpServer>) -> ForkSessionRequest
unstable_session_fork only.List of MCP servers to connect to for this session.
Sourcepub fn meta(
self,
meta: impl IntoOption<Map<String, Value>>,
) -> ForkSessionRequest
Available on crate feature unstable_session_fork only.
pub fn meta( self, meta: impl IntoOption<Map<String, Value>>, ) -> ForkSessionRequest
unstable_session_fork 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 ForkSessionRequest
impl Clone for ForkSessionRequest
Source§fn clone(&self) -> ForkSessionRequest
fn clone(&self) -> ForkSessionRequest
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 ForkSessionRequest
impl Debug for ForkSessionRequest
Source§impl<'de> Deserialize<'de> for ForkSessionRequest
impl<'de> Deserialize<'de> for ForkSessionRequest
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ForkSessionRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ForkSessionRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ForkSessionRequest
Source§impl IntoV2 for ForkSessionRequest
Available on crate feature unstable_session_fork only.
impl IntoV2 for ForkSessionRequest
unstable_session_fork only.Source§type Output = ForkSessionRequest
type Output = ForkSessionRequest
Source§fn into_v2(
self,
) -> Result<<ForkSessionRequest as IntoV2>::Output, ProtocolConversionError>
fn into_v2( self, ) -> Result<<ForkSessionRequest as IntoV2>::Output, ProtocolConversionError>
Source§impl JsonRpcMessage for ForkSessionRequest
impl JsonRpcMessage for ForkSessionRequest
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 ForkSessionRequest
impl JsonRpcRequest for ForkSessionRequest
Source§type Response = ForkSessionResponse
type Response = ForkSessionResponse
Source§impl JsonSchema for ForkSessionRequest
impl JsonSchema for ForkSessionRequest
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 ForkSessionRequest
impl PartialEq for ForkSessionRequest
Source§fn eq(&self, other: &ForkSessionRequest) -> bool
fn eq(&self, other: &ForkSessionRequest) -> bool
self and other values to be equal, and is used by ==.