Browser extension: detect and subscribe to standard.site publications on ATProto substandard.blog

feat(longread): add the long-thread scan and export CLI #480

targeting main from threadbare-stack-cli
Closed opened by and assigned to category-karambit.test.pds.did.bot
targeting main from threadbare-stack-cli

Adds longread under infra/longread: a public-data CLI that scans an account's posts, joins self-replies into the longest chain, ranks by length and engagement, and exports a thread as Markdown. follows merges the same table across an account's follows; publication lists a publication's documents and flags threads not yet in a blog. Quoted posts are embedded, and threads already referenced by a site.standard.document are hidden unless --include-published is passed.

The scan reads only public records through public.api.bsky.app, plc.directory and the account's PDS. It honors !no-unauthenticated, paginates history, and stops at the configured --since cutoff. The score is graphemes × (1 + ln(1 + likes + 2 × reposts + 3 × quotes)).

Covered by 11 integration tests passing and one ignored live test, plus cargo fmt --check and cargo clippy --all-targets -- -D warnings. The canonical scorer builds on this core in #509; the browser app and sign-in are in #482, based on that score.

longread scan on a public account (first ten rows):

CLI scan table

🤖 Generated with Claude Code

Commits 3

feat(longread): embed quotes, hide published threads and add a publication view
test(longread): cover ranking, paging, opt-out and export
feat(longread): add scan and export commands