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(solana-mobile): keep the Seed Vault session across app restarts and rebuild store submission for the Publisher Portal
nirholas4739f56d8c06
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 9d43667a5..5732266d5 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -6,6 +6,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr## 2026-08-27+- **Seeker app: stay signed in across restarts, and a submission path that matches today's dApp Store**: On Solana Seeker, the three.ws app now remembers your Seed Vault session when Android restarts the app in the background, so reopening it no longer asks you to approve again; a revoked session is dropped cleanly instead of failing every signature. The My Agents home-screen shortcut opens your own agents instead of the public index. Behind the scenes the store submission tooling was rebuilt for the Publisher Portal that Solana Mobile now uses, and the listing copy was rewritten to describe only what the app really does. (`/my-agents`) `[improvement, fix, infra]`- **Text-to-3D is generating again, and it answers in seconds**: For most of a day, describing something in the forge produced a long wait and then a busy message, on the site, in the ChatGPT app, and for agents buying through OKX. Two things had gone wrong at once: the image provider that paints the concept picture had stopped responding, and the free assistant that sharpens your description was asking for models that no longer exist. Both are fixed. The painter now runs on a model that answers in about five seconds, the assistant uses current models, and a text-to-3D request is accepted in three to eight seconds instead of never. Image-to-3D was never affected. (`/forge`) `[fix]`## 2026-08-25diff --git a/STRUCTURE.md b/STRUCTURE.mdindex 898c59a5b..1f28b464e 100644--- a/STRUCTURE.md+++ b/STRUCTURE.md@@ -214,7 +214,7 @@ bottom.| BNB vault UI (browse/buy/unlock/view) | [pages/vault.html](pages/vault.html) + [src/vault.js](src/vault.js) `→ /vault`, buyer session key [src/bnb/vault-session.js](src/bnb/vault-session.js), buy calldata [src/bnb/vault-buy.js](src/bnb/vault-buy.js), browser ECIES decrypt [src/bnb/vault-crypto-browser.js](src/bnb/vault-crypto-browser.js), pure FSM helpers [src/vault-fsm.js](src/vault-fsm.js) — over the buyer API [api/vault/{list,status,unlock,download,buy-policy-data}.js](api/vault/list.js) and contract [contracts/src/GreenfieldVault.sol](contracts/src/GreenfieldVault.sol) (prompt 12) | In-repo · code+crypto proven on a local anvil-fork deploy, public testnet blocked on the same funded-deployer-key wall as prompts 07/09/10/11/13/14/18 | The buyer-facing face of Track B: a grid of live on-chain listings, a "buy" step that sends a real BSC testnet transaction (gasless via MegaFuel when sponsorable, self-pay fallback), an honest "granting access on Greenfield…" polling state for the async cross-chain permission grant, and an "unlock & view" step that decrypts the GLB entirely client-side (AES-256-GCM + secp256k1 ECIES via Web Crypto + `@noble/curves`, never the server) before rendering it in `<model-viewer>`. Because the vault's ECIES unlock needs the buyer's raw private key — which a browser extension wallet deliberately never exposes — the buyer identity is a local session key (same pattern as `src/agora/onchain-presence.js`); MetaMask's only role is funding that session key with a plain tBNB transfer. A "Sell a model" panel wires the real upload ([api/bnb/vault-upload.js](api/bnb/vault-upload.js)) + `list()` path from a directly-connected wallet. `GET /api/vault/buy-policy-data` builds a real Greenfield `Policy` protobuf for `buy()` when a listing's object has genuinely completed Greenfield upload (`api/_lib/bnb/vault-policy-data.js`); until then `buy()` uses an honestly-labeled deterministic placeholder, matching the prompt-11 anvil proof's own posture. || BNB Chain live block race | [pages/bnb-latency.html](pages/bnb-latency.html) + [src/bnb-latency.js](src/bnb-latency.js) `→ /bnb-latency`, pure helpers [src/bnb-latency-helpers.js](src/bnb-latency-helpers.js), live multi-chain API [api/bnb/latency.js](api/bnb/latency.js) over [api/_lib/bnb/latency-lanes.js](api/_lib/bnb/latency-lanes.js) (reuses `probeBlockTime` from [api/_lib/bnb/chains.js](api/_lib/bnb/chains.js) for BNB, adds Base/Ethereum/Solana lanes) | In-repo · shipped | Standalone, shareable proof page: four lanes (BNB Chain, Base, Ethereum, Solana) polled every 5s, each showing a freshly measured average block/slot time and a rolling sparkline — no hardcoded numbers, a down RPC shows "reconnecting" on just that lane. Headline strip shows BNB's live average plus its honest measured-vs-measured speedup over Base/Ethereum. Linked from the [/bnb](pages/bnb.html) hub's "real-time on-chain world" card, which auto-lights-up now that this route resolves. || BNB Chain payments (MPP, x402↔MPP bridge, gasless) | Accept [api/_lib/bnb/mpp-server.js](api/_lib/bnb/mpp-server.js) (`mppRequirements`/`mppChallenge`/`mppVerify`/`mppSettle`), pay [api/_lib/bnb/mpp-buyer.js](api/_lib/bnb/mpp-buyer.js) (`mppFetch`, re-exported from [api/_lib/x402-buyer-fetch.js](api/_lib/x402-buyer-fetch.js)), gasless rail [api/_lib/bnb/megafuel.js](api/_lib/bnb/megafuel.js), pilot dual-protocol endpoint [api/x402/three-intel.js](api/x402/three-intel.js) | In-repo · shipped, settlement needs merchant creds | three.ws speaks MPP (BNB Chain's Machine Payments Protocol) additively alongside x402: MPP's `b402` layer is x402 v2 byte-for-byte (same `X-PAYMENT`/`X-PAYMENT-RESPONSE`, same EIP-3009 credential), so a dual-protocol endpoint just advertises an extra BNB (`eip155:56`/`97`) accept entry and routes BNB-network payments to the b402 facilitator while Solana/Base traffic stays on the untouched x402 path. Verify (off-chain, free, replay-guarded via Redis `SET NX PX`) always runs before settle; without `B402_*` merchant credentials, settle fails closed with `mpp_not_configured` (503) rather than fabricating a receipt. Guide: [docs/bnb-payments.md](docs/bnb-payments.md). Wire contract: [specs/x402-mpp-bridge.md](specs/x402-mpp-bridge.md). Tests: [tests/bnb-mpp-server.test.js](tests/bnb-mpp-server.test.js), [tests/bnb-mpp-buyer.test.js](tests/bnb-mpp-buyer.test.js). |-| Seeker / Saga dApp Store app | [solana-mobile/](solana-mobile) — TWA wrapper [solana-mobile/twa/](solana-mobile/twa), PWA shell [solana-mobile/pwa/](solana-mobile/pwa), listing copy + release config [solana-mobile/publish/](solana-mobile/publish), Seeker detection [solana-mobile/src/seeker-detect.js](solana-mobile/src/seeker-detect.js) | In-repo · listing assets staged | Everything needed to package three.ws as a Solana Mobile app and publish it to the on-chain dApp Store. Targets Seeker first; compatible with Saga Gen 1 and Gen 2. Docs: [solana-mobile/README.md](solana-mobile/README.md) |+| Seeker / Saga dApp Store app | [solana-mobile/](solana-mobile): TWA wrapper [solana-mobile/twa/](solana-mobile/twa), Publisher Portal listing copy [solana-mobile/publish/](solana-mobile/publish), MWA wallet + Seeker detection [solana-mobile/src/](solana-mobile/src) | In-repo · signed APK + assetlinks live · awaiting owner's Publisher Portal submission | Everything needed to package three.ws as a Solana Mobile app and publish it to the on-chain dApp Store. Targets Seeker first; compatible with Saga Gen 1 and Gen 2. Docs: [solana-mobile/README.md](solana-mobile/README.md) || Walk Avatar browser extension | [extensions/walk-avatar/](extensions/walk-avatar) — MV3 `manifest.json`, `background.js` | In-repo · Chrome Web Store release checklist staged ([RELEASE.md](extensions/walk-avatar/RELEASE.md)) | Walks your three.ws avatar across any site and reads pages aloud — a browsing companion built on the same rig as the [walk-sdk](walk-sdk). Ships its own store-required [PRIVACY.md](extensions/walk-avatar/PRIVACY.md), [PERMISSIONS.md](extensions/walk-avatar/PERMISSIONS.md), and [TERMS.md](extensions/walk-avatar/TERMS.md). || DCC tool integrations (Blender, ComfyUI) | [integrations/](integrations) — [integrations/blender/](integrations/blender), [integrations/comfyui/](integrations/comfyui), shared Python client [integrations/_pyclient/](integrations/_pyclient) | In-repo | First-party plugins that drive the public Forge pipeline (`/api/forge`) from inside the tools artists already use, so a model is generated without leaving the DCC. Docs: [integrations/README.md](integrations/README.md) || Base58 difficulty model (the honest math) | [src/solana/vanity/base58-distribution.js](src/solana/vanity/base58-distribution.js), dispatch in [src/solana/vanity/validation.js](src/solana/vanity/validation.js); ported copies in [solana-agent-sdk/src/vanity/verify.ts](solana-agent-sdk/src/vanity/verify.ts) and [mcp-server/src/lib/base58-distribution.js](mcp-server/src/lib/base58-distribution.js), held in agreement by [tests/vanity-model-parity.test.js](tests/vanity-model-parity.test.js) | In-repo | The exact probability that a random Solana address matches a vanity pattern, and the single source of truth behind every quote, price, rarity tier, bounty payout and signed receipt. Base58 is a positional encoding of a 256-bit integer, so the *leading* character is not uniform: the 40 symbols `K`-`z` are 17.2x harder to lead with than `5`-`H`, a 58x spread the old flat 58ⁿ model erased. Models are versioned (`base58-exact/v2`, superseding `58^effectiveLength`) and receipts name theirs, so attestations issued before the correction still verify. Spec: [docs/PROTOCOL-vanity.md](docs/PROTOCOL-vanity.md#41-difficulty-model-versioning) |diff --git a/data/changelog.json b/data/changelog.jsonindex aeb344659..73a2e860c 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,17 @@{"$comment": "Curated changelog entries for three.ws, the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.","entries": [+ {+ "date": "2026-08-27",+ "title": "Seeker app: stay signed in across restarts, and a submission path that matches today's dApp Store",+ "summary": "On Solana Seeker, the three.ws app now remembers your Seed Vault session when Android restarts the app in the background, so reopening it no longer asks you to approve again; a revoked session is dropped cleanly instead of failing every signature. The My Agents home-screen shortcut opens your own agents instead of the public index. Behind the scenes the store submission tooling was rebuilt for the Publisher Portal that Solana Mobile now uses, and the listing copy was rewritten to describe only what the app really does.",+ "tags": [+ "improvement",+ "fix",+ "infra"+ ],+ "link": "/my-agents"+ },{"date": "2026-08-27","title": "Text-to-3D is generating again, and it answers in seconds",diff --git a/public/changelog.json b/public/changelog.jsonindex ea7be6af9..9d329f6bb 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,11 +1,23 @@{- "generated_at": "2026-08-27T04:44:26.027Z",+ "generated_at": "2026-08-27T04:58:40.313Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws","url": "https://three.ws"},"entries": [+ {+ "date": "2026-08-27",+ "type": "update",+ "title": "Seeker app: stay signed in across restarts, and a submission path that matches today's dApp Store",+ "summary": "On Solana Seeker, the three.ws app now remembers your Seed Vault session when Android restarts the app in the background, so reopening it no longer asks you to approve again; a revoked session is dropped cleanly instead of failing every signature. The My Agents home-screen shortcut opens your own agents instead of the public index. Behind the scenes the store submission tooling was rebuilt for the Publisher Portal that Solana Mobile now uses, and the listing copy was rewritten to describe only what the app really does.",+ "link": "/my-agents",+ "tags": [+ "improvement",+ "fix",+ "infra"+ ]+ },{"date": "2026-08-27","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex 73cac4a54..1b28a8548 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -6,6 +6,14 @@<atom:link href="https://three.ws/changelog.xml" rel="self" type="application/rss+xml"/><description>What's new on three.ws: features, improvements, and releases, newest first.</description><language>en</language>+ <item>+ <title>Seeker app: stay signed in across restarts, and a submission path that matches today's dApp Store</title>+ <link>https://three.ws/my-agents</link>+ <guid isPermaLink="false">2026-08-27:Seeker app: stay signed in across restarts, and a submission path that matches today's dApp Store</guid>+ <pubDate>Thu, 27 Aug 2026 12:00:00 GMT</pubDate>+ <category>improvement</category>+ <description>On Solana Seeker, the three.ws app now remembers your Seed Vault session when Android restarts the app in the background, so reopening it no longer asks you to approve again; a revoked session is dropped cleanly instead of failing every signature. The My Agents home-screen shortcut opens your own agents instead of the public index. Behind the scenes the store submission tooling was rebuilt for the Publisher Portal that Solana Mobile now uses, and the listing copy was rewritten to describe only what the app really does.</description>+ </item><item><title>Text-to-3D is generating again, and it answers in seconds</title><link>https://three.ws/forge</link>diff --git a/server/index.mjs b/server/index.mjsindex aaf3bb20c..13ad635e9 100644--- a/server/index.mjs+++ b/server/index.mjs@@ -289,6 +289,13 @@ function serveFile(req, res, file, headers, status) {}res.set(headers);if (status) res.status(status);+ // Android Digital Asset Links (and the other RFC 8615 discovery files) are+ // re-fetched by Google and by devices on a schedule; a day-long edge TTL+ // means a rotated release key stays unverified for up to 24 hours after a+ // deploy. Google's own guidance caps the TTL at an hour.+ if (file.includes(`${path.sep}.well-known${path.sep}`) && !res.get('cache-control')) {+ res.set('cache-control', 'public, max-age=3600');+ }// RFC 8615 discovery files (agent-card.json, ai-plugin.json, security.txt)// live under the `.well-known` dot-directory, which Express's dotfiles guard// would reject as Forbidden — allow exactly that directory and keep everydiff --git a/solana-mobile/.gitignore b/solana-mobile/.gitignoreindex 544a66479..595981e14 100644--- a/solana-mobile/.gitignore+++ b/solana-mobile/.gitignore@@ -1,8 +1,8 @@# Bubblewrap output — regenerated on every build, do not commit.build/-# Release keystore. NEVER commit. Back this up to a password manager and to-# the SEEKER_RELEASE_KEYSTORE_BASE64 GitHub secret instead.+# Release keystore. NEVER commit. Back it up (file + password) to the owner's+# password manager; losing it means the app can never be updated again.*.keystore*.jks@@ -13,5 +13,8 @@ twa-manifest.json.bak# Captured screenshots that haven't been triaged yet.publish/media/_drafts/-# Publishing API key cached by the CLI.+# Publisher Portal API key, if ever written to disk.publish/.dapp-store-api-key+# Local Node deps pulled in by scripts/publish.sh (dapp-store-cli).+node_modules/+package-lock.jsondiff --git a/solana-mobile/README.md b/solana-mobile/README.mdindex f20381397..323e4c5bd 100644--- a/solana-mobile/README.md+++ b/solana-mobile/README.md@@ -1,97 +1,95 @@-# `solana-mobile/` — three.ws on the Seeker dApp Store+# `solana-mobile/`: three.ws on the Seeker dApp Store-This directory contains everything needed to package three.ws as a Solana Mobile (Seeker / Saga) app and publish it to the on-chain dApp Store.+Everything needed to package three.ws as a Solana Mobile (Seeker / Saga) app and publish it to the Solana dApp Store: the Mobile Wallet Adapter (MWA) wallet that signs through the on-device Seed Vault, the Trusted Web Activity (TWA) wrapper, the release pipeline, and the listing copy for the Publisher Portal.## Layout```solana-mobile/-├── pwa/ # PWA manifest + offline fallback (mirrors the live site)-├── twa/twa-manifest.json # Bubblewrap input — wraps three.ws as an Android TWA-├── well-known/ # assetlinks.json template (real file lives at /public/.well-known/)+├── twa/twa-manifest.json # Bubblewrap input: wraps three.ws as an Android TWA+├── well-known/ # assetlinks.json template (real file: /public/.well-known/)├── src/ # MWA wallet wrapper (drop-in for the existing Solana code)│ ├── seeker-detect.js # TWA/Seeker detection + isMwaSupported() capability probe│ ├── mwa-wallet.js # Phantom-shaped wallet backed by the on-device Seed Vault-│ ├── mwa-errors.js # normalizes MWA errors (user decline → code 4001)-│ ├── index.js # single-import boot — sets window.solana when on Seeker+│ ├── mwa-errors.js # normalizes MWA errors (user decline -> code 4001)+│ ├── index.js # single-import boot; sets window.solana when on Seeker│ └── 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-│ ├── config.yaml-│ └── listing/-│ ├── description.md-│ ├── short-description.txt-│ ├── new-in-version.txt-│ └── saga-features.md+│ └── publish.sh # upload the APK to the Publisher Portal (dapp-store-cli 1.x)+├── publish/ # Publisher Portal worksheet + listing copy + media+│ ├── config.yaml # every value the owner enters in the portal, in one place+│ ├── listing/ # description, short description, what's new, Seeker features+│ └── media/ # icon, banner, feature graphic (screenshots need a real Seeker)└── docs/├── ASSETS.md # exact pixel specs for icon/banner/screenshots- ├── CHECKLIST.md # end-to-end submission checklist- └── INTEGRATION.md # how to wire src/index.js into the three.ws build+ ├── CHECKLIST.md # end-to-end submission checklist with verification dates+ └── INTEGRATION.md # how the wallet is wired into the three.ws bundle```-## Quickstart+The offline page and the web manifest are NOT duplicated here: the live manifest is generated by `vite-plugin-pwa` from `vite.config.js` (`webManifestUrl` in `twa/twa-manifest.json` points at it), and the service worker deliberately has no navigation fallback (see the `workbox` block in `vite.config.js`).-The MWA wallet is already wired into the bundle — `src/wallet.js` and-`src/game/play-auth.js` import `solana-mobile/src/index.js`, and-`@solana-mobile/mobile-wallet-adapter-protocol-web3js` is a root dependency.-`src/onchain/adapters/solana.js` uses the Seed Vault's **one-tap SIWS**-(`signIn()`) for wallet linking, falling back to the two-step signMessage flow-on injected wallets. The wrapper is unit-tested against a fake transport:+## How the wallet works++The MWA wallet is already wired into the bundle: `src/wallet.js` and `src/game/play-auth.js` import `solana-mobile/src/index.js`, and `@solana-mobile/mobile-wallet-adapter-protocol-web3js` is a root dependency. Inside the TWA the import installs an `MwaWallet` at `window.threeWsWallet` (mirrored onto `window.solana`); everywhere else it is a no-op. `src/onchain/adapters/solana.js` uses the Seed Vault's one-tap Sign-In With Solana (`signIn()`) for wallet linking and falls back to the two-step `signMessage` flow on injected wallets.++The MWA auth token is persisted in `localStorage` (with a `sessionStorage` fallback), so a session survives Android killing the backgrounded TWA process: the next signature is a silent `reauthorize`, not a new Seed Vault prompt. A token the wallet has revoked is dropped on the first failed `reauthorize` and the wallet emits `disconnect`. The wrapper is unit-tested against a fake transport:```bashnpx vitest run tests/solana-mobile-mwa-wallet.test.js \tests/solana-mobile-mwa-errors.test.js tests/solana-mobile-seeker-detect.test.js```+Details: `docs/INTEGRATION.md`.++## Release pipeline++Publishing is Publisher Portal backed (dapp-store-cli 1.0, May 2026). The publisher profile, KYC, the App NFT, and the listing live in <https://publish.solanamobile.com>; the CLI only uploads one signed APK per release and the portal matches it to the app by package name (`ws.three.app`).+```bash-# 1. One-time: mint the on-chain Publisher + App NFTs (mainnet, costs ~0.05 SOL).cd solana-mobile-SOLANA_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.+# 0. Headless machine (codespace/container) with no Android toolchain yet:+# stages JDK 17 + Android SDK under ~/.bubblewrap. 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-# update`, and ACCEPT_ANDROID_SDK_LICENSES=1 clears the first-run SDK-# license gate on a fresh machine.-KEYSTORE_PASSWORD='your-strong-pass' ACCEPT_ANDROID_SDK_LICENSES=1 ./scripts/build-apk.sh-# This also writes /public/.well-known/assetlinks.json with the real fingerprint.+# 1. Build the signed APK. Creates the keystore on first run: back it up+# (file + password) to the owner's password manager immediately. Also+# writes /public/.well-known/assetlinks.json with the real fingerprint.+KEYSTORE_PASSWORD="$SOLANA_MOBILE_KEYSTORE_PASSWORD" ACCEPT_ANDROID_SDK_LICENSES=1 ./scripts/build-apk.sh-# 3. Deploy three.ws so the assetlinks.json is live (npm run deploy:gcp from-# the repo root — production is Cloud Run).+# 2. Deploy three.ws so assetlinks.json is live (npm run deploy:gcp from the+# repo root; production is Cloud Run), then confirm Google sees it:curl -fsSL https://three.ws/.well-known/assetlinks.json | jq .+curl -fsSL 'https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://three.ws&relation=delegate_permission/common.handle_all_urls'++# 3. First release only, in the portal (owner): create the publisher profile,+# pass KYC/KYB, "Add a dApp" using publish/config.yaml + publish/listing/ ++# publish/media/, mint the App NFT (~0.2 SOL in the publisher wallet), and+# create an API key under Settings > API keys.# 4. Submit the release.SOLANA_KEYPAIR=~/.config/solana/publisher.json \-DAPP_STORE_API_KEY='your-api-key' \+DAPP_STORE_API_KEY='portal-api-key' \./scripts/publish.sh```-For subsequent releases, only steps 2 and 4 are needed (bump `appVersionCode`-/ `appVersionName` in `twa/twa-manifest.json`, or pass `VERSION_CODE` /-`VERSION_NAME` env overrides). Releases are run locally by the owner — this-repo does not use GitHub Actions.+For later releases, bump `appVersionCode` / `appVersion` in `twa/twa-manifest.json` (or pass `VERSION_CODE` / `VERSION_NAME`), then repeat steps 1 and 4. `publish.sh` refuses to re-submit a versionCode it already shipped from the same machine. Releases are run locally by the owner; this repo does not use GitHub Actions.++## What still needs a physical Seeker-## What was NOT added to the bundle (intentional)+- **Screenshots** (`publish/media/screen-1..5.png`, 1080x1920): reviewers reject emulator or desktop captures, so none are checked in. `icon.png`, `banner.png`, and `feature.png` ARE checked in and regenerate with `node scripts/make-media.mjs` (the feature graphic is a live Playwright capture of a real agent page).+- **Device smoke** (install, Seed Vault sheet, suspend/resume, deep links): section 3, 4, and 9 of `docs/CHECKLIST.md`.+- **Promo video**: optional; `publish/media/video.mp4` if ever added.-- **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. 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.+Privacy policy and EULA are content of the main site and are live at `/legal/privacy` and `/legal/eula`.## See also-- `docs/CHECKLIST.md` — the only doc you need open during submission.-- `docs/INTEGRATION.md` — what to add to `src/app.js`.-- `docs/ASSETS.md` — pixel specs and capture instructions.-- Solana Mobile official docs: <https://docs.solanamobile.com/dapp-publishing/intro>+- `docs/CHECKLIST.md`: the only doc you need open during submission.+- `docs/INTEGRATION.md`: how the wallet is wired and how it fails.+- `docs/ASSETS.md`: pixel specs and capture instructions.+- Solana Mobile: <https://docs.solanamobile.com/dapp-store/publishing-cli> and <https://docs.solanamobile.com/dapp-store/submit-new-app>diff --git a/solana-mobile/docs/CHECKLIST.md b/solana-mobile/docs/CHECKLIST.mdindex 42062b83b..2be113dcf 100644--- a/solana-mobile/docs/CHECKLIST.md+++ b/solana-mobile/docs/CHECKLIST.md@@ -1,87 +1,91 @@# Seeker dApp Store submission checklist-Work top-to-bottom. Do not submit until every box is checked.+Work top-to-bottom. Do not submit until every box is checked. A date after a box is when it was last verified against production; re-verify anything older than the current release.## 1. Web app readiness (three.ws itself)-- [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.-- [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).+- [x] `https://three.ws/manifest.webmanifest` returns 200 with `Content-Type: application/manifest+json`. (verified 2026-08-27)+- [x] `/pwa-192x192.png`, `/pwa-512x512.png`, and `/pwa-icon.svg` return 200 with the right image type. (verified 2026-08-27)+- [x] The three TWA shortcuts resolve: `/create`, `/marketplace`, `/my-agents` all return 200. (verified 2026-08-27; `/my-agents` replaced the public `/agents` index)+- [x] Nothing blocks a TWA: the root sends no `X-Frame-Options`, and CSP `frame-ancestors` is irrelevant to a TWA (it is not an iframe). (verified 2026-08-27)+- [x] Service worker registered (`vite-plugin-pwa` emits `/registerSW.js`). (verified 2026-08-10)+- [ ] Chrome on Android offers "Add to Home screen" and the result opens standalone (device check).+- [ ] `start_url` (`/?utm_source=seeker_app`) renders without console errors on the device.## 2. Digital Asset Links (DAL)-- [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`.+- [x] `scripts/build-apk.sh` has been run 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` contains the real fingerprint (no `{{RELEASE_SHA256}}` placeholder) and is on `main`. (2026-08-10)+- [x] `https://three.ws/.well-known/assetlinks.json` returns 200 as `application/json`. (verified 2026-08-27)+- [x] Google's statement list confirms it: `https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://three.ws&relation=delegate_permission/common.handle_all_urls` returns the `ws.three.app` statement with fingerprint `49:84:9C:CC:...:DC:27`. (verified 2026-08-27)+- [ ] `cache-control` on `assetlinks.json` is at most one hour. The server now sends `max-age=3600` for `.well-known/*`; confirm on the live site after the next deploy (it read `max-age=86400` on 2026-08-27, from the image built before this change).## 3. APK build-- [ ] 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.+- [ ] Release keystore is backed up offsite (lose it and the app can never be updated). The keystore was generated 2026-08-10 in the codespace; OFFSITE BACKUP STILL NEEDED: put `solana-mobile/android.keystore` and the `.env` password in the owner's password manager.+- [x] `build/three-ws-release.apk` was produced by `scripts/build-apk.sh` and is signed. (2026-08-10, 4.5 MB; `build/` is gitignored, so rebuild on the release machine)+- [x] `apksigner verify --print-certs` prints the SHA-256 that is in `assetlinks.json`. (verified 2026-08-10: `49:84:9C:CC:...:DC:27`)+- [ ] APK installs cleanly on a Seeker: launches into three.ws full-screen, no Chrome address bar.- [ ] 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.+- [ ] Long-press on the app icon shows Create / Discover / My agents, and each opens inside the app.## 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.-- [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`.+- [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 across process death, revoked-token reset, detection boundaries. (49 tests green 2026-08-27)+- [x] `solana-mobile/src/index.js` is imported from the app entry points (`src/wallet.js`, `src/game/play-auth.js`). (verified 2026-08-27)+- [x] Emulator run against Solana Mobile's reference wallet: connect returns a real public key through the on-device flow; icon format and sign/send response shapes fixed. (2026-08, see the changelog)+- [ ] On a real Seeker, `window.threeWsWallet` is defined and `isSolanaMobileTwa()` returns `true` inside the TWA.- [ ] 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.-- [ ] `signMessage` produces a valid ed25519 signature that `/api/auth/siws/verify` accepts (two-step fallback path).-- [ ] `signAndSendTransaction` lands on mainnet (test with a 0-lamport memo tx before mint flows).-- [ ] Auth token survives app suspend/resume (test by switching apps for 60 s, then signing again — no second prompt).-- [ ] A cancelled Seed Vault sheet surfaces as a clean "cancelled" state (error carries `code 4001` / `reason USER_REJECTED`), not a generic failure.+- [ ] One-tap SIWS: wallet linking shows a SINGLE Seed Vault sheet, and `/api/auth/siws/verify` accepts the wallet-built message.+- [ ] `signMessage` (two-step fallback) produces a signature `/api/auth/siws/verify` accepts.+- [ ] `signAndSendTransaction` lands on mainnet (test with a 0-lamport memo tx before any deploy flow).+- [ ] Session survives suspend/resume AND a forced stop of the app (Settings > Apps > three.ws > Force stop, relaunch, sign again: no second prompt). The token now lives in `localStorage`.+- [ ] A cancelled Seed Vault sheet surfaces as a clean "cancelled" state (`code 4001` / `reason USER_REJECTED`), not a generic failure.- [ ] `disconnect()` removes the linked wallet from local state.-## 5. Listing copy+## 5. Listing copy (entered in the Publisher Portal)-- [ ] `publish/config.yaml` has `publisher.address` and `app.address` filled in (from `init-publisher.sh` output).-- [ ] `publish/listing/description.md` mentions only features that exist in the submitted APK.-- [ ] `publish/listing/new-in-version.txt` reflects this exact build (no "coming soon").-- [ ] `publish/listing/saga-features.md` cites Seed Vault, camera capture, and Share Target — each is verifiable.-- [ ] No mention of vendor names that don't belong to three.ws.+- [x] `publish/listing/description.md` describes only features that exist in the app: selfie (one frontal + two optional angles) to rigged avatar, text and GLB creation, chat, marketplace, Metaplex Core deploy, USDC skills/tips, embeds, Seed Vault SIWS. (rewritten 2026-08-27)+- [x] `publish/listing/new-in-version.txt` reflects this exact build, no "coming soon". (2026-08-27)+- [x] `publish/listing/saga-features.md` cites Seed Vault signing, camera capture, and deep links / shortcuts, each verifiable in the APK. The earlier Web Share Target claim was removed: the live manifest declares none. (2026-08-27)+- [x] No third-party vendor names in the copy or media. (2026-08-27)+- [ ] The text in the portal matches the files in `publish/listing/` byte for byte (copy from git, not from memory).-## 6. On-chain assets+## 6. Publisher Portal (owner, one-time)-- [ ] Publisher NFT minted on mainnet, address recorded.-- [ ] App NFT minted on mainnet, address recorded.-- [ ] Solana publishing wallet holds ≥ 0.2 SOL (covers release NFT + Arweave fees).-- [ ] Publishing keypair is backed up offsite.+- [ ] Publisher profile created at <https://publish.solanamobile.com> and KYC/KYB approved.+- [ ] Publisher wallet connected (Phantom/Solflare/Backpack extension) and funded with at least 0.2 SOL for the App NFT, release NFT, and Arweave uploads.+- [ ] Storage provider chosen (ArDrive recommended).+- [ ] "Add a dApp" completed with `publish/config.yaml` values, `publish/listing/`, and `publish/media/` (all eight images); App NFT minted.+- [ ] API key created under Settings > API keys and stored in the owner's password manager (never in the repo).+- [ ] The publisher wallet's keypair file is available to `scripts/publish.sh` as `SOLANA_KEYPAIR` and backed up offsite.## 7. Policy compliance-- [ ] Privacy policy is live at `https://three.ws/legal/privacy` and discloses wallet address collection.-- [ ] EULA is live at `https://three.ws/legal/eula`.-- [ ] No mention of US-restricted activities (gambling, securities offerings, derivatives).-- [ ] Payment flows use SPL tokens or USDC, not fiat onramps surfaced inside the app.-- [ ] Camera permission has a visible justification string at first prompt.-- [ ] App handles the case where the wallet rejects (`USER_REJECTED`) without crashing.+- [x] Privacy policy is live at `https://three.ws/legal/privacy` and EULA at `https://three.ws/legal/eula`. (both 200 on 2026-08-27)+- [ ] Privacy policy discloses wallet address collection (re-read before submitting).+- [x] No US-restricted activities (gambling, securities offerings, derivatives) in the copy. (2026-08-27)+- [x] Payment flows use SOL/USDC on-chain; no fiat onramp is surfaced inside the app. (2026-08-27)+- [ ] Camera permission shows a visible justification at first prompt (device check on `/create/selfie`).+- [x] A wallet rejection (`USER_REJECTED`) is handled without crashing: `src/wallet.js` swallows it with no toast, everything else gets a retry toast. (unit + code review 2026-08-27)## 8. Repeat builds-This repo does not use GitHub Actions — releases are built locally by the owner.+- [ ] `KEYSTORE_PASSWORD=... ./scripts/build-apk.sh` runs end-to-end unattended on the release machine (no interactive prompts).+- [ ] Keystore path and password live in the owner's password manager, not in the repo.+- [ ] `appVersionCode` was bumped in `twa/twa-manifest.json` (or via `VERSION_CODE`); the dApp Store rejects a re-used versionCode, and `scripts/publish.sh` refuses one it already shipped.+- [ ] `scripts/publish.sh` completes with the publisher wallet's keypair and the portal API key.-- [ ] `KEYSTORE_PASSWORD=… ./scripts/build-apk.sh` runs end-to-end unattended on the release machine (no interactive prompts).-- [ ] The release keystore path and password are stored in the owner's password manager, not on disk in the repo.-- [ ] `appVersionCode` was bumped in `twa/twa-manifest.json` (or via `VERSION_CODE`) — the dApp Store rejects a re-used versionCode.-- [ ] `scripts/publish.sh` completes with the same `SOLANA_KEYPAIR` used at init time.+## 9. Pre-submit smoke (real Seeker)-## 9. Pre-submit smoke--- [ ] Fresh install on a Seeker — full onboarding to mint takes < 3 minutes.-- [ ] Camera capture works under poor lighting (degrades gracefully — no infinite spinner).-- [ ] Offline mode shows the offline page, not a Chrome error.-- [ ] Deep links (`https://three.ws/agents/...`) open inside the app, not Chrome.+- [ ] Fresh install: onboarding to a deployed agent takes under 3 minutes.+- [ ] Camera capture under poor lighting degrades gracefully (the quality gates in `src/selfie-gates.js` explain what to fix; no infinite spinner).+- [ ] Airplane mode: the app shows a clear network error, not a broken white page.+- [ ] Deep links (`https://three.ws/agents/...`) open inside the app, not in Chrome.+- [ ] Five screenshots captured per `docs/ASSETS.md` and dropped into `publish/media/`.## 10. Post-submission-- [ ] Watch the Publisher Portal review queue — typical turnaround is 2–5 business days.-- [ ] Subscribe to the `Solana Mobile Developers` Telegram for review feedback.-- [ ] On approval, the release NFT becomes visible at `https://dapp-store.solanamobile.com/...`. Verify the listing renders all five screenshots.+- [ ] Review results arrive by email from `[email protected]` within 3-5 business days; watch the portal dashboard.+- [ ] On approval, verify the store listing renders all five screenshots and the feature graphic.+- [ ] Add a `data/changelog.json` entry announcing the store listing with its link.diff --git a/solana-mobile/docs/INTEGRATION.md b/solana-mobile/docs/INTEGRATION.mdindex 26f880167..489f8ea8e 100644--- a/solana-mobile/docs/INTEGRATION.md+++ b/solana-mobile/docs/INTEGRATION.md@@ -117,7 +117,7 @@ For end-to-end testing, build the APK with `scripts/build-apk.sh`, sideload it v| Scenario | Behaviour || --------------------------------------- | ------------------------------------------------------------------------------------------------ || User cancels the Seed Vault sheet | Rejects with an `MwaError`, `reason: 'USER_REJECTED'`, `code: 4001` — indistinguishable from a Phantom cancel to callers. |-| Auth token revoked (e.g. wallet wiped) | `reauthorize` fails → wrapper clears `sessionStorage` and emits `disconnect`. Next call prompts. |+| Auth token revoked (e.g. wallet wiped) | `reauthorize` fails on connect OR on any signing call: the wrapper clears the stored token, emits `disconnect`, and the next call authorizes from scratch. || MWA library fails to load (offline) | `loadTransact()` rejects; the caller sees a `MwaWallet#connect` rejection with the original error.|-| Page reloads mid-session | `sessionStorage` retains `authToken`; next sign uses `reauthorize` (no prompt for the user). |+| Page reload, app suspend, or Android killing the TWA process | `localStorage` retains `authToken`; next sign uses `reauthorize` (no prompt for the user). || Two tabs of the TWA simultaneously open | MWA serialises transactions per app — second tab waits for the first to release the connection. |diff --git a/solana-mobile/publish/config.yaml b/solana-mobile/publish/config.yamlindex 76cae2849..279fd1c06 100644--- a/solana-mobile/publish/config.yaml+++ b/solana-mobile/publish/config.yaml@@ -1,67 +1,62 @@+# Publisher Portal worksheet for the three.ws dApp Store listing.+#+# Since dapp-store-cli 1.0 the listing is authored in the Publisher Portal+# (https://publish.solanamobile.com), not read from this file. This is the+# single source for the values the owner types or uploads there, so the portal+# never drifts from what is in git. Text fields are the files under listing/;+# media is under media/ (see ../docs/ASSETS.md for exact sizes).+publisher:name: three.ws- address:website: https://three.wsemail: [email protected]app:name: three.ws- address:android_package: ws.three.appurls:+ website: https://three.ws+ privacy_policy_url: https://three.ws/legal/privacylicense_url: https://three.ws/legal/eulacopyright_url: https://three.ws/legal- privacy_policy_url: https://three.ws/legal/privacy- website: https://three.ws-release:- address:+listing:+ short_description: listing/short-description.txt+ long_description: listing/description.md+ new_in_version: listing/new-in-version.txt+ saga_features: listing/saga-features.md+ copyright: "© 2026 three.ws"media:- - purpose: icon- uri: media/icon.png- - purpose: banner- uri: media/banner.png- - purpose: feature_graphic- uri: media/feature.png- - purpose: screenshot- uri: media/screen-1.png- - purpose: screenshot- uri: media/screen-2.png- - purpose: screenshot- uri: media/screen-3.png- - purpose: screenshot- uri: media/screen-4.png- - purpose: screenshot- uri: media/screen-5.png-- catalog:- en-US:- name: three.ws- short_description: |- Mint a 3D agent to your Seed Vault. On-chain, Solana-native, signed by Seeker.- long_description: !include listing/description.md- new_in_version: !include listing/new-in-version.txt- saga_features: !include listing/saga-features.md- copyright: "© 2026 three.ws"-- files:- - purpose: install- uri: ../build/three-ws-release.apk+ icon: media/icon.png+ banner: media/banner.png+ feature_graphic: media/feature.png+ screenshots:+ - media/screen-1.png+ - media/screen-2.png+ - media/screen-3.png+ - media/screen-4.png+ - media/screen-5.png-solana_mobile_dapp_publisher_portal:+release:+ apk: ../build/three-ws-release.apkgoogle_store_package: ""testing_instructions: |- 1. Open the app on a Seeker or Saga.- 2. Tap "Discover" — the agent grid should load from https://three.ws/api/marketplace/agents.- 3. Tap any agent → "Open" — a 3D viewer renders the agent in the WebGL canvas.- 4. Tap "Create" → grant camera permission → capture 3 selfies. The app uploads to- https://three.ws/api/avatar/selfie and returns a job id.- 5. Tap "Connect wallet" — the Seed Vault sheet appears. Approve.- 6. Tap "Sign in" — the app produces a SIWS message; approve in Seed Vault.- The app then logs you in via POST /api/auth/siws/verify.- 7. To mint, fund the connected wallet with at least 0.01 SOL on mainnet.- Tap "Mint to wallet" on any draft agent; Seed Vault approves the tx.- No off-chain test accounts are required — auth is wallet-only.-+ 1. Open the app on a Seeker or Saga. It launches full-screen into three.ws.+ 2. Long-press the app icon: the Create, Discover, and My agents shortcuts+ open /create, /marketplace, and /my-agents inside the app.+ 3. Tap "Sign in with Seed Vault" in the top bar. A single Seed Vault sheet+ appears (Sign-In With Solana). Approve. The bar shows your shortened+ address; the app is signed in via POST /api/auth/siws/verify.+ 4. Discover: /marketplace loads the agent grid from+ /api/marketplace/agents. Tap an agent to open its page; the 3D viewer+ renders it in WebGL. Drag to orbit.+ 5. Create: /create/selfie asks for camera permission, captures one frontal+ selfie (left and right angles optional), uploads to+ /api/avatars/reconstruct, and polls /api/avatars/regenerate-status+ until the rigged avatar is ready (about 90 seconds).+ 6. On-chain: from an agent you own, "Deploy on Solana" mints a Metaplex+ Core asset to the connected wallet. Fund it with at least 0.01 SOL on+ mainnet first; the Seed Vault sheet approves the transaction.+ No off-chain test accounts are required: auth is wallet-only.alpha_testers:- "@solana_mobile"diff --git a/solana-mobile/publish/listing/description.md b/solana-mobile/publish/listing/description.mdindex 05712fca2..2d54afdbb 100644--- a/solana-mobile/publish/listing/description.md+++ b/solana-mobile/publish/listing/description.md@@ -1,28 +1,29 @@three.ws turns your Seeker into a 3D agent studio.-Capture a selfie, generate a real glTF avatar, and mint it as an on-chain agent owned by your Seed Vault wallet. Every signature happens inside the Seeker's secure element — keys never touch the app layer.+Take a selfie, get a rigged 3D avatar, give it a voice and a personality, and put it on-chain in a wallet that never leaves the Seeker's secure element. Every signature happens inside Seed Vault; keys never touch the app layer.WHAT YOU CAN DO-• Capture & mint. Take three selfies; three.ws reconstructs a textured 3D avatar in seconds and writes it on-chain as a Metaplex Core NFT held by your wallet.-• Discover. Browse 3D agents minted by the community — drag to orbit, tap to inspect, hold to enter a walkaround.-• Customize. Swap accessories, change animations, tune voices, and re-mint the updated metadata.-• Embed anywhere. Every agent has a shareable URL and a one-line embed snippet — drop yours into Telegram, X, or your own site.-• Sign with Seed Vault. Wallet linking, transaction approval, and SIWS (Sign-In with Solana) all route through Mobile Wallet Adapter — no copy-pasting seed phrases, no browser extensions.+• Create from a selfie. One frontal photo (two optional side angles sharpen the likeness) becomes a textured, rigged, animation-ready avatar in about a minute. No photo? Describe the character in text, or upload a GLB you already have.+• Give it a mind. Attach a personality, a voice, and skills, then talk to it. Your agent answers in 3D, on your phone, in your language.+• Discover. Browse agents from the whole community in the marketplace: drag to orbit, tap to inspect, open any agent's page to chat with it.+• Own it on-chain. Deploy an agent as a Metaplex Core asset on Solana, held by your wallet. Sell skills, take tips, and trade agents with USDC.+• Embed anywhere. Every agent has a shareable URL and a one-line embed snippet for Telegram, X, or your own site.+• Sign with Seed Vault. Wallet linking, transaction approval, and Sign-In With Solana all route through Mobile Wallet Adapter. No seed phrases, no browser extensions.WHY SEEKER-Phantom and Solflare on a phone are good. Seed Vault is better. three.ws talks to the Seeker's on-device wallet via the Mobile Wallet Adapter protocol, so signing flows live inside the hardware-isolated TEE. The same agents you mint on Seeker show up automatically on the three.ws web app — your wallet, your library, anywhere you sign in.+three.ws talks to the Seeker's on-device wallet through the Mobile Wallet Adapter protocol, so signing lives inside the hardware-isolated secure element and sign-in is a single tap. The agents you create on Seeker show up on the three.ws web app the moment you sign in there: your wallet, your library, anywhere you sign in.OPEN BY DEFAULT-three.ws is open source (github.com/nirholas/three.ws). Agents follow the ERC-8004 / Metaplex Core specifications, so they're portable to any compliant marketplace or wallet. No vendor lock-in.+three.ws is open source (github.com/nirholas/three.ws). Agents are Metaplex Core assets on Solana with an open manifest, so they are portable to any compatible marketplace or wallet. No vendor lock-in.REQUIREMENTS-• A Solana wallet — Seed Vault on Seeker / Saga, or any standard Solana wallet (Phantom, Solflare, Backpack) when paired with the browser version.-• Camera permission (for selfie capture).-• A small amount of SOL to cover mint fees (typically < 0.01 SOL).+• A Solana wallet: Seed Vault on Seeker or Saga.+• Camera permission (only for selfie capture; you can upload a photo instead).+• A small amount of SOL to deploy an agent on-chain (typically under 0.01 SOL). Creating, chatting, and browsing are free.SUPPORTdiff --git a/solana-mobile/publish/listing/new-in-version.txt b/solana-mobile/publish/listing/new-in-version.txtindex de9569615..0e2d8211e 100644--- a/solana-mobile/publish/listing/new-in-version.txt+++ b/solana-mobile/publish/listing/new-in-version.txt@@ -1,9 +1,9 @@First Seeker release of three.ws.-• Seed Vault sign-in via Mobile Wallet Adapter (SIWS).-• Selfie → 3D avatar capture flow with on-device camera.-• On-chain agent mint as a Metaplex Core NFT to your wallet.-• Discover feed of community-minted agents.-• Embed any agent in chat, X, or your own site with one URL.+• One-tap Sign-In With Solana through Seed Vault (Mobile Wallet Adapter).+• Selfie to rigged 3D avatar, captured with the on-device camera.+• Deploy an agent on-chain as a Metaplex Core asset held by your wallet.+• Marketplace of community agents, each with a live 3D viewer and chat.+• Embed any agent in Telegram, X, or your own site with one URL.-Built for Seeker. Signed by Seed Vault. No seed phrases ever leave the secure element.+Built for Seeker. Signed by Seed Vault. Seed phrases never leave the secure element.diff --git a/solana-mobile/publish/listing/saga-features.md b/solana-mobile/publish/listing/saga-features.mdindex 7acb5d2db..140fa6fde 100644--- a/solana-mobile/publish/listing/saga-features.md+++ b/solana-mobile/publish/listing/saga-features.md@@ -1,20 +1,13 @@-three.ws is built around three Seeker-specific capabilities. Each is the right answer to a problem that a generic Android or web build of the same app cannot solve cleanly.+three.ws is built around three things the Seeker does better than a generic Android phone or a desktop browser.-# 1. Seed Vault signing via Mobile Wallet Adapter+1. Seed Vault signing through Mobile Wallet Adapter-The wallet wrapper at `solana-mobile/src/mwa-wallet.js` detects that the user is running inside the three.ws TWA on a Solana Mobile device and routes every signing call — `signMessage`, `signTransaction`, `signAllTransactions`, `signAndSendTransaction` — through the MWA protocol to the on-device Seed Vault.+Inside the app, every signing request (Sign-In With Solana, on-chain agent deploys, skill purchases, tips) is routed to the on-device Seed Vault. Sign-in is a single wallet interaction rather than a connect step followed by a signature step, and the private key never enters the application process. A session you approved once is remembered across app restarts; a session the wallet revokes is dropped cleanly and re-requested on the next action.-Why it matters: the private key never enters the application process. SIWS authentication, agent mints, accessory purchases, and wallet linking all approve inside the TEE.+2. On-device camera capture for avatar creation-# 2. Camera-driven selfie capture for avatar generation+The Create flow uses the Seeker's camera to capture one frontal selfie (plus optional left and right angles), uploads the frames to the three.ws reconstruction pipeline, and returns a rigged, animation-ready avatar in about a minute. On Seeker this is the shortest path from "I want an agent that looks like me" to "it is in my wallet".-Phones have a camera the user trusts; desktops mostly don't. The `/create` flow uses the back-camera shutter sequence to capture three reference frames, uploads them to the three.ws reconstruction pipeline, and returns a glTF avatar within roughly a minute. On Seeker this is the fastest path from "I have an idea for an agent" to "the agent is in my wallet".+3. Home-screen shortcuts and deep links-# 3. Web Share Target for one-tap drops into Telegram, X, and Solana social--The PWA manifest declares a `share_target` at `/create`, so an image or `.glb` shared from another app on Seeker opens directly inside three.ws with the file pre-attached. That powers two specific flows:--- Drop a selfie from the camera roll → instant avatar mint.-- Drop a glTF/GLB file → instant agent creation around it.--These three together — Seed Vault signing, on-device capture, and Share Target ingest — are the reason this app exists on Seeker rather than only as a web app.+Long-pressing the app icon offers Create, Discover, and My agents. Any three.ws link (an agent page, a marketplace listing, an embed) opens inside the app instead of a browser tab, verified through Digital Asset Links, so agents shared in Telegram or X land directly in the native experience.diff --git a/solana-mobile/pwa/manifest.json b/solana-mobile/pwa/manifest.jsondeleted file mode 100644index 48d26cc1a..000000000--- a/solana-mobile/pwa/manifest.json+++ /dev/null@@ -1,62 +0,0 @@-{- "name": "three.ws — On-chain 3D Agents",- "short_name": "three.ws",- "description": "Mint a 3D agent to your Seed Vault wallet. Capture, customize, and explore — Solana-native, signed by Seeker.",- "id": "/",- "scope": "/",- "start_url": "/?utm_source=seeker_dapp_store",- "display": "standalone",- "orientation": "any",- "theme_color": "#000000",- "background_color": "#080814",- "lang": "en",- "dir": "ltr",- "categories": ["entertainment", "social", "graphics", "utilities"],- "icons": [- { "src": "/pwa-192x192.png", "sizes": "192x192", "type": "image/png" },- { "src": "/pwa-512x512.png", "sizes": "512x512", "type": "image/png" },- { "src": "/pwa-512x512.png", "sizes": "512x512", "type": "image/png", "purpose": "any maskable" },- { "src": "/pwa-icon.svg", "sizes": "any", "type": "image/svg+xml", "purpose": "any" }- ],- "shortcuts": [- {- "name": "Create avatar",- "short_name": "Create",- "description": "Capture a selfie and mint a 3D agent",- "url": "/create?utm_source=seeker_shortcut",- "icons": [{ "src": "/pwa-192x192.png", "sizes": "192x192", "type": "image/png" }]- },- {- "name": "Discover agents",- "short_name": "Discover",- "description": "Browse 3D agents minted on Solana",- "url": "/discover?utm_source=seeker_shortcut",- "icons": [{ "src": "/pwa-192x192.png", "sizes": "192x192", "type": "image/png" }]- },- {- "name": "My agents",- "short_name": "Account",- "description": "View agents linked to your wallet",- "url": "/account?utm_source=seeker_shortcut",- "icons": [{ "src": "/pwa-192x192.png", "sizes": "192x192", "type": "image/png" }]- }- ],- "share_target": {- "action": "/create",- "method": "POST",- "enctype": "multipart/form-data",- "params": {- "title": "title",- "text": "text",- "url": "url",- "files": [- { "name": "selfie", "accept": ["image/jpeg", "image/png", "image/webp"] },- { "name": "model", "accept": [".glb", ".gltf", "model/gltf-binary", "model/gltf+json"] }- ]- }- },- "protocol_handlers": [- { "protocol": "web+threews", "url": "/?ref=%s" }- ],- "prefer_related_applications": false-}diff --git a/solana-mobile/pwa/offline.html b/solana-mobile/pwa/offline.htmldeleted file mode 100644index c21523fd8..000000000--- a/solana-mobile/pwa/offline.html+++ /dev/null@@ -1,51 +0,0 @@-<!doctype html>-<html lang="en">-<head>- <meta charset="utf-8">- <meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">- <title>three.ws — Offline</title>- <link rel="icon" href="/favicon.ico">- <style>- :root {- color-scheme: dark;- --bg: #080814;- --fg: #f5f5f7;- --muted: #8a8aa0;- --accent: #9945ff;- }- html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); }- body {- font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif;- display: grid;- place-items: center;- padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);- }- main { max-width: 28rem; padding: 1.5rem; text-align: center; }- h1 { font-size: 1.5rem; margin: 0 0 0.5rem; letter-spacing: -0.01em; }- p { color: var(--muted); line-height: 1.5; margin: 0 0 1.5rem; }- button {- appearance: none;- border: 0;- background: var(--accent);- color: white;- font: inherit;- font-weight: 600;- padding: 0.85rem 1.5rem;- border-radius: 999px;- cursor: pointer;- min-height: 44px;- }- button:active { transform: translateY(1px); }- .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff5577; margin-right: 6px; vertical-align: middle; }- small { display: block; margin-top: 1.25rem; color: var(--muted); font-size: 0.8rem; }- </style>-</head>-<body>- <main>- <h1><span class="dot" aria-hidden="true"></span>You're offline</h1>- <p>three.ws needs a connection to load 3D models and sign on-chain actions. Reconnect and try again — your session and Seed Vault keys are safe.</p>- <button type="button" onclick="location.reload()">Retry</button>- <small>Cached agents you've already opened remain available from the home screen.</small>- </main>-</body>-</html>diff --git a/solana-mobile/scripts/init-publisher.sh b/solana-mobile/scripts/init-publisher.shdeleted file mode 100755index 95cb60cfc..000000000--- a/solana-mobile/scripts/init-publisher.sh+++ /dev/null@@ -1,72 +0,0 @@-#!/usr/bin/env bash-# One-time bootstrap for the three.ws Solana dApp Store presence.-#-# Mints (or re-uses) the three on-chain NFTs the dApp Store registry expects:-# 1. Publisher NFT — identifies the org/account that owns the listing-# 2. App NFT — identifies the three.ws application-# 3. Release NFT — created on every release, NOT by this script-#-# Run this exactly once per environment (mainnet vs. devnet). The created-# Mint Address values get written into publish/config.yaml so subsequent-# publishes know where to append releases.-#-# Usage:-# SOLANA_KEYPAIR=~/.config/solana/id.json ./scripts/init-publisher.sh-#-# Environment:-# SOLANA_KEYPAIR path to Solana keypair (must hold ~0.2 SOL)-# SOLANA_RPC_URL RPC endpoint (default: https://api.mainnet-beta.solana.com)-# DAPP_STORE_DRYRUN if set to 1, prints commands without executing them--set -euo pipefail--cd "$(dirname "${BASH_SOURCE[0]}")/.."--if [[ -z "${SOLANA_KEYPAIR:-}" ]]; then- echo "[init-publisher] SOLANA_KEYPAIR must be set (path to the publishing keypair)" >&2- exit 1-fi-if [[ ! -f "$SOLANA_KEYPAIR" ]]; then- echo "[init-publisher] keypair not found at $SOLANA_KEYPAIR" >&2- exit 1-fi--SOLANA_RPC_URL="${SOLANA_RPC_URL:-https://api.mainnet-beta.solana.com}"-PUBLISH_DIR="$(pwd)/publish"-CFG="$PUBLISH_DIR/config.yaml"--run() {- echo "[init-publisher] \$ $*"- if [[ "${DAPP_STORE_DRYRUN:-0}" == "1" ]]; then return 0; fi- "$@"-}--if ! npx --no-install @solana-mobile/dapp-store-cli --version >/dev/null 2>&1; then- echo "[init-publisher] installing @solana-mobile/dapp-store-cli"- run npm install --no-save @solana-mobile/dapp-store-cli@latest-fi--DAPP="npx --no-install @solana-mobile/dapp-store"--if [[ ! -f "$CFG" ]]; then- echo "[init-publisher] $CFG missing — generating scaffold via dapp-store init"- cd "$PUBLISH_DIR"- run $DAPP init- cd - >/dev/null-fi--echo "[init-publisher] minting publisher NFT"-run $DAPP create publisher \- --keypair "$SOLANA_KEYPAIR" \- --url "$SOLANA_RPC_URL" \- -d "$PUBLISH_DIR"--echo "[init-publisher] minting app NFT"-run $DAPP create app \- --keypair "$SOLANA_KEYPAIR" \- --url "$SOLANA_RPC_URL" \- -d "$PUBLISH_DIR"--echo "[init-publisher] ✓ publisher + app NFTs minted"-echo "[init-publisher] config.yaml now has 'address:' fields populated — commit them."-echo "[init-publisher] next: scripts/build-apk.sh, then scripts/publish.sh"diff --git a/solana-mobile/scripts/publish.sh b/solana-mobile/scripts/publish.shindex 714ca47dc..b5eb38fff 100755--- a/solana-mobile/scripts/publish.sh+++ b/solana-mobile/scripts/publish.sh@@ -1,24 +1,35 @@#!/usr/bin/env bash# Submit a new release of the three.ws app to the Solana dApp Store.#-# Prerequisites:-# - scripts/init-publisher.sh has been run once (publisher + app NFTs minted)-# - scripts/build-apk.sh produced build/three-ws-release.apk-# - publish/config.yaml is filled in with publisher.address and app.address-# - .well-known/assetlinks.json is already live at https://three.ws/.well-known/assetlinks.json+# Since dapp-store-cli 1.0 (May 2026) publishing is Publisher Portal backed:+# the publisher profile, KYC, the App NFT, and the listing copy + media all+# live in https://publish.solanamobile.com, and the CLI only uploads one APK+# per release. There is no local config.yaml consumed by the CLI anymore; the+# portal matches the APK's Android package name (ws.three.app) to the app it+# already knows, mints the release NFT, and submits it for review.+#+# Prerequisites (one-time, in the portal, by the owner):+# - publisher profile + KYC/KYB approved+# - the three.ws app created ("Add a dApp") with its App NFT minted, using+# the listing text in publish/listing/ and the media in publish/media/+# - an API key from Settings > API keys+# Per release:+# - scripts/build-apk.sh produced build/three-ws-release.apk with a bumped+# appVersionCode+# - https://three.ws/.well-known/assetlinks.json is live for that key## Usage:-# SOLANA_KEYPAIR=~/.config/solana/id.json \+# SOLANA_KEYPAIR=~/.config/solana/publisher.json \# DAPP_STORE_API_KEY=... \# ./scripts/publish.sh## Environment:-# SOLANA_KEYPAIR path to publishing keypair-# SOLANA_RPC_URL RPC endpoint (default: mainnet-beta)-# DAPP_STORE_API_KEY API key from Publisher Portal (required for submit)+# SOLANA_KEYPAIR path to the signer keypair (the portal's publisher wallet)+# DAPP_STORE_API_KEY Publisher Portal API key (read by the CLI over stdin)# APK_PATH override APK path (default: build/three-ws-release.apk)-# SUBMIT if "1" (default), submits for review; "0" mints release NFT only-# DAPP_STORE_DRYRUN if "1", prints commands without executing+# WHATS_NEW override release notes (default: publish/listing/new-in-version.txt)+# DAPP_STORE_PORTAL_URL alternate portal origin (staging), passed through as-is+# DAPP_STORE_DRYRUN if "1", print the command without executing itset -euo pipefail@@ -27,67 +38,71 @@ cd "$(dirname "${BASH_SOURCE[0]}")/.."require() { command -v "$1" >/dev/null 2>&1 || { echo "[publish] missing $1" >&2; exit 1; }; }require noderequire npx+require curlif [[ -z "${SOLANA_KEYPAIR:-}" ]]; then- echo "[publish] SOLANA_KEYPAIR must be set" >&2; exit 1+ echo "[publish] SOLANA_KEYPAIR must be set (path to the publisher wallet keypair)" >&2; exit 1fi-SUBMIT="${SUBMIT:-1}"-APK_PATH="${APK_PATH:-$(pwd)/build/three-ws-release.apk}"-if [[ ! -f "$APK_PATH" ]]; then- echo "[publish] APK missing: $APK_PATH — run scripts/build-apk.sh first" >&2+if [[ ! -f "$SOLANA_KEYPAIR" ]]; then+ echo "[publish] keypair not found at $SOLANA_KEYPAIR" >&2; exit 1+fi+if [[ -z "${DAPP_STORE_API_KEY:-}" ]]; then+ echo "[publish] DAPP_STORE_API_KEY must be set." >&2+ echo "[publish] Create one at https://publish.solanamobile.com/dashboard/settings/api-keys" >&2exit 1fi-SOLANA_RPC_URL="${SOLANA_RPC_URL:-https://api.mainnet-beta.solana.com}"-PUBLISH_DIR="$(pwd)/publish"-if ! npx --no-install @solana-mobile/dapp-store-cli --version >/dev/null 2>&1; then- echo "[publish] installing @solana-mobile/dapp-store-cli"- npm install --no-save @solana-mobile/dapp-store-cli@latest+APK_PATH="${APK_PATH:-$(pwd)/build/three-ws-release.apk}"+if [[ ! -f "$APK_PATH" ]]; then+ echo "[publish] APK missing: $APK_PATH (run scripts/build-apk.sh first)" >&2+ exit 1fi-DAPP="npx --no-install @solana-mobile/dapp-store"+WHATS_NEW="${WHATS_NEW:-$(cat publish/listing/new-in-version.txt)}"-run() {- echo "[publish] \$ $*"- if [[ "${DAPP_STORE_DRYRUN:-0}" == "1" ]]; then return 0; fi- "$@"-}+# The dApp Store rejects a re-used versionCode, so refuse to ship the same+# number twice from this machine: the last submitted code is recorded next to+# the APK after a successful run.+STAMP="$(pwd)/build/.last-published-version-code"+VERSION_CODE="$(node -e "console.log(require('./twa/twa-manifest.json').appVersionCode)")"+if [[ -f "$STAMP" && "$(cat "$STAMP")" == "$VERSION_CODE" ]]; then+ echo "[publish] appVersionCode $VERSION_CODE was already published from here." >&2+ echo "[publish] Bump appVersionCode in twa/twa-manifest.json, rebuild, then publish." >&2+ exit 1+fi-echo "[publish] verifying assetlinks.json is reachable"+echo "[publish] verifying assetlinks.json is live"if ! curl -sSfL -o /dev/null -m 10 "https://three.ws/.well-known/assetlinks.json"; then- echo "[publish] WARNING: https://three.ws/.well-known/assetlinks.json is NOT reachable yet."- echo "[publish] dApp Store review will fail without it. Continuing anyway."+ echo "[publish] https://three.ws/.well-known/assetlinks.json is NOT reachable; review will fail." >&2+ exit 1fi-echo "[publish] minting release NFT (config: $PUBLISH_DIR/config.yaml)"-WHATS_NEW_FILE="$PUBLISH_DIR/listing/new-in-version.txt"-WHATS_NEW="$(cat "$WHATS_NEW_FILE" 2>/dev/null || echo 'Initial release.')"+if ! npx --no-install dapp-store --version >/dev/null 2>&1; then+ echo "[publish] installing @solana-mobile/dapp-store-cli"+ npm install --no-save --no-audit --no-fund @solana-mobile/dapp-store-cli@latest+fi-run $DAPP create release \- --keypair "$SOLANA_KEYPAIR" \- --url "$SOLANA_RPC_URL" \- -d "$PUBLISH_DIR" \- --apk-file "$APK_PATH" \+CMD=(npx --no-install dapp-store+ --apk-file "$APK_PATH"+ --keypair "$SOLANA_KEYPAIR"--whats-new "$WHATS_NEW"--if [[ "$SUBMIT" != "1" ]]; then- echo "[publish] ✓ release NFT minted. SUBMIT=0 — skipping store submission."- exit 0+ --api-key-stdin+ --verbose)+if [[ -n "${DAPP_STORE_PORTAL_URL:-}" ]]; then+ CMD+=(--portal-url "$DAPP_STORE_PORTAL_URL")fi-if [[ -z "${DAPP_STORE_API_KEY:-}" ]]; then- echo "[publish] DAPP_STORE_API_KEY must be set to submit for review." >&2- echo "[publish] Get one at https://publish.solanamobile.com → Settings." >&2- exit 1+echo "[publish] \$ ${CMD[*]}"+if [[ "${DAPP_STORE_DRYRUN:-0}" == "1" ]]; then+ echo "[publish] dry run, nothing submitted"+ exit 0fi-echo "[publish] submitting release for review"-# Pass the API key via stdin so it never appears in process listings.-printf '%s\n' "$DAPP_STORE_API_KEY" | run $DAPP publish submit \- --keypair "$SOLANA_KEYPAIR" \- --url "$SOLANA_RPC_URL" \- -d "$PUBLISH_DIR" \- --requestor-is-authorized \- --complies-with-solana-dapp-store-policies+# The API key goes over stdin so it never appears in a process listing.+printf '%s' "$DAPP_STORE_API_KEY" | "${CMD[@]}"-echo "[publish] ✓ submitted. Track status at https://publish.solanamobile.com"+printf '%s\n' "$VERSION_CODE" > "$STAMP"+echo "[publish] submitted versionCode $VERSION_CODE. Review results arrive by email from"+echo "[publish] [email protected] within 3-5 business days;"+echo "[publish] status: https://publish.solanamobile.com"+echo "[publish] If the upload died mid-way: npx --no-install dapp-store resume --release-id <id>"diff --git a/solana-mobile/src/mwa-wallet.js b/solana-mobile/src/mwa-wallet.jsindex 2e9895d4e..ddb1d48f2 100644--- a/solana-mobile/src/mwa-wallet.js+++ b/solana-mobile/src/mwa-wallet.js@@ -38,32 +38,50 @@ async function loadTransact() {return cachedTransact;}+// MWA auth tokens are designed to be persisted: the wallet hands one back so+// the app can reauthorize() silently on its next launch. Android kills a+// backgrounded TWA process freely, and sessionStorage dies with it, which+// turned every relaunch into a fresh Seed Vault prompt. localStorage survives+// process death; sessionStorage is the fallback when it is unavailable.+function storageAreas() {+ const areas = [];+ try { if (typeof localStorage !== 'undefined') areas.push(localStorage); } catch { /* blocked */ }+ try { if (typeof sessionStorage !== 'undefined') areas.push(sessionStorage); } catch { /* blocked */ }+ return areas;+}+function readStoredAuth() {- try {- const token = sessionStorage.getItem(SESSION_KEY);- const address = sessionStorage.getItem(ADDRESS_KEY);- if (token && address) return { authToken: token, address };- } catch {- /* sessionStorage may be unavailable */+ for (const area of storageAreas()) {+ try {+ const token = area.getItem(SESSION_KEY);+ const address = area.getItem(ADDRESS_KEY);+ if (token && address) return { authToken: token, address };+ } catch {+ /* storage may be unavailable */+ }}return null;}function writeStoredAuth(authToken, address) {+ const [primary] = storageAreas();+ if (!primary) return;try {- sessionStorage.setItem(SESSION_KEY, authToken);- sessionStorage.setItem(ADDRESS_KEY, address);+ primary.setItem(SESSION_KEY, authToken);+ primary.setItem(ADDRESS_KEY, address);} catch {/* non-fatal */}}function clearStoredAuth() {- try {- sessionStorage.removeItem(SESSION_KEY);- sessionStorage.removeItem(ADDRESS_KEY);- } catch {- /* non-fatal */+ for (const area of storageAreas()) {+ try {+ area.removeItem(SESSION_KEY);+ area.removeItem(ADDRESS_KEY);+ } catch {+ /* non-fatal */+ }}}@@ -170,10 +188,9 @@ export class MwaWallet {});} catch (err) {if (onlyResume) {- // reauthorize() failed because the wallet revoked the token- // — clear it and let the caller decide whether to prompt.- clearStoredAuth();- this.#authToken = null;+ // reauthorize() failed because the wallet revoked the token.+ // Drop it and let the caller decide whether to prompt.+ this.#reset();}throw normalizeMwaError(err);}@@ -224,11 +241,7 @@ export class MwaWallet {let signed = null;try {await transact(async (wallet) => {- const reauth = await wallet.reauthorize({- auth_token: this.#authToken,- identity: APP_IDENTITY,- });- this.#applyAuthResult(reauth);+ await this.#reauthorize(wallet);signed = await wallet.signMessages({addresses: [this.#authResultAddressBase64()],payloads: [messageBytes],@@ -266,11 +279,7 @@ export class MwaWallet {let signed = [];try {await transact(async (wallet) => {- const reauth = await wallet.reauthorize({- auth_token: this.#authToken,- identity: APP_IDENTITY,- });- this.#applyAuthResult(reauth);+ await this.#reauthorize(wallet);signed = await wallet.signTransactions({ transactions });});} catch (err) {@@ -295,11 +304,7 @@ export class MwaWallet {let signatures = null;try {await transact(async (wallet) => {- const reauth = await wallet.reauthorize({- auth_token: this.#authToken,- identity: APP_IDENTITY,- });- this.#applyAuthResult(reauth);+ await this.#reauthorize(wallet);signatures = await wallet.signAndSendTransactions({transactions: [transaction],...(minContextSlot ? { minContextSlot } : null),@@ -368,6 +373,24 @@ export class MwaWallet {/** Whether this provider can perform one-tap authorize-time sign-in. */get supportsSignIn() { return true; }+ // Every signing session re-presents the stored auth token. When the Seed+ // Vault has revoked it (wallet wiped, app deauthorized from the wallet+ // side), a dead token must not linger: clear it and emit disconnect so the+ // next call authorizes from scratch instead of failing forever.+ async #reauthorize(wallet) {+ let result;+ try {+ result = await wallet.reauthorize({+ auth_token: this.#authToken,+ identity: APP_IDENTITY,+ });+ } catch (err) {+ this.#reset();+ throw err;+ }+ this.#applyAuthResult(result);+ }+#applyAuthResult(result) {if (!result || typeof result !== 'object') throw new Error('MWA returned invalid auth result');const account = Array.isArray(result.accounts) ? result.accounts[0] : null;diff --git a/solana-mobile/src/package.json b/solana-mobile/src/package.jsonindex 12dbd2547..625b7628c 100644--- a/solana-mobile/src/package.json+++ b/solana-mobile/src/package.json@@ -14,7 +14,7 @@"@solana/web3.js": "^1.95.0"},"dependencies": {- "@solana-mobile/mobile-wallet-adapter-protocol-web3js": "^2.2.2",- "@solana-mobile/mobile-wallet-adapter-protocol": "^2.2.2"+ "@solana-mobile/mobile-wallet-adapter-protocol-web3js": "^2.2.9",+ "@solana-mobile/mobile-wallet-adapter-protocol": "^2.2.9"}}diff --git a/solana-mobile/twa/twa-manifest.json b/solana-mobile/twa/twa-manifest.jsonindex e6c818870..5d0430463 100644--- a/solana-mobile/twa/twa-manifest.json+++ b/solana-mobile/twa/twa-manifest.json@@ -35,7 +35,7 @@{"name": "My agents","shortName": "My agents",- "url": "https://three.ws/agents?utm_source=seeker_shortcut",+ "url": "https://three.ws/my-agents?utm_source=seeker_shortcut","chosenIconUrl": "https://three.ws/pwa-192x192.png"}],diff --git a/tests/solana-mobile-mwa-wallet.test.js b/tests/solana-mobile-mwa-wallet.test.jsindex fe964f518..6d2cf8fe0 100644--- a/tests/solana-mobile-mwa-wallet.test.js+++ b/tests/solana-mobile-mwa-wallet.test.js@@ -54,7 +54,7 @@ function makeWallet(overrides = {}) {}beforeEach(() => {- sessionStorage.clear();+ localStorage.clear();h.state.wallet = makeWallet();h.state.transactCalls = 0;});@@ -78,8 +78,8 @@ describe('MwaWallet.connect', () => {expect(w.isConnected).toBe(true);expect(onConnect).toHaveBeenCalledWith(w.publicKey);// Auth token + address persisted for resume.- expect(sessionStorage.getItem('threews:mwa:authToken')).toBe('tok-1');- expect(sessionStorage.getItem('threews:mwa:address')).toBe(ADDR);+ expect(localStorage.getItem('threews:mwa:authToken')).toBe('tok-1');+ expect(localStorage.getItem('threews:mwa:address')).toBe(ADDR);});it('is a no-op when already connected (no second transport session)', async () => {@@ -106,8 +106,8 @@ describe('MwaWallet.connect', () => {});it('reauthorizes (not authorize) when a stored token exists', async () => {- sessionStorage.setItem('threews:mwa:authToken', 'stored-tok');- sessionStorage.setItem('threews:mwa:address', ADDR);+ localStorage.setItem('threews:mwa:authToken', 'stored-tok');+ localStorage.setItem('threews:mwa:address', ADDR);const w = new MwaWallet();// Constructor rehydrated address, so it is already "connected"; force a// resume through the transport by clearing the public key path.@@ -120,8 +120,8 @@ describe('MwaWallet.connect', () => {// A rehydrated wallet still holds a token, but signing forces a// reauthorize; if the wallet revoked it, the operation must reject// rather than sign against a dead session.- sessionStorage.setItem('threews:mwa:authToken', 'revoked');- sessionStorage.setItem('threews:mwa:address', ADDR);+ localStorage.setItem('threews:mwa:authToken', 'revoked');+ localStorage.setItem('threews:mwa:address', ADDR);h.state.wallet = makeWallet({reauthorize: vi.fn().mockRejectedValue(new Error('token revoked')),});@@ -130,6 +130,23 @@ describe('MwaWallet.connect', () => {// Normalized to a stable MwaError; original preserved as cause.expect(err.name).toBe('MwaError');expect(err.cause?.message).toMatch(/revoked/);+ // The dead token is dropped so the next call authorizes from scratch+ // instead of re-presenting a revoked session forever.+ expect(w.isConnected).toBe(false);+ expect(localStorage.getItem('threews:mwa:authToken')).toBe(null);+ });++ it('emits disconnect when a signing reauthorize finds the token revoked', async () => {+ localStorage.setItem('threews:mwa:authToken', 'revoked');+ localStorage.setItem('threews:mwa:address', ADDR);+ h.state.wallet = makeWallet({+ reauthorize: vi.fn().mockRejectedValue(new Error('token revoked')),+ });+ const w = new MwaWallet();+ const onDisconnect = vi.fn();+ w.on('disconnect', onDisconnect);+ await w.signAllTransactions([{}]).catch(() => {});+ expect(onDisconnect).toHaveBeenCalledTimes(1);});});@@ -229,7 +246,7 @@ describe('MwaWallet.disconnect', () => {expect(w.isConnected).toBe(false);expect(w.publicKey).toBe(null);expect(onDisconnect).toHaveBeenCalled();- expect(sessionStorage.getItem('threews:mwa:authToken')).toBe(null);+ expect(localStorage.getItem('threews:mwa:authToken')).toBe(null);});it('is safe to call with no active session', async () => {@@ -250,7 +267,14 @@ describe('MwaWallet.disconnect', () => {});describe('session persistence', () => {- it('rehydrates a connected wallet from sessionStorage', async () => {+ it('survives sessionStorage loss (Android process death) via localStorage', async () => {+ const first = new MwaWallet();+ await first.connect();+ sessionStorage.clear();+ expect(new MwaWallet().isConnected).toBe(true);+ });++ it('rehydrates a connected wallet from localStorage', async () => {const first = new MwaWallet();await first.connect();// A fresh instance (app relaunch) should already be connected.diff --git a/vite.config.js b/vite.config.jsindex a39341412..a2f8b9e15 100644--- a/vite.config.js+++ b/vite.config.js@@ -3148,7 +3148,10 @@ const appConfig = {name: 'My Agents',short_name: 'My Agents',description: 'Manage your AI agents',- url: '/agents?source=pwa-shortcut',+ // /agents is the public index of every agent; the owner's own+ // agents live at /my-agents. The shortcut said "My Agents" and+ // opened the public list for months.+ url: '/my-agents?source=pwa-shortcut',icons: [{ src: 'pwa-192x192.png', sizes: '192x192' }],},],