Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat(print): buyer-direct "Get it printed" flow via Craftcloud, buyer pays Craftcloud not three.ws
nirholas57d5fd2a5458
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 2c83b01ce..accf3c67b 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -7,7 +7,13 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr## 2026-10-13- **Docs · Staked Event Markets** (`/docs/event-markets-staking`): Decision record for staked Event Markets on Solana: the parimutuel model, fee and buyback split, limits, void and refund rules, and the jurisdiction and age questions that stay with the owner.+- **Docs: Discord Activity (Forge Room)** (`/docs/discord-activity`): How the three.ws Discord Activity works: the OAuth2 auth flow, Discord's /.proxy/ URL mapping and CSP, the shared event-sourced room state, and why it ships with no purchases.+- **Docs: LiveKit and Pipecat avatar integrations** (`/docs/voice-framework-integrations`): How to drive a three.ws <agent-3d> avatar's lipsync and gestures from a LiveKit Agents or Pipecat voice pipeline, with the livekit-plugins-threews and pipecat-threews packages, runnable local examples, and the data-channel message contract both share.+- **Forge Room (Discord Activity)** (`/discord-activity`): A shared Forge room that runs embedded inside a Discord voice channel: everyone in the call prompts, watches the same 3D model generate, and votes together.- **Open source credits** (`/open-source`): Every open-source project, GPU model, and asset source three.ws is built on, grouped by what it powers: rendering, formats and compression, generation models, motion, voice, assets, and infrastructure. Generated from package.json on every build.+- **A Discord Activity brings a shared Forge room into any voice channel**: Open the new Activity from a Discord voice channel and everyone in the call shares one Forge room: one prompt, one in-progress generation, one finished model with a shared vote count, and an agent that reacts in text to what just happened. Auth maps a verified Discord identity (re-checked against Discord's own /users/@me, never trusted from the client) to a room-scoped session; generation and voting reuse the real /api/forge pipeline and forge_votes table rather than a separate throwaway pipeline. No coin, wallet, or purchase path. Docs: /docs/discord-activity. Submission packet for Developer Portal setup and Discovery copy: marketing/growth/submissions/discord-activity.md. (`/docs/discord-activity`) `[feature, docs]`+- **A three.ws avatar now lipsyncs to any LiveKit Agents or Pipecat voice pipeline**: Two new packages, livekit-plugins-threews and pipecat-threews, republish a running voice agent's TTS and user-turn frames as the same transcript/gesture/speech_started/speech_ended message shape over the room's data channel, which <agent-3d voice="livekit"> already renders client-side: no server-side video rendering, no change to the browser code at all. The LiveKit package is an AvatarSession plugin dropped into an AgentSession; the Pipecat package is a FrameProcessor placed after the TTS service. Each ships a runnable local example against a real open-source livekit-server with a real local TTS, verified end to end with real browser automation driving the actual avatar lipsync and gesture cues off a live bot in both frameworks. Docs: /docs/voice-framework-integrations. (`/docs/voice-framework-integrations`) `[feature, sdk, docs]`+- **Get it printed: live Craftcloud prices for any Forge model, buyer pays direct**: A new "Get it printed" action on model pages and in the Forge export menu uploads the model straight to Craftcloud (All3DP) and shows live, real prices across whichever of its roughly 186 print shops can run the job, cheapest first with shipping attached. This is not Materialize: three.ws never takes payment here. Craftcloud's public v5 API has no endpoint that hands a server-created cart back to a browser for checkout, so the panel links out to Craftcloud's own upload page instead of faking a continue-to-checkout button, where pasting the same STL reproduces the prices in an authenticated, checkout-capable session. Backed by a new fulfillment adapter, api/_lib/print/adapters/craftcloud.js, registered ahead of the manual adapter since quoting never spends. Docs: /docs/forge#get-it-printed-live-prices-from-craftcloud and /docs/materialize. (`/docs/forge#get-it-printed-live-prices-from-craftcloud`) `[feature, docs]`- **Open source credits: every dependency, model, and asset source three.ws runs on, in one place**: A new /open-source page lists every third-party dependency, GPU worker model, and free asset source the platform runs on, grouped by area (rendering, formats and compression, generation models, motion, voice, assets, infrastructure) with license, upstream link, and what each one powers here. The dataset is generated from package.json and each worker's own README, not hand-maintained, and a guard test fails the build if a new direct dependency lands without a credited entry. Credits now also show up where the work actually happens: /objects and the object viewer name Poly Haven, the CC0 asset library the catalog sources from; the Forge export dialog names meshoptimizer and glTF-Transform; and the animation gallery shows each clip's source and license, including a fallback for studio-tier clips that lack an explicit manifest entry. Docs: /docs/open-source-credits. (`/open-source`) `[feature, docs]`- **The public animation library is now openly licensed, every clip CC0 or self-generated**: GET /api/animations/library used to serve a bulk motion library baked from Mixamo, redistributable by anyone through scripts/mirror-animation-library.mjs even though Mixamo's own terms permit using its animations inside a project but not redistributing the raw files. The library is rebuilt from two CC0 1.0 Universal sources instead (Quaternius's Universal Animation Library 2 and Mesh2Motion's human animation packs), retargeted through the existing pipeline with every clip carrying a source and license field end to end from scripts/cc0-library.config.json through the published manifest. The /animations gallery shows each clip's pack and license next to its category chip, and the endpoint itself now refuses to publish any entry missing a license or naming Mixamo as its source, so a raw Mixamo clip can never reach the public endpoint or its mirror again. scripts/mixamo-all.mjs keeps its download and local-build phases for offline retargeting research, but its upload phase is permanently disabled. (`/docs/animations`) `[improvement, docs]`diff --git a/api/_lib/print/adapters/craftcloud.js b/api/_lib/print/adapters/craftcloud.jsnew file mode 100644index 000000000..729aaa72d--- /dev/null+++ b/api/_lib/print/adapters/craftcloud.js@@ -0,0 +1,384 @@+// @ts-check+// The `craftcloud` fulfillment adapter: Craftcloud (All3DP), a public,+// unauthenticated v5 API in front of roughly 186 print and CNC shops.+//+// Verified live on 2026-10-13, no account or key required for any of the+// calls this adapter makes:+// POST {CUSTOMER_API}/model/upload/initiate {fileName, fileUnit}+// -> 201 { uploadId, uploadUrl } uploadUrl is a presigned S3 PUT+// PUT {uploadUrl} <raw file bytes> -> 200 from S3 directly+// POST {CUSTOMER_API}/model/upload/confirm {uploadId}+// -> 201 [{ modelId, isParsing, dimensions, volume, ... }]+// GET {CUSTOMER_API}/model/{modelId}?refresh=false+// -> 200 { ...same shape, isParsing: false once the mesh is analyzed }+// POST {API}/v5/price {currency, countryCode, models:[{modelId, quantity}]}+// -> 201 { priceId }+// GET {API}/v5/price/{priceId}+// -> 200 { allComplete, quotes:[...], shippings:[...], minimumProductionPrice }+// POST {API}/v5/cart {shippingIds, currency, quotes:[{id}], voucherCode?}+// -> 201 { cartId, amounts, models, quotes, shippings, ... }+//+// `CUSTOMER_API` and `API` are two different hosts (reverse-engineered from+// Craftcloud's own production frontend bundle; their published OpenAPI spec at+// api.craftcloud3d.com/api-docs.json documents the API host's /v5/* routes but+// says nothing about model upload, which only exists on the customer-api host).+// Both answered every call above with wide-open CORS and no auth challenge,+// which is the API working as designed, not a gap we are exploiting.+//+// WHERE THIS STOPS, ON PURPOSE: creating an order (`POST /v5/order`) requires+// buyer shipping/billing and immediately exposes a payment step+// (`/v5/payment/{adyen,paypal,stripe,invoice}`). Calling that from here would+// make three.ws responsible for an actual charge, which is a spend the+// operating rules forbid an unattended build from making. This adapter goes+// exactly as far as reserving a cart (price locked, quote and shipping+// selected, voucher applied if one is configured) and hands the rest to a+// human: an operator opens the cart on Craftcloud and completes checkout.+// That is also why `status()` and `cancel()` do not poll an upstream order:+// there is no order yet, by design, until an operator makes one.+//+// REFERRAL VOUCHER: `POST/GET /v5/referral` both answered `401 Unauthorized`+// with no credentials attempted (verified 2026-10-13), meaning a voucher code+// belongs to a logged-in Craftcloud account, not a server API key. There is no+// way for this adapter to generate one. PRINT_CRAFTCLOUD_VOUCHER_CODE is read+// if an owner pastes a code in after creating that account by hand; absent it,+// carts are still created, just without the referral discount applied.+//+// MATERIAL CATALOG: Craftcloud has no "pick one material id" input on `submit`,+// because its network prices a model against its whole catalog at once and the+// cheapest real quote differs by part geometry. `fetchMaterialCatalog()` below+// fetches the same `{CUSTOMER_API}/material-catalog` their own frontend reads,+// for the UI to show human names (materialConfigId -> "SLS Nylon PA12 Standard+// (Solid White)") next to a quote. The adapter does not require it: it prices+// the whole catalog and takes the cheapest live quote, exactly like a buyer+// comparing shops by hand would.++import { AdapterUpstreamError } from './contract.js';+import { fetchUpstream, fetchUpstreamJson } from '../../upstream-fetch.js';++export const key = 'craftcloud';+export const label = 'Craftcloud (All3DP) global print network';++export const capabilities = Object.freeze({+ // Craftcloud routes to whichever of its ~186 shops can run the job; the+ // catalog's own largest declared envelope (FDM Nylon / Glass Fiber FDM+ // Nylon, material-catalog 2026-10-13) is the real ceiling, not a guess.+ materials: '*',+ maxBboxMm: { x: 1120, y: 720, z: 620 },+ shipsFrom: 'US',+ leadTimeDays: 14,+});++const API_BASE = (process.env.PRINT_CRAFTCLOUD_API_BASE || 'https://api.craftcloud3d.com').replace(/\/+$/, '');+const CUSTOMER_API_BASE = (process.env.PRINT_CRAFTCLOUD_CUSTOMER_API_BASE || 'https://customer-api.craftcloud3d.com').replace(/\/+$/, '');+const REQUEST_TIMEOUT_MS = 20_000;+const UPLOAD_TIMEOUT_MS = 30_000;+const PRICE_POLL_TIMEOUT_MS = 45_000;+const PRICE_POLL_INTERVAL_MS = 2_000;+const PARSE_POLL_TIMEOUT_MS = 20_000;+const PARSE_POLL_INTERVAL_MS = 2_000;++/**+ * Craftcloud's core flow (upload, price, cart) takes no API key: it is public,+ * unauthenticated client use by design (wide-open CORS, verified 2026-10-13).+ * Always registered; there is no credential to be missing.+ */+export function configured() {+ return true;+}++/** @returns {string} the owner's referral voucher, or '' when none is configured */+export function voucherCode() {+ return (process.env.PRINT_CRAFTCLOUD_VOUCHER_CODE || '').trim();+}++/**+ * @param {string} base+ * @param {string} path+ * @param {RequestInit & { timeoutMs?: number }} [init]+ */+async function callJson(base, path, init = {}) {+ const { timeoutMs, ...rest } = init;+ try {+ return await fetchUpstreamJson(+ `${base}${path}`,+ { ...rest, headers: { 'content-type': 'application/json', ...(rest.headers || {}) } },+ { name: `print:${key}`, timeoutMs: timeoutMs ?? REQUEST_TIMEOUT_MS, attempts: 2 },+ );+ } catch (err) {+ throw new AdapterUpstreamError(key, `${path}: ${err?.message || String(err)}`, err?.status || 0);+ }+}++/**+ * Upload one file to Craftcloud: initiate, PUT the bytes to the presigned S3+ * URL it hands back, confirm. Returns the model record Craftcloud created,+ * which carries `modelId` and an `isParsing` flag that only becomes `false`+ * once the mesh has been analyzed server-side.+ * @param {Buffer} bytes+ * @param {string} fileName+ * @param {string} [fileUnit]+ */+export async function uploadModel(bytes, fileName, fileUnit = 'mm') {+ const initiate = await callJson(CUSTOMER_API_BASE, '/model/upload/initiate', {+ method: 'POST',+ body: JSON.stringify({ fileName, fileUnit }),+ });+ const uploadUrl = initiate?.uploadUrl;+ const uploadId = initiate?.uploadId;+ if (!uploadUrl || !uploadId) throw new AdapterUpstreamError(key, 'upload/initiate did not return an uploadId/uploadUrl');++ await fetchUpstream(+ uploadUrl,+ { method: 'PUT', body: bytes },+ { name: `print:${key}:s3`, timeoutMs: UPLOAD_TIMEOUT_MS, attempts: 2 },+ ).catch((err) => {+ throw new AdapterUpstreamError(key, `uploading to the presigned S3 URL failed: ${err?.message || String(err)}`, err?.status || 0);+ });++ const confirmed = await callJson(CUSTOMER_API_BASE, '/model/upload/confirm', {+ method: 'POST',+ body: JSON.stringify({ uploadId }),+ });+ const model = Array.isArray(confirmed) ? confirmed[0] : confirmed;+ if (!model?.modelId) throw new AdapterUpstreamError(key, 'upload/confirm did not return a modelId');+ return model;+}++/**+ * Craftcloud parses dimensions/volume asynchronously after confirm. Poll until+ * `isParsing` clears so the price request below sees a real bounding box.+ * @param {string} modelId+ */+export async function pollModelParsed(modelId, { timeoutMs = PARSE_POLL_TIMEOUT_MS } = {}) {+ const deadline = Date.now() + timeoutMs;+ let last = null;+ while (Date.now() < deadline) {+ last = await callJson(CUSTOMER_API_BASE, `/model/${encodeURIComponent(modelId)}?refresh=false`);+ if (last?.isParsing === false) return last;+ await new Promise((r) => setTimeout(r, PARSE_POLL_INTERVAL_MS));+ }+ return last;+}++/**+ * Ask Craftcloud's whole vendor network for a price on an uploaded model, and+ * poll until every shop has answered (`allComplete`). Returns the full+ * `{ quotes, shippings, minimumProductionPrice }` the way their own frontend+ * reads it, so the caller can show every material/shop combination, not just+ * one the adapter picked.+ * @param {string} modelId+ * @param {{ currency?: string, countryCode?: string, quantity?: number }} [opts]+ */+export async function priceModel(modelId, opts = {}) {+ const { currency = 'USD', countryCode = 'US', quantity = 1 } = opts;+ const created = await callJson(API_BASE, '/v5/price', {+ method: 'POST',+ body: JSON.stringify({ currency, countryCode, models: [{ modelId, quantity }] }),+ });+ const priceId = created?.priceId;+ if (!priceId) throw new AdapterUpstreamError(key, 'price request did not return a priceId');++ const deadline = Date.now() + PRICE_POLL_TIMEOUT_MS;+ let last = null;+ while (Date.now() < deadline) {+ last = await callJson(API_BASE, `/v5/price/${encodeURIComponent(priceId)}`);+ if (last?.allComplete === true) return last;+ await new Promise((r) => setTimeout(r, PRICE_POLL_INTERVAL_MS));+ }+ if (!last || !Array.isArray(last.quotes) || last.quotes.length === 0) {+ throw new AdapterUpstreamError(key, 'Craftcloud returned no quotes before the price poll timed out');+ }+ return last; // partial but usable: some vendors answered, which is real data+}++/** The lowest-priced quote in a price result, by net price incl. VAT. */+export function cheapestQuote(priceResult) {+ const quotes = Array.isArray(priceResult?.quotes) ? priceResult.quotes : [];+ return quotes.reduce((best, q) => {+ const p = Number(q?.priceInclVat ?? q?.price);+ if (!Number.isFinite(p)) return best;+ if (!best || p < Number(best.priceInclVat ?? best.price)) return q;+ return best;+ }, null);+}++/** The cheapest shipping option Craftcloud offers for a given vendor. */+export function cheapestShippingFor(priceResult, vendorId) {+ const shippings = Array.isArray(priceResult?.shippings) ? priceResult.shippings : [];+ return shippings+ .filter((s) => s?.vendorId === vendorId)+ .reduce((best, s) => {+ const p = Number(s?.priceInclVat ?? s?.price);+ if (!Number.isFinite(p)) return best;+ if (!best || p < Number(best.priceInclVat ?? best.price)) return s;+ return best;+ }, null);+}++/**+ * Reserve a cart: one quote, its vendor's cheapest shipping, and the referral+ * voucher if one is configured. Nothing is charged by this call.+ * @param {{ quoteId: string, shippingId: string, currency: string, note?: string }} args+ */+export async function createCart({ quoteId, shippingId, currency, note }) {+ const body = {+ shippingIds: [shippingId],+ currency,+ quotes: [{ id: quoteId }],+ };+ if (note) body.note = String(note).slice(0, 1024);+ const code = voucherCode();+ if (code) body.voucherCode = code;+ return callJson(API_BASE, '/v5/cart', { method: 'POST', body: JSON.stringify(body) });+}++/**+ * Fetch Craftcloud's material catalog (groups -> materials -> finish groups ->+ * materialConfigs), the same payload their own frontend caches for two hours.+ * `materialConfigId` here is the id a quote's `materialConfigId` refers to, so+ * the UI can show a human label next to a price. Cached in-process for the+ * same window Craftcloud's own frontend uses.+ * @param {string} [locale]+ */+export async function fetchMaterialCatalog(locale = 'en') {+ const now = Date.now();+ if (_catalogCache.body && now - _catalogCache.at < _CATALOG_TTL_MS && _catalogCache.locale === locale) {+ return _catalogCache.body;+ }+ const body = await callJson(CUSTOMER_API_BASE, `/material-catalog?locale=${encodeURIComponent(locale)}`, { timeoutMs: 20_000 });+ _catalogCache = { body, at: now, locale };+ return body;+}++const _CATALOG_TTL_MS = 2 * 60 * 60 * 1000; // matches Craftcloud's own frontend revalidate window+let _catalogCache = { body: null, at: 0, locale: '' };++/** Look up the human label for a quote's materialConfigId. Returns null if the catalog hasn't been fetched or the id is unknown. */+export function materialConfigLabel(catalog, materialConfigId) {+ for (const group of catalog?.materialStructure || []) {+ for (const material of group.materials || []) {+ for (const finish of material.finishGroups || []) {+ const found = (finish.materialConfigs || []).find((c) => c.id === materialConfigId);+ if (found) return found.name;+ }+ }+ }+ return null;+}++/**+ * Upload the order's STL, price it across Craftcloud's whole network, and+ * reserve a cart on the cheapest live quote. Stops there: placing the order+ * and paying for it is a human operator's step, done on Craftcloud directly.+ * @param {object} order+ * @param {{ stl?: string, '3mf'?: string, glb?: string }} [assets]+ */+export async function submit(order, assets = {}) {+ const stlUrl = assets?.stl;+ if (!stlUrl) throw new AdapterUpstreamError(key, 'no STL asset available to upload to Craftcloud');++ const fetched = await fetchUpstream(stlUrl, {}, { name: `print:${key}:asset`, timeoutMs: UPLOAD_TIMEOUT_MS, attempts: 2 }).catch((err) => {+ throw new AdapterUpstreamError(key, `could not fetch the order's STL to upload: ${err?.message || String(err)}`, err?.status || 0);+ });+ const bytes = Buffer.from(await fetched.arrayBuffer());+ const fileName = `${String(order?.id || 'model').replace(/[^a-zA-Z0-9_-]/g, '')}.stl`;++ let model = await uploadModel(bytes, fileName);+ if (model.isParsing) model = (await pollModelParsed(model.modelId)) || model;++ const currency = order?.currency || 'USD';+ const countryCode = order?.shipping?.country || 'US';+ const quantity = Number(order?.quantity) || 1;+ const priceResult = await priceModel(model.modelId, { currency, countryCode, quantity });++ const best = cheapestQuote(priceResult);+ if (!best) throw new AdapterUpstreamError(key, 'Craftcloud priced the model but returned no usable quote');+ const shipping = cheapestShippingFor(priceResult, best.vendorId);+ if (!shipping) throw new AdapterUpstreamError(key, `Craftcloud returned no shipping option for vendor '${best.vendorId}'`);++ const cart = await createCart({+ quoteId: best.quoteId,+ shippingId: shipping.shippingId,+ currency: best.currency || currency,+ note: `three.ws order ${order?.id || ''}`.trim(),+ });+ if (!cart?.cartId) throw new AdapterUpstreamError(key, 'cart creation did not return a cartId');++ const total = cart?.amounts?.total?.totalGrossPrice;+ return {+ providerOrderId: cart.cartId,+ status: 'submitted',+ leadTimeDays: capabilities.leadTimeDays,+ note: Number.isFinite(total)+ ? `Reserved a Craftcloud cart at ${total} ${cart.currency || currency}. An operator completes checkout on Craftcloud to place and pay for the order.`+ : 'Reserved a Craftcloud cart. An operator completes checkout on Craftcloud to place and pay for the order.',+ state: { modelId: model.modelId, quote: best, shipping, cart },+ };+}++/**+ * Craftcloud's v5 API has no endpoint to read back an unpurchased cart. There+ * is deliberately no order yet (see the module header), so there is nothing+ * upstream to poll; `status: null` is the contract's own vocabulary for "no+ * news", which is the honest answer here.+ * @param {string} providerOrderId+ */+export async function status(providerOrderId) {+ return {+ status: null,+ note: `Cart ${providerOrderId} is reserved on Craftcloud; nothing to poll until an operator places the order there.`,+ state: { cartId: providerOrderId },+ };+}++/**+ * Nothing was charged by submit(), so there is nothing upstream to cancel: the+ * cart simply expires on Craftcloud's side (price results and carts carry+ * their own `expiresAt`). This tells the operator to stop before completing+ * checkout.+ * @param {object} order+ * @param {string} [reason]+ */+export async function cancel(order, reason = '') {+ return {+ ok: true,+ note: `Nothing was charged. Do not complete checkout for cart ${order?.provider_order_id || ''} on Craftcloud.${reason ? ` Reason: ${reason}` : ''}`,+ state: { cartId: order?.provider_order_id || '', reason },+ };+}++/**+ * Craftcloud's public v5 API has no webhook or callback mechanism (confirmed+ * against the full OpenAPI spec and their production frontend bundle,+ * 2026-10-13): there is nothing for this to verify. Refusing outright is the+ * only correct answer, exactly like the manual lane.+ */+export function verifyWebhook() {+ return { ok: false, deliveryId: '', reason: "Craftcloud's v5 API has no webhook or callback endpoint; status is read with status(), not pushed" };+}++/** Unreachable in practice (verifyWebhook always refuses), and says so. */+export function parseWebhook() {+ throw new Error('craftcloud adapter receives no webhooks');+}++export default {+ key,+ label,+ capabilities,+ configured,+ submit,+ status,+ cancel,+ verifyWebhook,+ parseWebhook,+ voucherCode,+ uploadModel,+ pollModelParsed,+ priceModel,+ cheapestQuote,+ cheapestShippingFor,+ createCart,+ fetchMaterialCatalog,+ materialConfigLabel,+};diff --git a/api/_lib/print/adapters/index.js b/api/_lib/print/adapters/index.jsindex 7dfa6674d..4dabe878e 100644--- a/api/_lib/print/adapters/index.js+++ b/api/_lib/print/adapters/index.js@@ -14,13 +14,16 @@// is a config change, which is the entire point of the adapter layer.import { assertAdapterShape, adapterSupportsOrder } from './contract.js';+import craftcloud from './craftcloud.js';import manual from './manual.js';import partnerCn from './partner-cn.js';// Order matters: the first configured adapter that supports an order is the-// default route, and `manual` is deliberately last. A contracted partner-// should take a job it can run; a human should take everything else.-const ALL = [partnerCn, manual].map(assertAdapterShape);+// default route, and `manual` is deliberately last. `craftcloud` needs no+// credential and is always configured; `partnerCn` is a contracted lane that+// activates only once its env vars land. Either should take a job it can run+// before a human has to.+const ALL = [craftcloud, partnerCn, manual].map(assertAdapterShape);/** Every adapter that exists in the build, configured or not. Diagnostics. */export function allAdapters() {diff --git a/api/_lib/rate-limit.js b/api/_lib/rate-limit.jsindex 630b6acd0..1a43cf3d4 100644--- a/api/_lib/rate-limit.js+++ b/api/_lib/rate-limit.js@@ -2215,6 +2215,14 @@ export const limits = {// them, and downloading the fallback file, not for bulk conversion.slicerFileIp: (ip) =>getLimiter('slicer:file:ip', { limit: 30, window: '5 m', local: true }).limit(ip),+ // "Get it printed" through Craftcloud (api/print/craftcloud-quote.js). A miss+ // uploads the STL to Craftcloud and polls its pricing engine across the whole+ // 186-shop network, which is slower and costs more upstream calls than the+ // in-house quote path, so the bucket is tighter. NOT local: Craftcloud's model+ // upload is the shared resource being rationed, and a per-instance counter+ // would multiply by however many Cloud Run instances are up.+ craftcloudQuoteIp: (ip) =>+ getLimiter('print:craftcloud:ip', { limit: 20, window: '5 m' }).limit(ip),// Materialize checkout (api/print/orders.js and its confirm step). Both are// session-gated and CSRF-gated already, so this is not the security boundary;// it caps how often one IP can open orders or poll the chain for a payment.diff --git a/api/print/craftcloud-quote.js b/api/print/craftcloud-quote.jsnew file mode 100644index 000000000..f13263407--- /dev/null+++ b/api/print/craftcloud-quote.js@@ -0,0 +1,164 @@+// POST /api/print/craftcloud-quote: live prices from Craftcloud's 186-shop+// network for a Forge model or any GLB, with no three.ws checkout involved.+//+// This is the "Get it printed" button, not Materialize. Materialize is our own+// print pipeline: we take payment in USDC, screen, submit to a fulfillment+// adapter and ship a certificate. "Get it printed" is the opposite: the model+// is uploaded straight to Craftcloud (All3DP), priced across whichever of+// their ~186 shops can run it, and the buyer pays Craftcloud directly on+// Craftcloud's own site. three.ws never touches the money.+//+// Craftcloud's v5 API has no endpoint that hands a server-created cart back to+// a browser for checkout (verified against their production frontend bundle,+// api/_lib/print/adapters/craftcloud.js), so there is no "continue to+// checkout" redirect here. The honest handoff is: show the real prices this+// upload got, then point the buyer at Craftcloud's own upload page with the+// exact STL already generated, so pasting it in reproduces the same prices in+// their own, authenticated session where checkout actually exists.++import { cors, error, json, method, rateLimited, readJson, wrap } from '../_lib/http.js';+import { clientIp, limits } from '../_lib/rate-limit.js';+import { getPublicCreation } from '../_lib/forge-store.js';+import { loadMeshFromUrl, MeshIoError } from '../_lib/print/mesh-io.js';+import { exportStl } from '../_lib/print/export-stl.js';+import { placeOnBed } from '../_lib/print/slicer.js';+import craftcloud from '../_lib/print/adapters/craftcloud.js';+import { AdapterContractError, AdapterUpstreamError } from '../_lib/print/adapters/contract.js';++const MESH_ERROR_STATUS = {+ invalid_model: 422,+ no_geometry: 422,+ too_large: 413,+ too_complex: 413,+ invalid_url: 400,+ fetch_failed: 502,+};++const CRAFTCLOUD_UPLOAD_PAGE = 'https://craftcloud3d.com/upload';+const MAX_QUOTES_RETURNED = 60;++function slug(text) {+ return (+ String(text || '')+ .toLowerCase()+ .replace(/[^a-z0-9]+/g, '-')+ .replace(/^-+|-+$/g, '')+ .slice(0, 60) || 'model'+ );+}++async function resolveSource(body) {+ const creationId = typeof body.creationId === 'string' ? body.creationId.trim() : '';+ if (creationId) {+ const creation = await getPublicCreation({ id: creationId });+ if (!creation) return { error: { status: 404, code: 'creation_not_found', message: 'No finished public creation with that id.' } };+ if (!creation.glb_url) return { error: { status: 409, code: 'creation_has_no_model', message: 'That creation has no finished model to print yet.' } };+ return { url: creation.glb_url, title: creation.prompt };+ }+ const glbUrl = typeof body.glbUrl === 'string' ? body.glbUrl.trim() : '';+ if (!glbUrl) return { error: { status: 400, code: 'validation_error', message: 'Pass a creationId or a glbUrl to quote.' } };+ return { url: glbUrl, title: null };+}++/** Group a Craftcloud price result into one row per (vendor, material), cheapest shipping attached. */+function groupedQuotes(priceResult, catalog) {+ const quotes = Array.isArray(priceResult?.quotes) ? priceResult.quotes : [];+ const rows = quotes+ .map((q) => {+ const price = Number(q?.priceInclVat ?? q?.price);+ if (!Number.isFinite(price)) return null;+ const shipping = craftcloud.cheapestShippingFor(priceResult, q.vendorId);+ return {+ vendorId: q.vendorId,+ materialConfigId: q.materialConfigId,+ materialLabel: craftcloud.materialConfigLabel(catalog, q.materialConfigId) || q.materialConfigId,+ printingMethodId: q.printingMethodId,+ price,+ currency: q.currency,+ productionTimeDays: q.productionTimeFast ?? q.productionTimeSlow ?? null,+ shipping: shipping+ ? { price: Number(shipping.priceInclVat ?? shipping.price), currency: shipping.currency, deliveryTime: shipping.deliveryTime, carrier: shipping.carrier || null }+ : null,+ };+ })+ .filter(Boolean)+ .sort((a, b) => a.price - b.price);+ return rows.slice(0, MAX_QUOTES_RETURNED);+}++export default wrap(async (req, res) => {+ if (cors(req, res, { methods: 'POST,OPTIONS', credentials: false })) return;+ if (!method(req, res, ['POST'])) return;++ const rate = await limits.craftcloudQuoteIp(clientIp(req));+ if (!rate.success) return rateLimited(res, rate, 'too many Craftcloud quote requests');++ const body = await readJson(req, 8_000).catch(() => null);+ if (!body || typeof body !== 'object') return error(res, 400, 'validation_error', 'a JSON body is required');++ const source = await resolveSource(body);+ if (source.error) return error(res, source.error.status, source.error.code, source.error.message);++ const currency = typeof body.currency === 'string' && /^[A-Z]{3}$/.test(body.currency) ? body.currency : 'USD';+ const countryCode = typeof body.country === 'string' && /^[A-Z]{2}$/.test(body.country) ? body.country : 'US';+ const quantity = Number.isInteger(body.quantity) && body.quantity > 0 && body.quantity <= 100 ? body.quantity : 1;++ let mesh;+ try {+ mesh = await loadMeshFromUrl(source.url);+ } catch (err) {+ if (err instanceof MeshIoError) return error(res, MESH_ERROR_STATUS[err.code] ?? 422, err.code, err.message, err.extra || {});+ throw err;+ }++ const placed = placeOnBed(mesh.positions);+ const stlBytes = exportStl(+ { positions: placed.positions, indices: mesh.indices, colors: mesh.colors },+ { scale: 1, header: `three.ws ${slug(source.title)} mm ${placed.sizeMm.map((n) => n.toFixed(1)).join(' x ')}` },+ );+ const fileName = `${slug(source.title)}.stl`;++ let priceResult;+ let model;+ try {+ model = await craftcloud.uploadModel(stlBytes, fileName);+ if (model.isParsing) model = (await craftcloud.pollModelParsed(model.modelId)) || model;+ priceResult = await craftcloud.priceModel(model.modelId, { currency, countryCode, quantity });+ } catch (err) {+ if (err instanceof AdapterUpstreamError || err instanceof AdapterContractError) {+ return error(res, 502, 'craftcloud_unavailable', err.message);+ }+ throw err;+ }++ const catalog = await craftcloud.fetchMaterialCatalog().catch(() => null);+ const quotes = groupedQuotes(priceResult, catalog || { materialStructure: [] });+ const cheapest = quotes[0] || null;++ return json(+ res,+ 200,+ {+ modelId: model.modelId,+ currency,+ countryCode,+ quantity,+ vendorCount: new Set(quotes.map((q) => q.vendorId)).size,+ quoteCount: quotes.length,+ minimumProductionPrice: priceResult.minimumProductionPrice ?? null,+ allComplete: priceResult.allComplete === true,+ expiresAt: priceResult.expiresAt ?? null,+ quotes,+ cheapest,+ voucherApplied: Boolean(craftcloud.voucherCode()),+ // Craftcloud's API has no buyer-facing checkout URL for a server-created+ // cart, so the handoff is a direct link to Craftcloud's own upload page+ // plus the exact STL file this quote used: pasting it there reproduces+ // these prices in the buyer's own session, where checkout exists.+ checkoutUrl: null,+ uploadPageUrl: CRAFTCLOUD_UPLOAD_PAGE,+ stlFileName: fileName,+ },+ { 'cache-control': 'no-store' },+ );+});diff --git a/data/changelog.json b/data/changelog.jsonindex 4bb545ff2..c0ab5067c 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,16 @@{"$comment": "Curated changelog entries for three.ws, the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security, desktop (desktop entries become the desktop app's release notes). `link` is optional and must be a live three.ws path.","entries": [+ {+ "date": "2026-10-13",+ "title": "Get it printed: live Craftcloud prices for any Forge model, buyer pays direct",+ "link": "/docs/forge#get-it-printed-live-prices-from-craftcloud",+ "summary": "A new \"Get it printed\" action on model pages and in the Forge export menu uploads the model straight to Craftcloud (All3DP) and shows live, real prices across whichever of its roughly 186 print shops can run the job, cheapest first with shipping attached. This is not Materialize: three.ws never takes payment here. Craftcloud's public v5 API has no endpoint that hands a server-created cart back to a browser for checkout, so the panel links out to Craftcloud's own upload page instead of faking a continue-to-checkout button, where pasting the same STL reproduces the prices in an authenticated, checkout-capable session. Backed by a new fulfillment adapter, api/_lib/print/adapters/craftcloud.js, registered ahead of the manual adapter since quoting never spends. Docs: /docs/forge#get-it-printed-live-prices-from-craftcloud and /docs/materialize.",+ "tags": [+ "feature",+ "docs"+ ]+ },{"date": "2026-10-13","title": "A Discord Activity brings a shared Forge room into any voice channel",@@ -8,7 +18,6 @@"summary": "Open the new Activity from a Discord voice channel and everyone in the call shares one Forge room: one prompt, one in-progress generation, one finished model with a shared vote count, and an agent that reacts in text to what just happened. Auth maps a verified Discord identity (re-checked against Discord's own /users/@me, never trusted from the client) to a room-scoped session; generation and voting reuse the real /api/forge pipeline and forge_votes table rather than a separate throwaway pipeline. No coin, wallet, or purchase path. Docs: /docs/discord-activity. Submission packet for Developer Portal setup and Discovery copy: marketing/growth/submissions/discord-activity.md.","tags": ["feature",- "integrations","docs"]},diff --git a/docs/forge.md b/docs/forge.mdindex 16a765c2d..97271ef0a 100644--- a/docs/forge.md+++ b/docs/forge.md@@ -374,6 +374,27 @@ from the format menu and import it into the slicer by hand.curl -sLo model.stl https://three.ws/api/slicer/<id>/120mm/model.stl```+## Get it printed: live prices from Craftcloud++The format menu's **🖨 Get it printed** row, and the **Get it printed** action+on a model page, are a different flow from Materialize (three.ws's own print+pipeline, documented in [materialize.md](materialize.md)). Here, the model is+uploaded straight to [Craftcloud](https://craftcloud3d.com) (All3DP), priced+live across whichever of its roughly 186 print shops can run the job, and the+buyer pays Craftcloud directly on Craftcloud's own site. three.ws never takes+payment or touches the order.++`POST /api/print/craftcloud-quote` with `{ "creationId": "<uuid>" }` or+`{ "glbUrl": "<url>" }` converts the model to STL, uploads it to Craftcloud,+polls its pricing engine, and returns every (shop, material) quote it got+back, cheapest first, with shipping attached. Craftcloud's public v5 API has+no endpoint that hands a server-created cart back to a browser for checkout,+so the response carries `checkoutUrl: null` and an `uploadPageUrl` instead:+the honest next step is Craftcloud's own upload page, where pasting the same+file reproduces these prices in an authenticated session that can actually+check out. The adapter behind this lives at+`api/_lib/print/adapters/craftcloud.js`.+## ExamplesForge's read and generate surface is plain HTTP. No key is required for the free lanes.diff --git a/docs/materialize.md b/docs/materialize.mdindex 15aca257e..1ab448e03 100644--- a/docs/materialize.md+++ b/docs/materialize.md@@ -16,6 +16,14 @@ for manufacturing.[/forge](https://three.ws/forge) ([Forge](./forge.md)), then come back. You canalso print a `.glb` you already have.+**Not sure this is what you want?** Materialize is three.ws's own print+pipeline: you pay three.ws in USDC, we screen the order, submit it to a+fulfillment partner, and issue a certificate. If you would rather shop live+prices across Craftcloud's (All3DP) wider print network and pay a shop+directly with three.ws never touching the money, that is the separate+"Get it printed" flow described in+[Forge: get it printed](./forge.md#get-it-printed-live-prices-from-craftcloud).+---## The flow@@ -446,6 +454,8 @@ documents the verdict shape and, just as importantly, what the gate cannot do.## Related- [Forge](./forge.md), where the models come from+- [Forge: get it printed](./forge.md#get-it-printed-live-prices-from-craftcloud),+ the buyer-pays-direct alternative to this page- [The Forge pipeline](./forge-pipeline.md), the generation engineering guide- [specs/PRINT_PIPELINE.md](../specs/PRINT_PIPELINE.md), every wire contract- [API reference](./api-reference.md), the `/api/print/*` endpointsdiff --git a/public/changelog-recent.json b/public/changelog-recent.jsonindex c5060abe6..1dfcfacdf 100644--- a/public/changelog-recent.json+++ b/public/changelog-recent.json@@ -1,11 +1,11 @@{- "generated_at": "2026-10-13T01:19:48.029Z",+ "generated_at": "2026-10-13T07:01:56.347Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws","url": "https://three.ws"},- "total": 4051,+ "total": 4057,"complete": false,"full_feed": "/changelog.json","entries": [@@ -19,6 +19,36 @@"launch"]},+ {+ "date": "2026-10-13",+ "type": "launch",+ "title": "Docs: Discord Activity (Forge Room)",+ "summary": "How the three.ws Discord Activity works: the OAuth2 auth flow, Discord's /.proxy/ URL mapping and CSP, the shared event-sourced room state, and why it ships with no purchases.",+ "link": "/docs/discord-activity",+ "tags": [+ "launch"+ ]+ },+ {+ "date": "2026-10-13",+ "type": "launch",+ "title": "Docs: LiveKit and Pipecat avatar integrations",+ "summary": "How to drive a three.ws <agent-3d> avatar's lipsync and gestures from a LiveKit Agents or Pipecat voice pipeline, with the livekit-plugins-threews and pipecat-threews packages, runnable local examples, and the data-channel message contract both share.",+ "link": "/docs/voice-framework-integrations",+ "tags": [+ "launch"+ ]+ },+ {+ "date": "2026-10-13",+ "type": "launch",+ "title": "Forge Room (Discord Activity)",+ "summary": "A shared Forge room that runs embedded inside a Discord voice channel: everyone in the call prompts, watches the same 3D model generate, and votes together.",+ "link": "/discord-activity",+ "tags": [+ "launch"+ ]+ },{"date": "2026-10-13","type": "launch",@@ -29,6 +59,40 @@"launch"]},+ {+ "date": "2026-10-13",+ "type": "update",+ "title": "A Discord Activity brings a shared Forge room into any voice channel",+ "summary": "Open the new Activity from a Discord voice channel and everyone in the call shares one Forge room: one prompt, one in-progress generation, one finished model with a shared vote count, and an agent that reacts in text to what just happened. Auth maps a verified Discord identity (re-checked against Discord's own /users/@me, never trusted from the client) to a room-scoped session; generation and voting reuse the real /api/forge pipeline and forge_votes table rather than a separate throwaway pipeline. No coin, wallet, or purchase path. Docs: /docs/discord-activity. Submission packet for Developer Portal setup and Discovery copy: marketing/growth/submissions/discord-activity.md.",+ "link": "/docs/discord-activity",+ "tags": [+ "feature",+ "docs"+ ]+ },+ {+ "date": "2026-10-13",+ "type": "update",+ "title": "A three.ws avatar now lipsyncs to any LiveKit Agents or Pipecat voice pipeline",+ "summary": "Two new packages, livekit-plugins-threews and pipecat-threews, republish a running voice agent's TTS and user-turn frames as the same transcript/gesture/speech_started/speech_ended message shape over the room's data channel, which <agent-3d voice=\"livekit\"> already renders client-side: no server-side video rendering, no change to the browser code at all. The LiveKit package is an AvatarSession plugin dropped into an AgentSession; the Pipecat package is a FrameProcessor placed after the TTS service. Each ships a runnable local example against a real open-source livekit-server with a real local TTS, verified end to end with real browser automation driving the actual avatar lipsync and gesture cues off a live bot in both frameworks. Docs: /docs/voice-framework-integrations.",+ "link": "/docs/voice-framework-integrations",+ "tags": [+ "feature",+ "sdk",+ "docs"+ ]+ },+ {+ "date": "2026-10-13",+ "type": "update",+ "title": "Get it printed: live Craftcloud prices for any Forge model, buyer pays direct",+ "summary": "A new \"Get it printed\" action on model pages and in the Forge export menu uploads the model straight to Craftcloud (All3DP) and shows live, real prices across whichever of its roughly 186 print shops can run the job, cheapest first with shipping attached. This is not Materialize: three.ws never takes payment here. Craftcloud's public v5 API has no endpoint that hands a server-created cart back to a browser for checkout, so the panel links out to Craftcloud's own upload page instead of faking a continue-to-checkout button, where pasting the same STL reproduces the prices in an authenticated, checkout-capable session. Backed by a new fulfillment adapter, api/_lib/print/adapters/craftcloud.js, registered ahead of the manual adapter since quoting never spends. Docs: /docs/forge#get-it-printed-live-prices-from-craftcloud and /docs/materialize.",+ "link": "/docs/forge#get-it-printed-live-prices-from-craftcloud",+ "tags": [+ "feature",+ "docs"+ ]+ },{"date": "2026-10-13","type": "update",@@ -1493,66 +1557,6 @@"tags": ["fix"]- },- {- "date": "2026-10-10",- "type": "update",- "title": "Token ceilings, a spend page, USDC deposits and a way out of the free tier",- "summary": "Every agent can now carry hourly, daily and per-run token ceilings next to its dollar caps. A ceiling is checked before the model is called; hitting one pauses the agent, tells you, and gives you Resume and Extend once. The new /spend page shows what each agent spends by day, by model and by tool, projects the month end, and alerts at 50, 80 and 100 percent of any cap. Credits can be topped up with USDC at a fixed rate alongside SOL and $THREE, the deposit page lists every accepted asset and its rate from live config, and paying in $THREE earns whatever bonus the owner has set. When the free tier runs out, the error now carries your choices: wait for the reset, top up, bring your own key, or resend the same request with paid_fallback: true to bill it to credits in one step.",- "link": "/spend",- "tags": [- "feature"- ]- },- {- "date": "2026-10-10",- "type": "update",- "title": "Your agents can trade perpetual futures",- "summary": "Each agent now has a perps desk at /agents/:id/perps, also reachable from the API and from Claude or any MCP client. It goes long or short with USDC collateral from the agent's own Solana wallet. Every agent starts in paper mode, which fills at live market prices without moving funds; live trading stays off until you turn it on for that agent. Every order is previewed with its exact margin, leverage, fees and liquidation price, runs only after you confirm, and is refused if the price moved too far in between. Leverage and per-position margin caps are always on (2x and $25 to start). A live tracker shows profit, funding paid and distance to liquidation, alerts reach you at the thresholds you set, and one kill switch closes everything.",- "link": "/agent-perps",- "tags": [- "feature"- ]- },- {- "date": "2026-10-09",- "type": "launch",- "title": "CAD Forge",- "summary": "Describe a mechanical part and get real parametric CAD checked by the OpenCascade kernel: STEP, STL, GLB and a drawing sheet, live dimension sliders, true-scale AR and one-click printing.",- "link": "/cad",- "tags": [- "launch"- ]- },- {- "date": "2026-10-09",- "type": "launch",- "title": "Claim your X creations",- "summary": "Models and avatars the three.ws bot made for you on X wait here. Link the same X account and every one of them moves into your library.",- "link": "/x/claim",- "tags": [- "launch"- ]- },- {- "date": "2026-10-09",- "type": "launch",- "title": "Docs · CAD Forge (text to parametric CAD)",- "summary": "How a sentence becomes a kernel-checked build123d part: the write, build and repair loop, dimension parameters, the design page, the /api/cad HTTP API, the cad_generate and cad_rebuild MCP tools, and the sandbox that runs model-written code.",- "link": "/docs/cad-forge",- "tags": [- "launch"- ]- },- {- "date": "2026-10-09",- "type": "launch",- "title": "Docs · Grok Bot connector reference",- "summary": "Connect Grok Bot to three.ws as a custom MCP connector: exact fields for each sign-in mode, which server to pick, the links every result carries, jobs and safe retries, free limits and install tokens, why a connector key can never spend, guided prompts, and a fix for every connection failure.",- "link": "/docs/grok-bot",- "tags": [- "launch"- ]}]}diff --git a/public/changelog.json b/public/changelog.jsonindex 7d53cccfb..6beb93de8 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-10-13T01:19:48.006Z",+ "generated_at": "2026-10-13T07:01:56.324Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -16,6 +16,36 @@"launch"]},+ {+ "date": "2026-10-13",+ "type": "launch",+ "title": "Docs: Discord Activity (Forge Room)",+ "summary": "How the three.ws Discord Activity works: the OAuth2 auth flow, Discord's /.proxy/ URL mapping and CSP, the shared event-sourced room state, and why it ships with no purchases.",+ "link": "/docs/discord-activity",+ "tags": [+ "launch"+ ]+ },+ {+ "date": "2026-10-13",+ "type": "launch",+ "title": "Docs: LiveKit and Pipecat avatar integrations",+ "summary": "How to drive a three.ws <agent-3d> avatar's lipsync and gestures from a LiveKit Agents or Pipecat voice pipeline, with the livekit-plugins-threews and pipecat-threews packages, runnable local examples, and the data-channel message contract both share.",+ "link": "/docs/voice-framework-integrations",+ "tags": [+ "launch"+ ]+ },+ {+ "date": "2026-10-13",+ "type": "launch",+ "title": "Forge Room (Discord Activity)",+ "summary": "A shared Forge room that runs embedded inside a Discord voice channel: everyone in the call prompts, watches the same 3D model generate, and votes together.",+ "link": "/discord-activity",+ "tags": [+ "launch"+ ]+ },{"date": "2026-10-13","type": "launch",@@ -26,6 +56,40 @@"launch"]},+ {+ "date": "2026-10-13",+ "type": "update",+ "title": "A Discord Activity brings a shared Forge room into any voice channel",+ "summary": "Open the new Activity from a Discord voice channel and everyone in the call shares one Forge room: one prompt, one in-progress generation, one finished model with a shared vote count, and an agent that reacts in text to what just happened. Auth maps a verified Discord identity (re-checked against Discord's own /users/@me, never trusted from the client) to a room-scoped session; generation and voting reuse the real /api/forge pipeline and forge_votes table rather than a separate throwaway pipeline. No coin, wallet, or purchase path. Docs: /docs/discord-activity. Submission packet for Developer Portal setup and Discovery copy: marketing/growth/submissions/discord-activity.md.",+ "link": "/docs/discord-activity",+ "tags": [+ "feature",+ "docs"+ ]+ },+ {+ "date": "2026-10-13",+ "type": "update",+ "title": "A three.ws avatar now lipsyncs to any LiveKit Agents or Pipecat voice pipeline",+ "summary": "Two new packages, livekit-plugins-threews and pipecat-threews, republish a running voice agent's TTS and user-turn frames as the same transcript/gesture/speech_started/speech_ended message shape over the room's data channel, which <agent-3d voice=\"livekit\"> already renders client-side: no server-side video rendering, no change to the browser code at all. The LiveKit package is an AvatarSession plugin dropped into an AgentSession; the Pipecat package is a FrameProcessor placed after the TTS service. Each ships a runnable local example against a real open-source livekit-server with a real local TTS, verified end to end with real browser automation driving the actual avatar lipsync and gesture cues off a live bot in both frameworks. Docs: /docs/voice-framework-integrations.",+ "link": "/docs/voice-framework-integrations",+ "tags": [+ "feature",+ "sdk",+ "docs"+ ]+ },+ {+ "date": "2026-10-13",+ "type": "update",+ "title": "Get it printed: live Craftcloud prices for any Forge model, buyer pays direct",+ "summary": "A new \"Get it printed\" action on model pages and in the Forge export menu uploads the model straight to Craftcloud (All3DP) and shows live, real prices across whichever of its roughly 186 print shops can run the job, cheapest first with shipping attached. This is not Materialize: three.ws never takes payment here. Craftcloud's public v5 API has no endpoint that hands a server-created cart back to a browser for checkout, so the panel links out to Craftcloud's own upload page instead of faking a continue-to-checkout button, where pasting the same STL reproduces the prices in an authenticated, checkout-capable session. Backed by a new fulfillment adapter, api/_lib/print/adapters/craftcloud.js, registered ahead of the manual adapter since quoting never spends. Docs: /docs/forge#get-it-printed-live-prices-from-craftcloud and /docs/materialize.",+ "link": "/docs/forge#get-it-printed-live-prices-from-craftcloud",+ "tags": [+ "feature",+ "docs"+ ]+ },{"date": "2026-10-13","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex b3bd332f9..7ed50fb29 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -14,6 +14,30 @@<category>launch</category><description>Decision record for staked Event Markets on Solana: the parimutuel model, fee and buyback split, limits, void and refund rules, and the jurisdiction and age questions that stay with the owner.</description></item>+ <item>+ <title>Docs: Discord Activity (Forge Room)</title>+ <link>https://three.ws/docs/discord-activity</link>+ <guid isPermaLink="false">2026-10-13:Docs: Discord Activity (Forge Room)</guid>+ <pubDate>Tue, 13 Oct 2026 12:00:00 GMT</pubDate>+ <category>launch</category>+ <description>How the three.ws Discord Activity works: the OAuth2 auth flow, Discord's /.proxy/ URL mapping and CSP, the shared event-sourced room state, and why it ships with no purchases.</description>+ </item>+ <item>+ <title>Docs: LiveKit and Pipecat avatar integrations</title>+ <link>https://three.ws/docs/voice-framework-integrations</link>+ <guid isPermaLink="false">2026-10-13:Docs: LiveKit and Pipecat avatar integrations</guid>+ <pubDate>Tue, 13 Oct 2026 12:00:00 GMT</pubDate>+ <category>launch</category>+ <description>How to drive a three.ws <agent-3d> avatar's lipsync and gestures from a LiveKit Agents or Pipecat voice pipeline, with the livekit-plugins-threews and pipecat-threews packages, runnable local examples, and the data-channel message contract both share.</description>+ </item>+ <item>+ <title>Forge Room (Discord Activity)</title>+ <link>https://three.ws/discord-activity</link>+ <guid isPermaLink="false">2026-10-13:Forge Room (Discord Activity)</guid>+ <pubDate>Tue, 13 Oct 2026 12:00:00 GMT</pubDate>+ <category>launch</category>+ <description>A shared Forge room that runs embedded inside a Discord voice channel: everyone in the call prompts, watches the same 3D model generate, and votes together.</description>+ </item><item><title>Open source credits</title><link>https://three.ws/open-source</link>@@ -22,6 +46,30 @@<category>launch</category><description>Every open-source project, GPU model, and asset source three.ws is built on, grouped by what it powers: rendering, formats and compression, generation models, motion, voice, assets, and infrastructure. Generated from package.json on every build.</description></item>+ <item>+ <title>A Discord Activity brings a shared Forge room into any voice channel</title>+ <link>https://three.ws/docs/discord-activity</link>+ <guid isPermaLink="false">2026-10-13:A Discord Activity brings a shared Forge room into any voice channel</guid>+ <pubDate>Tue, 13 Oct 2026 12:00:00 GMT</pubDate>+ <category>feature</category>+ <description>Open the new Activity from a Discord voice channel and everyone in the call shares one Forge room: one prompt, one in-progress generation, one finished model with a shared vote count, and an agent that reacts in text to what just happened. Auth maps a verified Discord identity (re-checked against Discord's own /users/@me, never trusted from the client) to a room-scoped session; generation and voting reuse the real /api/forge pipeline and forge_votes table rather than a separate throwaway pipeline. No coin, wallet, or purchase path. Docs: /docs/discord-activity. Submission packet for Developer Portal setup and Discovery copy: marketing/growth/submissions/discord-activity.md.</description>+ </item>+ <item>+ <title>A three.ws avatar now lipsyncs to any LiveKit Agents or Pipecat voice pipeline</title>+ <link>https://three.ws/docs/voice-framework-integrations</link>+ <guid isPermaLink="false">2026-10-13:A three.ws avatar now lipsyncs to any LiveKit Agents or Pipecat voice pipeline</guid>+ <pubDate>Tue, 13 Oct 2026 12:00:00 GMT</pubDate>+ <category>feature</category>+ <description>Two new packages, livekit-plugins-threews and pipecat-threews, republish a running voice agent's TTS and user-turn frames as the same transcript/gesture/speech_started/speech_ended message shape over the room's data channel, which <agent-3d voice="livekit"> already renders client-side: no server-side video rendering, no change to the browser code at all. The LiveKit package is an AvatarSession plugin dropped into an AgentSession; the Pipecat package is a FrameProcessor placed after the TTS service. Each ships a runnable local example against a real open-source livekit-server with a real local TTS, verified end to end with real browser automation driving the actual avatar lipsync and gesture cues off a live bot in both frameworks. Docs: /docs/voice-framework-integrations.</description>+ </item>+ <item>+ <title>Get it printed: live Craftcloud prices for any Forge model, buyer pays direct</title>+ <link>https://three.ws/docs/forge#get-it-printed-live-prices-from-craftcloud</link>+ <guid isPermaLink="false">2026-10-13:Get it printed: live Craftcloud prices for any Forge model, buyer pays direct</guid>+ <pubDate>Tue, 13 Oct 2026 12:00:00 GMT</pubDate>+ <category>feature</category>+ <description>A new "Get it printed" action on model pages and in the Forge export menu uploads the model straight to Craftcloud (All3DP) and shows live, real prices across whichever of its roughly 186 print shops can run the job, cheapest first with shipping attached. This is not Materialize: three.ws never takes payment here. Craftcloud's public v5 API has no endpoint that hands a server-created cart back to a browser for checkout, so the panel links out to Craftcloud's own upload page instead of faking a continue-to-checkout button, where pasting the same STL reproduces the prices in an authenticated, checkout-capable session. Backed by a new fulfillment adapter, api/_lib/print/adapters/craftcloud.js, registered ahead of the manual adapter since quoting never spends. Docs: /docs/forge#get-it-printed-live-prices-from-craftcloud and /docs/materialize.</description>+ </item><item><title>Open source credits: every dependency, model, and asset source three.ws runs on, in one place</title><link>https://three.ws/open-source</link>diff --git a/public/features.json b/public/features.jsonindex 81e1e1a57..fadc6460f 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-10-13T01:19:47.993Z",+ "generated_at": "2026-10-13T07:01:56.308Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",@@ -542,6 +542,18 @@"priority": 0.7,"job": "agent"},+ {+ "path": "/discord-activity",+ "title": "Forge Room (Discord Activity)",+ "description": "A shared Forge room that runs embedded inside a Discord voice channel: everyone in the call prompts, watches the same 3D model generate, and votes together.",+ "added": "2026-10-13",+ "auth": null,+ "indexable": false,+ "tags": [],+ "showcase": false,+ "priority": 0.3,+ "job": "explore"+ },{"path": "/knock","title": "Knock",@@ -10340,6 +10352,30 @@"priority": 0.7,"job": null},+ {+ "path": "/docs/voice-framework-integrations",+ "title": "Docs: LiveKit and Pipecat avatar integrations",+ "description": "How to drive a three.ws <agent-3d> avatar's lipsync and gestures from a LiveKit Agents or Pipecat voice pipeline, with the livekit-plugins-threews and pipecat-threews packages, runnable local examples, and the data-channel message contract both share.",+ "added": "2026-10-13",+ "auth": null,+ "indexable": true,+ "tags": [],+ "showcase": false,+ "priority": 0.7,+ "job": null+ },+ {+ "path": "/docs/discord-activity",+ "title": "Docs: Discord Activity (Forge Room)",+ "description": "How the three.ws Discord Activity works: the OAuth2 auth flow, Discord's /.proxy/ URL mapping and CSP, the shared event-sourced room state, and why it ships with no purchases.",+ "added": "2026-10-13",+ "auth": null,+ "indexable": true,+ "tags": [],+ "showcase": false,+ "priority": 0.6,+ "job": null+ },{"path": "/docs/rig-doctor","title": "Rig Doctor reference",diff --git a/public/llms-full.txt b/public/llms-full.txtindex 631b36f0f..76773b80a 100644--- a/public/llms-full.txt+++ b/public/llms-full.txt@@ -243,6 +243,13 @@ URL: https://three.ws/companionA 3D companion that delivers your important messages in person. Connect your own Telegram bot, calendar, inbox, or phone, give each contact their own avatar and voice, and hear only what clears your bar.+### Forge Room (Discord Activity)++URL: https://three.ws/discord-activity+Indexable: no (excluded from sitemap)++A shared Forge room that runs embedded inside a Discord voice channel: everyone in the call prompts, watches the same 3D model generate, and votes together.+### KnockURL: https://three.ws/knock@@ -5197,6 +5204,18 @@ URL: https://three.ws/docs/avatar-cliCommand reference for @three-ws/avatar-cli: init, validate, hash, and preview, with every flag, exit code, and JSON shape, plus the two checks that gate a release on your avatar manifest.+### Docs: LiveKit and Pipecat avatar integrations++URL: https://three.ws/docs/voice-framework-integrations++How to drive a three.ws <agent-3d> avatar's lipsync and gestures from a LiveKit Agents or Pipecat voice pipeline, with the livekit-plugins-threews and pipecat-threews packages, runnable local examples, and the data-channel message contract both share.++### Docs: Discord Activity (Forge Room)++URL: https://three.ws/docs/discord-activity++How the three.ws Discord Activity works: the OAuth2 auth flow, Discord's /.proxy/ URL mapping and CSP, the shared event-sourced room state, and why it ships with no purchases.+### Rig Doctor referenceURL: https://three.ws/docs/rig-doctordiff --git a/public/llms.txt b/public/llms.txtindex 55a63316f..630f661ab 100644--- a/public/llms.txt+++ b/public/llms.txt@@ -101,6 +101,6 @@ Machine-readable entry points. Fetch these instead of scraping HTML.## Optional-- [llms-full.txt](https://three.ws/llms-full.txt): Every public page (1004), grouped by section, with full descriptions.+- [llms-full.txt](https://three.ws/llms-full.txt): Every public page (1006), grouped by section, with full descriptions.- [Sitemap](https://three.ws/sitemap): The same index for people, with search.- [sitemap.xml](https://three.ws/sitemap.xml): XML sitemap for crawlers, including every agent and avatar page.diff --git a/public/locales/localized-pages.json b/public/locales/localized-pages.jsonindex 8cd2599d1..0252b59d7 100644--- a/public/locales/localized-pages.json+++ b/public/locales/localized-pages.json@@ -1,6 +1,6 @@{"generated": true,- "count": 321,+ "count": 434,"paths": ["/","/3d",@@ -201,6 +201,119 @@"/monitor","/motion-swap","/my-agents",+ "/news",+ "/news/2045242891350814835",+ "/news/2049397875935989970",+ "/news/2049406826719137937",+ "/news/2049412062837928202",+ "/news/2049447738434339171",+ "/news/2049458671139336613",+ "/news/2049476546285740512",+ "/news/2049557523330638269",+ "/news/2049573582247022869",+ "/news/2049576603324411933",+ "/news/2049576641127682430",+ "/news/2049577291957899336",+ "/news/2049762836881301865",+ "/news/2049765915575914834",+ "/news/2049997615421649363",+ "/news/2050016695897706885",+ "/news/2050049239301165535",+ "/news/2050221269732425928",+ "/news/2050226678321102975",+ "/news/2050229144676675999",+ "/news/2050284562069266616",+ "/news/2050585585191186781",+ "/news/2050627547394916768",+ "/news/2050753406109880576",+ "/news/2050758788186353723",+ "/news/2050800140295049308",+ "/news/2050886334261391686",+ "/news/2051140736201175323",+ "/news/2051261108506558901",+ "/news/2051616708482498843",+ "/news/2051689230997618690",+ "/news/2051690803203105230",+ "/news/2051774915876098063",+ "/news/2051858035862335505",+ "/news/2051858503523066283",+ "/news/2051893054584553680",+ "/news/2052037977556287723",+ "/news/2052167399399735476",+ "/news/2052181307002929363",+ "/news/2052189491801284690",+ "/news/2052402481024667887",+ "/news/2052402580266098813",+ "/news/2052418108837781511",+ "/news/2052418482269254040",+ "/news/2052426446073983267",+ "/news/2052588973466484922",+ "/news/2052603250524967045",+ "/news/2052685648377913671",+ "/news/2052790746256920583",+ "/news/2052791935585407403",+ "/news/2053025259645981078",+ "/news/2053698115203743922",+ "/news/2053698387263008827",+ "/news/2053730856339144932",+ "/news/2053801703355629587",+ "/news/2053804700609458214",+ "/news/2053832201176027583",+ "/news/2054404663802483072",+ "/news/2054675701132132736",+ "/news/2055140064070717618",+ "/news/2055307440921702738",+ "/news/2055309846556401735",+ "/news/2055310365588922872",+ "/news/2055517252964024561",+ "/news/2055967730495586477",+ "/news/2055985494606106821",+ "/news/2056556899403997450",+ "/news/2057721370310775223",+ "/news/2057780453709648200",+ "/news/2057782522994684413",+ "/news/2057786164862730704",+ "/news/2058076885805085111",+ "/news/2058287578227577039",+ "/news/2059456289789657537",+ "/news/2059456294189498830",+ "/news/2059456295825223723",+ "/news/2059457822941978723",+ "/news/2059675892981633179",+ "/news/2059712761622675776",+ "/news/2059821472156446844",+ "/news/2059894004771418220",+ "/news/2060178868305326413",+ "/news/2060186881636422038",+ "/news/2061418285896269952",+ "/news/2061488909264040194",+ "/news/2061523804405616642",+ "/news/2061713039624405062",+ "/news/aws-agentic-economy-three-ws",+ "/news/aws-builder-center-3d-agents-onchain-payments",+ "/news/aws-builder-center-blog",+ "/news/aws-marketplace-live-may29",+ "/news/bybit-alpha-listing",+ "/news/cmc-mcp-registry-article",+ "/news/cmc-memecoin-3d-world",+ "/news/huggingface-bodies-and-wallets",+ "/news/huggingface-building-3d-ai-agents",+ "/news/ibm-collaboration-showcase",+ "/news/ibm-showcase-may31",+ "/news/joined-aws-partner-network",+ "/news/listed-on-bnb-chain-dappbay",+ "/news/live-on-alibaba-cloud-marketplace",+ "/news/live-on-aws-marketplace",+ "/news/mcp-servers-x402-bazaar-coinbase",+ "/news/monetize-mcp-server-x402-paid-tools",+ "/news/moonshot-verified",+ "/news/partnered-with-hackernoon",+ "/news/quicknode-startup-program",+ "/news/text-to-3d-is-live",+ "/news/three-ws-dextools-social-boost-buyback",+ "/news/three-ws-featured-on-alibaba-cloud-marketplace-blog",+ "/news/three-ws-first-month-3d-agent-layer",+ "/news/threews-play-coin-communities","/nim-forge","/notifications","/nvidia",diff --git a/public/sitemap/index.html b/public/sitemap/index.htmlindex 10f8e032c..6e3f8b6c4 100644--- a/public/sitemap/index.html+++ b/public/sitemap/index.html@@ -3,16 +3,16 @@<head><meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" />-<title data-i18n="sitemap_index.meta_title">Sitemap · three.ws</title>-<meta name="description" content="Human-readable index of every page on three.ws." data-i18n-attr="content:sitemap_index.meta_description"/>+<title>Sitemap · three.ws</title>+<meta name="description" content="Human-readable index of every page on three.ws." /><meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1" /><link rel="canonical" href="https://three.ws/sitemap" /><meta property="og:type" content="website" /><meta property="og:site_name" content="three.ws" /><meta property="og:locale" content="en_US" /><meta property="og:url" content="https://three.ws/sitemap" />-<meta property="og:title" content="Sitemap · three.ws" data-i18n-attr="content:sitemap_index.meta_og_title"/>-<meta property="og:description" content="Human-readable index of every page on three.ws." data-i18n-attr="content:sitemap_index.meta_og_description"/>+<meta property="og:title" content="Sitemap · three.ws" />+<meta property="og:description" content="Human-readable index of every page on three.ws." /><meta property="og:image" content="https://three.ws/api/page-og?s=main&t=Sitemap&d=Human-readable+index+of+every+page+on+three.ws.&p=%2Fsitemap" /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="630" />@@ -20,8 +20,8 @@<meta property="og:image:alt" content="Sitemap - three.ws" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:site" content="@trythreews" />-<meta name="twitter:title" content="Sitemap · three.ws" data-i18n-attr="content:sitemap_index.meta_twitter_title"/>-<meta name="twitter:description" content="Human-readable index of every page on three.ws." data-i18n-attr="content:sitemap_index.meta_twitter_description"/>+<meta name="twitter:title" content="Sitemap · three.ws" />+<meta name="twitter:description" content="Human-readable index of every page on three.ws." /><meta name="twitter:image" content="https://three.ws/api/page-og?s=main&t=Sitemap&d=Human-readable+index+of+every+page+on+three.ws.&p=%2Fsitemap" /><script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Sitemap","description":"Human-readable index of every page on three.ws.","url":"https://three.ws/sitemap","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=main&t=Sitemap&d=Human-readable+index+of+every+page+on+three.ws.&p=%2Fsitemap"}]}</script><link rel="alternate" type="application/xml" title="XML sitemap" href="/sitemap.xml" />@@ -95,27 +95,27 @@<header><div id="nav-container"></div></header><main class="sm-wrap"><div class="sm-hero">- <h1 data-i18n="sitemap_index.sitemap">Sitemap</h1>- <p><span>1063</span> <span data-i18n="sitemap_index.pages_grouped">pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</span></p>+ <h1>Sitemap</h1>+ <p><span>1066</span> <span data-i18n="sitemap_index.pages_grouped">pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</span></p><div class="sm-formats">- <a href="/everything" data-i18n-html="sitemap_index.browse_by_goal_not_by_section"><code>/everything</code> · browse by goal, not by section</a>- <a href="/sitemap.xml" data-i18n-html="sitemap_index.for_search_engines"><code>sitemap.xml</code> · for search engines</a>- <a href="/llms.txt" data-i18n-html="sitemap_index.for_ai_agents"><code>llms.txt</code> · for AI agents</a>- <a href="/llms-full.txt" data-i18n-html="sitemap_index.long_form"><code>llms-full.txt</code> · long form</a>- <a href="/api/features.json" data-i18n-html="sitemap_index.machine_manifest"><code>features.json</code> · machine manifest</a>- <a href="/changelog" data-i18n-html="sitemap_index.what_s_new"><code>changelog</code> · what's new</a>- <a href="/openapi.json" data-i18n-html="sitemap_index.http_api"><code>openapi.json</code> · HTTP API</a>+ <a href="/everything"><code>/everything</code> · browse by goal, not by section</a>+ <a href="/sitemap.xml"><code>sitemap.xml</code> · for search engines</a>+ <a href="/llms.txt"><code>llms.txt</code> · for AI agents</a>+ <a href="/llms-full.txt"><code>llms-full.txt</code> · long form</a>+ <a href="/api/features.json"><code>features.json</code> · machine manifest</a>+ <a href="/changelog"><code>changelog</code> · what's new</a>+ <a href="/openapi.json"><code>openapi.json</code> · HTTP API</a></div></div><div class="sm-filter"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>- <input id="sm-filter-input" type="search" placeholder="Filter 1063 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" />+ <input id="sm-filter-input" type="search" placeholder="Filter 1066 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" /><kbd id="sm-filter-kbd" aria-hidden="true">/</kbd></div><p class="sm-filter-count" role="status" aria-live="polite"><span id="sm-filter-count"></span><span id="sm-filter-hint" aria-hidden="true"></span></p><section class="sm-new" id="sm-new" aria-labelledby="sm-new-title">- <h2 id="sm-new-title" data-i18n-html="sitemap_index.newestfull_changelog">Newest<a class="sm-new-more" href="/changelog">full changelog →</a></h2>- <p class="sm-section-desc" data-i18n="sitemap_index.the_9_most_recently_launched_pages_straight">The 9 most recently launched pages, straight to the live surface.</p>+ <h2 id="sm-new-title">Newest<a class="sm-new-more" href="/changelog">full changelog →</a></h2>+ <p class="sm-section-desc">The 9 most recently launched pages, straight to the live surface.</p><ul class="sm-list"><li><a href="/docs/event-markets-staking">@@ -125,6 +125,22 @@<span class="sm-desc" data-i18n="sitemap_index.d_docs_event_markets_staking">Decision record for staked Event Markets on Solana: the parimutuel model, fee and buyback split, limits, void and refund rules, and the jurisdiction and age questions that stay with the owner.</span></a></li>+ <li>+ <a href="/docs/voice-framework-integrations">+ <span class="sm-new-date" translate="no">Oct 13, 2026</span>+ <span class="sm-title"><span data-i18n="sitemap_index.t_docs_voice_framework_integrations">Docs: LiveKit and Pipecat avatar integrations</span></span>+ <span class="sm-path" translate="no">/docs/voice-framework-integrations</span>+ <span class="sm-desc" data-i18n="sitemap_index.d_docs_voice_framework_integrations">How to drive a three.ws <agent-3d> avatar's lipsync and gestures from a LiveKit Agents or Pipecat voice pipeline, with the livekit-plugins-threews and pipecat-threews packages, runnable local examples, and the data-channel message contract both share.</span>+ </a>+ </li>+ <li>+ <a href="/docs/discord-activity">+ <span class="sm-new-date" translate="no">Oct 13, 2026</span>+ <span class="sm-title"><span data-i18n="sitemap_index.t_docs_discord_activity">Docs: Discord Activity (Forge Room)</span></span>+ <span class="sm-path" translate="no">/docs/discord-activity</span>+ <span class="sm-desc" data-i18n="sitemap_index.d_docs_discord_activity">How the three.ws Discord Activity works: the OAuth2 auth flow, Discord's /.proxy/ URL mapping and CSP, the shared event-sourced room state, and why it ships with no purchases.</span>+ </a>+ </li><li><a href="/open-source"><span class="sm-new-date" translate="no">Oct 13, 2026</span>@@ -173,41 +189,25 @@<span class="sm-desc" data-i18n="sitemap_index.d_apps">Every way to run three.ws: the web desktop, Android, Solana Seeker, iPhone and iPad, and the Windows and Linux desktop app.</span></a></li>- <li>- <a href="/apps/web">- <span class="sm-new-date" translate="no">Oct 11, 2026</span>- <span class="sm-title"><span data-i18n="sitemap_index.t_apps_web">three.ws web desktop</span></span>- <span class="sm-path" translate="no">/apps/web</span>- <span class="sm-desc" data-i18n="sitemap_index.d_apps_web">The whole platform as a desktop in your browser: taskbar, windows and a 3D campus you walk through as your avatar. Installable as an app.</span>- </a>- </li>- <li>- <a href="/apps/android">- <span class="sm-new-date" translate="no">Oct 11, 2026</span>- <span class="sm-title"><span data-i18n="sitemap_index.t_apps_android">three.ws for Android</span></span>- <span class="sm-path" translate="no">/apps/android</span>- <span class="sm-desc" data-i18n="sitemap_index.d_apps_android">Download the native Android app: full-screen, Mobile Wallet Adapter signing, selfie to avatar and AR.</span>- </a>- </li></ul></section><nav class="sm-toc" aria-label="Sections">- <a href="#main" data-i18n="sitemap_index.main">Main</a>- <a href="#build" data-i18n="sitemap_index.build">Build</a>- <a href="#labs" data-i18n="sitemap_index.labs">Labs</a>- <a href="#crypto" data-i18n="sitemap_index.crypto">Crypto</a>- <a href="#agent-tools" data-i18n="sitemap_index.agent_tools">Agent Tools</a>- <a href="#account" data-i18n="sitemap_index.account">Account</a>- <a href="#learn" data-i18n="sitemap_index.learn">Learn</a>- <a href="#blog" data-i18n="sitemap_index.blog">Blog</a>- <a href="#legal" data-i18n="sitemap_index.legal">Legal</a>- <a href="#machine" data-i18n="sitemap_index.machine_readable">Machine-readable</a>- <a href="#news" data-i18n="sitemap_index.news">News</a>+ <a href="#main">Main</a>+ <a href="#build">Build</a>+ <a href="#labs">Labs</a>+ <a href="#crypto">Crypto</a>+ <a href="#agent-tools">Agent Tools</a>+ <a href="#account">Account</a>+ <a href="#learn">Learn</a>+ <a href="#blog">Blog</a>+ <a href="#legal">Legal</a>+ <a href="#machine">Machine-readable</a>+ <a href="#news">News</a></nav><section class="sm-section" id="main"><header>- <h2><span data-i18n="sitemap_index.section_main">Main</span><span class="sm-count" data-count>71</span></h2>- <p class="sm-section-desc" data-i18n="sitemap_index.entry_points_into_the_product">Entry points into the product.</p>+ <h2><span data-i18n="sitemap_index.section_main">Main</span><span class="sm-count" data-count>72</span></h2>+ <p class="sm-section-desc">Entry points into the product.</p></header><ul class="sm-list"><li>@@ -462,6 +462,13 @@<span class="sm-desc" data-i18n="sitemap_index.d_companion">A 3D companion that delivers your important messages in person. Connect your own Telegram bot, calendar, inbox, or phone, give each contact their own avatar and voice, and hear only what clears your bar.</span></a></li>+ <li>+ <a href="/discord-activity">+ <span class="sm-title"><span data-i18n="sitemap_index.t_discord_activity">Forge Room (Discord Activity)</span><span class="sm-badge sm-badge-internal" data-i18n="sitemap_index.badge_internal">internal</span></span>+ <span class="sm-path" translate="no">/discord-activity</span>+ <span class="sm-desc" data-i18n="sitemap_index.d_discord_activity">A shared Forge room that runs embedded inside a Discord voice channel: everyone in the call prompts, watches the same 3D model generate, and votes together.</span>+ </a>+ </li><li><a href="/knock"><span class="sm-title"><span data-i18n="sitemap_index.t_knock">Knock</span></span>@@ -713,7 +720,7 @@<section class="sm-section" id="build"><header><h2><span data-i18n="sitemap_index.section_build">Build</span><span class="sm-count" data-count>92</span></h2>- <p class="sm-section-desc" data-i18n="sitemap_index.create_and_customize_an_agent">Create and customize an agent.</p>+ <p class="sm-section-desc">Create and customize an agent.</p></header><ul class="sm-list"><li>@@ -1366,7 +1373,7 @@<section class="sm-section" id="labs"><header><h2><span data-i18n="sitemap_index.section_labs">Labs</span><span class="sm-count" data-count>26</span></h2>- <p class="sm-section-desc" data-i18n="sitemap_index.experimental_features_actively_shipping_expe">Experimental features actively shipping. Expect fast iteration.</p>+ <p class="sm-section-desc">Experimental features actively shipping. Expect fast iteration.</p></header><ul class="sm-list"><li>@@ -1557,7 +1564,7 @@<section class="sm-section" id="crypto"><header><h2><span data-i18n="sitemap_index.section_crypto">Crypto</span><span class="sm-count" data-count>170</span></h2>- <p class="sm-section-desc" data-i18n="sitemap_index.on_chain_features_pay_per_call_token">On-chain features: pay-per-call, token launches, vanity wallets.</p>+ <p class="sm-section-desc">On-chain features: pay-per-call, token launches, vanity wallets.</p></header><ul class="sm-list"><li>@@ -2756,7 +2763,7 @@<section class="sm-section" id="agent-tools"><header><h2><span data-i18n="sitemap_index.section_agent-tools">Agent Tools</span><span class="sm-count" data-count>11</span></h2>- <p class="sm-section-desc" data-i18n="sitemap_index.manage_talk_to_and_deploy_individual_agents">Manage, talk to, and deploy individual agents.</p>+ <p class="sm-section-desc">Manage, talk to, and deploy individual agents.</p></header><ul class="sm-list"><li>@@ -2842,7 +2849,7 @@<section class="sm-section" id="account"><header><h2><span data-i18n="sitemap_index.section_account">Account</span><span class="sm-count" data-count>15</span></h2>- <p class="sm-section-desc" data-i18n="sitemap_index.sign_in_dashboard_billing">Sign-in, dashboard, billing.</p>+ <p class="sm-section-desc">Sign-in, dashboard, billing.</p></header><ul class="sm-list"><li>@@ -2955,8 +2962,8 @@<section class="sm-section" id="learn"><header>- <h2><span data-i18n="sitemap_index.section_learn">Learn</span><span class="sm-count" data-count>500</span></h2>- <p class="sm-section-desc" data-i18n="sitemap_index.docs_tutorials_and_reference">Docs, tutorials, and reference.</p>+ <h2><span data-i18n="sitemap_index.section_learn">Learn</span><span class="sm-count" data-count>502</span></h2>+ <p class="sm-section-desc">Docs, tutorials, and reference.</p></header><ul class="sm-list"><li>@@ -6207,6 +6214,20 @@<span class="sm-desc" data-i18n="sitemap_index.d_docs_avatar_cli">Command reference for @three-ws/avatar-cli: init, validate, hash, and preview, with every flag, exit code, and JSON shape, plus the two checks that gate a release on your avatar manifest.</span></a></li>+ <li>+ <a href="/docs/voice-framework-integrations">+ <span class="sm-title"><span data-i18n="sitemap_index.t_docs_voice_framework_integrations">Docs: LiveKit and Pipecat avatar integrations</span></span>+ <span class="sm-path" translate="no">/docs/voice-framework-integrations</span>+ <span class="sm-desc" data-i18n="sitemap_index.d_docs_voice_framework_integrations">How to drive a three.ws <agent-3d> avatar's lipsync and gestures from a LiveKit Agents or Pipecat voice pipeline, with the livekit-plugins-threews and pipecat-threews packages, runnable local examples, and the data-channel message contract both share.</span>+ </a>+ </li>+ <li>+ <a href="/docs/discord-activity">+ <span class="sm-title"><span data-i18n="sitemap_index.t_docs_discord_activity">Docs: Discord Activity (Forge Room)</span></span>+ <span class="sm-path" translate="no">/docs/discord-activity</span>+ <span class="sm-desc" data-i18n="sitemap_index.d_docs_discord_activity">How the three.ws Discord Activity works: the OAuth2 auth flow, Discord's /.proxy/ URL mapping and CSP, the shared event-sourced room state, and why it ships with no purchases.</span>+ </a>+ </li><li><a href="/docs/rig-doctor"><span class="sm-title"><span data-i18n="sitemap_index.t_docs_rig_doctor">Rig Doctor reference</span></span>@@ -6465,7 +6486,7 @@<section class="sm-section" id="blog"><header><h2><span data-i18n="sitemap_index.section_blog">Blog</span><span class="sm-count" data-count>39</span></h2>- <p class="sm-section-desc" data-i18n="sitemap_index.long_form_announcements_launches_and_writing">Long-form announcements, launches, and writing from three.ws.</p>+ <p class="sm-section-desc">Long-form announcements, launches, and writing from three.ws.</p></header><ul class="sm-list"><li>@@ -6819,7 +6840,7 @@<section class="sm-section" id="machine"><header><h2><span data-i18n="sitemap_index.section_machine">Machine-readable</span><span class="sm-count" data-count>18</span></h2>- <p class="sm-section-desc" data-i18n="sitemap_index.indexes_and_well_known_files_for_crawlers">Indexes and well-known files for crawlers and AI agents.</p>+ <p class="sm-section-desc">Indexes and well-known files for crawlers and AI agents.</p></header><ul class="sm-list"><li>@@ -6954,7 +6975,7 @@<section class="sm-section" id="news"><header><h2><span data-i18n="sitemap_index.section_news">News</span><span class="sm-count" data-count>112</span></h2>- <p class="sm-section-desc" data-i18n="sitemap_index.product_launches_integrations_and_announceme">Product launches, integrations, and announcements from three.ws.</p>+ <p class="sm-section-desc">Product launches, integrations, and announcements from three.ws.</p></header><ul class="sm-list"><li>@@ -7745,10 +7766,10 @@</section><div class="sm-empty" id="sm-empty" hidden><p><span data-i18n="sitemap_index.no_pages_match">No pages match</span> “<span id="sm-empty-q"></span>”.</p>- <p class="sm-empty-hint" data-i18n="sitemap_index.try_a_shorter_word_or_search_everything">Try a shorter word, or search everything: global search covers agents, coins, and skills too.</p>+ <p class="sm-empty-hint">Try a shorter word, or search everything: global search covers agents, coins, and skills too.</p><div class="sm-empty-actions">- <button type="button" id="sm-empty-clear" data-i18n="sitemap_index.clear_filter">Clear filter</button>- <a id="sm-empty-search" href="/search" data-i18n="sitemap_index.search_all_of_three_ws">Search all of three.ws</a>+ <button type="button" id="sm-empty-clear">Clear filter</button>+ <a id="sm-empty-search" href="/search">Search all of three.ws</a></div></div></main>diff --git a/src/craftcloud-print.js b/src/craftcloud-print.jsnew file mode 100644index 000000000..f54700f94--- /dev/null+++ b/src/craftcloud-print.js@@ -0,0 +1,258 @@+// "Get it printed": live prices from Craftcloud's (All3DP) ~186-shop print+// network for a Forge model, with no three.ws checkout in the way.+//+// This is deliberately not Materialize. Materialize is our own print pipeline+// (we take payment in USDC, screen, submit to a fulfillment adapter, ship a+// certificate). This panel uploads the model straight to Craftcloud, shows+// what every shop that can run the job would charge, and the buyer pays+// Craftcloud directly on Craftcloud's own site. three.ws never touches the+// money, which is also why there is no "continue to checkout" button here:+// Craftcloud's public API has no endpoint that hands a server-created cart+// back to a browser for payment (api/_lib/print/adapters/craftcloud.js), so+// the honest next step is the STL this panel already generated plus a link to+// Craftcloud's own upload page, where pasting the file reproduces the same+// prices in the buyer's own, checkout-capable session.++import { slicerModelUrl } from './slicer-handoff.js';++const log = (...args) => {+ if (typeof console !== 'undefined') console.debug('[craftcloud-print]', ...args);+};++function esc(s) {+ return String(s ?? '').replace(/[&<>"]/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"' })[c]);+}++function money(n, currency) {+ if (!Number.isFinite(n)) return 'n/a';+ try {+ return new Intl.NumberFormat(undefined, { style: 'currency', currency: currency || 'USD' }).format(n);+ } catch {+ return `${currency || '$'}${n.toFixed(2)}`;+ }+}++function injectStyles() {+ if (document.getElementById('ccp-styles')) return;+ const style = document.createElement('style');+ style.id = 'ccp-styles';+ style.textContent = `+ .ccp { display: flex; flex-direction: column; gap: var(--space-sm, 0.6rem); }+ .ccp-intro { margin: 0; font-size: var(--text-xs, 0.78rem); color: var(--ink-dim, #999); line-height: 1.5; }+ .ccp-btn {+ align-self: flex-start; display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer;+ background: var(--accent, #7c6cff); color: var(--bg-0, #0a0a0a); border: 1px solid var(--accent, #7c6cff);+ border-radius: var(--radius-md, 8px); padding: 0.5rem 0.9rem; font: inherit; font-size: var(--text-sm, 0.85rem); font-weight: 600;+ transition: opacity 0.15s ease, transform 0.15s ease;+ }+ .ccp-btn:hover { opacity: 0.9; }+ .ccp-btn:active { transform: translateY(1px); }+ .ccp-btn:focus-visible { outline: 2px solid var(--accent, #7c6cff); outline-offset: 2px; }+ .ccp-btn:disabled { opacity: 0.6; cursor: progress; }+ .ccp-status { margin: 0; font-size: var(--text-xs, 0.78rem); color: var(--ink-dim, #999); display: flex; align-items: center; gap: 0.4rem; }+ .ccp-spinner {+ display: inline-block; width: 0.85em; height: 0.85em; border: 2px solid currentColor;+ border-right-color: transparent; border-radius: 50%; animation: ccp-spin 0.7s linear infinite; flex: none;+ }+ @keyframes ccp-spin { to { transform: rotate(360deg); } }+ .ccp-error { margin: 0; padding: 0.6rem 0.75rem; border-radius: var(--radius-md, 8px); border: 1px solid var(--danger, #ff6b6b); color: var(--danger, #ff6b6b); font-size: var(--text-xs, 0.78rem); }+ .ccp-summary { margin: 0; font-size: var(--text-xs, 0.78rem); color: var(--ink-dim, #999); }+ .ccp-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm, 0.85rem); }+ .ccp-table th { text-align: left; font-size: var(--text-xs, 0.72rem); text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-dim, #999); padding: 0.3rem 0.5rem; border-bottom: 1px solid var(--stroke, rgba(255,255,255,0.12)); }+ .ccp-table td { padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--stroke, rgba(255,255,255,0.08)); vertical-align: top; }+ .ccp-table tr.is-cheapest td { background: var(--surface-2, rgba(124,108,255,0.08)); }+ .ccp-table .ccp-price { font-weight: 700; white-space: nowrap; }+ .ccp-table .ccp-ship { color: var(--ink-dim, #999); font-size: var(--text-xs, 0.78rem); }+ .ccp-wrap { max-height: 320px; overflow: auto; border: 1px solid var(--stroke, rgba(255,255,255,0.12)); border-radius: var(--radius-md, 8px); }+ .ccp-next { margin: 0; padding: 0.7rem 0.85rem; border-radius: var(--radius-md, 8px); border: 1px solid var(--stroke, rgba(255,255,255,0.12)); background: var(--surface-1, #16161d); font-size: var(--text-xs, 0.78rem); line-height: 1.55; color: var(--ink, #eee); }+ .ccp-next a { color: var(--accent, #7c6cff); }+ .ccp-next a:focus-visible { outline: 2px solid var(--accent, #7c6cff); outline-offset: 2px; }+ @media (prefers-reduced-motion: reduce) { .ccp-spinner { animation-duration: 1.5s; } }+ `;+ document.head.appendChild(style);+}++/**+ * Render the "Get it printed" panel into `host`: a button that fetches live+ * Craftcloud prices, then the results table with the cheapest option on top+ * and a link to finish the purchase on Craftcloud's own site.+ *+ * @param {HTMLElement} host+ * @param {{ creationId?: string|null, glbUrl?: string|null }} opts+ */+export function renderCraftcloudPrint(host, { creationId = null, glbUrl = null } = {}) {+ injectStyles();+ if (!creationId && !glbUrl) {+ host.innerHTML = '<p class="ccp-intro">Save this model first; Craftcloud needs a stored file to upload.</p>';+ return;+ }+ host.innerHTML = `+ <div class="ccp">+ <p class="ccp-intro">Craftcloud compares about 186 print shops worldwide. Upload this model to see real prices by material and shop, then finish the order on Craftcloud. three.ws never takes payment for this.</p>+ <button class="ccp-btn" type="button">Get live Craftcloud prices</button>+ <div class="ccp-result" aria-live="polite"></div>+ </div>`;+ const btn = host.querySelector('.ccp-btn');+ const result = host.querySelector('.ccp-result');++ async function run() {+ btn.disabled = true;+ result.innerHTML = '<p class="ccp-status"><span class="ccp-spinner" aria-hidden="true"></span> Uploading to Craftcloud and pricing across its network. This checks dozens of shops, so it can take up to a minute.</p>';+ try {+ const res = await fetch('/api/print/craftcloud-quote', {+ method: 'POST',+ headers: { 'content-type': 'application/json' },+ body: JSON.stringify(creationId ? { creationId } : { glbUrl }),+ });+ const body = await res.json().catch(() => null);+ if (!res.ok || !body) {+ throw new Error(body?.error?.message || body?.message || `Craftcloud quote failed (${res.status})`);+ }+ renderResult(body);+ } catch (err) {+ log('quote failed', err);+ result.innerHTML = `<p class="ccp-error">${esc(err.message || 'Could not reach Craftcloud right now.')}</p><button class="ccp-btn" type="button" id="ccp-retry">Try again</button>`;+ result.querySelector('#ccp-retry')?.addEventListener('click', run);+ } finally {+ btn.disabled = false;+ }+ }++ function renderResult(data) {+ const rows = Array.isArray(data.quotes) ? data.quotes : [];+ if (rows.length === 0) {+ result.innerHTML = '<p class="ccp-summary">Craftcloud priced this model but no shop in its network can run it as-is. Try a different size or material on <a href="/materialize">Materialize</a> instead.</p>';+ return;+ }+ const cheapestTotal = (q) => q.price + (q.shipping?.price || 0);+ const sorted = [...rows].sort((a, b) => cheapestTotal(a) - cheapestTotal(b));+ const tableRows = sorted+ .slice(0, 25)+ .map(+ (q, i) => `+ <tr class="${i === 0 ? 'is-cheapest' : ''}">+ <td>${esc(q.vendorId)}</td>+ <td>${esc(q.materialLabel)}</td>+ <td class="ccp-price">${money(q.price, q.currency)}</td>+ <td class="ccp-ship">${q.shipping ? `+ ${money(q.shipping.price, q.shipping.currency)} shipping, ${esc(q.shipping.deliveryTime || '?')} days` : 'shipping not quoted'}</td>+ </tr>`,+ )+ .join('');+ // The STL this quote used lives only on Craftcloud's upload now (we never+ // stored it); for a saved creation, the existing slicer STL endpoint+ // regenerates the same print-ready file on demand, so link to that+ // instead of a path nothing serves. A raw glbUrl has no such endpoint, so+ // it gets the plain filename with no link.+ let fileRef = esc(data.stlFileName || 'the STL');+ if (creationId) {+ try {+ fileRef = `<a href="${esc(slicerModelUrl(location.origin, creationId))}" rel="noopener">${esc(data.stlFileName || 'model.stl')}</a>`;+ } catch {+ /* not a UUID; fall back to the plain filename above */+ }+ }+ result.innerHTML = `+ <p class="ccp-summary">${data.vendorCount} shop${data.vendorCount === 1 ? '' : 's'} quoted ${data.quoteCount} material option${data.quoteCount === 1 ? '' : 's'}${data.allComplete ? '' : ' so far'}.</p>+ <div class="ccp-wrap">+ <table class="ccp-table">+ <thead><tr><th>Shop</th><th>Material</th><th>Price</th><th>Shipping</th></tr></thead>+ <tbody>${tableRows}</tbody>+ </table>+ </div>+ <p class="ccp-next">+ three.ws does not take payment for this: Craftcloud has no checkout link it can hand back to another site, so+ <a href="${esc(data.uploadPageUrl)}" target="_blank" rel="noopener">open Craftcloud's upload page</a>+ and drop in ${fileRef}+ to see these same prices in your own account and pay there directly.+ ${data.voucherApplied ? ' Our referral voucher applies automatically once you sign in.' : ''}+ </p>`;+ }++ btn.addEventListener('click', run);+}++function injectModalStyles() {+ if (document.getElementById('ccp-modal-styles')) return;+ const style = document.createElement('style');+ style.id = 'ccp-modal-styles';+ style.textContent = `+ .ccp-overlay {+ position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 1000;+ display: flex; align-items: center; justify-content: center; padding: 1rem;+ }+ .ccp-modal {+ background: var(--surface-0, #0e0e14); border: 1px solid var(--stroke, rgba(255,255,255,0.14));+ border-radius: var(--radius-lg, 12px); padding: 1.1rem; max-width: 560px; width: 100%;+ max-height: 85vh; overflow: auto; position: relative;+ }+ .ccp-modal h2 { margin: 0 0 0.6rem; font-size: var(--text-md, 1rem); }+ .ccp-modal-close {+ position: absolute; top: 0.7rem; right: 0.7rem; background: none; border: none; color: var(--ink-dim, #999);+ font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0.3rem;+ }+ .ccp-modal-close:hover, .ccp-modal-close:focus-visible { color: var(--ink, #eee); }+ .ccp-modal-close:focus-visible { outline: 2px solid var(--accent, #7c6cff); outline-offset: 2px; }+ `;+ document.head.appendChild(style);+}++function openCraftcloudModal({ creationId, glbUrl }) {+ injectModalStyles();+ const overlay = document.createElement('div');+ overlay.className = 'ccp-overlay';+ overlay.innerHTML = `+ <div class="ccp-modal" role="dialog" aria-modal="true" aria-label="Get it printed">+ <button class="ccp-modal-close" type="button" aria-label="Close">✕</button>+ <h2>Get it printed</h2>+ <div class="ccp-modal-body"></div>+ </div>`;+ document.body.appendChild(overlay);+ renderCraftcloudPrint(overlay.querySelector('.ccp-modal-body'), { creationId, glbUrl });++ const close = () => {+ overlay.remove();+ document.removeEventListener('keydown', onKey);+ };+ const onKey = (e) => {+ if (e.key === 'Escape') close();+ };+ overlay.querySelector('.ccp-modal-close').addEventListener('click', close);+ overlay.addEventListener('click', (e) => {+ if (e.target === overlay) close();+ });+ document.addEventListener('keydown', onKey);+ overlay.querySelector('.ccp-modal-close').focus();+}++/**+ * Add a "Get it printed" row to a Forge export dropdown (the same `.export-menu`+ * the format and slicer rows live in). Mirrors `mountSlicerMenuItems`'s shape:+ * hidden until a creation id or GLB URL is known, then opens the live-price+ * modal on click.+ *+ * @param {HTMLElement} menu+ */+export function mountCraftcloudMenuItem(menu) {+ let source = { creationId: null, glbUrl: null };+ const item = document.createElement('button');+ item.type = 'button';+ item.className = 'export-item';+ item.setAttribute('role', 'menuitem');+ item.dataset.craftcloud = 'print';+ item.hidden = true;+ item.innerHTML = `+ <span class="fmt">🖨</span>+ <span class="blurb">Get it printed: live Craftcloud prices across ~186 shops, buy direct.</span>+ <span class="status" aria-live="polite"></span>`;+ item.addEventListener('click', () => {+ if (!source.creationId && !source.glbUrl) return;+ openCraftcloudModal(source);+ });+ menu.appendChild(item);+ return {+ setCreation(creationId, glbUrl = null) {+ source = { creationId: creationId || null, glbUrl: glbUrl || null };+ item.hidden = !source.creationId && !source.glbUrl;+ },+ };+}diff --git a/src/forge-export.js b/src/forge-export.jsindex dfd900919..64d8e177b 100644--- a/src/forge-export.js+++ b/src/forge-export.js@@ -27,6 +27,7 @@import { createLogger } from './shared/log.js';import { creationIdFromGlbUrl, mountSlicerMenuItems } from './slicer-handoff.js';+import { mountCraftcloudMenuItem } from './craftcloud-print.js';const log = createLogger('forge-export');@@ -211,6 +212,11 @@ if (download && resultPanel) {isLocalEdit: () => (download.getAttribute('href') || '').startsWith('blob:'),});+ // "Get it printed": live Craftcloud prices for this model, buyer pays+ // Craftcloud directly. Shown once a model is ready, same gating as the+ // slicer rows above.+ const craftcloudItem = mountCraftcloudMenuItem(menu);+// How this file was made: the mesh pipeline behind every export, credited// right where a technical visitor would look for it.const footer = document.createElement('div');@@ -480,6 +486,7 @@ if (download && resultPanel) {document.addEventListener('forge:model-ready', (e) => {sceneCache = { url: null, scene: null };slicerItems.setCreation(e.detail?.creationId || creationIdFromGlbUrl(e.detail?.glbUrl));+ craftcloudItem.setCreation(e.detail?.creationId || creationIdFromGlbUrl(e.detail?.glbUrl), e.detail?.glbUrl || null);// Retire any conversion still polling for the previous model.convertEpoch += 1;for (const status of itemStatus.values()) {diff --git a/src/forge-studio/forge-export.js b/src/forge-studio/forge-export.jsindex a46472f4a..e52947b87 100644--- a/src/forge-studio/forge-export.js+++ b/src/forge-studio/forge-export.js@@ -15,6 +15,7 @@import { createLogger } from '../shared/log.js';import { creationIdFromGlbUrl, mountSlicerMenuItems } from '../slicer-handoff.js';+import { mountCraftcloudMenuItem } from '../craftcloud-print.js';const log = createLogger('forge-export');@@ -161,6 +162,11 @@ if (download && resultPanel) {isLocalEdit: () => (download.getAttribute('href') || '').startsWith('blob:'),});+ // "Get it printed": live Craftcloud prices for this model, buyer pays+ // Craftcloud directly. Shown once a model is ready, same gating as the+ // slicer rows above.+ const craftcloudItem = mountCraftcloudMenuItem(menu);+// ---- menu behavior -------------------------------------------------------function setOpen(open) {@@ -308,6 +314,7 @@ if (download && resultPanel) {document.addEventListener('forge:model-ready', (e) => {sceneCache = { url: null, scene: null };slicerItems.setCreation(e.detail?.creationId || creationIdFromGlbUrl(e.detail?.glbUrl));+ craftcloudItem.setCreation(e.detail?.creationId || creationIdFromGlbUrl(e.detail?.glbUrl), e.detail?.glbUrl || null);for (const status of itemStatus.values()) {status.textContent = '';status.classList.remove('is-error');diff --git a/src/model-page.js b/src/model-page.jsindex e1d86dc10..7a0fa276a 100644--- a/src/model-page.js+++ b/src/model-page.js@@ -268,6 +268,7 @@ function renderInfo() {<button class="mp-action" id="mp-embed" type="button"></> Embed</button><button class="mp-action" id="mp-share" type="button">↗ Share</button><button class="mp-action" id="mp-slicer" type="button" aria-controls="mp-print-tools" title="Open this model in OrcaSlicer or Bambu Studio, or download a print-ready STL">⎙ 3D print</button>+ <button class="mp-action" id="mp-craftcloud" type="button" aria-controls="mp-craftcloud-tools" title="Get live prices from Craftcloud's print network and buy directly from them">🖨 Get it printed</button>${c.remixable ? `<button class="mp-action" id="mp-remix" type="button">Remix · $0.25</button>` : ''}</div><div class="mp-geo" id="mp-geo"><span>Reading geometry…</span></div>@@ -282,6 +283,10 @@ function renderInfo() {<summary>3D print <span>open in OrcaSlicer or Bambu Studio, or download STL</span></summary><div class="mp-tool-body" id="mp-slicer-host"></div></details>+ <details class="mp-tool" id="mp-craftcloud-tools">+ <summary>Get it printed <span>live prices from Craftcloud's print network, buy direct</span></summary>+ <div class="mp-tool-body" id="mp-craftcloud-host"></div>+ </details></section><p class="mp-desc">${esc(c.prompt)}</p><div class="mp-published" title="${esc(publishedAbs)}">🕒 Published ${esc(timeAgo(c.created_at))}</div>@@ -305,6 +310,7 @@ function wireTools() {const c = state.creation;const meshTools = $('mp-mesh-tools');const printTools = $('mp-print-tools');+ const craftcloudTools = $('mp-craftcloud-tools');meshTools?.addEventListener('toggle', async () => {if (!meshTools.open || meshTools.dataset.mounted) return;@@ -343,12 +349,33 @@ function wireTools() {}});+ craftcloudTools?.addEventListener('toggle', async () => {+ if (!craftcloudTools.open || craftcloudTools.dataset.mounted) return;+ craftcloudTools.dataset.mounted = '1';+ const host = $('mp-craftcloud-host');+ try {+ const { renderCraftcloudPrint } = await import('./craftcloud-print.js');+ renderCraftcloudPrint(host, { creationId: c.id, glbUrl: c.glb_url });+ } catch (err) {+ log.error('craftcloud print panel failed to load', err);+ delete craftcloudTools.dataset.mounted;+ host.textContent = 'Craftcloud prices could not load. Close and reopen this section to try again.';+ }+ });+$('mp-slicer')?.addEventListener('click', () => {if (!printTools) return;printTools.open = true;printTools.scrollIntoView({ behavior: 'smooth', block: 'center' });printTools.querySelector('summary')?.focus({ preventScroll: true });});++ $('mp-craftcloud')?.addEventListener('click', () => {+ if (!craftcloudTools) return;+ craftcloudTools.open = true;+ craftcloudTools.scrollIntoView({ behavior: 'smooth', block: 'center' });+ craftcloudTools.querySelector('summary')?.focus({ preventScroll: true });+ });}// ── physical editions ────────────────────────────────────────────────────────diff --git a/tests/print-adapter-contract.test.js b/tests/print-adapter-contract.test.jsindex 65ae5a011..784912124 100644--- a/tests/print-adapter-contract.test.js+++ b/tests/print-adapter-contract.test.js@@ -12,6 +12,7 @@import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';import { createHmac } from 'node:crypto';+import craftcloud, { cheapestQuote, cheapestShippingFor, materialConfigLabel } from '../api/_lib/print/adapters/craftcloud.js';import manual from '../api/_lib/print/adapters/manual.js';import partnerCn, { PARTNER_STATE_MAP, mapState } from '../api/_lib/print/adapters/partner-cn.js';import {@@ -28,7 +29,7 @@ import {} from '../api/_lib/print/adapters/contract.js';import { PRINT_STATUSES } from '../api/_lib/print-store.js';-const ADAPTERS = [manual, partnerCn];+const ADAPTERS = [manual, partnerCn, craftcloud];describe('conformance: every adapter satisfies the contract', () => {for (const adapter of ADAPTERS) {@@ -104,6 +105,10 @@ describe('capability routing is a comparison against published facts', () => {expect(verdict.reason).toMatch(/not offered/);});+ it('craftcloud runs any material: its network prices the whole catalog per part', () => {+ expect(adapterSupportsOrder(craftcloud, { material_id: 'anything-at-all' }).ok).toBe(true);+ });+it('a part larger than the build volume is declined, not attempted', () => {const verdict = adapterSupportsOrder(manual, {material_id: 'resin-standard',@@ -301,14 +306,102 @@ describe('partner-cn webhook verification, with only the HMAC secret', () => {});});+describe('craftcloud: unauthenticated by design, no account or key needed', () => {+ it('is always configured: its core API takes no credential', () => {+ expect(craftcloud.configured()).toBe(true);+ });++ it('refuses every webhook: the public v5 API has no callback endpoint', () => {+ const verdict = craftcloud.verifyWebhook('{"id":"x"}', {});+ expect(verdict.ok).toBe(false);+ expect(verdict.reason).toMatch(/no webhook/);+ });++ it('parseWebhook is unreachable and says so rather than returning a fake event', () => {+ expect(() => craftcloud.parseWebhook({})).toThrow(/receives no webhooks/);+ });++ it('refuses to submit without an STL asset to upload, before any network call', async () => {+ await expect(craftcloud.submit({ id: 'o1' }, {})).rejects.toThrow(/no STL asset/);+ });++ it('status() reports no news rather than inventing a transition for a cart nobody paid for', async () => {+ const out = await craftcloud.status('cart-123');+ expect(out.status).toBeNull();+ expect(out.note).toMatch(/cart-123/);+ });++ it('cancel() reports nothing was charged, since submit() never calls /v5/order', async () => {+ const out = await craftcloud.cancel({ provider_order_id: 'cart-123' }, 'buyer changed their mind');+ expect(out.ok).toBe(true);+ expect(out.note).toMatch(/Nothing was charged/);+ expect(out.note).toMatch(/buyer changed their mind/);+ });++ it('cheapestQuote picks the lowest priceInclVat, not list order', () => {+ const priceResult = {+ quotes: [+ { quoteId: 'a', vendorId: 'v1', priceInclVat: 42.5 },+ { quoteId: 'b', vendorId: 'v2', priceInclVat: 11.57 },+ { quoteId: 'c', vendorId: 'v3', priceInclVat: 99 },+ ],+ };+ expect(cheapestQuote(priceResult).quoteId).toBe('b');+ });++ it('cheapestQuote ignores quotes with no usable price', () => {+ const priceResult = { quotes: [{ quoteId: 'a', priceInclVat: Number.NaN }, { quoteId: 'b', priceInclVat: 7 }] };+ expect(cheapestQuote(priceResult).quoteId).toBe('b');+ });++ it('cheapestShippingFor only considers the requested vendor', () => {+ const priceResult = {+ shippings: [+ { shippingId: 's1', vendorId: 'v1', priceInclVat: 50 },+ { shippingId: 's2', vendorId: 'v2', priceInclVat: 5 },+ { shippingId: 's3', vendorId: 'v1', priceInclVat: 20 },+ ],+ };+ expect(cheapestShippingFor(priceResult, 'v1').shippingId).toBe('s3');+ });++ it('materialConfigLabel finds a config nested in groups -> materials -> finishGroups', () => {+ const catalog = {+ materialStructure: [+ {+ name: 'Nylons',+ materials: [+ {+ name: 'SLS Nylon PA12',+ finishGroups: [+ { name: 'Standard', materialConfigs: [{ id: 'cfg-1', name: 'SLS Nylon PA12 Standard (Solid White)' }] },+ ],+ },+ ],+ },+ ],+ };+ expect(materialConfigLabel(catalog, 'cfg-1')).toBe('SLS Nylon PA12 Standard (Solid White)');+ expect(materialConfigLabel(catalog, 'cfg-missing')).toBeNull();+ });++ it('registers in the adapter registry unconditionally', async () => {+ vi.resetModules();+ const { listAdapters } = await import('../api/_lib/print/adapters/index.js');+ expect(listAdapters().map((a) => a.key)).toContain('craftcloud');+ });+});+describe('the registry hides a lane whose credentials are absent', () => {- it('offers only the manual lane on a deployment with no partner', async () => {+ it('offers craftcloud and manual, but not an uncontracted partner, with no partner env set', async () => {delete process.env.PRINT_PARTNER_CN_URL;delete process.env.PRINT_PARTNER_CN_KEY;vi.resetModules();const { listAdapters, getAdapter, routeOrder } = await import('../api/_lib/print/adapters/index.js');- expect(listAdapters().map((a) => a.key)).toEqual(['manual']);+ expect(listAdapters().map((a) => a.key)).toEqual(['craftcloud', 'manual']);expect(getAdapter('partner-cn')).toBeNull();- expect(routeOrder({ material_id: 'resin-standard' }).adapter.key).toBe('manual');+ // craftcloud is registered ahead of manual and accepts any material, so it+ // is the default route: a human only takes a job craftcloud cannot cover.+ expect(routeOrder({ material_id: 'resin-standard' }).adapter.key).toBe('craftcloud');});});