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
feat(solana-mobile): first signed Seeker APK, real assetlinks fingerprint, and generated listing media
nirholasd3f951d05f73
diff --git a/public/.well-known/assetlinks.json b/public/.well-known/assetlinks.jsonnew file mode 100644index 000000000..cdffa04e6--- /dev/null+++ b/public/.well-known/assetlinks.json@@ -0,0 +1,15 @@+[+ {+ "relation": [+ "delegate_permission/common.handle_all_urls",+ "delegate_permission/common.use_as_origin"+ ],+ "target": {+ "namespace": "android_app",+ "package_name": "ws.three.app",+ "sha256_cert_fingerprints": [+ "49:84:9C:CC:7B:7D:19:87:F6:14:BD:DD:F6:FE:21:63:F8:2B:FD:EF:A1:C1:5F:2F:0A:B9:CF:37:4D:77:DC:27"+ ]+ }+ }+]diff --git a/solana-mobile/README.md b/solana-mobile/README.mdindex 4b52a41f0..f20381397 100644--- a/solana-mobile/README.md+++ b/solana-mobile/README.md@@ -17,7 +17,9 @@ solana-mobile/│ └── package.json # declares MWA peer/runtime deps├── scripts/│ ├── init-publisher.sh # one-time: mint Publisher + App NFTs on Solana+│ ├── setup-android-sdk.sh # headless machines: stage JDK 17 + Android SDK for Bubblewrap│ ├── build-apk.sh # generate keystore (if needed), build + sign release APK+│ ├── make-media.mjs # generate icon/banner/feature listing assets from the live product│ ├── update-assetlinks.sh # refresh /public/.well-known/assetlinks.json from the keystore│ └── publish.sh # mint Release NFT + submit to the dApp Store├── publish/ # solana-mobile/dapp-store-cli config + listing copy@@ -53,6 +55,11 @@ cd solana-mobileSOLANA_KEYPAIR=~/.config/solana/publisher.json ./scripts/init-publisher.sh# Commit the addresses written into publish/config.yaml.+# 1.5. Headless machine (codespace/container) with no Android toolchain yet:+# stages JDK 17 + Android SDK under ~/.bubblewrap with the exact layout+# Bubblewrap expects and seeds its config. Idempotent.+./scripts/setup-android-sdk.sh+# 2. Build the signed APK (creates the keystore on first run — back it up!).# Runs unattended: passwords reach Bubblewrap via env vars, the Android# project is regenerated from twa/twa-manifest.json with `bubblewrap@@ -79,7 +86,7 @@ repo does not use GitHub Actions.## What was NOT added to the bundle (intentional)- **Promo video** — optional for v1, can be added later via `publish/media/video.mp4`.-- **Screenshots** — must be captured on a real Seeker device (see `docs/ASSETS.md`); no placeholders are checked in because reviewers reject them.+- **Screenshots**: must be captured on a real Seeker device (see `docs/ASSETS.md`); no placeholders are checked in because reviewers reject them. The three buildable assets (`icon.png`, `banner.png`, `feature.png`) ARE checked in under `publish/media/`; regenerate them any time with `node scripts/make-media.mjs` (the feature graphic is a live Playwright capture of a real agent page).- **Privacy policy + EULA pages** — these are content for the main three.ws site, not this bundle. They must be live at `/legal/privacy` and `/legal/eula` before submission.## See alsodiff --git a/solana-mobile/docs/ASSETS.md b/solana-mobile/docs/ASSETS.mdindex b335642ee..88ca0a6f6 100644--- a/solana-mobile/docs/ASSETS.md+++ b/solana-mobile/docs/ASSETS.md@@ -2,6 +2,8 @@Drop these files into `solana-mobile/publish/media/` (referenced from `config.yaml`). Every asset must be PNG, RGB or RGBA, no transparency on the icon. Use 100% real product UI — Solana dApp Store reviewers reject mocked screenshots.+`icon.png`, `banner.png`, and `feature.png` are generated: run `node solana-mobile/scripts/make-media.mjs` from the repo root. The icon is the flattened PWA icon, the banner is composed from the vector logo plus the listing tagline, and the feature graphic is a live Playwright capture of a real agent page on three.ws. Only the five screenshots below require a physical Seeker.+| File | Purpose | Size | Required | Notes || ----------------- | --------------- | --------------- | -------- | ---------------------------------------------------------------- || `icon.png` | App icon | 512 × 512 | yes | Same image as `/public/pwa-512x512.png`; no transparency. |diff --git a/solana-mobile/docs/CHECKLIST.md b/solana-mobile/docs/CHECKLIST.mdindex c312f0001..42062b83b 100644--- a/solana-mobile/docs/CHECKLIST.md+++ b/solana-mobile/docs/CHECKLIST.md@@ -4,25 +4,25 @@ Work top-to-bottom. Do not submit until every box is checked.## 1. Web app readiness (three.ws itself)-- [ ] `https://three.ws/manifest.webmanifest` returns 200 with `Content-Type: application/manifest+json`.-- [ ] `/pwa-192x192.png` and `/pwa-512x512.png` return 200 with `image/png`.+- [x] `https://three.ws/manifest.webmanifest` returns 200 with `Content-Type: application/manifest+json`. (verified 2026-08-10)+- [x] `/pwa-192x192.png` and `/pwa-512x512.png` return 200 with `image/png`. (verified 2026-08-10)- [ ] The site is installable from Chrome → "Add to Home screen" produces a standalone window.- [ ] `start_url` resolves and renders without console errors.-- [ ] Service worker registered (the build already emits `/registerSW.js` via vite-plugin-pwa).+- [x] Service worker registered (the build already emits `/registerSW.js` via vite-plugin-pwa). (verified 2026-08-10)- [ ] All third-party fonts and scripts allow embedding in a TWA (no `X-Frame-Options: DENY` on the root).## 2. Digital Asset Links (DAL)-- [ ] `solana-mobile/scripts/build-apk.sh` has been run once locally so the SHA-256 fingerprint is known.-- [ ] `public/.well-known/assetlinks.json` exists, contains the real fingerprint (no `{{RELEASE_SHA256}}` placeholders), and is checked into `main`.+- [x] `solana-mobile/scripts/build-apk.sh` has been run once locally so the SHA-256 fingerprint is known. (2026-08-10, keystore at `solana-mobile/android.keystore`, password in `.env` `SOLANA_MOBILE_KEYSTORE_PASSWORD`; on a fresh headless machine run `scripts/setup-android-sdk.sh` first)+- [x] `public/.well-known/assetlinks.json` exists, contains the real fingerprint (no `{{RELEASE_SHA256}}` placeholders), and is checked into `main`. (2026-08-10)- [ ] `https://three.ws/.well-known/assetlinks.json` returns 200, `Content-Type: application/json`, max-age ≤ 3600.- [ ] Verified via Google's tool: `https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://three.ws&relation=delegate_permission/common.handle_all_urls`.## 3. APK build-- [ ] Release keystore exists and is backed up offsite (lose this = lose the app forever).-- [ ] `solana-mobile/build/three-ws-release.apk` was produced by `scripts/build-apk.sh` and is signed.-- [ ] `apksigner verify --print-certs` prints the expected SHA-256 (matches the one in `assetlinks.json`).+- [ ] Release keystore exists and is backed up offsite (lose this = lose the app forever). (keystore generated 2026-08-10 in the codespace; OFFSITE BACKUP STILL NEEDED: download `solana-mobile/android.keystore` + the `.env` password to the owner's password manager)+- [x] `solana-mobile/build/three-ws-release.apk` was produced by `scripts/build-apk.sh` and is signed. (2026-08-10, 4.5 MB)+- [x] `apksigner verify --print-certs` prints the expected SHA-256 (matches the one in `assetlinks.json`). (verified 2026-08-10: `49:84:9C:CC:...:DC:27`)- [ ] APK installs cleanly on a Seeker device: launches into three.ws full-screen, no Chrome address bar visible.- [ ] App icon, name, and splash colors match brand (`three.ws`, `#080814` background, `#000000` theme).- [ ] Three shortcuts (Create / Discover / My agents) appear on long-press of the app icon.@@ -30,7 +30,7 @@ Work top-to-bottom. Do not submit until every box is checked.## 4. MWA integration- [x] Wrapper logic is unit-tested against a fake transport (`npx vitest run tests/solana-mobile-mwa-*.test.js tests/solana-mobile-seeker-detect.test.js`) — authorize/resume, one-tap `signIn`, sign/send, error normalization, disconnect, session persistence, detection boundaries.-- [ ] `solana-mobile/src/index.js` is imported from a top-level entry point (see `docs/INTEGRATION.md`).+- [x] `solana-mobile/src/index.js` is imported from a top-level entry point (see `docs/INTEGRATION.md`). (verified 2026-08-10: imported by `src/wallet.js` and `src/game/play-auth.js`)- [ ] In a real TWA session, `window.threeWsWallet` is defined and `isSolanaMobileTwa()` returns `true`.- [ ] First sign-in triggers the Seed Vault sheet (no Phantom/Solflare prompts).- [ ] One-tap SIWS: wallet linking via `signIn()` shows a SINGLE Seed Vault sheet (not connect-then-sign), and `/api/auth/siws/verify` accepts the wallet-built message.diff --git a/solana-mobile/publish/media/banner.png b/solana-mobile/publish/media/banner.pngnew file mode 100644index 000000000..c737da280Binary files /dev/null and b/solana-mobile/publish/media/banner.png differdiff --git a/solana-mobile/publish/media/feature.png b/solana-mobile/publish/media/feature.pngnew file mode 100644index 000000000..fcffe9e51Binary files /dev/null and b/solana-mobile/publish/media/feature.png differdiff --git a/solana-mobile/publish/media/icon.png b/solana-mobile/publish/media/icon.pngnew file mode 100644index 000000000..182034971Binary files /dev/null and b/solana-mobile/publish/media/icon.png differdiff --git a/solana-mobile/scripts/make-media.mjs b/solana-mobile/scripts/make-media.mjsnew file mode 100644index 000000000..5cb90f1ff--- /dev/null+++ b/solana-mobile/scripts/make-media.mjs@@ -0,0 +1,76 @@+#!/usr/bin/env node+// Generates the buildable dApp Store listing assets into publish/media/:+// icon.png 512x512 flattened app icon (from /public/pwa-512x512.png)+// banner.png 1200x600 logo + wordmark + tagline on the brand background+// feature.png 1024x500 live capture of a real agent in the three.ws viewer+// The five 1080x1920 screenshots are NOT generated here: reviewers require+// real Seeker device captures (see ../docs/ASSETS.md).+//+// Usage: node solana-mobile/scripts/make-media.mjs [agent-page-url]++import sharp from 'sharp';+import { chromium } from 'playwright';+import { mkdirSync, readFileSync } from 'node:fs';+import { fileURLToPath } from 'node:url';+import path from 'node:path';++const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..');+const OUT = path.join(ROOT, 'solana-mobile/publish/media');+const BG = '#080814';+mkdirSync(OUT, { recursive: true });++await sharp(path.join(ROOT, 'public/pwa-512x512.png'))+ .flatten({ background: BG })+ .resize(512, 512)+ .removeAlpha()+ .png()+ .toFile(path.join(OUT, 'icon.png'));+console.log('[make-media] icon.png');++const logoSvg = readFileSync(path.join(ROOT, 'public/pwa-icon.svg'));+const logoPng = await sharp(logoSvg).resize(320, 320).png().toBuffer();+const bannerSvg = Buffer.from(`<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="600">+ <defs>+ <radialGradient id="glow" cx="30%" cy="50%" r="80%">+ <stop offset="0%" stop-color="#101030"/>+ <stop offset="100%" stop-color="${BG}"/>+ </radialGradient>+ </defs>+ <rect width="1200" height="600" fill="url(#glow)"/>+ <text x="480" y="290" font-family="DejaVu Sans" font-size="96" font-weight="bold" fill="#ffffff">three.ws</text>+ <text x="484" y="360" font-family="DejaVu Sans" font-size="30" fill="#b8e8ff">Mint a 3D agent to your Seed Vault.</text>+ <text x="484" y="404" font-family="DejaVu Sans" font-size="30" fill="#8899bb">On-chain, Solana-native, signed by Seeker.</text>+</svg>`);+await sharp(bannerSvg)+ .composite([{ input: logoPng, left: 110, top: 140 }])+ .removeAlpha()+ .png()+ .toFile(path.join(OUT, 'banner.png'));+console.log('[make-media] banner.png');++// Default hero: first agent returned by the live marketplace API, so the+// capture always reflects real, current product UI.+let agentUrl = process.argv[2];+if (!agentUrl) {+ const res = await fetch('https://three.ws/api/marketplace/agents?limit=1');+ const body = await res.json();+ const first = body?.data?.items?.[0];+ if (!first) throw new Error('[make-media] marketplace API returned no agents to capture');+ agentUrl = `https://three.ws/agents/${first.id}`;+}+console.log(`[make-media] capturing ${agentUrl}`);+const browser = await chromium.launch({ args: ['--use-angle=swiftshader', '--enable-webgl'] });+try {+ const page = await browser.newPage({ viewport: { width: 1024, height: 500 }, deviceScaleFactor: 1 });+ await page.goto(agentUrl, { waitUntil: 'networkidle', timeout: 60000 }).catch(() => {});+ await page.waitForTimeout(9000);+ await page.screenshot({ path: path.join(OUT, 'feature.png') });+} finally {+ await browser.close();+}+const stats = await sharp(path.join(OUT, 'feature.png')).stats();+const means = stats.channels.map((c) => Number(c.mean.toFixed(1)));+if (means.every((m) => m < 12)) {+ throw new Error(`[make-media] feature.png looks blank (channel means ${means.join(',')}): WebGL likely failed to render; retry or pass a different agent URL`);+}+console.log(`[make-media] feature.png (channel means ${means.join(',')})`);diff --git a/solana-mobile/scripts/setup-android-sdk.sh b/solana-mobile/scripts/setup-android-sdk.shnew file mode 100755index 000000000..feefc7ba0--- /dev/null+++ b/solana-mobile/scripts/setup-android-sdk.sh@@ -0,0 +1,78 @@+#!/usr/bin/env bash+# Stage a JDK 17 + Android SDK for Bubblewrap on a headless machine (codespace,+# container, CI-less build box) where Bubblewrap's interactive first-run wizard+# cannot run. Idempotent: safe to re-run; skips anything already staged.+#+# Layout notes that cost a debugging session to learn (2026-08-10):+# * Bubblewrap's androidSdkPath must be the directory that directly contains+# bin/sdkmanager (the extracted cmdline-tools folder itself), NOT a+# conventional SDK root. Its validatePath checks for <path>/bin or+# <path>/tools, and getAndroidHome() returns the path as-is.+# * The cmdline-tools zip ships a source.properties at that same root. Every+# SDK scanner (AGP's and sdkmanager's own) then treats the ROOT as one+# legacy package and never descends into platforms/ or build-tools/, so+# installed packages are invisible and each build side-installs duplicates+# (android-36-2, -3, ...) before failing with "Failed to find target+# 'android-36'". The fix is renaming that root source.properties away.+#+# After this script succeeds, run build-apk.sh normally.++set -euo pipefail++BW_HOME="$HOME/.bubblewrap"+JDK_DIR="$BW_HOME/jdk"+SDK_DIR="$BW_HOME/android_sdk/cmdline-tools"+CMDTOOLS_URL="https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip"+JDK_URL="https://api.adoptium.net/v3/binary/latest/17/ga/linux/x64/jdk/hotspot/normal/eclipse"+PLATFORM_PKG="${PLATFORM_PKG:-platforms;android-36}"++mkdir -p "$JDK_DIR" "$BW_HOME/android_sdk"++# ── JDK 17 ─────────────────────────────────────────────────────────────────+JDK_HOME="$(find "$JDK_DIR" -maxdepth 1 -type d -name 'jdk-17*' | head -1)"+if [[ -z "$JDK_HOME" ]]; then+ echo "[setup-android-sdk] downloading Temurin JDK 17"+ curl -fsSL -o "$BW_HOME/jdk17.tar.gz" "$JDK_URL"+ tar -xzf "$BW_HOME/jdk17.tar.gz" -C "$JDK_DIR"+ rm -f "$BW_HOME/jdk17.tar.gz"+ JDK_HOME="$(find "$JDK_DIR" -maxdepth 1 -type d -name 'jdk-17*' | head -1)"+fi+echo "[setup-android-sdk] JDK: $JDK_HOME"++# ── Android command-line tools ─────────────────────────────────────────────+if [[ ! -x "$SDK_DIR/bin/sdkmanager" ]]; then+ echo "[setup-android-sdk] downloading Android command-line tools"+ curl -fsSL -o "$BW_HOME/cmdtools.zip" "$CMDTOOLS_URL"+ unzip -q -o "$BW_HOME/cmdtools.zip" -d "$BW_HOME/android_sdk"+ rm -f "$BW_HOME/cmdtools.zip"+fi++# Neutralize the root package marker so SDK scanners descend into subdirs+# (see layout notes above).+if [[ -f "$SDK_DIR/source.properties" ]]; then+ mv "$SDK_DIR/source.properties" "$SDK_DIR/source.properties.disabled"+ echo "[setup-android-sdk] disabled root source.properties (breaks package scanning)"+fi++# ── SDK packages + licenses ────────────────────────────────────────────────+export JAVA_HOME="$JDK_HOME"+export PATH="$JDK_HOME/bin:$PATH"+# `yes` dies with SIGPIPE (141) once sdkmanager stops reading stdin, which+# happens whenever every license is already accepted; only that code is benign.+yes | "$SDK_DIR/bin/sdkmanager" --sdk_root="$SDK_DIR" --licenses > /dev/null || [[ $? -eq 141 ]]+"$SDK_DIR/bin/sdkmanager" --sdk_root="$SDK_DIR" "$PLATFORM_PKG" > /dev/null+echo "[setup-android-sdk] installed: $("$SDK_DIR/bin/sdkmanager" --sdk_root="$SDK_DIR" --list_installed 2>/dev/null | awk 'NR>3 && $1 !~ /^-/ {print $1}' | paste -sd, -)"++# ── Seed Bubblewrap config ─────────────────────────────────────────────────+mkdir -p "$BW_HOME"+node -e "+ const fs = require('fs');+ const p = process.argv[1];+ let c = {};+ try { c = JSON.parse(fs.readFileSync(p, 'utf8')); } catch {}+ c.jdkPath = process.argv[2];+ c.androidSdkPath = process.argv[3];+ fs.writeFileSync(p, JSON.stringify(c));+" "$BW_HOME/config.json" "$JDK_HOME" "$SDK_DIR"+echo "[setup-android-sdk] seeded $BW_HOME/config.json"+echo "[setup-android-sdk] done. Run build-apk.sh next."