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
docs(privacy): disclose the selfie photos the avatar pipeline already retains
nirholas44624d57c0fb
diff --git a/public/legal/privacy.html b/public/legal/privacy.htmlindex 4b651d94e..f2e5c6602 100644--- a/public/legal/privacy.html+++ b/public/legal/privacy.html@@ -64,7 +64,7 @@<script src="/nav.js"></script><main id="main-content" class="wrap" tabindex="-1"><h1 data-i18n="legal_privacy.privacy_policy">Privacy Policy</h1>- <p class="meta" data-i18n-html="legal_privacy.effective_july_16_2026_version_2_terms">Effective: July 16, 2026 · Version 2 · <a href="/legal/tos">Terms of Service</a></p>+ <p class="meta" data-i18n-html="legal_privacy.effective_july_16_2026_version_2_terms">Effective: September 11, 2026 · Version 3 · <a href="/legal/tos">Terms of Service</a></p><p data-i18n="legal_privacy.this_privacy_policy_explains_how_three_ws">This Privacy Policy explains how three.ws ("we", "us", "our") collects, uses, and shares information about you when you use three.ws (the "Service"). We take your privacy seriously and collect only what we need to operate.</p>@@ -74,6 +74,7 @@<tr><th data-i18n="legal_privacy.category">Category</th><th data-i18n="legal_privacy.examples">Examples</th><th data-i18n="legal_privacy.why">Why</th></tr><tr><td data-i18n="legal_privacy.account_identifiers">Account identifiers</td><td data-i18n="legal_privacy.wallet_address_email_optional_username_displ">Wallet address, email (optional), username, display name</td><td data-i18n="legal_privacy.authentication_account_management">Authentication & account management</td></tr><tr><td data-i18n="legal_privacy.content_you_upload">Content you upload</td><td data-i18n="legal_privacy.3d_models_glb_gltf_thumbnails_agent_metadata">3D models (GLB/glTF), thumbnails, agent metadata</td><td data-i18n="legal_privacy.service_delivery_cdn_delivery_to_viewers">Service delivery, CDN delivery to viewers</td></tr>+ <tr><td data-i18n="legal_privacy.photos_you_capture_or_upload">Photos you capture or upload</td><td data-i18n="legal_privacy.one_frontal_photo_and_up_to_two_optional_sid">One frontal photo and up to two optional side angles, if you use the selfie flow</td><td data-i18n="legal_privacy.building_your_3d_avatar_and_reproducing_re_r">Building your 3D avatar, and reproducing, re-rigging or re-scoring that result</td></tr><tr><td data-i18n="legal_privacy.on_chain_data">On-chain data</td><td data-i18n="legal_privacy.erc_8004_agent_registrations_metaplex_nft_mi">ERC-8004 agent registrations, Metaplex NFT mints, USDC payment tx hashes</td><td data-i18n="legal_privacy.identity_verification_subscription_status">Identity verification, subscription status</td></tr><tr><td data-i18n="legal_privacy.usage_data">Usage data</td><td data-i18n="legal_privacy.api_calls_widget_load_events_no_ips">API calls, widget load events (no IPs, no fingerprints)</td><td data-i18n="legal_privacy.quota_enforcement_abuse_prevention_aggregate">Quota enforcement, abuse prevention, aggregate analytics</td></tr><tr><td data-i18n="legal_privacy.session_data">Session data</td><td data-i18n="legal_privacy.hashed_session_token_ip_address_hashed_user">Hashed session token, IP address (hashed), user agent</td><td data-i18n="legal_privacy.authentication_security">Authentication, security</td></tr>@@ -84,6 +85,9 @@</div><p data-i18n-html="legal_privacy.we_do_not_collect_advertising_identifiers_us">We do <strong>not</strong> collect advertising identifiers, use third-party tracking pixels, or sell personal data to any third party.</p>+ <h3 data-i18n="legal_privacy.1a_photos_you_capture_or_upload">1a. Photos You Capture or Upload</h3>+ <p data-i18n-html="legal_privacy.if_you_use_the_selfie_flow_the_photos_you">If you use the selfie flow, the photos you capture (one frontal image and up to two optional side angles) are uploaded to our reconstruction service and used to build your 3D avatar. They are stored with the generation record so the result can be reproduced, re-rigged and re-scored for quality, and they are visible only to your account. They are deleted when you delete the generation or your account, subject to the retention windows in Section 5. We do <strong>not</strong> use them to train models, we do <strong>not</strong> share them with advertisers, and we do <strong>not</strong> derive or store a face template or any other biometric identifier from them. Using the selfie flow is optional: you can upload a photo from your gallery instead, or describe a character in words and never provide a photo at all.</p>+<h2 data-i18n="legal_privacy.2_how_we_use_your_information">2. How We Use Your Information</h2><ul><li data-i18n="legal_privacy.to_authenticate_you_and_maintain_your_sessio">To authenticate you and maintain your session.</li>diff --git a/public/locales/en.json b/public/locales/en.jsonindex a58d68ef7..ac6333cca 100644--- a/public/locales/en.json+++ b/public/locales/en.json@@ -21089,5 +21089,10 @@"total_tvl": "Total TVL","tvl": "TVL","yield_data_from_defillama_apy_figures_are": "Yield data from <a href=\"https://defillama.com/yields\" rel=\"noopener noreferrer\" target=\"_blank\">DeFiLlama</a>. APY figures are protocol-reported and vary with pool conditions. Not financial advice."- }+ },+ "legal_privacy.photos_you_capture_or_upload": "Photos you capture or upload",+ "legal_privacy.one_frontal_photo_and_up_to_two_optional_sid": "One frontal photo and up to two optional side angles, if you use the selfie flow",+ "legal_privacy.building_your_3d_avatar_and_reproducing_re_r": "Building your 3D avatar, and reproducing, re-rigging or re-scoring that result",+ "legal_privacy.1a_photos_you_capture_or_upload": "1a. Photos You Capture or Upload",+ "legal_privacy.if_you_use_the_selfie_flow_the_photos_you": "If you use the selfie flow, the photos you capture (one frontal image and up to two optional side angles) are uploaded to our reconstruction service and used to build your 3D avatar. They are stored with the generation record so the result can be reproduced, re-rigged and re-scored for quality, and they are visible only to your account. They are deleted when you delete the generation or your account, subject to the retention windows in Section 5. We do <strong>not</strong> use them to train models, we do <strong>not</strong> share them with advertisers, and we do <strong>not</strong> derive or store a face template or any other biometric identifier from them. Using the selfie flow is optional: you can upload a photo from your gallery instead, or describe a character in words and never provide a photo at all."}diff --git a/scripts/play-listing-translations.mjs b/scripts/play-listing-translations.mjsnew file mode 100644index 000000000..44c92f788--- /dev/null+++ b/scripts/play-listing-translations.mjs@@ -0,0 +1,257 @@+#!/usr/bin/env node+// play-listing-translations - build the file Play Console's "Import translations"+// card takes, with every field inside Play's character limits.+//+// Why this exists: Play's limits are per LOCALE, not per source. The English+// listing sits at 28/30 on the title and 79/80 on the short description, and+// almost every language runs longer than English, so a machine translation that+// reads perfectly still lands at 94 characters and Play flags the locale with+// "Some languages have errors". Length is a hard constraint of the job here, not+// a formatting detail, so every field is measured and re-asked until it fits.+//+// The app name is deliberately NOT translated. It is a brand followed by a+// three-word descriptor, it already uses 28 of its 30 characters, and there is+// no language in which a translated version reliably fits. Play accepts the same+// name in every locale.+//+// Usage:+// node scripts/play-listing-translations.mjs # every locale+// node scripts/play-listing-translations.mjs --locales=de-DE,ja-JP+// node scripts/play-listing-translations.mjs --provider=groq # default: nvidia+// node scripts/play-listing-translations.mjs --concurrency=3++import { readFileSync, writeFileSync } from 'node:fs';+import { fileURLToPath } from 'node:url';+import path from 'node:path';++const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');+const LISTING = path.join(ROOT, 'solana-mobile/publish-play/listing');+const OUT = path.join(LISTING, 'translations.csv');++const args = Object.fromEntries(process.argv.slice(2).map((a) => {+ const m = a.match(/^--([^=]+)(?:=(.*))?$/);+ return m ? [m[1], m[2] ?? true] : [a, true];+}));++/** Play's published ceilings. Exceeding one is exactly what the console flags. */+const LIMITS = { title: 30, short: 80, full: 4000 };++const read = (f) => readFileSync(path.join(LISTING, f), 'utf8').trim();+const TITLE = read('title.txt');+const SHORT = read('short-description.txt');+const FULL = read('full-description.txt');++if (TITLE.length > LIMITS.title) throw new Error(`[play-i18n] the English title is already ${TITLE.length}/${LIMITS.title}`);++/* Play's own locale codes, as the console spells them. */+const LOCALES = [+ ['es-ES', 'Spanish (Spain)'], ['es-419', 'Spanish (Latin America)'],+ ['pt-BR', 'Portuguese (Brazil)'], ['pt-PT', 'Portuguese (Portugal)'],+ ['fr-FR', 'French'], ['de-DE', 'German'], ['it-IT', 'Italian'], ['nl-NL', 'Dutch'],+ ['pl-PL', 'Polish'], ['ru-RU', 'Russian'], ['uk', 'Ukrainian'], ['tr-TR', 'Turkish'],+ ['ar', 'Arabic'], ['hi-IN', 'Hindi'], ['id', 'Indonesian'], ['th', 'Thai'],+ ['vi', 'Vietnamese'], ['ja-JP', 'Japanese'], ['ko-KR', 'Korean'],+ ['zh-CN', 'Chinese (Simplified)'], ['zh-TW', 'Chinese (Traditional)'],+];++/* Terms that must survive translation byte for byte: product names, chain and+ format names, the support URLs. A translated "glTF" or a localised domain is+ a broken listing, not a localised one. */+const KEEP = [+ 'three.ws', 'glTF', 'GLB', 'HTML', 'Solana', 'Metaplex Core', 'Mobile Wallet Adapter',+ 'SOL', 'Android', 'Google Play', 'Notion', '[email protected]',+ 'https://three.ws/docs', 'github.com/nirholas/three.ws', 'github.com/nirholas/three.ws/issues',+];++const PROVIDERS = {+ nvidia: { envKey: 'NVIDIA_API_KEY', url: 'https://integrate.api.nvidia.com/v1/chat/completions', model: 'nvidia/nemotron-3-ultra-550b-a55b' },+ groq: { envKey: 'GROQ_API_KEY', url: 'https://api.groq.com/openai/v1/chat/completions', model: 'qwen/qwen3.8-27b' },+ mistral: { envKey: 'MISTRAL_API_KEY', url: 'https://api.mistral.ai/v1/chat/completions', model: 'mistral-small-latest' },+ openai: { envKey: 'OPENAI_API_KEY', url: 'https://api.openai.com/v1/chat/completions', model: 'gpt-4o-mini' },+};++const providerName = String(args.provider || 'nvidia');+const provider = PROVIDERS[providerName];+if (!provider) throw new Error(`[play-i18n] --provider must be one of ${Object.keys(PROVIDERS).join(', ')}`);+const apiKey = process.env[provider.envKey];+if (!apiKey) {+ throw new Error(`[play-i18n] ${provider.envKey} is not set. Resolve it with:\n export ${provider.envKey}="$(node scripts/read-service-env.mjs '^${provider.envKey}$' --raw)"`);+}++const sleep = (ms) => new Promise((r) => setTimeout(r, ms));++/* A free lane answers 429 and 503 under load, and both are transient: the first+ smoke run lost a locale to a single "Service temporarily overloaded" that+ succeeded on the retry. Backoff turns that into a slower row instead of a+ missing language, which on this deliverable is the difference between a file+ you can import and one you have to notice is incomplete. */+async function complete(messages, { temperature = 0.2 } = {}) {+ let lastErr;+ for (let attempt = 1; attempt <= 5; attempt += 1) {+ try {+ const res = await fetch(provider.url, {+ method: 'POST',+ headers: { 'content-type': 'application/json', authorization: `Bearer ${apiKey}` },+ body: JSON.stringify({ model: provider.model, messages, temperature, max_tokens: 16_384 }),+ signal: AbortSignal.timeout(180_000),+ });+ if (res.status === 429 || res.status >= 500) {+ const retryAfter = Number(res.headers.get('retry-after')) * 1000;+ throw Object.assign(new Error(`${providerName} ${res.status}: ${(await res.text()).slice(0, 200)}`), {+ status: res.status,+ retryAfter: Number.isFinite(retryAfter) && retryAfter > 0 ? retryAfter : 0,+ transient: true,+ });+ }+ if (!res.ok) {+ const body = await res.text();+ throw Object.assign(new Error(`${providerName} ${res.status}: ${body.slice(0, 240)}`), { status: res.status });+ }+ const json = await res.json();+ const text = json?.choices?.[0]?.message?.content;+ if (!text) throw new Error(`${providerName} returned no content`);+ return text;+ } catch (err) {+ lastErr = err;+ if (!err.transient && err.name !== 'TimeoutError') throw err;+ if (attempt === 5) break;+ await sleep(err.retryAfter || Math.min(30_000, 2_000 * 2 ** (attempt - 1)));+ }+ }+ throw lastErr;+}++/**+ * Pull one field out of a plain-text reply.+ *+ * This used to ask for JSON and it was the wrong wire format for the job. A full+ * description is multi-paragraph prose with quotes and newlines in it, so the+ * model has to escape all of it, and any reply cut short by the token ceiling+ * loses its closing brace and takes the whole locale with it: 16 of 21 locales+ * failed that way on the first bulk run, several of them holding a perfectly+ * good translation that simply would not parse. Sentinels survive truncation,+ * need no escaping, and let a short field succeed even when a long one fails.+ */+function extractField(text, tag) {+ const stripped = text.replace(/<think>[\s\S]*?<\/think>/g, '');+ const m = stripped.match(new RegExp(`<${tag}>([\\s\\S]*?)</${tag}>`));+ if (!m) throw new Error(`reply carried no <${tag}> block: ${stripped.trim().slice(0, 160)}`);+ return m[1].trim();+}++const SYSTEM = `You localise Google Play store listings. You return ONLY the requested tagged block, with no commentary before or after it and no code fences.+Never translate these terms, reproduce them exactly: ${KEEP.join(', ')}.+Keep the structure of the full description: the same paragraphs and the same section headings in the same order, each heading alone on its line.+TRANSLATE the section headings too. Leaving them in English is wrong: a reader of this listing should see no English section headers. Where the language has capital letters, set the heading in capitals; where it does not, write the heading plainly.+Write natural marketing copy a native speaker would write, not a literal word-for-word rendering.+Never invent a feature, a price, or a claim that is not in the source.+Never use the em-dash or the en-dash, in any language, even where that language's typography normally prefers one. Use a comma, a colon, a period, or parentheses instead.`;++/* The repo bans the em-dash and the en-dash everywhere, and the pre-push check+ enforces it on the generated CSV like any other file. Russian, German and+ Ukrainian copy reaches for a spaced em-dash constantly, so the system prompt+ alone is not enough: the first full run came back with nine of them. A clause+ separator becomes a comma, which every one of these languages accepts in the+ same position; inside an all-caps section heading a comma would read wrong, so+ the dash simply goes away. */+const deDash = (v) => v+ .replace(/[^\S\n]*[\u2014\u2013][^\S\n]*/g, (m, at, full) => {+ const line = full.slice(full.lastIndexOf('\n', at) + 1, (full.indexOf('\n', at) + 1 || full.length + 1) - 1);+ return /\p{Ll}/u.test(line) ? ', ' : ' ';+ })+ .replace(/ +([,.!?:;])/g, '$1')+ .replace(/[ \t]+$/gm, '');++async function translateLocale(code, name) {+ const notes = [];++ /* Each field is its own request. The short description is cheap and almost+ always lands first try; the full description is the expensive one, and+ separating them means a failure on the long field never costs the short. */+ async function field({ tag, source, limit, label, minLength }) {+ let best = null;+ for (let attempt = 1; attempt <= 4 && best === null; attempt += 1) {+ const budget = attempt === 1+ ? `It MUST be at most ${limit} characters, counting spaces and punctuation.`+ : `YOUR PREVIOUS ATTEMPT WAS ${notes[notes.length - 1]?.split(' ').pop() || 'too long'}. It MUST be at most ${limit} characters; aim for ${Math.round(limit * 0.9)}. Shorten it by cutting words, never by abbreviating into something a native speaker would not write.`;++ const reply = await complete([+ { role: 'system', content: SYSTEM },+ {+ role: 'user',+ content: `Translate this Google Play ${label} into ${name} (${code}).\n\n${budget}\n\nReturn it wrapped exactly like this and nothing else:\n<${tag}>\nthe translation\n</${tag}>\n\nSOURCE:\n${source}`,+ },+ ], { temperature: attempt === 1 ? 0.2 : 0.35 });++ let value;+ try {+ value = deDash(extractField(reply, tag));+ } catch (err) {+ notes.push(`${label} attempt ${attempt}: ${err.message.slice(0, 80)}`);+ continue;+ }+ /* A reply that parses but is far shorter than the source is a failure the+ length check alone waves through: the first run produced a pt-BR row+ holding three characters in both fields and reported it as a success. */+ if (value.length < minLength) { notes.push(`${label} attempt ${attempt}: only ${value.length} chars, implausible`); continue; }+ if (value.length > limit) { notes.push(`${label} attempt ${attempt}: ${value.length}/${limit} too long`); continue; }+ best = value;+ }+ return best;+ }++ const short = await field({ tag: 'short', source: SHORT, limit: LIMITS.short, label: 'short description', minLength: 20 });+ const full = await field({ tag: 'full', source: FULL, limit: LIMITS.full, label: 'full description', minLength: Math.round(FULL.length * 0.35) });++ /* A field that will not fit falls back to English rather than to a truncated+ sentence. English is valid in every Play locale; a sentence cut mid-word is+ the kind of thing that ships and is never noticed. */+ const out = { code, title: TITLE, short: short ?? SHORT, full: full ?? FULL, notes };+ if (short === null) notes.push('short: fell back to English');+ if (full === null) notes.push('full: fell back to English');+ return out;+}++/** RFC 4180: quote every field, double the quotes inside. Full descriptions+ carry newlines and commas, so an unquoted CSV would shred them. */+const csvField = (v) => `"${String(v).replace(/"/g, '""')}"`;++const only = args.locales ? String(args.locales).split(',').map((s) => s.trim()) : null;+const targets = LOCALES.filter(([code]) => !only || only.includes(code));+if (!targets.length) throw new Error(`[play-i18n] no locales matched --locales=${args.locales}`);++/* Low by default and on purpose: these keys are the same ones production chat+ uses, and a wide bulk run has taken the live chain down before. */+const concurrency = Math.max(1, Number(args.concurrency || 3));+const results = [];+const queue = [...targets];+await Promise.all(Array.from({ length: Math.min(concurrency, queue.length) }, async () => {+ while (queue.length) {+ const [code, name] = queue.shift();+ try {+ const row = await translateLocale(code, name);+ results.push(row);+ const flag = row.notes.some((n) => n.includes('fell back')) ? ' FALLBACK' : '';+ console.log(`[play-i18n] ${code.padEnd(7)} short ${String(row.short.length).padStart(3)}/${LIMITS.short} full ${String(row.full.length).padStart(4)}/${LIMITS.full}${flag}`);+ } catch (err) {+ console.error(`[play-i18n] ${code}: ${err.message}`);+ results.push({ code, failed: String(err.message) });+ }+ }+}));++const ok = results.filter((r) => !r.failed).sort((a, b) => a.code.localeCompare(b.code));+const rows = [+ ['locale', 'title', 'short_description', 'full_description'].join(','),+ ...ok.map((r) => [r.code, r.title, r.short, r.full].map(csvField).join(',')),+];+writeFileSync(OUT, `${rows.join('\n')}\n`, 'utf8');++console.log(`\n[play-i18n] wrote ${path.relative(ROOT, OUT)} (${ok.length} locales)`);+const fallbacks = ok.filter((r) => r.notes?.some((n) => n.includes('fell back')));+if (fallbacks.length) console.log(`[play-i18n] left in English because no translation fit: ${fallbacks.map((r) => r.code).join(', ')}`);+const failed = results.filter((r) => r.failed);+if (failed.length) {+ console.log(`[play-i18n] FAILED: ${failed.map((r) => r.code).join(', ')}`);+ process.exitCode = 1;+}