feat(app-server-protocol): add v2 pullRequest protocol module#184
Open
andrei-hasna wants to merge 1 commit into
Open
feat(app-server-protocol): add v2 pullRequest protocol module#184andrei-hasna wants to merge 1 commit into
andrei-hasna wants to merge 1 commit into
Conversation
Add the v2 pullRequest protocol surface and register its three read
methods so downstream consumers can query pull-request data.
- Add protocol/v2/pull_request.rs with PullRequest{,Overview,List,Read}
params/response types plus a PullRequestQueryState enum so empty,
loading, and degraded outcomes are represented in-band on each
response instead of as JSON-RPC errors.
- Export the module from v2/mod.rs.
- Register pullRequest/overview, pullRequest/list, and pullRequest/read
in protocol/common.rs using global_shared_read("pull-request"),
mirroring the sibling read methods.
- Add ClientRequest handler arms in app-server message_processor.rs that
return in-band Unavailable query states until the backing
PullRequestRequestProcessor is implemented (todos task 1ca04ab4);
the ClientRequest match is exhaustive with no wildcard arm.
- Regenerate vendored app-server schema fixtures (typescript + json).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds the v2
pullRequestprotocol surface tocodex-app-server-protocoland registers its three read methods, keeping query outcomes in-band rather than surfacing them as JSON-RPC errors.protocol/v2/pull_request.rswithPullRequest{,Overview,List,Read}params/response types plus aPullRequestQueryStateenum (Ready/Loading/Unavailable) carried on every response so empty/loading/degraded outcomes are in-band.v2/mod.rs.pullRequest/overview,pullRequest/list,pullRequest/readinprotocol/common.rsusingglobal_shared_read("pull-request"), mirroring sibling read methods.ClientRequesthandler arms inapp-server/src/message_processor.rsreturning in-bandUnavailablequery states until the backingPullRequestRequestProcessorlands (todos task 1ca04ab4). TheClientRequestmatch is exhaustive with no wildcard arm, so these arms are required to compile.Validation
cargo build -p codex-app-server-protocol -p codex-app-server— okcargo test -p codex-app-server-protocol— 260 lib + 2 schema-fixture tests passcargo fmt --allcargo clippy -p codex-app-server-protocol -p codex-app-server— cleanFollow-ups
Downstream todos 1ca04ab4 (implement
PullRequestRequestProcessor) and 23c5b724 (migrate/prTUI) remain blocked until this lands.🤖 Generated with Claude Code