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.

fix(x-bundle): let the first pull on a never-published bundle bucket succeed with an empty overlay instead of failing the partner job

nirholas724149a56ec5
diff --git a/public/x-media/embed-article/first-frame.png b/public/x-media/embed-article/opening-frame.png
similarity index 100%
rename from public/x-media/embed-article/first-frame.png
rename to public/x-media/embed-article/opening-frame.png
diff --git a/public/x-media/give-your-ai-a-body/clip.mp4 b/public/x-media/give-your-ai-a-body/clip.mp4
deleted file mode 100644
index 6a7fc8446..000000000
Binary files a/public/x-media/give-your-ai-a-body/clip.mp4 and /dev/null differ
diff --git a/scripts/x-bundle.mjs b/scripts/x-bundle.mjs
index 4bbbac53e..81174d4ed 100644
--- a/scripts/x-bundle.mjs
+++ b/scripts/x-bundle.mjs
@@ -26,7 +26,7 @@ import { fileURLToPath } from 'node:url';
import { loadQueue } from '../api/_lib/x-content/queue.js';
import { REVIEW_MAX_AGE_DAYS } from '../api/_lib/x-content/review.js';
import { dbStore, memoryStore } from '../api/_lib/x-content/state.js';
-import { DEFAULT_OVERLAY_DIR, buildBundle, materialize, publishBundles, bundleStorage, readIndex, removeBundle, verifyBundles } from '../api/_lib/x-content/overlay.js';
+import { DEFAULT_OVERLAY_DIR, INDEX_VERSION, buildBundle, materialize, publishBundles, bundleStorage, readIndex, removeBundle, signIndex, verifyBundles } from '../api/_lib/x-content/overlay.js';
const root = resolve(fileURLToPath(new URL('..', import.meta.url)));
const DAY = 24 * 60 * 60_000;
@@ -146,7 +146,15 @@ async function list() {
async function pull() {
const dir = resolve(option('dir', DEFAULT_OVERLAY_DIR));
- const result = await materialize({ imageRoot: root, storage: bundleStorage(), dir });
+ const storage = bundleStorage();
+ // A bucket that has never been published to is the normal first run: nothing
+ // is shipped yet, so the overlay is the image's queue with no bundles on it.
+ let index = null;
+ if (!(await readIndex({ storage }))) {
+ const empty = { version: INDEX_VERSION, updatedAt: new Date().toISOString(), bundles: [] };
+ index = { ...empty, signature: signIndex(empty) };
+ }
+ const result = await materialize({ imageRoot: root, storage, dir, index });
console.log(`bundles: ${result.bundles.join(', ') || 'none'}`);
if (result.superseded.length) console.log(`already posted in this checkout's queue, so left alone: ${result.superseded.join(', ')}`);
console.log(`files: ${result.files} (${result.reused} reused from an earlier pull)`);