Refactor remote WebSocket transport and add servlet adapter#105
Draft
kamikaz1k wants to merge 6 commits into
Draft
Refactor remote WebSocket transport and add servlet adapter#105kamikaz1k wants to merge 6 commits into
kamikaz1k wants to merge 6 commits into
Conversation
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.
AI Disclosure: this PR was written with the help of Codex
Summary
Consumer API
Motivation / Background
My company doesn't use ktor so I wanted to see if I could support servlets without introducing any breaking changes.
Also, in preparation of the HTTP SSE RFC, I also tried to align the refactor toward transport agnosticity. The intended design is captured in ARCHITECTURE.md (along with the PLAN.md) so please let me know if this direction makes sense.
Target Architecture
flowchart TB App["Host application"] KtorClient["acp-ktor-client"] KtorServer["acp-ktor-server"] KtorShared["acp-ktor"] ServletClient["acp-servlet-client"] ServletServer["acp-servlet-server"] Future["Future framework adapter"] Endpoint["Remote /acp endpoint adapter"] WS["WebSocket profile"] HTTP["Streamable HTTP/SSE profile"] Remote["Generic remote transport core"] T["Transport interface"] P["ACP protocol runtime"] M["ACP model and JSON-RPC types"] App --> KtorClient App --> KtorServer App --> ServletClient App --> ServletServer App --> Future KtorClient --> KtorShared KtorServer --> KtorShared KtorShared --> Endpoint ServletClient --> Endpoint ServletServer --> Endpoint Future --> Endpoint Endpoint --> WS Endpoint --> HTTP WS --> Remote HTTP --> Remote Remote --> T T --> P P --> MValidation