feat(serve): --qr flag for Antigravity-style remote pairing (issue #47241) - #47242
Draft
AhsanIqbal-web wants to merge 1 commit into
Draft
AhsanIqbal-web wants to merge 1 commit into
AhsanIqbal-web wants to merge 1 commit into
Conversation
- resolveAddresses: enumerate non-loopback IPv4s (LAN/tailscale/localhost) - buildPairingPayload: emit Hona pairing format (urls sorted by scope) - renderQrPairing: terminal unicode-block QR + connect URL - serve --qr: ephemeral password when OPENCODE_SERVER_PASSWORD unset
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
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.
Issue for this PR
Closes #47241
Type of change
What does this PR do?
This PR adds a
--qrflag toopencode serveso a server can emit a scannable pairing payload for the OpenCode mobile/desktop app — the missing server-side half of the QR pairing flow (complementary to the scan-side decoder in #46098). When invoked, it resolves the machine's IPv4 interfaces (loopback / tailnet / private / public ordering), ensures a password exists (generating an ephemeral one whenOPENCODE_SERVER_PASSWORDis unset), and renders a terminal QR encoding the exactPairingInfoschema decoded bypackages/app/src/servers/connect/pairing.ts. Without--qr,servebehavior is unchanged.How did you verify your code works?
bun typecheckinpackages/opencode→ exit 0Ethernet 172.16.20.112, payload{ urls: ["http://172.16.20.112:5555","http://127.0.0.1:5555"], username:"", password:"demo-pass" }— schema-identical topairing.tsqrcodenot introduced)Screenshots / recordings
No UI change — terminal output is the deliverable.
Checklist