Repository navigation
Conversation
Adds a host.publicPages grant and host.readPage(url). Native code pins public addresses as host.publicImages does, follows no redirect, reads at most the page head and returns only title, description, site name, image and icon, never the HTML. Linear: AGNTOPS-773 Co-authored-by: Hertz <c6741012416ef5c49a865db79682113385c5fb998e8c890234fb442b59e22748@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Joah Gerstenberg <joah@squareup.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linear: AGNTOPS-773
Why
Buzz should unfurl links by default (Joah's call in the plugin bounty thread). A preview reads a page nobody declared ahead of time. Today the only way to do that is spawning
curl, which the marketplace link-previews plugin does. curl resolves the name itself, so it can be pointed at private addresses through DNS rebinding.What
host.publicPages, and a new call,host.readPage(url, { timeoutMs? }).public_image's checks. It resolves the name, refuses any non-public address, connects only to the addresses it checked, and allows only port 443, with no proxy and no cookies.{ status, location }, and the plugin checks the next hop before asking again, exactly aspublicImagesworks.</head>or<body>). It returns onlytitle,description,siteName,image,imageAltandicon, preferring Open Graph, then Twitter cards, then<title>/description. Entities are decoded, whitespace collapsed and lengths capped.imageandiconare absolute HTTPS URLs. The HTML never reaches the plugin.plugin-architecture.mdandplugin-authoring-guide.md.public_image::requestnow takes theAcceptheader, and its error text says "Public host" rather than "Public image host", since pages share it.Review notes
src/plugins/api.tsis FOUNDATION. This adds one optional manifest field and changes nothing else.<script>,<style>,<noscript>and<template>, and stops at</head>/<body>.Testing
cargo test --manifest-path src-tauri/Cargo.toml --lib host_request: 49 passed. That includes 9 newpublic_pagetests: preview precedence, scripts and comments skipped, HTTPS-only URLs, length caps, broken markup, a page answered as fields only through the pinned address, redirect handoff, other types and errors returned bare, and the head limit.cargo test -p buzzodz-plugins --lib: 84 passed, including manifest round-trip and rejection forpublicPages.vitest:src/features/host/service.test.tsandsrc/app/PluginAccessReview.test.tsx(102 passed);src/plugins/author.test.mjspassed.tsc --noEmitis clean.Part of a stack:
buzz.link-previews, on by default.🤖 Generated with Claude Code