diff --git a/rust/src/generated/rpc.rs b/rust/src/generated/rpc.rs
index 4d5b7f1538..99fbd099ae 100644
--- a/rust/src/generated/rpc.rs
+++ b/rust/src/generated/rpc.rs
@@ -3185,6 +3185,13 @@ impl<'a> SessionRpc<'a> {
}
}
+ /// `session.sandbox.*` sub-namespace.
+ pub fn sandbox(&self) -> SessionRpcSandbox<'a> {
+ SessionRpcSandbox {
+ session: self.session,
+ }
+ }
+
/// `session.schedule.*` sub-namespace.
pub fn schedule(&self) -> SessionRpcSchedule<'a> {
SessionRpcSchedule {
@@ -9413,6 +9420,42 @@ impl<'a> SessionRpcRemote<'a> {
}
}
+/// `session.sandbox.*` RPCs.
+#[derive(Clone, Copy)]
+pub struct SessionRpcSandbox<'a> {
+ pub(crate) session: &'a Session,
+}
+
+impl<'a> SessionRpcSandbox<'a> {
+ /// Returns whether managed policy requires sandbox enforcement and whether an enforcement failure has permanently blocked the session.
+ ///
+ /// Wire method: `session.sandbox.getEnforcementStatus`.
+ ///
+ /// # Returns
+ ///
+ /// Managed sandbox enforcement state for a session.
+ ///
+ ///
+ ///
+ /// **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 get_enforcement_status(&self) -> Result
{
+ let wire_params = serde_json::json!({ "sessionId": self.session.id() });
+ let _value = self
+ .session
+ .client()
+ .call(
+ rpc_methods::SESSION_SANDBOX_GETENFORCEMENTSTATUS,
+ Some(wire_params),
+ )
+ .await?;
+ Ok(serde_json::from_value(_value)?)
+ }
+}
+
/// `session.schedule.*` RPCs.
#[derive(Clone, Copy)]
pub struct SessionRpcSchedule<'a> {
diff --git a/rust/src/generated/session_events.rs b/rust/src/generated/session_events.rs
index 79284b1671..266be4895a 100644
--- a/rust/src/generated/session_events.rs
+++ b/rust/src/generated/session_events.rs
@@ -939,6 +939,9 @@ pub struct SessionStartData {
/// Whether the session was already in use by another client at start time
#[serde(skip_serializing_if = "Option::is_none")]
pub already_in_use: Option,
+ /// Auto routing preference selected at session creation time
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub auto_tier: Option,
/// Working directory and git context at session start
#[serde(skip_serializing_if = "Option::is_none")]
pub context: Option,
@@ -988,6 +991,9 @@ pub struct SessionResumeData {
/// Whether the session was already in use by another client at resume time
#[serde(skip_serializing_if = "Option::is_none")]
pub already_in_use: Option,
+ /// Auto routing preference active at resume time
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub auto_tier: Option,
/// Updated working directory and git context at resume time
#[serde(skip_serializing_if = "Option::is_none")]
pub context: Option,
@@ -2527,6 +2533,16 @@ pub struct AssistantMessageServerTools {
pub raw_content_blocks: Option>,
}
+/// Hosted program that requested this client tool call
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct AssistantMessageToolRequestCaller {
+ /// Provider-assigned identifier for the hosted caller.
+ pub caller_id: String,
+ /// Kind of hosted caller that requested the client tool call.
+ pub r#type: AssistantMessageToolRequestCallerType,
+}
+
/// A tool invocation request from the assistant
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
@@ -2534,6 +2550,9 @@ pub struct AssistantMessageToolRequest {
/// Arguments to pass to the tool, format depends on the tool
#[serde(skip_serializing_if = "Option::is_none")]
pub arguments: Option,
+ /// Hosted program that requested this client tool call
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub caller: Option,
/// Resolved intention summary describing what this specific call does
#[serde(skip_serializing_if = "Option::is_none")]
pub intention_summary: Option,
@@ -6321,6 +6340,24 @@ pub struct McpAppToolCallCompleteData {
pub tool_name: String,
}
+/// Routing preference used when the session model is `auto`.
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub enum AutoTier {
+ /// Optimize for efficiency.
+ #[serde(rename = "efficiency")]
+ Efficiency,
+ /// Balance efficiency and intelligence.
+ #[serde(rename = "balance")]
+ Balance,
+ /// Optimize for intelligence.
+ #[serde(rename = "intelligence")]
+ Intelligence,
+ /// Unknown variant for forward compatibility.
+ #[default]
+ #[serde(other)]
+ Unknown,
+}
+
/// Hosting platform type of the repository (github or ado)
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub enum WorkingDirectoryContextHostType {
@@ -6939,6 +6976,17 @@ pub enum CitationProvider {
Unknown,
}
+/// Hosted program caller type
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub enum AssistantMessageToolRequestCallerType {
+ #[serde(rename = "program")]
+ Program,
+ /// Unknown variant for forward compatibility.
+ #[default]
+ #[serde(other)]
+ Unknown,
+}
+
/// API endpoint used for this model call, matching CAPI supported_endpoints vocabulary
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub enum AssistantUsageApiEndpoint {
diff --git a/rust/tests/e2e/commands.rs b/rust/tests/e2e/commands.rs
index 2e15c24a0f..78c8e07616 100644
--- a/rust/tests/e2e/commands.rs
+++ b/rust/tests/e2e/commands.rs
@@ -210,6 +210,7 @@ async fn session_commands_enqueue_and_respond_to_queued_command() {
.commands()
.enqueue(EnqueueCommandParams {
command: "/help".to_string(),
+ display_text: None,
})
.await
.expect("enqueue command");
diff --git a/rust/tests/e2e/rpc_queue.rs b/rust/tests/e2e/rpc_queue.rs
index 6f4f881659..d5f1228302 100644
--- a/rust/tests/e2e/rpc_queue.rs
+++ b/rust/tests/e2e/rpc_queue.rs
@@ -153,6 +153,7 @@ async fn pendingitems_reports_queued_command_and_remove_and_clear_update_queue()
.commands()
.enqueue(EnqueueCommandParams {
command: first_command,
+ display_text: None,
})
.await
.expect("enqueue command");
@@ -167,6 +168,7 @@ async fn pendingitems_reports_queued_command_and_remove_and_clear_update_queue()
.commands()
.enqueue(EnqueueCommandParams {
command: second_command.clone(),
+ display_text: None,
})
.await
.expect("enqueue second command");
@@ -187,6 +189,7 @@ async fn pendingitems_reports_queued_command_and_remove_and_clear_update_queue()
.commands()
.enqueue(EnqueueCommandParams {
command: third_command.clone(),
+ display_text: None,
})
.await
.expect("enqueue third command");
diff --git a/scripts/codegen/python.ts b/scripts/codegen/python.ts
index bdb4d095b7..d4be520fe7 100644
--- a/scripts/codegen/python.ts
+++ b/scripts/codegen/python.ts
@@ -143,12 +143,22 @@ function placeholderToQuicktypeIdentifiers(placeholder: string): string[] {
return [...new Set([basic, basic.replace(/Mcp/g, "MCP")])];
}
-function postProcessExternalRefsForPython(
+export function postProcessExternalRefsForPython(
code: string,
placeholderToReal: Map,
externalEnumNames: Set = new Set()
): string {
for (const [placeholder, realName] of placeholderToReal) {
+ const markerProperty = `__externalRefMarker_${placeholder}`;
+ const markerClass = [
+ ...code.matchAll(
+ /(?:^|\n)(@dataclass\r?\nclass (\w+)\b[\s\S]*?)(?=\n@dataclass\b|\nclass\s+\w|\ndef\s+\w|$)/g
+ ),
+ ].find((match) => match[1].includes(`"${markerProperty}"`));
+ if (markerClass) {
+ code = code.replace(markerClass[0], "\n");
+ code = code.replace(new RegExp(`\\b${escapeRegExp(markerClass[2])}\\b`, "g"), realName);
+ }
for (const quicktypeName of placeholderToQuicktypeIdentifiers(placeholder)) {
code = code.replace(
new RegExp(
diff --git a/test/harness/package-lock.json b/test/harness/package-lock.json
index 710d725318..8e1ab03a06 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.82-0",
+ "@github/copilot": "^1.0.82",
"@modelcontextprotocol/sdk": "^1.26.0",
"@types/node": "^25.3.3",
"@types/node-forge": "^1.3.14",
@@ -472,8 +472,8 @@
}
},
"node_modules/@github/copilot": {
- "version": "1.0.82-0",
- "integrity": "sha512-fSZVNAzFFYaS6btYD0+cKF7SrrtOklhpkPs/cIMZY7Fgxoa6rfZrlTWXlQNgNIdwLp51XxwTfxnZO+D9+MQ5yg==",
+ "version": "1.0.82",
+ "integrity": "sha512-+mDIwBO3dCpL3k2rVLc4+1tFzqcVBTJNA/0co+okEpmCgcHjaz91Cqq7++pJKN5yJQuGC6bKangm7PSoheI1Xw==",
"dev": true,
"license": "SEE LICENSE IN LICENSE.md",
"dependencies": {
@@ -483,19 +483,19 @@
"copilot": "npm-loader.js"
},
"optionalDependencies": {
- "@github/copilot-darwin-arm64": "1.0.82-0",
- "@github/copilot-darwin-x64": "1.0.82-0",
- "@github/copilot-linux-arm64": "1.0.82-0",
- "@github/copilot-linux-x64": "1.0.82-0",
- "@github/copilot-linuxmusl-arm64": "1.0.82-0",
- "@github/copilot-linuxmusl-x64": "1.0.82-0",
- "@github/copilot-win32-arm64": "1.0.82-0",
- "@github/copilot-win32-x64": "1.0.82-0"
+ "@github/copilot-darwin-arm64": "1.0.82",
+ "@github/copilot-darwin-x64": "1.0.82",
+ "@github/copilot-linux-arm64": "1.0.82",
+ "@github/copilot-linux-x64": "1.0.82",
+ "@github/copilot-linuxmusl-arm64": "1.0.82",
+ "@github/copilot-linuxmusl-x64": "1.0.82",
+ "@github/copilot-win32-arm64": "1.0.82",
+ "@github/copilot-win32-x64": "1.0.82"
}
},
"node_modules/@github/copilot-darwin-arm64": {
- "version": "1.0.82-0",
- "integrity": "sha512-TzBYfyvxcw3z9Mu7U8TsFo/Nq7m5XS6ahT71aPL+gx/YId0kmenI27b9daXsK6LA1D0gsFGwNBDKINddqntt1g==",
+ "version": "1.0.82",
+ "integrity": "sha512-UpVSFA0COmlIakAr7/6WJqJlabtKgY8y5en6La3IxGxXsLlbkGoeevSqyfXvqJyHxaGn0YGpOC1oEPL379JfCw==",
"cpu": [
"arm64"
],
@@ -510,8 +510,8 @@
}
},
"node_modules/@github/copilot-darwin-x64": {
- "version": "1.0.82-0",
- "integrity": "sha512-Lm/U5Q8kN8yEeBTWKTfIxXAgXaT6zqdBzAAO7lA4DWHZ92AEeZZiVTs6jEWsQ2aWB2uMs6zbn0vi6t+/jIqCGw==",
+ "version": "1.0.82",
+ "integrity": "sha512-wMKbxK8fpKsbATjn9dE31Pae67H1xu6dmaCuyXpXjXLsNPVjeLFszJZ30MAOwxRWz4dmA8VvEJZmLgJekojo2Q==",
"cpu": [
"x64"
],
@@ -526,8 +526,8 @@
}
},
"node_modules/@github/copilot-linux-arm64": {
- "version": "1.0.82-0",
- "integrity": "sha512-YERVMC1Q4p6l6KQHL5rVOI52rWbvgp9IwyzUBaVSGrfFuqu5BEvZ9bgHPsxTYi3Npkt5KVOXEyPMU5rAY09qQQ==",
+ "version": "1.0.82",
+ "integrity": "sha512-YDQmh0F+GzWORPmNNxQdcjHcXHxcy08dhMhbAhu4cqtMeA2sZWQqhfk9mJhHppMm9U0uR7h0KAB6nsgw/8Bsuw==",
"cpu": [
"arm64"
],
@@ -542,8 +542,8 @@
}
},
"node_modules/@github/copilot-linux-x64": {
- "version": "1.0.82-0",
- "integrity": "sha512-z2hxMVjqt4+xDRFTZv3/0K3X+aqcJhd6zPO2JxCpOVTh5CNZFaWk+XIa2iXAPWxFqdKJsQ4muXMl3zInaAOkRw==",
+ "version": "1.0.82",
+ "integrity": "sha512-vqmG9665ktgLHAkGKMjp4uVMdHqLxi8uS9zL+g2pMwZUPoM7JxkaSfOoeyYr99caF7J6VIJTWv4LdRNQyG5jrQ==",
"cpu": [
"x64"
],
@@ -558,8 +558,8 @@
}
},
"node_modules/@github/copilot-linuxmusl-arm64": {
- "version": "1.0.82-0",
- "integrity": "sha512-EcUCv2PKhBzCCvpTaS511VYTDWyhudyIRPvBpc9gFNO3hjlgiNDusf4k9vP6+E3/lHenwGYzMsyRHcYIOy4vcQ==",
+ "version": "1.0.82",
+ "integrity": "sha512-14dWfa4rBME55bKmF+Z8V+WzZNgPQZKFFBQX+EOiAgLVV/arQCnQ1m7wwa5oXjQeCIgkS/L9J8uM8jNm6cZbOA==",
"cpu": [
"arm64"
],
@@ -574,8 +574,8 @@
}
},
"node_modules/@github/copilot-linuxmusl-x64": {
- "version": "1.0.82-0",
- "integrity": "sha512-1fKVjUiZ1tdb0/d/re90EpFGXhlIPfjENp2Wo/2Kj592dWO3+IwM2qV/AOdMQ4pacW5iYHII7nibx1/EYq3LGQ==",
+ "version": "1.0.82",
+ "integrity": "sha512-Mauqa2TBjtB8W/1KXF/jJ4MbtwnLvoEQNHYoSyoX+s+nIpttmixmYBJDwKV89ZlQRdjOCuxOgraRLQ9hjjXvNQ==",
"cpu": [
"x64"
],
@@ -590,8 +590,8 @@
}
},
"node_modules/@github/copilot-win32-arm64": {
- "version": "1.0.82-0",
- "integrity": "sha512-H341wuxQHhwe/yLmORHzwC3DGzFZgGzh+TpwfyK2zjeYVbwDZ3Bax8M+9CzIED9jIBdEfAmfGzxKUHFugpXTtQ==",
+ "version": "1.0.82",
+ "integrity": "sha512-PaW9s0GTgM+svtDkB583dZRrhLrO4o10y2ozMmQ0Hi5eB11C24UdC5U81nFlvKPED7+GlnBJIFQ+oHaxHrnp3A==",
"cpu": [
"arm64"
],
@@ -606,8 +606,8 @@
}
},
"node_modules/@github/copilot-win32-x64": {
- "version": "1.0.82-0",
- "integrity": "sha512-f1ba3gG8NaoYWFHtHaHcLN4It7mclkWdCOXvwFPqPEwqCEIx/+Zh6VHiOeIcNWRS0elRP6QYDCKaTDy1TW27uQ==",
+ "version": "1.0.82",
+ "integrity": "sha512-m4iSROOMEPp1yRIQQwbnO0CDfwB4syESyHoeSLLFuynMR4/ApghAdyBrBQQcTKGsUu3R5rOE64RYlVmyKmuA9A==",
"cpu": [
"x64"
],
diff --git a/test/harness/package.json b/test/harness/package.json
index cceca0b959..c7e7647ac3 100644
--- a/test/harness/package.json
+++ b/test/harness/package.json
@@ -14,7 +14,7 @@
"node": "^20.19.0 || >=22.12.0"
},
"devDependencies": {
- "@github/copilot": "^1.0.82-0",
+ "@github/copilot": "^1.0.82",
"@modelcontextprotocol/sdk": "^1.26.0",
"@types/node": "^25.3.3",
"@types/node-forge": "^1.3.14",