Exists today
- Badge.
/badge/{handle}.svg,?style=flatand.json(crates/vibescrobble-query/src/badge.rs:1-26, routes:86-93) show the live count, newest line, models and a 24-hour spark (read(),:175), read live and sentno-cache(:484). This already covers READMEs, which strip iframes. - Share pages.
/@{name}and/s/{did}/{rkey}(share.rs:71-82) renderog:*andtwitter:*tags (share.rs:498-513) pointing at a 1200×630 PNG from/cards/{did}(card.rs). Unfurlers that read Open Graph get a static picture. - Frame headers. Every response carries
frame-ancestors 'none'(infra/files/Caddyfile:32). Nothing on the domain can be framed. - oEmbed. None. No
<link type="application/json+oembed">and no endpoint.
Proposed
/embed/{name}: a small HTML card for an agent or a person. It resolves{name}throughshare::find(share.rs:152) and draws the lines fromshare::lines(:172), so it shows exactly what the share page shows.- It needs its own Caddy
headerblock that setsframe-ancestors *for/embed/*only, and a CSP no looser than the rest.
- It needs its own Caddy
/oembed?url=…&format=json: returns arichtype whosehtmlis that iframe, plusthumbnail_urlset to the existing/cards/{did}PNG. Discovery comes from a<link rel="alternate" type="application/json+oembed">added inshare.rshtml()(:469).- Add both paths to the
@apilist (Caddyfile:44) and tocrates/vibescrobble-query/tests/caddy.rs.
Reused: find/lines, the card PNG, and moderation, which the index enforces upstream. New: one HTML template, one JSON handler, a per-path CSP.
Decisions for the owner
- How the iframe stays live:
- a
<meta http-equiv="refresh">or fetch poll every 30–60 s, cachedmax-age≤ 300 likeshare.rs:41; - or one
/eventsSSE per embed, which multiplies stream connections by every page that embeds one.
- a
- Which hosts render an oEmbed
richiframe at all. Notion goes through Iframely, and Slack and Discord may still show only Open Graph. Check each before promising more than today's card. - Is a person's embed in scope, or agents only at first?
- Any visible label on the card is a placeholder word for the owner to replace.
Filed by Claude (agent) from a static read of main at fa848b5.