pub struct CreateSessionParams {
pub channel: Uri,
pub provider: Option<String>,
pub working_directories: Option<Vec<Uri>>,
pub fork: Option<SessionForkSource>,
pub config: Option<JsonObject>,
pub active_client: Option<SessionActiveClient>,
pub progress_token: Option<String>,
}Fields§
§channel: UriChannel URI this command targets.
provider: Option<String>Agent provider ID
working_directories: Option<Vec<Uri>>The working directories the session’s agent is granted tool access to. A session may span multiple directories; they are equal peers except when the agent advertises {@link MultipleWorkingDirectoriesCapability.immutablePrimary} (in which case the first entry is a fixed process root).
A client MUST NOT supply more than one entry unless the agent advertises
{@link AgentCapabilities.multipleWorkingDirectories}; a server without that
capability treats only the first entry as the session’s working directory
and ignores the rest. Dispatch session/workingDirectorySet /
session/workingDirectoryRemoved to change the set after the session has
started.
Ignored for forked sessions — a fork inherits its working directories
from the source session identified by fork.
fork: Option<SessionForkSource>Fork from an existing session. The new session is populated with content from the source session up to and including the specified turn’s response.
config: Option<JsonObject>Agent-specific configuration values collected via resolveSessionConfig.
Keys and values correspond to the schema returned by the server.
active_client: Option<SessionActiveClient>Eagerly claim an active client role for the new session.
When provided, the server initializes the session with this client as an
active client, equivalent to dispatching a session/activeClientSet
action immediately after creation. The clientId MUST match the
clientId the creating client supplied in initialize.
progress_token: Option<String>Opt-in progress token. When set, the client is offering to receive
progress notifications (see ProgressParams) for any long-running work
the server does to bring this session up — most notably the lazy,
first-use download of the provider’s native SDK. The server echoes this
exact token on every progress frame so the client can correlate it to
this createSession call (and the UI awaiting it).
The token MUST be unique across the client’s active requests. The server
MAY ignore it (e.g. when nothing long-running is needed), in which case no
progress notifications are emitted.
Trait Implementations§
Source§impl Clone for CreateSessionParams
impl Clone for CreateSessionParams
Source§fn clone(&self) -> CreateSessionParams
fn clone(&self) -> CreateSessionParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more