Revert "Add skill approval event/response (#12633)" (#12811)

This reverts commit https://github.com/openai/codex/pull/12633. We no
longer need this PR, because we favor sending normal exec command
approval server request with `additional_permissions` of skill
permissions instead
This commit is contained in:
Celia Chen
2026-02-26 01:02:42 +00:00
committed by GitHub
parent 4fedef88e0
commit 4f45668106
32 changed files with 4 additions and 595 deletions
-18
View File
@@ -11,7 +11,6 @@ use tokio_util::task::AbortOnDropHandle;
use codex_protocol::dynamic_tools::DynamicToolResponse;
use codex_protocol::models::ResponseInputItem;
use codex_protocol::request_user_input::RequestUserInputResponse;
use codex_protocol::skill_approval::SkillApprovalResponse;
use tokio::sync::oneshot;
use crate::codex::TurnContext;
@@ -72,7 +71,6 @@ impl ActiveTurn {
pub(crate) struct TurnState {
pending_approvals: HashMap<String, oneshot::Sender<ReviewDecision>>,
pending_user_input: HashMap<String, oneshot::Sender<RequestUserInputResponse>>,
pending_skill_approvals: HashMap<String, oneshot::Sender<SkillApprovalResponse>>,
pending_dynamic_tools: HashMap<String, oneshot::Sender<DynamicToolResponse>>,
pending_input: Vec<ResponseInputItem>,
}
@@ -96,7 +94,6 @@ impl TurnState {
pub(crate) fn clear_pending(&mut self) {
self.pending_approvals.clear();
self.pending_user_input.clear();
self.pending_skill_approvals.clear();
self.pending_dynamic_tools.clear();
self.pending_input.clear();
}
@@ -124,21 +121,6 @@ impl TurnState {
self.pending_dynamic_tools.insert(key, tx)
}
pub(crate) fn insert_pending_skill_approval(
&mut self,
key: String,
tx: oneshot::Sender<SkillApprovalResponse>,
) -> Option<oneshot::Sender<SkillApprovalResponse>> {
self.pending_skill_approvals.insert(key, tx)
}
pub(crate) fn remove_pending_skill_approval(
&mut self,
key: &str,
) -> Option<oneshot::Sender<SkillApprovalResponse>> {
self.pending_skill_approvals.remove(key)
}
pub(crate) fn remove_pending_dynamic_tool(
&mut self,
key: &str,