fix(sdk): accept @agent-relay/sdk 18 as an optional peer
Merged
KH
4d ago+2+2+0123456789-2-2-0123456789
Why
The agent-relay 18.0.0 publish (relay run 42576272570) failed in Build & Version. relayflows-peer-compat.test.ts hit ERESOLVE because @relayflows/sdk@2.0.65 has the optional peer @agent-relay/sdk: >=12.3.1 <13 || >=15.1.0 <18. Nothing was published. This is the same failure #701 fixed for Relay 17.
Change
packages/sdk's optional peer@agent-relay/sdkis now>=12.3.1 <13 || >=15.1.0 <19. The lockfile's root entry matches.@agent-relay/harness-driverstays at<18. Relay 18 retires the broker and no longer publishes harness-driver, so npm keeps resolving its frozen 17.x release. Relay's peer-compat test only checks the@agent-relay/sdkpeer.
Compatibility with 18
- From
@agent-relay/sdkthe SDK loads onlyRelaycastMessagingClient, from the package root. - In relay,
packages/sdk/src/index.tsandpackages/sdk/src/messaging/are unchanged betweenv17.2.1and the 18.0.0 candidate (11be40c92).
Validation
I packed this manifest and installed it beside a workspace @agent-relay/sdk, the same way relay's peer-compat test does:
@agent-relay/sdk18.0.0 installs, and so does 17.2.1.- 19.0.0 still fails with ERESOLVE, which the test's second half requires.
- Control: the old
<18range fails with ERESOLVE on 18.0.0, reproducing the release failure.
After merge
- Lockstep release 2.0.66 (package=all).
- Bump relay's
@relayflows/sdkpin to 2.0.66, then rerun relay's 18.0.0 publish.
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Widens @relayflows/sdk's optional peer range for @agent-relay/sdk from <18 to <19 so relay's 18.0.0 publish no longer fails with ERESOLVE.
@agent-relay/harness-driverstays at<18; relay 18 no longer publishes it, and npm keeps resolving the frozen 17.x release.- The SDK loads only
RelaycastMessagingClientfrom the package root, unchanged between relay v17.2.1 and the 18.0.0 candidate. - Verified by packing the manifest and installing beside a workspace
@agent-relay/sdk: 18.0.0 and 17.2.1 install, while 19.0.0 still fails as the peer-compat test requires. - After merge, release 2.0.66, bump relay's
@relayflows/sdkpin, then rerun relay's 18.0.0 publish.