Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat(streaks): count a confirmed on-chain trade as daily activity
nirholas9e7166759b63
diff --git a/api/_lib/streaks.js b/api/_lib/streaks.jsindex a531b7223..fa08ba003 100644--- a/api/_lib/streaks.js+++ b/api/_lib/streaks.js@@ -7,6 +7,7 @@* · a finished forge model (api/_lib/forge-store.js materializeCreation)* · a saved world (api/_lib/diorama-store.js saveDiorama)* · a /walk activity batch (api/walk/metrics.js, signed-in walkers only)+ * · a confirmed on-chain trade (api/pump/[action].js, buy and sell)** Each of those call sites calls recordDailyActivity(userId) after its own* write succeeds. The upsert here is idempotent per UTC day — calling itdiff --git a/api/pump/[action].js b/api/pump/[action].jsindex 2826e866c..29d691d10 100644--- a/api/pump/[action].js+++ b/api/pump/[action].js@@ -67,6 +67,7 @@ import { queryAgentLaunches } from '../_lib/pump-agent-launches.js';import { markPlanLaunched } from '../_lib/agent-token-plan.js';import { randomToken } from '../_lib/crypto.js';import { publishFeedEvent } from '../_lib/feed.js';+import { recordDailyActivity } from '../_lib/streaks.js';import { normalizeGatewayURL } from '../../src/ipfs.js';import { buildTokenMetadata } from '../_lib/three-brand.js';import { buildPlatformFeeInstructions, effectivePumpFeeBps } from '../_lib/pump-platform-fee.js';@@ -623,6 +624,11 @@ async function handleBuyConfirm(req, res) {${body.slippage_bps ?? null}, ${body.tx_signature}, ${body.network})on conflict (tx_signature, network) do nothing`;+ // A confirmed on-chain trade is the most real thing a user does here, and+ // the cross-surface streak counted logins, forges, worlds and walks but not+ // this. Fire-and-forget and idempotent per UTC day, exactly like every other+ // call site: it can never delay or fail the buy that earned it.+ recordDailyActivity(user.id).catch(() => {});}// Surface the buy on the site-wide live activity ticker. The tx is already@@ -926,6 +932,7 @@ async function handleSellConfirm(req, res) {${body.slippage_bps ?? null}, ${body.tx_signature}, ${body.network})on conflict (tx_signature, network) do nothing`;+ recordDailyActivity(user.id).catch(() => {});}return json(res, 200, {