Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat: Implement publisher rights enforcement for news articles
nirholasae89a2ea274c
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex e2e3ddc94..de0059d97 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -10,6 +10,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Character Library** (`/character-library`) — 106 professionally rigged 3D characters, free to use. Every one drives the full animation library and drops into the Studio, Animation Studio, and embed viewer in one click.- **Daily Match** (`/daily-match`) — Which agent ships the most real output today? Live daily standings over real agent activity: actions, trades, skill sales, and coin launches. Resets at 00:00 UTC.- **Docs · Assistant widget** (`/docs/assistant-widget`) — Add a 3D avatar assistant to any website: the one-tag script, the @three-ws/assistant npm package, and the assistant-widget MCP server for AI agents.+- **Docs · Publisher rights in the news reader** (`/docs/news-rights`) — What three.ws shows from a publisher's article and what it never shows: the enforced lead-excerpt limit, how a withdrawn story is removed (410, deindex, purge), and how publishers can ask us to take something down.- **Motion Swap — Replace Yourself in Video with Your Avatar** (`/motion-swap`) — Upload a video of yourself and get it back with your 3D avatar performing your motion instead of you. Server-side pose tracking and person masking, browser-side compositing and export — stay off camera without staying off video.- **Sniper Experiments: rules vs LLM judgment, scored live** (`/sniper/experiments`) — The sniper fleet runs different rule sets side by side, including LLM-judged agents with no rules at all. The live scoreboard of which entry conditions actually make money, every fill verifiable on-chain.- **Tutorial · Add a 3D Avatar Assistant** (`/tutorials/add-a-3d-assistant`) — Step-by-step: add a floating 3D avatar assistant to any website with one script tag, configure the avatar, background, and brand, drive it from your own code, or have an AI agent generate the embed via MCP.@@ -32,6 +33,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Switch any coin chart between CoinGecko, TradingView, DexScreener, and GeckoTerminal** — The chart on every /coin page now has a source switcher. Start on the fast native CoinGecko line chart, then flip to TradingView's advanced candlesticks, or to the DexScreener or GeckoTerminal on-chain terminal for the token's live DEX pair. Each option only appears when it can actually chart that coin, your pick is remembered across coins and visits, and every view follows the site theme. (`/coin/bitcoin`) `[feature, improvement]`- **The assistant widget ships as an npm package and an MCP server** — The 3D avatar assistant widget is now installable three ways. Beyond the one-tag script, there is an npm package, @three-ws/assistant, for bundler projects (the one-tag build is generated from it, so they never drift), and a free MCP server, @three-ws/assistant-mcp, published to the official Model Context Protocol registry as io.github.nirholas/assistant-widget. Any AI agent (Claude Code, Cursor, Claude Desktop) can now ask for a widget in plain language and get back a paste-ready embed: build_assistant_widget turns a config into a script tag, a frame URL, and a ThreeAssistant.init() call, and list_assistant_options returns every avatar, background, and mode. Full developer docs at /docs/assistant-widget and a step-by-step tutorial walk through every option, the JavaScript API, and the agent workflow. (`/docs/assistant-widget`) `[sdk, feature, docs]`- **The ChatGPT studio now shows its work, and goes up to High** — Making a 3D model in ChatGPT now feels like the Forge. The generator paints a concept image before sculpting the mesh, and ChatGPT now shows that painted view the moment it exists, while the 3D model is still generating: in the inline widget it appears instantly as the model loads behind it. You can also ask for quality now: draft for speed, standard by default, or high for maximum detail on our own GPUs (it takes a few minutes and is worth it). Under the hood, ChatGPT requests ride the same smart engine routing as the Forge page instead of a single pinned engine, so an unhealthy lane never blocks your model. (`/docs/chatgpt-ar`) `[feature, improvement]`+- **The news reader now quotes publishers instead of reprinting them** — Story pages used to show the full text of the articles they linked to. That was wrong, and a publisher was right to object. Every story page now shows a short lead excerpt, our own summary and key points, live tickers and market context, and sends you to the publisher for the rest. The limit is enforced on the server across every surface that touches article text: the reader, the RSS mirror, the archive search, and the agent knowledge corpus. Twenty-four pages named in a takedown notice have been removed and deindexed, and the publisher who filed it has been dropped from the aggregator. New: a documented takedown path for publishers at /docs/news-rights. (`/docs/news-rights`) `[fix, improvement, docs]`- **The sniper fleet becomes a live experiment: rules vs AI judgment** — The autonomous pump.fun sniper now runs ten labeled strategies side by side to learn which entry conditions actually make money. Some agents trade strict rule shields (market-cap bands, socials, Oracle conviction), and three new agents have no rules at all: an AI model (Grok, Claude, or an auto-router) reads every launch and decides with a written thesis, while the same hard safety rails (no Mayhem tokens, honeypot firewall, budgets and stop-losses) protect every trade. A new scoreboard at /sniper/experiments compares each arm by real on-chain results. Under the hood the sniper also got three reliability fixes that unblocked buying: safety reads now rotate across many RPC providers with retries, provisional Oracle scores on brand-new coins no longer disqualify launch snipes, and a stuck position whose sell had already landed on-chain is now reconciled from the chain instead of retrying forever. (`/sniper/experiments`) `[feature, improvement, fix]`- **TradingView charts on every coin page** — Every /coin page (like /coin/bitcoin) now has a chart-source toggle. Keep the fast native line chart, or switch to a full advanced candlestick chart with indicators and drawing tools. Listed coins open on TradingView; Solana DEX tokens that TradingView doesn't carry open on DexScreener instead, so the advanced view works on every coin. Your choice is remembered across coins and visits, and the chart follows the site theme. (`/coin/bitcoin`) `[feature]`diff --git a/api/_lib/news-rights.js b/api/_lib/news-rights.jsnew file mode 100644index 000000000..e963616c1--- /dev/null+++ b/api/_lib/news-rights.js@@ -0,0 +1,178 @@+// Publisher rights layer for the crypto-news reader.+// ---------------------------------------------------------------------------+// three.ws aggregates ~100 publisher feeds. Aggregation is lawful; republishing+// a publisher's article body under our own canonical URL is not. This module is+// the single place that enforces the line:+//+// 1. TAKEDOWN_IDS / RESTRICTED_* — stories and publishers we must not serve at+// all, because a rightsholder demanded removal. Their permalinks answer+// 410 Gone (not 404): 410 tells Google the removal is permanent and drops+// the URL from the index on the next crawl, which is exactly what a DMCA+// removal requires. They are also kept out of the sitemap and out of+// ingest, so a suppressed story cannot come back on the next cron run.+//+// 2. excerptParagraphs() — the standing limit for EVERY publisher. The reader+// shows a bounded lead excerpt plus our own analysis (summary, key points,+// tickers, market context) and sends the reader to the publisher for the+// rest. Our analysis is our work; the excerpt is a quotation. The full+// body is never ours to host.+//+// Rule 2 is the one that matters long-term. Rule 1 only ever cleans up after+// rule 2 was missing.++/**+ * Articles removed at a rightsholder's demand, keyed by the content-addressed+ * 16-hex story id (the same id that appears in /markets/news/<month>/<id>).+ *+ * The Merkle, LLC / NullTX (nulltx.com) — notice received 2026-07-19 via the+ * Google Search Console legal channel, Lumen notice 15710816, Google reference+ * 5-4413000041574-1840887990. 24 URLs, all NullTX-sourced. The claim is that+ * the pages reproduced the titles and substantially the full body text of the+ * corresponding nulltx.com articles. They did: the reader rendered the full+ * extracted body under our own canonical URL.+ */+export const TAKEDOWN_IDS = new Set([+ // 2026-06+ '4bc5221ecb8d937f',+ 'b07b96e91727c482',+ 'c93631777118720f',+ 'ee65119b06ff4c4a',+ // 2026-07+ '18de74ebebef95c1',+ '293837811670f09c',+ '342bc502e9eba7b3',+ '3c999789e42b5496',+ '488bc38883c9bfc1',+ '4a56b53000499242',+ '4b79c1afdb11d4ab',+ '4cbff9aca3645cc0',+ '50c4b19439a0114c',+ '539b630f93ba1f3b',+ '67cd8aa07a33057a',+ '7a47fc153b8404d8',+ '8e46c4bc98bfb5b0',+ '9d13b656fd6e4726',+ 'b6dd11575dc5e58c',+ 'ba6e29eba690eb27',+ 'c061e9c72f986cb8',+ 'c0692b0cc3683978',+ 'cea75bb729937c2a',+ 'e705dc021da87ce5',+]);++/**+ * Publishers withdrawn from the platform entirely. A key here is dropped from+ * ingest (api/_lib/news-sources.js no longer lists it) AND suppressed on read,+ * so records already sitting in the GCS archive or the knowledge base stop+ * resolving even before the purge script has run against them.+ */+export const RESTRICTED_SOURCE_KEYS = new Set(['nulltx']);++/**+ * Host-level backstop for the same publishers. Archive records predate the+ * source-key schema in places, and a record's `source` may be a display name+ * rather than a key — matching the link's hostname catches every copy.+ */+export const RESTRICTED_HOSTS = new Set(['nulltx.com', 'www.nulltx.com']);++/** Display names, for the removal notice shown in place of the story. */+const RESTRICTED_LABELS = { nulltx: 'NullTX' };++function hostOf(link) {+ try {+ return new URL(String(link)).hostname.toLowerCase();+ } catch {+ return '';+ }+}++/**+ * Is this story suppressed, and why?+ *+ * @param {{id?: string, link?: string, url?: string, source_key?: string, source?: string}} article+ * @returns {{reason: 'takedown'|'restricted_publisher', publisher: string|null} | null}+ */+export function suppression(article) {+ if (!article) return null;+ const id = String(article.id || '').toLowerCase();+ if (id && TAKEDOWN_IDS.has(id)) {+ return { reason: 'takedown', publisher: RESTRICTED_LABELS.nulltx };+ }++ const key = String(article.source_key || '').toLowerCase();+ if (key && RESTRICTED_SOURCE_KEYS.has(key)) {+ return { reason: 'restricted_publisher', publisher: RESTRICTED_LABELS[key] || article.source || null };+ }++ const host = hostOf(article.link || article.url);+ if (host && RESTRICTED_HOSTS.has(host)) {+ return { reason: 'restricted_publisher', publisher: article.source || null };+ }+ return null;+}++/** Convenience boolean for filter chains (sitemap, feeds, archive listings). */+export function isSuppressed(article) {+ return suppression(article) !== null;+}++// ── The standing excerpt limit (applies to every publisher) ──────────────────++/** Hard ceiling on quoted publisher prose shown on a three.ws story page. */+export const EXCERPT_MAX_CHARS = 400;+/** Never quote more than the story's opening beat. */+export const EXCERPT_MAX_PARAGRAPHS = 2;++/**+ * Reduce an extracted body to a lead excerpt we can lawfully quote.+ *+ * Takes whole paragraphs while they fit the character budget; if even the first+ * paragraph overruns, it is cut at the last sentence boundary inside the budget+ * (falling back to a word boundary) so the excerpt never ends mid-word.+ *+ * @param {string[]} paragraphs full extracted body+ * @returns {{paragraphs: string[], truncated: boolean}} bounded excerpt, and+ * whether anything was withheld (drives the "read the rest at the publisher"+ * affordance in the reader).+ */+export function excerptParagraphs(paragraphs) {+ const all = (Array.isArray(paragraphs) ? paragraphs : []).map((p) => String(p || '').trim()).filter(Boolean);+ if (!all.length) return { paragraphs: [], truncated: false };++ const out = [];+ let used = 0;+ for (const p of all) {+ if (out.length >= EXCERPT_MAX_PARAGRAPHS) break;+ if (used + p.length > EXCERPT_MAX_CHARS) break;+ out.push(p);+ used += p.length;+ }++ if (!out.length) {+ const first = all[0].slice(0, EXCERPT_MAX_CHARS);+ // Prefer a sentence boundary; fall back to a word boundary.+ const lastStop = Math.max(first.lastIndexOf('. '), first.lastIndexOf('! '), first.lastIndexOf('? '));+ const cut = lastStop > EXCERPT_MAX_CHARS * 0.5 ? first.slice(0, lastStop + 1) : first.slice(0, first.lastIndexOf(' '));+ out.push(`${cut.trim()}…`);+ }++ return { paragraphs: out, truncated: out.length < all.length || used < all.join('').length };+}++/**+ * Single-string form of the same limit, for the `description` field.+ *+ * Publishers that ship content:encoded routinely put the WHOLE article in the+ * RSS description, so an unbounded description is the article body wearing a+ * different field name — in the archive records, the paid archive API, and the+ * crawler-visible story page alike.+ *+ * @param {string} text+ * @returns {string} bounded quotable text (empty in, empty out)+ */+export function excerptText(text) {+ const s = String(text || '').trim();+ if (!s) return '';+ if (s.length <= EXCERPT_MAX_CHARS) return s;+ return excerptParagraphs([s]).paragraphs[0] || s.slice(0, EXCERPT_MAX_CHARS);+}diff --git a/api/_lib/news-sources.js b/api/_lib/news-sources.jsindex a0172244b..6ec219030 100644--- a/api/_lib/news-sources.js+++ b/api/_lib/news-sources.js@@ -80,7 +80,10 @@ export const NEWS_SOURCES = {livecoins: { name: 'Livecoins', url: 'https://livecoins.com.br/feed/', category: 'general', language: 'pt', region: 'latam' },mihanblockchain: { name: 'Mihan Blockchain (میهن بلاکچین)', url: 'https://mihanblockchain.com/feed/', category: 'general', language: 'fa', region: 'mena' },newsbtc: { name: 'NewsBTC', url: 'https://www.newsbtc.com/feed/', category: 'general', tier: 'tier3', credibility: 0.7 },- nulltx: { name: 'NullTX', url: 'https://nulltx.com/feed/', category: 'general' },+ // nulltx (NullTX) — withdrawn 2026-07-19 at the rightsholder's demand+ // (The Merkle, LLC). Do not re-add without written permission; the key is+ // held in RESTRICTED_SOURCE_KEYS (api/_lib/news-rights.js) so any record+ // already in the archive stays suppressed on read.panewslab: { name: 'PANews (PA财经)', url: 'https://www.panewslab.com/rss.xml?lang=zh&type=NEWS', category: 'general', language: 'zh', region: 'asia' },portaldobitcoin: { name: 'Portal do Bitcoin', url: 'https://portaldobitcoin.uol.com.br/feed/', category: 'general', language: 'pt', region: 'latam' },ramzarz: { name: 'Ramz Arz (رمزارز)', url: 'https://ramzarz.news/feed/', category: 'general', language: 'fa', region: 'mena' },diff --git a/api/_lib/news.js b/api/_lib/news.jsindex e86a17367..9584d841b 100644--- a/api/_lib/news.js+++ b/api/_lib/news.js@@ -25,6 +25,7 @@import { createHash } from 'node:crypto';import { XMLParser } from 'fast-xml-parser';import { NEWS_SOURCES, sourcesForCategory, sourcesForLanguage, sourcePriority, isFeaturedSource } from './news-sources.js';+import { isSuppressed, excerptText } from './news-rights.js';const FEED_TIMEOUT_MS = 7000;const FRESH_MS = 300_000; // refetch a source after 5 min@@ -565,9 +566,13 @@ export async function getNews({ category, source, lang = 'en', q, limit = 30, of// while the stragglers land in cache for the next caller.const deadline = keys.length <= NARROW_QUERY_SOURCES ? FEED_TIMEOUT_MS + 500 : REFRESH_DEADLINE_MS;const all = await ensureSources(keys, deadline);- let articles = dedupe(all).sort(- (a, b) => new Date(b.pub_date || 0) - new Date(a.pub_date || 0),- );+ // Rights filter, applied at the fan-out's single choke point: everything+ // downstream of getNews (the /markets/news feed, the RSS mirror, related+ // coverage, the coin rails, and the hourly archive-append cron) inherits it,+ // so a withdrawn publisher can neither be displayed nor newly archived.+ let articles = dedupe(all)+ .filter((a) => !isSuppressed(a))+ .sort((a, b) => new Date(b.pub_date || 0) - new Date(a.pub_date || 0));if (q) {const needle = q.toLowerCase();articles = articles.filter((a) =>@@ -578,7 +583,12 @@ export async function getNews({ category, source, lang = 'en', q, limit = 30, ofconst sources_ok = keys.filter((k) => sourceCache.get(k)?.ok).length;// content_text is a server-side field for the article reader; list payloads// stay light.- const page = articles.slice(offset, offset + limit).map(({ content_text, ...a }) => a);+ // `description` is bounded here for the same reason content_text is dropped:+ // a content:encoded feed puts the publisher's whole article in it, and this+ // payload is what the feed UI, the RSS mirror and the coin rails render.+ const page = articles+ .slice(offset, offset + limit)+ .map(({ content_text, ...a }) => ({ ...a, description: excerptText(a.description) }));return {articles: page,total,@@ -603,5 +613,9 @@ export async function findArticle({ link, id }) {const all = await ensureSources(keys);const wantId = id || (link ? articleId(link) : null);if (!wantId && !link) return null;- return all.find((a) => a.id === wantId || (link && a.link === link)) || null;+ const hit = all.find((a) => a.id === wantId || (link && a.link === link)) || null;+ // A withdrawn story is "not found" to every caller, including the reader's+ // feed-body fallback — otherwise a blocked page fetch would route straight+ // around the rights filter and serve the publisher's feed copy instead.+ return hit && isSuppressed(hit) ? null : hit;}diff --git a/api/cron/news-archive-append.js b/api/cron/news-archive-append.jsindex f657a8c71..fc6d033f2 100644--- a/api/cron/news-archive-append.js+++ b/api/cron/news-archive-append.js@@ -22,6 +22,7 @@ import { constantTimeEquals } from '../_lib/crypto.js';import { getGcpAccessToken } from '../_lib/gcp-auth.js';import { getNews } from '../_lib/news.js';import { geckoFetch } from '../_lib/coingecko.js';+import { excerptText } from '../_lib/news-rights.js';const BUCKET = 'three-ws-news-archive';const API = `https://storage.googleapis.com/storage/v1/b/${BUCKET}/o`;@@ -95,7 +96,10 @@ function toArchiveRecord(a, marketContext, nowIso) {title: a.title,link: a.link,canonical_link: a.link,- description: a.description,+ // Bounded at capture: feeds shipping content:encoded put the entire+ // article in `description`, and the archive is a durable, publicly+ // searchable store. We keep a quotable lead and the link, never the body.+ description: excerptText(a.description),source: a.source,source_key: a.source_key,category: a.category,diff --git a/api/news/archive.js b/api/news/archive.jsindex d41c60b71..25864c795 100644--- a/api/news/archive.js+++ b/api/news/archive.js@@ -56,6 +56,7 @@ import { paidEndpoint } from '../_lib/x402-paid-endpoint.js';import { declareHttpDiscovery, withService } from '../_lib/x402/bazaar-helpers.js';import { installAccessControl } from '../_lib/x402/access-control.js';import { getStats, getMonths, loadMonth } from '../_lib/news-archive-store.js';+import { isSuppressed, excerptText } from '../_lib/news-rights.js';const MAX_MONTHS_PER_SCAN = 12;const MONTH_FETCH_CONCURRENCY = 3;@@ -156,7 +157,7 @@ async function archiveSearch(parsed) {for (let b = 0; b < batch.length; b++) {if (!loaded[b]) continue; // month failed to load; reported via scanned listscannedMonths.push(batch[b]);- found = found.concat(loaded[b].filter(matches));+ found = found.concat(loaded[b].filter((a) => matches(a) && !isSuppressed(a)));}if (found.length >= need) break;}@@ -170,7 +171,12 @@ async function archiveSearch(parsed) {found.sort((a, b) => new Date(b.pub_date || 0) - new Date(a.pub_date || 0));const monthsRemaining = window.length - scannedMonths.length;const body = {- articles: found.slice(offset, offset + limit),+ // Bound the quoted text on the way out. The corpus holds 660k records+ // captured before the rights layer existed, many with a full-body+ // `description` from a content:encoded feed; this caps them at read+ // time so the API cannot serve a publisher's article regardless of+ // what any individual stored row contains.+ articles: found.slice(offset, offset + limit).map((a) => ({ ...a, description: excerptText(a.description) })),total_scanned_matches: found.length,limit,offset,diff --git a/api/news/article.js b/api/news/article.jsindex c8a2535ee..31b4fa06a 100644--- a/api/news/article.js+++ b/api/news/article.js@@ -4,7 +4,9 @@// ladder (publisher page → Jina Reader → publisher feed → preview, in// api/_lib/article-extract.js), so a Cloudflare-blocked publisher still yields// the full story instead of a one-line teaser. Layers analysis on top:-// • paragraphs extracted plain-text body+// • paragraphs BOUNDED lead excerpt of the publisher's body (see+// api/_lib/news-rights.js — we quote the lead and link out;+// the full body is never served from three.ws)// • summary LLM summary via the platform chain; falls back to lead// • key_points 3–5 takeaways (LLM, or highest-signal sentences)// • entities orgs / people / projects the story is about (LLM)@@ -29,6 +31,7 @@ import { llmComplete, llmConfigured } from '../_lib/llm.js';import { extractArticle } from '../_lib/article-extract.js';import { enrichTickers } from '../_lib/news-coins.js';import { recordExtraction, getExtraction } from '../_lib/news-knowledge-store.js';+import { suppression, excerptParagraphs, excerptText } from '../_lib/news-rights.js';const CACHE_TTL_MS = 30 * 60_000;@@ -65,9 +68,17 @@ async function llmAnalyze(content, title, source) {}}+// The fallback when no LLM provider answers. Unlike the LLM path, this one is+// EXTRACTIVE — its summary and key points are the publisher's own sentences,+// not new prose. So it is held to the same quotation budget as the excerpt:+// a bounded lead, and a few short representative sentences. Without these+// bounds the "analysis" would quietly become a second copy of the article.+const HEURISTIC_KEY_POINTS = 3;+const HEURISTIC_POINT_CHARS = 200;+function heuristicAnalyze(paragraphs, title) {const lead = paragraphs.slice(0, 3).join(' ');- const summary = lead.slice(0, 500) + (lead.length > 500 ? '…' : '');+ const summary = excerptText(lead);// Highest-signal sentences: numbers, detected tickers, and early position.const sentences = paragraphs.join(' ')@@ -85,15 +96,37 @@ function heuristicAnalyze(paragraphs, title) {.sort((a, b) => b.score - a.score);const key_points = [];for (const { s } of scored) {- if (key_points.length >= 4) break;+ if (key_points.length >= HEURISTIC_KEY_POINTS) break;if (key_points.some((k) => k.slice(0, 60) === s.slice(0, 60))) continue;- key_points.push(s);+ key_points.push(s.length > HEURISTIC_POINT_CHARS ? `${s.slice(0, HEURISTIC_POINT_CHARS).trimEnd()}…` : s);}const lex = lexiconSentiment(`${title} ${lead}`);const sentiment = lex.label.includes('positive') ? 'bullish' : lex.label.includes('negative') ? 'bearish' : 'neutral';return { summary, key_points, entities: [], topics: [], sentiment, provider: 'heuristic' };}+// ── Rights boundary ──────────────────────────────────────────────────────────++/**+ * The public shape of an extraction. The extraction ladder and the knowledge+ * base hold the full body because the analysis layer and the agents' RAG corpus+ * need it; the HTTP response does NOT get it. `paragraphs` is capped to a lead+ * excerpt here, at the one place every response passes through, so no caller —+ * reader, cached record, or third party hitting the endpoint directly — can+ * obtain the publisher's article body from us.+ */+function publicView(value) {+ const { paragraphs, truncated } = excerptParagraphs(value.paragraphs);+ return {+ ...value,+ paragraphs,+ excerpt_truncated: truncated,+ // Where the rest of the story lives. The reader renders this as the+ // primary call to action whenever the body was truncated.+ full_text_url: value.url,+ };+}+// ─────────────────────────────────────────────────────────────────────────────export default wrap(async (req, res) => {@@ -113,10 +146,17 @@ export default wrap(async (req, res) => {return error(res, 400, 'bad_url', 'url is not a valid absolute URL');}+ // Withdrawn publisher (or a taken-down story reached by its link) — refuse+ // before fetching anything. 410: the resource is permanently gone from here.+ const sup = suppression({ url: target });+ if (sup) {+ return error(res, 410, 'removed', `Coverage from ${sup.publisher || 'this publisher'} is no longer available on three.ws.`);+ }+const cacheHeaders = { 'cache-control': 'public, max-age=600, s-maxage=1800, stale-while-revalidate=3600' };const hit = _cache.get(target);- if (hit && hit.expiresAt > Date.now()) return json(res, 200, hit.value, cacheHeaders);+ if (hit && hit.expiresAt > Date.now()) return json(res, 200, publicView(hit.value), cacheHeaders);const id = articleId(target);@@ -126,7 +166,7 @@ export default wrap(async (req, res) => {const stored = await getExtraction(id).catch(() => null);if (stored && (stored.extraction === 'page' || stored.extraction === 'reader') && stored.content_chars > 400) {_cache.set(target, { value: stored, expiresAt: Date.now() + CACHE_TTL_MS });- return json(res, 200, stored, cacheHeaders);+ return json(res, 200, publicView(stored), cacheHeaders);}// The publisher's own feed copy — trusted metadata, and (for feeds that@@ -217,5 +257,5 @@ export default wrap(async (req, res) => {// forget: a persistence hiccup must never fail the reader response.recordExtraction(value).catch(() => {});- return json(res, 200, value, cacheHeaders);+ return json(res, 200, publicView(value), cacheHeaders);});diff --git a/api/news/knowledge.js b/api/news/knowledge.jsindex ae8238347..d478a2b2b 100644--- a/api/news/knowledge.js+++ b/api/news/knowledge.js@@ -18,6 +18,19 @@import { cors, json, method, wrap, error, rateLimited } from '../_lib/http.js';import { limits, clientIp } from '../_lib/rate-limit.js';import { getExtraction, queryKnowledge, knowledgeStats } from '../_lib/news-knowledge-store.js';+import { suppression, isSuppressed, excerptParagraphs } from '../_lib/news-rights.js';++// The corpus stores each story's full body so the agents' grounding layer can+// reason over it server-side. This endpoint is public and CORS-open, so the+// same rights boundary the reader uses applies on the way out: withdrawn+// stories are dropped entirely, and `paragraphs` is capped to a lead excerpt.+// Callers wanting the whole article follow `url` to the publisher.+function publicRecord(record) {+ if (!record) return record;+ if (!Array.isArray(record.paragraphs)) return record;+ const { paragraphs, truncated } = excerptParagraphs(record.paragraphs);+ return { ...record, paragraphs, excerpt_truncated: truncated, full_text_url: record.url };+}export default wrap(async (req, res) => {if (cors(req, res, { methods: 'GET,OPTIONS', origins: '*' })) return;@@ -37,9 +50,12 @@ export default wrap(async (req, res) => {if (id) {if (!/^[a-f0-9]{16}$/.test(id)) return error(res, 400, 'bad_id', 'id must be a 16-hex article id');+ const sup = suppression({ id });+ if (sup) return error(res, 410, 'removed', 'this story was withdrawn at the rightsholder’s request');const record = await getExtraction(id);if (!record) return error(res, 404, 'not_found', 'no knowledge recorded for this story yet');- return json(res, 200, record, headers);+ if (isSuppressed(record)) return error(res, 410, 'removed', 'this story was withdrawn at the rightsholder’s request');+ return json(res, 200, publicRecord(record), headers);}if (ticker && !/^[A-Za-z0-9]{1,12}$/.test(ticker)) {@@ -51,5 +67,6 @@ export default wrap(async (req, res) => {queryKnowledge({ ticker: ticker || null, q: q || null, limit, full }),knowledgeStats(),]);- return json(res, 200, { articles, stats, query: { ticker: ticker || null, q: q || null, full } }, headers);+ const visible = articles.filter((a) => !isSuppressed(a)).map(publicRecord);+ return json(res, 200, { articles: visible, stats, query: { ticker: ticker || null, q: q || null, full } }, headers);});diff --git a/api/news/story-page.js b/api/news/story-page.jsindex 3ac884be0..0a2ff6e28 100644--- a/api/news/story-page.js+++ b/api/news/story-page.js@@ -18,6 +18,7 @@ import path from 'node:path';import { wrap } from '../_lib/http.js';import { env } from '../_lib/env.js';import { resolveStory, validStoryKey } from '../_lib/news-story.js';+import { suppression, excerptParagraphs, excerptText } from '../_lib/news-rights.js';import { storyPath, tickerHref, TICKER_COIN_IDS } from '../../src/shared/news-links.js';const ORIGIN = env.APP_ORIGIN || 'https://three.ws';@@ -90,7 +91,7 @@ function jsonLd(a, canonicalAbs, ogImage) {publisher: { '@type': 'Organization', name: 'three.ws', url: ORIGIN },mainEntityOfPage: { '@type': 'WebPage', '@id': canonicalAbs },isBasedOn: a.link || undefined,- description: a.description || undefined,+ description: excerptText(a.description) || undefined,about: (a.tickers || []).map((t) => ({ '@type': 'Thing', name: t })),},{@@ -118,6 +119,10 @@ function marketContextHtml(mc) {}function crawlerBodyHtml(a) {+ // Feeds that ship content:encoded put the WHOLE article in `description`.+ // Quote only the lead — this block is what crawlers index, so an unbounded+ // description here is republication of the publisher's body under our URL.+ const lead = excerptParagraphs([a.description || a.title]).paragraphs[0] || a.title;const sentiment = a.sentiment?.label || 'neutral';const badgeCls = sentiment.includes('positive') ? 'bullish' : sentiment.includes('negative') ? 'bearish' : '';const date = fmtDate(a.pub_date);@@ -139,7 +144,7 @@ function crawlerBodyHtml(a) {${chips ? `<div class="nw-chips" style="margin:0 0 1.25rem">${chips}</div>` : ''}<div class="art-summary-card"><h2>Story</h2>- <p>${esc(a.description || a.title)}</p>+ <p>${esc(lead)}</p>${marketContextHtml(a.market_context)}</div><p style="margin:1.75rem 0 0">@@ -189,7 +194,10 @@ export function renderStoryHtml(shell, a) {source: a.source,image: a.image || null,author: a.author || null,- description: a.description || null,+ // Bounded: the seed is embedded verbatim in the served HTML, so an+ // unbounded description would ship the publisher's body in the page+ // source even though the rendered lead above is capped.+ description: excerptText(a.description) || null,pub_date: a.pub_date || null,tickers: a.tickers || [],sentiment: a.sentiment || null,@@ -205,6 +213,30 @@ export function renderStoryHtml(shell, a) {return html;}+// A story withdrawn at the rightsholder's demand. Served with 410 Gone and+// noindex so the URL leaves the search index permanently, and with an honest+// explanation rather than a generic 404 — the link is not broken, the content+// was removed.+function removedHtml(shell, sup) {+ const who = sup.publisher ? esc(sup.publisher) : 'the publisher';+ const body = `+ <h1 class="art-title">This story has been removed</h1>+ <div class="cv-empty">+ <p><strong>${who} asked us to take this page down, and we did.</strong></p>+ <p>three.ws aggregates crypto headlines and adds its own analysis. It should never have hosted+ this article's full text, and it no longer does. The original remains available from ${who}.</p>+ <p><a class="arc-btn" href="/markets/news">Latest crypto news</a>+ <a class="arc-btn ghost" href="/markets/archive">Search the archive</a></p>+ </div>`;+ let html = shell+ .replace(/<title>[\s\S]*?<\/title>/, () => `<title>Story removed · Crypto News · three.ws</title>`)+ .replace(/<article id="art-root"[^>]*>[\s\S]*?<\/article>/, () => `<article id="art-root">${body}</article>`);+ // noindex is load-bearing here: this page must not be re-indexed under any+ // circumstance, including if a crawler ignores the 410.+ html = setMetaContent(html, 'robots', 'noindex, nofollow');+ return html;+}+function notFoundHtml(shell, month, slug) {// The slug in the URL is the story's own title words — turn the dead link// into a ready-made archive search instead of a dead end.@@ -244,6 +276,18 @@ export default wrap(async (req, res) => {return;}+ // Rights check by id first, before any lookup: a taken-down story must 410+ // even once its record is gone from the archive, and must never be served+ // from the page cache.+ const byId = suppression({ id });+ if (byId) {+ res.statusCode = 410;+ res.setHeader('cache-control', 'public, max-age=3600, s-maxage=86400');+ res.setHeader('x-robots-tag', 'noindex, nofollow');+ res.end(removedHtml(shell, byId));+ return;+ }+const key = `${month}/${id}`;const hit = _pages.get(key);if (hit && hit.expiresAt > Date.now()) {@@ -254,6 +298,18 @@ export default wrap(async (req, res) => {}const resolved = await resolveStory(month, id);++ // Publisher-level rights check on the resolved record — catches every story+ // from a withdrawn publisher, not just the ids named in a notice.+ const bySource = resolved ? suppression(resolved.article) : null;+ if (bySource) {+ res.statusCode = 410;+ res.setHeader('cache-control', 'public, max-age=3600, s-maxage=86400');+ res.setHeader('x-robots-tag', 'noindex, nofollow');+ res.end(removedHtml(shell, bySource));+ return;+ }+// A resolvable story always has a canonical path; a dated-but-unlinkable// record (no id/date after compaction) can't reach here because the route// carries both. Missing → an honest 404, cached briefly.diff --git a/api/sitemap/[type].js b/api/sitemap/[type].jsindex 0c62f2340..eb2427a56 100644--- a/api/sitemap/[type].js+++ b/api/sitemap/[type].js@@ -15,6 +15,7 @@ import { env } from '../_lib/env.js';import { reportServerError, redactUrl } from '../_lib/http.js';import { getMonths, loadMonth } from '../_lib/news-archive-store.js';import { storyPath } from '../../src/shared/news-links.js';+import { isSuppressed } from '../_lib/news-rights.js';const ORIGIN = env.APP_ORIGIN;const MAX_URLS = 45_000;@@ -236,6 +237,7 @@ async function newsSitemap() {for (const month of recent) {const records = await loadMonth(month).catch(() => []);for (const a of records) {+ if (isSuppressed(a)) continue; // withdrawn at the rightsholder's demand — never submit it for crawlingconst loc = storyPath(a);if (!loc) continue; // undated/id-less corpus rows have no story pageout.push({diff --git a/data/changelog.json b/data/changelog.jsonindex 13faab48c..64caf90c8 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -14961,6 +14961,17 @@"improvement"],"link": "/docs/chatgpt-ar"+ },+ {+ "date": "2026-07-19",+ "title": "The news reader now quotes publishers instead of reprinting them",+ "summary": "Story pages used to show the full text of the articles they linked to. That was wrong, and a publisher was right to object. Every story page now shows a short lead excerpt, our own summary and key points, live tickers and market context, and sends you to the publisher for the rest. The limit is enforced on the server across every surface that touches article text: the reader, the RSS mirror, the archive search, and the agent knowledge corpus. Twenty-four pages named in a takedown notice have been removed and deindexed, and the publisher who filed it has been dropped from the aggregator. New: a documented takedown path for publishers at /docs/news-rights.",+ "tags": [+ "fix",+ "improvement",+ "docs"+ ],+ "link": "/docs/news-rights"}]}diff --git a/data/pages.json b/data/pages.jsonindex f7c0d22f4..5857650d1 100644--- a/data/pages.json+++ b/data/pages.json@@ -2052,6 +2052,14 @@"added": "2026-07-08","showcase": true},+ {+ "path": "/docs/news-rights",+ "title": "Docs · Publisher rights in the news reader",+ "description": "What three.ws shows from a publisher's article and what it never shows: the enforced lead-excerpt limit, how a withdrawn story is removed (410, deindex, purge), and how publishers can ask us to take something down.",+ "priority": 0.6,+ "changefreq": "monthly",+ "added": "2026-07-19"+ },{"path": "/docs/forge","title": "Docs · Forge (text & image to 3D)",diff --git a/docs/news-rights.md b/docs/news-rights.mdnew file mode 100644index 000000000..3f9fba4c8--- /dev/null+++ b/docs/news-rights.md@@ -0,0 +1,78 @@+---+title: Publisher rights in the news reader+description: What three.ws may and may not show from a publisher's article, how withdrawn stories are removed, and how to file a takedown.+---++# Publisher rights in the news reader++three.ws aggregates 191 crypto news feeds into [/markets/news](https://three.ws/markets/news), gives every story a permalink, and layers its own analysis on top (summary, key points, detected tickers with live prices, market context at publication, sentiment, related coverage).++Aggregating headlines and linking out is lawful. Reproducing a publisher's article body under our own URL is not, however the text arrives — a scraped page, a reader proxy, or an RSS feed that ships the whole article in `content:encoded`. This page documents where that line sits and how it is enforced in code.++## What a story page shows++| Element | Source | Shown |+|---|---|---|+| Headline, byline, publish date, image | The publisher's feed | Yes, with attribution |+| Lead excerpt of the article | The publisher's article | Yes, **capped at 400 characters / 2 paragraphs** |+| Summary, key points, entities, topics | Our analysis of the article | Yes, this is our own work |+| Tickers, live prices, market context | Our market data | Yes |+| The rest of the article body | The publisher's article | **Never.** The reader links out |++The cap is not a UI preference. It is enforced server-side in [`api/_lib/news-rights.js`](../api/_lib/news-rights.js) and applied at every boundary where publisher text can leave the platform:++- `api/news/article.js` — the reader's detail endpoint, via `publicView()`+- `api/news/story-page.js` — the crawler-visible body, the JSON-LD block, and the JSON seed embedded in the HTML+- `api/news/knowledge.js` — the public, CORS-open grounding corpus+- `api/news/archive.js` — the paid archive search, capped at read time+- `api/_lib/news.js` — `getNews()`, which every list payload, the RSS mirror, and the coin rails flow through+- `api/cron/news-archive-append.js` — capped at capture, so new archive rows never hold a body++The extraction ladder still fetches the full text internally: the LLM needs the whole article to summarize it accurately, and the agents' grounding corpus reasons over it server-side. What changes is that the full text never reaches a response.++## Withdrawn stories and publishers++`news-rights.js` holds two lists:++- **`TAKEDOWN_IDS`** — individual stories removed at a rightsholder's demand, keyed by the 16-hex story id that appears in `/markets/news/<month>/<id>`.+- **`RESTRICTED_SOURCE_KEYS` / `RESTRICTED_HOSTS`** — publishers withdrawn entirely, matched by source key and by link hostname so archived records are caught even when their schema predates the key.++A suppressed story:++- answers **410 Gone** at its permalink, with `x-robots-tag: noindex, nofollow` and a `noindex` meta tag. 410 rather than 404 is deliberate: it tells search engines the removal is permanent, so the URL drops out of the index on the next crawl instead of being retried for weeks.+- is dropped from the feed, RSS, related coverage, archive search, the knowledge corpus, and the sitemap.+- is refused by `/api/news/article` and `/api/news/knowledge` with a 410.+- cannot be re-ingested: the publisher is removed from the feed registry, and `getNews()` filters it at the fan-out choke point, so the hourly archiver cannot re-add it.++Suppression happens on **read**, so it takes effect the moment the code deploys, before any data is touched. Deleting the underlying rows is a separate step:++```bash+node scripts/news-takedown-purge.mjs # dry run: report what would be deleted+node scripts/news-takedown-purge.mjs --apply # rewrite the GCS month files, delete the DB rows+```++The script rewrites each affected `gs://three-ws-news-archive/articles/<month>.jsonl` guarded with `if-generation-match`, so it cannot clobber a concurrent append from the hourly cron, and deletes the matching `news_knowledge` rows.++## Removal history++**The Merkle, LLC (NullTX, nulltx.com)** — notice received 2026-07-19 through the Google Search Console legal channel; Lumen notice 15710816. 24 story pages reproduced the titles and substantially the full body text of the corresponding nulltx.com articles. The claim was correct: the reader rendered the extracted body under our own canonical URL. All 24 ids are in `TAKEDOWN_IDS`, `nulltx` was removed from the feed registry, and the excerpt cap above was added so the same defect cannot recur with any other publisher.++## If you are a publisher++If three.ws is showing more of your work than you want it to, you do not need to file anything formal first — email the address on [/legal](https://three.ws/legal) with the URLs and we will remove them. We will also honour a request to drop your publication from the aggregator entirely.++If you would rather file a DMCA notice, that is fine too, and it reaches us either way.++## For contributors++Three rules, in order of importance:++1. **Never widen the excerpt.** `EXCERPT_MAX_CHARS` and `EXCERPT_MAX_PARAGRAPHS` are a legal boundary, not a design knob. [`tests/news-rights.test.js`](../tests/news-rights.test.js) asserts them directly; if a test there fails, the site is republishing copyrighted text again — fix the code, not the test.+2. **Any new surface that emits article text goes through `news-rights.js`.** A new endpoint, MCP tool, feed, or export that reads `paragraphs` or `description` must call `excerptParagraphs()` / `excerptText()` and filter with `isSuppressed()`. The lists are worthless if a new door bypasses them.+3. **Never re-add a withdrawn publisher** without written permission from the rightsholder.++## Related++- [`api/_lib/news-rights.js`](../api/_lib/news-rights.js) — the implementation+- [`scripts/news-takedown-purge.mjs`](../scripts/news-takedown-purge.mjs) — the purge tool+- [Market Data API](./market-data-api.md) — the paid market endpoints, including archive searchdiff --git a/docs/start-here.md b/docs/start-here.mdindex 42ba50c91..c55dba8f6 100644--- a/docs/start-here.md+++ b/docs/start-here.md@@ -84,6 +84,7 @@ Curious what happens between the prompt and the model? [How the Forge works](./h- **Trusting an agent with money?** → [Custody you can verify](./custody.md) — spend limits, freeze, Merkle proof-of-custody, and social recovery; [claim your wallet](./trader-card.md) turns any pump.fun track record into a public, provable Trader Card. Every real-funds feature sits behind the [risk acknowledgment](./risk-acknowledgment.md) — read the [Risk Disclosure](https://three.ws/legal/risk) before committing anything- **Vetting a counterparty before you pay it?** → [Trust primitives](./trust-primitives.md) — the cross-chain Agent Reputation endpoint scores ANY wallet, mint, or agent id (Solana or EVM) 0–100 from real on-chain evidence, in one paid call, before your agent transacts- **Wondering where the platform's money goes?** → [The autonomous economy](./autonomous-economy.md) — how the on-chain treasury funds itself, the funding-root → engines → sweepback loop, the locks that keep every dollar inside platform-owned wallets, and the two leak scanners that audit every wallet on-chain every minute (so far: 44,122 transactions scanned, zero leaks)+- **Publishing news, or wondering what we show of yours?** → [Publisher rights in the news reader](./news-rights.md) — three.ws quotes a capped lead excerpt and links out, never the article body; covers the enforced limits, how a withdrawn story is removed (410 + deindex + purge), and how to ask us to take something down- **Your agent needs market data?** → [Market Data API](./market-data-api.md) — the live feeds behind every /markets page (prices, TVL, yields, stablecoins, gas, derivatives, exploits) as 17 pay-per-call x402 endpoints from $0.001 USDC, plus the one-call `market-pulse` bundle; start at the free index [/api/x402/market](https://three.ws/api/x402/market)- **Trading Robinhood Chain?** → [Robinhood Chain on three.ws](./robinhood-chain-markets.md) — the 24/7 tokenized-equity board (live Chainlink NAV vs. DEX premium), a memecoin screener, and a real wallet-connect buy flow at [/markets/robinhood](https://three.ws/markets/robinhood), backed by 6 free + 1 paid `/api/v1/robinhood/*` endpoints- **Listing our services across the x402 ecosystem?** → [x402 distribution](./x402-distribution.md) — the operating playbook for x402scan, the CDP Bazaar, agentic.market, 402index, and every other directory: how each one indexes providers, what ranks us (settled tx + distinct buyers, trailing 30 days), what's automated, and what needs a humandiff --git a/pages/sniper-experiments.html b/pages/sniper-experiments.htmlindex 388696ea2..0fdf0fbdf 100644--- a/pages/sniper-experiments.html+++ b/pages/sniper-experiments.html@@ -58,7 +58,7 @@<meta property="og:locale" content="en_US"><meta property="og:image:alt" content="Sniper Experiments: rules vs LLM judgment, scored live — three.ws">- <meta name="twitter:image" content="https://three.ws/api/page-og?s=crypto&amp;t=Sniper+Experiments%3A+rules+vs+LLM+judgment%2C+scored+live&amp;d=The+sniper+fleet+runs+different+rule+sets+side+by+side%2C+including+LLM-judged+agents+with+no+rules+at+all.+The+live+scoreboard+of+which+entry+conditions+actually&amp;p=%2Fsniper%2Fexperiments">+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=crypto&t=Sniper+Experiments%3A+rules+vs+LLM+judgment%2C+scored+live&d=The+sniper+fleet+runs+different+rule+sets+side+by+side%2C+including+LLM-judged+agents+with+no+rules+at+all.+The+live+scoreboard+of+which+entry+conditions+actually&p=%2Fsniper%2Fexperiments"><script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Sniper Experiments: rules vs LLM judgment, scored live","description":"The sniper fleet runs different rule sets side by side, including LLM-judged agents with no rules at all. The live scoreboard of which entry conditions actually make money, every fill verifiable on-chain.","url":"https://three.ws/sniper/experiments","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=crypto&t=Sniper+Experiments%3A+rules+vs+LLM+judgment%2C+scored+live&d=The+sniper+fleet+runs+different+rule+sets+side+by+side%2C+including+LLM-judged+agents+with+no+rules+at+all.+The+live+scoreboard+of+which+entry+conditions+actually&p=%2Fsniper%2Fexperiments"},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://three.ws/"},{"@type":"ListItem","position":2,"name":"Sniper","item":"https://three.ws/sniper"},{"@type":"ListItem","position":3,"name":"Experiments","item":"https://three.ws/sniper/experiments"}]}]}</script></head><body>diff --git a/public/changelog.json b/public/changelog.jsonindex 399571432..d9cfc1fa4 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-19T20:54:45.182Z",+ "generated_at": "2026-07-19T22:30:00.732Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -46,6 +46,16 @@"launch"]},+ {+ "date": "2026-07-19",+ "type": "launch",+ "title": "Docs · Publisher rights in the news reader",+ "summary": "What three.ws shows from a publisher's article and what it never shows: the enforced lead-excerpt limit, how a withdrawn story is removed (410, deindex, purge), and how publishers can ask us to take something down.",+ "link": "/docs/news-rights",+ "tags": [+ "launch"+ ]+ },{"date": "2026-07-19","type": "launch",@@ -282,6 +292,18 @@"improvement"]},+ {+ "date": "2026-07-19",+ "type": "update",+ "title": "The news reader now quotes publishers instead of reprinting them",+ "summary": "Story pages used to show the full text of the articles they linked to. That was wrong, and a publisher was right to object. Every story page now shows a short lead excerpt, our own summary and key points, live tickers and market context, and sends you to the publisher for the rest. The limit is enforced on the server across every surface that touches article text: the reader, the RSS mirror, the archive search, and the agent knowledge corpus. Twenty-four pages named in a takedown notice have been removed and deindexed, and the publisher who filed it has been dropped from the aggregator. New: a documented takedown path for publishers at /docs/news-rights.",+ "link": "/docs/news-rights",+ "tags": [+ "fix",+ "improvement",+ "docs"+ ]+ },{"date": "2026-07-19","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex 8834556da..616ca51bf 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -38,6 +38,14 @@<category>launch</category><description>Add a 3D avatar assistant to any website: the one-tag script, the @three-ws/assistant npm package, and the assistant-widget MCP server for AI agents.</description></item>+ <item>+ <title>Docs · Publisher rights in the news reader</title>+ <link>https://three.ws/docs/news-rights</link>+ <guid isPermaLink="false">2026-07-19:Docs · Publisher rights in the news reader</guid>+ <pubDate>Sun, 19 Jul 2026 12:00:00 GMT</pubDate>+ <category>launch</category>+ <description>What three.ws shows from a publisher's article and what it never shows: the enforced lead-excerpt limit, how a withdrawn story is removed (410, deindex, purge), and how publishers can ask us to take something down.</description>+ </item><item><title>Motion Swap — Replace Yourself in Video with Your Avatar</title><link>https://three.ws/motion-swap</link>@@ -214,6 +222,14 @@<category>feature</category><description>Making a 3D model in ChatGPT now feels like the Forge. The generator paints a concept image before sculpting the mesh, and ChatGPT now shows that painted view the moment it exists, while the 3D model is still generating: in the inline widget it appears instantly as the model loads behind it. You can also ask for quality now: draft for speed, standard by default, or high for maximum detail on our own GPUs (it takes a few minutes and is worth it). Under the hood, ChatGPT requests ride the same smart engine routing as the Forge page instead of a single pinned engine, so an unhealthy lane never blocks your model.</description></item>+ <item>+ <title>The news reader now quotes publishers instead of reprinting them</title>+ <link>https://three.ws/docs/news-rights</link>+ <guid isPermaLink="false">2026-07-19:The news reader now quotes publishers instead of reprinting them</guid>+ <pubDate>Sun, 19 Jul 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>Story pages used to show the full text of the articles they linked to. That was wrong, and a publisher was right to object. Every story page now shows a short lead excerpt, our own summary and key points, live tickers and market context, and sends you to the publisher for the rest. The limit is enforced on the server across every surface that touches article text: the reader, the RSS mirror, the archive search, and the agent knowledge corpus. Twenty-four pages named in a takedown notice have been removed and deindexed, and the publisher who filed it has been dropped from the aggregator. New: a documented takedown path for publishers at /docs/news-rights.</description>+ </item><item><title>The sniper fleet becomes a live experiment: rules vs AI judgment</title><link>https://three.ws/sniper/experiments</link>diff --git a/public/features.json b/public/features.jsonindex 4f32e0d32..951c1856a 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-19T20:54:45.169Z",+ "generated_at": "2026-07-19T22:30:00.719Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",@@ -2517,6 +2517,16 @@"tags": [],"showcase": true},+ {+ "path": "/docs/news-rights",+ "title": "Docs · Publisher rights in the news reader",+ "description": "What three.ws shows from a publisher's article and what it never shows: the enforced lead-excerpt limit, how a withdrawn story is removed (410, deindex, purge), and how publishers can ask us to take something down.",+ "added": "2026-07-19",+ "auth": null,+ "indexable": true,+ "tags": [],+ "showcase": false+ },{"path": "/docs/forge","title": "Docs · Forge (text & image to 3D)",diff --git a/public/llms-full.txt b/public/llms-full.txtindex 91f30102d..35856c5e2 100644--- a/public/llms-full.txt+++ b/public/llms-full.txt@@ -37,6 +37,12 @@ URL: https://three.ws/animationsBrowse and preview public animations authored by the three.ws community. Apply any clip to your avatar in the Animation Studio.+### Character Library++URL: https://three.ws/character-library++106 professionally rigged 3D characters, free to use. Every one drives the full animation library and drops into the Studio, Animation Studio, and embed viewer in one click.+### DioramaURL: https://three.ws/diorama@@ -1534,6 +1540,12 @@ URL: https://three.ws/crypto-apiOne free, keyless API for on-chain and market data: DEX pairs, prices, swap quotes, TVL, Solana RPC reads, and ENS/SNS name resolution — CoinGecko, DefiLlama, Jupiter, DexScreener and Solana RPC bundled behind one bill. Live provider table rendered from the real registry, generated OpenAPI 3.1 spec, free tier then BYOK, plan, or x402 pay-per-call.+### Docs · Publisher rights in the news reader++URL: https://three.ws/docs/news-rights++What three.ws shows from a publisher's article and what it never shows: the enforced lead-excerpt limit, how a withdrawn story is removed (410, deindex, purge), and how publishers can ask us to take something down.+### Docs · Forge (text & image to 3D)URL: https://three.ws/docs/forgediff --git a/public/llms.txt b/public/llms.txtindex e408a4fdb..4be68cb7c 100644--- a/public/llms.txt+++ b/public/llms.txt@@ -15,6 +15,7 @@ Entry points into the product.- [Discover](https://three.ws/discover): On-chain agent directory (ERC-8004 + Solana). Browse, search, and inspect every registered agent.- [Avatar Gallery](https://three.ws/gallery): Every public 3D avatar in the system, browsable as a grid.- [Animation Gallery](https://three.ws/animations): Browse and preview public animations authored by the three.ws community. Apply any clip to your avatar in the Animation Studio.+- [Character Library](https://three.ws/character-library): 106 professionally rigged 3D characters, free to use. Every one drives the full animation library and drops into the Studio, Animation Studio, and embed viewer in one click.- [Diorama](https://three.ws/diorama): Speak a little world into being — describe a scene and watch it assemble into an explorable 3D diorama you can walk through, then take it into AR.- [Mocap Studio](https://three.ws/mocap-studio): Drive a 3D avatar with your webcam — real-time facial motion capture in the browser, no rig and no download.- [Coin Autopilot](https://three.ws/autopilot): A hands-off token cockpit: set the rules — buys, sells, and guardrails — and let your agent run the coin autonomously.@@ -272,6 +273,7 @@ Docs, tutorials, and reference.- [Crypto Data API](https://three.ws/crypto): Free, keyless crypto data for AI agents in one API: token snapshots, security/rug signals, holder concentration, live pump.fun launches, bonding-curve status, whale activity, trending tokens, wallet portfolios and ticker-availability checks. No key, no account, no paywall.- [3D API](https://three.ws/3d): Free, keyless 3D API for AI agents: turn a text prompt into a real GLB model and validate/optimize any glTF/GLB, all from one URL with a live OpenAPI 3.1 spec. Free draft generation and inspection graduate to paid Forge Pro quality tiers and animation-ready Rigged Avatars. No key, no account.- [Crypto API](https://three.ws/crypto-api): One free, keyless API for on-chain and market data: DEX pairs, prices, swap quotes, TVL, Solana RPC reads, and ENS/SNS name resolution — CoinGecko, DefiLlama, Jupiter, DexScreener and Solana RPC bundled behind one bill. Live provider table rendered from the real registry, generated OpenAPI 3.1 spec, free tier then BYOK, plan, or x402 pay-per-call.+- [Docs · Publisher rights in the news reader](https://three.ws/docs/news-rights): What three.ws shows from a publisher's article and what it never shows: the enforced lead-excerpt limit, how a withdrawn story is removed (410, deindex, purge), and how publishers can ask us to take something down.- [Docs · Forge (text & image to 3D)](https://three.ws/docs/forge): How the Forge turns a text prompt, photos, or a sketch into a downloadable textured 3D model (GLB): the free-first engine grid with live health status, input modes, output formats, job resume, and background generation.- [Docs · The Forge pipeline (architecture deep dive)](https://three.ws/docs/forge-pipeline): The engineering guide to the Forge: every entry point, the declared engine grid, free-first health-aware routing, the job lifecycle with two-layer failover, persistence and storage, GPU workers, post-processing, payments, and how to extend the pipeline.- [Docs · How the Forge works, in plain language](https://three.ws/docs/how-forge-works): The five steps between typing a prompt and downloading a 3D model: reference image, reconstruction, engine selection, self-healing failover, and permanent storage. Plus what the quality tiers mean and what a finished model can do next.diff --git a/public/sitemap/index.html b/public/sitemap/index.htmlindex 30d086520..815771e22 100644--- a/public/sitemap/index.html+++ b/public/sitemap/index.html@@ -58,7 +58,7 @@<main class="sm-wrap"><div class="sm-hero"><h1>Sitemap</h1>- <p>All 517 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p>+ <p>All 518 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p><div class="sm-formats"><a href="/sitemap.xml"><code>sitemap.xml</code> · for search engines</a><a href="/llms.txt"><code>llms.txt</code> · for AI agents</a>@@ -70,7 +70,7 @@</div><div class="sm-filter"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>- <input id="sm-filter-input" type="search" placeholder="Filter 517 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" />+ <input id="sm-filter-input" type="search" placeholder="Filter 518 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" /><kbd aria-hidden="true">/</kbd></div><p class="sm-filter-count" id="sm-filter-count" role="status" aria-live="polite"></p>@@ -1837,7 +1837,7 @@<section class="sm-section" id="learn"><header>- <h2>Learn<span class="sm-count" data-count>119</span></h2>+ <h2>Learn<span class="sm-count" data-count>120</span></h2><p class="sm-section-desc">Docs, tutorials, and reference.</p></header><ul class="sm-list">@@ -1869,6 +1869,13 @@<span class="sm-desc">One free, keyless API for on-chain and market data: DEX pairs, prices, swap quotes, TVL, Solana RPC reads, and ENS/SNS name resolution — CoinGecko, DefiLlama, Jupiter, DexScreener and Solana RPC bundled behind one bill. Live provider table rendered from the real registry, generated OpenAPI 3.1 spec, free tier then BYOK, plan, or x402 pay-per-call.</span></a></li>+ <li>+ <a href="/docs/news-rights">+ <span class="sm-title">Docs · Publisher rights in the news reader</span>+ <span class="sm-path">/docs/news-rights</span>+ <span class="sm-desc">What three.ws shows from a publisher's article and what it never shows: the enforced lead-excerpt limit, how a withdrawn story is removed (410, deindex, purge), and how publishers can ask us to take something down.</span>+ </a>+ </li><li><a href="/docs/forge"><span class="sm-title">Docs · Forge (text & image to 3D)</span>diff --git a/scripts/news-takedown-purge.mjs b/scripts/news-takedown-purge.mjsnew file mode 100644index 000000000..90b8b00d6--- /dev/null+++ b/scripts/news-takedown-purge.mjs@@ -0,0 +1,166 @@+#!/usr/bin/env node+// Erase withdrawn news records from the durable stores.+// ---------------------------------------------------------------------------+// api/_lib/news-rights.js suppresses withdrawn stories at every READ path, so+// the site stops serving them the moment that code deploys. This script is the+// second half: it deletes the underlying rows, so we are not merely hiding a+// copy we continue to hold.+//+// • gs://three-ws-news-archive/articles/<month>.jsonl — rewrites each month+// file without the suppressed records, guarded with if-generation-match so+// it cannot clobber a concurrent append from the hourly cron.+// • news_knowledge (Neon) — deletes the rows+// carrying the extracted body text.+//+// Usage:+// node scripts/news-takedown-purge.mjs --dry-run # report only (default)+// node scripts/news-takedown-purge.mjs --apply # actually delete+//+// Requires GCP credentials (GCP_SERVICE_ACCOUNT_JSON or an authenticated+// gcloud) and DATABASE_URL, the same as the rest of the ops scripts.++import { getGcpAccessToken } from '../api/_lib/gcp-auth.js';+import { getMonths } from '../api/_lib/news-archive-store.js';+import { isSuppressed, TAKEDOWN_IDS, RESTRICTED_HOSTS } from '../api/_lib/news-rights.js';+import { sql } from '../api/_lib/db.js';++const BUCKET = 'three-ws-news-archive';+const API = `https://storage.googleapis.com/storage/v1/b/${BUCKET}/o`;+const UPLOAD = `https://storage.googleapis.com/upload/storage/v1/b/${BUCKET}/o`;++const APPLY = process.argv.includes('--apply');++async function getObject(token, name) {+ const metaResp = await fetch(`${API}/${encodeURIComponent(name)}`, {+ headers: { authorization: `Bearer ${token}` },+ signal: AbortSignal.timeout(15_000),+ });+ if (metaResp.status === 404) return null;+ if (!metaResp.ok) throw new Error(`GCS meta ${name} → ${metaResp.status}`);+ const meta = await metaResp.json();+ const dataResp = await fetch(`${API}/${encodeURIComponent(name)}?alt=media`, {+ headers: { authorization: `Bearer ${token}` },+ signal: AbortSignal.timeout(120_000),+ });+ if (!dataResp.ok) throw new Error(`GCS read ${name} → ${dataResp.status}`);+ return { generation: meta.generation, text: await dataResp.text() };+}++async function putObject(token, name, body, generation) {+ const resp = await fetch(`${UPLOAD}?uploadType=media&name=${encodeURIComponent(name)}&ifGenerationMatch=${generation}`, {+ method: 'POST',+ headers: {+ authorization: `Bearer ${token}`,+ 'content-type': 'application/x-ndjson',+ 'x-goog-if-generation-match': generation,+ },+ body,+ signal: AbortSignal.timeout(120_000),+ });+ if (resp.status === 412) throw new Error(`${name} changed underneath us (concurrent append) — re-run`);+ if (!resp.ok) throw new Error(`GCS write ${name} → ${resp.status} ${(await resp.text()).slice(0, 200)}`);+}++async function purgeArchive() {+ const token = await getGcpAccessToken();+ const months = await getMonths();+ let scanned = 0;+ let removed = 0;+ const touched = [];++ for (const month of months) {+ const name = `articles/${month}.jsonl`;+ const obj = await getObject(token, name).catch((e) => {+ console.warn(` ! ${name}: ${e.message}`);+ return null;+ });+ if (!obj) continue;++ const lines = obj.text.split('\n').filter(Boolean);+ scanned += lines.length;+ const kept = [];+ let dropped = 0;+ for (const line of lines) {+ let rec;+ try {+ rec = JSON.parse(line);+ } catch {+ kept.push(line); // unparseable line: leave it exactly as found+ continue;+ }+ if (isSuppressed(rec)) {+ dropped++;+ continue;+ }+ kept.push(line);+ }+ if (!dropped) continue;++ removed += dropped;+ touched.push({ month, dropped, kept: kept.length });+ console.log(` ${month}: dropping ${dropped} of ${lines.length}`);+ if (APPLY) {+ await putObject(token, name, `${kept.join('\n')}\n`, obj.generation);+ console.log(` rewritten (${kept.length} records)`);+ }+ }+ return { scanned, removed, touched };+}++async function purgeKnowledge() {+ const ids = [...TAKEDOWN_IDS];+ const hostPatterns = [...RESTRICTED_HOSTS].map((h) => `%://${h}/%`);++ const doomed = await sql`+ select id, url from news_knowledge+ where id = any(${ids}) or url ilike any(${hostPatterns})+ `;+ console.log(` ${doomed.length} news_knowledge row(s) match`);+ for (const r of doomed) console.log(` ${r.id} ${r.url}`);+ if (APPLY && doomed.length) {+ await sql`delete from news_knowledge where id = any(${ids}) or url ilike any(${hostPatterns})`;+ console.log(` deleted ${doomed.length}`);+ }+ return doomed.length;+}++console.log(`news takedown purge — ${APPLY ? 'APPLY (destructive)' : 'DRY RUN (use --apply to delete)'}`);+console.log(` ${TAKEDOWN_IDS.size} taken-down id(s), restricted hosts: ${[...RESTRICTED_HOSTS].join(', ')}\n`);++// The two stores are independent: a missing GCP credential must not stop the+// database purge, and vice versa. Each half reports its own outcome, and the+// exit code tells a caller whether anything still needs doing.+const failures = [];++console.log('GCS archive:');+const archive = await purgeArchive().catch((e) => {+ console.error(` FAILED: ${e.message}`);+ if (e.code === 'unconfigured') {+ console.error(' → needs GCP_SERVICE_ACCOUNT_JSON, or an authenticated gcloud (`gcloud auth login`).');+ }+ failures.push('archive');+ return null;+});++console.log('\nknowledge base:');+const knowledge = await purgeKnowledge().catch((e) => {+ console.error(` FAILED: ${e.message}`);+ console.error(' → needs DATABASE_URL.');+ failures.push('knowledge');+ return null;+});++console.log('');+if (archive) {+ console.log(`scanned ${archive.scanned} archive records across ${archive.touched.length} affected month(s)`);+ console.log(`archive records ${APPLY ? 'removed' : 'to remove'}: ${archive.removed}`);+}+if (knowledge !== null) console.log(`knowledge rows ${APPLY ? 'removed' : 'to remove'}: ${knowledge}`);++if (failures.length) {+ console.error(`\nincomplete: ${failures.join(' and ')} could not be reached. Re-run once credentials are available.`);+ console.error('Note: the read path already suppresses these records (api/_lib/news-rights.js), so nothing is being served meanwhile.');+ process.exit(1);+}+if (!APPLY) console.log('\nnothing was changed. re-run with --apply to execute.');+process.exit(0);diff --git a/scripts/ship-main.sh b/scripts/ship-main.shnew file mode 100755index 000000000..96cb30370--- /dev/null+++ b/scripts/ship-main.sh@@ -0,0 +1,35 @@+#!/usr/bin/env bash+# One-shot production ship: clean worktree build of main HEAD -> Cloud Build -> deploy -> CDN purge.+# Preconditions: gcloud auth is live (run `gcloud auth login` first if the session expired),+# and main is test-green (`npm test`). Env vars on the service persist across this image-only deploy.+set -euo pipefail+ROOT=/workspaces/three.ws+WT=/workspaces/.deploy-wt+PROJECT=aerial-vehicle-466722-p5+REGION=us-central1++cd "$ROOT"+echo "== gcloud auth preflight =="+gcloud run services describe three-ws-api --region "$REGION" --project "$PROJECT" \+ --format='value(status.latestReadyRevisionName)' >/dev/null++echo "== fresh clean worktree at $(git rev-parse --short HEAD) =="+git worktree remove --force "$WT" 2>/dev/null || rm -rf "$WT"+git worktree prune+git worktree add --detach "$WT" HEAD+# integrity guard: fail loudly if the checkout is incomplete (concurrent-agent git race)+for f in scripts/write-build-info.mjs package.json server/cloudbuild.yaml; do+ test -f "$WT/$f" || { echo "FATAL: worktree missing $f (checkout raced); retry"; exit 3; }+done+cp -al "$ROOT/node_modules" "$WT/node_modules"++cd "$WT"+echo "== build:gcp =="+npm run build:gcp+echo "== submit + deploy =="+gcloud builds submit --config server/cloudbuild.yaml --region "$REGION" --project "$PROJECT"+echo "== purge CDN =="+npm run deploy:gcp:purge-cdn+echo "== verify live commit =="+sleep 15+curl -s https://three.ws/api/version | python3 -c "import json,sys; d=json.load(sys.stdin); print('LIVE commit:', d['commitShort'], 'revision:', d['runtime']['revision'])"diff --git a/src/coin-pages.css b/src/coin-pages.cssindex 61c02b1ef..851f24be2 100644--- a/src/coin-pages.css+++ b/src/coin-pages.css@@ -2748,6 +2748,17 @@ a.cv-liq-item:focus-visible {.art-prose p {margin: 0 0 1.125rem;}+/* Sits under a truncated excerpt: makes the cut-off read as deliberate+ attribution, not a failed extraction. Pairs with the .art-cta below it. */+.art-continue {+ max-width: 70ch;+ margin: -0.25rem 0 0;+ padding-left: 0.875rem;+ border-left: 2px solid var(--cv-accent);+ color: var(--cv-text-dim);+ font-size: 0.9375rem;+ line-height: 1.6;+}.art-preview-note {display: flex;gap: 0.75rem;diff --git a/src/news-article.js b/src/news-article.jsindex 20ab0e7c1..fe7132cdc 100644--- a/src/news-article.js+++ b/src/news-article.js@@ -200,7 +200,10 @@ function summaryCardHtml(a, seed) {function render(a, seed) {const image = a.image || seed.image;- const paragraphs = (a.paragraphs || []).slice(0, 60);+ // The API serves a bounded lead excerpt, never the publisher's full body+ // (api/_lib/news-rights.js). The value here is what we may quote; the story+ // itself belongs to, and stays on, the publisher's site.+ const paragraphs = a.paragraphs || [];const isPreview = a.extraction === 'preview';root.innerHTML = `${image ? `<div class="art-hero"><img loading="lazy" decoding="async" src="${esc(image)}" alt="" data-fallback="${esc((a.source || '?').slice(0, 2).toUpperCase())}" /></div>` : ''}@@ -219,11 +222,16 @@ function render(a, seed) {<span><strong>${esc(a.source)}</strong> doesn’t allow embedded reading, so the full text stays on their site.The summary above is built from the story metadata.</span></div>`- : `<div class="art-prose">${paragraphs.map((p) => `<p>${esc(p)}</p>`).join('')}</div>`+ : `<div class="art-prose">${paragraphs.map((p) => `<p>${esc(p)}</p>`).join('')}</div>+ ${+ a.excerpt_truncated+ ? `<p class="art-continue">Excerpt from <strong>${esc(a.source)}</strong>. Continue reading the full story at the source.</p>`+ : ''+ }`}<p style="margin:1.75rem 0 0"><a class="art-cta" href="${esc(a.url)}" target="_blank" rel="noopener noreferrer">- Read at ${esc(a.source)}+ ${a.excerpt_truncated ? 'Continue reading at' : 'Read at'} ${esc(a.source)}<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg></a></p>diff --git a/tests/news-rights.test.js b/tests/news-rights.test.jsnew file mode 100644index 000000000..71bf2e663--- /dev/null+++ b/tests/news-rights.test.js@@ -0,0 +1,248 @@+// Coverage for api/_lib/news-rights.js — the publisher-rights boundary.+//+// Two invariants are load-bearing here and both carry legal weight:+// 1. A withdrawn story is unreachable by every route (id, source key, link+// host) and its permalink answers 410, not 404 or 200.+// 2. No publisher's full body is ever emitted. excerptParagraphs() is the+// only thing standing between the extraction ladder and the response, so+// its bounds are asserted directly rather than through a caller.+//+// This file exists because of a real DMCA notice (The Merkle, LLC / NullTX,+// 2026-07-19). If a test here starts failing, the site is republishing+// copyrighted text again — fix the code, do not relax the test.++import { describe, it, expect, vi, beforeEach } from 'vitest';++vi.mock('../api/_lib/http.js', () => ({ wrap: (fn) => fn }));+vi.mock('../api/_lib/env.js', () => ({ env: {} }));++const findArticle = vi.fn(async () => null);+const loadMonth = vi.fn(async () => []);+vi.mock('../api/_lib/news.js', () => ({ findArticle: (...a) => findArticle(...a) }));+vi.mock('../api/_lib/news-archive-store.js', () => ({ loadMonth: (...a) => loadMonth(...a) }));++const { suppression, isSuppressed, excerptParagraphs, excerptText, EXCERPT_MAX_CHARS, EXCERPT_MAX_PARAGRAPHS, TAKEDOWN_IDS } =+ await import('../api/_lib/news-rights.js');+const { NEWS_SOURCES } = await import('../api/_lib/news-sources.js');+const { default: storyPage } = await import('../api/news/story-page.js');++// One of the ids named in the notice.+const TAKEN_DOWN_ID = '4bc5221ecb8d937f';++function call(url) {+ const res = {+ statusCode: 200,+ headers: {},+ body: '',+ setHeader(k, v) {+ this.headers[k.toLowerCase()] = v;+ },+ end(chunk) {+ this.body = chunk || '';+ },+ };+ return storyPage({ method: 'GET', url, headers: {} }, res).then(() => res);+}++beforeEach(() => {+ findArticle.mockReset().mockResolvedValue(null);+ loadMonth.mockReset().mockResolvedValue([]);+});++describe('suppression', () => {+ it('catches a taken-down story by id', () => {+ expect(suppression({ id: TAKEN_DOWN_ID })).toMatchObject({ reason: 'takedown' });+ });++ it('is case-insensitive on the id', () => {+ expect(isSuppressed({ id: TAKEN_DOWN_ID.toUpperCase() })).toBe(true);+ });++ it('catches a withdrawn publisher by source key', () => {+ expect(suppression({ id: 'aaaaaaaaaaaaaaaa', source_key: 'nulltx' })).toMatchObject({+ reason: 'restricted_publisher',+ });+ });++ it('catches a withdrawn publisher by link host, with or without www', () => {+ expect(isSuppressed({ link: 'https://nulltx.com/some-story/' })).toBe(true);+ expect(isSuppressed({ link: 'https://www.nulltx.com/some-story/' })).toBe(true);+ });++ it('does not catch a lookalike host', () => {+ expect(isSuppressed({ link: 'https://nulltx.com.evil.example/x' })).toBe(false);+ expect(isSuppressed({ link: 'https://notnulltx.com/x' })).toBe(false);+ });++ it('leaves ordinary articles alone', () => {+ expect(isSuppressed({ id: 'abcdefabcdefabcd', source_key: 'theblock', link: 'https://theblock.co/x' })).toBe(false);+ });++ it('tolerates junk input rather than throwing', () => {+ expect(isSuppressed(null)).toBe(false);+ expect(isSuppressed({})).toBe(false);+ expect(isSuppressed({ link: 'not a url' })).toBe(false);+ });++ it('holds every id named in the notice', () => {+ expect(TAKEDOWN_IDS.size).toBe(24);+ for (const id of TAKEDOWN_IDS) expect(id, `${id} must be a 16-hex story id`).toMatch(/^[a-f0-9]{16}$/);+ });+});++describe('the withdrawn publisher is out of the ingest registry', () => {+ it('no longer lists nulltx', () => {+ expect(NEWS_SOURCES.nulltx).toBeUndefined();+ });++ it('lists no feed pointing at the withdrawn host', () => {+ for (const [key, src] of Object.entries(NEWS_SOURCES)) {+ expect(new URL(src.url).hostname, `${key} must not poll a withdrawn publisher`).not.toMatch(/(^|\.)nulltx\.com$/);+ }+ });+});++describe('excerptParagraphs — the standing limit for every publisher', () => {+ const body = [+ 'Bitcoin climbed above ninety thousand dollars on Tuesday as spot ETF inflows accelerated for a fourth straight session.',+ 'Analysts pointed to a thinning order book on the major venues, which amplifies moves in both directions.',+ 'A third paragraph that must never be served.',+ 'A fourth paragraph that must never be served either.',+ ];++ it('never exceeds the paragraph cap', () => {+ expect(excerptParagraphs(body).paragraphs.length).toBeLessThanOrEqual(EXCERPT_MAX_PARAGRAPHS);+ });++ it('never exceeds the character budget', () => {+ const joined = excerptParagraphs(body).paragraphs.join('');+ // The single-paragraph overrun path appends an ellipsis; allow for it.+ expect(joined.length).toBeLessThanOrEqual(EXCERPT_MAX_CHARS + 1);+ });++ it('reports truncation so the reader can link out', () => {+ expect(excerptParagraphs(body).truncated).toBe(true);+ });++ it('drops the withheld paragraphs entirely, not just visually', () => {+ const out = excerptParagraphs(body).paragraphs.join(' ');+ expect(out).not.toContain('must never be served');+ });++ it('cuts a single oversized paragraph at a boundary, never mid-word', () => {+ const long = ['word '.repeat(400).trim()];+ const { paragraphs, truncated } = excerptParagraphs(long);+ expect(truncated).toBe(true);+ expect(paragraphs[0].length).toBeLessThanOrEqual(EXCERPT_MAX_CHARS + 1);+ expect(paragraphs[0]).toMatch(/…$/);+ expect(paragraphs[0]).not.toMatch(/wor…$/); // no mid-word cut+ });++ it('passes through a genuinely short body without claiming truncation', () => {+ const short = ['A two sentence wire brief. That is the whole item.'];+ const { paragraphs, truncated } = excerptParagraphs(short);+ expect(paragraphs).toEqual(short);+ expect(truncated).toBe(false);+ });++ it('handles an empty or dirty body', () => {+ expect(excerptParagraphs([])).toEqual({ paragraphs: [], truncated: false });+ expect(excerptParagraphs(null)).toEqual({ paragraphs: [], truncated: false });+ expect(excerptParagraphs(['', ' ']).paragraphs).toEqual([]);+ });+});++describe('excerptText — the description field carries whole articles too', () => {+ it('leaves a genuine one-line summary untouched', () => {+ const d = 'Oversight tightens and regulated venues win share.';+ expect(excerptText(d)).toBe(d);+ });++ it('caps a content:encoded description that is really the full body', () => {+ const fullBody = 'Sentence about the market. '.repeat(200);+ const out = excerptText(fullBody);+ expect(out.length).toBeLessThanOrEqual(EXCERPT_MAX_CHARS + 1);+ expect(out.length).toBeLessThan(fullBody.length);+ });++ it('is empty-safe', () => {+ expect(excerptText('')).toBe('');+ expect(excerptText(null)).toBe('');+ expect(excerptText(undefined)).toBe('');+ });+});++describe('GET /api/news/story-page for a withdrawn story', () => {+ it('answers 410 Gone, not 404 or 200', async () => {+ const res = await call(`/api/news/story-page?month=2026-06&id=${TAKEN_DOWN_ID}`);+ expect(res.statusCode).toBe(410);+ });++ it('is marked noindex so it leaves the search index', async () => {+ const res = await call(`/api/news/story-page?month=2026-06&id=${TAKEN_DOWN_ID}`);+ expect(res.headers['x-robots-tag']).toContain('noindex');+ expect(res.body).toMatch(/name=["']robots["'][^>]*content=["']noindex/);+ });++ it('410s without touching the archive at all', async () => {+ await call(`/api/news/story-page?month=2026-06&id=${TAKEN_DOWN_ID}`);+ expect(loadMonth).not.toHaveBeenCalled();+ expect(findArticle).not.toHaveBeenCalled();+ });++ it('410s under any month, since the id alone is disqualifying', async () => {+ const res = await call(`/api/news/story-page?month=2026-07&id=${TAKEN_DOWN_ID}`);+ expect(res.statusCode).toBe(410);+ });++ it('410s every id named in the notice', async () => {+ for (const id of TAKEDOWN_IDS) {+ const res = await call(`/api/news/story-page?month=2026-07&id=${id}`);+ expect(res.statusCode, `${id} must be gone`).toBe(410);+ }+ });++ it('explains the removal instead of showing a generic dead end', async () => {+ const res = await call(`/api/news/story-page?month=2026-06&id=${TAKEN_DOWN_ID}`);+ expect(res.body).toContain('removed');+ expect(res.body).not.toContain('Story not found');+ });++ it('does not embed a full-body description anywhere in the served HTML', async () => {+ // A content:encoded publisher: the whole article arrives in `description`.+ const TAIL = 'THIS_IS_THE_END_OF_THE_ARTICLE_BODY';+ const fullBody = `The lede sentence of the story. ${'Filler body sentence. '.repeat(200)} ${TAIL}`;+ const article = {+ id: 'dddddddddddddddd',+ title: 'A publisher that ships full text in RSS',+ link: 'https://thedefiant.io/some-story',+ description: fullBody,+ source: 'The Defiant',+ source_key: 'thedefiant',+ category: 'general',+ pub_date: '2026-05-02T10:00:00.000Z',+ tickers: [],+ };+ loadMonth.mockImplementation(async (m) => (m === '2026-05' ? [article] : []));+ const res = await call(`/api/news/story-page?month=2026-05&id=${article.id}`);+ expect(res.statusCode).toBe(200);+ // Rendered lead, JSON seed, and meta tags must all be bounded.+ expect(res.body).not.toContain(TAIL);+ expect(res.body).toContain('A publisher that ships full text in RSS');+ });++ it('410s a story from a withdrawn publisher that is not named in the notice', async () => {+ const other = {+ id: 'cccccccccccccccc',+ title: 'Some other NullTX story',+ link: 'https://nulltx.com/another/',+ source: 'NullTX',+ source_key: 'nulltx',+ pub_date: '2026-05-02T10:00:00.000Z',+ };+ loadMonth.mockImplementation(async (m) => (m === '2026-05' ? [other] : []));+ const res = await call(`/api/news/story-page?month=2026-05&id=${other.id}`);+ expect(res.statusCode).toBe(410);+ expect(res.body).not.toContain('Some other NullTX story');+ });+});