Skip to content

Releases

v0.5.1

Choose a tag to compare

@rustyconover rustyconover released this 29 Nov 20:28
  • Container image for Orchard hosting: ghcr.io/query-farm/vgi-bluesky:0.5.1 (also :X.Y and :latest),
    multi-arch (amd64 + arm64), cosign-signed. One image serves HTTP on $PORT by default
    (docker run IMAGE) and stdio (docker run -i IMAGE stdio); it runs as an unprivileged user
    with a writable home. Published by the new tag-driven docker-publish.yml workflow, which
    reuses the tag commit's passing CI run; ci.yml is now callable (workflow_call).

Image: ghcr.io/query-farm/vgi-bluesky:0.5.1

v0.5.0

Choose a tag to compare

@rustyconover rustyconover released this 25 Nov 17:40

Full Changelog: v0.4.2...v0.5.0

v0.4.2

Choose a tag to compare

@rustyconover rustyconover released this 16 Nov 23:35

Full Changelog: v0.4.1...v0.4.2

v0.4.1

Choose a tag to compare

@rustyconover rustyconover released this 16 Nov 19:03
  • Bump vgi-python to 0.52.2.

Fixed

  • jetstream dropped every operation after the first of a multi-op commit
    (a post's threadgate and postgate, say): it treated time_us as unique, but
    Jetstream stamps all the ops of one commit with the same time_us — 1–7% of
    events. Reconnects now resume at the cursor and drop replayed events by
    content, and a scan ended by max_events or seconds finishes the commit
    it is in, so cursor => <last time_us> still resumes without a gap.

Changed

  • jetstream(seconds => N) now counts the N seconds from when the connection
    opens, not from the first tick, so a slow handshake or a failover no longer
    eats the budget (a 3-second scan behind a slow connect returned no rows).
    Connecting stays separately bounded: a 10-second timeout per attempt, with
    failover between Jetstream instances for a live read.

Full Changelog: v0.4.0...v0.4.1

v0.4.0

Choose a tag to compare

@rustyconover rustyconover released this 12 Nov 16:27

Speaks VGI protocol 3.3 (vgi-python 0.51.0) and requires the current VGI DuckDB extension; 3.2 extensions are incompatible. No change to the SQL surface: the trends table and all_trends() work as before.

v0.3.1

Choose a tag to compare

@rustyconover rustyconover released this 11 Nov 16:45

Fixes filtering jetstream by collection, which failed with "'numpy' is required for this operation". DuckDB's filter evaluator needs numpy for that predicate, and vgi-python's duckdb extra doesn't install it, so numpy is now a direct dependency.

ATTACH 'bluesky' (TYPE vgi,
  LOCATION 'uvx --from git+https://github.com/Query-farm/vgi-bluesky@v0.3.1 vgi-bluesky');

Still VGI protocol 3.2 (vgi-python 0.50, vgi-rpc 0.53.1). All 9 catalog examples pass from a clean uvx install.

v0.3.0

Choose a tag to compare

@rustyconover rustyconover released this 10 Nov 16:53

The worker now works with the current VGI extension (Haybarn 2.0), which speaks protocol 3.2 and rejects 0.2.0.

ATTACH 'bluesky' (TYPE vgi,
  LOCATION 'uvx --from git+https://github.com/Query-farm/vgi-bluesky@v0.3.0 vgi-bluesky');

Compatibility

0.3.0 speaks VGI protocol 3.2. It moves to vgi-python 0.50.0 and vgi-rpc 0.53.1; the dev dependency is now haybarn 2.0. This release also includes the protocol 3.1 port, which was never released on its own.

Also since 0.2.0

  • The trends table declares its primary key and NOT NULL column as constraint records.
  • The catalog has a one-sentence vgi.subtitle for listings.
  • CI runs vgi-lint 2.2.0, which speaks protocol vgi.v3. The catalog scores 100/100.

v0.2.0

Choose a tag to compare

@rustyconover rustyconover released this 10 Oct 00:36

Errors now say what went wrong in a form programs can act on, and the worker is back in step with the current VGI extension.

ATTACH 'bluesky' (TYPE vgi,
  LOCATION 'uvx --from git+https://github.com/Query-farm/vgi-bluesky@v0.2.0 vgi-bluesky');

Coded errors

Every error carries vgi-rpc's error model — a canonical error_code, and where it helps an error_kind and typed error_details — so a client can tell a bad argument from a rate limit from an outage without parsing text:

Error Code Details
Unknown account (author_feed('medriscoll.bsky.social')) NOT_FOUND, kind bluesky.actor_not_found the actor, the "Did you mean 'medriscoll.com'?" suggestion, and a link to each matching profile
Malformed actor, post or feed reference INVALID_ARGUMENT, kind bluesky.invalid_argument which argument
Bluesky rate limit RESOURCE_EXHAUSTED how long to wait, when Bluesky says
Bluesky outage (5xx), Jetstream unreachable UNAVAILABLE

Error classes keep their Python bases, so existing except ValueError code still works.

Compatibility

The published VGI extension now speaks protocol 2.1.0, which the 0.1.0 worker (vgi-python 0.37) could not answer. 0.2.0 moves to vgi-python 0.43.1 and vgi-rpc 0.50.1.

Also since 0.1.0

  • Unknown or malformed actors fail with a clear message and a suggestion instead of a raw API error.
  • README recipes for an author's posts and for listening to the firehose for a topic, including the two DuckDB settings a live stream needs: SET streaming_buffer_size = '1KB' and SET enable_caching_operators = false.

v0.1.0

Choose a tag to compare

@rustyconover rustyconover released this 27 Sep 22:46

The first release: Bluesky as ordinary DuckDB tables — posts, threads, profiles, the follow graph, likes, reposts, quotes, custom feeds, trending topics, and the live firehose via Jetstream. Read-only and public: no credentials, no account.

ATTACH 'bluesky' (TYPE vgi,
  LOCATION 'uvx --from git+https://github.com/Query-farm/vgi-bluesky@v0.1.0 vgi-bluesky');

What's in it

  • trends — what Bluesky reports as trending, in rank order.
  • Lookups that compose under a correlated LATERAL, batched 25 to a request: profile, post, thread.
  • Listings that stream one API page per batch, so a LIMIT stops early — bsky.app alone has 35 million followers: search_actors, followers, follows, author_feed, likes, reposted_by, quotes, feed, popular_feeds, actor_feeds.
  • search_posts, with author and time predicates pushed to the API — only where that is provably no narrower.
  • jetstream() — every post, like, repost, follow and block on the network, about 400 events a second.

Actors can be given as a handle, a DID, @handle or a pasted profile URL; posts and feeds as an AT-URI or the bsky.app URL the app shows.

The firehose

-- The most-liked posts of the last 30 seconds, hydrated through post()
SELECT p.author_handle, p.text, j.likes
FROM (SELECT subject_uri, count(*) AS likes
      FROM bluesky.jetstream(collections => 'app.bsky.feed.like', seconds => 30)
      WHERE subject_uri LIKE '%/app.bsky.feed.post/%'
      GROUP BY subject_uri ORDER BY likes DESC LIMIT 5) j,
     LATERAL bluesky.post(j.subject_uri) p;
  • Bounded or endless. A call stops at seconds (default 10), max_events, a LIMIT, or an upper bound on event_time — or never, with seconds => 0. Each batch closes at batch_events or batch_ms.
  • Replay from Jetstream's ~36-hour buffer with cursor or a WHERE event_time >= …; a range replays exactly that window and stops.
  • Gapless polling. Feed the highest time_us back as cursor: it resumes after that event (Jetstream's own cursor is inclusive). Three chained polls were verified to return exactly the events of one continuous read.

Important

Streaming to a DuckDB client: SET streaming_buffer_size = '1KB' first. DuckDB holds a streaming result until ~1 MB (976.5 KiB) has accumulated. A firehose of small rows is slow to fill that — with the default, an endless scan delivered nothing to the client in 90 seconds, even though rows were passing through DuckDB's pipeline every second. With a 1 KB buffer, batches arrive about once a second over both stdio and HTTP ATTACH.

Verified

316 offline tests; 28 live tests against the public API, Jetstream and a real ATTACH; vgi-lint 100/100 with every shipped example executed. See the README and CHANGELOG for the design notes, including what the probes found: search's 403 on a cursor, getPosts' 500 on a handle URI, and a ten-second WebSocket close.