mirror of
https://github.com/openai/codex.git
synced 2026-04-29 08:56:38 +00:00
Add skill approval event/response (#12633)
Set the stage for skill-level permission approval in addition to command-level. Behind a feature flag.
This commit is contained in:
@@ -40,6 +40,7 @@ use crate::openai_models::ReasoningEffort as ReasoningEffortConfig;
|
||||
use crate::parse_command::ParsedCommand;
|
||||
use crate::plan_tool::UpdatePlanArgs;
|
||||
use crate::request_user_input::RequestUserInputResponse;
|
||||
use crate::skill_approval::SkillApprovalResponse;
|
||||
use crate::user_input::UserInput;
|
||||
use codex_utils_absolute_path::AbsolutePathBuf;
|
||||
use schemars::JsonSchema;
|
||||
@@ -60,6 +61,7 @@ pub use crate::approvals::NetworkApprovalProtocol;
|
||||
pub use crate::approvals::NetworkPolicyAmendment;
|
||||
pub use crate::approvals::NetworkPolicyRuleAction;
|
||||
pub use crate::request_user_input::RequestUserInputEvent;
|
||||
pub use crate::skill_approval::SkillRequestApprovalEvent;
|
||||
|
||||
/// Open/close tags for special user-input blocks. Used across crates to avoid
|
||||
/// duplicated hardcoded strings.
|
||||
@@ -293,6 +295,14 @@ pub enum Op {
|
||||
response: DynamicToolResponse,
|
||||
},
|
||||
|
||||
/// Resolve a skill approval request.
|
||||
SkillApproval {
|
||||
/// Item id for the in-flight request.
|
||||
id: String,
|
||||
/// User decision.
|
||||
response: SkillApprovalResponse,
|
||||
},
|
||||
|
||||
/// Append an entry to the persistent cross-session message history.
|
||||
///
|
||||
/// Note the entry is not guaranteed to be logged if the user has
|
||||
@@ -1043,6 +1053,8 @@ pub enum EventMsg {
|
||||
|
||||
DynamicToolCallRequest(DynamicToolCallRequest),
|
||||
|
||||
SkillRequestApproval(SkillRequestApprovalEvent),
|
||||
|
||||
ElicitationRequest(ElicitationRequestEvent),
|
||||
|
||||
ApplyPatchApprovalRequest(ApplyPatchApprovalRequestEvent),
|
||||
|
||||
Reference in New Issue
Block a user