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/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",
From 15735f37e944b028f905827bee897f8f2498d503 Mon Sep 17 00:00:00 2001
From: Stephen Toub
Date: Sat, 29 Aug 2026 20:18:28 -0700
Subject: [PATCH 2/2] Fix generated schema compatibility regressions
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
---
.../copilot/SessionEventHandlingTest.java | 4 +--
nodejs/test/session-event-codegen.test.ts | 29 ++++++++++++++++++-
python/copilot/generated/rpc.py | 29 ++-----------------
rust/tests/e2e/commands.rs | 1 +
rust/tests/e2e/rpc_queue.rs | 3 ++
scripts/codegen/python.ts | 12 +++++++-
6 files changed, 48 insertions(+), 30 deletions(-)
diff --git a/java/sdk/src/test/java/com/github/copilot/SessionEventHandlingTest.java b/java/sdk/src/test/java/com/github/copilot/SessionEventHandlingTest.java
index 529c42f2bb..b75e710720 100644
--- a/java/sdk/src/test/java/com/github/copilot/SessionEventHandlingTest.java
+++ b/java/sdk/src/test/java/com/github/copilot/SessionEventHandlingTest.java
@@ -213,7 +213,7 @@ void testHandlerReceivesCorrectEventData() {
SessionStartEvent startEvent = createSessionStartEvent();
startEvent.setData(new SessionStartEvent.SessionStartEventData("my-session-123", null, null, null, null, null,
- null, null, null, null, null, null, null, null, null, null));
+ null, null, null, null, null, null, null, null, null, null, null));
dispatchEvent(startEvent);
AssistantMessageEvent msgEvent = createAssistantMessageEvent("Test content");
@@ -890,7 +890,7 @@ private SessionStartEvent createSessionStartEvent() {
private SessionStartEvent createSessionStartEvent(String sessionId) {
var event = new SessionStartEvent();
var data = new SessionStartEvent.SessionStartEventData(sessionId, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null);
+ null, null, null, null, null, null, null, null, null);
event.setData(data);
return event;
}
diff --git a/nodejs/test/session-event-codegen.test.ts b/nodejs/test/session-event-codegen.test.ts
index c84d9bc082..2dad8f4f18 100644
--- a/nodejs/test/session-event-codegen.test.ts
+++ b/nodejs/test/session-event-codegen.test.ts
@@ -3,10 +3,37 @@ import { describe, expect, it } from "vitest";
import { generateSessionEventsCode as generateCSharpSessionEventsCode } from "../../scripts/codegen/csharp.ts";
import { generateGoSessionEventsCode } from "../../scripts/codegen/go.ts";
-import { generatePythonSessionEventsCode } from "../../scripts/codegen/python.ts";
+import {
+ generatePythonSessionEventsCode,
+ postProcessExternalRefsForPython,
+} from "../../scripts/codegen/python.ts";
import { generateSessionEventsCode as generateRustSessionEventsCode } from "../../scripts/codegen/rust.ts";
describe("session event codegen", () => {
+ it("replaces external reference placeholders regardless of acronym casing", () => {
+ const code = `@dataclass
+class ExternalRefMCPOauthHTTPResponse:
+ external_ref_marker_external_ref_mcp_oauth_http_response: str
+
+ @staticmethod
+ def from_dict(obj: Any) -> 'ExternalRefMCPOauthHTTPResponse':
+ value = obj.get("__externalRefMarker___ExternalRef_McpOauthHttpResponse")
+ return ExternalRefMCPOauthHTTPResponse(value)
+
+@dataclass
+class ProbeResult:
+ response: ExternalRefMCPOauthHTTPResponse
+`;
+
+ const processed = postProcessExternalRefsForPython(
+ code,
+ new Map([["__ExternalRef_McpOauthHttpResponse", "McpOauthHttpResponse"]])
+ );
+
+ expect(processed).toContain("response: McpOauthHttpResponse");
+ expect(processed).not.toContain("class ExternalRefMCPOauthHTTPResponse");
+ });
+
it("maps special schema formats to the expected Python types", () => {
const schema: JSONSchema7 = {
definitions: {
diff --git a/python/copilot/generated/rpc.py b/python/copilot/generated/rpc.py
index dbb26c3ef8..84f3718b16 100644
--- a/python/copilot/generated/rpc.py
+++ b/python/copilot/generated/rpc.py
@@ -5589,28 +5589,6 @@ def to_dict(self) -> dict:
result["serverName"] = from_str(self.server_name)
return result
-@dataclass
-class ExternalRefMCPOauthHTTPResponse:
- """HTTP response returned by the server.
-
- HTTP 401 or 403 response returned by the server.
-
- HTTP response returned by the server, when the probe reached the server and captured the
- complete response.
- """
- external_ref_marker_external_ref_mcp_oauth_http_response: str
-
- @staticmethod
- def from_dict(obj: Any) -> 'ExternalRefMCPOauthHTTPResponse':
- assert isinstance(obj, dict)
- external_ref_marker_external_ref_mcp_oauth_http_response = from_str(obj.get("__externalRefMarker___ExternalRef_McpOauthHttpResponse"))
- return ExternalRefMCPOauthHTTPResponse(external_ref_marker_external_ref_mcp_oauth_http_response)
-
- def to_dict(self) -> dict:
- result: dict = {}
- result["__externalRefMarker___ExternalRef_McpOauthHttpResponse"] = from_str(self.external_ref_marker_external_ref_mcp_oauth_http_response)
- return result
-
class Status(Enum):
AUTHENTICATED = "authenticated"
FAILED = "failed"
@@ -32985,7 +32963,7 @@ class MCPOauthProbeResult:
status: Status
"""Probe outcome variant discriminator."""
- http_response: ExternalRefMCPOauthHTTPResponse | None = None
+ http_response: McpOauthHttpResponse | None = None
"""HTTP response returned by the server.
HTTP 401 or 403 response returned by the server.
@@ -33006,7 +32984,7 @@ class MCPOauthProbeResult:
def from_dict(obj: Any) -> 'MCPOauthProbeResult':
assert isinstance(obj, dict)
status = Status(obj.get("status"))
- http_response = from_union([ExternalRefMCPOauthHTTPResponse.from_dict, from_none], obj.get("httpResponse"))
+ http_response = from_union([McpOauthHttpResponse.from_dict, from_none], obj.get("httpResponse"))
reason = from_union([MCPOauthProbeNeedsAuthReason, from_none], obj.get("reason"))
www_authenticate_params = from_union([McpOauthWWWAuthenticateParams.from_dict, from_none], obj.get("wwwAuthenticateParams"))
error = from_union([from_str, from_none], obj.get("error"))
@@ -33016,7 +32994,7 @@ def to_dict(self) -> dict:
result: dict = {}
result["status"] = to_enum(Status, self.status)
if self.http_response is not None:
- result["httpResponse"] = from_union([lambda x: to_class(ExternalRefMCPOauthHTTPResponse, x), from_none], self.http_response)
+ result["httpResponse"] = from_union([lambda x: to_class(McpOauthHttpResponse, x), from_none], self.http_response)
if self.reason is not None:
result["reason"] = from_union([lambda x: to_enum(MCPOauthProbeNeedsAuthReason, x), from_none], self.reason)
if self.www_authenticate_params is not None:
@@ -42119,7 +42097,6 @@ async def handle_git_hub_token_get_token(params: dict) -> dict | None:
"ExtensionsApi",
"ExtensionsDisableRequest",
"ExtensionsEnableRequest",
- "ExternalRefMCPOauthHTTPResponse",
"ExternalToolResult",
"ExternalToolTextResultForLlm",
"ExternalToolTextResultForLlmBinaryResultsForLlm",
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(