Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

feat(avatars): server-side completion for abandoned reconstruct jobs

nirholas165644c9e679
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9903177b5..2e324ef7b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **three.ws is an OpenAI Select Partner** (`/openai`) — three.ws is an OpenAI Select Partner in the OpenAI Partner Network. Connect the free three.ws 3D Studio MCP server to ChatGPT and turn a prompt into an interactive, riggable, AR-ready 3D model inline in the conversation.
- **three.ws Named an OpenAI Select Partner** (`/blog/three-ws-openai-select-partner`) — three.ws has been named an OpenAI Select Partner within the OpenAI Partner Network. What we ship on OpenAI surfaces today: a free 3D Studio MCP connector for ChatGPT, custom GPT Actions, the open Spatial MCP response shape, and one-tap AR.
- **Check any 3D tool result against the Spatial MCP standard, in the page, as you type** — Spatial MCP is our open standard for handing back a live 3D scene as an AI tool result instead of a link, and until now three.ws/spatial-mcp only claimed that the payloads it displayed were valid. Now it proves it. The conformance checker the standard ships runs in your browser, and every scene on the page carries its verdict underneath: conformant, zero errors, and which version of the shape it speaks. Below that is a box you can paste your own tool result into. It checks the payload as you type and, instead of answering yes or no, names the exact field that is wrong and what it should be, so anyone writing an adapter for their own 3D tool can debug it on the page without reading the specification or installing anything. Load the deliberately broken example to see the whole thing at once: six mistakes, each naming its own field, and the fallback a real host would show a user for a payload it cannot render. Anything that passes renders immediately in the same viewer. The checker is the same code our own servers validate with, now published at a fixed address so third parties can import it directly, which means what the page tells you about a payload is exactly what a build will tell you. Two safeguards landed alongside it, because this page had been quietly showing two empty frames: one refuses to ship a page that asks for a file by a path that will not resolve, and one loads the page for real in a browser and fails if a scene does not appear or an asset it depends on has gone missing. The first immediately found the same defect on three more live pages, all fixed in this release: the agent editor was loading none of its code, the Czech landing page none of its styling, and the first-meet page none of its script. (`/spatial-mcp`) `[feature, fix, infra]`
+- **Closed the tab while your avatar was building? It finishes anyway now** — Until today, a selfie avatar only completed while you kept the page open: your browser did the checking, and if you closed the tab after uploading, the engine finished your avatar but nobody ever came back to collect it. The job sat unfinished forever and your library never received the result. We found jobs stranded this way going back a month. The platform now checks in on every in-flight avatar itself, every few minutes, and files the finished result into your library exactly as if you had waited, so starting an avatar on your phone and pocketing it mid-build is now fine. The same pass also went back through every stranded job from the past month and delivered the ones whose results were still recoverable. Separately, the selfie page no longer shows a Masc and Femme body choice. Honest reason: the engine builds every avatar on one shared template body today, so that toggle changed nothing and never had, which is worse than not offering it. A real body choice, with sliders for build, height and more rather than two buttons, is planned on the parametric avatar base. (`/create/selfie`) `[fix, improvement]`
- **Crypto API: automatic upstream failover ends most rate-limit errors** — The unified crypto API (/api/v1/x) no longer fails your call just because one upstream host had a bad moment. When a provider is backed by a pool of interchangeable hosts (the Solana read endpoints front the platform's full RPC pool), a rate-limited, unreachable, or erroring host now fails over to a healthy alternate within the same request. The API also remembers which host just failed for a short window, so during an outage only the first request pays the discovery cost and everything after routes straight to a working host. Rate-limit passthrough was the second-largest error class on the aggregator; this removes it for pooled providers. (`/crypto-api`) `[improvement, infra]`
- **Dress any avatar: the wardrobe now adds clothes, not just recolours them** — Until now the wardrobe could only recolour or hide the clothes an avatar was generated with. It can now put NEW clothes on: the avatar editor's Wardrobe tab gained a Closet with racks of catalog pieces (tops, bottoms, footwear, outerwear, hair, headwear, glasses, accessories). Click a piece and it binds to your avatar's skeleton and moves with every animation, whatever generator the avatar came from: forge characters, selfie reconstructions and uploaded models all work, because garments are fitted to the skeleton at wear-time instead of being authored for one specific body. The body is masked under whatever you wear so skin never pokes through the cloth, a piece that cannot fit a particular skeleton politely refuses instead of deforming into spaghetti, and every download is integrity-checked against the catalog before it touches your avatar. Saved outfits persist: the downloadable and embedded versions of your avatar come out dressed too. (`/avatar-edit`) `[feature]`
- **Our crypto API no longer reports itself as broken to the directories that rate it** — Agent directories and uptime monitors discover an x402 API by calling every endpoint it advertises with no arguments, to check the endpoint is alive and knows its own price. Our paid-only endpoints answered that correctly with a payment challenge, but the free-tier ones ran argument validation first and answered with an error, so about two dozen perfectly healthy endpoints were being graded as failing by a public trust monitor, roughly 14,000 times a month. A parameterless call now returns the standard 402 challenge on every endpoint, with the argument you would need named in an X-Param-Error header. Nothing changes for real callers: send any argument, even an empty one, and you get the specific validation error as before. The same probes were also the single biggest source of noise in our own error metrics, so a genuine outage in the crypto API is now visible instead of buried. (`/crypto-api`) `[fix, improvement]`
diff --git a/api/cron/reconstruct-sweep.js b/api/cron/reconstruct-sweep.js
new file mode 100644
index 000000000..bd61d2e6a
--- /dev/null
+++ b/api/cron/reconstruct-sweep.js
@@ -0,0 +1,239 @@
+// @ts-check
+// GET /api/cron/reconstruct-sweep — completion backstop for selfie/prompt →
+// avatar jobs.
+//
+// A reconstruct job is advanced by the browser: /create/selfie polls
+// /api/avatars/regenerate-status, and each poll pulls provider status and runs
+// the finalize stages. Close the tab and that engine stops — the worker
+// finishes the GLB and writes it to GCS, but no one ever collects it, so the
+// job row sits at 'queued'/'running' forever and the user's library never
+// receives the avatar they made. Production had rows stranded this way going
+// back a month (12 at the time this shipped), each one a real person whose
+// avatar silently vanished.
+//
+// This sweep is the server-side driver the flow was missing: every few minutes
+// it finds reconstruct jobs that have gone quiet, asks the provider for their
+// real status, and runs the SAME finalize stages the browser poll would have —
+// so an abandoned job still lands in the user's library, exactly as if they had
+// kept the tab open. It mirrors auto-rig-sweep.js, which plays this role for
+// the rerig lane; the shared stages in reconstruct-finalize.js are what keep
+// the two completion paths from drifting.
+//
+// Scope is deliberately platform-providers-only (gcp / replicate / huggingface).
+// BYOK jobs (meshy, tripo) authenticate with the *user's* key, which the status
+// poll resolves from the request context; a cron has no user context, so those
+// jobs stay browser-driven and the age reaper below is their only backstop.
+// They are a rounding error in practice (1 of the last ~100 reconstruct jobs).
+
+import { error, json, method, wrapCron } from '../_lib/http.js';
+import { env } from '../_lib/env.js';
+import { constantTimeEquals } from '../_lib/crypto.js';
+import { sql } from '../_lib/db.js';
+import { getRegenProviderForMode } from '../_lib/regen-provider.js';
+import { finalizeReconstructStage, pollRiggingStage } from '../_lib/reconstruct-finalize.js';
+import { isAllowedProviderResultUrl } from '../_lib/provider-result-url.js';
+
+// The browser polls every few seconds while the tab is open, so a row that has
+// been untouched for 3 minutes is either abandoned or wedged — never a job
+// that is about to complete normally on its own.
+const QUIET_WINDOW = '3 minutes';
+
+// How far back the sweep still tries to RESCUE a job rather than fail it. Far
+// longer than auto-rig's window on purpose: the gcp worker parks finished GLBs
+// in GCS and its job state in Firestore, both durable, so a month-old
+// abandoned job is still perfectly recoverable — and recovering it puts a real
+// avatar in a real user's library. Beyond this, rows are reaped to 'failed' so
+// the open set cannot grow without bound (db-retention only prunes terminal
+// rows, so an open zombie would otherwise live forever).
+const RESCUE_WINDOW = '30 days';
+
+// A job whose provider is not the currently-resolved platform provider can
+// never be polled again (e.g. replicate rows from before the credential was
+// removed). Give the mismatch a day of grace in case the platform config is
+// mid-rotation, then fail it out with an honest reason.
+const MISMATCH_MAX_AGE = '24 hours';
+
+// 50/tick × 12 ticks/hour clears any plausible backlog within an hour; the
+// steady-state inflow is a handful of abandoned tabs per day. Oldest-quiet
+// first so the backlog drains FIFO and nothing is perpetually overtaken.
+const BATCH = 50;
+
+function requireCron(req, res) {
+ const secret = process.env.CRON_SECRET || env.CRON_SECRET;
+ if (!secret) {
+ error(res, 503, 'not_configured', 'CRON_SECRET unset');
+ return false;
+ }
+ const auth = req.headers['authorization'] || '';
+ const presented = auth.startsWith('Bearer ') ? auth.slice(7) : '';
+ if (!constantTimeEquals(presented, secret)) {
+ error(res, 401, 'unauthorized', 'invalid cron secret');
+ return false;
+ }
+ return true;
+}
+
+function hostOf(raw) {
+ try { return new URL(raw).hostname; } catch { return 'unparseable'; }
+}
+
+async function failJob(jobId, userId, reason) {
+ await sql`
+ update avatar_regen_jobs
+ set status = 'failed', error = ${reason}, updated_at = now()
+ where job_id = ${jobId} and user_id = ${userId}
+ `;
+}
+
+export default wrapCron(async (req, res) => {
+ if (!method(req, res, ['GET', 'POST'])) return;
+ if (!requireCron(req, res)) return;
+
+ // Open reconstruct jobs that have gone quiet and never materialized. Four
+ // states qualify:
+ // • 'queued'/'running' — abandoned mid-generation; needs a provider poll.
+ // • 'rigging' — the mesh landed bare and a rig child-job was
+ // chained; pollRiggingStage owns the follow-up.
+ // • 'done' + no avatar + no error — the provider finished and the URL was
+ // stored, but the finalize itself was interrupted. Finalized straight
+ // from the stored URL, no provider round-trip. (`error is null` keeps
+ // deliberate done-with-note closes, e.g. quota exhaustion, terminal.)
+ const rows = await sql`
+ select job_id, user_id, source_avatar_id, mode, params, status, provider,
+ ext_job_id, result_glb_url, error, created_at
+ from avatar_regen_jobs
+ where mode = 'reconstruct'
+ and result_avatar_id is null
+ and (
+ status in ('queued', 'running', 'rigging')
+ or (status = 'done' and error is null)
+ )
+ and updated_at < now() - ${QUIET_WINDOW}::interval
+ and created_at > now() - ${RESCUE_WINDOW}::interval
+ order by updated_at asc
+ limit ${BATCH}
+ `;
+
+ const summary = { scanned: rows.length, finalized: 0, rigging: 0, failed: 0, pending: 0, errored: 0, reaped: 0 };
+
+ // Reap the unrecoverable tail on every tick, disjoint from the rescue window
+ // above so the two never touch the same row (the auto-rig sweep learned this
+ // the hard way: reaping only on empty batches let zombies accrete behind a
+ // sustained backlog).
+ const reaped = await sql`
+ update avatar_regen_jobs
+ set status = 'failed',
+ error = 'reconstruct job exceeded the rescue window without completing',
+ updated_at = now()
+ where mode = 'reconstruct'
+ and status in ('queued', 'running', 'rigging')
+ and result_avatar_id is null
+ and created_at <= now() - ${RESCUE_WINDOW}::interval
+ returning job_id
+ `;
+ summary.reaped = reaped.length;
+
+ if (!rows.length) return json(res, 200, { ok: true, ...summary });
+
+ // Resolve the platform reconstruct provider once per tick. Rows whose
+ // provider doesn't match (stale credentials rotated away, or BYOK) can't be
+ // polled from cron context and are aged out individually below.
+ let provider = null;
+ try {
+ provider = await getRegenProviderForMode('reconstruct');
+ } catch (err) {
+ console.warn('[reconstruct-sweep] provider resolve failed', { error: err?.message });
+ }
+ const providerName = provider?.name ?? null;
+
+ for (const job of rows) {
+ try {
+ // Rig chain in flight — the shared stage polls the child job, swaps in
+ // the rigged GLB when it lands, or falls back to the bare mesh.
+ if (job.status === 'rigging') {
+ const result = await pollRiggingStage({ userId: job.user_id, jobId: job.job_id, job });
+ if (result.status === 'done' && result.resultAvatarId) summary.finalized++;
+ else if (result.status === 'failed') summary.failed++;
+ else summary.rigging++;
+ continue;
+ }
+
+ // Fast path: provider verdict already stored — finalize from it without
+ // a status round-trip. The SSRF host pin runs here because this column
+ // may predate the allowlist-at-write guard.
+ if (job.status === 'done' && job.result_glb_url) {
+ if (!isAllowedProviderResultUrl(job.result_glb_url)) {
+ console.warn('[reconstruct-sweep] blocked result url', { jobId: job.job_id, host: hostOf(job.result_glb_url) });
+ await failJob(job.job_id, job.user_id, 'provider returned a disallowed result url');
+ summary.failed++;
+ continue;
+ }
+ const result = await finalizeReconstructStage({
+ userId: job.user_id, jobId: job.job_id, job, glbUrl: job.result_glb_url,
+ });
+ if (result.status === 'rigging') summary.rigging++;
+ else summary.finalized++;
+ continue;
+ }
+
+ if (!job.ext_job_id) {
+ await failJob(job.job_id, job.user_id, 'reconstruct job has no provider id to poll');
+ summary.failed++;
+ continue;
+ }
+
+ if (!providerName || job.provider !== providerName) {
+ // Unpollable from here. Age it out after a day rather than instantly,
+ // in case platform credentials are mid-rotation.
+ const ageOk = await sql`
+ select 1 from avatar_regen_jobs
+ where job_id = ${job.job_id}
+ and created_at <= now() - ${MISMATCH_MAX_AGE}::interval
+ `;
+ if (ageOk.length) {
+ await failJob(
+ job.job_id, job.user_id,
+ `job provider "${job.provider}" is not pollable by the platform sweep`,
+ );
+ summary.failed++;
+ } else {
+ summary.pending++;
+ }
+ continue;
+ }
+
+ const update = await provider.instance.status(job.ext_job_id);
+
+ if (update.status === 'done' && update.resultGlbUrl) {
+ if (!isAllowedProviderResultUrl(update.resultGlbUrl)) {
+ console.warn('[reconstruct-sweep] blocked result url', { jobId: job.job_id, host: hostOf(update.resultGlbUrl) });
+ await failJob(job.job_id, job.user_id, 'provider returned a disallowed result url');
+ summary.failed++;
+ continue;
+ }
+ const result = await finalizeReconstructStage({
+ userId: job.user_id, jobId: job.job_id, job, glbUrl: update.resultGlbUrl,
+ });
+ if (result.status === 'rigging') summary.rigging++;
+ else summary.finalized++;
+ } else if (update.status === 'failed') {
+ await failJob(job.job_id, job.user_id, update.error || 'provider reported reconstruction failure');
+ summary.failed++;
+ } else {
+ // Genuinely still running — bump updated_at so the next tick doesn't
+ // re-poll it inside the quiet window.
+ await sql`
+ update avatar_regen_jobs
+ set status = ${update.status || 'running'}, updated_at = now()
+ where job_id = ${job.job_id} and user_id = ${job.user_id}
+ `;
+ summary.pending++;
+ }
+ } catch (err) {
+ console.warn('[reconstruct-sweep] job error', { jobId: job.job_id, error: err?.message });
+ summary.errored++;
+ }
+ }
+
+ return json(res, 200, { ok: true, ...summary });
+});
diff --git a/data/changelog.json b/data/changelog.json
index f2caf8f20..1562e23de 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. `link` is optional and must be a live three.ws path.",
"entries": [
+ {
+ "date": "2026-07-25",
+ "title": "Closed the tab while your avatar was building? It finishes anyway now",
+ "summary": "Until today, a selfie avatar only completed while you kept the page open: your browser did the checking, and if you closed the tab after uploading, the engine finished your avatar but nobody ever came back to collect it. The job sat unfinished forever and your library never received the result. We found jobs stranded this way going back a month. The platform now checks in on every in-flight avatar itself, every few minutes, and files the finished result into your library exactly as if you had waited, so starting an avatar on your phone and pocketing it mid-build is now fine. The same pass also went back through every stranded job from the past month and delivered the ones whose results were still recoverable. Separately, the selfie page no longer shows a Masc and Femme body choice. Honest reason: the engine builds every avatar on one shared template body today, so that toggle changed nothing and never had, which is worse than not offering it. A real body choice, with sliders for build, height and more rather than two buttons, is planned on the parametric avatar base.",
+ "tags": [
+ "fix",
+ "improvement"
+ ],
+ "link": "/create/selfie"
+ },
{
"date": "2026-07-25",
"title": "Signing avatars now sign whole sentences, touch what they are supposed to touch, and can raise an eyebrow",
diff --git a/pages/create-selfie.html b/pages/create-selfie.html
index 4edc43f00..f4e60b89f 100644
--- a/pages/create-selfie.html
+++ b/pages/create-selfie.html
@@ -1598,15 +1598,16 @@
</button>
</div>
</div>
- <div class="opt-group">
- <p class="opt-label" data-i18n="create_selfie.body">Body</p>
- <div class="toggle" role="group" aria-label="Body type">
- <button type="button" data-body="male" aria-pressed="true" data-i18n="create_selfie.masc">Masc</button>
- <button type="button" data-body="female" aria-pressed="false" data-i18n="create_selfie.femme">
- Femme
- </button>
- </div>
- </div>
+ <!-- No body-type picker, deliberately. The reconstruction engine
+ fits your face onto ONE shared template body today, so a
+ Masc/Femme toggle here would change nothing — and this page
+ shipped with exactly that: two buttons whose choice was sent,
+ accepted, and silently ignored (the worker's male/female
+ template files never existed). A control that does nothing is
+ worse than no control. Body choice returns for real when
+ reconstruction moves onto the parametric base (122 morph
+ sliders — gender, build, height), tracked in
+ docs/avatar-fidelity-program.md, Track 5. -->
</div>
<div id="submit-bar" class="submit-bar">
diff --git a/public/changelog.json b/public/changelog.json
index a3c4709a5..5d0e36ced 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-25T11:02:28.277Z",
+ "generated_at": "2026-07-25T11:13:11.300Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -58,6 +58,17 @@
"infra"
]
},
+ {
+ "date": "2026-07-25",
+ "type": "update",
+ "title": "Closed the tab while your avatar was building? It finishes anyway now",
+ "summary": "Until today, a selfie avatar only completed while you kept the page open: your browser did the checking, and if you closed the tab after uploading, the engine finished your avatar but nobody ever came back to collect it. The job sat unfinished forever and your library never received the result. We found jobs stranded this way going back a month. The platform now checks in on every in-flight avatar itself, every few minutes, and files the finished result into your library exactly as if you had waited, so starting an avatar on your phone and pocketing it mid-build is now fine. The same pass also went back through every stranded job from the past month and delivered the ones whose results were still recoverable. Separately, the selfie page no longer shows a Masc and Femme body choice. Honest reason: the engine builds every avatar on one shared template body today, so that toggle changed nothing and never had, which is worse than not offering it. A real body choice, with sliders for build, height and more rather than two buttons, is planned on the parametric avatar base.",
+ "link": "/create/selfie",
+ "tags": [
+ "fix",
+ "improvement"
+ ]
+ },
{
"date": "2026-07-25",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index 8263d20c5..771bb427b 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -46,6 +46,14 @@
<category>feature</category>
<description>Spatial MCP is our open standard for handing back a live 3D scene as an AI tool result instead of a link, and until now three.ws/spatial-mcp only claimed that the payloads it displayed were valid. Now it proves it. The conformance checker the standard ships runs in your browser, and every scene on the page carries its verdict underneath: conformant, zero errors, and which version of the shape it speaks. Below that is a box you can paste your own tool result into. It checks the payload as you type and, instead of answering yes or no, names the exact field that is wrong and what it should be, so anyone writing an adapter for their own 3D tool can debug it on the page without reading the specification or installing anything. Load the deliberately broken example to see the whole thing at once: six mistakes, each naming its own field, and the fallback a real host would show a user for a payload it cannot render. Anything that passes renders immediately in the same viewer. The checker is the same code our own servers validate with, now published at a fixed address so third parties can import it directly, which means what the page tells you about a payload is exactly what a build will tell you. Two safeguards landed alongside it, because this page had been quietly showing two empty frames: one refuses to ship a page that asks for a file by a path that will not resolve, and one loads the page for real in a browser and fails if a scene does not appear or an asset it depends on has gone missing. The first immediately found the same defect on three more live pages, all fixed in this release: the agent editor was loading none of its code, the Czech landing page none of its styling, and the first-meet page none of its script.</description>
</item>
+ <item>
+ <title>Closed the tab while your avatar was building? It finishes anyway now</title>
+ <link>https://three.ws/create/selfie</link>
+ <guid isPermaLink="false">2026-07-25:Closed the tab while your avatar was building? It finishes anyway now</guid>
+ <pubDate>Sat, 25 Jul 2026 12:00:00 GMT</pubDate>
+ <category>fix</category>
+ <description>Until today, a selfie avatar only completed while you kept the page open: your browser did the checking, and if you closed the tab after uploading, the engine finished your avatar but nobody ever came back to collect it. The job sat unfinished forever and your library never received the result. We found jobs stranded this way going back a month. The platform now checks in on every in-flight avatar itself, every few minutes, and files the finished result into your library exactly as if you had waited, so starting an avatar on your phone and pocketing it mid-build is now fine. The same pass also went back through every stranded job from the past month and delivered the ones whose results were still recoverable. Separately, the selfie page no longer shows a Masc and Femme body choice. Honest reason: the engine builds every avatar on one shared template body today, so that toggle changed nothing and never had, which is worse than not offering it. A real body choice, with sliders for build, height and more rather than two buttons, is planned on the parametric avatar base.</description>
+ </item>
<item>
<title>Crypto API: automatic upstream failover ends most rate-limit errors</title>
<link>https://three.ws/crypto-api</link>
diff --git a/public/features.json b/public/features.json
index 8f4360735..3071533ac 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-25T11:02:28.270Z",
+ "generated_at": "2026-07-25T11:13:11.290Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/src/selfie-capture.js b/src/selfie-capture.js
index 284cb2ed3..705ebedc6 100644
--- a/src/selfie-capture.js
+++ b/src/selfie-capture.js
@@ -6,7 +6,7 @@
* fidelity when supplied. Capture method (camera vs upload) is picked per slot.
*
* On submit, dispatches a `selfie:submit` CustomEvent on document with
- * detail = { files: { frontal, left?, right? }, bodyType, avatarType, method }
+ * detail = { files: { frontal, left?, right? }, avatarType, method }
* which the selfie pipeline picks up to drive avatar reconstruction.
*
* Camera overlay uses the face-quality engine for real-time 468-point wireframe,
@@ -24,7 +24,6 @@ const ETA_FAST_SEC = 90;
const ETA_HIGH_SEC = 120;
const state = {
- bodyType: /** @type {'male' | 'female'} */ ('male'),
avatarType: /** @type {'v1' | 'v2'} */ ('v1'),
files: /** @type {Record<string, File | null>} */ ({ frontal: null, left: null, right: null }),
lastMethod: /** @type {'camera' | 'upload' | null} */ (null),
@@ -54,9 +53,6 @@ const slotInputs = /** @type {NodeListOf<HTMLInputElement>} */ (
document.querySelectorAll('input[data-slot-input]')
);
const submitBtn = /** @type {HTMLButtonElement} */ (document.getElementById('submit-btn'));
-const bodyBtns = /** @type {NodeListOf<HTMLButtonElement>} */ (
- document.querySelectorAll('[data-body]')
-);
const styleBtns = /** @type {NodeListOf<HTMLButtonElement>} */ (
document.querySelectorAll('.style-card[data-type]')
);
@@ -153,13 +149,6 @@ slotInputs.forEach((input) => {
});
// ── Selectors ──────────────────────────────────────────────────────────────
-bodyBtns.forEach((btn) => {
- btn.addEventListener('click', () => {
- const val = /** @type {'male'|'female'} */ (btn.getAttribute('data-body'));
- state.bodyType = val;
- bodyBtns.forEach((b) => b.setAttribute('aria-pressed', String(b === btn)));
- });
-});
styleBtns.forEach((btn) => {
btn.addEventListener('click', () => {
const val = /** @type {'v1'|'v2'} */ (btn.getAttribute('data-type'));
@@ -182,7 +171,6 @@ submitBtn.addEventListener('click', () => {
new CustomEvent('selfie:submit', {
detail: {
files: { ...state.files },
- bodyType: state.bodyType,
avatarType: state.avatarType,
method: state.lastMethod || (cameraSupported ? 'camera' : 'upload'),
},
diff --git a/src/selfie-pipeline.js b/src/selfie-pipeline.js
index 331554589..7e298e7fb 100644
--- a/src/selfie-pipeline.js
+++ b/src/selfie-pipeline.js
@@ -132,7 +132,6 @@ document.addEventListener('selfie:submit', (event) => {
/**
* @param {{
* files: Record<'frontal'|'left'|'right', File | null>,
- * bodyType: 'male' | 'female',
* avatarType: 'v1' | 'v2',
* method: 'camera' | 'upload' | null,
* }} detail
@@ -223,7 +222,7 @@ async function run(detail) {
name: defaultAvatarName(),
photos,
visibility: 'private',
- params: { bodyType: detail.bodyType, style: detail.avatarType },
+ params: { style: detail.avatarType },
...(byok ? { provider_key: byok.key, provider_name: byok.provider } : {}),
};
const submitRes = await fetch(SUBMIT_ENDPOINT, {
diff --git a/vercel.json b/vercel.json
index 40dc044e3..4843c8033 100644
--- a/vercel.json
+++ b/vercel.json
@@ -5282,6 +5282,10 @@
"path": "/api/cron/auto-rig-sweep",
"schedule": "*/5 * * * *"
},
+ {
+ "path": "/api/cron/reconstruct-sweep",
+ "schedule": "*/5 * * * *"
+ },
{
"path": "/api/cron/smart-money-rollup",
"schedule": "*/5 * * * *"