refactor(broker): group Relaycast integration modules#908
Conversation
📝 WalkthroughWalkthroughThis PR reorganizes Relaycast broker integration code under a dedicated ChangesRelaycast module restructuring
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.trajectories/completed/2026-05/traj_5qbla7w4kzoi.json:
- Line 51: Replace the absolute local path value for the JSON key "projectId"
with a repo-relative or neutral identifier (e.g., "relay" or "./relay") so the
metadata is portable and doesn't leak user-specific info; locate the "projectId"
entry in the trajectory JSON and change the value from
"/Users/will/Projects/AgentWorkforce/relay" to a repo-relative slug or
environment-driven placeholder (e.g., "relay" or "${REPO_NAME}") and ensure any
generator/saver that writes this file uses a repo-relative value instead of an
absolute home path.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 433b6f06-90a5-45ff-9921-88502b7f43a2
📒 Files selected for processing (23)
.trajectories/completed/2026-05/traj_5qbla7w4kzoi.json.trajectories/completed/2026-05/traj_5qbla7w4kzoi.md.trajectories/index.jsoncrates/broker/src/auth.rscrates/broker/src/cli_mcp_args.rscrates/broker/src/lib.rscrates/broker/src/listen_api.rscrates/broker/src/main.rscrates/broker/src/message_bridge.rscrates/broker/src/multi_workspace.rscrates/broker/src/relaycast/auth.rscrates/broker/src/relaycast/bridge.rscrates/broker/src/relaycast/dm_participants.rscrates/broker/src/relaycast/identity.rscrates/broker/src/relaycast/mod.rscrates/broker/src/relaycast/workspace.rscrates/broker/src/relaycast/ws.rscrates/broker/src/relaycast_ws.rscrates/broker/src/runtime/mod.rscrates/broker/src/runtime/tests.rscrates/broker/src/spawner.rscrates/broker/src/worker.rscrates/broker/src/wrap.rs
💤 Files with no reviewable changes (1)
- crates/broker/src/main.rs
| }, | ||
| "commits": [], | ||
| "filesChanged": [], | ||
| "projectId": "/Users/will/Projects/AgentWorkforce/relay", |
There was a problem hiding this comment.
Avoid committing absolute local paths in trajectory metadata.
Line 51 embeds a machine-specific path (/Users/will/...), which leaks local user identity and makes metadata non-portable across environments. Prefer repo-relative identifiers/paths.
Proposed fix
- "projectId": "/Users/will/Projects/AgentWorkforce/relay",
+ "projectId": "AgentWorkforce/relay",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "projectId": "/Users/will/Projects/AgentWorkforce/relay", | |
| "projectId": "AgentWorkforce/relay", |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.trajectories/completed/2026-05/traj_5qbla7w4kzoi.json at line 51, Replace
the absolute local path value for the JSON key "projectId" with a repo-relative
or neutral identifier (e.g., "relay" or "./relay") so the metadata is portable
and doesn't leak user-specific info; locate the "projectId" entry in the
trajectory JSON and change the value from
"/Users/will/Projects/AgentWorkforce/relay" to a repo-relative slug or
environment-driven placeholder (e.g., "relay" or "${REPO_NAME}") and ensure any
generator/saver that writes this file uses a repo-relative value instead of an
absolute home path.
Summary
relaycast::*.relay_broker::relaycast.Closes #877
Verification
cargo checkcargo testcargo fmt -- --checkcargo clippy -- -D warningscargo test --releasenpm run -w @agent-relay/sdk checknpm test(rerun outside sandbox; sandboxed run only failed on localhost bind / ~/.relay permissions)