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
fix(deploy): stage the payments SDK build and drop the raw NUL bytes the tests reject
nirholas4b91c8d8a64c
diff --git a/api/_lib/drops.js b/api/_lib/drops.jsindex 0b7d370b7..fa46ebad6 100644--- a/api/_lib/drops.js+++ b/api/_lib/drops.js@@ -201,7 +201,7 @@ export function scoreRarity(items, supply = items.length) {const counts = new Map();for (const item of items) {for (const t of item.traits) {- const k = `${t.layer} ${t.value}`;+ const k = `${t.layer}\u0000${t.value}`;counts.set(k, (counts.get(k) || 0) + 1);}}@@ -209,7 +209,7 @@ export function scoreRarity(items, supply = items.length) {const scored = items.map((item) => {let score = 0;for (const t of item.traits) {- const seen = counts.get(`${t.layer} ${t.value}`) || 1;+ const seen = counts.get(`${t.layer}\u0000${t.value}`) || 1;score += supply / seen;}return { ...item, rarity_score: round4(score) };@@ -344,14 +344,14 @@ export function itemPrompt({ style, traits, layers }) {const promptByPair = new Map();for (const layer of layers) {for (const option of layer.options) {- promptByPair.set(`${layer.key} ${option.value}`, option.prompt);+ promptByPair.set(`${layer.key}\u0000${option.value}`, option.prompt);}}const order = new Map(layers.map((l, i) => [l.key, i]));const fragments = [...traits].sort((a, b) => (order.get(a.layer) ?? 0) - (order.get(b.layer) ?? 0))- .map((t) => promptByPair.get(`${t.layer} ${t.value}`) || t.value)+ .map((t) => promptByPair.get(`${t.layer}\u0000${t.value}`) || t.value).filter(Boolean);const base = String(style || '').trim();diff --git a/scripts/prepare-deploy-worktree.mjs b/scripts/prepare-deploy-worktree.mjsindex 700b74d8a..031651497 100644--- a/scripts/prepare-deploy-worktree.mjs+++ b/scripts/prepare-deploy-worktree.mjs@@ -86,6 +86,23 @@ export const ARTIFACTS = [optional: true,why: 'an in-worktree avatar-studio rebuild',},+ {+ // The workspace symlink node_modules/@three-ws/agent-payments resolves to+ // ../../agent-payments-sdk, whose package.json main/module/exports all+ // point into dist/. dist/ is gitignored, so a fresh worktree carries the+ // package source with no entry behind it, and every importer dies with+ // "Failed to resolve entry for package @three-ws/agent-payments" rather+ // than naming the artifact that is actually missing.+ rel: 'agent-payments-sdk/dist',+ build: ['npm', ['run', 'build', '--prefix', 'agent-payments-sdk']],+ why: 'anything importing @three-ws/agent-payments, which otherwise fails to resolve its entry',+ },+ {+ rel: 'agent-payments-sdk/node_modules',+ build: null,+ optional: true,+ why: 'an in-worktree agent-payments-sdk rebuild',+ },];/** Env files copied (never hardlinked: a deploy tree must not share their inode). */diff --git a/tests/prepare-deploy-worktree.test.js b/tests/prepare-deploy-worktree.test.jsindex b19a20db8..85e4f0008 100644--- a/tests/prepare-deploy-worktree.test.js+++ b/tests/prepare-deploy-worktree.test.js@@ -28,9 +28,16 @@ function plan(args) {}describe('ARTIFACTS', () => {- it('covers all three artifacts the runbook requires, none of them optional', () => {+ it('covers every artifact a fresh worktree cannot produce, none of them optional', () => {const required = ARTIFACTS.filter((a) => !a.optional).map((a) => a.rel);- expect(required).toEqual(['node_modules', 'chat/node_modules', 'character-studio/build']);+ expect(required).toEqual([+ 'node_modules',+ 'chat/node_modules',+ 'character-studio/build',+ // Gitignored, so a fresh worktree has agent-payments-sdk/ source with+ // no entry behind its package.json main/module/exports.+ 'agent-payments-sdk/dist',+ ]);});it('can regenerate every required artifact except the root dependency tree', () => {