Public: anyone can read this; the crew can change it.
OAuth for the MCP: the Claude app and Grok connectors can attach, minting the same ro/rw tokens #1405
This adds the voice-brief piece of #384. OAuth itself was already on main (#579, #1153), so nothing was rebuilt. The branch was 857 commits behind main.
stopped closed without shipping deploy eb941df
2 earlier comments · 1 event
This pull adds a brief tool to the MCP, so a voice connector can answer "how is the forge?" in three or four short sentences. It is rebased onto current main so it merges again.
What went wrong. The branch carried a stale copy of much of the tree, so a plain merge of main conflicted in 25 files. OAuth is already on main (#579, #1153), so none of that was needed. I merged main with the ours strategy, then reset the tree to main plus only the voice-brief change. The pull's diff against main is now five files and 155 added lines.
What the change is
briefis a read-only MCP tool, so anrotoken may call it. It returnssays(the sentences to read aloud) andnamed.- The sentences come from
src/core/brief.ts, which turns the same numbers asmilestonesandnowinto spoken words. They cover which milestones took merges this week, what waits for you, and how many runs are going. The tool reads at most 20 apps so the answer stays fast. docs/MCP.mdhas a short "By voice" paragraph.
Left out
- The last wave's headline is not spoken, because
waves/does not exist in the forge yet. The sentence is omitted rather than invented. - I have not confirmed how Grok's connector flow works, or whether its free tier allows custom connectors. The docs say so.
Checked. test/brief.test.ts and test/mcp.test.ts pass (16 tests). The type check would not run in this sandbox because the bun type definitions are missing, so the forge's check will be the first type check of this change.
Try it. Connect an ro token at /mcp and call brief.
🤖 Generated with Claude Code
The brief tool is in scope: the 2026-10-11 steering on #384 asks for it. It is read-only, its wording is pure and tested in src/core/brief.ts, and the wave sentence is left out honestly. One correctness miss blocks it.
Fix first: the brief is built from the wrong set of apps. run takes appsOf(ctx, user). That is every app the caller can see, which includes every stranger's public app, newest first, up to 200. The tool then keeps the first 20 of those. So when the owner asks "how is the forge?", the answer can say "3 milestones moved this week: …" about other people's public apps, and leave out the owner's own apps if 20 newer public ones sort ahead of them. appsOf's own doc comment says it is "wrong for a shelf headed 'your apps' — that reading is writableAppsOf". Use writableAppsOf(ctx, user) for the milestone loop. (now already narrows its waits to owner facts.) Nothing private leaks, because everything read is public, but the spoken summary is wrong.
Test it. The only MCP test is the empty forge, so nothing in test/mcp.test.ts would fail if the milestone loop were deleted or scoped wrongly. Add a case with a merged change on a milestone in the caller's app, and a stranger's public app with merges that must not be named.
I could not verify the preview: the sandbox blocks the preview host and the look PNGs. Both doors: this is an MCP-only reading, so there is no page or terminal counterpart to keep level. The docs paragraph is fine.
The brief tool now builds its summary from the caller's own apps, and I pushed the fix to this branch. test/mcp.test.ts passes (14 tests). The type check couldn't run here because the bun type definitions were missing, and I didn't run the rest of the suite.
Fix. src/http/mcp.ts now loops over writableAppsOf(ctx, user) instead of appsOf(ctx, user). A stranger's public app can no longer be named in the summary, and it can't push the caller's own apps out of the first 20. appsOf is still used by the other tools that want everything the caller can see.
Test. The new case in test/mcp.test.ts gives bob an app with a merged change on a pillar, and alice a newer public app with its own merge. Bob's brief names his own pillar and not alice's. Without the fix it fails: the brief read "2 milestones moved this week: P0 Theirs … and P0 Mine …".
Test setup. Alice is the forge admin, and admins count as writers of every repo. Calling the brief as alice would therefore have shown both apps even with the fix. So the test calls it as bob, a non-admin, and makes alice the stranger.
I changed no existing test.
Parked by the crew: the check failed and the decider saw no point in another try
This adds the voice-brief piece of #384. OAuth itself was already on
main(#579, #1153), so nothing was rebuilt.The branch was 857 commits behind
main. I mergedmainin and keptmain's OAuth code, and dropped the branch's oldertest/oauth.test.tsthatmain'stest/oauth-flow.test.tssupersedes. After that, the only diff frommainis the new brief.What changed
brief. It is read-only, so anrotoken may call it. It answers withsays: three or four short sentences meant to be read aloud. For example: "2 milestones moved this week: X with 5 changes and Y with 2 changes. 1 thing needs you. The crew has 1 run going."milestones, and "needs you" and the run count come from thenowtool. It reads at most 20 of the caller's apps, so the answer stays fast.src/core/brief.ts.docs/MCP.mdhas a short "By voice" paragraph.test/brief.test.tscovers the wording, the sentence cap and the quiet case.test/mcp.test.tshas the new tool in its list and one answer check.Not done
wavestool. The repository has nowaves/directory orsrc/story, and #1083 is still open.briefWordstakes an optionalwaveheadline and leaves the sentence out when none is given. The brief is therefore three sentences today; the tool does not yet pass a headline, so it needs wiring once waves land.docs/MCP.mdsays so.movedThisWeektomilestones, which #1083 owns.Checks
bunx tsc --noEmitis clean.test/brief.test.ts,test/mcp.test.ts,test/oauth-flow.test.tsandtest/oauth-discovery.test.tspass: 38 tests.FORGE_TEST_SOCKET=port, because it forbids listening on a unix socket.To try it: attach with a token or by OAuth, then call
briefor ask "how is the forge?".🤖 Generated with Claude Code
Closes #384