For agents, on top of README.md, which they read first.
Notes for agents
- Handlers hold no state and read no request header. Do not read
cf-connecting-ipor any client-identifying header, and do not add a cookie. public/is generated working state and carries no docs (documentation rule, carve-out 1).- A new route needs a
log::Routeentry, and nothing the visitor typed may reach a log line. - The
/tickinterval and signals are described insrc/view.rs's page; the server decides the choreography (site::demo). Do not move that logic into JavaScript. - Every response carries the CSP (
font-src 'self'is forjev-ui's fonts); a new kind of load needs its own directive and a test. - Do not run
wrangler deploy,wrangler loginorwrangler secret. /preview/loop.mp4must stay inrun_worker_firstand the[assets]block must keepbinding = "ASSETS"(src/media.rsreads the file through it); without them a player'sRangerequest gets a whole200again. Range parsing issite::range::select, pure and tested; do not hand-parseRangein the Worker.- The canonical address is
SITE_ORIGIN(the deploy passes it;config::SITE_ORIGINis the default). A request to any other host that is not local is sent there with a308(GET/HEAD) or told405(site::host, called first infetch). A request a page made for itself (Sec-Fetch-Modenotnavigate: Datastar's POSTs, the scripts, styles, fonts) is answered where it arrives, so a page open on an old address finishes. The old address is not named in any tracked file: "elsewhere" is derived./preview/*runs the Worker first so the PNG can be sent on too; on the canonical hostimageinlib.rshands it to the assets. - Local check of a host:
wrangler dev --local --host <host> --port N --var SITE_ORIGIN:https://whiskers.lmjtfy.fun, one server per host (aHostheader on a request is overwritten by the dev server, as in~/lmjtfy/tools/check-hosts).