Repository navigation
v0.24.0: wire protocol 2 — update every part together
Upgrade note: this release bumps the push wire protocol from 1 to 2, and
hubs of this build serve protocol 2 only. Update the hub AND every push
client together: a 0.24 hub rejects an older client with 426 Upgrade Required (headers name the hub's version and the protocol range it serves),
and a 0.24 client gets the same 426 from an older hub. Session keys and ids
are unaffected — the id salt is unchanged, so no re-derivation, no --allow
edits, no new view URLs.
Fonts stop crossing the trust boundary as CSS. A client used to push
@font-face rules and family names that the hub re-served; it now pushes
structured, hash-keyed font assets, and the hub derives every content
address, validates that a family key belongs to an uploaded regular face,
picks the format() token, and emits the CSS itself. No client-authored font
syntax or free-form family name is reproduced anywhere. Inline-image blobs
are likewise byte-sniffed to PNG/JPEG/GIF/WebP and served with the canonical
type, so claimed HTML/SVG never becomes a same-origin asset.
Hubs can force a trusted presentation. Every hub embed surface (?embed,
config, style.css) is now hub-owned — built-in template, hub-generated
base CSS and render config — regardless of what the pusher sent; validated
hash-keyed fonts still render, under hash-only family names. For normal
pages, hub --template <path> supplies a fallback and --force-template
makes the hub's presentation authoritative, discarding pushed template, CSS,
and render JSON. Hub-owned templates get a per-response {{nonce}} and a
matching script CSP. Standalone serve keeps using its local configured
presentation.
One pusher per session, enforced. A new /push connection atomically evicts
the incumbent, which is closed with a private replacement code and exits
instead of reconnecting — so two clients holding the same key can no longer
steal the session back and forth in a loop. (This contract is the second half
of the protocol bump: a protocol-1 client treats every close as transient.)
Detachable push sessions, the dtach(1) model. push --detachable runs the
mirrored command in a terminal-less PTY that keeps streaming to the hub with
no local terminal, exposed on a unix socket; shellglass attach <socket>
connects a real terminal (driving input and size) until Ctrl-\ detaches it,
and the session then holds the last attached size. One client at a time —
a second attach is refused unless it takes over with --force. Adding
--daemon forks the push into the background so it survives an SSH logout.
Unix only; inline images aren't mirrored in this mode (no local terminal to
probe for image capabilities).
shellglass is a reusable library. An external frame producer can drive the
whole stack — stock viewer, diff protocol, local HTTP/SSH serving, recording,
hub push — through api.rs (Presentation, serve/serve_with_shutdown,
push) and the source.rs producer boundary, with no PTY and no vt100. The
CLI runs through the same API, so the two cannot drift. See
docs/library-api.md and examples/external-source.rs.
Windows support, contributed by Duncan Ogilvie (@mrexodia). shellglass runs
on ConPTY (Windows 10 1809 or newer; Windows Terminal recommended), defaults
to %COMSPEC%, and tracks console size by polling. The release archives now
include Windows x86_64 binaries, and CI builds Windows on every push.
Also:
- Unix release archives bundle eight binaries, including the new
shellglass-attach; the Windows zip keeps seven (attach is Unix-only). - Canvas glyphs are crisp in Safari. Both built-in pages fit the terminal
withtransform: scale, and WebKit was rasterizing the transformed canvas
layer at its own density and resampling it. The canvas now mounts in a
non-transformed#sg-canvas-hostbox that mirrors the scaled rectangle
(snapped to whole device pixels); only the transparent ghost rows stay
under the transform. Custom templates can opt in with the same id. - Canvas text is pinned to grayscale antialiasing, so Safari's stem darkening
no longer double-applies on top of the weight boost. - The CRT effect is gone: the tube styling, scanline/bloom/vignette overlays,
the#crtnav toggle,?crt, and its localStorage preference. The page
keeps the flat look the CRT-off state rendered. It may return in a better
form later.