Skip to content

share: send chats to IRIS's own share server, never opncd.ai (#191488) - #356

Merged
mayoalexander merged 1 commit into
iris/1.18.23from
wt/191488-share-to-iris-desktop
Oct 28, 2026
Merged

mayoalexander merged 1 commit into
iris/1.18.23from
wt/191488-share-to-iris-desktop

Conversation

@mayoalexander

Copy link
Copy Markdown

Why

Share in IRIS Desktop uploaded people's chats to a third party (#191488, HIGH). opencode's share client defaults to https://opncd.ai (opencode's public servers), or, for a signed-in opencode organisation, to opencode's console, and IRIS never changed either. Alex: "we need to point that at our OWN servers."

What

  • New src/share/iris-target.ts holds the pure function irisShareTarget().
    • Default: IRIS at IRIS_API (https://heyiris.io) /api/v6/shares, signed with the person's IRIS_API_KEY.
    • enterprise.url: still honoured. It's a deliberate config choice.
    • No IRIS sign-in: Share refuses with "Sharing needs an IRIS sign-in. Sign in to IRIS, then share again." There is no fallback to opncd.ai or opencode's console.
  • ShareNext.request() uses it, so create, sync, remove and import all follow. opencode accounts no longer decide where a share goes.
  • Server: FREELABEL/fl-iris-api#233, owner-only, with reject.phi, and links on heyiris.io/share/<id>. Until that is deployed, Share fails closed with an HTTP error, which is safer than today.

Verification

  • src/share/iris-target.test.ts (4): the IRIS target and key; refusal without sign-in; enterprise.url honoured; the share client source no longer contains https://opncd.ai or active_org_id.
  • test/share/share-next.test.ts: two tests that asserted the old behaviour ("default URL is opncd.ai", "an org account goes to opencode's console") were rewritten to the new rules. A third would only duplicate the source guard, so it was dropped, with a note.
  • test/share/share-next.test.ts + test/cli/import.test.ts + the new file: 17 pass. bun run typecheck (bun 1.3.14) is clean.

After merge

A Desktop release ships it. To check on the released app: run Share on a chat, and the link starts https://heyiris.io/share/. GET /api/v6/shares/<id>/data with your key returns the chat. Nothing reaches opncd.ai.

🤖 Generated with Claude Code

opencode's share client defaulted to opencode's public servers (opncd.ai) or,
for a signed-in opencode organisation, opencode's console. IRIS never changed
that, so Share in IRIS Desktop uploaded people's chats to a third party.

request() now goes through irisShareTarget(): IRIS at IRIS_API (heyiris.io)
/api/v6/shares, signed with the person's IRIS_API_KEY. An enterprise.url someone
configures on purpose is still honoured. There is no fallback: without an IRIS
sign-in, Share refuses and says why. opencode accounts no longer decide where a
share goes. Server: fl-iris-api #233.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mayoalexander
mayoalexander merged commit 6c59351 into iris/1.18.23 Oct 28, 2026
1 of 6 checks passed
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