Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support Bluesky / AT Protocol #381

Closed
snarfed opened this issue Jan 24, 2023 · 49 comments
Closed

support Bluesky / AT Protocol #381

snarfed opened this issue Jan 24, 2023 · 49 comments

Comments

@snarfed
Copy link
Owner

snarfed commented Jan 24, 2023

Background: https://bsky.social/ , https://atproto.com/docs, https://github.com/bluesky-social/atproto.

...switched to the now label for tracking roadmap and current tasks.


Blocking:

Nice to have:


Manual tests:


Implementation tasks:

@snarfed
Copy link
Owner Author

snarfed commented Jan 25, 2023

Looks like https://bsky.social/ may be the backend serving the app.bsky XRPC API for the iOS app. Most of the XRPC methods require auth though, eg https://bsky.social/xrpc/app.bsky.actor.getProfile?user=snarfed@bsky.social.app returns 401 Authentication Required, and they haven't documented auth yet. Could probably dumpster dive for it in the repo if I get bored enough!

@snarfed
Copy link
Owner Author

snarfed commented Feb 16, 2023

Movement! They've been working out and implementing federation, eg in https://github.com/bluesky-social/indigo , and they're about to invite more people to the beta app.

@snarfed
Copy link
Owner Author

snarfed commented Apr 7, 2023

They still haven't published yet, but I'm digging into this based on com.atproto.sync.getRepo/updateRepo. Eg {services.atproto_pds.endpoint}/xrpc/com.atproto.sync.getRepo?did={did}&earliest={cid_last_retrieved_root}, and from their chat:

Assuming you're on the one.social PDS and your friend's is on two.social using the handle friend.two.social.
When you tell your PDS to follow your friend, the PDS will call the com.atproto.handle method on two.social with your friend's handle, will get their DID and the CID of their repo and can then call com.atproto.sync.{get,update}Repo to get their posts etc.
When your client then calls your PDS to show posts etc, your friend's posts should be included with the rest.

@snarfed
Copy link
Owner Author

snarfed commented Apr 17, 2023

First pass at MST implementation is done! Now working on implementing the com.atproto.sync XRPC methods..

@snarfed
Copy link
Owner Author

snarfed commented May 22, 2023

(PDS implementation is in https://github.com/snarfed/arroba/ )

@maietta
Copy link

maietta commented May 22, 2023

Blue Sky, the same service that is lead by the guy who let the government access Twitter when he was in charge? I HIGHLY OPPOSE the integration of Blue Sky service because of this. Perhaps it's time to create a rolling fork that purposely removes Blue Sky and potentially other networks from the plugin.

Yeah, I'm unsubscribing from this product altogether. I won't support this in any way shape or form.

@snarfed
Copy link
Owner Author

snarfed commented May 22, 2023

Sorry to hear that! You're obviously welcome to fork or stop using Bridgy Fed at any time, that's your prerogative, and the beauty of both open source code and free (ie no cost to you) services like this.

Fwiw, Jack and others at Twitter initially kicked off the Bluesky project, but neither he nor Twitter have ever led it or had meaningful ownership or individual control over it since then. More: https://snarfed.org/bluesky-corporate-ownership-and-structure

@snarfed
Copy link
Owner Author

snarfed commented Jun 18, 2023

Moved to snarfed/arroba#2, and the BF-specific bits to #512.

@snarfed snarfed closed this as completed Jun 18, 2023
@leo60228
Copy link

leo60228 commented Jul 1, 2023

Is the intention just to allow following websites from Bluesky (like already live for ActivityPub), or to allow following Bluesky users from ActivityPub? If the latter, how will opt-in be handled?

I would personally find the ability to follow Bluesky users from Mastodon very useful, but I can see it being controversial for a number of reasons.

@snarfed
Copy link
Owner Author

snarfed commented Jul 2, 2023

Thanks for asking! The intent is to expand Bridgy Fed to be able to bridge any decentralized social protocol to any other protocol, eg web sites <=> Nostr, ActivityPub <=> Bluesky, and all other combinations. You can see some of the detailed background prep work in https://fed.brid.gy/docs#translate, along with tracking issues like #512 and #529.

Glad to hear you'd find it useful! And yup, I definitely know that it may be controversial. That's definitely not my intent, and I plan to be as careful as possible, and take all feedback into account, including experiences with existing bridges like https://mostr.pub/ ...but I expect I may still take some heat. I guess I'm ok with that.

@snarfed snarfed reopened this Jul 10, 2023
@snarfed
Copy link
Owner Author

snarfed commented Jul 10, 2023

Reopening for tracking, since we haven't actually shipped this yet. 😆

@snarfed snarfed added new protocol and removed app labels Jul 14, 2023
@ghobs91
Copy link

ghobs91 commented Jul 17, 2023

Super cool! Just to clarify, is this specific issue meant to introduce bridging between ActivityPub and Bluesky?

@snarfed
Copy link
Owner Author

snarfed commented Jul 17, 2023

@ghobs91 yes! Contingent on Bluesky turning on federation in prod, of course.

Latest status: https://snarfed.org/2023-07-11_bridgy-fed-status-update-2

@snarfed
Copy link
Owner Author

snarfed commented Jul 17, 2023

Oh and notably this would bridge Bluesky to all of the protocols that BF supports. Right now that's just AP and web (microformats2 + webmention), but we hope to add others too, eg Nostr.

snarfed added a commit that referenced this issue Aug 24, 2023
@snarfed
Copy link
Owner Author

snarfed commented Aug 29, 2023

Big milestone yesterday, https://github.com/snarfed/arroba is now successfully federating with the ATProto sandbox! Demo PDS is https://arroba-pds.appspot.com/ , user is arroba5.snarfed.org. Woot!

@snarfed
Copy link
Owner Author

snarfed commented Aug 29, 2023

Thinking through architecture here. With the other protocols we're working with so far, individual objects are at most loosely connected. We can federate profiles, follows, posts, etc independently of each other.

ATProto, on the other hand, ties all of a given user's objects together more tightly in their repo. When a non-ATProto user follows or otherwise interacts with a non-ATProto user, we can construct their repo on demand, but that's heavyweight. Should we construct them for everyone, ahead of time?

...except most of the time we'll be seeing a given non-ATProto user for the first time, so we need to be able to construct repos on the fly anyway. So maybe we just start with that, and see whether/how we can optimize later.

@snarfed snarfed removed the blocked label Sep 1, 2023
@snarfed
Copy link
Owner Author

snarfed commented Sep 26, 2023

Big milestone, shipped Bluesky => fediverse user discovery! Search for @[handle]@atproto.brid.gy (eg @jay.bsky.team@atproto.brid.gy) in any fediverse server.

@ghobs91
Copy link

ghobs91 commented Sep 26, 2023

Big milestone, shipped Bluesky => fediverse user discovery! Search for @[handle]@atproto.brid.gy (eg @jay.bsky.team@atproto.brid.gy) in any fediverse server.

Amazing! I only seem to be able to find @jay.bsky.team@atproto.brid.gy though, if i try any other bluesky handle it doesn't work.

@leo60228
Copy link

Same, WebFinger gives this response for other users:

<!doctype html>
<html lang=en>
<title>400 Bad Request</title>
<h1>Bad Request</h1>
<p>None is not a valid atproto id</p>

@snarfed
Copy link
Owner Author

snarfed commented Sep 26, 2023

Argh, looks like I deployed a bug that affects *.bsky.social handles specifically. Thanks for the nudge, fixing now.

@snarfed
Copy link
Owner Author

snarfed commented Nov 15, 2023

Previous progress reports: https://snarfed.org/2023-11-07_bridgy-fed-status-update-8, and the "previously" links at the bottom there.

@snarfed snarfed closed this as completed Nov 15, 2023
@snarfed snarfed reopened this Nov 15, 2023
@snarfed
Copy link
Owner Author

snarfed commented Nov 15, 2023

I guess I should leave this open until we can actually ship it 😎

@leo60228
Copy link

Is this functionality only enabled for some accounts? My Mastodon and ATProto sandbox accounts can see each other, but follows and posts don't seem to be going through in either direction.

@snarfed
Copy link
Owner Author

snarfed commented Nov 16, 2023

@leo60228 it's not on for any accounts, hence "until we can actually ship it" and "Not real Bluesky, only in the federation sandbox" 😁.

@leo60228
Copy link

I meant in the sandbox, I know that real Bluesky accounts won't work yet.

@snarfed
Copy link
Owner Author

snarfed commented Nov 16, 2023

Ah! No, it's not fully on in the sandbox either. I don't currently have plans to turn it back on there and leave it on, since the sandbox is just for testing and gets wiped semi-regularly. Glad you're interested though!

@ch0ccyra1n
Copy link

Is there anything I can do to contribute to this?

@snarfed
Copy link
Owner Author

snarfed commented Jan 2, 2024

Hey, thank you for offering! Sasquatch is awesome btw!

At an alpha level at least, this is basically done. We're just waiting for Bluesky team to turn on external federation. After they do that and we ship this, we'll discover a ton of bugs and missing things, as usual, but I'm not trying too hard to find all of those beforehand.

The one main thing I'm thinking about is #744, which currently caps us at 10k external accounts bridged into Bluesky. That sounds high, but I suspect it will arrive sooner than we expect.

Otherwise, feel free to look at the open issues and see if any of them grab you, I'd love the help!

@snarfed
Copy link
Owner Author

snarfed commented Jan 2, 2024

Oh, there's also #728, which somewhat blocks us from supporting reposts until bluesky-social/atproto#1811 is addressed. Feel free to evangelize or even look into fixing that!

@snarfed snarfed mentioned this issue Feb 6, 2024
4 tasks
@snarfed
Copy link
Owner Author

snarfed commented Feb 6, 2024

Bluesky is federating soon! "This month."

@snarfed snarfed added the now label Feb 7, 2024
@ch0ccyra1n
Copy link

So I guess it's federating now.

@afontenot
Copy link

Just curious about the status of Bluesky support? Given this:

We're just waiting for Bluesky team to turn on external federation. After they do that and we ship this, we'll discover a ton of bugs and missing things, as usual, but I'm not trying too hard to find all of those beforehand.

Given that federation has been active over a month, I'm wondering when this will get activated. There are people on Bluesky I'd love to be able to follow from a Mastodon server (even passively, without fully functional federation), but this doesn't seem to be working yet, e.g. searching for @username.bsky.social@atproto.brid.gy from Mastodon doesn't return a profile for me to follow.

@snarfed
Copy link
Owner Author

snarfed commented Apr 3, 2024

@afontenot yes! Bluesky's federation is currently only in beta, limited to just 10 accounts per server, so we can't launch until they lift that limit.

We also have some work left to do here too, but that limit is probably still the main blocker right now.

@afontenot
Copy link

@snarfed thanks very much for the update!

@ch0ccyra1n
Copy link

Regarding task

decide whether we have a BF protocol per lexicon/app, eg Bluesky, or just one for all of ATProto. We'd prefer the latter, but we need some app-specific semantics. Not sure yet if we can avoid all of those...

hasn't a decision been de-facto already made, at least for the time-being?

@snarfed
Copy link
Owner Author

snarfed commented Apr 5, 2024

Hmm! Surprisingly no, I don't think so. We only have the one atproto BF protocol right now, which hard codes the app.bsky lexicons and semantics. If/when we want to support new lexicons, like eg the new long-form writing service being built on ATProto (can't remember the name), I still don't know how we'd do it in BF. Fortunately we don't need to figure that out any time soon.

@RandomDSdevel
Copy link

the new long-form writing service being built on ATProto (can't remember the name)

     I don't think this is what you were referring to, but the owner/author of the blog hosted at snorre.io also built their site's comment system on top of BlueSky.

@snarfed
Copy link
Owner Author

snarfed commented Apr 6, 2024

Fun! Always nice to see other backfeed implementations like https://brid.gy/ (non-Fed). Agreed though, that's different, and it also still uses the existing app.bsky.* lexicons.

@snarfed
Copy link
Owner Author

snarfed commented Apr 11, 2024

Adding more todos and manual tests to the description at the top here, pinning this issue.

@snarfed snarfed pinned this issue Apr 11, 2024
@snarfed snarfed changed the title support Bluesky support Bluesky / AT Protocol Apr 27, 2024
@snarfed snarfed unpinned this issue May 2, 2024
@snarfed
Copy link
Owner Author

snarfed commented May 2, 2024

Closing this! Initial implementation is complete. I'm now tracking ongoing bugs and updates in the now label.

@snarfed snarfed closed this as completed May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants