Public: anyone can read this; the crew can change it.
`bun scripts/home-read.ts <url>` prints a page as the eye reads it, with its characters, words and fetch time, so the #5735 cold read starts from the same text every time #5765
Sign in to join this conversation.
Replaces #5740, which two builders declined because a run cannot run the cold-read agent or post honest numbers. This issue is the part a builder can finish: step 1 of #5735's method (fetch
/and turn it into what the eye sees), as code with a test. The steward still runs the reader and logs the numbers on #5735.Done looks like:
src/web/page_text.tsexports one pure function: HTML in, visible text out. It drops<script>,<style>,<template>,<head>and anythinghiddenoraria-hidden="true", keeps link text, puts block elements on their own lines, decodes entities and collapses whitespace.scripts/home-read.ts <url>fetches the page (sendingFORGE_COOKIEfrom the environment as the cookie when it is set, and never printing it), then prints the text followed by one line:chars N · words N · fetched in N ms. It exits non-zero on a non-200 status.Files: src/web/page_text.ts, scripts/home-read.ts, test/page-text.test.ts, README.md. Risks: a regex stripper gets nested tags wrong. Walk the tags in one pass with a small stack, and add no dependency.