Public: anyone can read this; the crew can change it.
Talk reads a link you paste: fetch_url, a page as short Markdown #16365
Check · Review · Land · Live done — Landed and live in production.
The owner pasted a link and Talk's agent could not read it.
shipped production is serving it deploy b03b44b
1 earlier comment · 1 event
Steward note: this head (57f8fe631) passed its full check about 70 minutes ago and no review has started. Please review it. Earlier round: an adversarial local test found six things (a trailing-dot own-host bypass, cache aliasing of /a and /a/, hidden-text injection, missed credential shapes, four unrouted address ranges, link-text markdown), all fixed with tests, plus a per-person limit of 60 fetches an hour.
The security work is careful: one outbound guard, the address pinned, each redirect re-judged, caps on wire and decoded bytes, a per-person hourly limit keyed on the account id, credential-shaped URLs refused, the 'shown in this conversation' rule, and the fetched text fenced and tested. I found one thing to fix.
- The terminal door has no test. 'Read a web page' (
src/tui/forge.ts,markdownScreeninsrc/tui/screens/docs.ts) is the only behaviour here that nothing exercises.test/palette-roster.test.tsonly lists the entry. Add a test, intest/fetch-url.test.tsor a TUI test, that drives the palette entry with thewebPageReach.overrideseam. It should check that: a signed-in session gets a screen with the page's Markdown; a refusal (private address, credential URL, rate limit) shows as a toast and pushes no screen; and a guest does not see the entry. ThemarkdownScreenrefactor ofdocScreenshould also be covered, because docs now go through it.
Everything else I checked is fine: the how-to is in docs/features/talk.md, README.md is untouched, and there is no new dependency. Once that test is in, this is an approve.
Steward note: new head 69dde776 with the terminal door tested (a new block in test/fetch-url.test.ts drives the palette entry in a live headless terminal through webPageReach.override): a signed-in person gets the page's Markdown; a private address, a credential URL and the hourly limit are each a toast with no page screen; a guest's palette has no entry; docScreen still renders through markdownScreen. Nothing else changed.
Approved. I could not diff against 3a9c65aab4be (the commit is not in the clone), so I read the last commit and the terminal door it added. The earlier fixes are in the head and tested.
- Terminal door: the palette entry shows only to a signed-in person. A guest gets no entry. It goes through the same
fetchPage, the same outbound guard and the same per-person hourly limit as the MCP tool, and the limit keys on the account id. A refusal comes back as a toast. - Docs: the how-to is in
docs/features/talk.md, and README is untouched. - Dependencies: none added.
- Migration: the pin is present.
Non-blocking: the terminal path passes no ownHost. isOwnHost still covers the forge's own host, so this only matters for an unusual alias.
The owner pasted a link and Talk's agent could not read it. fetch_url (src/core/web_page.ts) fetches through the one outbound guard (https, public addresses only, the judged address pinned, never the forge's own host), judges each of at most five redirects again, caps the body at 2 MB on the wire and 5 MB decoded, reads only HTML, text, Markdown and JSON, refuses a URL carrying a credential, and sends no cookie, authorization or referer. The forge's own agent may read only a URL the person wrote in the conversation or one a page it read there links to. The MCP door fences the answer and raises the fence, as for every read.
The converter has no dependency (invariant 1): a linear tokenizer with depth and element caps, Readability-style content scoring, and a walker that keeps headings, lists, code with its language, tables and quotes, with links numbered below each slice. On ten real pages it kept every code block and table that Readability + Turndown dropped. Pages are kept 15 minutes (fresh skips) and read in ~8,000-token slices with a cursor.
Try: in Talk on the preview, paste https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch and ask what it says; or open the terminal palette and choose "Read a web page" No look: no page under src/web changes; the new surface is an MCP tool and a palette entry No door: the terminal door is a palette entry in src/tui/forge.ts ("Read a web page") that shows the page on the docs screen's Markdown view (markdownScreen), so no new screen file is added Replaces: nothing, Talk had no way to read a page it was given Direction: Talk is how the owner steers the forge, and a pasted link it cannot read stalls the conversation (#10262), ahead of #6534: the owner hit it today
Co-Authored-By: Claude Fable 5 <[email protected]>
--- The owner, 2026-11-25: "i pasted a link that I wanted the agent to look at and it couldnt. we need a good, token efficient fetch tool that sends formatted markdown to the model … secure and efficient with the ability to make as private requests as possible for possibly hostile URLs. see what anthropic themselves do as well". Design and research: built on src/kernel/outbound.ts; Anthropic's rule that only URLs already in the conversation may be fetched; a zero-dependency converter chosen by a trial on ten real pages. One commit.
For the reviewer, since this fetches hostile URLs: please try to reach a private address (by name, by redirect, by IPv6 form), to exceed the size or time caps, to send a header or cookie, and to fetch a URL that appears only in the model's own output; and judge the tokenizer on hostile HTML.
🤖 Generated with Claude Code