chore(app-server-protocol): split v2 API definitions into modules#21251
Merged
Conversation
ce7b9ba to
3423dca
Compare
3423dca to
c2a2f99
Compare
pakrym-oai
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
codex-rs/app-server-protocol/src/protocol/v2.rshad grown into a single ~12k-line definition file for the entire app-server v2 API.This is purely a mechanical refactor to break up the monolithic
v2.rsfile that contains all app-server API v2 types into more modular files, grouped by resource (e.g. account, thread, turn, etc.).just write-app-server-schemashows no real changes, so we can be sure that this is purely an internal organizational change.What changed
protocol/v2.rswith aprotocol/v2/module tree and a smallmod.rsthat only declares and reexports modules.account,apps,collaboration_mode,command_exec,config,device_key,experimental_feature,feedback,fs,hook,item,mcp,model,notification,permissions,plugin,process,realtime,review,thread,thread_data,turn, andwindows_sandbox.protocol/v2/tests.rssomod.rsstays small.protocol/v2/shared.rs, including the enum mirroring macro and common cross-resource types.Verification
cargo check -p codex-app-server-protocolcargo test -p codex-app-server-protocoljust write-app-server-schema