Skip to content

fix: bundle @agent-relay/cloud (not published at lockstep version)#790

Closed
willwashburn wants to merge 1 commit intomainfrom
fix/bundle-agent-relay-cloud
Closed

fix: bundle @agent-relay/cloud (not published at lockstep version)#790
willwashburn wants to merge 1 commit intomainfrom
fix/bundle-agent-relay-cloud

Conversation

@willwashburn
Copy link
Copy Markdown
Member

@willwashburn willwashburn commented Apr 25, 2026

Summary

agent-relay@6.0.1 was published, but npm install agent-relay@6.0.1 fails on every platform with:

npm error code ETARGET
npm error notarget No matching version found for @agent-relay/cloud@6.0.1

@agent-relay/cloud is the only workspace package whose npm namespace isn't owned by this repo's publish flow. The publish-packages job in .github/workflows/publish.yml ships every other internal package (sdk, hooks, config, telemetry, trajectory, user-directory, utils) but cloud is absent from the matrix. The latest registry version of @agent-relay/cloud is 2.0.23, not 6.x.

Under the previous bundled-everything model this was invisible: the workspace cloud at the lockstep version got bundled into the agent-relay tarball and users never tried to fetch from registry. After #788 unbundled @agent-relay/*, agent-relay's regular dep on @agent-relay/cloud@6.0.1 causes npm install to fail because that version doesn't exist on npm.

Fix

Keep @agent-relay/cloud bundled. It's safe — cloud's only @agent-relay dependency is @agent-relay/config (also at 6.0.1, also published normally), and cloud is not in the SDK chain, so bundling it doesn't re-introduce the broker shadow-copy problem #788 just spent five commits eliminating.

Verification

Locally packed this branch and installed into a scratch project. Tree:

node_modules/agent-relay/node_modules/@agent-relay/cloud/    ← bundled
node_modules/agent-relay/node_modules/@agent-relay/config/   ← bundled (transitively via cloud)
node_modules/@agent-relay/sdk/                               ← hoisted from registry
node_modules/@agent-relay/broker-darwin-arm64/bin/agent-relay-broker ← real Mach-O executable, hoisted via SDK optional-dep

Tarball size: 1.5 MB → 4.0 MB. Most of the increase is cloud's @aws-sdk/client-s3 transitive deps. Still 6× smaller than the original 24.2 MB pre-#788.

Long-term follow-ups

  • Either publish @agent-relay/cloud from this repo at the lockstep version (figure out the namespace ownership story), or rename the workspace to avoid the collision. For now bundling restores correctness without picking a side.

Test plan

🤖 Generated with Claude Code


Open in Devin Review

@agent-relay/cloud is the only workspace package whose npm namespace
isn't owned by this repo's publish flow. The publish-packages job in
publish.yml has every other internal package (sdk, hooks, config,
telemetry, trajectory, user-directory, utils) but cloud is absent.
Latest registry version is 2.0.23, not 6.x.

Under the previous bundled-everything model this was invisible: the
workspace cloud at version 6.0.1 got bundled into the agent-relay
tarball and users never tried to fetch from registry. After unbundling,
agent-relay's regular dep on @agent-relay/cloud@6.0.1 caused install
to fail with ETARGET because that version doesn't exist on npm.

Fix: keep cloud bundled. It's safe — cloud's only @agent-relay
dependency is @agent-relay/config (also at 6.0.1, also published
normally). It's not in the SDK chain, so bundling cloud doesn't
re-introduce the broker shadow-copy problem we just spent five
commits eliminating. Verified end-to-end: a fresh install of the
locally-packed tarball produces a tree where cloud/config sit
bundled inside agent-relay/node_modules/@agent-relay/, while sdk
and the broker optional-dep package hoist correctly to the top-level
node_modules/@agent-relay/, and the broker binary at
node_modules/@agent-relay/broker-darwin-arm64/bin/agent-relay-broker
is a real Mach-O executable.

Tarball size: 1.5 MB → 4.0 MB (cloud's @aws-sdk/client-s3 transitive
deps are most of the increase). Still 6× smaller than the original
24.2 MB.

Long-term, the cleanest fix is to publish @agent-relay/cloud from
this repo at the lockstep version (or rename the workspace to avoid
the namespace collision). For now, bundling restores correctness.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@willwashburn
Copy link
Copy Markdown
Member Author

Superseded by #791 — the proper fix is restoring @agent-relay/cloud to the publish-packages matrix (commit c8c8dad dropped it). The bundling workaround in this PR isn't needed once the publish flow republishes cloud at the lockstep version.

@willwashburn willwashburn deleted the fix/bundle-agent-relay-cloud branch April 25, 2026 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant