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(seo): submit newly added pages to IndexNow after a deploy with npm run seo:indexnow
nirholas36c229707861
diff --git a/docs/ops/gcp-production.md b/docs/ops/gcp-production.mdindex 8a13b89a4..e6770380b 100644--- a/docs/ops/gcp-production.md+++ b/docs/ops/gcp-production.md@@ -151,6 +151,11 @@ curl -s https://three.ws/api/version | jq '{commitShort, branch, builtAt, revisi# Sweep every page declared in data/pages.json against the live site. deploy:gcp# runs this automatically after the purge; run it standalone any time.npm run smoke:prod++# Tell Bing, Yandex, Seznam and Naver about pages added in the last 7 days so+# they are indexed in minutes. Run only after the deploy is live (IndexNow+# fetches every URL it is given). --days N, --since YYYY-MM-DD, --all, --dry-run.+npm run seo:indexnow```> **A fresh deploy worktree needs THREE staged artifacts, not justdiff --git a/package.json b/package.jsonindex 81aea5b24..050de64e0 100644--- a/package.json+++ b/package.json@@ -327,6 +327,7 @@"snapshot": "node scripts/page-snapshot.mjs","build:news": "node scripts/build-news.mjs","prebuild": "node scripts/copy-three-decoders.mjs && node scripts/copy-voice-models.mjs && (node scripts/build-news.mjs & node scripts/build-skill-metadata.mjs & node scripts/build-local-skill-packs.mjs & node scripts/build-discovery-cards.mjs & node scripts/build-guards.mjs & node scripts/build-atlas-index.mjs & (node scripts/build-mcp-catalog.mjs && node scripts/build-mcp-tool-history.mjs) & node scripts/build-awesome.mjs & node scripts/build-prompt-library.mjs & node scripts/build-community-registry.mjs --check & npm run build:examples & npm run build:docs-search & npm run build:club-assets & npm run build:walk-environments & wait) && node scripts/check-mcp-catalog.mjs && node scripts/inject-blog-seo.mjs --write && node scripts/inject-hidden-guard.mjs --write && node scripts/i18n-annotate.mjs --apply --pages=\"public/news/*.html\" && (node scripts/build-page-index.mjs && node scripts/i18n-annotate.mjs --apply --no-wire --pages=\"public/sitemap/index.html\" && node scripts/audit-page-index.mjs --strict && node scripts/audit-empty-handlers.mjs && node scripts/audit-hidden-guard.mjs) && node scripts/inject-seo-meta.mjs --write && node scripts/inject-theme-boot.mjs --write",+ "seo:indexnow": "node scripts/indexnow-submit.mjs","seo:meta": "node scripts/inject-blog-seo.mjs --write && node scripts/build-page-index.mjs && node scripts/inject-seo-meta.mjs --write","build": "NODE_OPTIONS='--no-deprecation --max-old-space-size=6144' vite build && node scripts/strip-sw-from-embeds.mjs && node scripts/inject-tour-boot.mjs && node scripts/inject-atlas.mjs && node scripts/inject-inline-behaviors.mjs","build:wasm": "node scripts/build-wasm.mjs",diff --git a/scripts/indexnow-submit.mjs b/scripts/indexnow-submit.mjsnew file mode 100644index 000000000..25de173d8--- /dev/null+++ b/scripts/indexnow-submit.mjs@@ -0,0 +1,80 @@+#!/usr/bin/env node+// Submit pages from data/pages.json to IndexNow (Bing, Yandex, Seznam, Naver)+// so a freshly deployed page is indexed in minutes instead of at the next crawl.+// Run it after a deploy has landed: IndexNow fetches the URLs it is given, so a+// page that is not live yet wastes the submission.+//+// node scripts/indexnow-submit.mjs pages added in the last 7 days+// node scripts/indexnow-submit.mjs --days 30 a wider window+// node scripts/indexnow-submit.mjs --since 2026-10-01+// node scripts/indexnow-submit.mjs --all every page in the manifest+// node scripts/indexnow-submit.mjs --dry-run print the list, send nothing+//+// The key file lives at public/<key>.txt and the client at api/_lib/indexnow.js.++import { readFileSync } from 'node:fs';+import { pingIndexNow } from '../api/_lib/indexnow.js';++const ORIGIN = 'https://three.ws';+// IndexNow accepts up to 10,000 URLs per request.+const BATCH = 10_000;++function parseArgs(argv) {+ const opts = { days: 7, since: null, all: false, dryRun: false };+ for (let i = 0; i < argv.length; i++) {+ const a = argv[i];+ if (a === '--all') opts.all = true;+ else if (a === '--dry-run') opts.dryRun = true;+ else if (a === '--days') opts.days = Number(argv[++i]);+ else if (a === '--since') opts.since = argv[++i];+ else throw new Error(`unknown argument: ${a}`);+ }+ if (!Number.isFinite(opts.days) || opts.days <= 0) throw new Error('--days needs a positive number');+ if (opts.since && Number.isNaN(Date.parse(opts.since))) throw new Error('--since needs a date like 2026-10-01');+ return opts;+}++function selectPages(manifest, opts) {+ const cutoff = opts.since+ ? new Date(opts.since).toISOString().slice(0, 10)+ : new Date(Date.now() - opts.days * 86_400_000).toISOString().slice(0, 10);+ const urls = new Set();+ for (const section of manifest.sections) {+ for (const page of section.pages) {+ if (!page.path || page.path.includes(':')) continue;+ if (!opts.all && !(page.added && page.added >= cutoff)) continue;+ urls.add(ORIGIN + page.path);+ }+ }+ return { urls: [...urls], cutoff };+}++async function main() {+ const opts = parseArgs(process.argv.slice(2));+ const manifest = JSON.parse(readFileSync(new URL('../data/pages.json', import.meta.url), 'utf8'));+ const { urls, cutoff } = selectPages(manifest, opts);+ const scope = opts.all ? 'every page' : `pages added since ${cutoff}`;+ if (urls.length === 0) {+ console.log(`[indexnow] no ${scope}; nothing to submit`);+ return;+ }+ console.log(`[indexnow] ${urls.length} URL(s), ${scope}`);+ if (opts.dryRun) {+ for (const u of urls) console.log(` ${u}`);+ return;+ }+ let failed = 0;+ for (let i = 0; i < urls.length; i += BATCH) {+ const chunk = urls.slice(i, i + BATCH);+ const res = await pingIndexNow(chunk);+ const detail = res.status ? `HTTP ${res.status}` : res.error;+ console.log(`[indexnow] batch ${i / BATCH + 1}: ${chunk.length} URL(s) ${res.ok ? 'accepted' : 'rejected'} (${detail})`);+ if (!res.ok) failed++;+ }+ if (failed) process.exitCode = 1;+}++main().catch((err) => {+ console.error(`[indexnow] ${err.message}`);+ process.exitCode = 1;+});