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.
Motivation
Currently, the agent seems to be using https://github.com/googollee/go-socket.io which (besides being archived) implements the v1.4 of Socket.IO client (it looks like it's compatible with 2.x as well for some reason).
Now, the current state of the JS library for communicating with the agent is pretty bad from multiple points of view (from a lack of documentation to a lack of types, to an annoying number of bugs, issues and gotchas in the current implementation).
Now, the issue is that in order to communicate with the agent we're forced to use the v2 implementation (again, because server v2 seems to be working somehow, otherwise we'd have to go v1.x - see https://socket.io/docs/v4/client-installation/#version-compatibility), and that means our hands are tied in various places:
Additionally, the implementation is not a real websocket server as stated by [Socket.IO themselves]https://socket.io/docs/v4/#what-socketio-is-not) and that makes it incompatible with [WebSocket API]((https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) forcing us to stay on v2 with the aforementioned drawbacks.
Feature