,
+}
+
+/// Confirmation that the secret values were registered.
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct SecretsAddFilterValuesResult {
+ /// Whether the values were successfully registered
+ pub ok: bool,
+}
+
/// Blob attachment with inline base64-encoded data
///
///
diff --git a/rust/src/generated/rpc.rs b/rust/src/generated/rpc.rs
index f73d1bc00..b5599e09a 100644
--- a/rust/src/generated/rpc.rs
+++ b/rust/src/generated/rpc.rs
@@ -41,6 +41,13 @@ impl<'a> ClientRpc<'a> {
}
}
+ /// `secrets.*` sub-namespace.
+ pub fn secrets(&self) -> ClientRpcSecrets<'a> {
+ ClientRpcSecrets {
+ client: self.client,
+ }
+ }
+
/// `sessionFs.*` sub-namespace.
pub fn session_fs(&self) -> ClientRpcSessionFs<'a> {
ClientRpcSessionFs {
@@ -340,6 +347,37 @@ impl<'a> ClientRpcModels<'a> {
}
}
+/// `secrets.*` RPCs.
+#[derive(Clone, Copy)]
+pub struct ClientRpcSecrets<'a> {
+ pub(crate) client: &'a Client,
+}
+
+impl<'a> ClientRpcSecrets<'a> {
+ /// Registers secret values for redaction in session logs and exports. The SDK calls this to inject dynamically generated secret values (e.g., OIDC tokens).
+ ///
+ /// Wire method: `secrets.addFilterValues`.
+ ///
+ /// # Parameters
+ ///
+ /// * `params` - Secret values to add to the redaction filter.
+ ///
+ /// # Returns
+ ///
+ /// Confirmation that the secret values were registered.
+ pub async fn add_filter_values(
+ &self,
+ params: SecretsAddFilterValuesRequest,
+ ) -> Result {
+ let wire_params = serde_json::to_value(params)?;
+ let _value = self
+ .client
+ .call(rpc_methods::SECRETS_ADDFILTERVALUES, Some(wire_params))
+ .await?;
+ Ok(serde_json::from_value(_value)?)
+ }
+}
+
/// `sessionFs.*` RPCs.
#[derive(Clone, Copy)]
pub struct ClientRpcSessionFs<'a> {
diff --git a/rust/src/generated/session_events.rs b/rust/src/generated/session_events.rs
index 319d632c1..1f6334466 100644
--- a/rust/src/generated/session_events.rs
+++ b/rust/src/generated/session_events.rs
@@ -723,9 +723,11 @@ pub struct ShutdownCodeChanges {
#[serde(rename_all = "camelCase")]
pub struct ShutdownModelMetricRequests {
/// Cumulative cost multiplier for requests to this model
- pub cost: f64,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub cost: Option,
/// Total number of API requests made to this model
- pub count: i64,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub count: Option,
}
/// Schema for the `ShutdownModelMetricTokenDetail` type.
@@ -816,7 +818,8 @@ pub struct SessionShutdownData {
#[serde(skip_serializing_if = "Option::is_none")]
pub total_nano_aiu: Option,
/// Total number of premium API requests used during the session
- pub total_premium_requests: f64,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub total_premium_requests: Option,
}
/// Session event "session.context_changed". Updated working directory and git context after the change
@@ -1587,6 +1590,9 @@ pub struct ToolExecutionCompleteData {
/// Tool execution result on success
#[serde(skip_serializing_if = "Option::is_none")]
pub result: Option,
+ /// Whether this tool execution ran inside a sandbox container
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub sandboxed: Option,
/// Whether the tool execution completed successfully
pub success: bool,
/// Unique identifier for the completed tool call
diff --git a/scripts/codegen/go.ts b/scripts/codegen/go.ts
index 03a8da8e8..6723906d4 100644
--- a/scripts/codegen/go.ts
+++ b/scripts/codegen/go.ts
@@ -158,6 +158,33 @@ function pushGoExperimentalTypeComment(lines: string[], typeName: string, ctx: G
pushGoCommentForContext(lines, goExperimentalTypeComment(typeName), ctx);
}
+function hasGoCommentLinesInLeadingDocBlock(source: string, typeDeclOffset: number, commentLines: string[]): boolean {
+ const precedingLines = source.slice(0, typeDeclOffset).split(/\r?\n/);
+ if (precedingLines[precedingLines.length - 1] === "") {
+ precedingLines.pop();
+ }
+
+ const docBlockLines: string[] = [];
+ for (let i = precedingLines.length - 1; i >= 0; i--) {
+ const line = precedingLines[i];
+ if (line.trim() === "") {
+ break;
+ }
+ if (!line.startsWith("//")) {
+ break;
+ }
+ docBlockLines.unshift(line);
+ }
+
+ for (let i = 0; i <= docBlockLines.length - commentLines.length; i++) {
+ if (commentLines.every((commentLine, offset) => docBlockLines[i + offset] === commentLine)) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
function pushGoExperimentalEventComment(lines: string[], constName: string, indent = ""): void {
pushGoComment(lines, `Experimental: ${constName} identifies an experimental event that may change or be removed.`, indent);
}
@@ -3559,9 +3586,16 @@ async function generateRpc(schemaPath?: string): Promise {
}
for (const typeName of experimentalTypeNames) {
const emittedTypeName = resolveType(typeName);
+ const experimentalCommentLines = goCommentLines(goExperimentalTypeComment(emittedTypeName));
+ const experimentalComment = experimentalCommentLines.join("\n");
generatedTypeCode = generatedTypeCode.replace(
- new RegExp(`^(type ${escapeRegExp(emittedTypeName)}\\b)`, "m"),
- `// ${goExperimentalTypeComment(emittedTypeName)}\n$1`
+ new RegExp(`^type ${escapeRegExp(emittedTypeName)}\\b`, "m"),
+ (typeDeclaration: string, offset: number, source: string) => {
+ if (hasGoCommentLinesInLeadingDocBlock(source, offset, experimentalCommentLines)) {
+ return typeDeclaration;
+ }
+ return `${experimentalComment}\n${typeDeclaration}`;
+ }
);
}
diff --git a/test/harness/package-lock.json b/test/harness/package-lock.json
index 690cfab45..3e29965e5 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.52-0",
+ "@github/copilot": "^1.0.52-1",
"@modelcontextprotocol/sdk": "^1.26.0",
"@types/node": "^25.3.3",
"@types/node-forge": "^1.3.14",
@@ -464,9 +464,9 @@
}
},
"node_modules/@github/copilot": {
- "version": "1.0.52-0",
- "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.52-0.tgz",
- "integrity": "sha512-OpeTdTaPgOwnhdGz5eSQLpcXLm5SPLWDcBRTMtCKANSyNVZCB3xHVEfMtzis+BVdePr1fSnnGIAYaG5wYnsdSg==",
+ "version": "1.0.52-1",
+ "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.52-1.tgz",
+ "integrity": "sha512-oz6m/dOpTU+FaCWXqYZj5JkJmRT+/RYcrmtGal39V+gOxTA2Nc9wIeLH1SMwMoOXC9Q6DN6keiY0wqWcHirPVg==",
"dev": true,
"license": "SEE LICENSE IN LICENSE.md",
"dependencies": {
@@ -476,20 +476,20 @@
"copilot": "npm-loader.js"
},
"optionalDependencies": {
- "@github/copilot-darwin-arm64": "1.0.52-0",
- "@github/copilot-darwin-x64": "1.0.52-0",
- "@github/copilot-linux-arm64": "1.0.52-0",
- "@github/copilot-linux-x64": "1.0.52-0",
- "@github/copilot-linuxmusl-arm64": "1.0.52-0",
- "@github/copilot-linuxmusl-x64": "1.0.52-0",
- "@github/copilot-win32-arm64": "1.0.52-0",
- "@github/copilot-win32-x64": "1.0.52-0"
+ "@github/copilot-darwin-arm64": "1.0.52-1",
+ "@github/copilot-darwin-x64": "1.0.52-1",
+ "@github/copilot-linux-arm64": "1.0.52-1",
+ "@github/copilot-linux-x64": "1.0.52-1",
+ "@github/copilot-linuxmusl-arm64": "1.0.52-1",
+ "@github/copilot-linuxmusl-x64": "1.0.52-1",
+ "@github/copilot-win32-arm64": "1.0.52-1",
+ "@github/copilot-win32-x64": "1.0.52-1"
}
},
"node_modules/@github/copilot-darwin-arm64": {
- "version": "1.0.52-0",
- "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.52-0.tgz",
- "integrity": "sha512-LgnSEze1LmrmnKNFP4fYRhH4tmxk0xz7yjXtWb/cuMBkXgAS4nUb5HaO5NZWVbldHshXWuPfOl0cuG7oFuDX8Q==",
+ "version": "1.0.52-1",
+ "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.52-1.tgz",
+ "integrity": "sha512-DWXtC/yItZVtkSQhPyRMEkFwa2mcY2rg2cu/uwJ15L9ReiYvlKYEZQDe1TMqkT+U6+k9KjA2L2HQfXVm14/vTw==",
"cpu": [
"arm64"
],
@@ -504,9 +504,9 @@
}
},
"node_modules/@github/copilot-darwin-x64": {
- "version": "1.0.52-0",
- "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.52-0.tgz",
- "integrity": "sha512-WFyeJIN5YsGRrdJPMnRBQrhU6BP0yt0PGOqOR1yvCp3n0cIVAF9sDn0fvQTCMo6cI7XAeqIrlI1xSc4nFidZDg==",
+ "version": "1.0.52-1",
+ "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.52-1.tgz",
+ "integrity": "sha512-NFTJkzzlTALMfbj9CDJ7N09PRPTVFq1+71hk+zoNx1uT/pi954liV6tKSaNAihPIXTMQKfJXGwEdjtvACpc8Vg==",
"cpu": [
"x64"
],
@@ -521,9 +521,9 @@
}
},
"node_modules/@github/copilot-linux-arm64": {
- "version": "1.0.52-0",
- "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.52-0.tgz",
- "integrity": "sha512-bOE+v954tpSXq75S3kN/Qz+91KrM8i7b3P+2+4OA2zSGNy3sKUfadKsLGJf6cmGefJCe+BVrYhVxhYhltSQJJA==",
+ "version": "1.0.52-1",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.52-1.tgz",
+ "integrity": "sha512-CZE29v+RPJClHgVE1rU+RpRWSG8lm48koRZ0taKVopqLRD6NWKjBOwFKYJojk08H8/K+BWr/paM5+R8hEZHxZw==",
"cpu": [
"arm64"
],
@@ -538,9 +538,9 @@
}
},
"node_modules/@github/copilot-linux-x64": {
- "version": "1.0.52-0",
- "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.52-0.tgz",
- "integrity": "sha512-5NCuxj2nIq4Qu5QzlK8SYxi2K2zge4ZFUGJEAgt6bTac7MFIHoBAX/59GSRca1BAR+fi61HS6W5SQUHVuWA7rQ==",
+ "version": "1.0.52-1",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.52-1.tgz",
+ "integrity": "sha512-tJhLQV70TJLq3hPXg7P6pHPfE4vaT2nENIXZsHu6fBkOcsSAxX1APSv6Bkyfsiod8EfFHkcG2+n7VXiVg8WqFw==",
"cpu": [
"x64"
],
@@ -555,9 +555,9 @@
}
},
"node_modules/@github/copilot-linuxmusl-arm64": {
- "version": "1.0.52-0",
- "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.52-0.tgz",
- "integrity": "sha512-0l6CSFNDtGwhLBuUMEBpnQB8olPeTwTc9yfCWhq1z4LtbJ4U/tdQdEJsd/EZIOzWJbXZKqDyL6iMkkme6v3B8w==",
+ "version": "1.0.52-1",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.52-1.tgz",
+ "integrity": "sha512-u24wHsUumldUEPWX/5z5IEuJvixiQEYF82N04P1g65dvOknq+89dpj+GND4Rh3Vr5u13drgj5AJqkJbWB8N+EQ==",
"cpu": [
"arm64"
],
@@ -572,9 +572,9 @@
}
},
"node_modules/@github/copilot-linuxmusl-x64": {
- "version": "1.0.52-0",
- "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.52-0.tgz",
- "integrity": "sha512-gDAf2jrK4uKly/tdoZK4PiOx7wOvHbpFgbdXBDby/tph7/l4+hKxPsXNak+bEbBoCrLeYaSMIurbaubC8UoXUg==",
+ "version": "1.0.52-1",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.52-1.tgz",
+ "integrity": "sha512-wM22FxcHL8NlnesKKQPPvtk4ojqefN7irU5tQcX+IunpD1izVQl7AOXhZyHoQ21zQnN0De8EapxOUc+WnvlxpA==",
"cpu": [
"x64"
],
@@ -589,9 +589,9 @@
}
},
"node_modules/@github/copilot-win32-arm64": {
- "version": "1.0.52-0",
- "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.52-0.tgz",
- "integrity": "sha512-DdmNzqGMZC2TkR6Bu4V4rRo6fb8KmKKlJ7FIRLkBiX33Khps1PVxKqk/TTuao6w4WvT/Sxk5gGh63mshRYlASA==",
+ "version": "1.0.52-1",
+ "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.52-1.tgz",
+ "integrity": "sha512-ecvfl9N7DPSwpiT2ZNUSXR1ZrSKwpkByOU6VcNphh4RptPZ0iNfyRNLhFCwSfFz+FvB6z2LZi+F7jSzQ3SaT3w==",
"cpu": [
"arm64"
],
@@ -606,9 +606,9 @@
}
},
"node_modules/@github/copilot-win32-x64": {
- "version": "1.0.52-0",
- "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.52-0.tgz",
- "integrity": "sha512-uvUsnPAwZwNQEmC0yQ6o8O2odQzU6RU4JE9pHTyZGmvScZ9iRvb/ZQ8oR+Dmd+RapJbCnfLMm+39yValmtGG5g==",
+ "version": "1.0.52-1",
+ "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.52-1.tgz",
+ "integrity": "sha512-a9Ct7krktP+/pfPdh/K57deYzzmL13e5Tb1pf5E152u4o/5xKzfgroNFUOzotFfFhs1jFhdzKCm3WHNLIvVEHA==",
"cpu": [
"x64"
],
diff --git a/test/harness/package.json b/test/harness/package.json
index 90d2eb804..dddf8fa5f 100644
--- a/test/harness/package.json
+++ b/test/harness/package.json
@@ -11,7 +11,7 @@
"test": "vitest run"
},
"devDependencies": {
- "@github/copilot": "^1.0.52-0",
+ "@github/copilot": "^1.0.52-1",
"@modelcontextprotocol/sdk": "^1.26.0",
"@types/node": "^25.3.3",
"@types/node-forge": "^1.3.14",