fix(sdk-swift): consume relaycast 8.x - #1564
Conversation
The 6.0.5 pin capped the engine below the agent-lifecycle status fix, so `AgentStatus` could not decode `active` / `idle` / `blocked` / `waiting`. Any Swift client re-registering an existing agent name took the 409 → `agents.get` rotate path and failed there with "Invalid Relaycast API response" — an app connected on first launch and never again. No API drift across the two majors: the facade builds unchanged and the 152-test suite passes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
Included review availability: Your plan includes up to 4 reviews per rolling hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe Swift package manifest raises the minimum ChangesSwift dependency update
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This updates the Swift SDK to the relaycast 8.x engine to restore compatibility with current agent statuses and maintain existing app behavior. No actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5df3d47749
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .package( | ||
| url: "https://github.com/AgentWorkforce/relaycast.git", | ||
| from: "6.0.5" | ||
| from: "8.0.4" |
There was a problem hiding this comment.
Record the Swift dependency fix in Unreleased
This is a user-visible patch for a reconnect failure, but the commit leaves CHANGELOG.md with an empty [Unreleased] section. Change the heading to [Unreleased - Patch] and add an impact-first Fixed entry so the fix is included in the next release narrative.
AGENTS.md reference: AGENTS.md:L31-L38
Useful? React with 👍 / 👎.
| .package( | ||
| url: "https://github.com/AgentWorkforce/relaycast.git", | ||
| from: "6.0.5" | ||
| from: "8.0.4" |
There was a problem hiding this comment.
Update the documented relaycast dependency floor
After raising the manifest floor to 8.0.4, packages/sdk-swift/README.md lines 47–50 still show from: "6.0.5" and state that the SDK depends on relaycast 6.0.5+. Readers following or maintaining the documented SwiftPM setup can therefore retain the exact 6.x decoder that this change identifies as breaking reconnects; update both the example and accompanying minimum-version statement.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/sdk-swift/Package.swift">
<violation number="1" location="packages/sdk-swift/Package.swift:29">
P3: The dependency bump to `from: "8.0.4"` makes the documentation in `packages/sdk-swift/README.md` stale. It still shows the example manifest `from: "6.0.5"` and states "`AgentRelaySDK` depends on relaycast `6.0.5+`", which now contradict the actual manifest. Update the README's version references and wording to match 8.0.4.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| .package( | ||
| url: "https://github.com/AgentWorkforce/relaycast.git", | ||
| from: "6.0.5" | ||
| from: "8.0.4" |
There was a problem hiding this comment.
P3: The dependency bump to from: "8.0.4" makes the documentation in packages/sdk-swift/README.md stale. It still shows the example manifest from: "6.0.5" and states "AgentRelaySDK depends on relaycast 6.0.5+", which now contradict the actual manifest. Update the README's version references and wording to match 8.0.4.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/sdk-swift/Package.swift, line 29:
<comment>The dependency bump to `from: "8.0.4"` makes the documentation in `packages/sdk-swift/README.md` stale. It still shows the example manifest `from: "6.0.5"` and states "`AgentRelaySDK` depends on relaycast `6.0.5+`", which now contradict the actual manifest. Update the README's version references and wording to match 8.0.4.</comment>
<file context>
@@ -26,7 +26,7 @@ let package = Package(
.package(
url: "https://github.com/AgentWorkforce/relaycast.git",
- from: "6.0.5"
+ from: "8.0.4"
)
],
</file context>
The Swift SDK resolves the relaycast engine at 8.x.
Why
from: "6.0.5"capped the engine below the agent-lifecycle status fix, soAgentStatusonly knewonline/offline/awaywhile the hosted API reportsactive,idle,blockedandwaiting.The failure is invisible on a first connection and permanent afterwards.
registerOrRotatecreates the agent when the name is free — fine. Once the name exists the call takes the 409 →agents.get(name)→rotateTokenpath, andagents.getdecodes an agent whosestatusisactive:So a Swift app connects on its very first launch and never again, with an error naming neither the field nor the call.
Verification
Observed on a macOS app that registers canvas actions over the participant SDK: reproduced the permanent failure on 6.0.5, then connected, subscribed, and registered all eight of its actions on 8.x against
cast.agentrelay.com.Two majors of engine drift, no API breakage for this facade — it compiles unchanged and the 152-test suite passes.
Handling an action invocation additionally needs relaycast #335 (invocation records decode by
invocation_id);from: "8.0.4"picks that up automatically once it releases.🤖 Generated with Claude Code