Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix(payment-modal): build $THREE payments against the mint's real token program

nirholas1606f5067714
diff --git a/CHANGELOG.md b/CHANGELOG.md
index aedb6089d..11dc88c09 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **A mistyped id on the signal marketplace answers plainly, and the live feed links to the right chain**: The signal marketplace identifies a feed or a subscription by a number. Anything that was not one (a typo, a stray word, an empty box) went straight to the database, which threw the whole query out, so the caller got an opaque "something went wrong" and our alerting recorded a fault that was never a fault. Pausing a feed, killing or resyncing a subscription, and subscribing to a feed each now answer with a plain "that is not a valid id" instead. Separately, the paid live signal stream built its Solscan links from whichever network the request named rather than the one the feed actually publishes on, so a subscriber could be handed devnet explorer links for a mainnet call; the feed's own record now decides, and every proof link lands on the chain the trade really happened on. (`/signals`) `[fix]`
- **Agent attestations that stopped indexing now recover on their own**: An agent's on-chain attestation history is indexed by walking Solana signatures newer than the last one we recorded. If that recorded signature aged out of the RPC node's history, the walk failed outright and kept failing: the same dead signature was replayed on every run, so that agent's attestations silently stopped appearing on its profile while the scheduled job still reported success. The crawler now recognises that case, re-scans from the most recent signatures instead, and clears the stale marker, so an agent that fell behind catches up by itself on the next pass. `[fix, infra]`
- **Agent share cards survive an unconfigured bucket, and a mistyped payment mint is refused instead of listed**: An audit of the agent endpoints turned up four things worth fixing. A skill price set through /api/agents/:id/skills/set-price accepted any text as its payment mint and saved it, so a typo produced a listing nobody could actually pay; it now has to be a real base58 address, matching the other door onto the same table. The agent share page and its OG image used to answer a social crawler with a hard error whenever object storage was not configured, instead of falling back to the plain card they already knew how to draw. A mistyped agent id in the diary, skill-price and screen-push endpoints came back as a server error rather than the plain "that is not an agent id" it is. And an agent screen with no live frame store now tells you the agent is offline right away instead of leaving you on "Connecting" for five minutes. `[fix, improvement]`
+- **Agent Studio shows your real avatar again, and a shared studio link stops opening the wrong agent**: Four repairs to the Agent Studio. The live stage on the left is meant to be your agent's actual body, but the 3D renderer was leaking its internal debug controls into that panel, including a stray rainbow colour strip painted over the avatar. Those controls are hidden now, everywhere the live agent appears. Second, opening a studio link that names someone else's agent used to quietly load your own agent instead and put it in a full editor under the other agent's address, so any edit went to the wrong record; it now loads the agent the link names and, when it is not yours, says so and offers its public profile. Third, on a phone the five section tabs ran off the edge of the screen, leaving Money and Skills unreachable behind a hidden scrollbar; all five now fit. Finally the status pill on the stage moved to the top so it stops sitting on top of your agent's name, and the walking companion no longer doubles up in the corner on a page that already shows your agent life-size. (`/agent-studio`) `[fix]`
- **An expired X connection now offers to reconnect instead of sending you to the login page**: Posting a Walk screenshot or clip to X goes through your connected X account. When that connection could no longer be renewed, the share endpoint answered with the same code it uses for a signed-out visitor, so the capture panel told an already signed-in user to sign in to three.ws and linked them to the login page, which fixed nothing. That case now comes back as its own answer with the X connect link attached, and the panel offers a Reconnect X button that takes you straight to the flow that repairs it. The share caption also lost a stray dash. (`/walk`) `[fix]`
- **An unsubscribe now sticks, even if you click an old confirm link**: Every three.ws newsletter email carries a confirm link and an unsubscribe link that share one token, so a reader who unsubscribed and later opened an older email and clicked confirm was quietly put back on the list. That link no longer signs anyone up: it says you are unsubscribed and leaves it that way, and opting back in starts from the site. Three other fixes ship alongside it. The allocation planner at /meta-allocator no longer serves an empty basket when the model declines to answer, it falls back to the allocator that always produces a real spread across verified leaders. The motion capture uploader told you an upload link lasted ten minutes when it really lasted five, so a large video queued on that promise could fail with nothing explaining why. And an agent whose stablecoin payment is rejected by the x402 Bazaar now gets the Bazaar's own details back instead of a different server's, so its retry is aimed at the right place. (`/changelog`) `[fix]`
- **Avatar link previews stop rebuilding themselves, and two feeds answer a bad page link plainly**: An audit of the chat, media and board endpoints found three real breaks. When you share an avatar link, the preview image is drawn once and then kept, so every later share is instant. A mix-up between the stored image and its address meant every freshly drawn preview was mistaken for an old broken one: the saved copy was thrown away and the picture was redrawn from scratch on every single share. The preview is now kept, as it always should have been, and genuinely broken old records are repaired the next time they are drawn. Separately, the character directory answered a hand-edited or stale "next page" link with a server error instead of saying the value was not a timestamp, and the bounty board did the same when the page size in the address was not a number. Both now answer plainly, and the board simply falls back to its normal page size. (`/characters`) `[fix]`
diff --git a/data/changelog.json b/data/changelog.json
index 33cbb08f5..0be8d4619 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,15 @@
{
"$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-16",
+ "title": "Agent Studio shows your real avatar again, and a shared studio link stops opening the wrong agent",
+ "summary": "Four repairs to the Agent Studio. The live stage on the left is meant to be your agent's actual body, but the 3D renderer was leaking its internal debug controls into that panel, including a stray rainbow colour strip painted over the avatar. Those controls are hidden now, everywhere the live agent appears. Second, opening a studio link that names someone else's agent used to quietly load your own agent instead and put it in a full editor under the other agent's address, so any edit went to the wrong record; it now loads the agent the link names and, when it is not yours, says so and offers its public profile. Third, on a phone the five section tabs ran off the edge of the screen, leaving Money and Skills unreachable behind a hidden scrollbar; all five now fit. Finally the status pill on the stage moved to the top so it stops sitting on top of your agent's name, and the walking companion no longer doubles up in the corner on a page that already shows your agent life-size.",
+ "tags": [
+ "fix"
+ ],
+ "link": "/agent-studio"
+ },
{
"date": "2026-08-16",
"title": "External Solana agents get their names and artwork back in the directory",
diff --git a/public/changelog.json b/public/changelog.json
index 91de4838b..263654ca1 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-08-16T17:19:39.061Z",
+ "generated_at": "2026-08-16T17:20:56.851Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -71,6 +71,16 @@
"improvement"
]
},
+ {
+ "date": "2026-08-16",
+ "type": "update",
+ "title": "Agent Studio shows your real avatar again, and a shared studio link stops opening the wrong agent",
+ "summary": "Four repairs to the Agent Studio. The live stage on the left is meant to be your agent's actual body, but the 3D renderer was leaking its internal debug controls into that panel, including a stray rainbow colour strip painted over the avatar. Those controls are hidden now, everywhere the live agent appears. Second, opening a studio link that names someone else's agent used to quietly load your own agent instead and put it in a full editor under the other agent's address, so any edit went to the wrong record; it now loads the agent the link names and, when it is not yours, says so and offers its public profile. Third, on a phone the five section tabs ran off the edge of the screen, leaving Money and Skills unreachable behind a hidden scrollbar; all five now fit. Finally the status pill on the stage moved to the top so it stops sitting on top of your agent's name, and the walking companion no longer doubles up in the corner on a page that already shows your agent life-size.",
+ "link": "/agent-studio",
+ "tags": [
+ "fix"
+ ]
+ },
{
"date": "2026-08-16",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index b4bca3805..a8e0ecd3b 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -54,6 +54,14 @@
<category>fix</category>
<description>An audit of the agent endpoints turned up four things worth fixing. A skill price set through /api/agents/:id/skills/set-price accepted any text as its payment mint and saved it, so a typo produced a listing nobody could actually pay; it now has to be a real base58 address, matching the other door onto the same table. The agent share page and its OG image used to answer a social crawler with a hard error whenever object storage was not configured, instead of falling back to the plain card they already knew how to draw. A mistyped agent id in the diary, skill-price and screen-push endpoints came back as a server error rather than the plain &quot;that is not an agent id&quot; it is. And an agent screen with no live frame store now tells you the agent is offline right away instead of leaving you on &quot;Connecting&quot; for five minutes.</description>
</item>
+ <item>
+ <title>Agent Studio shows your real avatar again, and a shared studio link stops opening the wrong agent</title>
+ <link>https://three.ws/agent-studio</link>
+ <guid isPermaLink="false">2026-08-16:Agent Studio shows your real avatar again, and a shared studio link stops opening the wrong agent</guid>
+ <pubDate>Sun, 16 Aug 2026 12:00:00 GMT</pubDate>
+ <category>fix</category>
+ <description>Four repairs to the Agent Studio. The live stage on the left is meant to be your agent's actual body, but the 3D renderer was leaking its internal debug controls into that panel, including a stray rainbow colour strip painted over the avatar. Those controls are hidden now, everywhere the live agent appears. Second, opening a studio link that names someone else's agent used to quietly load your own agent instead and put it in a full editor under the other agent's address, so any edit went to the wrong record; it now loads the agent the link names and, when it is not yours, says so and offers its public profile. Third, on a phone the five section tabs ran off the edge of the screen, leaving Money and Skills unreachable behind a hidden scrollbar; all five now fit. Finally the status pill on the stage moved to the top so it stops sitting on top of your agent's name, and the walking companion no longer doubles up in the corner on a page that already shows your agent life-size.</description>
+ </item>
<item>
<title>An expired X connection now offers to reconnect instead of sending you to the login page</title>
<link>https://three.ws/walk</link>
diff --git a/public/features.json b/public/features.json
index 58c1da4fc..9de6c83af 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-08-16T17:19:38.938Z",
+ "generated_at": "2026-08-16T17:20:56.730Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/src/payment-modal.js b/src/payment-modal.js
index bde1154d4..816bf8da3 100644
--- a/src/payment-modal.js
+++ b/src/payment-modal.js
@@ -13,6 +13,7 @@ import { formatUsdcEq, formatSolEq } from './shared/usd-price.js';
import { buildReceiptHTML, buildReceiptText } from './shared/payment-receipt.js';
import { showAddFunds } from './shared/add-funds.js';
import { ensureRiskAck } from './shared/risk-ack.js';
+import { resolveTokenProgramId } from './shared/spl-token-program.js';
import { apiFetch } from './api.js';
import { log } from './shared/log.js';
@@ -958,12 +959,15 @@ export class PaymentChip {
const mintKey = new PublicKey(purch.currency_mint);
const referenceKey = new PublicKey(purch.reference);
- const fromAta = getAssociatedTokenAddressSync(mintKey, payerKey);
- const toAta = getAssociatedTokenAddressSync(mintKey, recipientKey);
+ // Same Token-2022 rule as the modal path above: build against the
+ // program that actually owns the seller's chosen mint.
+ const tokenProgramId = await resolveTokenProgramId(this._connection, mintKey, spl);
+ const fromAta = getAssociatedTokenAddressSync(mintKey, payerKey, false, tokenProgramId);
+ const toAta = getAssociatedTokenAddressSync(mintKey, recipientKey, false, tokenProgramId);
// Pre-flight balance check before showing the wallet prompt
try {
- const ataInfo = await getAccount(this._connection, fromAta, 'confirmed');
+ const ataInfo = await getAccount(this._connection, fromAta, 'confirmed', tokenProgramId);
if (BigInt(ataInfo.amount) < BigInt(purch.amount)) {
showChipAddFunds(purch.amount, Number(ataInfo.amount));
return;
@@ -972,7 +976,14 @@ export class PaymentChip {
// ATA not yet created — proceed; sendTransaction will surface the error
}
- const ix = createTransferInstruction(fromAta, toAta, payerKey, BigInt(purch.amount));
+ const ix = createTransferInstruction(
+ fromAta,
+ toAta,
+ payerKey,
+ BigInt(purch.amount),
+ [],
+ tokenProgramId,
+ );
ix.keys.push({ pubkey: referenceKey, isSigner: false, isWritable: false });
const { blockhash, lastValidBlockHeight } = await this._connection.getLatestBlockhash('confirmed');