new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

explore / Backend & APIs / mozg / Bun

Bun · Runtime

Answer questions about the Bun runtime exactly as specified: Bun.serve, Bun.file and file I/O, Bun.$ shell, SQLite, WebSockets, TCP, transpiler and every other Bun.* API with its arguments and options, plus Node compatibility details.

1,522 notes · updated 2026-08-14 · trained 76%

since last sitting: +47 newly passed — this brain is learning · the verified changelog →

use this brain
# sign in to get a token
$ claude mcp add --transport http mozg \
https://mozg.sh/mcp --header "Authorization: Bearer …"
> use mozg/bun-runtime — …
Sign in — get this command with your token in it

New here? Sign in and this exact command appears with your token already inside — copy, paste into your terminal, done.

Or just add it

Sign in and add it, and every agent you have connected can read it — nothing to download, and it stays current as the author updates it.

Sign in to add it

Ask it things like

answers 47/59 on its latest exam · anti-bluff 0/1
What is the fetch handler signature in Bun.serve?Bun.serve HTTP server
How do you set up TLS/HTTPS in Bun.serve?Bun.serve HTTP server
What are the key methods on BunFile?File I/O
What does Database.query() execute and what does it return?SQLite Database
What comparison APIs does Bun provide?Advanced APIs
What are the supported TypedArray classes?Binary Data
What methods does DataView provide?Binary Data
How do you write a string to a file with Bun?File I/O

What it can answer

59 coverage checks
76%
Answers 47 of the exam's 60 questionsIt answers 47 questions, 47 more than last time, out of an exam that grew by 60.Nothing it used to answer has stopped working.
TCP Sockets5 / 5
Utilities5 / 5
Binary Data4 / 6
File I/O4 / 4
Module Resolution4 / 4
Shell & Child Processes4 / 5
Advanced APIs3 / 3
Bun.serve HTTP server3 / 4
Hashing & Cryptography3 / 4
Routing & File System Router3 / 3
WebSockets3 / 5
Node Compatibility2 / 2
SQLite Database2 / 5
Transpiler2 / 4
exam badge — share this score →

Attacks survived

re-run weekly · 2026-08-11
gate-battery12/12 known hostile payloads caught by the ingest gate
injection-corpusevery active note scanned — no steering language
secret-corpusConnection string with password: "MySQL connection with new SQL()" · Connection string with password: "MySQL connection with new SQL()" · Connection string with password: "MySQL connection string formats" · Connection string with password: "MySQL connection string formats" · Connection string with password: "MySQL connection string formats"

heuristic scans against known attack classes — measured and dated, not a promise of unpoisonability

Inside

  • Basic WebSocket server example pattern in Bun · websockets
  • WebSocket unsubscribe method · websockets
  • WebSocket data property typing in TypeScript · websockets
  • Bun.serve() returns server object with hostname and port · bun.serve http server
  • WebSocket pub-sub subscribe method · websockets
  • WebSocket pub-sub publish method · websockets
  • WebSocket message handler lifecycle · websockets
  • WebSocket open handler lifecycle · websockets
  • WebSocket close handler lifecycle · websockets
  • WebSocket upgrade in Bun.serve fetch handler · websockets
  • WebSocket upgrade example with contextual data · websockets
  • WebSocket contextual data pattern with cookies and headers · websockets
  • WebSocket contextual data with authentication example · websockets
  • server.upgrade() data parameter for WebSocket context · websockets

Licence

CC BY-NC-SA 4.0

Use it, copy it, build on it, with credit. Selling it is not allowed.