mirror of
https://github.com/openai/codex.git
synced 2026-11-22 23:16:05 +00:00
Improve sandboxing, MCP errors, and cached approvals (#41196)
Expand Windows deny-read globs robustly across protected directories while preserving filesystem enforcement. Preserve structured MCP tool and resource errors through app-server responses. Bind cached Guardian classifications to current local and root authorization state so stale scores cannot approve actions. Add regression coverage for the sandbox resolver, structured protocol errors, and authorization changes. GitOrigin-RevId: 4b80ed724d869afeca79204222d8465fa99d3a24
This commit is contained in:
1 parent
0182ff3480
commit
035295b46e
18 files changed
+1285
-81
No files matched your search
@@ -1,6 +1,7 @@
|
||||
use crate::agent::AgentStatus;
|
||||
use crate::config::ConstraintResult;
|
||||
use crate::context::ContextualUserFragment;
|
||||
use crate::context::GuardianReviewEvidence;
|
||||
use crate::elicitation::ElicitationRegistration;
|
||||
use crate::session::SessionIo;
|
||||
use crate::session::SessionSettingsUpdate;
|
||||
@@ -808,6 +809,17 @@ impl CodexThread {
|
||||
self.session.multi_agent_version()
|
||||
}
|
||||
|
||||
/// Returns the current history generation and genuine user-input counts for Guardian.
|
||||
pub async fn guardian_authorization_version(&self) -> GuardianAuthorizationVersion {
|
||||
let history = self.session.conversation_history_snapshot().await;
|
||||
self.thread_extension_data()
|
||||
.get::<GuardianReviewEvidence>()
|
||||
.map_or_else(
|
||||
|| GuardianAuthorizationVersion::from_history(history.as_ref()),
|
||||
|evidence| evidence.authorization_version(history.as_ref()),
|
||||
)
|
||||
}
|
||||
|
||||
/// Returns bounded root conversation evidence and its authorization version atomically.
|
||||
pub async fn guardian_root_snapshot(&self) -> Option<GuardianRootSnapshot> {
|
||||
self.session
|
||||
|
||||
Reference in new issue
Block a user