sandboxing: intersect permission profiles semantically

This commit is contained in:
Michael Bolin
2026-04-21 09:45:24 -07:00
parent 53cf12cd52
commit fee24f3d5f
27 changed files with 901 additions and 75 deletions
@@ -30,4 +30,4 @@
],
"title": "DynamicToolCallParams",
"type": "object"
}
}
@@ -295,6 +295,9 @@
}
},
"properties": {
"cwd": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"itemId": {
"type": "string"
},
@@ -315,6 +318,7 @@
}
},
"required": [
"cwd",
"itemId",
"permissions",
"threadId",
@@ -1584,6 +1584,9 @@
},
"PermissionsRequestApprovalParams": {
"properties": {
"cwd": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"itemId": {
"type": "string"
},
@@ -1604,6 +1607,7 @@
}
},
"required": [
"cwd",
"itemId",
"permissions",
"threadId",
@@ -3360,6 +3360,9 @@
"PermissionsRequestApprovalParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"cwd": {
"$ref": "#/definitions/v2/AbsolutePathBuf"
},
"itemId": {
"type": "string"
},
@@ -3380,6 +3383,7 @@
}
},
"required": [
"cwd",
"itemId",
"permissions",
"threadId",
@@ -14099,8 +14103,8 @@
},
"namespace": {
"type": [
"null",
"string"
"string",
"null"
]
},
"status": {
@@ -16612,4 +16616,4 @@
},
"title": "CodexAppServerProtocol",
"type": "object"
}
}
@@ -1,6 +1,7 @@
// GENERATED CODE! DO NOT MODIFY BY HAND!
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { AbsolutePathBuf } from "../AbsolutePathBuf";
import type { RequestPermissionProfile } from "./RequestPermissionProfile";
export type PermissionsRequestApprovalParams = { threadId: string, turnId: string, itemId: string, reason: string | null, permissions: RequestPermissionProfile, };
export type PermissionsRequestApprovalParams = { threadId: string, turnId: string, itemId: string, cwd: AbsolutePathBuf, reason: string | null, permissions: RequestPermissionProfile, };
@@ -6668,6 +6668,7 @@ pub struct PermissionsRequestApprovalParams {
pub thread_id: String,
pub turn_id: String,
pub item_id: String,
pub cwd: AbsolutePathBuf,
pub reason: Option<String>,
pub permissions: RequestPermissionProfile,
}
@@ -7102,6 +7103,7 @@ mod tests {
"threadId": "thr_123",
"turnId": "turn_123",
"itemId": "call_123",
"cwd": absolute_path_string("repo"),
"reason": "Select a workspace root",
"permissions": {
"network": {
@@ -7115,6 +7117,7 @@ mod tests {
}))
.expect("permissions request should deserialize");
assert_eq!(params.cwd, absolute_path("repo"));
assert_eq!(
params.permissions,
RequestPermissionProfile {
@@ -7162,6 +7165,7 @@ mod tests {
"threadId": "thr_123",
"turnId": "turn_123",
"itemId": "call_123",
"cwd": absolute_path_string("repo"),
"reason": "Select a workspace root",
"permissions": {
"network": null,