refactor(acp): use SDK protocol contracts - #107264
Merged
Merged
Conversation
steipete
force-pushed
the
codex/acp-sdk-types
branch
from
July 14, 2026 07:53
eece42a to
019658f
Compare
Contributor
Author
|
Land-ready proof for final rebased head
Known gap: hosted CI not awaited, per maintainer instruction. The final head has focused local proof under the current validation policy; its patch is unchanged from the full-gate run. |
steipete
force-pushed
the
codex/acp-sdk-types
branch
from
July 14, 2026 07:55
019658f to
90ed8b2
Compare
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.
What Problem This Solves
The ACP bridge duplicated contracts already guaranteed by
@agentclientprotocol/sdk@1.1.0: it inferred the SDK stream message type, rechecked discriminated protocol unions, cast discriminated content blocks, manually listed schema keys, and retained client capability/info state with no production reader.Why This Change Was Made
Use the SDK's public
AnyMessage,SessionUpdate,ContentBlock, and schema definitions directly. Delete dead client metadata state, getters, normalization, and their test. Keep the runtime JSON-object guard becausendJsonStreamparses but does not validate arbitrary JSON before this compatibility transform.User Impact
No behavior change. ACP initialization, protocol-version normalization, session updates, prompt text/images, and schema validation retain their existing behavior. The implementation shrinks by 95 lines.
Evidence
git diff --check origin/main...HEAD