Repository navigation
Client: approve-in-app sign-in, notifications, @mentions - #21
Merged
Merged
Conversation
…LI name lookup extractMentions turns picked @NAMEs into mentions and UTF-8 byte offsets (correct after emoji and multibyte text), at most 10. A name edited after it was picked stays plain text. The composer suggests followed accounts first and looks a full username up on the node, kept only when the account's signed profile carries it. ./outpost cli cast resolves @NAMEs and stops on an unknown one; --no-mentions posts @ as text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replies and reactions to your last 25 casts, casts that mention you and new followers, read with castsByParent, reactionsByCast, castsByMention and linksByTargetFid (Hub gains castsByMention, linksByTarget, recastsByCast). Every message passes the feed's checks; likes and recasts are grouped per cast; newest first. The web client shows an unread count in the header, mark all read per FID, partial results while a slow node answers, and opens a notification's cast with its replies. ./outpost cli notifications [--mark-read] does the same. scripts/e2e-phase1.ts checks it all on the devnet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…local server New 5th connect choice. The page makes the Ed25519 key and sends only its public half to its own ./outpost client server, which signs Farcaster's SignedKeyRequest with the app account (stored by ./outpost app-account, mode 600) and asks api.farcaster.xyz for the approval link. The page shows the full-access, no-expiry warning first, then a QR code (uqr, MIT, bundled) and the link, polls, and saves the key only once its own node lists it as an onchain key for that app. Same-origin POSTs only; only tokens the server issued can be polled; no response or log carries the app account's key or signature. The key panel labels such keys and says where to remove them. On a devnet the page defaults key checks to the devnet's own second node. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
app-account asks for the app account's phrase or custody key in a hidden prompt, checks it owns an FID on your node, and stores it mode 600 for ./outpost client and login --app (status and remove need no server). login --app shows the full-access warning, prints a terminal QR code and the link, waits for approval, and saves the key only once your node lists it as an onchain key for that app account. uninstall only forgets such a key and says where to remove it. test/phase1-demo.ts runs the web client on a fake node with a stand-in Farcaster endpoint that checks the app account's EIP-712 signature; scripts/e2e-phase1.ts checks login --app on the devnet, including the via label. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… app account ./outpost app-account --society reads the app account's phrase or custody key on the host's computer (hidden), checks it on the node, and sends it over SSH to the server (mode 600 there; the local copy is deleted). A new service (src/server/appsignin.ts, bundled to dist/appsignin.js) runs next to the gate behind Caddy at /app-signin, members only by the gate's tokens, CORS for the hosted client, read-only container. off stops it and deletes the key from the server. Tested with the fake server in test/providers.sh and in test/appsignin.test.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README: the sign-in table row, new sections for the approval and for notifications and mentions, Limits updated (what is not tested yet: the real Farcaster app on mainnet). TRUST.md: the one extra host, where the app account's key lives, who may ask, and what a society host could still do (ask Farcaster for its own key). SECURITY.md, AGENTS.md (the person runs app-account; say what login --app gives away and wait for an OK), CONTRIBUTING.md (devnet script and demo). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- "Show them anyway" now reloads notifications too, so on a node whose gasless keys cannot be checked (a devnet without a second node) they appear, marked like the feed. - A suggestion found by looking the name up on the node is preselected, so Enter picks it instead of adding a newline and posting plain text. - The demo no longer prints its throwaway key: /demo/as-me and /demo/fresh set the page up instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ssages marked The page allows only https besides its own origin, so a devnet's plain-http node cannot be the second node and every gasless key stays unchecked. On a devnet only, show those messages marked "signer not verified" instead of an empty feed, notifications list and suggestions. Mainnet is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed.
Tip 🎯 Customize your risk assessments
✅ Automatic approvals, with your rules
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. CodeRabbit Verify
|
…rver ./outpost client, cli and app-account take --public (Farcaster's public node), --node <url> or OUTPOST_NODE_URL, and then skip the SSH tunnel, the provider and every server command. Node URLs must be https, or http on this computer. The page says it is on Farcaster's public node, not your own, with a "What does that change?" toggle. Every message check stays. Gasless keys are checked against crackle.farcaster.xyz, a second public node on a separate machine (the same operator, and the page says so). serve.js forwards the second node and the Optimism RPC too, so the browser still talks only to 127.0.0.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README Quickstart gets "Try it without a server", Settings gets OUTPOST_NODE_URL, and Limits says what a node that is not yours can do. TRUST.md says what the public-node mode trusts, including that the second node is also Farcaster's. AGENTS.md gets a no-server row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…read-only Fixes from blind verification: pictures default to off on a node that is not yours (they loaded from imagedelivery.net); /outpost/optimism forwards only read calls such as eth_call; the second-node field shows the node really used; app-account says "the node", not "your node". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g the tunnel Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Spider333
marked this pull request as ready for review
November 3, 2026 10:45
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.
Phase 1 from
PRD-phase1-signin-notifs-mentions.md: an account made in the Farcaster app can sign in by approving Outpost on the phone (no phrase), a notifications view read from your own node, and real @mentions. Draft: David does the live mainnet check of app sign-in (below) before merging. Mergingmainredeploys the hosted client.What changed, per PRD story
src/web/app.ts,index.html);src/core/appsignin.ts./outpost app-account(local, mode 600) and./outpost app-account --society(key on the society server only, servicesrc/server/appsignin.tsbehind Caddy at/app-signin, members only)src/core/notifications.ts, HubcastsByMention,linksByTarget,recastsByCast; web section;./outpost cli notificationsaria-live, "Mark all read" per FID in localStorage,--mark-readin the CLI store; refresh on open, button, poll every 2 min while visiblesrc/core/mentions.ts(extractMentions, UTF-8 byte offsets, max 10, edited picks drop); composer suggestions (followed first, full username looked up on the node and checked against the signed profile);cli cast "hi @dwr"refuses unknown nameswithMentionsinfeed.ts); now also in notifications and threadscli login --appOther changes:
fidByUsernameaccepts.ethnames; on a devnet the page defaults key checks to the devnet's own second node (Optimism mainnet knows nothing of devnet keys);scripts/e2e-phase1.tsandscripts/devnet-lib.ts(devnet end-to-end),test/phase1-demo.ts(click-through demo on a fake node),test/fake-farcaster.ts(stand-in endpoint that checks the app account's EIP-712 signature).gate.tsis unchanged: it runs with no dependencies, and EIP-712 signing needs viem, so the society signer is its own small service, like the sponsor.No server (
--public, added 30 Oct):./outpost client --public,cli --publicandapp-account --public(alsouninstall) use Farcaster's public nodesnap.farcaster.xyz:3381with no SSH tunnel, provider or server;--node <url>orOUTPOST_NODE_URLuses any other node (https, or http on 127.0.0.1;http://example.comis refused). The page says "Using Farcaster's public node, not your own" with a "What does that change?" toggle. Every message check stays. Gasless keys are checked againstcrackle.farcaster.xyz:3381, a second public node on a separate machine; Farcaster runs both, and the page and TRUST.md say so.serve.jsalso forwards the second node (GET only) and Optimism (read calls only), so the browser talks only to 127.0.0.1; pictures default to off in this mode for the same reason. Blind verification (6 checks): run 1 failed check 3 on picture loads, fixed; run 2 PASS 6/6. Writing through the public node is untested (no mainnet writes here).New dependency: uqr 0.1.3 (MIT, no dependencies, QR encoder from unjs, based on Project Nayuki's), bundled into
dist/web/app.jsanddist/cli.js. No CDN.npm auditis unchanged (the same 4 entries SECURITY.md explains).Open questions, answered
farcaster://signed-key-request?token=...link carries a token that only Farcaster's endpoint hands out:POST https://api.farcaster.xyz/v2/signed-key-requests{key, requestFid, signature, deadline}, then pollGET /v2/signed-key-request?token=(pending, approved, completed + userFid). No API key. Source: farcasterxyz/docsdocs/reference/farcaster/signer-requests.md(last change 5239bd2, 2025-11-20). The call is made by the Outpost server, the society's sign-in service or the CLI, never by the page; TRUST.md names it as the one extra host.sponsorship(EIP-191 signature of the request signature by the sponsor FID's custody, and Farcaster requires that app to have warps >= 100). Same doc, "Sponsoring a signer". Default: no sponsorship;./outpost app-account --sponsoradds it.apps/farcaster-mobile/src/screens/Settings/SettingsScreen.tsx) -> section "Connected apps", button "Manage connected apps" (screens/Advanced/ConnectedAppsSection.tsx), revoke text "Permanently revoke sign in access for {app}" (components/RevokeConnectedAppKey.tsx). The section only shows when Farcaster's server sendsshowConnectedApps(contexts/UserAppContextProvider.tsx). David to confirm on phone that the path is there for his account; the UI text says "Settings, then Advanced, then Manage connected apps".GET /v1/castsByMention?fid=andGET /v1/linksByTargetFid?target_fid=&link_type=follow(snapchain v0.15.0src/network/http_server.rs,server.rs). Both read every shard and concatenate per-shard pages unsorted, so the client sorts. Confirmed on the 0.15.0 devnet byscripts/e2e-phase1.ts.Checks
Local, on commit ce7eaf6 and after (CI result is on this PR):
npm run typecheckclean,npm test141 pass, 0 fail (119 on 771b538),npm run buildOK,bash test/providers.shOK (new society sign-in block), shellcheck 0.10.0 clean.test/mentions.test.tsproves byte offsets after🎉andGrüße, 日本 👩👩👧. Devnet:scripts/e2e-phase1.tsstores mentions[a,b]at bytes[8,13]and the feed shows the names; from the web composer on the devnet (realserve.ts),@appuser-...looked up on the node, picked with Enter, stored asmentions [709878]at[3]../outpost cli notifications, newest first; 5 new, 0 after "Mark all read", still 0 after reload.farcaster://signed-key-request?token=0x...link, no input in that path, signed in as FID 700 on the demo; with no app account the page explains./outpost app-accountand shows no QR.test/appsignin.test.ts, and the blind runs across 127 and 333 responses); stored files mode 600.dist/webcontains noapi.farcaster.xyz; its otherhttpstrings are viem constants and the existing defaults (mainnet.optimism.io,snap.farcaster.xyz), not loaded in the demo.Blind verification (fresh subagent, given only the request, the 7 checks and the repo path), run twice:
connect-src https:(existing, for charters and society nodes); an@partialnot picked from the suggestions posts as plain text (by design: only picked names become mentions).What David needs to do for the live check
No server needed: this uses Farcaster's public node (
--public). On the Mac, in a checkout of this branch:npm ci && npm run build./outpost app-account --publicand type the app account's recovery phrase or custody key yourself in the hidden prompt. Use an account made for this, never a main account (Q5)../outpost client --public, then open http://127.0.0.1:8381. The page says "Using Farcaster's public node, not your own". If this browser still has a key or a society node saved from earlier, use "Forget this key in this browser" or "Back to my own node" first../outpost app-account remove.Optional:
./outpost cli --public login --appdoes the same from the terminal.Not done
api.farcaster.xyz(rule: no mainnet writes). Tested against a stand-in endpoint that checks the signature, and on the devnet../outpost app-account --society) has not run on a real server; it is covered bytest/providers.sh(fake server) andtest/appsignin.test.ts.🤖 Generated with Claude Code