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.

chore(lint): clear the last 15 eslint errors across the tracked tree

nirholas1e4a0336c45d
diff --git a/eslint.config.js b/eslint.config.js
index debb10ee4..83a559174 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -35,6 +35,9 @@ export default [
// never built or shipped. See third_party/README.md.
'third_party/**',
'**/*.bundle.js',
+ // The metaplex deployer site's esbuild output, committed so the static
+ // docs/ folder serves without a build step. Its source is linted.
+ 'packages/metaplex-agent-mcp/docs/app.js',
'public/dashboard/avaturn-sdk.js',
// Self-contained sub-projects with their own ESLint flat config
'chat/**',
diff --git a/scripts/build-ibm-community-post.mjs b/scripts/build-ibm-community-post.mjs
index 1c0435c5b..44e3da204 100644
--- a/scripts/build-ibm-community-post.mjs
+++ b/scripts/build-ibm-community-post.mjs
@@ -45,7 +45,7 @@ const raw = readFileSync(SRC, 'utf8');
// Frontmatter is editorial metadata for us, never post content.
const fm = raw.match(/^---\n([\s\S]*?)\n---\n/);
if (!fm) throw new Error(`${SRC} has no frontmatter to strip; refusing to guess where the post starts.`);
-const title = (fm[1].match(/^title:\s*"?(.*?)"?\s*$/m) || [, 'IBM Community post'])[1];
+const title = (fm[1].match(/^title:\s*"?(.*?)"?\s*$/m)?.[1] ?? 'IBM Community post');
let body = raw.slice(fm[0].length);
diff --git a/scripts/check-apple-widget.mjs b/scripts/check-apple-widget.mjs
index b88810bb9..1a6e98460 100644
--- a/scripts/check-apple-widget.mjs
+++ b/scripts/check-apple-widget.mjs
@@ -178,7 +178,7 @@ pass('the Swift client calls the endpoint with the query the server reads');
// The platform hint only exists to point an unlinked card at the right
// hand-off, so the value the client sends has to be one the server routes.
-const flows = (mine.match(/LINK_FLOWS = \{([^}]+)\}/) || [, ''])[1];
+const flows = (mine.match(/LINK_FLOWS = \{([^}]+)\}/)?.[1] ?? '');
for (const value of ['macos', 'ios']) {
if (!flows.includes(`${value}:`)) fail(`api/glance/mine.js does not route ?platform=${value} to a link flow`);
if (!client.includes(`return "${value}"`)) fail(`the Swift client never reports platform=${value}`);
@@ -208,7 +208,7 @@ const sizes = [...svg.matchAll(/^\t(small|medium|large):/gm)].map((m) => m[1]);
for (const size of sizes) {
if (!new RegExp(`case ${size}\\b`).test(card)) fail(`GlanceSize has no case for the server size "${size}"`);
}
-const scales = (png.match(/GLANCE_PNG_SCALES = \[([^\]]+)\]/) || [, ''])[1]
+const scales = (png.match(/GLANCE_PNG_SCALES = \[([^\]]+)\]/)?.[1] ?? '')
.split(',')
.map((n) => Number(n.trim()));
const swiftScales = [...card.matchAll(/\? (\d) : (\d)/g)].flatMap((m) => [Number(m[1]), Number(m[2])]);
@@ -219,15 +219,15 @@ pass(`sizes and scales agree with the server (${sizes.join(', ')} at ${swiftScal
// The deep link, both ends.
const link = read('apple/GlanceKit/GlanceLink.swift');
-const appleUrl = (token.match(/return `(threews:\/\/[^`]+)`/) || [, ''])[1];
+const appleUrl = (token.match(/return `(threews:\/\/[^`]+)`/)?.[1] ?? '');
if (!appleUrl.startsWith('threews://glance/link?token=')) {
fail(`api/glance/token.js builds an apple link the widget does not recognise: ${appleUrl || 'none'}`);
}
if (!link.includes('static let host = "glance"') || !link.includes('static let path = "/link"')) {
fail('GlanceLink no longer claims threews://glance/link');
}
-const serverPattern = (read('api/_lib/glance-tokens.js').match(/TOKEN_RE = \/\^(.+?)\$\//) || [, ''])[1];
-const swiftPattern = (read('apple/GlanceKit/GlanceTokenStore.swift').match(/pattern = "\^(.+?)\$"/) || [, ''])[1];
+const serverPattern = (read('api/_lib/glance-tokens.js').match(/TOKEN_RE = \/\^(.+?)\$\//)?.[1] ?? '');
+const swiftPattern = (read('apple/GlanceKit/GlanceTokenStore.swift').match(/pattern = "\^(.+?)\$"/)?.[1] ?? '');
if (!serverPattern || serverPattern !== swiftPattern) {
fail(`the token shape differs: server /${serverPattern}/ against Swift /${swiftPattern}/`);
}
diff --git a/scripts/check-windows-widget.mjs b/scripts/check-windows-widget.mjs
index a435fc203..a4093b358 100644
--- a/scripts/check-windows-widget.mjs
+++ b/scripts/check-windows-widget.mjs
@@ -200,12 +200,12 @@ if (missingEvents.length) {
}
pass(`the worker handles all ${REQUIRED_EVENTS.length} board lifecycle events`);
-const swTag = (sw.match(/const GLANCE_TAG = '([^']+)'/) || [, ''])[1];
+const swTag = (sw.match(/const GLANCE_TAG = '([^']+)'/)?.[1] ?? '');
if (swTag !== widget.tag) {
fail(`the worker updates tag "${swTag}" but the manifest pins the widget to "${widget.tag}"`);
}
-const swData = (sw.match(/const GLANCE_DATA_URL = '([^']+)'/) || [, ''])[1];
-const swTemplate = (sw.match(/const GLANCE_TEMPLATE_URL = '([^']+)'/) || [, ''])[1];
+const swData = (sw.match(/const GLANCE_DATA_URL = '([^']+)'/)?.[1] ?? '');
+const swTemplate = (sw.match(/const GLANCE_TEMPLATE_URL = '([^']+)'/)?.[1] ?? '');
if (swData !== widget.data) fail(`the worker fetches ${swData} but the manifest declares ${widget.data}`);
if (swTemplate !== widget.ms_ac_template) {
fail(`the worker falls back to ${swTemplate} but the manifest declares ${widget.ms_ac_template}`);
diff --git a/src/categories.js b/src/categories.js
index 2aff074e0..11f2db83c 100644
--- a/src/categories.js
+++ b/src/categories.js
@@ -293,10 +293,8 @@ function bindActions(el) {
renderTable();
// Land focus on the first newly revealed row so the keyboard path
// continues where the button was instead of at the top of the table.
- $('cat-table')
- ?.querySelectorAll('tbody tr')
- [state.shown - PAGE_SIZE]?.querySelector('a')
- ?.focus();
+ const rows = $('cat-table')?.querySelectorAll('tbody tr');
+ rows?.[state.shown - PAGE_SIZE]?.querySelector('a')?.focus();
});
}
diff --git a/tests/mcp-studio.test.js b/tests/mcp-studio.test.js
index 2e0c6769a..d610c7b55 100644
--- a/tests/mcp-studio.test.js
+++ b/tests/mcp-studio.test.js
@@ -288,7 +288,7 @@ describe('mcp-studio dispatch', () => {
// bucket 2026-09-09: Origin https://three.ws gets the header back,
// ChatGPT's sandbox origin gets none.
const { COMPONENT_HTML } = await import('../api/_mcp-studio/component.js');
- const src = COMPONENT_HTML.match(/function fetchable\(glb\) \{[\s\S]*?\n \}/);
+ const src = COMPONENT_HTML.match(/function fetchable\(glb\) \{[\s\S]*?\n {2}\}/);
const guard = COMPONENT_HTML.match(/function isHttps\(u\) \{[^\n]*\}/);
expect(src, 'the widget must define a fetchable() indirection').not.toBeNull();
expect(guard, 'fetchable() leans on the widget isHttps() guard').not.toBeNull();