mirror of
https://github.com/openai/codex.git
synced 2026-05-02 12:21:26 +03:00
chore(app-server): delete unused rpc methods from v1.rs (#14394)
## Description This PR trims `app-server-protocol`'s v1 surface down to the small set of legacy types we still actually use. Unfortunately, we can't delete all of them yet because: - a few one-off v1 RPCs are still used by the Codex app - a few of these app-server-protocol v1 types are actually imported by core crates This change deletes that unused RPC surface, keeps the remaining compatibility types in place, and makes the crate root re-export only the v1 structs that downstream crates still depend on. ## Why The main goal here is to make the legacy protocol surface match reality. Leaving a large pile of dead v1 structs in place makes it harder to tell which compatibility paths are still intentional, and it keeps old schema/types around even though nothing should be building against them anymore. This also gives us a cleaner boundary for future cleanup. Instead of re-exporting all of `protocol::v1::*`, the crate now explicitly exposes only the v1 types that are still live, which makes it much easier to see what remains and delete more safely later. ## What changed - Deleted the unused v1 RPC/request/response structs from `app-server-protocol/src/protocol/v1.rs`. - Kept the small set of v1 compatibility types that are still live, including: - `initialize` - `getConversationSummary` - `getAuthStatus` - `gitDiffToRemote` - legacy approval payloads - config-related structs still used by downstream crates - Replaced the blanket `pub use protocol::v1::*` export in `app-server-protocol/src/lib.rs` with an explicit list of the remaining supported v1 types. - Regenerated the schema/type artifacts, which also updated the `InitializeCapabilities` opt-out example to use `thread/started` instead of the old `codex/event/session_configured` example. ## Validation - `just write-app-server-schema` - `cargo test -p codex-app-server-protocol` ## Follow-up The next cleanup is to keep shrinking the remaining v1 compatibility surface as callers migrate off it. Once the remaining consumers stop importing these legacy types, we should be able to remove more of the v1 module and eventually stop exporting it from the crate root entirely.
This commit is contained in:
@@ -14,7 +14,28 @@ pub use export::generate_types;
|
||||
pub use jsonrpc_lite::*;
|
||||
pub use protocol::common::*;
|
||||
pub use protocol::thread_history::*;
|
||||
pub use protocol::v1::*;
|
||||
pub use protocol::v1::ApplyPatchApprovalParams;
|
||||
pub use protocol::v1::ApplyPatchApprovalResponse;
|
||||
pub use protocol::v1::ClientInfo;
|
||||
pub use protocol::v1::ConversationGitInfo;
|
||||
pub use protocol::v1::ConversationSummary;
|
||||
pub use protocol::v1::ExecCommandApprovalParams;
|
||||
pub use protocol::v1::ExecCommandApprovalResponse;
|
||||
pub use protocol::v1::GetAuthStatusParams;
|
||||
pub use protocol::v1::GetAuthStatusResponse;
|
||||
pub use protocol::v1::GetConversationSummaryParams;
|
||||
pub use protocol::v1::GetConversationSummaryResponse;
|
||||
pub use protocol::v1::GitDiffToRemoteParams;
|
||||
pub use protocol::v1::GitDiffToRemoteResponse;
|
||||
pub use protocol::v1::InitializeCapabilities;
|
||||
pub use protocol::v1::InitializeParams;
|
||||
pub use protocol::v1::InitializeResponse;
|
||||
pub use protocol::v1::InterruptConversationResponse;
|
||||
pub use protocol::v1::LoginApiKeyParams;
|
||||
pub use protocol::v1::Profile;
|
||||
pub use protocol::v1::SandboxSettings;
|
||||
pub use protocol::v1::Tools;
|
||||
pub use protocol::v1::UserSavedConfig;
|
||||
pub use protocol::v2::*;
|
||||
pub use schema_fixtures::SchemaFixtureOptions;
|
||||
#[doc(hidden)]
|
||||
|
||||
Reference in New Issue
Block a user