Skip to main content

muse_code_sdk/msp/method/lifecycle/
session_start_nodes.rs

1// @generated from the MSP stable schema and protocol sources; do not edit by hand.
2
3use serde::Deserialize;
4use serde::Serialize;
5
6/// One node a `session/start` names: where the session's tool calls run.
7/// The host validates the three strings; this shape only carries them.
8#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
9#[serde(rename_all = "camelCase")]
10pub struct SessionStartNode {
11    /// The node's name in this session's roster.
12    pub name: String,
13    /// The SSH target, `[user@]host[:port]`.
14    pub target: String,
15    /// The absolute workspace root on the node.
16    pub root: String,
17}
18
19/// The roster a session started with, echoed on the `session/start`
20/// result. A client that named nodes and reads no echo sends no turn: the
21/// host did not attach them, or no longer holds the roster it started with.
22#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
23#[serde(rename_all = "camelCase")]
24#[non_exhaustive]
25pub struct SessionStartNodeRoster {
26    /// The name of the node a call runs on when it names none.
27    pub default_node: String,
28    /// The attached nodes, in the order the start named them.
29    pub nodes: Vec<SessionStartRosterNode>,
30}
31
32/// One attached node of a [`SessionStartNodeRoster`].
33#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
34#[serde(rename_all = "camelCase")]
35#[non_exhaustive]
36pub struct SessionStartRosterNode {
37    /// The node's name.
38    pub name: String,
39    /// The target as the start gave it.
40    pub target: String,
41    /// The target as `ssh` resolved it: `user@host:port`.
42    pub resolved_target: String,
43    /// The workspace root as the start gave it.
44    pub root: String,
45}