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: update default prices and tick configurations for ring-settle and tick cap
fudjia158d0264fe76
diff --git a/api/_lib/x402/ring-catalog.js b/api/_lib/x402/ring-catalog.jsindex e474d9b8a..58d7357be 100644--- a/api/_lib/x402/ring-catalog.js+++ b/api/_lib/x402/ring-catalog.js@@ -80,7 +80,7 @@ export const RING_CATALOG = [path: '/api/x402/ring-settle',method: 'POST',body: () => ({ note: 'ring-cycle', seq: 1 }),- priceAtomicDefault: 35_000_000,+ priceAtomicDefault: 1_000_000,priceSlug: 'ring-settle',tier: 'settle',kind: 'settle',diff --git a/api/_lib/x402/ring-tick-plan.js b/api/_lib/x402/ring-tick-plan.jsindex 3000d32b2..7627c577b 100644--- a/api/_lib/x402/ring-tick-plan.js+++ b/api/_lib/x402/ring-tick-plan.js@@ -26,19 +26,17 @@ export function ringTickConfig(e = process.env) {// Paid calls to attempt per minute.calls: Math.max(1, Math.floor(num(e.X402_RING_TICK_CALLS, 3))),// Fire one ring-settle every Nth tick (0 disables the settle carrier).- // Default 1 = settle every minute — the throughput lever behind the- // ~$50k/day volume target (1440 ticks × the $35 ring-settle price).- settleEveryN: Math.max(0, Math.floor(num(e.X402_RING_SETTLE_EVERY_N_TICKS, 1))),+ settleEveryN: Math.max(0, Math.floor(num(e.X402_RING_SETTLE_EVERY_N_TICKS, 5))),// Spend ceiling for a single tick (atomics). Must fit a ring-settle tick:- // ring-settle price + (calls-1) cheap calls. Default $40 (covers the $35- // settle plus its cheap co-riders).- tickCapAtomic: num(e.X402_RING_TICK_CAP_ATOMIC, 40_000_000),+ // ring-settle price + (calls-1) cheap calls. Default $1.10.+ tickCapAtomic: num(e.X402_RING_TICK_CAP_ATOMIC, 1_100_000),// Ring tick's OWN daily ceiling (atomics), summed from x402_autonomous_log// rows tagged pipeline='ring-tick'. Separate from the autonomous loop's- // X402_AUTONOMOUS_DAILY_CAP_ATOMIC — the two budgets never touch. Default- // $60k: headroom above the ~$50k/day settle throughput so the daily cap is- // never the binding limit (funding + scheduler cadence are).- dailyCapAtomic: num(e.X402_RING_DAILY_CAP_ATOMIC, 60_000_000_000),+ // X402_AUTONOMOUS_DAILY_CAP_ATOMIC — the two budgets never touch. Default $50.+ // Scaling throughput up is an env change made TOGETHER with funding the+ // payer — defaults must stay affordable from the ring's real balances or+ // every tick skips on back-pressure and the ring flat-lines.+ dailyCapAtomic: num(e.X402_RING_DAILY_CAP_ATOMIC, 50_000_000),// Sponsor/payer SOL floor (lamports). Mirrors self-facilitator's// SPONSOR_SOL_FLOOR_LAMPORTS default (0.02 SOL) — below it, settlement is// paused, so we skip the tick rather than fire calls that will 502.diff --git a/api/agora/[action].js b/api/agora/[action].jsindex d3f1453b1..10d9f3713 100644--- a/api/agora/[action].js+++ b/api/agora/[action].js@@ -28,6 +28,7 @@ import { createHash } from 'node:crypto';import { cors, json, method, error, wrap, serverError } from '../_lib/http.js';import { limits, clientIp } from '../_lib/rate-limit.js';import { sql } from '../_lib/db.js';+import { isUuid } from '../_lib/validate.js';import { Bazaar, filterByMaxPrice, filterByNetwork } from '../_lib/x402/bazaar-client.js';import { assembleTaskLive } from '../_lib/agora-task-live.js';// Terminal-kind sets + type helpers are the labour engine's single source of@@ -401,6 +402,10 @@ async function handlePassport(req, res) {const q = req.query || {};let row;if (q.id) {+ // agora_citizens.id is a uuid column — a non-uuid id (scanner probes send+ // arbitrary strings) would make Postgres throw 22P02 and 500. Same outcome+ // as a well-formed-but-unknown id: no such citizen.+ if (!isUuid(String(q.id))) return error(res, 404, 'not_found', 'no such citizen');[row] = await sql`select * from agora_citizens where id = ${String(q.id)} limit 1`;} else if (q.agentPda) {[row] = await sql`select * from agora_citizens where agenc_agent_pda = ${String(q.agentPda)} limit 1`;diff --git a/api/cron/x402-ring-tick.js b/api/cron/x402-ring-tick.jsindex 712cf3484..fc11a8bdf 100644--- a/api/cron/x402-ring-tick.js+++ b/api/cron/x402-ring-tick.js@@ -73,7 +73,7 @@ import {const log = logger('x402-ring-tick');const ORIGIN = () => env.APP_ORIGIN || 'https://three.ws';-const RING_SETTLE_DEFAULT_PRICE = '35000000'; // $35.00 — mirrors ring-settle.js (RING_SETTLE_DEFAULT_PRICE_ATOMICS)+const RING_SETTLE_DEFAULT_PRICE = '1000000'; // $1.00 — mirrors ring-settle.js (RING_SETTLE_DEFAULT_PRICE_ATOMICS)// Redis keys: a monotonic per-minute tick counter and the cheap-rotation cursor.// Independent of the volume loop's cursor so the two drivers rotate separately.