Skip to content

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.

feat(x-content): add partner records for Alibaba Cloud, Google Cloud, NVIDIA, OpenAI and QuickNode plus a scheduled job for the daily partner run

nirholasfa0fcbe437a8
diff --git a/api/_lib/x-content/partners.js b/api/_lib/x-content/partners.js
index 199b072c7..21672db90 100644
--- a/api/_lib/x-content/partners.js
+++ b/api/_lib/x-content/partners.js
@@ -396,3 +396,276 @@ export function itemFor({ partner, feature, head, pattern, day, draft, proof = n
}
export const maximumLength = (quality) => maxLengthOf(quality || {});
+
+// --- the weekly deep dive -----------------------------------------------------
+//
+// Once a week the series also writes an X Article about one partner: every
+// feature three.ws built on it, each filmed again for the occasion, with the
+// requests and the scenarios behind them set as real code and the facts set as
+// tables. The model writes the prose; the code, tables and figures are built
+// here from the registry and the runs, so nothing in a code block or a table is
+// the model's invention. The Article goes through the queue's full Article gate
+// (title length, depth, code and tables, images, the partners section, Try it).
+
+export const ARTICLE_EVERY_DAYS = 7;
+// A 2,400 word Article plus its title and post runs past the chain's default
+// answer budget, so the request asks for room to finish.
+export const ARTICLE_MAX_TOKENS = 16_000;
+export const ARTICLE_MIN_FIGURES = 4;
+const CODE_BUDGET = 9000;
+
+export const articleId = (partner, day) => `partner-${partner.id}-article-${day.replace(/-/g, '')}`;
+
+// Every partner Article queued or sent, oldest first.
+export function partnerArticles(items) {
+ return (items || [])
+ .filter((item) => item?.kind === 'article' && item.spotlight?.partner && item.spotlight.article)
+ .map((item) => ({ id: item.id, partner: item.spotlight.partner, day: String(item.notBefore || '').slice(0, 10), status: item.status }))
+ .sort((left, right) => left.day.localeCompare(right.day) || left.id.localeCompare(right.id));
+}
+
+// The day the next partner Article is due: a week after the last one, and
+// never before `now`.
+export function nextArticleDay(rows, now = Date.now(), everyDays = ARTICLE_EVERY_DAYS) {
+ const start = new Date(now).toISOString().slice(0, 10);
+ const last = rows.filter((row) => row.status !== 'paused').at(-1);
+ if (!last) return start;
+ const due = new Date(Date.parse(`${last.day}T00:00:00Z`) + everyDays * DAY).toISOString().slice(0, 10);
+ return due > start ? due : start;
+}
+
+// The partner whose Article is oldest, in page order on a tie. A partner with
+// one feature still gets its turn: its features are filmed and quoted, and the
+// figures come from more frames of the same reel.
+export function pickArticlePartner(partners, rows, { exclude = [] } = {}) {
+ const usable = partners.filter((partner) => !exclude.includes(partner.id) && partner.features?.length);
+ if (!usable.length) return null;
+ return [...usable].sort((left, right) => lastIndex(rows, (row) => row.partner === left.id) - lastIndex(rows, (row) => row.partner === right.id) || left.order - right.order)[0];
+}
+
+const fence = (lang, text) => `\`\`\`${lang}\n${text}\n\`\`\``;
+const cell = (text) => String(text ?? '').replace(/\|/g, '\\|').replace(/\s+/g, ' ').trim();
+const clip = (text, limit) => (text.length > limit ? `${text.slice(0, limit).replace(/\s+\S*$/, '')}\n...` : text);
+
+function evidenceLabel(evidence, proof) {
+ if (evidence.type === 'page') return `${bare(evidence.url)} shows "${evidence.contains}"`;
+ if (evidence.type === 'file') return `${evidence.path} contains "${evidence.contains}"`;
+ if (evidence.type === 'proof' && evidence.saw) return `the run saw "${evidence.saw}"`;
+ if (evidence.type === 'proof') return `the run read ${evidence.fact} = ${proof?.facts?.[evidence.fact] ?? evidence.equals ?? evidence.min ?? ''}`.trim();
+ if (evidence.type === 'api') return `GET ${bare(evidence.url)}`;
+ return evidence.type;
+}
+
+// The facts a run lets the Article state. The Article's own proof is its lead
+// run, so a fact proven by another feature's run can only be stated by the
+// spotlight that filmed it; here it is left out.
+export function articleFacts(feature, { lead = false } = {}) {
+ return (feature.facts || []).filter((fact) => lead || !fact.evidence.some((evidence) => evidence.type === 'proof'));
+}
+
+// The code and tables, built from the registry and the runs. `runs` holds, per
+// feature, the proof and (for an API surface) the live response it answered.
+export function articleBlocks(partner, runs) {
+ const blocks = {};
+ blocks.runs = [
+ '| Feature | Filmed on | Length | Read live |',
+ '|---|---|---|---|',
+ ...runs.map(({ feature, proof }) => `| ${cell(feature.title)} | ${cell(bare(feature.scenario.steps[0].goto))} | ${proof?.video?.durationSec ? `${proof.video.durationSec} s` : 'not filmed'} | ${cell(Object.entries(proof?.facts || {}).map(([name, value]) => `${name} = ${value}`).join(', ') || 'none')} |`),
+ ].join('\n');
+ runs.forEach(({ feature, proof, live }, index) => {
+ const facts = articleFacts(feature, { lead: index === 0 });
+ blocks[`facts-${feature.id}`] = ['| What we state | Checked against |', '|---|---|', ...facts.map((fact) => `| ${cell(fact.says)} | ${cell(fact.evidence.map((evidence) => evidenceLabel(evidence, proof)).join('; '))} |`)].join('\n');
+ const steps = JSON.stringify({ format: feature.scenario.format, steps: feature.scenario.steps }, null, 2);
+ blocks[`scenario-${feature.id}`] = fence('json', clip(steps, 1400));
+ const logged = (proof?.steps || []).filter((step) => step.kind !== 'hold');
+ if (logged.length) blocks[`log-${feature.id}`] = ['| Step | Did | On | Result | ms |', '|---|---|---|---|---|', ...logged.map((step) => `| ${step.index} | ${step.kind} | ${cell(clip(bare(String(step.target ?? '')), 80))} | ${step.ok ? 'passed' : 'failed'}: ${cell(clip(String(step.detail ?? ''), 90))} | ${step.ms ?? ''} |`)].join('\n');
+ if (live?.body) blocks[`request-${feature.id}`] = `${fence('bash', `curl -s '${live.url}'`)}\n\n${fence(live.json ? 'json' : 'text', clip(live.body, 900))}`;
+ });
+ // X caps code and tables per Article; trim the longest code first.
+ const weight = () => Object.values(blocks).reduce((sum, block) => sum + block.length, 0);
+ const trimmable = (key) => (key.startsWith('scenario-') ? 0 : key.startsWith('log-') ? 1 : 2);
+ for (const name of Object.keys(blocks).filter((key) => trimmable(key) < 2).sort((left, right) => trimmable(left) - trimmable(right) || blocks[right].length - blocks[left].length)) {
+ if (weight() <= CODE_BUDGET) break;
+ delete blocks[name];
+ }
+ return blocks;
+}
+
+export const ARTICLE_SYSTEM = `You write the weekly partner deep dive for @trythreews, the X account of three.ws, a platform for 3D AI agents: avatars, a web component, agent wallets on Solana, and the $THREE token. It is a long-form X Article about one partner listed on three.ws/partners and everything three.ws built on that partner's technology. Every feature in it was filmed working on production for this Article.
+
+You are given a brief. It is the only source of facts you have. Do not add anything that is not in it, do not guess at numbers, and do not describe behaviour it does not record.
+
+The Article:
+- A title of {TITLE_MIN} to {TITLE_MAX} characters that names the partner and says what three.ws built; carry a number only if a fact or a measured value holds it.
+- At least {WORDS} words of prose (code and tables do not count), in at least {SECTIONS} sections, each a "## " heading named for what the reader learns. Open with a friendly paragraph that says what the partner makes possible, then go deep: how each feature works, what a person does with it, what an agent does with it, and how it was checked.
+- Give every feature in the brief at least one section of its own.
+- State the relationship once using the designation exactly as the brief gives it, word for word, with the same capitals, and link the partner page. Thank the partner warmly and specifically.
+- Place every block in brief.blocks exactly once, each on its own line as {{block:NAME}}, inside the section it belongs to, with a sentence before it saying what it shows. Place at least {FIGURES} figures from brief.figures, each on its own line as {{figure:N}}, beside the text about what it shows. Never write code fences or tables yourself.
+- Near the end, a section headed "## The partners behind ..." (finish the heading in your own words) with one short paragraph per entry in brief.partnersSection, in that order. Write each from its line only, and keep each designation word for word.
+- The last section is headed "## Try it" and links the live pages in brief.tryIt as Markdown links.
+- Use the facts word for word, exactly as written, because each is checked against its evidence, and weave them into your own sentences without quotation marks. Every number, ordinal and absolute word (first, only, every, never, all, free, zero, instant) must sit inside a quoted fact, the designation, or a measured value. If you cannot support a number, leave it out.
+- Positive framing only. Nothing about what is missing, late, broken, or limited.
+
+Hard rules, each enforced by a machine after you answer:
+- No @mentions anywhere, and no npm scopes or anything else that starts with @. Never use a phrase in partner.forbidden, in any form, not even to deny it ("not an endorsement" still says "endorsement"): state what the relationship is, never what it is not. Never say or imply that the partner endorses, sponsors, invests in, or recommends three.ws or $THREE.
+- No hashtags, no emoji, no em-dashes or en-dashes, no stacked exclamation marks.
+- No launch-deck openers (Introducing, We are excited, Say hello to, Big news), no rhetorical question first.
+- No hype or filler: game-changer, revolutionary, seamless, powerful, robust, innovative, cutting-edge, world-class, leverage, empower, unleash, elevate, harness, journey, supercharge, delve, very, really, simply, literally, actually, basically, truly, incredibly, amazing, awesome, groundbreaking.
+- No crypto slang, no engagement asks, nothing that reads as investment advice or a price promise.
+- Names written exactly: three.ws, $THREE, X (never Twitter), GitHub, JavaScript, TypeScript, OpenAI, NVIDIA, Solana, glTF, GLB, API, MCP, AI.
+
+Answer in exactly this shape and nothing else:
+TITLE: the title
+POST: the post that quotes the Article on X, 150 to 400 characters, naming the partner and saying what the reader will learn, with no link
+---
+the Article body in Markdown, starting with the opening paragraph (no top-level # title)`;
+
+export function buildArticleBrief({ partner, runs, figures, blocks, partnersSection, tryIt }) {
+ return {
+ partner: { name: partner.name, designation: partner.designation, page: partner.page, guidance: partner.guidance, forbidden: partner.forbidden },
+ features: runs.map(({ feature, proof }, index) => ({
+ title: feature.title,
+ surface: feature.surface,
+ summary: feature.summary,
+ facts: articleFacts(feature, { lead: index === 0 }).map((fact) => fact.says),
+ reel: (feature.scenario.steps || []).map((step) => step.caption).filter(Boolean),
+ measured: index === 0 ? proof?.facts || {} : {},
+ })),
+ blocks: Object.fromEntries(Object.entries(blocks).map(([name, block]) => [name, block.startsWith('|') ? `table: ${block.split('\n')[0]}` : `code: ${block.split('\n')[0].replace(/`/g, '')} block, ${block.length} characters`])),
+ figures: figures.map((figure, index) => ({ n: index + 1, shows: figure.alt })),
+ partnersSection,
+ tryIt,
+ };
+}
+
+export function buildArticleRequest(brief, { voice = null, exemplar = null, findings = [], previous = null } = {}) {
+ const retry = previous
+ ? ['## Your previous draft, and why it was rejected', `TITLE: ${previous.title}\nPOST: ${previous.post}\n---\n${previous.markdown}`, findings.map((finding) => `- ${finding}`).join('\n'), 'Write it again in full. Fix every point. Keep what was already true.'].join('\n\n')
+ : null;
+ const text = [
+ `## Brief\n${JSON.stringify(brief, null, 2)}`,
+ `## How to describe the relationship\n${brief.partner.guidance}`,
+ voice ? `## House voice contract\n${voice}` : null,
+ exemplar ? `## The house exemplar Article (match its voice, depth and warmth toward partners)\n${exemplar}` : null,
+ retry,
+ 'Write the Article now, in the shape the system prompt gives.',
+ ]
+ .filter(Boolean)
+ .join('\n\n');
+ const system = ARTICLE_SYSTEM.replace('{TITLE_MIN}', '80').replace('{TITLE_MAX}', '100').replace('{WORDS}', '2,400').replace('{SECTIONS}', '8').replace('{FIGURES}', String(ARTICLE_MIN_FIGURES));
+ return { system, parts: [{ type: 'text', text }], maxTokens: ARTICLE_MAX_TOKENS };
+}
+
+export function parseArticle(raw) {
+ const text = String(raw || '').replace(/\r\n/g, '\n');
+ const title = text.match(/^\s*TITLE:\s*(.+)$/m)?.[1]?.trim();
+ const post = text.match(/^\s*POST:\s*(.+)$/m)?.[1]?.trim();
+ const split = text.search(/^---\s*$/m);
+ if (!title || !post || split < 0) throw new Error('drafter did not answer in the TITLE / POST / --- shape');
+ const markdown = text.slice(split).replace(/^---\s*\n/, '').trim();
+ if (markdown.split(/\s+/).length < 200) throw new Error('drafter returned an Article body under 200 words');
+ return { title, post, markdown };
+}
+
+// Replaces the markers with the real blocks and figures. Every block must be
+// placed exactly once; figures by number.
+export function assembleArticle(markdown, blocks, figures) {
+ const findings = [];
+ const used = new Map();
+ const body = markdown
+ .replace(/^[ \t]*\{\{block:([a-z0-9-]+)\}\}[ \t]*$/gm, (match, name) => {
+ used.set(name, (used.get(name) || 0) + 1);
+ if (!blocks[name]) {
+ findings.push(`{{block:${name}}} is not in brief.blocks`);
+ return '';
+ }
+ return used.get(name) > 1 ? '' : blocks[name];
+ })
+ .replace(/^[ \t]*\{\{figure:(\d+)\}\}[ \t]*$/gm, (match, number) => {
+ const figure = figures[Number(number) - 1];
+ if (!figure) {
+ findings.push(`{{figure:${number}}} is not in brief.figures`);
+ return '';
+ }
+ used.set(`figure:${number}`, (used.get(`figure:${number}`) || 0) + 1);
+ return `![${figure.alt}](${figure.path.replace(/^public\//, '/')})`;
+ })
+ .replace(/\n{3,}/g, '\n\n');
+ for (const name of Object.keys(blocks)) {
+ if (!used.has(name)) findings.push(`{{block:${name}}} is missing; place every block once`);
+ else if (used.get(name) > 1) findings.push(`{{block:${name}}} is placed ${used.get(name)} times; place it once`);
+ }
+ const placed = [...used.keys()].filter((key) => key.startsWith('figure:')).length;
+ if (placed < ARTICLE_MIN_FIGURES) findings.push(`${placed} figures are placed; place at least ${ARTICLE_MIN_FIGURES}`);
+ if (/```|^\s*\|.*\|\s*$/m.test(markdown)) findings.push('the draft writes its own code fence or table; use the {{block:NAME}} markers only');
+ if (/\{\{[^}]*\}\}/.test(body)) findings.push('a marker is not on a line of its own, so it was not replaced; put each {{...}} on its own line');
+ return { body: `${body.trim()}\n`, findings };
+}
+
+// The series rules an Article shares with a spotlight, on its prose.
+export function articleSeriesFindings(partner, draft) {
+ const findings = [];
+ const corpus = [draft.title, draft.post, draft.markdown].join('\n');
+ if (!draft.markdown.includes(partner.designation)) findings.push(`state the relationship as "${partner.designation}", word for word with the same capitals`);
+ for (const phrase of partner.forbidden || []) if (lower(corpus).includes(lower(phrase))) findings.push(`"${phrase}" overstates the relationship with ${partner.name}; cut it`);
+ const tagged = mentionsIn(corpus);
+ if (tagged.length) findings.push(`${tagged.join(', ')}: the Article tags no one; name the partner in plain text`);
+ if (!lower(draft.title).includes(lower(partner.name))) findings.push(`the title must name ${partner.name}`);
+ if (!linksTo(draft.markdown, partner.page)) findings.push(`link the partner page ${bare(partner.page)} in the body`);
+ return findings;
+}
+
+// Claims for the whole Article: the designation, every quoted fact of every
+// feature, and the lead run's measured values (the Article's own proof).
+export function articleClaims(partner, runs, texts) {
+ const claims = [];
+ const seen = new Set();
+ runs.forEach(({ feature, proof }, index) => {
+ const facts = { ...feature, facts: articleFacts(feature, { lead: index === 0 }) };
+ for (const claim of claimsFor(partner, facts, texts, index === 0 ? proof : null)) {
+ if (seen.has(lower(claim.says))) continue;
+ seen.add(lower(claim.says));
+ claims.push(claim);
+ }
+ });
+ return claims;
+}
+
+// The queue item: an X Article, quoted by one post that carries the lead
+// feature's reel. The lead scenario is its proof, so every review films it again.
+export function articleItemFor({ partner, runs, day, draft, body, cover, media }) {
+ const lead = runs[0].feature;
+ const prose = [draft.title, draft.post, body];
+ return {
+ id: articleId(partner, day),
+ status: 'draft',
+ kind: 'article',
+ tier: 1,
+ spotlight: { partner: partner.id, article: true, features: runs.map(({ feature }) => feature.id) },
+ lane: 'article',
+ pattern: 'longform',
+ notBefore: `${day}T00:00:00.000Z`,
+ article: { title: draft.title, body: `data/x-content/articles/${articleId(partner, day)}.md`, cover },
+ scenario: lead.scenario,
+ probes: [{ type: 'scenario' }, ...runs.flatMap(({ feature }) => feature.probes || [])],
+ posts: [{ text: draft.post, media: media ? [media] : [] }],
+ claims: articleClaims(partner, runs, prose),
+ mentions: {},
+ };
+}
+
+// Drafts until `check` (the CLI's assembly and the queue's Article gate) finds
+// nothing, or the attempts run out.
+export async function draftArticle(brief, { call, check, voice = null, exemplar = null, attempts = 3 } = {}) {
+ const tries = [];
+ let previous = null;
+ let findings = [];
+ for (let attempt = 1; attempt <= attempts; attempt++) {
+ const { value, model, fallbacks = [] } = await call(buildArticleRequest(brief, { voice, exemplar, findings, previous }), { parse: parseArticle });
+ findings = await check(value);
+ tries.push({ attempt, model, fallbacks, findings });
+ if (!findings.length) return { ok: true, draft: value, model, attempts: tries };
+ previous = value;
+ }
+ return { ok: false, draft: previous, attempts: tries, findings };
+}
diff --git a/data/x-content/partners/alibaba-cloud.json b/data/x-content/partners/alibaba-cloud.json
new file mode 100644
index 000000000..d5a3161fe
--- /dev/null
+++ b/data/x-content/partners/alibaba-cloud.json
@@ -0,0 +1,470 @@
+{
+ "id": "alibaba-cloud",
+ "name": "Alibaba Cloud",
+ "order": 5,
+ "designation": "listed on the Alibaba Cloud International Marketplace",
+ "designationEvidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/blog/three-ws-on-alibaba-cloud-marketplace",
+ "contains": "now live on the Alibaba Cloud International Marketplace"
+ },
+ {
+ "type": "file",
+ "path": "docs/listings.md",
+ "contains": "| **Alibaba Cloud** International Marketplace | Live"
+ }
+ ],
+ "page": "https://three.ws/blog/three-ws-on-alibaba-cloud-marketplace",
+ "handle": "alibaba_cloud",
+ "mark": null,
+ "forbidden": [
+ "endorsed by Alibaba",
+ "Alibaba endorses",
+ "Alibaba-endorsed",
+ "certified by Alibaba",
+ "Alibaba-certified",
+ "Alibaba recommends",
+ "official Alibaba Cloud",
+ "Alibaba Cloud official",
+ "Alibaba Cloud Premier",
+ "Alibaba Cloud Advanced Partner",
+ "Alibaba Cloud Select Partner",
+ "built by Alibaba",
+ "made by Alibaba",
+ "powered by Alibaba",
+ "powered by Qwen",
+ "runs on Alibaba Cloud",
+ "hosted on Alibaba Cloud",
+ "running on Alibaba Cloud",
+ "Alibaba-hosted",
+ "Alibaba Cloud infrastructure",
+ "Alibaba Cloud invoice",
+ "Alibaba Cloud billing",
+ "billed through Alibaba",
+ "consolidated billing",
+ "one-click deploy from the Alibaba Cloud console",
+ "deploy from the Alibaba Cloud console",
+ "Qwen is the default",
+ "Qwen is our default",
+ "default brain",
+ "official Qwen",
+ "official MCP",
+ "joint customers",
+ "co-sell",
+ "#1 cloud",
+ "top-four",
+ "top four",
+ "millions of developers",
+ "200+ countries",
+ "first deployment",
+ "Alibaba Cloud customers use",
+ "Alibaba Cloud customers run"
+ ],
+ "guidance": "three.ws is listed on the Alibaba Cloud International Marketplace (Live per docs/listings.md). Say that and nothing grander: a listing is a product buyers can procure, not an endorsement, certification or tier, and it does not mean the platform runs on Alibaba Cloud (production runs on Google Cloud). The Qwen work is real but narrow: the @three-ws/alibaba-cloud-mcp package is community-built, NOT affiliated with Alibaba Cloud, and calls DashScope with the user's own key on the user's machine; never call it official. In the brain compare film the Qwen column is Qwen 3.8 27B on open lanes, so never claim that column ran on Alibaba Cloud or DashScope; the DashScope Qwen Plus lane exists in the router but needs sign-in. Qwen and ModelScope as an agent brain through the listing, one-click deploy from the Alibaba Cloud console and the enterprise launchpad are announced next steps, not shipped: never present them as live. Do not use the blog's rank, reach or first claims. Keep every claim to the listing, the MCP tools and the router, each tied to a fact.",
+ "docs": [
+ "docs/partners.md",
+ "docs/listings.md",
+ "docs/brain.md",
+ "packages/alibaba-cloud-mcp/README.md"
+ ],
+ "features": [
+ {
+ "id": "qwen-mcp-tools",
+ "title": "Qwen as MCP tools: chat and embeddings through DashScope",
+ "surface": "https://three.ws/mcp-tools/alibaba-cloud-mcp/qwen_chat",
+ "covers": [
+ "/mcp-tools/alibaba-cloud-mcp",
+ "packages/alibaba-cloud-mcp",
+ "public/mcp-catalog.json"
+ ],
+ "lane": "developer",
+ "summary": "The @three-ws/alibaba-cloud-mcp package gives any MCP client three tools that call Alibaba Cloud Qwen models through DashScope: qwen_chat for written answers, qwen_embed for vectors and qwen_list_models. It runs as a stdio server on your own machine with your own DashScope key, and every tool has a page on three.ws with its arguments and a paste-ready client config. The package is community-built and not affiliated with Alibaba Cloud.",
+ "docs": [
+ "packages/alibaba-cloud-mcp/README.md"
+ ],
+ "scenario": {
+ "format": "square",
+ "steps": [
+ {
+ "goto": "https://three.ws/mcp-tools/alibaba-cloud-mcp/qwen_chat",
+ "settle": 5000,
+ "caption": "Qwen as an MCP tool"
+ },
+ {
+ "expect": "Chat completion with an Alibaba Cloud Qwen model via DashScope",
+ "within": 15000
+ },
+ {
+ "hold": 2200
+ },
+ {
+ "scroll": "Arguments",
+ "ms": 900,
+ "caption": "Pick qwen-max, plus, turbo or long"
+ },
+ {
+ "hold": 2400
+ },
+ {
+ "click": "qwen_embed",
+ "caption": "Embeddings come with it"
+ },
+ {
+ "expect": "text-embedding-v3",
+ "within": 15000
+ },
+ {
+ "hold": 2600
+ },
+ {
+ "scroll": "Client config",
+ "ms": 900,
+ "caption": "Paste the config into any MCP client"
+ },
+ {
+ "hold": 3500
+ }
+ ]
+ },
+ "facts": [
+ {
+ "says": "qwen_chat does chat completion with an Alibaba Cloud Qwen model via DashScope",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/mcp-tools/alibaba-cloud-mcp/qwen_chat",
+ "contains": "Chat completion with an Alibaba Cloud Qwen model via DashScope"
+ }
+ ]
+ },
+ {
+ "says": "qwen_chat defaults to qwen-plus",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/mcp-tools/alibaba-cloud-mcp/qwen_chat",
+ "contains": "Defaults to qwen-plus"
+ }
+ ]
+ },
+ {
+ "says": "the model argument accepts qwen-max, qwen-plus, qwen-turbo, qwen-long and qwen-max-latest",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/mcp-tools/alibaba-cloud-mcp/qwen_chat",
+ "contains": "Options: qwen-max, qwen-plus (default), qwen-turbo, qwen-long, qwen-max-latest."
+ }
+ ]
+ },
+ {
+ "says": "qwen_embed returns vectors to search or cluster texts",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/mcp-tools/alibaba-cloud-mcp/qwen_chat",
+ "contains": "for vectors to search or cluster texts call qwen_embed instead"
+ }
+ ]
+ },
+ {
+ "says": "it runs on your machine as a stdio MCP server",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/mcp-tools/alibaba-cloud-mcp/qwen_chat",
+ "contains": "Runs on your machine as a stdio MCP server."
+ }
+ ]
+ },
+ {
+ "says": "one command starts it: npx -y @three-ws/alibaba-cloud-mcp",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/mcp-tools/alibaba-cloud-mcp/qwen_chat",
+ "contains": "npx -y @three-ws/alibaba-cloud-mcp"
+ }
+ ]
+ },
+ {
+ "says": "the package ships qwen_chat, qwen_embed and qwen_list_models",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/blog/three-ws-alibaba-cloud-partnership",
+ "contains": "qwen_chat, qwen_embed, and qwen_list_models tools"
+ }
+ ]
+ },
+ {
+ "says": "your own DashScope key talks directly to DashScope with no intermediary backend",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/blog/three-ws-alibaba-cloud-partnership",
+ "contains": "No intermediary backend; your DASHSCOPE_API_KEY talks directly to DashScope."
+ }
+ ]
+ },
+ {
+ "says": "the package is community-built and not affiliated with Alibaba Cloud",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "packages/alibaba-cloud-mcp/README.md",
+ "contains": "Community-built and not affiliated with Alibaba Cloud."
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "brain-compare",
+ "title": "The Brain lab: one prompt streamed to every model, Qwen included",
+ "surface": "https://three.ws/brain",
+ "covers": [
+ "/brain",
+ "api/brain/chat.js",
+ "api/_lib/model-roster.js"
+ ],
+ "lane": "developer",
+ "summary": "The Brain lab sends one prompt to many models at once and streams the answers side by side with live speed and token counts, so you can pick an agent's brain on evidence. Qwen sits in the same roster as Claude, GPT and the rest: the router carries a DashScope lane for Qwen Plus and a ModelScope lane for Qwen3-Coder, and the film shows the open Qwen 3.8 27B lane answering next to the others.",
+ "docs": [
+ "docs/brain.md"
+ ],
+ "scenario": {
+ "format": "landscape",
+ "steps": [
+ {
+ "goto": "https://three.ws/brain",
+ "settle": 5000,
+ "caption": "One prompt, every model"
+ },
+ {
+ "click": "Playground"
+ },
+ {
+ "hold": 1500,
+ "caption": "Qwen sits in the same roster as the rest"
+ },
+ {
+ "type": "In one sentence, what is a polygon mesh?",
+ "into": "Send a message..."
+ },
+ {
+ "click": "Send",
+ "awaits": "/api/brain/chat",
+ "caption": "The same prompt streams to each model"
+ },
+ {
+ "expect": "t/s",
+ "within": 45000
+ },
+ {
+ "hold": 6000,
+ "caption": "Speed and tokens, side by side"
+ }
+ ]
+ },
+ "facts": [
+ {
+ "says": "the Brain lab sends a single prompt to many frontier models at once and streams their answers side by side",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/brain.md",
+ "contains": "The Brain lab sends a single prompt to many frontier models at once and streams"
+ }
+ ]
+ },
+ {
+ "says": "each answer shows live latency and token stats",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/brain.md",
+ "contains": "their answers side by side, each with live latency and token stats."
+ }
+ ]
+ },
+ {
+ "says": "Qwen responds in parallel with Claude, GPT, ModelScope and Groq",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/brain.md",
+ "contains": "Qwen, ModelScope, Groq, and more respond in parallel so you can compare tone, speed,"
+ }
+ ]
+ },
+ {
+ "says": "the router lists DashScope for Qwen Plus and ModelScope for Qwen3-Coder 480B",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/brain.md",
+ "contains": "DashScope (Qwen Plus), ModelScope (Qwen3-Coder 480B)"
+ }
+ ]
+ },
+ {
+ "says": "the chat endpoint streams the answer back as Server-Sent Events",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/brain.md",
+ "contains": "streams the answer back as Server-Sent Events:"
+ }
+ ]
+ },
+ {
+ "says": "the model you pick in the Brain lab is the model your agent runs on",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/brain.md",
+ "contains": "the model you pick here is the model your agent"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "marketplace-listing",
+ "title": "three.ws on the Alibaba Cloud International Marketplace",
+ "surface": "https://three.ws/blog/three-ws-on-alibaba-cloud-marketplace",
+ "covers": [
+ "/blog/three-ws-on-alibaba-cloud-marketplace",
+ "docs/listings.md"
+ ],
+ "lane": "community",
+ "summary": "three.ws is live on the Alibaba Cloud International Marketplace, so buyers can procure the <agent-3d> stack, a single HTML tag that deploys a 3D AI agent, through their existing cloud account. Each agent is a transferable on-chain asset with a browser-native 3D body, a swappable LLM brain and x402 payments settling in USDC on Solana. The listing, the storefront and an Alibaba Cloud Marketplace editorial feature are all published.",
+ "docs": [
+ "docs/listings.md",
+ "docs/partners.md"
+ ],
+ "scenario": {
+ "format": "square",
+ "steps": [
+ {
+ "goto": "https://three.ws/blog/three-ws-on-alibaba-cloud-marketplace",
+ "settle": 5000,
+ "caption": "The Alibaba Cloud Marketplace launch"
+ },
+ {
+ "expect": "now live on the Alibaba Cloud International Marketplace",
+ "within": 15000
+ },
+ {
+ "hold": 2500
+ },
+ {
+ "scroll": "What three.ws ships",
+ "ms": 1200,
+ "caption": "What the listing puts in reach"
+ },
+ {
+ "hold": 3000
+ },
+ {
+ "scroll": "The Alibaba Cloud listing",
+ "ms": 1200,
+ "caption": "A product buyers can procure directly"
+ },
+ {
+ "hold": 4500
+ }
+ ]
+ },
+ "facts": [
+ {
+ "says": "three.ws is now live on the Alibaba Cloud International Marketplace",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/blog/three-ws-on-alibaba-cloud-marketplace",
+ "contains": "now live on the Alibaba Cloud International Marketplace"
+ },
+ {
+ "type": "file",
+ "path": "docs/listings.md",
+ "contains": "| **Alibaba Cloud** International Marketplace | Live"
+ }
+ ]
+ },
+ {
+ "says": "three.ws sits inside the marketplace buying flow as a directly procurable product",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/blog/three-ws-on-alibaba-cloud-marketplace",
+ "contains": "three.ws now sits inside that flow as a directly procurable product"
+ }
+ ]
+ },
+ {
+ "says": "every agent is minted as a transferable on-chain asset",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/blog/three-ws-on-alibaba-cloud-marketplace",
+ "contains": "Each agent is minted as a transferable on-chain asset."
+ }
+ ]
+ },
+ {
+ "says": "the agent body is browser-native 3D rendered in WebGL",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/blog/three-ws-on-alibaba-cloud-marketplace",
+ "contains": "A browser-native 3D body."
+ }
+ ]
+ },
+ {
+ "says": "agents settle x402 payments in USDC on Solana",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/blog/three-ws-on-alibaba-cloud-marketplace",
+ "contains": "settling in USDC on Solana"
+ }
+ ]
+ },
+ {
+ "says": "a developer integrates an agent into any web page with a single line of HTML",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/blog/three-ws-on-alibaba-cloud-marketplace",
+ "contains": "A developer integrates an agent into any web page with a single line of HTML."
+ }
+ ]
+ },
+ {
+ "says": "Claude, GPT and open-weights models are live as the agent brain today",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/blog/three-ws-on-alibaba-cloud-marketplace",
+ "contains": "Claude, GPT, and open-weights models are live today."
+ }
+ ]
+ },
+ {
+ "says": "the stack is open source",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/blog/three-ws-on-alibaba-cloud-marketplace",
+ "contains": "The full three.ws stack is open source"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/data/x-content/partners/google-cloud.json b/data/x-content/partners/google-cloud.json
new file mode 100644
index 000000000..2deab5bde
--- /dev/null
+++ b/data/x-content/partners/google-cloud.json
@@ -0,0 +1,555 @@
+{
+ "id": "google-cloud",
+ "name": "Google Cloud",
+ "order": 4,
+ "designation": "member of Google Cloud for Web3 Startups",
+ "designationEvidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/blog/three-ws-google-cloud-partnership",
+ "contains": "Google Cloud for Web3 Startups"
+ },
+ {
+ "type": "file",
+ "path": "docs/listings.md",
+ "contains": "| **Google Cloud** for Web3 Startups | Member |"
+ }
+ ],
+ "page": "https://three.ws/blog/three-ws-google-cloud-partnership",
+ "handle": "googlecloud",
+ "mark": null,
+ "forbidden": [
+ "endorsed by Google",
+ "Google endorses",
+ "Google-endorsed",
+ "certified by Google",
+ "Google-certified",
+ "Google recommends",
+ "Google-recommended",
+ "official Google Cloud partner",
+ "Google Cloud Partner",
+ "Google Cloud Premier",
+ "Google Cloud Partner Advantage",
+ "Google Cloud Ready",
+ "Google Cloud Marketplace",
+ "available on Google Cloud",
+ "listed on Google Cloud",
+ "live on Google Cloud",
+ "powered by Google",
+ "powered by Gemini",
+ "built with Gemini",
+ "built on Gemini",
+ "Gemini brain",
+ "Gemini-powered",
+ "runs entirely on Google Cloud",
+ "everything runs on Google Cloud",
+ "hosted entirely on Google",
+ "Google invoice",
+ "Google credits",
+ "credits from Google",
+ "$200k",
+ "200,000",
+ "Google funded",
+ "funded by Google",
+ "backed by Google",
+ "Google invested",
+ "investment from Google",
+ "joint customers",
+ "co-sell",
+ "Google Cloud customers"
+ ],
+ "guidance": "three.ws is a member of Google Cloud for Web3 Startups. Say that and nothing grander: it is a programme membership, not an endorsement, certification, partner tier or investment. Google Cloud Marketplace is not a listing; never say three.ws is listed, available or live there. What is true and checkable is the engineering: the open 3D model workers run as Cloud Run GPU services (NVIDIA L4), the garment builder is a CPU Cloud Run service whose reference photos come from Vertex AI, and CAD Forge builds on a Cloud Run gen2 service with its own sandbox. Name those pieces plainly and tie each to a fact. Do not say the whole platform runs on Google Cloud, do not say Gemini is an agent brain (that is announced, not shipped), and do not mention credits, grants or amounts. Never claim the Forge generates a model live in the film: the reel shows the engine lanes and tiers, not a finished generation.",
+ "docs": [
+ "docs/partners.md",
+ "docs/listings.md",
+ "docs/ops/gcp-model-workers.md",
+ "docs/forge.md",
+ "docs/cad-forge.md",
+ "docs/avatar-wardrobe.md"
+ ],
+ "features": [
+ {
+ "id": "forge-engines",
+ "title": "Forge engines on our own Cloud Run GPU workers",
+ "surface": "https://three.ws/forge",
+ "covers": [
+ "/forge",
+ "workers/model-trellis",
+ "workers/model-hunyuan3d",
+ "workers/model-triposg",
+ "api/_lib/model-workers"
+ ],
+ "lane": "developer",
+ "summary": "The Forge turns a text prompt, photos or a sketch into a textured 3D model, and the open models behind it (TRELLIS, Hunyuan3D, TripoSG) run as our own Cloud Run services on NVIDIA L4 GPUs in us-central1. Each tier shows a free lane and a live time estimate before you press Generate, a sketch has its own lane, and the free NVIDIA NIM lane stays behind the self-hosted workers as a safety net. This is the Google Cloud for Web3 Startups programme at work: the GPU workers are the infrastructure it backs.",
+ "docs": [
+ "docs/ops/gcp-model-workers.md",
+ "docs/forge.md"
+ ],
+ "scenario": {
+ "format": "square",
+ "steps": [
+ {
+ "goto": "https://three.ws/forge",
+ "settle": 6000,
+ "caption": "Four free lanes, no key, in text mode"
+ },
+ {
+ "read": "standard",
+ "match": "(Standard · Free · usually ~\\d+s)"
+ },
+ {
+ "hold": 1800
+ },
+ {
+ "click": {
+ "selector": "button[data-tier=\"draft\"]"
+ },
+ "caption": "Each tier shows its live estimate"
+ },
+ {
+ "hold": 1600
+ },
+ {
+ "read": "draft",
+ "match": "(Draft · Free · usually ~\\d+s)"
+ },
+ {
+ "click": "TRELLIS",
+ "caption": "Our own TRELLIS worker, selected"
+ },
+ {
+ "hold": 1600
+ },
+ {
+ "click": "NVIDIA",
+ "caption": "The free NIM lane: the safety net"
+ },
+ {
+ "hold": 1600
+ },
+ {
+ "click": "From a sketch",
+ "caption": "A sketch gets its own free lane"
+ },
+ {
+ "hold": 1200
+ },
+ {
+ "read": "sketch",
+ "match": "((?:Draft|Standard) · Free · usually ~\\d+s · up to [\\d,]+ polygons)"
+ },
+ {
+ "hold": 2400
+ }
+ ]
+ },
+ "facts": [
+ {
+ "says": "the Forge turns text or photos into a textured 3D model",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/forge",
+ "contains": "textured 3D model"
+ }
+ ]
+ },
+ {
+ "says": "each open model worker runs as its own Cloud Run service on an NVIDIA L4 GPU in us-central1",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/ops/gcp-model-workers.md",
+ "contains": "Each model runs as its own Cloud Run service (NVIDIA L4 GPU, `us-central1`),"
+ }
+ ]
+ },
+ {
+ "says": "TRELLIS is the named default at the Draft and Standard tiers and Hunyuan3D at High",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/forge.md",
+ "contains": "TRELLIS at Draft and Standard, Hunyuan3D at High"
+ }
+ ]
+ },
+ {
+ "says": "the self-hosted workers carry zero vendor cost, so free-first routing prefers them first",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/forge.md",
+ "contains": "Zero vendor cost, so free-first routing prefers them first"
+ }
+ ]
+ },
+ {
+ "says": "the Standard tier is free and shows its live time estimate",
+ "evidence": [
+ {
+ "type": "proof",
+ "fact": "standard",
+ "contains": "Free"
+ }
+ ]
+ },
+ {
+ "says": "the Draft tier is free and shows its live time estimate",
+ "evidence": [
+ {
+ "type": "proof",
+ "fact": "draft",
+ "contains": "Free"
+ }
+ ]
+ },
+ {
+ "says": "a sketch has its own free lane",
+ "evidence": [
+ {
+ "type": "proof",
+ "fact": "sketch",
+ "contains": "Free"
+ }
+ ]
+ },
+ {
+ "says": "the sketch lane is served by a dedicated TripoSG worker on Cloud Run",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/ops/gcp-model-workers.md",
+ "contains": "Serves the sketch lane"
+ }
+ ]
+ },
+ {
+ "says": "the free NVIDIA NIM lane serves a text prompt when the self-host workers and Spaces are cold or down",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/forge.md",
+ "contains": "it serves a text prompt when every self-host worker and Space is cold or down"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "wardrobe",
+ "title": "The wardrobe: rigged garments built on a Cloud Run pipeline",
+ "surface": "https://three.ws/wardrobe",
+ "covers": [
+ "/wardrobe",
+ "workers/garment-forge",
+ "api/_lib/forge-reference-image.js"
+ ],
+ "lane": "community",
+ "summary": "The wardrobe is an open catalog of rigged 3D garments that bind to any humanoid avatar at runtime. New pieces come from garment-forge, a CPU-only Cloud Run service that chains the GPU workers: the reference photo for each piece is made on Google Vertex AI, then the mesh is built, placed on the body, rigged, validated and published. Browse the catalog, open a piece in 3D and turn it around.",
+ "docs": [
+ "workers/garment-forge/README.md",
+ "docs/avatar-wardrobe.md"
+ ],
+ "scenario": {
+ "format": "square",
+ "steps": [
+ {
+ "goto": "https://three.ws/wardrobe",
+ "settle": 6000
+ },
+ {
+ "scroll": "Search pieces",
+ "ms": 900,
+ "caption": "An open catalog of clothes for 3D avatars"
+ },
+ {
+ "read": "pieces",
+ "match": "(\\d+) of \\d+ pieces"
+ },
+ {
+ "hold": 1600
+ },
+ {
+ "click": "Outerwear",
+ "caption": "Every piece is a rigged 3D garment"
+ },
+ {
+ "hold": 1600
+ },
+ {
+ "click": "3D",
+ "caption": "Open one before you wear it"
+ },
+ {
+ "hold": 1500
+ },
+ {
+ "drag": [
+ [
+ 0.16,
+ 0.62
+ ],
+ [
+ 0.42,
+ 0.62
+ ]
+ ],
+ "ms": 2600,
+ "caption": "It is a real mesh. Turn it around."
+ },
+ {
+ "hold": 2400
+ }
+ ]
+ },
+ "facts": [
+ {
+ "says": "the open catalog lists at least 50 pieces",
+ "evidence": [
+ {
+ "type": "proof",
+ "fact": "pieces",
+ "min": 50
+ },
+ {
+ "type": "page",
+ "url": "https://three.ws/wardrobe",
+ "contains": " pieces"
+ }
+ ]
+ },
+ {
+ "says": "every piece is a real, rigged 3D garment that binds to any humanoid avatar at runtime",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/wardrobe",
+ "contains": "Every piece here is a real, rigged 3D garment that binds to any humanoid avatar at runtime"
+ }
+ ]
+ },
+ {
+ "says": "a described garment is built, rigged, validated and published in about seven minutes",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/wardrobe",
+ "contains": "build, rig, validate, and publish it in about seven minutes"
+ }
+ ]
+ },
+ {
+ "says": "finished pieces are public and instantly wearable by anyone",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/wardrobe",
+ "contains": "Finished pieces are public and instantly wearable by anyone."
+ }
+ ]
+ },
+ {
+ "says": "the garment builder is a CPU-only Cloud Run service",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "workers/garment-forge/README.md",
+ "contains": "and deploys the `garment-forge` Cloud Run service: CPU only (4 vCPU, 16 GiB),"
+ }
+ ]
+ },
+ {
+ "says": "the reference photo for each garment is made on Google Vertex AI with gemini-2.5-flash-image",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "workers/garment-forge/README.md",
+ "contains": "image lane (`gemini-2.5-flash-image`, the model that replaced the retiring"
+ }
+ ]
+ },
+ {
+ "says": "the reference photo is posed to match the reference body: worn shape, A-pose, front view, plain background",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "workers/garment-forge/README.md",
+ "contains": "The photo is posed to match the reference body: worn shape,"
+ }
+ ]
+ },
+ {
+ "says": "the builder gives its runtime service account the Vertex AI user role",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "workers/garment-forge/README.md",
+ "contains": "roles/aiplatform.user"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "cad-forge",
+ "title": "CAD Forge: a real part from one sentence, on Cloud Run",
+ "surface": "https://three.ws/cad/26cf0ca4-c0a4-4454-a689-7871ca77633c",
+ "covers": [
+ "/cad",
+ "api/cad",
+ "workers/cad-forge",
+ "docs/cad-forge.md"
+ ],
+ "lane": "developer",
+ "summary": "CAD Forge writes a build123d program from a sentence and builds it into a real B-rep part on the OpenCascade kernel, then returns STEP, STL, GLB, a drawing sheet and the kernel measurements. The builder is a CPU-only Cloud Run gen2 service, and every build runs in its own throwaway sandbox process under a service account that holds no IAM roles. The film opens a built part, reads its true size and topology from the kernel, and shows the drawing sheet, sliders and files.",
+ "docs": [
+ "docs/cad-forge.md",
+ "workers/cad-forge/README.md"
+ ],
+ "scenario": {
+ "format": "square",
+ "steps": [
+ {
+ "goto": "https://three.ws/cad/26cf0ca4-c0a4-4454-a689-7871ca77633c",
+ "settle": 7000,
+ "caption": "One sentence in. Real CAD out."
+ },
+ {
+ "read": "size",
+ "match": "([\\d.]+ × [\\d.]+ × [\\d.]+ mm)"
+ },
+ {
+ "read": "topology",
+ "match": "(\\d+ solid · \\d+ faces · \\d+ edges)"
+ },
+ {
+ "hold": 1800
+ },
+ {
+ "drag": [
+ [
+ 0.3,
+ 0.45
+ ],
+ [
+ 0.62,
+ 0.45
+ ]
+ ],
+ "ms": 2200,
+ "caption": "Callouts read the kernel's extents"
+ },
+ {
+ "hold": 1200
+ },
+ {
+ "click": "Drawing",
+ "caption": "A drawing sheet comes with it"
+ },
+ {
+ "hold": 2200
+ },
+ {
+ "scroll": "Dimensions",
+ "ms": 900,
+ "caption": "Every key size is a slider"
+ },
+ {
+ "hold": 1500
+ },
+ {
+ "scroll": "Files",
+ "ms": 900,
+ "caption": "STEP, STL, GLB, drawing, Python"
+ },
+ {
+ "hold": 2600
+ }
+ ]
+ },
+ "facts": [
+ {
+ "says": "CAD Forge builds a program into a real B-rep part on the OpenCascade kernel",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "workers/cad-forge/README.md",
+ "contains": "into a real B-rep part on the OpenCascade kernel"
+ }
+ ]
+ },
+ {
+ "says": "the builder is a CPU-only FastAPI service on Cloud Run gen2",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "workers/cad-forge/README.md",
+ "contains": "CPU only. FastAPI on Cloud Run (gen2)."
+ }
+ ]
+ },
+ {
+ "says": "the example part measures 75.0 × 19.0 × 90.0 mm",
+ "evidence": [
+ {
+ "type": "proof",
+ "fact": "size",
+ "equals": "75.0 × 19.0 × 90.0 mm"
+ }
+ ]
+ },
+ {
+ "says": "the kernel reports the example part as 1 solid with 23 faces and 66 edges",
+ "evidence": [
+ {
+ "type": "proof",
+ "fact": "topology",
+ "equals": "1 solid · 23 faces · 66 edges"
+ }
+ ]
+ },
+ {
+ "says": "every build runs in its own sandbox process, used once and then discarded",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "workers/cad-forge/README.md",
+ "contains": "Every build runs in its own `sandbox_child.py` process, which is used once and then discarded."
+ }
+ ]
+ },
+ {
+ "says": "the service runs as a service account with no IAM roles",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "workers/cad-forge/README.md",
+ "contains": "a service account with no IAM roles"
+ }
+ ]
+ },
+ {
+ "says": "a build returns STEP, STL and GLB files plus a four-view drawing sheet",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "workers/cad-forge/README.md",
+ "contains": "STEP, STL, GLB (metres, true scale, Y-up), an isometric hidden-line thumbnail and a four-view drawing sheet as SVG"
+ }
+ ]
+ },
+ {
+ "says": "the sandbox is tested with real socket, exec and fork escape attempts as a step of the image build",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "workers/cad-forge/README.md",
+ "contains": "real builds, plus real socket, exec, fork and parent-environment escape attempts"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/data/x-content/partners/nvidia.json b/data/x-content/partners/nvidia.json
new file mode 100644
index 000000000..2bb44e54f
--- /dev/null
+++ b/data/x-content/partners/nvidia.json
@@ -0,0 +1,411 @@
+{
+ "id": "nvidia",
+ "name": "NVIDIA",
+ "order": 6,
+ "designation": "NVIDIA Inception member",
+ "designationEvidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/nvidia",
+ "contains": "NVIDIA Inception member"
+ },
+ {
+ "type": "page",
+ "url": "https://three.ws/nvidia",
+ "contains": "independent member of the NVIDIA Inception program"
+ }
+ ],
+ "page": "https://three.ws/nvidia",
+ "handle": "NVIDIAAIDev",
+ "mark": "public/marks/nvidia-inception-badge.svg",
+ "forbidden": [
+ "NVIDIA partner",
+ "NVIDIA partnership",
+ "partnership with NVIDIA",
+ "strategic partnership with NVIDIA",
+ "NVIDIA endorses",
+ "endorsed by NVIDIA",
+ "NVIDIA recommends",
+ "NVIDIA-certified",
+ "certified by NVIDIA",
+ "NVIDIA-approved",
+ "approved by NVIDIA",
+ "official NVIDIA",
+ "NVIDIA-backed",
+ "NVIDIA invested",
+ "NVIDIA investment",
+ "investment from NVIDIA",
+ "NVIDIA funded",
+ "NVIDIA Elite",
+ "NVIDIA Preferred",
+ "NVIDIA Premier",
+ "NVIDIA NPN",
+ "NVIDIA credits",
+ "free credits",
+ "credits worth",
+ "powered by NVIDIA",
+ "built by NVIDIA"
+ ],
+ "guidance": "three.ws is a member of the NVIDIA Inception program, NVIDIA's startup program. Say NVIDIA Inception member and nothing grander: it is not a partnership, a reseller relationship or an investment, and NVIDIA does not endorse or certify three.ws. Talk about what runs on NVIDIA hardware and models, the free hosted lane and the self-hosted GPU fleet, as facts about the stack. Never state credit amounts.",
+ "docs": [
+ "docs/partners.md",
+ "docs/nvidia-inception.md",
+ "docs/nvidia-models.md"
+ ],
+ "features": [
+ {
+ "id": "nvidia-voice",
+ "title": "Avatar voices on NVIDIA Magpie",
+ "surface": "https://three.ws/voice",
+ "covers": [],
+ "lane": "community",
+ "summary": "The voice picker offers NVIDIA Magpie multilingual speech as a free lane for any avatar. Speech is synthesized by NVIDIA Riva through a hosted function, with no key needed from the user. Pick the voice, type a line, and the avatar speaks it. The same lane covers many languages.",
+ "docs": [
+ "docs/nvidia-models.md"
+ ],
+ "scenario": {
+ "format": "square",
+ "steps": [
+ {
+ "goto": "https://three.ws/voice",
+ "settle": 6000,
+ "caption": "Pick the voice for your avatar"
+ },
+ {
+ "click": "NVIDIA Magpie",
+ "caption": "NVIDIA Magpie, a free lane"
+ },
+ {
+ "hold": 1800
+ },
+ {
+ "click": "Use this voice",
+ "caption": "One tap and the avatar has it"
+ },
+ {
+ "type": "Hello, I am your three.ws avatar. This voice runs on NVIDIA.",
+ "into": "Type something to hear it spoken"
+ },
+ {
+ "hold": 1200
+ },
+ {
+ "click": "Speak",
+ "awaits": "/api/tts/synthesize",
+ "caption": "Synthesized by NVIDIA Riva, no key"
+ },
+ {
+ "expect": "free lane",
+ "within": 60000
+ },
+ {
+ "hold": 4500
+ }
+ ]
+ },
+ "facts": [
+ {
+ "says": "three.ws is an independent member of the NVIDIA Inception program.",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/nvidia",
+ "contains": "independent member of the NVIDIA Inception program"
+ }
+ ]
+ },
+ {
+ "says": "Inception is a startup program, not a partnership, a reseller relationship, or an investment.",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/nvidia",
+ "contains": "Inception is a startup program, not a partnership, a reseller relationship, or an investment"
+ }
+ ]
+ },
+ {
+ "says": "The voice picker marks the NVIDIA Magpie voices as a free lane.",
+ "evidence": [
+ {
+ "type": "proof",
+ "saw": "free lane"
+ }
+ ]
+ },
+ {
+ "says": "The speech model is magpie-tts-multilingual served through Riva.",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "api/_lib/tts-nvidia.js",
+ "contains": "export const NVIDIA_TTS_MODEL = 'magpie-tts-multilingual'"
+ }
+ ]
+ },
+ {
+ "says": "The /nvidia page lists Magpie text to speech as free for avatar voices.",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/nvidia",
+ "contains": "magpie-tts-multilingual"
+ }
+ ]
+ },
+ {
+ "says": "The speech endpoint accepts nvidia as a provider.",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "api/tts/synthesize.js",
+ "contains": "'nvidia'"
+ }
+ ]
+ }
+ ],
+ "probes": [
+ {
+ "type": "api",
+ "name": "the voice page answers",
+ "url": "https://three.ws/voice"
+ }
+ ]
+ },
+ {
+ "id": "nvidia-gpu-fleet",
+ "title": "A self-hosted GPU fleet on L4 and Blackwell",
+ "surface": "https://three.ws/nvidia",
+ "covers": [],
+ "lane": "developer",
+ "summary": "Beyond the free hosted lane, three.ws runs its own fleet of Cloud Run GPU services. Each is a worker wrapping one model, autoscaled per lane. Eleven run on NVIDIA L4 and one runs on an RTX PRO 6000 Blackwell. This is where PBR materials, auto-rigging and motion get made.",
+ "docs": [
+ "docs/nvidia-inception.md"
+ ],
+ "scenario": {
+ "format": "square",
+ "steps": [
+ {
+ "goto": "https://three.ws/nvidia",
+ "settle": 6000,
+ "caption": "Every model here is born on NVIDIA"
+ },
+ {
+ "hold": 1800
+ },
+ {
+ "scroll": "Our own GPU fleet",
+ "ms": 1200,
+ "caption": "Two layers: hosted models, our own GPUs"
+ },
+ {
+ "read": "fleet",
+ "match": "(Twelve Cloud Run GPU services)"
+ },
+ {
+ "hold": 3000
+ },
+ {
+ "scroll": "The GPU fleet.",
+ "ms": 1400,
+ "caption": "One Cloud Run service per lane"
+ },
+ {
+ "hold": 2500
+ },
+ {
+ "scroll": 420,
+ "ms": 1200,
+ "caption": "Rigging, texture and motion on L4 GPUs"
+ },
+ {
+ "hold": 3500
+ }
+ ]
+ },
+ "facts": [
+ {
+ "says": "three.ws is an independent member of the NVIDIA Inception program.",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/nvidia",
+ "contains": "independent member of the NVIDIA Inception program"
+ }
+ ]
+ },
+ {
+ "says": "Inception is a startup program, not a partnership, a reseller relationship, or an investment.",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/nvidia",
+ "contains": "Inception is a startup program, not a partnership, a reseller relationship, or an investment"
+ }
+ ]
+ },
+ {
+ "says": "The fleet is twelve Cloud Run GPU services.",
+ "evidence": [
+ {
+ "type": "proof",
+ "fact": "fleet",
+ "equals": "Twelve Cloud Run GPU services"
+ }
+ ]
+ },
+ {
+ "says": "Eleven of them run on nvidia-l4 and one on nvidia-rtx-pro-6000, the Blackwell.",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/nvidia",
+ "contains": "Eleven on nvidia-l4, one on nvidia-rtx-pro-6000"
+ }
+ ]
+ },
+ {
+ "says": "Each service is a worker wrapping one model, autoscaled per lane.",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/nvidia",
+ "contains": "each a worker wrapping one model, autoscaled per lane"
+ }
+ ]
+ },
+ {
+ "says": "Text to 3D, photo to avatar, auto-rigging and motion capture run on this GPU fleet.",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/nvidia-inception.md",
+ "contains": "Photo-to-avatar reconstruction, auto-rigging, and motion capture"
+ }
+ ]
+ }
+ ],
+ "probes": [
+ {
+ "type": "api",
+ "name": "the NVIDIA page answers",
+ "url": "https://three.ws/nvidia"
+ }
+ ]
+ },
+ {
+ "id": "nvidia-model-map",
+ "title": "The free NVIDIA model map",
+ "surface": "https://three.ws/nvidia",
+ "covers": [],
+ "lane": "community",
+ "summary": "One NVIDIA API key unlocks the hosted models three.ws uses on its free lane. Text to 3D runs on hosted TRELLIS, avatar voices on Magpie, and the Brain workbench offers Nemotron models. The /nvidia page lays the whole map out in a table. Because the lane is a rate-limited free tier, the platform always keeps a fallback behind it.",
+ "docs": [
+ "docs/nvidia-models.md"
+ ],
+ "scenario": {
+ "format": "square",
+ "steps": [
+ {
+ "goto": "https://three.ws/nvidia",
+ "settle": 6000,
+ "caption": "three.ws on NVIDIA Inception"
+ },
+ {
+ "hold": 2200
+ },
+ {
+ "scroll": "The free model map.",
+ "ms": 1400,
+ "caption": "The free NVIDIA model map"
+ },
+ {
+ "expect": "microsoft/trellis",
+ "caption": "Text to 3D on hosted TRELLIS"
+ },
+ {
+ "hold": 2500
+ },
+ {
+ "scroll": "Magpie",
+ "ms": 1200,
+ "caption": "Avatar voices on Riva Magpie"
+ },
+ {
+ "expect": "magpie-tts-multilingual"
+ },
+ {
+ "hold": 4500
+ }
+ ]
+ },
+ "facts": [
+ {
+ "says": "three.ws is an independent member of the NVIDIA Inception program.",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/nvidia",
+ "contains": "independent member of the NVIDIA Inception program"
+ }
+ ]
+ },
+ {
+ "says": "Inception is a startup program, not a partnership, a reseller relationship, or an investment.",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/nvidia",
+ "contains": "Inception is a startup program, not a partnership, a reseller relationship, or an investment"
+ }
+ ]
+ },
+ {
+ "says": "One NVIDIA API key unlocks every hosted model the platform uses on this lane.",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/nvidia-models.md",
+ "contains": "unlocks every model on this page"
+ }
+ ]
+ },
+ {
+ "says": "Text to 3D on the free lane uses microsoft/trellis.",
+ "evidence": [
+ {
+ "type": "proof",
+ "saw": "microsoft/trellis"
+ }
+ ]
+ },
+ {
+ "says": "Avatar voices use magpie-tts-multilingual over Riva.",
+ "evidence": [
+ {
+ "type": "proof",
+ "saw": "magpie-tts-multilingual"
+ }
+ ]
+ },
+ {
+ "says": "The free lane is rate limited, so the platform treats it as free-first and keeps a fallback behind it.",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/nvidia-models.md",
+ "contains": "free-first"
+ }
+ ]
+ }
+ ],
+ "probes": [
+ {
+ "type": "api",
+ "name": "the NVIDIA page answers",
+ "url": "https://three.ws/nvidia"
+ }
+ ]
+ }
+ ]
+}
diff --git a/data/x-content/partners/openai.json b/data/x-content/partners/openai.json
new file mode 100644
index 000000000..8868456b1
--- /dev/null
+++ b/data/x-content/partners/openai.json
@@ -0,0 +1,420 @@
+{
+ "id": "openai",
+ "name": "OpenAI",
+ "order": 1,
+ "designation": "OpenAI Select Partner",
+ "designationEvidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/partners",
+ "contains": "three.ws is an OpenAI Select Partner in the OpenAI Partner Network"
+ },
+ {
+ "type": "page",
+ "url": "https://three.ws/openai",
+ "contains": "independent member of the OpenAI Partner Network at the Select tier"
+ }
+ ],
+ "page": "https://three.ws/openai",
+ "handle": "OpenAI",
+ "mark": "public/partners/openai/openai-select-partner.svg",
+ "forbidden": [
+ "endorsed by OpenAI",
+ "OpenAI endorses",
+ "OpenAI recommends",
+ "OpenAI-certified",
+ "certified by OpenAI",
+ "official OpenAI product",
+ "an OpenAI product",
+ "built by OpenAI",
+ "made by OpenAI",
+ "powered by OpenAI",
+ "OpenAI-powered",
+ "OpenAI partnership",
+ "strategic partnership with OpenAI",
+ "joint venture with OpenAI",
+ "OpenAI invested",
+ "OpenAI credits",
+ "free credits",
+ "credits worth",
+ "OpenAI Premier",
+ "OpenAI Elite",
+ "OpenAI Enterprise partner",
+ "official ChatGPT app",
+ "featured by OpenAI",
+ "approved by OpenAI",
+ "OpenAI-backed"
+ ],
+ "guidance": "three.ws is an OpenAI Select Partner in the OpenAI Partner Network. Say exactly that: an independent member at the Select tier, not an OpenAI product, not endorsed or certified beyond the designation itself. Talk about the outcome for people using ChatGPT: real 3D that renders inline in the conversation, free and keyless. Never state credit amounts or account IDs, and never imply OpenAI built, runs or vouches for three.ws.",
+ "docs": [
+ "docs/partners.md",
+ "docs/mcp-studio.md",
+ "docs/chatgpt-ar.md",
+ "docs/spatial-mcp.md"
+ ],
+ "features": [
+ {
+ "id": "openai-studio-connector",
+ "title": "The free 3D Studio connector for ChatGPT",
+ "surface": "https://three.ws/openai",
+ "covers": [],
+ "lane": "developer",
+ "summary": "The three.ws 3D Studio connector is a Streamable HTTP MCP server at one URL that ChatGPT can add with no key, no account and no wallet. The /openai page asks the live server for its tool list on load and shows how many tools answered. The generation tools return interactive 3D that renders inline in the conversation. The page also covers the Custom GPT Actions route for plans without connector support.",
+ "docs": [
+ "docs/mcp-studio.md",
+ "docs/partners.md"
+ ],
+ "scenario": {
+ "format": "square",
+ "steps": [
+ {
+ "goto": "https://three.ws/openai",
+ "settle": 6000,
+ "caption": "The ChatGPT connector, checked live"
+ },
+ {
+ "hold": 1500
+ },
+ {
+ "scroll": "Connect the server.",
+ "ms": 1000,
+ "caption": "No key, no account, no wallet"
+ },
+ {
+ "expect": "tools answered",
+ "within": 30000
+ },
+ {
+ "read": "live",
+ "match": "Live\\. (\\d+) tools answered"
+ },
+ {
+ "hold": 2200,
+ "caption": "The page asks the real server, right now"
+ },
+ {
+ "scroll": "The generation tools.",
+ "ms": 1200,
+ "caption": "Each tool renders inline in ChatGPT"
+ },
+ {
+ "hold": 2500
+ },
+ {
+ "scroll": 500,
+ "ms": 1200
+ },
+ {
+ "hold": 3500
+ }
+ ]
+ },
+ "facts": [
+ {
+ "says": "three.ws is an OpenAI Select Partner in the OpenAI Partner Network.",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/partners",
+ "contains": "three.ws is an OpenAI Select Partner in the OpenAI Partner Network"
+ }
+ ]
+ },
+ {
+ "says": "three.ws is an independent member of the OpenAI Partner Network at the Select tier.",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/openai",
+ "contains": "independent member of the OpenAI Partner Network at the Select tier"
+ }
+ ]
+ },
+ {
+ "says": "The connector is a Streamable HTTP MCP server with no authentication.",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/openai",
+ "contains": "Streamable HTTP (JSON-RPC over POST)"
+ },
+ {
+ "type": "page",
+ "url": "https://three.ws/openai",
+ "contains": "Auth None. No key, no account, no wallet"
+ }
+ ]
+ },
+ {
+ "says": "The /openai page asks the live server for its tools and reports how many answered.",
+ "evidence": [
+ {
+ "type": "proof",
+ "saw": "tools answered"
+ }
+ ]
+ },
+ {
+ "says": "The live server answered with its full tool list.",
+ "evidence": [
+ {
+ "type": "proof",
+ "fact": "live",
+ "min": 15
+ }
+ ]
+ },
+ {
+ "says": "Generation tools return a result that ChatGPT renders inline in an interactive 3D viewer.",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/mcp-studio.md",
+ "contains": "result inline in an interactive 3D viewer widget"
+ }
+ ]
+ },
+ {
+ "says": "A Custom GPT Actions surface offers the same free lane to plans without connector support.",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/openai",
+ "contains": "The same free lane as a REST Actions surface"
+ }
+ ]
+ }
+ ],
+ "probes": [
+ {
+ "type": "api",
+ "name": "the live connector endpoint answers",
+ "url": "https://three.ws/openai"
+ }
+ ]
+ },
+ {
+ "id": "openai-spatial-mcp",
+ "title": "Spatial MCP: 3D as a native tool result",
+ "surface": "https://three.ws/spatial-mcp",
+ "covers": [],
+ "lane": "developer",
+ "summary": "Spatial MCP is an open CC0 shape for returning a live 3D scene as a first-class MCP tool result instead of a URL in text. three.ws publishes a validator, a reference renderer and a checker page where anyone can paste a payload. A deliberately broken example shows how each error names its path and the fix. The shape is meant to be adopted by any MCP host.",
+ "docs": [
+ "docs/spatial-mcp.md"
+ ],
+ "scenario": {
+ "format": "square",
+ "steps": [
+ {
+ "goto": "https://three.ws/spatial-mcp",
+ "settle": 6000,
+ "caption": "Spatial MCP: 3D as a tool result"
+ },
+ {
+ "hold": 1800
+ },
+ {
+ "scroll": "CHECK YOUR OWN PAYLOAD",
+ "ms": 1200,
+ "caption": "Paste any tool result to check it"
+ },
+ {
+ "hold": 1000
+ },
+ {
+ "click": "Load a broken example",
+ "caption": "A payload that is wrong on purpose"
+ },
+ {
+ "expect": "unknown kind",
+ "within": 10000
+ },
+ {
+ "read": "errors",
+ "selector": "#check-report",
+ "match": "(\\d+) errors"
+ },
+ {
+ "scroll": "unknown kind",
+ "ms": 1400,
+ "caption": "Each error names its path and the fix"
+ },
+ {
+ "hold": 4500
+ }
+ ]
+ },
+ "facts": [
+ {
+ "says": "three.ws is an OpenAI Select Partner in the OpenAI Partner Network.",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/partners",
+ "contains": "three.ws is an OpenAI Select Partner in the OpenAI Partner Network"
+ }
+ ]
+ },
+ {
+ "says": "Spatial MCP is an open shape for returning a live, interactive 3D scene as an MCP tool result.",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/spatial-mcp.md",
+ "contains": "Spatial MCP is an open shape for returning a **live, interactive 3D scene** as an MCP tool result"
+ }
+ ]
+ },
+ {
+ "says": "The spec is published under CC0.",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/spatial-mcp.md",
+ "contains": "(v0.1, CC0)"
+ }
+ ]
+ },
+ {
+ "says": "The checker on the page flags a payload with an unknown kind.",
+ "evidence": [
+ {
+ "type": "proof",
+ "saw": "unknown kind"
+ }
+ ]
+ },
+ {
+ "says": "The broken example produces several named errors.",
+ "evidence": [
+ {
+ "type": "proof",
+ "fact": "errors",
+ "min": 1
+ }
+ ]
+ },
+ {
+ "says": "The same validator is available as a package, a URL import and an MCP tool.",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/spatial-mcp.md",
+ "contains": "Validator (MCP tool)"
+ },
+ {
+ "type": "file",
+ "path": "docs/spatial-mcp.md",
+ "contains": "Validator (import by URL, no npm)"
+ }
+ ]
+ }
+ ],
+ "probes": [
+ {
+ "type": "api",
+ "name": "the Spatial MCP page answers",
+ "url": "https://three.ws/spatial-mcp"
+ }
+ ]
+ },
+ {
+ "id": "openai-ar-handoff",
+ "title": "One link from ChatGPT to AR",
+ "surface": "https://three.ws/api/ar?src=https%3A%2F%2Fthree.ws%2Favatars%2Fxbot.glb&title=Robot",
+ "covers": [],
+ "lane": "community",
+ "summary": "When ChatGPT generates a model through the connector, it can hand back a single three.ws link that opens that model in a viewer. On a phone the same link offers one tap to place it in your space with AR. The link takes the GLB address and a title and needs no account.",
+ "docs": [
+ "docs/chatgpt-ar.md"
+ ],
+ "scenario": {
+ "format": "square",
+ "steps": [
+ {
+ "goto": "https://three.ws/api/ar?src=https%3A%2F%2Fthree.ws%2Favatars%2Fxbot.glb&title=Robot",
+ "settle": 7000,
+ "caption": "The one link ChatGPT prints for AR"
+ },
+ {
+ "expect": "Place in your space",
+ "within": 15000
+ },
+ {
+ "hold": 2000
+ },
+ {
+ "drag": [
+ [
+ 0.3,
+ 0.4
+ ],
+ [
+ 0.75,
+ 0.4
+ ]
+ ],
+ "ms": 2000,
+ "caption": "Orbit it on any screen"
+ },
+ {
+ "hold": 1500,
+ "caption": "On a phone, one tap places it in AR"
+ },
+ {
+ "hold": 3500
+ }
+ ]
+ },
+ "facts": [
+ {
+ "says": "three.ws is an OpenAI Select Partner in the OpenAI Partner Network.",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/partners",
+ "contains": "three.ws is an OpenAI Select Partner in the OpenAI Partner Network"
+ }
+ ]
+ },
+ {
+ "says": "The AR link takes a GLB address and a title.",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/chatgpt-ar.md",
+ "contains": "/api/ar?src=<glbUrl>&title=<name>"
+ }
+ ]
+ },
+ {
+ "says": "The link page offers to place the model in your space.",
+ "evidence": [
+ {
+ "type": "proof",
+ "saw": "Place in your space"
+ }
+ ]
+ },
+ {
+ "says": "The same link has a variant for rigged avatars.",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/chatgpt-ar.md",
+ "contains": "/api/ar?src=<glbUrl>&title=<name>&kind=avatar"
+ }
+ ]
+ }
+ ],
+ "probes": [
+ {
+ "type": "api",
+ "name": "the AR launch link answers",
+ "url": "https://three.ws/api/ar?src=https%3A%2F%2Fthree.ws%2Favatars%2Fxbot.glb&title=Robot"
+ }
+ ]
+ }
+ ]
+}
diff --git a/data/x-content/partners/quicknode.json b/data/x-content/partners/quicknode.json
new file mode 100644
index 000000000..9937f699a
--- /dev/null
+++ b/data/x-content/partners/quicknode.json
@@ -0,0 +1,254 @@
+{
+ "id": "quicknode",
+ "name": "Quicknode",
+ "order": 8,
+ "designation": "Quicknode Startup Program",
+ "designationEvidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/partners",
+ "contains": "member of the Quicknode Startup Program"
+ }
+ ],
+ "page": "https://three.ws/blog/three-ws-quicknode-startup-program",
+ "handle": "QuickNode",
+ "mark": null,
+ "forbidden": [
+ "endorsed by Quicknode",
+ "Quicknode endorses",
+ "Quicknode recommends",
+ "Quicknode-certified",
+ "certified by Quicknode",
+ "official Quicknode partner",
+ "Quicknode partner",
+ "strategic partnership with Quicknode",
+ "powered by Quicknode",
+ "Quicknode-powered",
+ "runs on Quicknode",
+ "hosted on Quicknode",
+ "Quicknode infrastructure",
+ "our RPC provider",
+ "primary RPC",
+ "only RPC",
+ "exclusive RPC",
+ "sole RPC",
+ "Quicknode credits",
+ "free credits",
+ "credits worth",
+ "Quicknode Elite",
+ "Quicknode Enterprise",
+ "joint customers",
+ "co-sell"
+ ],
+ "guidance": "three.ws is a member of the Quicknode Startup Program with approved infrastructure credits. Say that and nothing grander: it is a program membership, not an endorsement, certification or exclusive arrangement. Quicknode is one premium lane among several in the Solana RPC failover chain, enabled by an endpoint URL configured on the server, so never call it the primary or only provider and never say three.ws runs on Quicknode. Talk about the outcome: capacity and redundancy behind agent wallets and x402 settlement verification. Never state a credit amount.",
+ "docs": [
+ "docs/partners.md",
+ "docs/solana.md"
+ ],
+ "features": [
+ {
+ "id": "quicknode-settlement-check",
+ "title": "Verify an x402 settlement on Solana",
+ "surface": "https://three.ws/blog/three-ws-quicknode-startup-program",
+ "covers": [],
+ "lane": "developer",
+ "summary": "One GET to verify-receipt checks a real x402 settlement signature against the Solana chain and answers with a finalized status and slot, reading through the same RPC failover chain that Quicknode capacity feeds.",
+ "docs": [
+ "docs/solana.md",
+ "docs/partners.md"
+ ],
+ "scenario": {
+ "format": "square",
+ "steps": [
+ {
+ "goto": "https://three.ws/api/x402/verify-receipt?hash=66Bz4Rhz7wSNHvNieRk65P6PRe7Cmk7foNXaYV5dMBDiRrAS2ZM6pKV4UhiLJLFVfcGzLFzUoBpkAs12agY9w8x5&network=solana",
+ "settle": 4000,
+ "caption": "One GET checks a real x402 settlement"
+ },
+ {
+ "hold": 2500
+ },
+ {
+ "expect": "settlement confirmed on Solana",
+ "caption": "Read straight from the Solana chain"
+ },
+ {
+ "read": "status",
+ "match": "\"status\":\\s*\"(finalized)\""
+ },
+ {
+ "hold": 4500
+ }
+ ]
+ },
+ "facts": [
+ {
+ "says": "three.ws is a member of the Quicknode Startup Program with approved infrastructure credits.",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/partners",
+ "contains": "member of the Quicknode Startup Program with approved"
+ }
+ ]
+ },
+ {
+ "says": "Quicknode endpoints add capacity and redundancy to the chain access behind agent wallets, x402 settlement verification, and live Solana reads.",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/partners.md",
+ "contains": "x402 settlement verification"
+ }
+ ]
+ },
+ {
+ "says": "The verify-receipt endpoint looks a Solana signature up and answers whether the settlement is confirmed.",
+ "evidence": [
+ {
+ "type": "proof",
+ "saw": "settlement confirmed on Solana"
+ }
+ ]
+ },
+ {
+ "says": "The signature in the scene finalized on Solana mainnet.",
+ "evidence": [
+ {
+ "type": "proof",
+ "fact": "status",
+ "equals": "finalized"
+ }
+ ]
+ },
+ {
+ "says": "Server-side Solana calls do not depend on a single endpoint: a failover chain rotates past endpoints that are rate-limited or cooling down.",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/solana.md",
+ "contains": "rotates past endpoints that are rate-limited or cooling down"
+ }
+ ]
+ },
+ {
+ "says": "A Quicknode endpoint URL, when configured, is one lane in that failover chain.",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "api/_lib/solana/connection.js",
+ "contains": "QUICKNODE_RPC_URL"
+ }
+ ]
+ },
+ {
+ "says": "The verify-receipt endpoint reads signature status through the shared Solana connection.",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "api/x402/verify-receipt.js",
+ "contains": "solanaConnection"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "quicknode-agent-wallet-balance",
+ "title": "An agent wallet, read live from Solana",
+ "surface": "https://three.ws/agent-wallet",
+ "covers": [],
+ "lane": "developer",
+ "summary": "Every three.ws agent can hold a Solana wallet. The wallet endpoint reads its balance live from Solana mainnet through the shared RPC failover chain.",
+ "docs": [
+ "docs/solana.md",
+ "docs/partners.md"
+ ],
+ "scenario": {
+ "format": "square",
+ "steps": [
+ {
+ "goto": "https://three.ws/api/agents/f0e8ddd2-d214-4e74-b832-b750cffe7d69/solana",
+ "settle": 4000,
+ "caption": "An agent wallet, read live"
+ },
+ {
+ "hold": 2500
+ },
+ {
+ "expect": "\"chain\":\"solana\"",
+ "caption": "Balance comes from the Solana RPC chain"
+ },
+ {
+ "read": "network",
+ "match": "\"network\":\\s*\"(mainnet)\""
+ },
+ {
+ "hold": 4500
+ }
+ ]
+ },
+ "facts": [
+ {
+ "says": "three.ws is a member of the Quicknode Startup Program with approved infrastructure credits.",
+ "evidence": [
+ {
+ "type": "page",
+ "url": "https://three.ws/partners",
+ "contains": "member of the Quicknode Startup Program with approved"
+ }
+ ]
+ },
+ {
+ "says": "Quicknode endpoints add capacity and redundancy to the chain access behind agent wallets.",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/partners.md",
+ "contains": "chain access behind agent wallets"
+ }
+ ]
+ },
+ {
+ "says": "The agent wallet endpoint answers with chain solana.",
+ "evidence": [
+ {
+ "type": "proof",
+ "saw": "\"chain\":\"solana\""
+ }
+ ]
+ },
+ {
+ "says": "The wallet balance is read from Solana mainnet.",
+ "evidence": [
+ {
+ "type": "proof",
+ "fact": "network",
+ "equals": "mainnet"
+ }
+ ]
+ },
+ {
+ "says": "The Solana wallet code reaches the chain through the shared failover connection.",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "api/_lib/agent-wallet.js",
+ "contains": "solanaConnection(net)"
+ }
+ ]
+ },
+ {
+ "says": "Server-side Solana calls do not depend on a single endpoint.",
+ "evidence": [
+ {
+ "type": "file",
+ "path": "docs/solana.md",
+ "contains": "do not depend on a single endpoint"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/deploy/x-partners/Dockerfile b/deploy/x-partners/Dockerfile
new file mode 100644
index 000000000..702a21b75
--- /dev/null
+++ b/deploy/x-partners/Dockerfile
@@ -0,0 +1,50 @@
+# syntax=docker/dockerfile:1.7-labs
+# The daily partner spotlight runner (docs/x-partner-series.md), as a Cloud Run Job.
+#
+# The production image sheds Playwright and has no ffmpeg on purpose, so the
+# authoring side of the X pipeline (filming a reel, cutting a GIF, building a
+# head) needs its own image. This one is the repo at a commit, with devDependencies
+# kept, Chromium and its system libraries installed for the exact Playwright
+# version in package-lock.json, and the colour emoji font the reel check demands.
+# Build from the repo root:
+# gcloud builds submit --config deploy/x-partners/cloudbuild.yaml .
+FROM node:24-bookworm-slim
+
+WORKDIR /app
+
+RUN apt-get update \
+ && apt-get install -y --no-install-recommends python3 make g++ ca-certificates curl fontconfig fonts-liberation git \
+ && rm -rf /var/lib/apt/lists/*
+
+# Same pin as the production Dockerfile: the npm that produced package-lock.json.
+ARG NPM_VERSION=11.9.0
+RUN npm install -g npm@${NPM_VERSION}
+
+ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright \
+ PUPPETEER_SKIP_DOWNLOAD=1
+
+COPY --parents package.json package-lock.json .npmrc* **/package.json /app/
+RUN npm ci --ignore-scripts --no-audit --no-fund
+
+# Chromium for the Playwright version the lockfile resolved, with its system libraries.
+RUN npx playwright install --with-deps chromium && rm -rf /var/lib/apt/lists/*
+
+# verify.js refuses to film when emoji draw as boxes; this is the font it asks for.
+RUN curl -sSL -o /usr/share/fonts/truetype/Noto-COLRv1.ttf --create-dirs \
+ https://raw.githubusercontent.com/googlefonts/noto-emoji/main/2D/fonts/Noto-COLRv1.ttf \
+ && fc-cache -f
+
+COPY . .
+# npm rebuild runs the install hooks skipped above, among them ffmpeg-static's
+# binary download, which reel.js and the head builder use.
+RUN npm rebuild && npm run postinstall
+
+ENV NODE_ENV=production \
+ NODE_OPTIONS=--no-deprecation \
+ GOOGLE_CLOUD_PROJECT=aerial-vehicle-466722-p5
+
+# The run writes stories, proofs and media into the tree before bundling them.
+RUN chown -R node:node /app
+USER node
+
+ENTRYPOINT ["bash", "deploy/x-partners/run.sh"]
diff --git a/deploy/x-partners/README.md b/deploy/x-partners/README.md
new file mode 100644
index 000000000..68ff2f9e7
--- /dev/null
+++ b/deploy/x-partners/README.md
@@ -0,0 +1,20 @@
+# Partner spotlight runner
+
+The image and schedule that run the daily partner spotlight (`npm run x:partners -- daily`) unattended. What the series is and how it decides what to post is in [docs/x-partner-series.md](../../docs/x-partner-series.md).
+
+| File | Purpose |
+|---|---|
+| [Dockerfile](Dockerfile) | The repo with devDependencies kept, Chromium for the locked Playwright version, ffmpeg (via `ffmpeg-static`), and the COLRv1 emoji font the reel check requires. The production image has none of these on purpose. |
+| [run.sh](run.sh) | One day: `x-bundle pull` materializes production's overlay so the rotation sees what already shipped, then `x-partners daily --days $X_PARTNERS_DAYS --overlay <dir> --ship`. |
+| [cloudbuild.yaml](cloudbuild.yaml) | Builds the image into `cloud-run-source-deploy/x-partners` from the repo root. |
+| [scripts/create-x-partners-job.mjs](../../scripts/create-x-partners-job.mjs) | Builds the image, creates the Cloud Run Job `three-ws-x-partners` with the `three-ws-api` service's environment (Secret Manager references stay references), and schedules it at 08:10 UTC daily. |
+
+```bash
+node scripts/create-x-partners-job.mjs # print the plan, change nothing
+node scripts/create-x-partners-job.mjs --apply # build, create or update the job and its schedule
+node scripts/create-x-partners-job.mjs --run-now # the same, then start one run
+```
+
+Shipping a bundle publishes to @trythreews, so applying this is an owner decision. Nothing posts on its own until production has `X_CONTENT_AUTO_PUBLISH=true`, and every released spotlight still sits behind the queue's veto window.
+
+The job runs as `three-ws@`, takes 2 CPU and 4 GiB, times out after an hour, and never retries: three days are kept in stock, so a failed run is refilled by the next one. Rebuild the image (`--apply` without `--skip-build`) after the registry or the engine changes, because the job films and drafts from the code baked into it.
diff --git a/deploy/x-partners/cloudbuild.yaml b/deploy/x-partners/cloudbuild.yaml
new file mode 100644
index 000000000..ed5d3f69f
--- /dev/null
+++ b/deploy/x-partners/cloudbuild.yaml
@@ -0,0 +1,34 @@
+# Builds the partner spotlight runner image (deploy/x-partners/Dockerfile).
+# Submit from the repo root, so the build context is the whole repo:
+# gcloud builds submit --config deploy/x-partners/cloudbuild.yaml \
+# --service-account=projects/aerial-vehicle-466722-p5/serviceAccounts/[email protected] .
+# scripts/create-x-partners-job.mjs prints this with the right flags.
+substitutions:
+ _REGION: us-central1
+ _REPO: cloud-run-source-deploy
+ _IMAGE: x-partners
+ _TAG: latest
+
+steps:
+ - name: gcr.io/cloud-builders/docker
+ env:
+ - DOCKER_BUILDKIT=1
+ args:
+ - build
+ - -t
+ - ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/${_IMAGE}:${_TAG}
+ - -t
+ - ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/${_IMAGE}:latest
+ - -f
+ - deploy/x-partners/Dockerfile
+ - .
+ timeout: 1800s
+
+images:
+ - ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/${_IMAGE}:${_TAG}
+ - ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/${_IMAGE}:latest
+
+options:
+ machineType: E2_HIGHCPU_8
+ logging: CLOUD_LOGGING_ONLY
+timeout: 2400s
diff --git a/deploy/x-partners/run.sh b/deploy/x-partners/run.sh
new file mode 100755
index 000000000..1ae469b89
--- /dev/null
+++ b/deploy/x-partners/run.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+# One day of the partner spotlight, unattended.
+#
+# 1. Materialize production's overlay, so the rotation sees every spotlight
+# already shipped, not only the ones in this image's queue.json.
+# 2. Keep X_PARTNERS_DAYS days in stock: film, draft, review, and ship what the
+# approval policy releases as signed bundles production reads.
+set -euo pipefail
+cd "$(dirname "$0")/../.."
+
+overlay="$(mktemp -d)"
+days="${X_PARTNERS_DAYS:-3}"
+
+node scripts/x-bundle.mjs pull --dir "$overlay"
+exec node scripts/x-partners.mjs daily --days "$days" --overlay "$overlay" --ship
diff --git a/docs/x-partner-series.md b/docs/x-partner-series.md
index 5e6cb352c..dd6d8d1a7 100644
--- a/docs/x-partner-series.md
+++ b/docs/x-partner-series.md
@@ -8,6 +8,7 @@ Every day @trythreews features one partner listed on [three.ws/partners](https:/
| Engine: rotation, brief, drafting, series lint, claims, item | [api/_lib/x-content/partners.js](../api/_lib/x-content/partners.js) |
| CLI | [scripts/x-partners.mjs](../scripts/x-partners.mjs) (`npm run x:partners`) |
| Slot and approval | `slots` and `approval.series` in [data/x-content/queue.json](../data/x-content/queue.json) |
+| Scheduled runner: a Cloud Run Job image and its setup | [deploy/x-partners/](../deploy/x-partners/), [scripts/create-x-partners-job.mjs](../scripts/create-x-partners-job.mjs) |
| Tests | [tests/x-content-partners.test.js](../tests/x-content-partners.test.js) |
## The registry
@@ -110,6 +111,18 @@ A series slot spends its series' best ready post first, ranked across every tier
Spotlights are tier 1, which normally waits for the owner. `"series": ["partners"]` in `approval` releases a listed series by policy whatever its tier, behind the veto window, and only when the other conditions hold: the post was filmed and the proof covers it, it tags no one, and the review passed on the editor's own verdict. Remove `partners` from the list and every spotlight waits for `approve` again.
+## The weekly Article
+
+Once every seven days the series also writes a partner deep-dive as an X Article: one partner, every feature in its registry entry, filmed and measured that day. `daily` writes it when it is due (`--no-article` skips it), and `article --partner <id>` writes one on demand.
+
+1. Every feature's scenario is filmed against production. The lead feature's run binds to the Article's own id, so its reel is the proof the Article's post carries; the others are filmed under `<id>-<feature>`. Four or more frames from the reels become inline figures in `public/x-media/<id>/`, and the cover is built from the lead reel.
+2. `articleBlocks` builds the Article's code and tables from data, never from the model: a table of the runs (surface, length, values read), a facts table per feature with the evidence behind each sentence, each scenario as JSON, and for API surfaces the real request with the response production returned.
+3. The model writes the prose around them as `TITLE / POST / --- / markdown`, placing every block once as `{{block:NAME}}` and the figures as `{{figure:N}}`. `assembleArticle` substitutes them and names any block missing, repeated or unknown.
+4. The draft must pass the queue's Article gate (an 80 to 100 character title, 2400 words over at least eight sections, at least four images, enough code and tables, a section on every partner listed on the partners page, a Try it section) plus the series lint, with every finding fed back for up to three attempts.
+5. Claims come from the designation, the registry facts the prose quotes, and the lead run's values only (a non-lead run is not the proof the post carries, so its numbers stay in the tables). The item is a tier 1 Article with `spotlight: { partner, article: true, features }`, written to `data/x-content/articles/<id>.md` and handed to `adopt` and `advance`.
+
+Rotation goes to the partner whose last Article is oldest, ties by `order`. Articles post in the queue's Article slot, not the series slot, and wait for the owner's `approve` like any tier 1 Article.
+
## Running it
```bash
@@ -118,6 +131,7 @@ npm run x:partners -- plan --days 7 # the rotation ahead and how man
npm run x:partners -- daily --days 3 --dry-run # film and draft three days, print them, write nothing
npm run x:partners -- daily --days 3 # write them to the queue and send them to review
npm run x:partners -- one --partner aws --feature marketplace-front-door --head gif
+npm run x:partners -- article --partner ibm --dry-run # film and draft the deep-dive Article, write nothing
```
`--ship` on `daily` or `one` passes `--ship` to `advance`, which bundles approved spotlights for production through the overlay ([x-content-pipeline.md](x-content-pipeline.md), "Publishing without a deploy"). Shipping publishes, so it is an owner-approved step.
@@ -129,4 +143,6 @@ npm run x:bundle -- pull --dir /tmp/x-overlay
npm run x:partners -- daily --days 3 --overlay /tmp/x-overlay --ship
```
+That run is packaged as a Cloud Run Job. [deploy/x-partners/](../deploy/x-partners/) holds the image (Node, Chromium, ffmpeg and a colour emoji font, so the reels film the way they do on a workstation) and its entrypoint, which pulls the overlay and runs `daily --days 3 --ship`. `node scripts/create-x-partners-job.mjs` prints the plan; `--apply` builds the image, creates the job `three-ws-x-partners` with the production service's env and secret references, and schedules it daily at 08:10 UTC through Cloud Scheduler. Applying it ships posts unattended, so it is an owner-approved step.
+
Keeping three days in stock means a failed run, a flaky surface, or a model outage costs nothing: the slot still has a reviewed spotlight waiting.
diff --git a/scripts/create-x-partners-job.mjs b/scripts/create-x-partners-job.mjs
new file mode 100644
index 000000000..75bc195be
--- /dev/null
+++ b/scripts/create-x-partners-job.mjs
@@ -0,0 +1,167 @@
+#!/usr/bin/env node
+// Run the daily partner spotlight unattended (docs/x-partner-series.md).
+//
+// A Cloud Run Job runs deploy/x-partners/run.sh in the image built from
+// deploy/x-partners/Dockerfile: it pulls production's overlay, keeps three days
+// of spotlights in stock, and ships what the approval policy releases. Cloud
+// Scheduler starts it once a day. The job reads the same environment as the
+// three-ws-api service (the model keys, DATABASE_URL, object storage, the bundle
+// secret), copied as the service has it: Secret Manager references stay references.
+//
+// Shipping a bundle publishes, so this is owner-gated: the default prints the
+// plan and changes nothing.
+//
+// node scripts/create-x-partners-job.mjs # plan
+// node scripts/create-x-partners-job.mjs --apply # build the image, create or update the job and its schedule
+// node scripts/create-x-partners-job.mjs --apply --skip-build # reuse the last image
+// node scripts/create-x-partners-job.mjs --run-now # also start one run
+
+import { execFileSync } from 'node:child_process';
+import { mkdtempSync, readFileSync, writeFileSync } from 'node:fs';
+import { tmpdir } from 'node:os';
+import { join } from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+const PROJECT = 'aerial-vehicle-466722-p5';
+const REGION = 'us-central1';
+const SERVICE = 'three-ws-api';
+const JOB = 'three-ws-x-partners';
+const SCHEDULER_JOB = 'three-ws-x-partners-daily';
+// 08:10 UTC: hours before the first slot, so a released spotlight clears its veto window in time.
+const SCHEDULE = '10 8 * * *';
+const TIME_ZONE = 'Etc/UTC';
+const IMAGE = `${REGION}-docker.pkg.dev/${PROJECT}/cloud-run-source-deploy/x-partners:latest`;
+const BUILD_SA = `three-ws-build@${PROJECT}.iam.gserviceaccount.com`;
+const RUNTIME_SA = `three-ws@${PROJECT}.iam.gserviceaccount.com`;
+const ROOT = fileURLToPath(new URL('..', import.meta.url));
+
+const argv = process.argv.slice(2);
+const runNow = argv.includes('--run-now');
+const apply = argv.includes('--apply') || runNow;
+const skipBuild = argv.includes('--skip-build');
+
+function gcloud(args, { allowFail = false, inherit = false } = {}) {
+ try {
+ const out = execFileSync('gcloud', [...args, `--project=${PROJECT}`, '--quiet'], {
+ cwd: ROOT,
+ encoding: 'utf8',
+ stdio: inherit ? 'inherit' : ['ignore', 'pipe', 'pipe'],
+ });
+ return typeof out === 'string' ? out.trim() : '';
+ } catch (error) {
+ if (allowFail) return null;
+ throw new Error(`gcloud ${args.join(' ')} failed:\n${error.stderr || error.message}`);
+ }
+}
+
+const show = (args) => `gcloud ${args.map((a) => (/[\s*]/.test(a) ? `'${a}'` : a)).join(' ')} --project=${PROJECT}`;
+
+// The service's environment, exactly as Cloud Run holds it: plain values and
+// Secret Manager references. Copying the spec, never the resolved values, keeps
+// every secret in Secret Manager.
+export function serviceEnv(service) {
+ const container = service?.spec?.template?.spec?.containers?.[0];
+ if (!container?.env?.length) throw new Error(`${SERVICE} has no environment to copy`);
+ return container.env.filter((entry) => entry.name && !['PORT', 'K_SERVICE', 'K_REVISION', 'K_CONFIGURATION'].includes(entry.name));
+}
+
+export function jobSpec(env) {
+ return {
+ apiVersion: 'run.googleapis.com/v1',
+ kind: 'Job',
+ metadata: { name: JOB, labels: { app: 'three-ws', component: 'x-partners' } },
+ spec: {
+ template: {
+ spec: {
+ taskCount: 1,
+ parallelism: 1,
+ template: {
+ spec: {
+ serviceAccountName: RUNTIME_SA,
+ // A failed day costs nothing: three days are in stock and tomorrow's run refills them.
+ maxRetries: 0,
+ timeoutSeconds: 3600,
+ containers: [
+ {
+ image: IMAGE,
+ env: [...env.filter((entry) => entry.name !== 'X_PARTNERS_DAYS'), { name: 'X_PARTNERS_DAYS', value: '3' }],
+ resources: { limits: { cpu: '2', memory: '4Gi' } },
+ },
+ ],
+ },
+ },
+ },
+ },
+ },
+ };
+}
+
+const runUri = `https://run.googleapis.com/v2/projects/${PROJECT}/locations/${REGION}/jobs/${JOB}:run`;
+const schedulerArgs = (verb) => [
+ 'scheduler',
+ 'jobs',
+ verb,
+ 'http',
+ SCHEDULER_JOB,
+ `--location=${REGION}`,
+ `--schedule=${SCHEDULE}`,
+ `--time-zone=${TIME_ZONE}`,
+ `--uri=${runUri}`,
+ '--http-method=POST',
+ `--oauth-service-account-email=${RUNTIME_SA}`,
+ '--oauth-token-scope=https://www.googleapis.com/auth/cloud-platform',
+ '--attempt-deadline=180s',
+ '--description=Daily partner spotlight for @trythreews: film, draft, review and ship (docs/x-partner-series.md)',
+];
+// The build uploads the repo through the shared .gcloudignore allowlist, plus
+// the two paths only this image needs: docs/ (the house voice, and the files the
+// partner facts cite as evidence) and deploy/ (run.sh). The production image
+// stays without them.
+const UPLOAD_EXTRAS = ['!/docs/', '!/deploy/', '**/node_modules/', '.git/'];
+export function ignoreFile() {
+ const dir = mkdtempSync(join(tmpdir(), 'x-partners-upload-'));
+ const file = join(dir, '.gcloudignore');
+ writeFileSync(file, `${readFileSync(join(ROOT, '.gcloudignore'), 'utf8')}\n# x-partners runner additions\n${UPLOAD_EXTRAS.join('\n')}\n`);
+ return file;
+}
+const buildArgs = (ignore) => ['builds', 'submit', '--config=deploy/x-partners/cloudbuild.yaml', `--ignore-file=${ignore}`, `--region=${REGION}`, `--service-account=projects/${PROJECT}/serviceAccounts/${BUILD_SA}`, '.'];
+const invokerGrant = ['run', 'jobs', 'add-iam-policy-binding', JOB, `--region=${REGION}`, `--member=serviceAccount:${RUNTIME_SA}`, '--role=roles/run.invoker'];
+
+function main() {
+ const scheduled = gcloud(['scheduler', 'jobs', 'describe', SCHEDULER_JOB, `--location=${REGION}`, '--format=value(name)'], { allowFail: true });
+ const verb = scheduled ? 'update' : 'create';
+
+ if (!apply) {
+ console.log('Plan (nothing changed; rerun with --apply):\n');
+ console.log('# 1. The runner image (Chromium, ffmpeg, the repo at this commit)');
+ console.log(show(buildArgs('<.gcloudignore plus docs/ and deploy/>')));
+ console.log(`\n# 2. The job ${JOB}, with ${SERVICE}'s environment copied as references`);
+ console.log(`gcloud run jobs replace <generated job.yaml> --region=${REGION} --project=${PROJECT}`);
+ console.log('\n# 3. Let the runtime account start it');
+ console.log(show(invokerGrant));
+ console.log(`\n# 4. The schedule (${SCHEDULE} ${TIME_ZONE}); ${scheduled ? 'exists, will update' : 'does not exist, will create'}`);
+ console.log(show(schedulerArgs(verb)));
+ console.log('\n# 5. A first run on demand');
+ console.log(show(['run', 'jobs', 'execute', JOB, `--region=${REGION}`]));
+ return;
+ }
+
+ if (!skipBuild) gcloud(buildArgs(ignoreFile()), { inherit: true });
+ const service = JSON.parse(gcloud(['run', 'services', 'describe', SERVICE, `--region=${REGION}`, '--format=json']));
+ const env = serviceEnv(service);
+ const dir = mkdtempSync(join(tmpdir(), 'x-partners-job-'));
+ // JSON is valid YAML, which is what `jobs replace` reads.
+ const file = join(dir, 'job.yaml');
+ writeFileSync(file, JSON.stringify(jobSpec(env), null, 2));
+ gcloud(['run', 'jobs', 'replace', file, `--region=${REGION}`]);
+ console.log(`job ${JOB}: ${env.length} environment entries copied from ${SERVICE}`);
+ gcloud(invokerGrant);
+ gcloud(schedulerArgs(verb));
+ console.log(`${verb}d scheduler job ${SCHEDULER_JOB} (${SCHEDULE} ${TIME_ZONE})`);
+ if (runNow) {
+ gcloud(['run', 'jobs', 'execute', JOB, `--region=${REGION}`]);
+ console.log(`started a run; follow it with: gcloud run jobs executions list --job=${JOB} --region=${REGION} --project=${PROJECT}`);
+ }
+}
+
+if (process.argv[1] && fileURLToPath(import.meta.url) === process.argv[1]) main();
diff --git a/scripts/x-partners.mjs b/scripts/x-partners.mjs
index c677411de..34c573f7b 100644
--- a/scripts/x-partners.mjs
+++ b/scripts/x-partners.mjs
@@ -9,28 +9,33 @@
// the queue's own review and approval
// npm run x:partners -- one [--partner id] [--feature id] [--head card|gif|reel|art] [--pattern p] [--ship]
// the same for one spotlight, chosen by hand
+// npm run x:partners -- article [--partner id] [--ship]
+// the weekly deep dive: an X Article on one partner,
+// every feature filmed again, code and tables built
+// from the runs; daily writes one when it is due
//
// Options for daily and one:
// --overlay <dir> also read the spotlights in a materialized overlay (x-bundle pull), so a
// machine whose queue.json is the image's copy still rotates correctly
// --dry-run film and draft, print the thread, write nothing to the queue
+// --no-article daily only: skip the weekly partner Article even when it is due
//
// A spotlight is tier 1 and carries `series: "partners"`. The queue's series
// slot (cadence) gives it one prime-time post a day, and `approval.series`
// releases it behind the veto window once it is filmed, reviewed, and passes
// the series lint in api/_lib/x-content/partners.js.
-import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
+import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
import { dirname, relative, resolve } from 'node:path';
import { spawnSync } from 'node:child_process';
import { fileURLToPath } from 'node:url';
-import { loadHistory, loadQueue, validateItem } from '../api/_lib/x-content/queue.js';
-import { proveItem } from '../api/_lib/x-content/reel.js';
+import { loadHistory, loadQueue, partnerNames, validateItem } from '../api/_lib/x-content/queue.js';
+import { proveItem, reelFrames } from '../api/_lib/x-content/reel.js';
import { browserProblem } from '../api/_lib/x-content/verify.js';
import { callModelChain } from '../api/_lib/x-content/llm.js';
-import { HEAD_ROTATION, PATTERN_ROTATION, SERIES, buildBrief, draftSpotlight, itemFor, loadPartners, maximumLength, nextDay, partnerProblems, pickNext, spotlightId, spotlights } from '../api/_lib/x-content/partners.js';
-import { rebuildHead } from './lib/x-heads.mjs';
+import { ARTICLE_MIN_FIGURES, HEAD_ROTATION, PATTERN_ROTATION, SERIES, articleBlocks, articleId, articleItemFor, articleSeriesFindings, assembleArticle, buildArticleBrief, buildBrief, draftArticle, draftSpotlight, itemFor, loadPartners, maximumLength, nextArticleDay, nextDay, partnerArticles, partnerProblems, pickArticlePartner, pickNext, spotlightId, spotlights } from '../api/_lib/x-content/partners.js';
+import { headDir, rebuildHead, reelFrame } from './lib/x-heads.mjs';
const root = resolve(fileURLToPath(new URL('..', import.meta.url)));
const STORY_DIR = 'data/x-content/stories';
@@ -93,7 +98,7 @@ function registry() {
// Every spotlight on record: this checkout's queue, plus a materialized
// overlay's when one is given (the job runs from the image's queue.json, and
// the bundles hold what earlier runs released).
-function history(queue) {
+function allItems(queue) {
const items = [...queue.items];
const overlay = option('overlay');
if (overlay) {
@@ -102,8 +107,9 @@ function history(queue) {
const seen = new Set(items.map((item) => item.id));
for (const item of JSON.parse(readFileSync(path, 'utf8')).items || []) if (!seen.has(item.id)) items.push(item);
}
- return spotlights(items);
+ return items;
}
+const history = (queue) => spotlights(allItems(queue));
const today = () => new Date().toISOString().slice(0, 10);
@@ -145,6 +151,9 @@ function plan() {
console.log(` ${day} ${pick.partner.name.padEnd(14)} ${pick.feature.id.padEnd(26)} ${pick.head.padEnd(5)} ${pick.pattern}`);
simulated.push({ partner: pick.partner.id, feature: pick.feature.id, head: pick.head, pattern: pick.pattern, day, status: 'draft' });
}
+ const articles = partnerArticles(allItems(queue));
+ const due = nextArticleDay(articles, Date.now());
+ console.log(`\nPartner Article: ${articles.length ? `last ${articles.at(-1).id} (${articles.at(-1).status})` : 'none yet'}; next due ${due}, on ${pickArticlePartner(partners, articles)?.name}`);
}
// Films, drafts, and queues one spotlight. Returns what happened, never throws
@@ -247,7 +256,17 @@ async function daily() {
const count = has('dry-run') ? 1 : Math.max(0, want - stock.length);
console.log(`x-partners: ${stock.length} day(s) in stock, keeping ${want}; ${count ? `writing ${count}` : 'nothing to write'}`);
if (count) await generate({ count });
- if (has('ship') && !has('dry-run') && !count) {
+ // The weekly deep dive rides on the same run, when one is due in the window.
+ let wrote = false;
+ if (!has('dry-run') && !has('no-article')) {
+ if (!count) {
+ const problem = await browserProblem();
+ if (problem) fail(`x-partners: ${problem}. Nothing was filmed.`);
+ hydrateModelEnv();
+ }
+ wrote = Boolean((await articleIfDue({ days: want }))?.ok);
+ }
+ if (has('ship') && !has('dry-run') && !count && !wrote) {
const ship = spawnSync(process.execPath, [resolve(root, 'scripts/x-bundle.mjs'), 'publish', '--approved'], { cwd: root, stdio: 'inherit' });
if (ship.status !== 0) process.exitCode = 1;
}
@@ -274,7 +293,163 @@ async function one() {
});
}
-const commands = { check, plan, daily, one };
+// --- the weekly Article --------------------------------------------------------
+
+// What an API surface answers right now, for the Article's request block. A
+// page surface has no response worth printing; its scenario is the code.
+async function liveResponse(url) {
+ if (!/^https:\/\/three\.ws\/api\//.test(url)) return null;
+ try {
+ const response = await fetch(url, { signal: AbortSignal.timeout(20_000), headers: { accept: 'application/json' } });
+ if (!response.ok) return null;
+ const text = await response.text();
+ try {
+ return { url, json: true, body: JSON.stringify(JSON.parse(text), null, 2) };
+ } catch {
+ return { url, json: false, body: text };
+ }
+ } catch {
+ return null;
+ }
+}
+
+// One paragraph line per partner on three.ws/partners, from the registry where
+// it has an entry, so the section never says more than the registry proves.
+function partnersSection(partners) {
+ return partnerNames(root).map((name) => {
+ const entry = partners.find((row) => row.name === name || name.includes(row.name) || row.name.includes(name));
+ if (!entry) return `${name}: listed on three.ws/partners; say only that, and link nothing`;
+ const features = entry.features.map((feature) => feature.title).join('; ');
+ // Sentences naming an npm scope read as a tag to the lint, so they stay in the feature's own section.
+ const summary = entry.features[0].summary.split(/(?<=\.)\s+/).filter((sentence) => !/(^|\s)@\w/.test(sentence)).join(' ');
+ return `${name}: three.ws designation "${entry.designation}" (word for word). What three.ws built on it: ${features}. ${summary}`;
+ });
+}
+
+async function writeArticle({ partner, partners, queue, day, dryRun, ship }) {
+ const id = articleId(partner, day);
+ const dir = headDir(id);
+ console.log(`\n=== ${day}: ${partner.name} deep dive as ${id} ===`);
+
+ // 1. Film every feature. The first that passes leads: its run is the
+ // Article's own proof, and its reel rides on the post that quotes it.
+ const runs = [];
+ for (const feature of partner.features) {
+ const runId = runs.length ? `${id}-${feature.id}`.slice(0, 80) : id;
+ const skeleton = { id: runId, status: 'draft', kind: 'post', tier: 1, scenario: feature.scenario, probes: [{ type: 'scenario' }], posts: [{ text: '' }], claims: [], mentions: {} };
+ try {
+ const { proof, media } = await proveItem(skeleton, { root, film: true });
+ if (!proof.passed || !media) {
+ console.log(` ${feature.id}: did not pass; left out`);
+ if (!runs.length) rmSync(resolve(root, `data/x-content/proofs/${runId}.json`), { force: true });
+ continue;
+ }
+ runs.push({ feature, proof, media, live: await liveResponse(feature.scenario.steps[0].goto) });
+ console.log(` ${feature.id}: filmed ${proof.video.durationSec} s${runs.at(-1).live ? ', live response captured' : ''}`);
+ } catch (err) {
+ console.log(` ${feature.id}: ${String(err.message || err).split('\n')[0]}; left out`);
+ }
+ }
+ if (!runs.length) return { id, ok: false, reason: 'no feature passed its scenario' };
+
+ // 2. Figures from the reels (at least four, spread across the runs), and a
+ // cover from the lead reel.
+ mkdirSync(resolve(root, dir), { recursive: true });
+ const perRun = Math.max(2, Math.ceil(ARTICLE_MIN_FIGURES / runs.length));
+ const figures = [];
+ for (const { feature, media } of runs) {
+ const captions = (feature.scenario.steps || []).map((step) => step.caption).filter(Boolean);
+ reelFrames({ root, path: media.path, count: perRun }).forEach((frame, index) => {
+ const path = `${dir}/${feature.id}-${index + 1}.jpg`;
+ writeFileSync(resolve(root, path), frame.buffer);
+ const note = captions[Math.min(captions.length - 1, Math.floor((index / perRun) * captions.length))];
+ figures.push({ path, alt: `${feature.title}, filmed live on ${new URL(feature.scenario.steps[0].goto).host}${new URL(feature.scenario.steps[0].goto).pathname}, ${frame.atSec} seconds into the run${note ? `: ${note}` : ''}`.slice(0, 900) });
+ });
+ }
+ const lead = runs[0];
+ const cover = { path: `${dir}/cover.png`, alt: `${lead.feature.title}, a frame of the live run on ${new URL(lead.feature.scenario.steps[0].goto).host}` };
+ writeFileSync(resolve(root, cover.path), reelFrame({ root, path: lead.media.path, atSec: Math.max(0.5, (lead.proof.video.durationSec || 2) * 0.6) }));
+
+ // 3. Draft around the real blocks until the queue's Article gate passes.
+ const blocks = articleBlocks(partner, runs);
+ const tryIt = [...new Set([partner.page, ...runs.map(({ feature }) => feature.surface)])];
+ const brief = buildArticleBrief({ partner, runs, figures, blocks, partnersSection: partnersSection(partners), tryIt });
+ const bodyPath = `data/x-content/articles/${id}.md`;
+ let item = null;
+ const check = (draft) => {
+ const findings = [...articleSeriesFindings(partner, draft)];
+ const { body, findings: placed } = assembleArticle(draft.markdown, blocks, figures);
+ findings.push(...placed);
+ writeFileSync(resolve(root, bodyPath), body);
+ item = articleItemFor({ partner, runs, day, draft, body, cover, media: { ...lead.media, alt: `${lead.feature.title}, filmed live on production` } });
+ findings.push(...validateItem({ ...item, status: 'review' }, root, { quality: queue.quality || {} }));
+ return [...new Set(findings)];
+ };
+ const result = await draftArticle(brief, {
+ call: (request, { parse }) => callModelChain(request, { parse }),
+ check,
+ voice: readText('docs/announce-voice.md', 12000),
+ exemplar: readText('data/x-content/articles/keeper-article.md', 30000),
+ });
+ for (const attempt of result.attempts) {
+ for (const failure of attempt.fallbacks || []) console.log(` fell through: ${failure.split('\n')[0].slice(0, 160)}`);
+ console.log(` draft ${attempt.attempt} on ${attempt.model}: ${attempt.findings.length ? `${attempt.findings.length} finding(s): ${attempt.findings.slice(0, 3).join(' | ')}` : 'passes'}`);
+ }
+ if (!result.ok) return { id, ok: false, reason: `no draft passed the Article gate in ${result.attempts.length} attempts: ${result.findings.slice(0, 4).join('; ')}; the last draft is at ${bodyPath}` };
+ console.log(` title: ${result.draft.title}\n post: ${result.draft.post}\n body: ${bodyPath}`);
+ if (dryRun) return { id, ok: true, reason: `dry run: filmed and written to ${bodyPath}, nothing queued` };
+
+ // 4. Into the queue: review, and release by the Article policy.
+ const story = resolve(root, STORY_DIR, `${id}.json`);
+ mkdirSync(dirname(story), { recursive: true });
+ writeFileSync(story, `${JSON.stringify(item, null, '\t')}\n`);
+ const cli = (...rest) => spawnSync(process.execPath, [resolve(root, 'scripts/x-content.mjs'), ...rest], { cwd: root, stdio: 'inherit' });
+ if (cli('adopt', id).status !== 0) return { id, ok: false, reason: 'the queue refused the story' };
+ cli('advance', id, ...(ship ? ['--ship'] : []));
+ return { id, ok: true, status: loadQueue(root).items.find((row) => row.id === id)?.status || 'missing' };
+}
+
+// Writes the partner Article when one is due inside the stock window. Returns
+// null when none is due.
+async function articleIfDue({ days, force = false, partnerId = null }) {
+ const queue = loadQueue(root);
+ const rows = partnerArticles(allItems(queue));
+ const stocked = rows.filter((row) => row.day >= today() && ['draft', 'review', 'approved'].includes(row.status));
+ const day = nextArticleDay(rows, Date.now());
+ const horizon = new Date(Date.now() + days * DAY).toISOString().slice(0, 10);
+ if (!force && (stocked.length || day > horizon)) {
+ console.log(`x-partners: the next partner Article is due ${day}${stocked.length ? `; ${stocked[0].id} is already in stock` : ''}`);
+ return null;
+ }
+ const { partners } = registry();
+ const dryRun = has('dry-run');
+ const ship = has('ship') && !dryRun;
+ const exclude = [];
+ for (let attempt = 0; attempt < partners.length; attempt++) {
+ const partner = partnerId ? partners.find((row) => row.id === partnerId) || fail(`x-partners: no partner ${partnerId} in the registry`) : pickArticlePartner(partners, rows, { exclude });
+ if (!partner) break;
+ let outcome;
+ try {
+ outcome = await writeArticle({ partner, partners, queue, day, dryRun, ship });
+ } catch (err) {
+ outcome = { id: articleId(partner, day), ok: false, reason: String(err.message || err).split('\n')[0] };
+ }
+ console.log(`${outcome.id}: ${outcome.ok ? outcome.status || outcome.reason : `FAILED: ${outcome.reason}`}`);
+ if (outcome.ok || partnerId) return outcome;
+ exclude.push(partner.id);
+ }
+ return { ok: false };
+}
+
+async function article() {
+ const problem = await browserProblem();
+ if (problem) fail(`x-partners: ${problem}. Nothing was filmed.`);
+ hydrateModelEnv();
+ const outcome = await articleIfDue({ days: 0, force: true, partnerId: option('partner') });
+ if (!outcome?.ok) process.exitCode = 1;
+}
+
+const commands = { check, plan, daily, one, article };
if (!commands[command]) fail(`x-partners: unknown command ${command}. Commands: ${Object.keys(commands).join(', ')}`);
try {
await commands[command]();
diff --git a/tests/x-content-partners.test.js b/tests/x-content-partners.test.js
index 4619a8235..31148a199 100644
--- a/tests/x-content-partners.test.js
+++ b/tests/x-content-partners.test.js
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vitest';
-import { buildBrief, claimsFor, draftFindings, draftSpotlight, itemFor, nextDay, parseDraft, partnerProblems, pickNext, seriesFindings, spotlights } from '../api/_lib/x-content/partners.js';
+import { articleBlocks, articleClaims, articleFacts, articleItemFor, articleSeriesFindings, assembleArticle, buildArticleBrief, draftArticle, nextArticleDay, parseArticle, partnerArticles, pickArticlePartner, buildBrief, claimsFor, draftFindings, draftSpotlight, itemFor, nextDay, parseDraft, partnerProblems, pickNext, seriesFindings, spotlights } from '../api/_lib/x-content/partners.js';
import { validateItem } from '../api/_lib/x-content/queue.js';
const scenario = { format: 'square', steps: [{ goto: 'https://three.ws/openai', caption: 'Eleven keyless 3D tools' }, { expect: 'Connect' }, { hold: 3000 }] };
@@ -168,3 +168,100 @@ describe('drafting', () => {
expect(() => parseDraft('no')).toThrow(/no JSON/);
});
});
+
+describe('the weekly Article', () => {
+ const proven = { ...openai.features[0], facts: [...openai.features[0].facts, { says: 'the run counted the tools', evidence: [{ type: 'proof', fact: 'tools', min: 10 }] }] };
+ const runs = [
+ { feature: proven, proof: { facts: { tools: '15' }, video: { durationSec: 12.4 } }, live: { url: 'https://three.ws/api/tools', json: true, body: '{\n "tools": 15\n}' } },
+ { feature: { ...proven, id: 'ar', title: 'AR in ChatGPT' }, proof: { facts: { hits: '9' }, video: { durationSec: 8 } }, live: null },
+ ];
+ const figures = [1, 2, 3, 4].map((n) => ({ path: `public/x-media/a/f${n}.jpg`, alt: `Frame ${n}` }));
+
+ it('is due a week after the last one, goes to the partner whose Article is oldest, and never counts a spotlight', () => {
+ const items = [
+ { id: 'a', kind: 'article', spotlight: { partner: 'openai', article: true }, notBefore: '2026-10-05T00:00:00Z', status: 'posted' },
+ { id: 'b', kind: 'post', series: 'partners', spotlight: { partner: 'nvidia', feature: 'gpu' }, notBefore: '2026-10-09T00:00:00Z', status: 'approved' },
+ ];
+ const rows = partnerArticles(items);
+ expect(rows.map((row) => row.id)).toEqual(['a']);
+ expect(nextArticleDay(rows, Date.parse('2026-10-08T10:00:00Z'))).toBe('2026-10-12');
+ expect(nextArticleDay(rows, Date.parse('2026-10-20T10:00:00Z'))).toBe('2026-10-20');
+ expect(nextArticleDay([], Date.parse('2026-10-08T10:00:00Z'))).toBe('2026-10-08');
+ expect(pickArticlePartner([openai, nvidia], rows).id).toBe('nvidia');
+ });
+
+ it('only lets the lead run speak for facts a run proved', () => {
+ expect(articleFacts(proven, { lead: true }).map((fact) => fact.says)).toContain('the run counted the tools');
+ expect(articleFacts(proven).map((fact) => fact.says)).not.toContain('the run counted the tools');
+ });
+
+ it('builds its code and tables from the registry and the runs', () => {
+ const blocks = articleBlocks(openai, runs);
+ expect(Object.keys(blocks).sort()).toEqual(['facts-ar', 'facts-studio', 'request-studio', 'runs', 'scenario-ar', 'scenario-studio']);
+ expect(blocks.runs).toMatch(/\| Free 3D tools inside ChatGPT \| three\.ws\/openai \| 12\.4 s \| tools = 15 \|/);
+ expect(blocks['facts-studio']).toMatch(/\| eleven keyless 3D tools \| three\.ws\/openai shows "eleven keyless 3D tools" \|/);
+ expect(blocks['facts-studio']).toMatch(/the run read tools = 15/);
+ expect(blocks['facts-ar']).not.toMatch(/the run counted/);
+ expect(blocks['request-studio']).toContain("curl -s 'https://three.ws/api/tools'");
+ const brief = buildArticleBrief({ partner: openai, runs, figures, blocks, partnersSection: ['OpenAI: Select'], tryIt: [openai.page] });
+ expect(brief.features[1].measured).toEqual({});
+ expect(brief.blocks.runs).toMatch(/^table:/);
+ });
+
+ it('places every block once and the figures by number, and names what is missing', () => {
+ const blocks = { runs: '| a |\n|---|', 'facts-x': '| b |\n|---|' };
+ const markdown = 'Intro.\n\n{{block:runs}}\n\n{{figure:1}}\n{{figure:2}}\n\n{{block:runs}}\n\n{{block:nope}}\n\nInline {{figure:3}} here.';
+ const { body, findings } = assembleArticle(markdown, blocks, figures);
+ expect(body).toContain('![Frame 1](/x-media/a/f1.jpg)');
+ expect(body.match(/\| a \|/g)).toHaveLength(1);
+ expect(findings.join('\n')).toMatch(/block:facts-x\}\} is missing/);
+ expect(findings.join('\n')).toMatch(/block:runs\}\} is placed 2 times/);
+ expect(findings.join('\n')).toMatch(/block:nope\}\} is not in brief\.blocks/);
+ expect(findings.join('\n')).toMatch(/2 figures are placed; place at least 4/);
+ expect(findings.join('\n')).toMatch(/not on a line of its own/);
+ });
+
+ it('reads the TITLE / POST / body shape and refuses anything else', () => {
+ const words = Array.from({ length: 220 }, () => 'word').join(' ');
+ expect(parseArticle(`TITLE: A title\nPOST: The post\n---\n${words}`)).toEqual({ title: 'A title', post: 'The post', markdown: words });
+ expect(() => parseArticle('{"post":"x"}')).toThrow(/TITLE \/ POST/);
+ });
+
+ it('holds the prose to the series rules and builds claims for the whole Article', () => {
+ const draft = { title: 'How three.ws built for ChatGPT', post: 'A post.', markdown: 'We are an official OpenAI partner, thanks @OpenAI.' };
+ const findings = articleSeriesFindings(openai, draft).join('\n');
+ expect(findings).toMatch(/"OpenAI Select Partner", word for word/);
+ expect(findings).toMatch(/"official OpenAI" overstates/);
+ expect(findings).toMatch(/tags no one/);
+ expect(findings).toMatch(/title must name OpenAI/);
+ expect(findings).toMatch(/link the partner page three\.ws\/openai/);
+ const texts = ['We are an OpenAI Select Partner. It runs inside ChatGPT, the run counted the tools, 15 of them, with no sign-up. The other run counted the tools too.'];
+ const claims = articleClaims(openai, runs, texts);
+ expect(claims.map((claim) => claim.says)).toEqual(['OpenAI Select Partner', 'runs inside ChatGPT', 'no sign-up', 'the run counted the tools', '15']);
+ });
+
+ it('becomes an Article item quoted by one post that carries the lead reel', () => {
+ const draft = { title: 'T', post: 'P', markdown: 'M' };
+ const item = articleItemFor({ partner: openai, runs, day: '2026-10-18', draft, body: 'B', cover: { path: 'public/x-media/a/cover.png', alt: 'c' }, media: { path: 'public/x-media/a/reel.mp4' } });
+ expect(item).toMatchObject({ id: 'partner-openai-article-20261018', kind: 'article', tier: 1, spotlight: { partner: 'openai', article: true, features: ['studio', 'ar'] }, article: { title: 'T', body: 'data/x-content/articles/partner-openai-article-20261018.md' }, scenario: proven.scenario });
+ expect(item.series).toBeUndefined();
+ expect(item.posts[0].media[0].path).toBe('public/x-media/a/reel.mp4');
+ });
+
+ it('feeds the gate back until a draft passes', async () => {
+ const words = Array.from({ length: 220 }, () => 'word').join(' ');
+ const replies = [`TITLE: one\nPOST: p\n---\n${words}`, `TITLE: two\nPOST: p\n---\n${words}`];
+ const requests = [];
+ const result = await draftArticle({ partner: { guidance: 'g' } }, {
+ call: async (request, { parse }) => {
+ requests.push(request);
+ return { value: parse(replies.shift()), model: 'stand-in' };
+ },
+ check: (draft) => (draft.title === 'one' ? ['article title is 3 characters'] : []),
+ });
+ expect(result.ok).toBe(true);
+ expect(result.attempts).toHaveLength(2);
+ expect(requests[1].parts[0].text).toMatch(/article title is 3 characters/);
+ expect(requests[0].system).toMatch(/The partners behind/);
+ });
+});