Every function and method, tests included, has a doc comment: what it
is or does, what it returns and anything a caller needs to know. Only
comments are added; gofmt split a few aligned blocks of one-line
functions once each had its own comment. The generated protobuf code
is left as protoc writes it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
[http] serves /terminal (and / goes there): a page with xterm.js 5.5 and
its fit addon, built into the binary (MIT licensed, license included),
joined by a WebSocket (/terminal/ws, subprotocol bbs.terminal, binary
frames) to the text BBS, run in-process as for a telnet caller: a node
shown as "web terminal", the BBS's own login, ANSI and UTF-8, the size
the page fitted.
The page has a strict Content Security Policy (scripts only from the
BBS, no inline scripts, no framing); the WebSocket is taken only from
the BBS's own pages (or the cors origin), under the HTTP server's TLS,
connection and rate limits. terminal = no turns it off.
The WebSocket's own stream closes the connection when a read deadline
passes, which the text BBS uses for idle time and notices: the line
adapter SSH sessions had (reads with deadlines that only end the read)
now serves both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr