,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct SessionRemoteDisableParams {
+ /// Target session identifier
+ pub session_id: SessionId,
+}
+
/// Authentication type
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub enum AuthInfoType {
diff --git a/rust/src/generated/rpc.rs b/rust/src/generated/rpc.rs
index ee38f27a5..eed4aea2a 100644
--- a/rust/src/generated/rpc.rs
+++ b/rust/src/generated/rpc.rs
@@ -437,6 +437,13 @@ impl<'a> SessionRpc<'a> {
}
}
+ /// `session.remote.*` sub-namespace.
+ pub fn remote(&self) -> SessionRpcRemote<'a> {
+ SessionRpcRemote {
+ session: self.session,
+ }
+ }
+
/// `session.shell.*` sub-namespace.
pub fn shell(&self) -> SessionRpcShell<'a> {
SessionRpcShell {
@@ -1191,6 +1198,52 @@ impl<'a> SessionRpcPlugins<'a> {
}
}
+/// `session.remote.*` RPCs.
+#[derive(Clone, Copy)]
+pub struct SessionRpcRemote<'a> {
+ pub(crate) session: &'a Session,
+}
+
+impl<'a> SessionRpcRemote<'a> {
+ /// Wire method: `session.remote.enable`.
+ ///
+ ///
+ ///
+ /// **Experimental.** This API is part of an experimental wire-protocol surface
+ /// and may change or be removed in future SDK or CLI releases. Pin both the
+ /// SDK and CLI versions if your code depends on it.
+ ///
+ ///
+ pub async fn enable(&self) -> Result {
+ let wire_params = serde_json::json!({ "sessionId": self.session.id() });
+ let _value = self
+ .session
+ .client()
+ .call(rpc_methods::SESSION_REMOTE_ENABLE, Some(wire_params))
+ .await?;
+ Ok(serde_json::from_value(_value)?)
+ }
+
+ /// Wire method: `session.remote.disable`.
+ ///
+ ///
+ ///
+ /// **Experimental.** This API is part of an experimental wire-protocol surface
+ /// and may change or be removed in future SDK or CLI releases. Pin both the
+ /// SDK and CLI versions if your code depends on it.
+ ///
+ ///
+ pub async fn disable(&self) -> Result<(), Error> {
+ let wire_params = serde_json::json!({ "sessionId": self.session.id() });
+ let _value = self
+ .session
+ .client()
+ .call(rpc_methods::SESSION_REMOTE_DISABLE, Some(wire_params))
+ .await?;
+ Ok(())
+ }
+}
+
/// `session.shell.*` RPCs.
#[derive(Clone, Copy)]
pub struct SessionRpcShell<'a> {
diff --git a/rust/src/lib.rs b/rust/src/lib.rs
index dfe6d8ba3..7c3d2422b 100644
--- a/rust/src/lib.rs
+++ b/rust/src/lib.rs
@@ -393,6 +393,12 @@ pub struct ClientOptions {
/// is safe by default. Combining with [`Transport::Stdio`] is invalid
/// and surfaces as an error from [`Client::start`].
pub tcp_connection_token: Option,
+ /// Enable remote session support (Mission Control integration).
+ /// When `true`, the SDK passes `--remote` to the spawned CLI process so
+ /// sessions in a GitHub repository working directory are accessible from
+ /// GitHub web and mobile. Ignored when connecting to an external server
+ /// via [`Transport::External`].
+ pub remote: bool,
}
impl std::fmt::Debug for ClientOptions {
@@ -430,6 +436,7 @@ impl std::fmt::Debug for ClientOptions {
"tcp_connection_token",
&self.tcp_connection_token.as_ref().map(|_| ""),
)
+ .field("remote", &self.remote)
.finish()
}
}
@@ -636,6 +643,7 @@ impl Default for ClientOptions {
telemetry: None,
copilot_home: None,
tcp_connection_token: None,
+ remote: false,
}
}
}
@@ -793,6 +801,13 @@ impl ClientOptions {
self.tcp_connection_token = Some(token.into());
self
}
+
+ /// Enable remote session support (Mission Control). Passes `--remote`
+ /// to the spawned CLI process.
+ pub fn with_remote(mut self, enabled: bool) -> Self {
+ self.remote = enabled;
+ self
+ }
}
/// Validate a [`SessionFsConfig`] before sending `sessionFs.setProvider`.
@@ -1233,6 +1248,14 @@ impl Client {
}
}
+ fn remote_args(options: &ClientOptions) -> Vec {
+ if options.remote {
+ vec!["--remote".to_string()]
+ } else {
+ Vec::new()
+ }
+ }
+
fn spawn_stdio(program: &Path, options: &ClientOptions) -> Result {
info!(cwd = ?options.cwd, program = %program.display(), "spawning copilot CLI (stdio)");
let mut command = Self::build_command(program, options);
@@ -1247,6 +1270,7 @@ impl Client {
])
.args(Self::auth_args(options))
.args(Self::session_idle_timeout_args(options))
+ .args(Self::remote_args(options))
.args(&options.extra_args)
.stdin(Stdio::piped());
Ok(command.spawn()?)
@@ -1271,6 +1295,7 @@ impl Client {
])
.args(Self::auth_args(options))
.args(Self::session_idle_timeout_args(options))
+ .args(Self::remote_args(options))
.args(&options.extra_args)
.stdin(Stdio::null());
let mut child = command.spawn()?;
@@ -1901,7 +1926,8 @@ mod tests {
.with_github_token("ghp_test")
.with_use_logged_in_user(false)
.with_log_level(LogLevel::Debug)
- .with_session_idle_timeout_seconds(120);
+ .with_session_idle_timeout_seconds(120)
+ .with_remote(true);
assert!(matches!(opts.program, CliProgram::Path(_)));
assert_eq!(opts.prefix_args, vec![std::ffi::OsString::from("node")]);
assert_eq!(opts.cwd, PathBuf::from("/tmp"));
@@ -1918,6 +1944,7 @@ mod tests {
assert_eq!(opts.use_logged_in_user, Some(false));
assert!(matches!(opts.log_level, Some(LogLevel::Debug)));
assert_eq!(opts.session_idle_timeout_seconds, Some(120));
+ assert!(opts.remote);
}
#[test]
@@ -2233,6 +2260,21 @@ mod tests {
);
}
+ #[test]
+ fn remote_args_omitted_by_default() {
+ let opts = ClientOptions::default();
+ assert!(Client::remote_args(&opts).is_empty());
+ }
+
+ #[test]
+ fn remote_args_emit_flag_when_enabled() {
+ let opts = ClientOptions {
+ remote: true,
+ ..Default::default()
+ };
+ assert_eq!(Client::remote_args(&opts), vec!["--remote".to_string()]);
+ }
+
#[test]
fn log_level_str_round_trips() {
for level in [
diff --git a/test/harness/package-lock.json b/test/harness/package-lock.json
index c5bbaabae..9a1b7d587 100644
--- a/test/harness/package-lock.json
+++ b/test/harness/package-lock.json
@@ -9,7 +9,7 @@
"version": "1.0.0",
"license": "ISC",
"devDependencies": {
- "@github/copilot": "^1.0.42",
+ "@github/copilot": "^1.0.43-0",
"@modelcontextprotocol/sdk": "^1.26.0",
"@types/node": "^25.3.3",
"@types/node-forge": "^1.3.14",
@@ -464,27 +464,27 @@
}
},
"node_modules/@github/copilot": {
- "version": "1.0.42",
- "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.42.tgz",
- "integrity": "sha512-ODW5+aJi595Tb2WUaAlshBoUkOBuh9MegXXwXzMoar+k9fZzzDy3oNJLFg7ni4UtkUZvj/WL/y3s5O+FlsF2HA==",
+ "version": "1.0.43-0",
+ "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.43-0.tgz",
+ "integrity": "sha512-wsSlDIJj6tFIOchzuA+rIYJXP3OwrsMR1j/k8WB/4gxxACm5Q7XSRmH7Ul88k/vXak44sBC9EmJaEgAm6enwbg==",
"dev": true,
"license": "SEE LICENSE IN LICENSE.md",
"bin": {
"copilot": "npm-loader.js"
},
"optionalDependencies": {
- "@github/copilot-darwin-arm64": "1.0.42",
- "@github/copilot-darwin-x64": "1.0.42",
- "@github/copilot-linux-arm64": "1.0.42",
- "@github/copilot-linux-x64": "1.0.42",
- "@github/copilot-win32-arm64": "1.0.42",
- "@github/copilot-win32-x64": "1.0.42"
+ "@github/copilot-darwin-arm64": "1.0.43-0",
+ "@github/copilot-darwin-x64": "1.0.43-0",
+ "@github/copilot-linux-arm64": "1.0.43-0",
+ "@github/copilot-linux-x64": "1.0.43-0",
+ "@github/copilot-win32-arm64": "1.0.43-0",
+ "@github/copilot-win32-x64": "1.0.43-0"
}
},
"node_modules/@github/copilot-darwin-arm64": {
- "version": "1.0.42",
- "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.42.tgz",
- "integrity": "sha512-2w89QLRgMR7hWwV1KG3uXqu98WST6afJCfvtYtqvPdf6ZQC7Fj2HhPNCrMxZk/H8mZwTgYJeg30gZjvV1698EA==",
+ "version": "1.0.43-0",
+ "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.43-0.tgz",
+ "integrity": "sha512-50YRUf03lUJ110PbKaMRjeIG5pvEgxm6+X4nRuYtEQujp/RUFT2Rd3g6I2f9hfIrdMIxfSNw8KXanuPcrCPZqA==",
"cpu": [
"arm64"
],
@@ -499,9 +499,9 @@
}
},
"node_modules/@github/copilot-darwin-x64": {
- "version": "1.0.42",
- "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.42.tgz",
- "integrity": "sha512-G2//tgGSKXx3ZGMqe774UnewasYMh+j0ZeQ3injtuZpSpzN+OAuNkzwXpvFHprdbgekMb0oAPN+Xm3rHuQY8Xw==",
+ "version": "1.0.43-0",
+ "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.43-0.tgz",
+ "integrity": "sha512-LvbJD23zbuGNOvYheS8PPT5l+TLOy6FWRc1qF7hf6PMSsqvDTqseO6Bq5S99A/Z7A/v3kh/xUZglJwrIxtVxvg==",
"cpu": [
"x64"
],
@@ -516,9 +516,9 @@
}
},
"node_modules/@github/copilot-linux-arm64": {
- "version": "1.0.42",
- "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.42.tgz",
- "integrity": "sha512-Ai6J4hUKVuE5ztsLspp/I7ByXtL2V6tF+AOn0q+hHp1MOA5JLq5/G8PE+c0VzG69x4hkt1lROQDjvXJGY7sv+g==",
+ "version": "1.0.43-0",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.43-0.tgz",
+ "integrity": "sha512-gBfW5f5XZIAxkQU7NXQytxImORMbzgrk9WcMfcTuTNgr1OXM1oaKWvXH2vc6ZVZbPhPnAcTymCC0bFOSXQBE2g==",
"cpu": [
"arm64"
],
@@ -533,9 +533,9 @@
}
},
"node_modules/@github/copilot-linux-x64": {
- "version": "1.0.42",
- "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.42.tgz",
- "integrity": "sha512-yYfuL6Hk3uLQuIgfxpEMCyoowFq2Bew1EaXmvg4lnDjj95tvEmyMCX77aIZ2AKwBOgp1nMV7L1B1QL9/mw6BTA==",
+ "version": "1.0.43-0",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.43-0.tgz",
+ "integrity": "sha512-S/0F05plYabV6siVHBcuGiYzamB/GaEVvt8jMo3CeuPJl6/AZtuU6WMWngWooCQg4PyM/zDfcnvH88xU5NDs7w==",
"cpu": [
"x64"
],
@@ -550,9 +550,9 @@
}
},
"node_modules/@github/copilot-win32-arm64": {
- "version": "1.0.42",
- "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.42.tgz",
- "integrity": "sha512-WgnV6AxsvbvZdNW/42JFikK/SqR1JMw6juRpGKXZr70ond/cHK6trtrmt3dXYPymBO14ppJMFdm4+chJzKGKMw==",
+ "version": "1.0.43-0",
+ "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.43-0.tgz",
+ "integrity": "sha512-obpdmbbDF1kuanKyIjb1Mc4+GrNEfLRT2QO0DV20uy0JXRf0duYe92Q40T7vRxfp7MRpfclpdT4wNEkVc2GZVA==",
"cpu": [
"arm64"
],
@@ -567,9 +567,9 @@
}
},
"node_modules/@github/copilot-win32-x64": {
- "version": "1.0.42",
- "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.42.tgz",
- "integrity": "sha512-J5jtrcYuODuD4LPPRHjOCMJGO6+vKZ71n8PTiHPCg9lpfThXDDXxrB7nDDkhxl23zSXlUrpWwkMI+a2Ax/AxGg==",
+ "version": "1.0.43-0",
+ "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.43-0.tgz",
+ "integrity": "sha512-5Kgk1wtoV7dMMf++RLTqjwZfGUkXOrEu5f/2ijMbMVEkjaBIHwxkK3xvPsun3xBU8htJy1PpCSBm2e/2rv78MA==",
"cpu": [
"x64"
],
diff --git a/test/harness/package.json b/test/harness/package.json
index 874aeca16..29bf7a014 100644
--- a/test/harness/package.json
+++ b/test/harness/package.json
@@ -11,7 +11,7 @@
"test": "vitest run"
},
"devDependencies": {
- "@github/copilot": "^1.0.42",
+ "@github/copilot": "^1.0.43-0",
"@modelcontextprotocol/sdk": "^1.26.0",
"@types/node": "^25.3.3",
"@types/node-forge": "^1.3.14",