Retire the unused Guardian extension prototype API (#45679)

## What changed

- Mark `guardian_ext` as a removed compatibility flag.
- Remove `InternalSessionSpawner`, `InternalSessionSpawnFuture`, `ApprovalReviewInput`, and `ApprovalReviewError` from the extension API, along with the spawner test.
- Remove `NodeReplReviewEvidence::review_inputs` and make the core re-exports of `NodeReplReviewEvidenceMode` crate-private.

GitOrigin-RevId: 1c532bc57264644cf521ef8077285a9b8ed67391
This commit is contained in:
felixxia-oai authored and copyberry committed 2026-09-15 11:39:20 +00:00
1 parent 0265dd7b45
commit 1fd392f6b2
9 files changed
+4 -140

No files matched your search

@@ -1,11 +1,5 @@
use std::sync::Arc;
use std::sync::Mutex;
use codex_extension_api::InternalSessionSpawnFuture;
use codex_extension_api::InternalSessionSpawner;
use codex_extension_api::NoopResponseItemInjector;
use codex_extension_api::ResponseItemInjector;
use codex_protocol::ThreadId;
use codex_protocol::models::ContentItem;
use codex_protocol::models::ResponseInputItem;
use pretty_assertions::assert_eq;
@@ -27,30 +21,3 @@ async fn noop_response_item_injector_returns_original_items() {
assert_eq!(returned_items, items);
}
#[tokio::test]
async fn closure_internal_session_spawner_forwards_arguments_and_result() {
let calls = Arc::new(Mutex::new(Vec::new()));
let recorded_calls = Arc::clone(&calls);
let spawner = move |thread_id: ThreadId,
request: String|
-> InternalSessionSpawnFuture<'static, usize, &'static str> {
recorded_calls
.lock()
.expect("agent spawn calls lock")
.push((thread_id, request.clone()));
Box::pin(async move { Ok(request.len()) })
};
let thread_id =
ThreadId::from_string("11111111-1111-4111-8111-111111111111").expect("valid thread id");
let spawned = spawner
.spawn_internal_session(thread_id, "delegate this".to_string())
.await;
assert_eq!(spawned, Ok(13));
assert_eq!(
calls.lock().expect("agent spawn calls lock").as_slice(),
[(thread_id, "delegate this".to_string())]
);
}