Repository navigation
fix: align ACP v2 runtime and connection hooks with v1 - #217
Merged
Merged
Conversation
PsiACE
force-pushed
the
fix/v2-align-runtime-and-hooks
branch
from
November 29, 2026 06:36
4cab7b3 to
b2d82fd
Compare
PsiACE
force-pushed
the
fix/v2-align-runtime-and-hooks
branch
from
November 29, 2026 07:23
b2d82fd to
a882555
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.
Aligns ACP v2 runtime behavior and connection hooks with v1 conventions while conforming to the ACP v2
schema-v2.0.0-beta.4draft.Summary
ext_method/ext_notificationprepend_on send and strip_on receive, while keeping v2 inherited-stub semantics (-32601/ ignored).on_connectsucceeds across v1 and v2 connections so hook failures do not leak receive tasks, makeConnection.start_listening()/main_loop()idempotent against duplicate readers, and alignv2.AgentSideConnectionwith v1's publiclisteningparameter andlisten()method.AgentProtocolRouterwith the beta.4 draft:-32600) and ignore pre-initialization notifications, including while the firstinitializeis in flight; fail fast on agent sends before first success while allowing callbacks during repeatinitialize.initializeon the same connection and repeatinitializebefore the first non-initialize request (restoring prior state on remoteRequestError, closing on incompatible responses).AgentProtocolRouter, cache per-version attached handlers across retries, allow same-version repeats and downgrades (deactivating superseded v2 wrappers after a successful downgrade), and reject upward version switches with-32600.model_extrafields for custom v2 modes according to the handler signature, remove unused router aliases, and exportacp.__version__.Verification
make gen-checkmake checkmake test(704 passed, 1 skipped, 0 warnings)NO_MKDOCS_2_WARNING=true make docs-test