myna repost: share someone's post from one of your accounts - #4
Merged
Conversation
A retweet on X, a boost on Mastodon and Pixelfed, a repost on Bluesky. Takes the post URL as copied from the network, or its native id, so `myna repost x:@chovy https://x.com/ProfullstackInc/status/123` is the whole command. Adapters that can do it declare `caps.repost`, and the registry test holds them to it. Mastodon resolves a URL from another instance through its search endpoint first, since a remote status has no local id until the instance has fetched it. Bluesky resolves the author's handle to a DID and fetches the post's cid, because a repost record points at one version of a post. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HWRBUb6VUCM2xBmRk91FzG
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HWRBUb6VUCM2xBmRk91FzG
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.
What
A retweet on X, a boost on Mastodon and Pixelfed, a repost on Bluesky. The post is whatever a person has to hand: the URL copied from the network, or the native id.
How
Network.repost?(account, ref)joins the adapter contract next toremove, with acaps.repostflag. The registry test now checks that any network claiming it implements it.POST /2/users/:id/retweets. Accepts x.com, twitter.com,/i/status/and bare ids.POST /api/v1/statuses/:id/reblog. A URL on the account's own instance is used directly. A URL from another instance goes through/api/v2/search?resolve=truefirst, because a remote status has no local id until the instance has fetched it.app.bsky.feed.repostrecord. A bsky.app URL names the author by handle, so the handle is resolved to a DID, and the post's cid is fetched, since a repost points at one version of a post. Also acceptsat://uris and theuri|cidcomposite thatpostreturns.Help text, TUI command list and README updated.
Tests
packages/core/test/repost-refs.test.tscovers the three reference parsers (URL shapes, bare ids, wrong-network rejections).bun test: 122 pass, 0 fail.bun run typecheck: clean.Live: the X path was run for real from the dev build, @chovy retweeting a ProfullstackInc post, and X accepted it. The Mastodon and Bluesky paths are unit-tested at the parser level only; the only connected accounts there would have been boosting their own posts.
Not in this PR
myna_repost) yet; the CLI and TUI are the surfaces.myna history.🤖 Generated with Claude Code
https://claude.ai/code/session_01HWRBUb6VUCM2xBmRk91FzG