mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
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:
1 parent
0265dd7b45
commit
1fd392f6b2
9 files changed
+4
-140
No files matched your search
@@ -1,40 +0,0 @@
|
||||
use std::future::Future;
|
||||
use std::pin::Pin;
|
||||
|
||||
use codex_protocol::ThreadId;
|
||||
|
||||
/// Future returned by one host-owned internal-session spawning request.
|
||||
pub type InternalSessionSpawnFuture<'a, T, E> =
|
||||
Pin<Box<dyn Future<Output = Result<T, E>> + Send + 'a>>;
|
||||
|
||||
/// Constructor-injected host helper for extensions that need private internal sessions.
|
||||
///
|
||||
/// The extension owns the request shape and resulting handle types. The host
|
||||
/// provides the implementation when it constructs the extension.
|
||||
pub trait InternalSessionSpawner<R>: Send + Sync {
|
||||
type Spawned;
|
||||
type Error;
|
||||
|
||||
/// Starts a fresh host-owned internal session associated with its parent.
|
||||
fn spawn_internal_session<'a>(
|
||||
&'a self,
|
||||
parent_thread_id: ThreadId,
|
||||
request: R,
|
||||
) -> InternalSessionSpawnFuture<'a, Self::Spawned, Self::Error>;
|
||||
}
|
||||
|
||||
impl<R, S, E, F> InternalSessionSpawner<R> for F
|
||||
where
|
||||
F: Fn(ThreadId, R) -> InternalSessionSpawnFuture<'static, S, E> + Send + Sync,
|
||||
{
|
||||
type Spawned = S;
|
||||
type Error = E;
|
||||
|
||||
fn spawn_internal_session<'a>(
|
||||
&'a self,
|
||||
parent_thread_id: ThreadId,
|
||||
request: R,
|
||||
) -> InternalSessionSpawnFuture<'a, Self::Spawned, Self::Error> {
|
||||
self(parent_thread_id, request)
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
mod conversation_history;
|
||||
mod events;
|
||||
mod internal_session;
|
||||
mod metrics;
|
||||
mod response_items;
|
||||
|
||||
@@ -8,8 +7,6 @@ pub use conversation_history::ConversationHistorySnapshot;
|
||||
pub use events::ExtensionEventSink;
|
||||
pub use events::ExtensionWarning;
|
||||
pub use events::NoopExtensionEventSink;
|
||||
pub use internal_session::InternalSessionSpawnFuture;
|
||||
pub use internal_session::InternalSessionSpawner;
|
||||
pub use metrics::ExtensionMetrics;
|
||||
pub use response_items::NoopResponseItemInjector;
|
||||
pub use response_items::ResponseItemInjectionFuture;
|
||||
|
||||
Reference in new issue
Block a user