fix: use minProtocol: 3 instead of args.protocol in connect params#103
fix: use minProtocol: 3 instead of args.protocol in connect params#103anschmieg wants to merge 1 commit intogrp06:mainfrom
Conversation
The gateway rejects connect requests with 'protocol: N' in params. The OpenClaw ACP protocol requires separate minProtocol and maxProtocol integer fields. This fixes 'invalid request frame' errors during gateway handshake.
There was a problem hiding this comment.
Pull request overview
Updates the gateway connect profile to send an explicit minimum ACP protocol version during the WebSocket connect handshake, addressing connection failures related to protocol negotiation.
Changes:
- Hard-codes
connectParams.minProtocolto3inbuildGatewayConnectProfile.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| minProtocol: 3, | ||
| maxProtocol: args.protocol, |
There was a problem hiding this comment.
There doesn't appear to be a unit test asserting the connect request includes minProtocol/maxProtocol with the expected values (the existing tests/unit/openclawAdapter.test.ts inspects client and caps but not protocol params). Adding an assertion would prevent regressions like this from reappearing and matches the test plan described in the PR.
| minProtocol: 3, | ||
| maxProtocol: args.protocol, |
There was a problem hiding this comment.
minProtocol is now hard-coded to 3 while maxProtocol still uses args.protocol. This can produce an invalid range (e.g., minProtocol > maxProtocol) if a caller passes anything other than 3, and it also creates a split source-of-truth for the protocol version. Consider deriving both fields from the same value (either use args.protocol for both, or hard-code both and remove/rename the protocol arg to avoid divergence).
Summary
minProtocol: 3instead ofargs.protocolChanges
src/lib/controlplane/gateway-connect-profile.ts: ChangedminProtocol: args.protocoltominProtocol: 3Test plan
Fixes #101