wss dial: connectToRemote over ws/wss URLs (mesh.exadev.io) - #150
Merged
Merged
Conversation
Mearman
marked this pull request as ready for review
September 16, 2026 22:21
connectToRemote's host argument now also accepts a ws or wss URL, dialling a WebSocket-served hub (e.g. the mesh.exadev.io cloudflare-hub, which answers wss only) instead of raw TLS -- the port is meaningless in URL form. Any other URL scheme is refused up front rather than surfacing as an opaque DNS error from the TLS dial treating the whole URL as a hostname. The URL branch drives the identical session + connect_request flow the TLS branch uses, proven by an integration test against a minimal in-test fake hub speaking the real protocol. The dial is agent-comms' own edge adapter (src/core/ws-dial.ts, the same layering its TLS adapter occupies) rather than a wire-mesh-node dependency: wire-mesh-node is not published to npm as a consumable package (a placeholder 0.0.0). It frames identically -- one CBOR frame per binary WebSocket message -- so a hub sees the same bytes from this client as from any other. Closes #149
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Mearman
force-pushed
the
feat/wss-dial
branch
from
September 16, 2026 22:23
9921b24 to
ab541c9
Compare
|
🎉 This PR is included in version 3.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Closes #149.
connectToRemote's host argument now also accepts aws://orwss://URL, dialling a WebSocket-served hub (mesh.exadev.io answers wss only) instead of raw TLS -- the port is meaningless in URL form. Any other URL scheme is refused up front rather than surfacing as an opaque DNS error from the TLS dial treating the whole URL as a hostname.The dial is agent-comms' own edge adapter (
src/core/ws-dial.ts, the same layering its TLS adapter occupies) rather than a wire-mesh-node dependency: wire-mesh-node is not published to npm as a consumable package (placeholder 0.0.0). It frames identically -- one CBOR frame per binary WebSocket message -- so a hub sees the same bytes from this client as from any other.Integration-tested against a minimal in-test fake hub speaking the real protocol (handshake reply, connect_request answered manage-ok): the URL branch drives the identical session + connect_request flow the TLS branch uses. The adapter itself is unit-tested against a real loopback ws server (round trip, scheme rejection, receive-stream end on server close).