mirror of
https://github.com/openai/codex.git
synced 2026-11-25 15:24:26 +00:00
Represent terminal input in approval reviews (#40528)
## What changed - Add a `writeStdin` Guardian action carrying the approval, process, input, and working-directory details. - Distinguish `command` and `writeStdin` execution approval requests while defaulting missing kinds to `command` for compatibility with older events. - Render terminal-input review progress, denials, timeouts, and retry actions in the TUI, and record the action separately in analytics. - Keep terminal-input reviews as child approvals so they do not change the parent command item's lifecycle or reconstructed history. ## Testing - Cover Guardian serialization, app-server protocol conversion, command history reconstruction, analytics classification, and TUI review flows for terminal input. GitOrigin-RevId: b083d5e2963bdd23b928644ec03c7eb68ebf2950
This commit is contained in:
1 parent
a7b86b6201
commit
9c9675d3d0
51 files changed
+833
-26
No files matched your search
@@ -2490,7 +2490,9 @@ fn item_review_summary_key(pending_review: &PendingReviewState) -> Option<ToolIt
|
||||
turn_id: pending_review.turn_id.clone(),
|
||||
item_id: pending_review.item_id.clone()?,
|
||||
}),
|
||||
ReviewSubjectKind::Permissions | ReviewSubjectKind::NetworkAccess => None,
|
||||
ReviewSubjectKind::WriteStdin
|
||||
| ReviewSubjectKind::Permissions
|
||||
| ReviewSubjectKind::NetworkAccess => None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3030,6 +3032,11 @@ fn guardian_review_subject_metadata(
|
||||
"command_execution".to_string(),
|
||||
ReviewTrigger::Initial,
|
||||
),
|
||||
GuardianApprovalReviewAction::WriteStdin { .. } => (
|
||||
ReviewSubjectKind::WriteStdin,
|
||||
"write_stdin".to_string(),
|
||||
ReviewTrigger::Initial,
|
||||
),
|
||||
GuardianApprovalReviewAction::Execve { .. } => (
|
||||
ReviewSubjectKind::CommandExecution,
|
||||
"command_execution".to_string(),
|
||||
@@ -3081,6 +3088,7 @@ fn guardian_review_requested_additional_permissions(action: &GuardianApprovalRev
|
||||
|| permissions.file_system.is_some()
|
||||
}
|
||||
GuardianApprovalReviewAction::Command { .. }
|
||||
| GuardianApprovalReviewAction::WriteStdin { .. }
|
||||
| GuardianApprovalReviewAction::Execve { .. }
|
||||
| GuardianApprovalReviewAction::McpToolCall { .. } => false,
|
||||
}
|
||||
@@ -3094,6 +3102,7 @@ fn guardian_review_requested_network_access(action: &GuardianApprovalReviewActio
|
||||
}
|
||||
GuardianApprovalReviewAction::ApplyPatch { .. }
|
||||
| GuardianApprovalReviewAction::Command { .. }
|
||||
| GuardianApprovalReviewAction::WriteStdin { .. }
|
||||
| GuardianApprovalReviewAction::Execve { .. }
|
||||
| GuardianApprovalReviewAction::McpToolCall { .. } => false,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user