mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
Preserve plugin attribution across command approvals (#35029)
## What changed - Add optional `plugin_id` and `script_path` fields to execution approval and guardian assessment events. - Propagate validated plugin attribution through delegated approvals, guardian-reviewed command items, app-server notifications, thread history, and rollout traces. - Preserve attribution on both started and completed command items, including declined commands. ## Testing - Extend core, app-server, thread-history, and rollout-trace tests to cover plugin attribution propagation and serialization. GitOrigin-RevId: 723684d010cab04142918d7a95e06ed95d008da1
This commit is contained in:
@@ -183,6 +183,14 @@ pub struct GuardianAssessmentEvent {
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional)]
|
||||
pub target_item_id: Option<String>,
|
||||
/// Trusted plugin attribution for command items synthesized from this review.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional)]
|
||||
pub plugin_id: Option<String>,
|
||||
/// Safe plugin-relative path for command items synthesized from this review.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional)]
|
||||
pub script_path: Option<String>,
|
||||
/// Turn ID that this assessment belongs to.
|
||||
/// Uses `#[serde(default)]` for backwards compatibility.
|
||||
#[serde(default)]
|
||||
@@ -218,6 +226,14 @@ pub struct GuardianAssessmentEvent {
|
||||
pub struct ExecApprovalRequestEvent {
|
||||
/// Identifier for the associated command execution item.
|
||||
pub call_id: String,
|
||||
/// Trusted plugin attribution for the command item, when available.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional)]
|
||||
pub plugin_id: Option<String>,
|
||||
/// Safe plugin-relative path for the command item, when available.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional)]
|
||||
pub script_path: Option<String>,
|
||||
/// Identifier for this specific approval callback.
|
||||
///
|
||||
/// When absent, the approval is for the command item itself (`call_id`).
|
||||
|
||||
Reference in New Issue
Block a user