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.

Update IBM x402 demo page, changelog, features, and sitemap

nirholas2ea641c0c6d8
diff --git a/pages/ibm/x402-demo.html b/pages/ibm/x402-demo.html
index 8cffae64c..769d9eacf 100644
--- a/pages/ibm/x402-demo.html
+++ b/pages/ibm/x402-demo.html
@@ -237,6 +237,9 @@ a:focus-visible{outline-offset:3px}
.retry{margin-top:14px;background:none;border:1px solid var(--ibm-divider);color:var(--ibm-ink);padding:9px 16px;font-family:inherit;font-size:13px;font-weight:500;cursor:pointer;transition:border-color .12s,color .12s}
.retry:hover{border-color:var(--ibm-blue);color:var(--ibm-blue)}
+/* Actionable, plain-language guidance under an error (top up / reconnect). */
+.r-tip{font-size:13px;color:var(--ibm-muted);margin:8px 0 0;line-height:1.5;font-weight:300}
+.r-status.err span:last-child{word-break:break-word;min-width:0}
.note{display:flex;gap:14px;margin-top:22px;padding:16px 18px;border:1px solid var(--ibm-border);background:var(--ibm-field)}
.note svg{flex:0 0 auto;width:20px;height:20px;color:var(--ibm-blue);margin-top:1px}
@@ -724,22 +727,45 @@ agent-3d:defined ~ .agent-skel{display:none}
var $ = function (id) { return document.getElementById(id); };
var inFlight = false;
+ // Networks the live 402 challenge is currently quoting (e.g. "Base or Solana").
+ // Used to make error guidance specific — "top up USDC on <network>".
+ var quotedNetworks = '';
// ── global resilience net ────────────────────────────────────────────────
+ // Last-ditch catch for an unexpected throw or rejected promise, so a visitor
+ // sees a calm, dismissible notice instead of a half-rendered panel. It is
+ // deliberately conservative: this page also loads a lazy-booting 3D agent,
+ // <model-viewer>, and cross-origin embeds, all of which own their own failure
+ // UI. Their noise (and opaque cross-origin "Script error." with no detail, or
+ // aborted fetches) must never raise an alarming banner on an IBM property.
+ // Shows once; the close button re-arms it.
+ var bannerShown = false;
function showBanner(msg) {
- var b = $('errBanner'); if (!b) return;
+ var b = $('errBanner'); if (!b || bannerShown) return;
+ bannerShown = true;
$('errBannerText').textContent = msg || 'Something went wrong. Reload the page if it persists.';
b.classList.add('show');
}
+ // Noise, or failures owned by a third-party module that renders its own state.
+ var BENIGN_ERR = /ResizeObserver|^Script error\.?$|model-viewer|agent-3d|esm\.sh|WebGL|webgl|\.glb\b|Loading chunk|importing a module|dynamically imported|AbortError|The operation was aborted|NetworkError when attempting/i;
+ function isBenignReason(reason) {
+ if (reason == null) return true; // no detail → not actionable
+ if (reason.name === 'AbortError' || reason.code === 'cancelled') return true;
+ var text = reason.message ? reason.message : String(reason);
+ return BENIGN_ERR.test(text);
+ }
window.addEventListener('error', function (e) {
- // Ignore benign ResizeObserver noise; surface anything real, non-fatally.
- if (e && e.message && /ResizeObserver/.test(e.message)) return;
+ // No message → opaque cross-origin error (carries nothing actionable); skip.
+ if (!e || !e.message || BENIGN_ERR.test(e.message)) return;
showBanner('A script error occurred. The demo may be degraded — reload to recover.');
});
- window.addEventListener('unhandledrejection', function () {
- showBanner('A background request failed. Check your connection and try again.');
+ window.addEventListener('unhandledrejection', function (e) {
+ if (isBenignReason(e && e.reason)) return;
+ showBanner('A background request failed. Check your connection, then retry below.');
+ });
+ $('errBannerClose').addEventListener('click', function () {
+ $('errBanner').classList.remove('show'); bannerShown = false;
});
- $('errBannerClose').addEventListener('click', function () { $('errBanner').classList.remove('show'); });
function escapeHtml(s) {
return String(s == null ? '' : s).replace(/[&<>"']/g, function (c) {
@@ -887,8 +913,13 @@ agent-3d:defined ~ .agent-skel{display:none}
})
.catch(function (err) {
var label = $('pvLabel'); label.className = 'preview-label err';
- $('pvLabelText').textContent = 'Could not reach the endpoint (' + err.message + ').';
- $('pvRows').innerHTML = '<button class="pv-retry" type="button" id="pvRetry">Retry</button>';
+ $('pvLabelText').textContent = navigator.onLine
+ ? "Couldn't read the live price just now — the payment button still works."
+ : "You're offline — the live price will load when you reconnect.";
+ var detail = escapeHtml(String((err && err.message) || 'request failed')).slice(0, 120);
+ $('pvRows').innerHTML =
+ '<div class="preview-row"><span class="v" style="color:var(--ibm-subtle)">' + detail + '</span></div>' +
+ '<button class="pv-retry" type="button" id="pvRetry">Retry</button>';
var r = $('pvRetry'); if (r) r.addEventListener('click', loadChallengePreview);
})
.then(function () { if (preview) preview.setAttribute('aria-busy', 'false'); });
@@ -900,6 +931,7 @@ agent-3d:defined ~ .agent-skel{display:none}
var nets = Object.keys(byNet).map(function (k) { return byNet[k]; });
var first = nets[0];
var decimals = (first.extra && first.extra.decimals) || 6;
+ quotedNetworks = nets.map(function (a) { return networkLabel(a.network); }).join(' or ');
var priceHtml = first.amount === '1000'
? '$<strong>0.001</strong>'
@@ -946,12 +978,28 @@ agent-3d:defined ~ .agent-skel{display:none}
announce(msg || 'Waiting for your wallet.');
agentOnWaiting();
}
+ // Turn a (sometimes cryptic) wallet/facilitator/network message into one line
+ // of plain-language next-step guidance. Empty string when the message already
+ // speaks for itself.
+ function payGuidance(msg) {
+ var m = String(msg || '').toLowerCase();
+ if (/insufficient|not enough|exceeds balance|transfer amount exceeds|enough usdc|enough funds|low balance/.test(m)) {
+ return 'Top up USDC on ' + (quotedNetworks || 'your wallet network') + ', then try again.';
+ }
+ if (/offline|failed to fetch|networkerror|connection|timeout|timed out|could not reach/.test(m)) {
+ return 'Check your connection, then try again.';
+ }
+ return '';
+ }
function setResultError(msg) {
var text = msg || 'Something went wrong.';
+ var tip = payGuidance(text);
var el = $('result'); el.className = 'result is-error';
- el.innerHTML = '<div class="r-status err"><span aria-hidden="true">✕</span> <span>' + escapeHtml(text) + '</span></div><button class="retry" type="button" id="retryBtn">Try again</button>';
+ el.innerHTML = '<div class="r-status err"><span aria-hidden="true">✕</span> <span>' + escapeHtml(text) + '</span></div>' +
+ (tip ? '<p class="r-tip">' + escapeHtml(tip) + '</p>' : '') +
+ '<button class="retry" type="button" id="retryBtn">Try again</button>';
var rb = $('retryBtn'); if (rb) rb.addEventListener('click', runPayment);
- announce('Error: ' + text);
+ announce('Error: ' + text + (tip ? ' ' + tip : ''));
agentOnError();
}
function recoPill(result) {
@@ -1162,6 +1210,8 @@ agent-3d:defined ~ .agent-skel{display:none}
var inFlight = false;
var pollTimer = null;
var genTimer = null;
+ // Networks the live 402 challenge is quoting, for specific error guidance.
+ var quotedNetworks = '';
function escapeHtml(s) {
return String(s == null ? '' : s).replace(/[&<>"']/g, function (c) {
@@ -1271,8 +1321,13 @@ agent-3d:defined ~ .agent-skel{display:none}
})
.catch(function (err) {
var label = $('fgPvLabel'); label.className = 'preview-label err';
- $('fgPvLabelText').textContent = 'Could not reach the endpoint (' + err.message + ').';
- $('fgPvRows').innerHTML = '<button class="pv-retry" type="button" id="fgPvRetry">Retry</button>';
+ $('fgPvLabelText').textContent = navigator.onLine
+ ? "Couldn't read the live price just now — the forge button still works."
+ : "You're offline — the live price will load when you reconnect.";
+ var detail = escapeHtml(String((err && err.message) || 'request failed')).slice(0, 120);
+ $('fgPvRows').innerHTML =
+ '<div class="preview-row"><span class="v" style="color:var(--ibm-subtle)">' + detail + '</span></div>' +
+ '<button class="pv-retry" type="button" id="fgPvRetry">Retry</button>';
var r = $('fgPvRetry'); if (r) r.addEventListener('click', loadChallengePreview);
})
.then(function () { if (preview) preview.setAttribute('aria-busy', 'false'); });
@@ -1284,6 +1339,7 @@ agent-3d:defined ~ .agent-skel{display:none}
var nets = Object.keys(byNet).map(function (k) { return byNet[k]; });
var first = nets[0];
var decimals = (first.extra && first.extra.decimals) || 6;
+ quotedNetworks = nets.map(function (a) { return networkLabel(a.network); }).join(' or ');
var atomic = Number(first.amount);
if (isFinite(atomic) && atomic > 0) { TIER_ATOMIC[selectedTier] = atomic; syncTierUi(); }
@@ -1313,12 +1369,25 @@ agent-3d:defined ~ .agent-skel{display:none}
el.innerHTML = '<div class="r-status"><span class="spin" aria-hidden="true"></span><span>' + escapeHtml(msg) + '</span></div>';
announce(msg);
}
+ function payGuidance(msg) {
+ var m = String(msg || '').toLowerCase();
+ if (/insufficient|not enough|exceeds balance|transfer amount exceeds|enough usdc|enough funds|low balance/.test(m)) {
+ return 'Top up USDC on ' + (quotedNetworks || 'your wallet network') + ', then try again.';
+ }
+ if (/offline|failed to fetch|networkerror|connection|timeout|timed out|could not reach|lost contact/.test(m)) {
+ return 'Check your connection, then try again.';
+ }
+ return '';
+ }
function setResultError(msg) {
var text = msg || 'Something went wrong.';
+ var tip = payGuidance(text);
var el = $('fgResult'); el.className = 'result is-error';
- el.innerHTML = '<div class="r-status err"><span aria-hidden="true">✕</span> <span>' + escapeHtml(text) + '</span></div><button class="retry" type="button" id="fgRetry">Try again</button>';
+ el.innerHTML = '<div class="r-status err"><span aria-hidden="true">✕</span> <span>' + escapeHtml(text) + '</span></div>' +
+ (tip ? '<p class="r-tip">' + escapeHtml(tip) + '</p>' : '') +
+ '<button class="retry" type="button" id="fgRetry">Try again</button>';
var rb = $('fgRetry'); if (rb) rb.addEventListener('click', runForge);
- announce('Error: ' + text);
+ announce('Error: ' + text + (tip ? ' ' + tip : ''));
}
function setResultGenerating(payment, etaSec, startTs) {
var el = $('fgResult'); el.className = 'result is-loading';
diff --git a/public/changelog.json b/public/changelog.json
index a65b01fa2..6eb125fa7 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-18T08:27:05.363Z",
+ "generated_at": "2026-06-18T08:58:12.479Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
diff --git a/public/features.json b/public/features.json
index 350051958..6122c76f7 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-18T08:27:05.341Z",
+ "generated_at": "2026-06-18T08:58:12.351Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/public/sitemap/index.html b/public/sitemap/index.html
index 7bcf2ec13..f77b0cb11 100644
--- a/public/sitemap/index.html
+++ b/public/sitemap/index.html
@@ -56,6 +56,20 @@
.sm-brand img { width: 24px; height: 24px; border-radius: 5px; }
.sm-brand:hover { text-decoration: none; }
</style>
+
+ <meta property="og:type" content="website">
+ <meta property="og:site_name" content="three.ws">
+ <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:url" content="https://three.ws/sitemap">
+ <meta property="og:image" content="https://three.ws/og-image.png">
+ <meta property="og:image:width" content="1200">
+ <meta property="og:image:height" content="630">
+ <meta name="twitter:card" content="summary_large_image">
+ <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/og-image.png">
+ <script type="application/ld+json">{"@context":"https://schema.org","@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"}}</script>
</head>
<body>
<header class="sm-topbar">