mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Read turn permissions from the current configuration (#36930)
## What changed - Remove the cached permission profile from `TurnContext` and derive the effective profile, filesystem policy, network policy, and legacy sandbox policy from `config.permissions`. - Update sandbox consumers and tests to use the current turn configuration. - Verify that role-based agent spawning reapplies runtime permissions and that cold-resumed agents retain their disabled permission profile. GitOrigin-RevId: d67c5d2bcbe6dc76f15b56defb485b155fd1f138
This commit is contained in:
1 parent
7ada37a15e
commit
90314a9207
14 files changed
+67
-40
No files matched your search
@@ -443,11 +443,12 @@ impl ToolRegistry {
|
||||
let tool_name_flat = flat_tool_name(&tool_name);
|
||||
let call_id_owned = invocation.call_id.clone();
|
||||
let otel = invocation.turn.session_telemetry.clone();
|
||||
let permission_profile = invocation.turn.permission_profile();
|
||||
let base_tool_result_tags = [
|
||||
(
|
||||
"sandbox",
|
||||
permission_profile_sandbox_tag(
|
||||
&invocation.turn.permission_profile,
|
||||
&permission_profile,
|
||||
invocation.turn.windows_sandbox_level,
|
||||
invocation.turn.network.is_some(),
|
||||
),
|
||||
@@ -455,7 +456,7 @@ impl ToolRegistry {
|
||||
(
|
||||
"sandbox_policy",
|
||||
permission_profile_policy_tag(
|
||||
&invocation.turn.permission_profile,
|
||||
&permission_profile,
|
||||
#[allow(deprecated)]
|
||||
invocation.turn.cwd.as_path(),
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user