mirror of
https://github.com/openai/codex.git
synced 2026-11-14 21:40:39 +00:00
Move Guardian review evidence into the reviewer extension (#57702)
## What changed Move review evidence storage, authorization snapshots, sender exchange selection, and bounded Node REPL evidence into `codex-guardian-reviewer`. Update core to call or re-export these APIs while retaining host-specific context rendering and capture-mode selection. Move the existing Node REPL evidence and text truncation tests alongside their implementations in the reviewer crate. GitOrigin-RevId: d851cd353cf9f31eb47ce13f43f6f935dc2f5d93
This commit is contained in:
@@ -187,30 +187,8 @@ pub enum ConfigRefreshOutcome {
|
||||
|
||||
pub use codex_guardian_context::GuardianRootMessage;
|
||||
|
||||
/// Authorization state that changes on genuine user input or history resets.
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
pub struct GuardianAuthorizationVersion {
|
||||
/// User-message/reset revision, preserved across compaction and internal context.
|
||||
pub user_message_revision: u64,
|
||||
/// False when required retained answers or root instructions are unavailable.
|
||||
pub retained_context_complete: bool,
|
||||
}
|
||||
|
||||
/// Root authorization state, selected messages and request-local originals from one snapshot.
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub struct GuardianRootSnapshot {
|
||||
/// Authoritative root from which this evidence was captured.
|
||||
pub root_thread_id: ThreadId,
|
||||
/// Distinguishes a history reset from additional authorization in the same history.
|
||||
pub(crate) history_reset_version: u64,
|
||||
pub authorization_version: GuardianAuthorizationVersion,
|
||||
/// Confirmed assistant context is relevant to review but cannot authorize an action.
|
||||
pub review_context_revision: u64,
|
||||
pub messages: Vec<GuardianRootMessage>,
|
||||
/// Request-local originals retained before the bounded compatibility projection.
|
||||
pub(crate) request_candidates: Option<codex_guardian_context::RootConversationInput>,
|
||||
pub trusted_skill_paths: Vec<String>,
|
||||
}
|
||||
pub use codex_guardian_reviewer::GuardianAuthorizationVersion;
|
||||
pub use codex_guardian_reviewer::GuardianRootSnapshot;
|
||||
|
||||
pub struct CodexThread {
|
||||
pub(crate) session: Arc<Session>,
|
||||
|
||||
Reference in New Issue
Block a user