feat(tui-gateway): add websocket transport foundation for dashboard chat - #14814
Closed
DChells wants to merge 1 commit into
Closed
feat(tui-gateway): add websocket transport foundation for dashboard chat#14814DChells wants to merge 1 commit into
DChells wants to merge 1 commit into
Conversation
Contributor
|
Thanks for the thoughtful PR and for splitting the transport foundation from the dashboard UI (@DChells)! This is an automated hermes-sweeper review. The transport layer this PR proposes is already present on
The follow-up dashboard UI PR #14815 is the right place to continue — the foundation it depends on is already in place. |
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
Ports the transport layer from #12710 onto current
mainsotui_gatewaycan speak the existing JSON-RPC protocol over either stdio or WebSocket.This PR intentionally stops at the transport boundary. It does not include the
/chatdashboard UI.Why
#12710 showed the right overall architecture, but it bundled two separate review surfaces into one PR:
Per the contribution guidance to keep PRs focused to one logical change, this PR isolates the backend foundation first.
That keeps the review question narrow:
It also preserves current
mainbehavior around runtime provider resolution and gracefulstate.dbfailure handling instead of trying to merge an older branch wholesale.What changed
tui_gateway/transport.pyTransportprotocolStdioTransportwrapper for current stdio behaviortui_gateway/ws.pyWSTransportimplementationgateway.readyemit on connecttui_gateway/server.pydispatch()/write_json()hermes_cli/web_server.py/api/wsendpoint using the existing dashboard tokentests/hermes_cli/test_web_server.pyHow to test
python -m pytest tests/hermes_cli/test_web_server.py -k 'TuiGatewayWebSocket or TuiGatewayTransportParity' -q python -m pytest tests/test_tui_gateway_server.py -q python -m pytest tests/hermes_cli/test_web_server.py -qTested on
Observed locally after rebasing onto current
main:13 passed— focused WebSocket/parity slice52 passed—tests/test_tui_gateway_server.py123 passed— fulltests/hermes_cli/test_web_server.pyCross-platform impact
This change touches transport/session routing inside the Python gateway and the FastAPI WebSocket endpoint. It does not add shell-specific behavior or platform-specific path logic.
I only tested on Linux, so Windows/macOS verification would still be useful from maintainers or CI.
Related issues / PRs
Notes for reviewers