dev-null.sh integration
What was done
Added a /dev/null integration to MagicSync so users can publish "commits" (posts) to dev-null.sh, a developer social network. Writes to dev-null.sh are authenticated by SSH signatures verified against keys published on the author's GitHub account, so the integration is gated on a GitHub connection.
How it works
- GitHub provider (better-auth) — users connect GitHub (
NUXT_GITHUB_CLIENT_ID/NUXT_GITHUB_CLIENT_SECRET). Scopes:read:user,user:email,admin:public_key. - Platform
devnull— added toplatformConfigurations(4000-char limit, 3 images, JPEG/PNG/WebP ≤10 MB). - Scheduler plugin
DevNullPluginsigns the commit payload withssh-keygen -Y signand POSTs tohttps://dev-null.sh/api/cli/commits. - Connection UI —
ConnectAddAccount.vueopens aDevNullSetup.vuemodal with two tabs:- Guided (default, Option C) — terminal/GitHub-Actions steps; MagicSync never stores a key.
- Stored key (opt-in, Option A) — generates a dedicated Ed25519 key, stores it encrypted, registers the public half on GitHub. Requires explicit risk acknowledgement.
Security mitigations (Option A)
- Dedicated single-purpose key; never the user's real SSH key.
- Private key encrypted at rest via
better-auth/crypto(BETTER_AUTH_SECRET). - Explicit opt-in with risk disclosure; default stays guided (no storage).
- Revocation removes the key from both MagicSync and GitHub.
- Audit logging for generate/register/revoke/post.
- Rate-limit aware (10 submissions/min/user).
Prerequisites
- User must connect GitHub first.
- User must sign in to dev-null.sh at least once (so a
/dev/nullaccount exists).
Limitations (dev-null.sh public API)
dev-null.sh's terminal/SSH interface only supports: body, --reply, and up to 3 images. The following dev-null.sh features are not reachable from MagicSync today:
- Polls and voting — composer-only on dev-null.sh.
- Quoting a commit — separate action, not exposed via the terminal interface.
- Remotes (direct messages) / Orgs — no public write or read API for DMs.
- Comments listing — the public read API exposes
replies_countbut no replies endpoint; MagicSync shows the count as an insight instead.
Stats (stars, replies) and image/link-preview metadata are fetched via GET /api/v1/commits/{id} and surfaced as post insights.
Files touched
packages/auth/lib/auth.ts— github social provider + trustedProviderspackages/shared/shared/platformConstants.ts— devnull platform configpackages/db/.../social-media-account.service.ts—devnullin platform unionpackages/db/.../plugins/devnull.plugin.ts— new pluginpackages/db/package.json— better-auth dependencypackages/scheduler/.../AutoPost.service.ts— register pluginpackages/connect/.../useConnectionManager.ts— github + devnull connectionspackages/connect/.../ConnectAddAccount.vue— wire modalpackages/connect/.../DevNullSetup.vue+.json— setup UI + copypackages/connect/server/api/v1/social-accounts/devnull/setup.post.tspackages/connect/server/api/v1/social-accounts/devnull/revoke.post.ts