feat: hosted relay core (cloud mode, sub-project #1)#2
Merged
Conversation
…bridge) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nd/listen Tasks 1-11 of the relay-core plan. New: config, credentials storage, supabase client, message<->row mapping, sendRemote, async-queue, listenRemote (subscribe+replay+dedupe), backend resolver, OTP auth lib, CLI login/logout/whoami + --local routing, migration SQL, tests. Local JSONL mode unchanged. 95 unit/integration tests pass; live smoke env-gated. Pending: run migration in cc-bridge Supabase + cross-machine login test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an open-core cloud mode so one account's Claude Code sessions sync messages in real time across machines. Local JSONL mode is unchanged (MIT/free); cloud activates after
cc-bridge login.This is sub-project #1 of 3 toward selling cc-bridge as a hosted relay SaaS. Billing (#2) and the
/bdistribution command (#3) follow as their own PRs.How
The CLI already routed all storage through
sendMessage()/listen(). This adds cloud equivalents behind a backend resolver — no custom server:send→ INSERT a row into Supabasemessageslisten→ subscribe topostgres_changes(replay + ULID dedupe)owner = auth.uid()) for isolationChanges
@supabase/supabase-js(only)config,credentials(0600 storage adapter),supabaseclient,message-rowmapping,send-remote,async-queue,listen-remote,backendresolver,authlogin/logout/whoamicommands +--localflag onsend/listensupabase/migrations/20260621000000_messages.sql(table + RLS + realtime)docs/superpowers/Verification
typecheck+lint+buildcleanCC_BRIDGE_SMOKE=1)Not in this PR (go-live, manual)
{{ .Token }}npm link→cc-bridge login→ cross-machine round-trip🤖 Generated with Claude Code