diff --git a/codex-rs/app-server-protocol/schema/json/ServerNotification.json b/codex-rs/app-server-protocol/schema/json/ServerNotification.json index 73a5210047..8bb9f25483 100644 --- a/codex-rs/app-server-protocol/schema/json/ServerNotification.json +++ b/codex-rs/app-server-protocol/schema/json/ServerNotification.json @@ -1066,12 +1066,6 @@ "null" ] }, - "reviewThreadId": { - "type": [ - "string", - "null" - ] - }, "riskLevel": { "anyOf": [ { diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json index d055e496ea..df25bf911d 100644 --- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json +++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json @@ -7810,12 +7810,6 @@ "null" ] }, - "reviewThreadId": { - "type": [ - "string", - "null" - ] - }, "riskLevel": { "anyOf": [ { diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json index 9b997f2499..a932ee0392 100644 --- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json +++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json @@ -4554,12 +4554,6 @@ "null" ] }, - "reviewThreadId": { - "type": [ - "string", - "null" - ] - }, "riskLevel": { "anyOf": [ { diff --git a/codex-rs/app-server-protocol/schema/json/v2/ItemGuardianApprovalReviewCompletedNotification.json b/codex-rs/app-server-protocol/schema/json/v2/ItemGuardianApprovalReviewCompletedNotification.json index 5f7e069bc0..df96e86d16 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ItemGuardianApprovalReviewCompletedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ItemGuardianApprovalReviewCompletedNotification.json @@ -10,12 +10,6 @@ "null" ] }, - "reviewThreadId": { - "type": [ - "string", - "null" - ] - }, "riskLevel": { "anyOf": [ { diff --git a/codex-rs/app-server-protocol/schema/json/v2/ItemGuardianApprovalReviewStartedNotification.json b/codex-rs/app-server-protocol/schema/json/v2/ItemGuardianApprovalReviewStartedNotification.json index 45a1d2bc3c..339396a50b 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ItemGuardianApprovalReviewStartedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ItemGuardianApprovalReviewStartedNotification.json @@ -10,12 +10,6 @@ "null" ] }, - "reviewThreadId": { - "type": [ - "string", - "null" - ] - }, "riskLevel": { "anyOf": [ { diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/GuardianApprovalReview.ts b/codex-rs/app-server-protocol/schema/typescript/v2/GuardianApprovalReview.ts index 287da4acdf..e26282be02 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/GuardianApprovalReview.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/GuardianApprovalReview.ts @@ -9,4 +9,4 @@ import type { GuardianRiskLevel } from "./GuardianRiskLevel"; * `item/autoApprovalReview/*` notifications. This shape is expected to change * soon. */ -export type GuardianApprovalReview = { status: GuardianApprovalReviewStatus, reviewThreadId: string | null, riskScore: number | null, riskLevel: GuardianRiskLevel | null, rationale: string | null, }; +export type GuardianApprovalReview = { status: GuardianApprovalReviewStatus, riskScore: number | null, riskLevel: GuardianRiskLevel | null, rationale: string | null, }; diff --git a/codex-rs/app-server-protocol/src/protocol/v2.rs b/codex-rs/app-server-protocol/src/protocol/v2.rs index 4b6ca6cf4e..25a035cac4 100644 --- a/codex-rs/app-server-protocol/src/protocol/v2.rs +++ b/codex-rs/app-server-protocol/src/protocol/v2.rs @@ -4297,9 +4297,6 @@ impl From for GuardianRiskLevel { #[ts(export_to = "v2/")] pub struct GuardianApprovalReview { pub status: GuardianApprovalReviewStatus, - #[serde(alias = "review_thread_id")] - #[ts(type = "string | null")] - pub review_thread_id: Option, #[serde(alias = "risk_score")] #[ts(type = "number | null")] pub risk_score: Option, @@ -7350,7 +7347,6 @@ mod tests { review, GuardianApprovalReview { status: GuardianApprovalReviewStatus::Denied, - review_thread_id: None, risk_score: Some(91), risk_level: Some(GuardianRiskLevel::High), rationale: Some("too risky".to_string()), @@ -7371,7 +7367,6 @@ mod tests { review, GuardianApprovalReview { status: GuardianApprovalReviewStatus::Aborted, - review_thread_id: None, risk_score: None, risk_level: None, rationale: None, diff --git a/codex-rs/app-server/src/bespoke_event_handling.rs b/codex-rs/app-server/src/bespoke_event_handling.rs index 53cc93f2b2..95db128dd1 100644 --- a/codex-rs/app-server/src/bespoke_event_handling.rs +++ b/codex-rs/app-server/src/bespoke_event_handling.rs @@ -215,9 +215,6 @@ fn guardian_auto_approval_review_notification( GuardianApprovalReviewStatus::Aborted } }, - review_thread_id: assessment - .review_thread_id - .map(|thread_id| thread_id.to_string()), risk_score: assessment.risk_score, risk_level: assessment.risk_level.map(Into::into), rationale: assessment.rationale.clone(), @@ -2824,7 +2821,6 @@ mod tests { payload.review.status, GuardianApprovalReviewStatus::InProgress ); - assert_eq!(payload.review.review_thread_id, None); assert_eq!(payload.review.risk_score, None); assert_eq!(payload.review.risk_level, None); assert_eq!(payload.review.rationale, None); @@ -2847,7 +2843,7 @@ mod tests { &GuardianAssessmentEvent { id: "item-2".to_string(), turn_id: "turn-from-assessment".to_string(), - review_thread_id: Some(ThreadId::new()), + review_thread_id: None, status: codex_protocol::protocol::GuardianAssessmentStatus::Denied, risk_score: Some(91), risk_level: Some(codex_protocol::protocol::GuardianRiskLevel::High), @@ -2862,7 +2858,6 @@ mod tests { assert_eq!(payload.turn_id, "turn-from-assessment"); assert_eq!(payload.target_item_id, "item-2"); assert_eq!(payload.review.status, GuardianApprovalReviewStatus::Denied); - assert!(payload.review.review_thread_id.is_some()); assert_eq!(payload.review.risk_score, Some(91)); assert_eq!( payload.review.risk_level, @@ -2903,7 +2898,6 @@ mod tests { assert_eq!(payload.turn_id, "turn-from-assessment"); assert_eq!(payload.target_item_id, "item-3"); assert_eq!(payload.review.status, GuardianApprovalReviewStatus::Aborted); - assert_eq!(payload.review.review_thread_id, None); assert_eq!(payload.review.risk_score, None); assert_eq!(payload.review.risk_level, None); assert_eq!(payload.review.rationale, None); diff --git a/codex-rs/tui_app_server/src/chatwidget.rs b/codex-rs/tui_app_server/src/chatwidget.rs index b07076baab..a0e2487b2e 100644 --- a/codex-rs/tui_app_server/src/chatwidget.rs +++ b/codex-rs/tui_app_server/src/chatwidget.rs @@ -6253,10 +6253,7 @@ impl ChatWidget { self.on_guardian_assessment(GuardianAssessmentEvent { id, turn_id, - review_thread_id: review - .review_thread_id - .as_deref() - .and_then(|thread_id| ThreadId::from_string(thread_id).ok()), + review_thread_id: None, status: match review.status { codex_app_server_protocol::GuardianApprovalReviewStatus::InProgress => { GuardianAssessmentStatus::InProgress diff --git a/codex-rs/tui_app_server/src/chatwidget/tests.rs b/codex-rs/tui_app_server/src/chatwidget/tests.rs index e3be196f9e..27ddf5825b 100644 --- a/codex-rs/tui_app_server/src/chatwidget/tests.rs +++ b/codex-rs/tui_app_server/src/chatwidget/tests.rs @@ -10229,7 +10229,6 @@ async fn app_server_guardian_review_started_sets_review_status() { target_item_id: "guardian-1".to_string(), review: GuardianApprovalReview { status: GuardianApprovalReviewStatus::InProgress, - review_thread_id: None, risk_score: None, risk_level: None, rationale: None, @@ -10268,7 +10267,6 @@ async fn app_server_guardian_review_denied_renders_denied_request_snapshot() { target_item_id: "guardian-1".to_string(), review: GuardianApprovalReview { status: GuardianApprovalReviewStatus::InProgress, - review_thread_id: None, risk_score: None, risk_level: None, rationale: None, @@ -10287,7 +10285,6 @@ async fn app_server_guardian_review_denied_renders_denied_request_snapshot() { target_item_id: "guardian-1".to_string(), review: GuardianApprovalReview { status: GuardianApprovalReviewStatus::Denied, - review_thread_id: None, risk_score: Some(96), risk_level: Some(AppServerGuardianRiskLevel::High), rationale: Some("Would exfiltrate local source code.".to_string()),