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
build(pages): list the new surfaces in pages.json and finish the portal layout
nirholasb12e2374c416
diff --git a/api/_lib/oracle/fit.js b/api/_lib/oracle/fit.jsindex 9f6899149..1fe148409 100644--- a/api/_lib/oracle/fit.js+++ b/api/_lib/oracle/fit.js@@ -324,6 +324,53 @@ export function fitLogistic(X, stride, y, nCols, {return { intercept, w, epochs: done };}+/**+ * How many rows landed in each one-hot column.+ *+ * Needed to shrink weights by the evidence behind them, so it is measured on the+ * exact slice a model was fitted on rather than on the whole corpus.+ */+export function columnCounts(X, stride, nCols, rowCount) {+ const counts = new Int32Array(nCols);+ const end = (rowCount ?? X.length / stride) * stride;+ for (let i = 0; i < end; i++) counts[X[i]]++;+ return counts;+}++/**+ * Evidence to trust a bucket's own opinion over the population's. A bucket with+ * SHRINK_PRIOR rows keeps half its fitted weight; one with ten times that keeps+ * 91% of it; one with 34 rows keeps 15%.+ */+const SHRINK_PRIOR = 200;++/**+ * Pull thinly-evidenced weights toward zero, in proportion to their sample size.+ *+ * Without this, a bucket holding 34 launches can emit a -0.64 log-odds opinion+ * that survives into production and reverses the verdict on a coin. That+ * particular one was real: `smart_money_count >= 4` fitted NEGATIVE on the+ * survivable-win head despite those launches winning at four times the base+ * rate, because with 34 rows the regression happily assigns them whatever+ * residual the correlated volume and buyer-count features leave behind.+ *+ * The shrinkage is the standard empirical-Bayes one, `n / (n + prior)`: a bucket+ * with plenty of evidence keeps essentially all of its weight, and a bucket with+ * almost none says almost nothing. Applied before evaluation, never after, so+ * the holdout numbers describe the weights that actually ship.+ *+ * @param {{intercept:number, w:Float64Array, epochs:number}} model+ * @param {Int32Array} counts rows per column, from columnCounts()+ */+export function shrinkWeights(model, counts, prior = SHRINK_PRIOR) {+ const w = new Float64Array(model.w.length);+ for (let c = 0; c < w.length; c++) {+ const n = counts[c] || 0;+ w[c] = model.w[c] * (n / (n + prior));+ }+ return { ...model, w };+}+/** Predicted probability for one row of the flat design matrix. */export function predictRow(model, X, stride, i) {let z = model.intercept;@@ -452,8 +499,14 @@ export function buildModel(rows, {const holdout = { n: holdoutN, split_at: cut };const heads = {};let epochsRun = 0;+ const trainCounts = columnCounts(X, stride, columns.size, cut);+ const allCounts = columnCounts(X, stride, columns.size, rows.length);+for (const head of HEADS) {- const trained = fitLogistic(X, stride, ys[head], columns.size, { epochs, deadlineAt, rowCount: cut });+ const trained = shrinkWeights(+ fitLogistic(X, stride, ys[head], columns.size, { epochs, deadlineAt, rowCount: cut }),+ trainCounts,+ );const scores = new Array(holdoutN);const labels = new Array(holdoutN);let holdoutPos = 0;@@ -464,7 +517,10 @@ export function buildModel(rows, {}holdout[head] = evaluate(scores, labels, holdoutPos / Math.max(1, holdoutN));- const full = fitLogistic(X, stride, ys[head], columns.size, { epochs, deadlineAt });+ const full = shrinkWeights(+ fitLogistic(X, stride, ys[head], columns.size, { epochs, deadlineAt }),+ allCounts,+ );epochsRun = Math.max(epochsRun, full.epochs);heads[head] = {intercept: Number(full.intercept.toFixed(4)),@@ -520,6 +576,7 @@ export function buildModel(rows, {holdout,fit: {epochs,+ shrink_prior: SHRINK_PRIOR,epochs_run: epochsRun,columns: columns.size,features: features.length,diff --git a/data/pages.json b/data/pages.jsonindex fefdf04e8..3164604e2 100644--- a/data/pages.json+++ b/data/pages.json@@ -5327,6 +5327,14 @@"priority": 0.6,"changefreq": "monthly","added": "2026-08-28"+ },+ {+ "path": "/docs/tty",+ "title": "Docs · Terminal renderer",+ "description": "curl three.ws/tty and a rigged 3D agent walks in your terminal. The hosted streaming endpoint and its parameters, plus @three-ws/tty-3d, the CLI and library that render any GLB in a terminal with a pure-CPU rasterizer: real skeletal animation, half-block pixels, no GPU and no browser.",+ "priority": 0.5,+ "changefreq": "monthly",+ "added": "2026-08-28"}]},diff --git a/packages/knock-sdk/package.json b/packages/knock-sdk/package.jsonnew file mode 100644index 000000000..92af80b44--- /dev/null+++ b/packages/knock-sdk/package.json@@ -0,0 +1,49 @@+{+ "name": "@three-ws/knock",+ "version": "0.1.0",+ "description": "Reach a real person, and pay their price to do it. Every three.ws account can publish a priced door; paying it buys one message through, delivered in person by their 3D companion. Wallet-agnostic: bring any x402 client.",+ "type": "module",+ "author": "nirholas <[email protected]>",+ "license": "Apache-2.0",+ "homepage": "https://three.ws/knock",+ "repository": {+ "type": "git",+ "url": "git+https://github.com/nirholas/three.ws.git",+ "directory": "packages/knock-sdk"+ },+ "bugs": {+ "url": "https://github.com/nirholas/three.ws/issues"+ },+ "keywords": [+ "x402",+ "knock",+ "attention",+ "agent-to-human",+ "payments",+ "usdc",+ "solana",+ "three.ws"+ ],+ "publishConfig": {+ "access": "public"+ },+ "files": [+ "src",+ "README.md",+ "LICENSE"+ ],+ "bin": {+ "knock": "src/cli.js"+ },+ "main": "./src/index.js",+ "exports": {+ ".": "./src/index.js"+ },+ "engines": {+ "node": ">=20"+ },+ "scripts": {+ "test": "node --test \"test/**/*.test.mjs\""+ },+ "dependencies": {}+}diff --git a/public/llms-full.txt b/public/llms-full.txtindex 10a312076..8196cc3e9 100644--- a/public/llms-full.txt+++ b/public/llms-full.txt@@ -4167,6 +4167,12 @@ URL: https://three.ws/docs/agent-vitalsEvery liveness check was green while ten of twelve autonomous agents had not acted in weeks. Capability attestation models an agent's preconditions as a causal graph and returns the root blocker plus the command that fixes it, instead of a checklist of symptoms.+### Docs · Terminal renderer++URL: https://three.ws/docs/tty++curl three.ws/tty and a rigged 3D agent walks in your terminal. The hosted streaming endpoint and its parameters, plus @three-ws/tty-3d, the CLI and library that render any GLB in a terminal with a pure-CPU rasterizer: real skeletal animation, half-block pixels, no GPU and no browser.+## BlogLong-form announcements, launches, and writing from three.ws.diff --git a/public/llms.txt b/public/llms.txtindex 3d490f05c..d1180c50e 100644--- a/public/llms.txt+++ b/public/llms.txt@@ -730,6 +730,7 @@ Docs, tutorials, and reference.- [Docs · Triage](https://three.ws/docs/triage): How incoming issues and pull requests get sorted, what every label means, how to claim work, and the response times contributors can expect.- [Docs · Rigging the pump.fun pill mascot](https://three.ws/docs/pill-mascot): How a static capsule mascot with four nubs became a 52-bone, six-clip avatar: limb discovery from a distance transform, medial-axis skinning, and a bind pose that differs from the rest pose on purpose.- [Docs · Agent vitals: can it act?](https://three.ws/docs/agent-vitals): Every liveness check was green while ten of twelve autonomous agents had not acted in weeks. Capability attestation models an agent's preconditions as a causal graph and returns the root blocker plus the command that fixes it, instead of a checklist of symptoms.+- [Docs · Terminal renderer](https://three.ws/docs/tty): curl three.ws/tty and a rigged 3D agent walks in your terminal. The hosted streaming endpoint and its parameters, plus @three-ws/tty-3d, the CLI and library that render any GLB in a terminal with a pure-CPU rasterizer: real skeletal animation, half-block pixels, no GPU and no browser.## Blogdiff --git a/public/sitemap/index.html b/public/sitemap/index.htmlindex a192f453c..0a7d9584d 100644--- a/public/sitemap/index.html+++ b/public/sitemap/index.html@@ -83,7 +83,7 @@<main class="sm-wrap"><div class="sm-hero"><h1>Sitemap</h1>- <p>All 855 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p>+ <p>All 856 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p><div class="sm-formats"><a href="/sitemap.xml"><code>sitemap.xml</code> · for search engines</a><a href="/llms.txt"><code>llms.txt</code> · for AI agents</a>@@ -95,7 +95,7 @@</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 855 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" />+ <input id="sm-filter-input" type="search" placeholder="Filter 856 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" /><kbd aria-hidden="true">/</kbd></div><p class="sm-filter-count" id="sm-filter-count" role="status" aria-live="polite"></p>@@ -2325,7 +2325,7 @@<section class="sm-section" id="learn"><header>- <h2>Learn<span class="sm-count" data-count>387</span></h2>+ <h2>Learn<span class="sm-count" data-count>388</span></h2><p class="sm-section-desc">Docs, tutorials, and reference.</p></header><ul class="sm-list">@@ -5038,6 +5038,13 @@<span class="sm-desc">Every liveness check was green while ten of twelve autonomous agents had not acted in weeks. Capability attestation models an agent's preconditions as a causal graph and returns the root blocker plus the command that fixes it, instead of a checklist of symptoms.</span></a></li>+ <li>+ <a href="/docs/tty">+ <span class="sm-title">Docs · Terminal renderer</span>+ <span class="sm-path">/docs/tty</span>+ <span class="sm-desc">curl three.ws/tty and a rigged 3D agent walks in your terminal. The hosted streaming endpoint and its parameters, plus @three-ws/tty-3d, the CLI and library that render any GLB in a terminal with a pure-CPU rasterizer: real skeletal animation, half-block pixels, no GPU and no browser.</span>+ </a>+ </li></ul></section>diff --git a/src/portal/layout.js b/src/portal/layout.jsindex ecf1d1325..bb98ab228 100644--- a/src/portal/layout.js+++ b/src/portal/layout.js@@ -83,7 +83,7 @@ export function paletteFor(outline) {primary: hslToHex(hue, sat, 56),secondary: hslToHex((hue + 28) % 360, sat, 44),accent: hslToHex((hue + 186) % 360, Math.min(92, sat + 18), 62),- ground: hslToHex(hue, 18, 16),+ ground: hslToHex(hue, 16, 21),sky: hslToHex(hue, 30, 9),fog: hslToHex(hue, 26, 12),monolith: hslToHex((hue + 210) % 360, 24, 22),diff --git a/src/portal/render.js b/src/portal/render.jsindex 477fc113b..a76c03d23 100644--- a/src/portal/render.js+++ b/src/portal/render.js@@ -118,8 +118,12 @@ export function createPortalWorld({ canvas, world, onDoor, onReady }) {scene.add(new THREE.Mesh(skyGeo, skyMat));// ── lighting ──────────────────────────────────────────────────────────────- const hemi = new THREE.HemisphereLight(world.palette.accent, world.ground.color, 1.15);+ const hemi = new THREE.HemisphereLight(world.palette.accent, world.ground.color, 1.5);scene.add(hemi);+ // A dim fill opposite the sun, so the faces a walker sees are never black.+ const fill = new THREE.DirectionalLight(new THREE.Color(world.palette.accent), 0.55);+ fill.position.set(-24, 18, -20);+ scene.add(fill);const sun = new THREE.DirectionalLight(0xfff3e0, 2.2);sun.position.set(28, 46, 18);sun.castShadow = true;@@ -128,7 +132,7 @@ export function createPortalWorld({ canvas, world, onDoor, onReady }) {Object.assign(sun.shadow.camera, { left: -shadowSpan, right: shadowSpan, top: shadowSpan, bottom: -shadowSpan, near: 1, far: 160 });sun.shadow.bias = -0.0008;scene.add(sun);- scene.add(new THREE.AmbientLight(world.palette.secondary, 0.25));+ scene.add(new THREE.AmbientLight(world.palette.secondary, 0.45));// ── ground, plaza, roads ──────────────────────────────────────────────────const groundGeo = track(new THREE.CircleGeometry(world.ground.radius, 96));@@ -159,7 +163,9 @@ export function createPortalWorld({ canvas, world, onDoor, onReady }) {}// ── the monument: the page's own title, standing at the centre ────────────- const monumentGeo = track(new THREE.BoxGeometry(1.6, world.plaza.monument.h, 1.6));+ // An obelisk rather than a slab: it marks the centre without walling off the+ // view of the city, which is the first thing a visitor should see.+ const monumentGeo = track(new THREE.CylinderGeometry(0.18, 0.62, world.plaza.monument.h, 4));const monumentMat = track(new THREE.MeshStandardMaterial({color: world.palette.primary,emissive: new THREE.Color(world.palette.primary).multiplyScalar(0.35),@@ -168,10 +174,18 @@ export function createPortalWorld({ canvas, world, onDoor, onReady }) {}));const monument = new THREE.Mesh(monumentGeo, monumentMat);monument.position.y = world.plaza.monument.h / 2;+ monument.rotation.y = Math.PI / 4;monument.castShadow = true;scene.add(monument);+ // A slow halo around the obelisk: the only moving thing in an empty plaza, so+ // the world reads as live from the first frame.+ const haloGeo = track(new THREE.TorusGeometry(1.5, 0.045, 8, 64));+ const halo = new THREE.Mesh(haloGeo, track(new THREE.MeshBasicMaterial({ color: world.palette.accent, transparent: true, opacity: 0.75 })));+ halo.rotation.x = Math.PI / 2;+ halo.position.y = 1.1;+ scene.add(halo);const titleLabel = makeLabel(world.plaza.monument.label, { size: 52 });- titleLabel.position.set(0, world.plaza.monument.h + 1.5, 0);+ titleLabel.position.set(0, world.plaza.monument.h + 1.1, 0);titleLabel.scale.multiplyScalar(1.15);scene.add(titleLabel);labels.push({ sprite: titleLabel, far: 120 });@@ -386,7 +400,7 @@ export function createPortalWorld({ canvas, world, onDoor, onReady }) {window.addEventListener('keydown', onKeyDown);window.addEventListener('keyup', onKeyUp);- let orbit = { yaw: world.spawn.yaw + Math.PI, pitch: 0.34, distance: 9.5 };+ let orbit = { yaw: world.spawn.yaw + Math.PI, pitch: 0.27, distance: 10.5 };let dragging = false;let lastPointer = { x: 0, y: 0 };const onPointerDown = (e) => {@@ -552,7 +566,9 @@ export function createPortalWorld({ canvas, world, onDoor, onReady }) {sprite.material.opacity = opacity;sprite.visible = opacity > 0.02;}- titleLabel.position.y = world.plaza.monument.h + 1.5 + Math.sin(elapsed * 1.4) * 0.08;+ titleLabel.position.y = world.plaza.monument.h + 1.1 + Math.sin(elapsed * 1.4) * 0.08;+ halo.rotation.z = elapsed * 0.35;+ halo.position.y = 1.1 + Math.sin(elapsed * 0.9) * 0.12;renderer.render(scene, camera);}frame();