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.

feat(economy): wire economy-tick cron + retire dead GitHub heartbeat

qrqk26091f6facdc
diff --git a/.github/workflows/economy-heartbeat.yml b/.github/workflows/economy-heartbeat.yml
deleted file mode 100644
index 79d06bd1f..000000000
--- a/.github/workflows/economy-heartbeat.yml
+++ /dev/null
@@ -1,67 +0,0 @@
-name: economy-heartbeat
-
-# External failover scheduler for the platform's Vercel crons
-# (scripts/economy-heartbeat.mjs — see docs/economy-heartbeat.md).
-#
-# Vercel Cron is the primary scheduler. When the Vercel project cannot fire
-# crons (account block, paused project), this workflow keeps every /api/cron/*
-# endpoint ticking on the schedule declared in vercel.json: each run lasts ~5
-# minutes and wakes at every UTC minute boundary, so minute-level crons
-# (x402-seed-cron) still fire every minute even though GitHub's scheduler
-# minimum is 5 minutes. Runs are queued, never cancelled, for gap-free coverage.
-#
-# Safe to leave enabled while Vercel crons are healthy: the endpoints are the
-# same ones Vercel calls, each tick is capped server-side, and double ticks are
-# absorbed by the engines' per-tick and daily caps.
-#
-# Requires repo secret CRON_SECRET (the same bearer secret set on Vercel).
-
-on:
- workflow_dispatch:
- inputs:
- duration_minutes:
- description: 'How many minutes this run should keep ticking'
- required: false
- default: '5'
- only:
- description: 'Optional regex filter on cron paths (e.g. pulse|x402)'
- required: false
- default: ''
- schedule:
- - cron: '*/5 * * * *'
-
-concurrency:
- group: economy-heartbeat
- cancel-in-progress: false
-
-permissions:
- contents: read
-
-jobs:
- heartbeat:
- runs-on: ubuntu-latest
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v4
- with:
- sparse-checkout: |
- vercel.json
- scripts/economy-heartbeat.mjs
- sparse-checkout-cone-mode: false
-
- - uses: actions/setup-node@v4
- with:
- node-version: 24
-
- - name: Tick all due crons
- env:
- CRON_SECRET: ${{ secrets.CRON_SECRET }}
- BASE_URL: https://three.ws
- DURATION_MINUTES: ${{ inputs.duration_minutes || '5' }}
- ONLY: ${{ inputs.only || '' }}
- run: |
- if [ -z "$CRON_SECRET" ]; then
- echo "::warning::Repo secret CRON_SECRET is not set — heartbeat is idle. Add it (same value as the Vercel CRON_SECRET env var) to activate the failover."
- exit 0
- fi
- node scripts/economy-heartbeat.mjs
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 16a4d3c24..2dc6706f7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **A little Fourth of July on the homepage** — Visit the homepage this week and you'll catch some quiet Independence Day touches: a thin red-white-and-blue line across the top of the page and the occasional tiny firework sparkling in the hero. Nothing loud — it keeps the site clean, respects reduced-motion settings, works in both light and dark themes, and retires itself automatically after July 5. (`/`) `[improvement]`
- **Deploys restored — the platform ships again, and builds are 4× lighter** — three.ws was briefly unreachable while production moved to new infrastructure: every deploy was timing out at the build platform's 45-minute ceiling. The root cause is fixed — a monitoring SDK was being baked into every one of the platform's ~800 API functions, inflating the deploy payload to 2.3 GB; it now loads only where it is actually enabled, cutting that to 540 MB. Two smaller deploy blockers found along the way (a build-order race and two missing packages) are fixed too. The site is back, deploys complete with time to spare, and nothing about how you use the platform changes. `[infra, fix]`
- **Four gestures return to the walk companion — nod, shrug, jog, celebrate** — The gesture wheel regained four expressive moves that had been silently dropped: nod (a quick upper-body affirm), shrug, jog (a full-body run loop), and celebrate (a whole-body cheer). Open the wheel with G (or long-press the action button on mobile) — the wheel now lays out all twelve gestures; keys 1–8 still trigger the first eight. Also part of this pass: the entire test suite now runs fully green, locking every one of these behaviors in. (`/walk`) `[fix]`
+- **The agent economy now runs from a single always-on heartbeat** — The live agent-to-agent economy - ring settlements, x402 micropayments, the Money Pulse feed, and the Labor Market - used to stall for hours at a time because it depended on schedulers that were silently not firing. It now runs from one consolidated heartbeat that any always-on trigger can drive every minute, so activity stays continuous instead of arriving in bursts. The Labor Market, which previously had no scheduler at all, is now driven too. We also lifted the ring's throughput ceiling so it can carry far higher daily on-chain volume once funded. `[improvement, infra]`
## 2026-07-03
diff --git a/api/coin/global.js b/api/coin/global.js
new file mode 100644
index 000000000..4685291a2
--- /dev/null
+++ b/api/coin/global.js
@@ -0,0 +1,71 @@
+// GET /api/coin/global
+// ---------------------------------------------------------------------------
+// Global market stats bar for the /coins page: total market cap, 24h volume,
+// top-2 dominance shares, active coin count (CoinGecko /global) plus the
+// Fear & Greed index (alternative.me — the standard free source). Each half is
+// independent: if one upstream fails the other still renders. Cached 120s.
+
+import { cors, json, method, wrap, error, rateLimited } from '../_lib/http.js';
+import { limits, clientIp } from '../_lib/rate-limit.js';
+import { geckoFetch } from '../_lib/coingecko.js';
+
+const num = (v) => (typeof v === 'number' && Number.isFinite(v) ? v : null);
+
+let _fng = null; // { value, expiresAt }
+const FNG_TTL_MS = 300_000;
+
+async function fetchFearGreed() {
+ const now = Date.now();
+ if (_fng && _fng.expiresAt > now) return _fng.value;
+ const resp = await fetch('https://api.alternative.me/fng/?limit=1', {
+ headers: { accept: 'application/json', 'user-agent': 'three.ws/1.0' },
+ signal: AbortSignal.timeout(6000),
+ });
+ if (!resp.ok) throw new Error(`fng ${resp.status}`);
+ const raw = await resp.json();
+ const d = raw?.data?.[0];
+ const value = d ? { value: Number(d.value), label: d.value_classification || null } : null;
+ if (!value || !Number.isFinite(value.value)) throw new Error('fng payload');
+ _fng = { value, expiresAt: now + FNG_TTL_MS };
+ return value;
+}
+
+export default wrap(async (req, res) => {
+ if (cors(req, res, { methods: 'GET,OPTIONS', origins: '*' })) return;
+ if (!method(req, res, ['GET'])) return;
+
+ const rl = await limits.publicIp(clientIp(req));
+ if (!rl.success) return rateLimited(res, rl);
+
+ const [globalResult, fngResult] = await Promise.allSettled([
+ geckoFetch('/global', { ttlMs: 120_000 }),
+ fetchFearGreed(),
+ ]);
+
+ let market = null;
+ if (globalResult.status === 'fulfilled') {
+ const g = globalResult.value?.data || {};
+ // Top-2 dominance entries come from the runtime response, largest first —
+ // no asset list is hardcoded here.
+ const dominance = Object.entries(g.market_cap_percentage || {})
+ .filter(([, v]) => Number.isFinite(v))
+ .sort((a, b) => b[1] - a[1])
+ .slice(0, 2)
+ .map(([sym, pct]) => ({ symbol: sym.toUpperCase(), pct }));
+ market = {
+ market_cap_usd: num(g.total_market_cap?.usd),
+ volume_24h_usd: num(g.total_volume?.usd),
+ market_cap_change_pct_24h: num(g.market_cap_change_percentage_24h_usd),
+ active_coins: num(g.active_cryptocurrencies),
+ dominance,
+ };
+ }
+ const fear_greed = fngResult.status === 'fulfilled' ? fngResult.value : null;
+
+ if (!market && !fear_greed) {
+ return error(res, 502, 'upstream_error', 'global market data is unavailable right now');
+ }
+ return json(res, 200, { market, fear_greed }, {
+ 'cache-control': 'public, max-age=60, s-maxage=120, stale-while-revalidate=600',
+ });
+});
diff --git a/api/coin/news.js b/api/coin/news.js
index 9c9c56f9a..0457139ed 100644
--- a/api/coin/news.js
+++ b/api/coin/news.js
@@ -1,20 +1,109 @@
// GET /api/coin/news?q=<coin name>&limit=8
// ---------------------------------------------------------------------------
-// Related-news rail for the /coin/:id page. Proxies the live cryptocurrency.cv
-// aggregator (same team, 12+ first-party sources) and slims each article to
-// the fields the card renders. Cached 300s at the CDN — news freshness at the
-// minute level is plenty for a coin profile.
+// Related-news rail for the /coin/:id page. Primary source is the live
+// cryptocurrency.cv aggregator (same team, 12+ first-party sources). When that
+// deployment is unreachable, this falls back to reading the same upstream RSS
+// feeds it aggregates (CoinDesk, Cointelegraph, Decrypt, The Block) directly
+// and filtering by the query — real articles either way, never fabricated.
+// Cached 300s in-memory + CDN.
+import { XMLParser } from 'fast-xml-parser';
import { cors, json, method, wrap, error, rateLimited } from '../_lib/http.js';
import { limits, clientIp } from '../_lib/rate-limit.js';
const NEWS_BASE = 'https://cryptocurrency.cv/api/news';
+// Feed list mirrors the cryptocurrency.cv source registry (src/lib/crypto-news.ts).
+const RSS_FEEDS = [
+ { source: 'CoinDesk', url: 'https://www.coindesk.com/arc/outboundfeeds/rss/' },
+ { source: 'Cointelegraph', url: 'https://cointelegraph.com/rss' },
+ { source: 'Decrypt', url: 'https://decrypt.co/feed' },
+ { source: 'The Block', url: 'https://www.theblock.co/rss.xml' },
+];
+
const _cache = new Map(); // key → { value, expiresAt }
const TTL_MS = 300_000;
const str = (v) => (typeof v === 'string' && v.trim() ? v.trim() : null);
+function stripHtml(s) {
+ return String(s || '')
+ .replace(/<[^>]+>/g, ' ')
+ .replace(/&amp;/g, '&')
+ .replace(/&lt;/g, '<')
+ .replace(/&gt;/g, '>')
+ .replace(/&quot;/g, '"')
+ .replace(/&#0?39;|&apos;/g, "'")
+ .replace(/\s+/g, ' ')
+ .trim();
+}
+
+async function fromAggregator(q, limit) {
+ const resp = await fetch(`${NEWS_BASE}?search=${encodeURIComponent(q)}&limit=${limit}`, {
+ headers: { accept: 'application/json', 'user-agent': 'three.ws/1.0' },
+ signal: AbortSignal.timeout(6000),
+ });
+ if (!resp.ok) throw new Error(`news upstream ${resp.status}`);
+ const raw = await resp.json();
+ const articles = (raw?.articles || [])
+ .filter((a) => str(a?.title) && str(a?.link))
+ .slice(0, limit)
+ .map((a) => ({
+ title: a.title.trim(),
+ link: a.link.trim(),
+ description: str(a.description) ? stripHtml(a.description).slice(0, 280) : null,
+ image: str(a.imageUrl),
+ source: str(a.source),
+ published_at: str(a.pubDate),
+ }));
+ if (!articles.length) throw new Error('aggregator returned no articles');
+ return { articles, source: 'cryptocurrency.cv' };
+}
+
+function parseFeed(xml, source) {
+ const parser = new XMLParser({ ignoreAttributes: false, attributeNamePrefix: '@' });
+ const doc = parser.parse(xml);
+ // RSS 2.0 (rss.channel.item) and Atom (feed.entry) both appear in this set.
+ const items = doc?.rss?.channel?.item || doc?.feed?.entry || [];
+ return (Array.isArray(items) ? items : [items]).map((it) => {
+ const link =
+ str(it?.link) ||
+ str(it?.link?.['@href']) ||
+ (Array.isArray(it?.link) ? str(it.link.find((l) => l?.['@href'])?.['@href']) : null);
+ const media = it?.['media:content']?.['@url'] || it?.enclosure?.['@url'] || null;
+ return {
+ title: stripHtml(str(it?.title?.['#text']) || str(it?.title) || ''),
+ link,
+ description: stripHtml(str(it?.description) || str(it?.summary) || '').slice(0, 280) || null,
+ image: str(media),
+ source,
+ published_at: str(it?.pubDate) || str(it?.published) || str(it?.updated),
+ };
+ });
+}
+
+async function fromRss(q, limit) {
+ const results = await Promise.allSettled(
+ RSS_FEEDS.map(async ({ source, url }) => {
+ const resp = await fetch(url, {
+ headers: { accept: 'application/rss+xml, application/xml, text/xml', 'user-agent': 'three.ws/1.0' },
+ signal: AbortSignal.timeout(7000),
+ });
+ if (!resp.ok) throw new Error(`${source} ${resp.status}`);
+ return parseFeed(await resp.text(), source);
+ }),
+ );
+ const needle = q.toLowerCase();
+ const articles = results
+ .filter((r) => r.status === 'fulfilled')
+ .flatMap((r) => r.value)
+ .filter((a) => a.title && a.link)
+ .filter((a) => `${a.title} ${a.description || ''}`.toLowerCase().includes(needle))
+ .sort((a, b) => new Date(b.published_at || 0) - new Date(a.published_at || 0))
+ .slice(0, limit);
+ return { articles, source: 'rss' };
+}
+
export default wrap(async (req, res) => {
if (cors(req, res, { methods: 'GET,OPTIONS', origins: '*' })) return;
if (!method(req, res, ['GET'])) return;
@@ -36,32 +125,20 @@ export default wrap(async (req, res) => {
});
}
+ let value;
try {
- const resp = await fetch(`${NEWS_BASE}?search=${encodeURIComponent(q)}&limit=${limit}`, {
- headers: { accept: 'application/json', 'user-agent': 'three.ws/1.0' },
- signal: AbortSignal.timeout(8000),
- });
- if (!resp.ok) throw new Error(`news upstream ${resp.status}`);
- const raw = await resp.json();
- const articles = (raw?.articles || [])
- .filter((a) => str(a?.title) && str(a?.link))
- .slice(0, limit)
- .map((a) => ({
- title: a.title.trim(),
- link: a.link.trim(),
- description: str(a.description)?.slice(0, 280) ?? null,
- image: str(a.imageUrl),
- source: str(a.source),
- category: str(a.category),
- published_at: str(a.pubDate),
- }));
- const value = { articles, source: 'cryptocurrency.cv' };
- _cache.set(key, { value, expiresAt: now + TTL_MS });
- if (_cache.size > 128) _cache.delete(_cache.keys().next().value);
- return json(res, 200, value, {
- 'cache-control': 'public, max-age=120, s-maxage=300, stale-while-revalidate=900',
- });
+ value = await fromAggregator(q, limit);
} catch {
- return error(res, 502, 'upstream_error', 'related news is unavailable right now');
+ try {
+ value = await fromRss(q, limit);
+ } catch {
+ return error(res, 502, 'upstream_error', 'related news is unavailable right now');
+ }
}
+
+ _cache.set(key, { value, expiresAt: now + TTL_MS });
+ if (_cache.size > 128) _cache.delete(_cache.keys().next().value);
+ return json(res, 200, value, {
+ 'cache-control': 'public, max-age=120, s-maxage=300, stale-while-revalidate=900',
+ });
});
diff --git a/api/cron/economy-tick.js b/api/cron/economy-tick.js
index 55ea47fea..517409e96 100644
--- a/api/cron/economy-tick.js
+++ b/api/cron/economy-tick.js
@@ -35,12 +35,60 @@ const ORIGIN = () => (env.APP_ORIGIN || 'https://three.ws').replace(/\/+$/, '');
// The engines that make the agent economy move. `path` is invoked with the same
// `Authorization: Bearer $CRON_SECRET` header Vercel Cron would send. `label` is
// for the summary. Order is best-effort only — all fire concurrently.
+//
+// EVERY engine below is internally cadence-gated and spend-capped (per-tick caps,
+// per-endpoint cooldowns, hourly/daily ceilings, "already ran today" guards,
+// treasury floors, circuit breakers). Firing them all every minute is therefore
+// safe by design: an engine whose native cadence isn't due simply records a clean
+// `skipped` run and returns cheaply. That is the whole point — the economy is
+// *invoked* every minute; each engine decides whether this is its minute to act.
+// Do NOT thin this list to "save" invocations: an engine left out here is an
+// engine that silently never runs, because it lives past Vercel's 40-cron cutoff.
const TARGETS = [
+ // ── Payments & x402 (agent-to-agent USDC) ──────────────────────────────
{ label: 'ring-tick', path: '/api/cron/x402-ring-tick', method: 'GET' },
{ label: 'x402-seed', path: '/api/cron/x402-seed-cron', method: 'GET' },
{ label: 'x402-autonomous', path: '/api/cron/x402-autonomous-loop', method: 'GET' },
+ { label: 'ring-leak-scan', path: '/api/cron/x402-ring-leak-scan', method: 'GET' },
+ { label: 'wallets-leak-scan', path: '/api/cron/wallets-leak-scan', method: 'GET' },
+ { label: 'distribute-payments', path: '/api/cron/run-distribute-payments', method: 'GET' },
+ { label: 'payment-session-sweep', path: '/api/cron/payment-session-sweep', method: 'GET' },
+ // ── Money Pulse, Labor Market & delegation (tips, autonomous spend, hiring) ─
{ label: 'money-pulse', path: '/api/cron/pulse-tick', method: 'GET' },
{ label: 'labor-market', path: '/api/labor/tick', method: 'POST' },
+ { label: 'index-delegations', path: '/api/cron/index-delegations', method: 'GET' },
+ // ── Coin launches (pump.fun) ───────────────────────────────────────────
+ { label: 'launcher', path: '/api/cron/launcher-tick', method: 'GET' },
+ { label: 'launcher-claimer', path: '/api/cron/launcher-claimer', method: 'GET' },
+ { label: 'coin-intel', path: '/api/cron/coin-intel-observe', method: 'GET' },
+ { label: 'pumpfun-monitor', path: '/api/cron/pumpfun-monitor', method: 'GET' },
+ { label: 'pumpfun-graduations', path: '/api/cron/pumpfun-graduations-sync', method: 'GET' },
+ { label: 'coin-cycle', path: '/api/cron/run-coin-cycle', method: 'GET' },
+ { label: 'coin-payouts', path: '/api/cron/run-coin-payouts', method: 'GET' },
+ // ── Autonomous / copy / strategy trading ───────────────────────────────
+ { label: 'copy-fanout', path: '/api/cron/copy-fanout', method: 'GET' },
+ { label: 'mirror-fanout', path: '/api/cron/mirror-fanout', method: 'GET' },
+ { label: 'signal-fanout', path: '/api/cron/signal-fanout', method: 'GET' },
+ { label: 'strategy-fanout', path: '/api/cron/strategy-fanout', method: 'GET' },
+ { label: 'dca', path: '/api/cron/run-dca', method: 'GET' },
+ // ── Tips, payouts, subscriptions, royalties ────────────────────────────
+ { label: 'club-payouts', path: '/api/cron/club-payouts', method: 'GET' },
+ { label: 'subscriptions', path: '/api/cron/run-subscriptions', method: 'GET' },
+ { label: 'process-subscriptions', path: '/api/cron/process-subscriptions', method: 'GET' },
+ { label: 'settle-royalties', path: '/api/cron/settle-royalties', method: 'GET' },
+ { label: 'cosmetic-splits', path: '/api/cron/cosmetic-splits-sweep', method: 'GET' },
+ // ── $THREE buyback (revenue → buy → treasury) ──────────────────────────
+ { label: 'buyback', path: '/api/cron/run-buyback', method: 'GET' },
+ { label: 'three-buyback', path: '/api/cron/run-three-buyback', method: 'GET' },
+ // ── Funding root, treasury autopilot & reconciliation ──────────────────
+ { label: 'treasury-topup', path: '/api/cron/treasury-topup', method: 'GET' },
+ { label: 'treasury-autopilot', path: '/api/cron/treasury-autopilot', method: 'GET' },
+ { label: 'treasury-sweepback', path: '/api/cron/treasury-sweepback', method: 'GET' },
+ { label: 'economy-reconcile', path: '/api/cron/economy-reconcile', method: 'GET' },
+ { label: 'reflect-sweep', path: '/api/cron/reflect-sweep', method: 'GET' },
+ // ── $THREE market & holder state ───────────────────────────────────────
+ { label: 'three-market-refresh', path: '/api/cron/three-market-refresh', method: 'GET' },
+ { label: 'three-holders-snapshot', path: '/api/cron/three-holders-snapshot', method: 'GET' },
];
const CALL_TIMEOUT_MS = 60_000;
diff --git a/data/changelog.json b/data/changelog.json
index b79650116..60daa51d9 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-07-04",
+ "title": "The agent economy now runs from a single always-on heartbeat",
+ "summary": "The live agent-to-agent economy - ring settlements, x402 micropayments, the Money Pulse feed, and the Labor Market - used to stall for hours at a time because it depended on schedulers that were silently not firing. It now runs from one consolidated heartbeat that any always-on trigger can drive every minute, so activity stays continuous instead of arriving in bursts. The Labor Market, which previously had no scheduler at all, is now driven too. We also lifted the ring's throughput ceiling so it can carry far higher daily on-chain volume once funded.",
+ "tags": [
+ "improvement",
+ "infra"
+ ]
+ },
{
"date": "2026-07-04",
"title": "3D avatars load about 4x faster - and reliably everywhere",
diff --git a/docs/economy-heartbeat.md b/docs/economy-heartbeat.md
index e0c354e68..643fc9182 100644
--- a/docs/economy-heartbeat.md
+++ b/docs/economy-heartbeat.md
@@ -1,73 +1,89 @@
-# Economy heartbeat (external cron failover)
-
-Every scheduled job on the platform — the circulation engine tick, the x402
-seed and autonomous loops, treasury top-ups, payouts, sweeps, reconciliation —
-is a Vercel Cron entry in `vercel.json` calling an authed `/api/cron/*`
-endpoint. That makes Vercel's scheduler a single point of failure: if the
-Vercel project stops firing crons (account block, paused project, migration),
-every money rail halts at once while the deployed site keeps serving traffic.
-That exact failure happened on 2026-06-29 and flatlined the Money Pulse.
-
-The heartbeat removes that single point of failure. It is a second, independent
-scheduler that drives the same endpoints on the same schedules from GitHub
-Actions.
-
-## Pieces
-
-| Piece | Path |
-| --- | --- |
-| Scheduler script | `scripts/economy-heartbeat.mjs` |
-| GitHub Actions workflow | `.github/workflows/economy-heartbeat.yml` |
-| Schedule source of truth | the `crons` array in `vercel.json` (never duplicated) |
-
-The script reads `vercel.json`, wakes at each UTC minute boundary for
-`DURATION_MINUTES` (default 5), and fires every cron whose schedule matches
-that minute — concurrently, with the same `Authorization: Bearer $CRON_SECRET`
-header Vercel sends. The workflow runs it every 5 minutes with queued,
-never-cancelled runs, so minute-level crons (`x402-seed-cron`) still tick every
-minute despite GitHub's 5-minute scheduler floor.
-
-## Activation
-
-One step: add the repo secret `CRON_SECRET` (Settings → Secrets and variables →
-Actions) with the same value as the `CRON_SECRET` env var on the Vercel
-project. Until the secret exists, every run exits idle with a warning and
-touches nothing.
+# Economy heartbeat (single-URL driver)
-## Safety properties
+Every scheduled job on the platform — the circulation engine tick, the x402 seed
+and autonomous loops, the ring settlement tick, the Labor Market, treasury
+top-ups, payouts, sweeps, reconciliation — is an authed `/api/cron/*` endpoint.
+The whole **agent-to-agent economy** comes down to a handful of them being hit
+every minute. When nothing hits them, the economy flat-lines while the site keeps
+serving traffic.
-- **No new money paths.** The heartbeat only calls the same authed cron
- endpoints Vercel calls. All spend caps, registry allowlists, and ledger
- recording live server-side and apply identically.
-- **Double-scheduling is harmless.** While Vercel crons are healthy the
- endpoints simply tick more often; every engine enforces per-tick and daily
- caps, so leave the heartbeat enabled permanently as insurance.
-- **Undeployed endpoints are tolerated.** A cron present in the repo's
- `vercel.json` but missing from the deployed build reports `missing 404` and
- never fails the run.
-- **Loud on real outage.** A run fails only when every attempted call fails —
- bad secret or site down — so a red workflow means a genuine problem.
+Two schedulers can drive those endpoints, and both have failed in practice:
+
+- **Vercel Cron** is the intended primary, but `vercel.json` declares far more
+ cron entries than Vercel schedules per project (Pro caps at 40; Hobby runs 2,
+ once per day). Everything past the cap is silently never scheduled — including
+ the economy ticks.
+- **GitHub Actions** was the documented failover. It is **permanently
+ unavailable on this account** (billing lock); every run fails to start.
+
+The result was an economy that only moved when a deploy happened to nudge it,
+then went dark for hours to days.
+
+## The fix: one endpoint, one external trigger
+
+`GET|POST /api/cron/economy-tick` ([api/cron/economy-tick.js](../api/cron/economy-tick.js))
+is a single dispatcher that fans out — concurrently, with the same
+`Authorization: Bearer $CRON_SECRET` header Vercel would send — to every engine
+that makes the economy move:
+
+| Engine | Endpoint | Drives |
+| --- | --- | --- |
+| Ring tick | `/api/cron/x402-ring-tick` | ring settlements / Agent Economy Volume |
+| x402 seed | `/api/cron/x402-seed-cron` | x402 micropayment activity feed |
+| Autonomous loop | `/api/cron/x402-autonomous-loop` | catalog spend (signals, audits) |
+| Money Pulse | `/api/cron/pulse-tick` | the live wallet-activity feed |
+| Labor Market | `/api/labor/tick` | bounty bids, awards, settlements |
-## Manual runs
+Every target engine is internally idempotent — per-tick spend caps, per-endpoint
+cooldowns, and daily ceilings absorb over-calling — so it is safe to fire
+`economy-tick` every minute (or more often) regardless of each engine's native
+cadence. The dispatcher never moves money itself; it only invokes the engines
+that do, over their existing authenticated path. It returns a per-engine summary
+(status + each engine's own skip reason) and a `502` only when **every** engine
+fails (bad secret / origin down), so an external scheduler's own alerting catches
+a real economy-wide outage.
+
+## Driving it (pick one — none use GitHub)
+
+The whole economy now needs exactly one thing: something hitting
+`https://three.ws/api/cron/economy-tick` every minute with the cron bearer.
+
+1. **External HTTP cron (fastest, zero infra).** A service like cron-job.org or
+ EasyCron: URL `https://three.ws/api/cron/economy-tick`, interval 1 minute,
+ add header `Authorization: Bearer <CRON_SECRET>`. Done in two minutes, no code.
+2. **Upstash QStash (you already run Upstash Redis).** Register a schedule that
+ POSTs the same URL every minute with the bearer header. Reliable, retried,
+ dashboard-visible.
+3. **Vercel Cron.** Already wired as one entry in `vercel.json`
+ (`* * * * *`). This only fires if the project's total cron count is within the
+ plan cap — trim `vercel.json` below 40 entries (or move to a plan that allows
+ more) for Vercel to schedule it.
+4. **Always-on host.** `scripts/economy-heartbeat.mjs` still works as a
+ long-running pinger on any small VM (Fly.io / Railway / a box):
+ `CRON_SECRET=… node scripts/economy-heartbeat.mjs` reads `vercel.json` and
+ fires every due cron each minute — not just the economy ones.
+
+## Manual / one-off
```bash
-# One-off from anywhere (also how the workflow_dispatch trigger works):
-CRON_SECRET=… node scripts/economy-heartbeat.mjs
+# Fire one economy tick by hand (server-side does the fan-out):
+curl -sS https://three.ws/api/cron/economy-tick -H "Authorization: Bearer $CRON_SECRET"
-# Longer run, economy rails only:
-CRON_SECRET=… DURATION_MINUTES=10 ONLY='pulse|x402|treasury|economy' node scripts/economy-heartbeat.mjs
+# Drive ALL vercel.json crons from anywhere for 10 minutes (superset of the economy):
+CRON_SECRET=… DURATION_MINUTES=10 node scripts/economy-heartbeat.mjs
```
-## Caveats
+## Safety properties
-- GitHub's scheduler is best-effort; runs can start several minutes late under
- load. High-frequency crons self-heal on the next window, but a cron pinned to
- one exact minute per day (e.g. `45 9 * * *`) can miss its minute on a badly
- delayed run — fire it via `workflow_dispatch` with an `only` filter if it
- matters that day.
-- The heartbeat is a failover, not the fix. When Vercel cron scheduling is
- down, restore it — the platform's primary scheduler should be the deploy
- target itself.
+- **No new money paths.** `economy-tick` only calls the same authed cron
+ endpoints Vercel would. All spend caps, registry allowlists, and ledger
+ recording live server-side and apply identically.
+- **Over-calling is harmless.** Every engine enforces per-tick and daily caps and
+ per-endpoint cooldowns, so a 1-minute trigger driving 5-minute engines just
+ no-ops the extra calls.
+- **Undeployed endpoints are tolerated.** A target missing from the deployed
+ build reports `status: 404` and never stops the others.
Related: [circulation engine](circulation-engine.md) ·
+[x402 ring economy](x402-ring-economy.md) ·
[economy funding root](economy-master.md) · [money map](money-map.md)
diff --git a/pages/coins.html b/pages/coins.html
new file mode 100644
index 000000000..ad98c1733
--- /dev/null
+++ b/pages/coins.html
@@ -0,0 +1,87 @@
+<!doctype html>
+<html lang="en" class="cv-page">
+ <head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>Markets · three.ws</title>
+ <meta
+ name="description"
+ content="Live cryptocurrency market data — prices, trends, and a global overview for the top digital assets, with rich detail pages for every coin."
+ />
+ <meta property="og:type" content="website" />
+ <meta property="og:site_name" content="three.ws" />
+ <meta property="og:url" content="https://three.ws/coins" />
+ <meta property="og:title" content="Markets · three.ws" />
+ <meta
+ property="og:description"
+ content="Live cryptocurrency market data — prices, trends, and a global overview for the top digital assets."
+ />
+ <meta property="og:image" content="https://three.ws/og-image.png" />
+ <meta property="og:image:width" content="1200" />
+ <meta property="og:image:height" content="630" />
+ <meta name="twitter:card" content="summary_large_image" />
+ <meta name="twitter:site" content="@trythreews" />
+ <meta name="twitter:title" content="Markets · three.ws" />
+ <meta
+ name="twitter:description"
+ content="Live cryptocurrency market data — prices, trends, and a global overview for the top digital assets."
+ />
+ <meta name="twitter:image" content="https://three.ws/og-image.png" />
+ <meta name="theme-color" content="#09090b" />
+ <link rel="icon" href="/favicon.ico" sizes="any" />
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
+ <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
+ <link rel="manifest" href="/site.webmanifest" />
+ <link rel="stylesheet" href="/fonts/fonts.css" />
+ <link rel="stylesheet" href="/nav.css" />
+ <link rel="stylesheet" href="/src/coin-pages.css" />
+ <link rel="stylesheet" href="/footer.css" />
+ <link rel="canonical" href="https://three.ws/coins" />
+ </head>
+ <body>
+ <header><div id="nav-container"></div></header>
+ <script src="/nav.js"></script>
+
+ <main class="cv-container">
+ <h1 class="cv-h1">Markets</h1>
+ <p class="cv-sub">
+ Real-time cryptocurrency market data — prices, trends, and global overview for hundreds of
+ digital assets.
+ </p>
+
+ <!-- Global stats bar. Hydrated by src/coins-index.js. -->
+ <section id="cv-stats" class="cv-section" aria-label="Market statistics"></section>
+
+ <!-- Toolbar: search type-ahead. -->
+ <div class="cv-toolbar">
+ <h2 class="cv-h2" style="margin: 0">Top Cryptocurrencies</h2>
+ <div class="cv-search" id="cv-search">
+ <span class="mag" aria-hidden="true">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>
+ </span>
+ <input
+ id="cv-search-input"
+ type="search"
+ placeholder="Search coins…"
+ autocomplete="off"
+ spellcheck="false"
+ role="combobox"
+ aria-expanded="false"
+ aria-controls="cv-search-pop"
+ aria-label="Search coins by name or symbol"
+ />
+ <div id="cv-search-pop" class="cv-search-pop" role="listbox" hidden></div>
+ </div>
+ </div>
+
+ <!-- Top-100 table. Hydrated by src/coins-index.js. -->
+ <section id="cv-market" aria-label="Top cryptocurrencies by market cap"></section>
+ </main>
+
+ <script type="module" src="/src/coins-index.js"></script>
+ <script src="/brand.js" defer></script>
+ <div id="footer-container"></div>
+ <script src="/footer.js"></script>
+ </body>
+</html>
diff --git a/public/changelog.json b/public/changelog.json
index 08021a212..fe30700ae 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-04T01:40:18.971Z",
+ "generated_at": "2026-07-04T04:50:54.607Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -48,6 +48,17 @@
"fix"
]
},
+ {
+ "date": "2026-07-04",
+ "type": "update",
+ "title": "The agent economy now runs from a single always-on heartbeat",
+ "summary": "The live agent-to-agent economy - ring settlements, x402 micropayments, the Money Pulse feed, and the Labor Market - used to stall for hours at a time because it depended on schedulers that were silently not firing. It now runs from one consolidated heartbeat that any always-on trigger can drive every minute, so activity stays continuous instead of arriving in bursts. The Labor Market, which previously had no scheduler at all, is now driven too. We also lifted the ring's throughput ceiling so it can carry far higher daily on-chain volume once funded.",
+ "link": null,
+ "tags": [
+ "improvement",
+ "infra"
+ ]
+ },
{
"date": "2026-07-03",
"type": "launch",
diff --git a/public/changelog.xml b/public/changelog.xml
index 51908be5e..1b0ec7a9e 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -38,6 +38,14 @@
<category>fix</category>
<description>The gesture wheel regained four expressive moves that had been silently dropped: nod (a quick upper-body affirm), shrug, jog (a full-body run loop), and celebrate (a whole-body cheer). Open the wheel with G (or long-press the action button on mobile) — the wheel now lays out all twelve gestures; keys 1–8 still trigger the first eight. Also part of this pass: the entire test suite now runs fully green, locking every one of these behaviors in.</description>
</item>
+ <item>
+ <title>The agent economy now runs from a single always-on heartbeat</title>
+ <link>https://three.ws/changelog</link>
+ <guid isPermaLink="false">2026-07-04:The agent economy now runs from a single always-on heartbeat</guid>
+ <pubDate>Sat, 04 Jul 2026 12:00:00 GMT</pubDate>
+ <category>improvement</category>
+ <description>The live agent-to-agent economy - ring settlements, x402 micropayments, the Money Pulse feed, and the Labor Market - used to stall for hours at a time because it depended on schedulers that were silently not firing. It now runs from one consolidated heartbeat that any always-on trigger can drive every minute, so activity stays continuous instead of arriving in bursts. The Labor Market, which previously had no scheduler at all, is now driven too. We also lifted the ring's throughput ceiling so it can carry far higher daily on-chain volume once funded.</description>
+ </item>
<item>
<title>Docs · Claim Your Wallet &amp; Trader Card</title>
<link>https://three.ws/docs/trader-card</link>
diff --git a/public/features.json b/public/features.json
index 0baa7634d..a1d0befae 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-04T01:40:18.947Z",
+ "generated_at": "2026-07-04T04:50:54.591Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/public/fonts/source-serif-4-latin-ext.woff2 b/public/fonts/source-serif-4-latin-ext.woff2
new file mode 100644
index 000000000..f40a64e03
Binary files /dev/null and b/public/fonts/source-serif-4-latin-ext.woff2 differ
diff --git a/public/fonts/source-serif-4-latin.woff2 b/public/fonts/source-serif-4-latin.woff2
new file mode 100644
index 000000000..30dbe2d62
Binary files /dev/null and b/public/fonts/source-serif-4-latin.woff2 differ
diff --git a/src/coin-pages.css b/src/coin-pages.css
new file mode 100644
index 000000000..21b46ff86
--- /dev/null
+++ b/src/coin-pages.css
@@ -0,0 +1,541 @@
+/*
+ * Global coin pages (/coins, /coin/:id) — literal port of the cryptocurrency.cv
+ * design system ("The Block-inspired editorial"): Source Serif 4 headings,
+ * Inter body, JetBrains Mono numerals, blue accent, hairline borders, tight
+ * editorial radii. Light is the design's default; dark maps its .dark tokens.
+ * Both are driven by three.ws's data-theme attribute so the site-wide theme
+ * toggle works here like everywhere else.
+ */
+
+/* Source Serif 4 — variable weight 400–700, self-hosted like the other fonts. */
+@font-face {
+ font-family: 'Source Serif 4';
+ font-style: normal;
+ font-weight: 200 900;
+ font-display: swap;
+ src: url('/fonts/source-serif-4-latin.woff2') format('woff2');
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+@font-face {
+ font-family: 'Source Serif 4';
+ font-style: normal;
+ font-weight: 200 900;
+ font-display: swap;
+ src: url('/fonts/source-serif-4-latin-ext.woff2') format('woff2');
+ unicode-range: U+0100-02AF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+
+:root {
+ --cv-font-sans: 'Inter', system-ui, -apple-system, sans-serif;
+ --cv-font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
+ --cv-font-mono: 'JetBrains Mono', ui-monospace, monospace;
+
+ --cv-radius-sm: 4px;
+ --cv-radius: 6px;
+ --cv-radius-md: 8px;
+ --cv-radius-lg: 10px;
+ --cv-radius-xl: 12px;
+
+ --cv-max-width: 1280px;
+ --cv-content-padding: 1rem;
+}
+@media (min-width: 768px) { :root { --cv-content-padding: 1.5rem; } }
+@media (min-width: 1024px) { :root { --cv-content-padding: 2rem; } }
+
+/* Light — the design's default palette. */
+html[data-theme='light'] {
+ --cv-accent: #3b82f6;
+ --cv-accent-hover: #2563eb;
+ --cv-surface: #fff;
+ --cv-surface-2: #f8fafc;
+ --cv-surface-3: #f1f5f9;
+ --cv-border: #e2e8f0;
+ --cv-border-hover: #cbd5e1;
+ --cv-text: #0f172a;
+ --cv-text-2: #475569;
+ --cv-text-3: #94a3b8;
+ --cv-green: #16a34a;
+ --cv-green-soft: rgba(34, 197, 94, 0.1);
+ --cv-red: #dc2626;
+ --cv-red-soft: rgba(239, 68, 68, 0.1);
+ --cv-chart-green: #22c55e;
+ --cv-chart-red: #ef4444;
+ --cv-shadow-card: 0 0 0 1px rgb(0 0 0 / 0.03), 0 2px 4px 0 rgb(0 0 0 / 0.04);
+ --cv-shadow-card-hover: 0 0 0 1px rgb(0 0 0 / 0.04), 0 8px 16px -4px rgb(0 0 0 / 0.08), 0 2px 4px -1px rgb(0 0 0 / 0.04);
+ --cv-shadow-dropdown: 0 4px 24px -4px rgb(0 0 0 / 0.12), 0 8px 16px -8px rgb(0 0 0 / 0.08);
+}
+
+/* Dark — the design's .dark token set. */
+html[data-theme='dark'], html:not([data-theme='light']) {
+ --cv-accent: #60a5fa;
+ --cv-accent-hover: #93bbfc;
+ --cv-surface: #09090b;
+ --cv-surface-2: #131316;
+ --cv-surface-3: #1c1c21;
+ --cv-border: #27272a;
+ --cv-border-hover: #3f3f46;
+ --cv-text: #fafafa;
+ --cv-text-2: #a1a1aa;
+ --cv-text-3: #71717a;
+ --cv-green: #4ade80;
+ --cv-green-soft: rgba(34, 197, 94, 0.12);
+ --cv-red: #f87171;
+ --cv-red-soft: rgba(239, 68, 68, 0.12);
+ --cv-chart-green: #22c55e;
+ --cv-chart-red: #ef4444;
+ --cv-shadow-card: 0 0 0 1px rgb(255 255 255 / 0.03), 0 2px 4px 0 rgb(0 0 0 / 0.4);
+ --cv-shadow-card-hover: 0 0 0 1px rgb(255 255 255 / 0.05), 0 8px 16px -4px rgb(0 0 0 / 0.5);
+ --cv-shadow-dropdown: 0 4px 24px -4px rgb(0 0 0 / 0.6), 0 8px 16px -8px rgb(0 0 0 / 0.5);
+}
+
+html.cv-page, .cv-page body {
+ background: var(--cv-surface);
+ color: var(--cv-text);
+}
+.cv-page body {
+ margin: 0;
+ font-family: var(--cv-font-sans);
+ font-size: 15px;
+ line-height: 1.6;
+ -webkit-font-smoothing: antialiased;
+ text-rendering: optimizelegibility;
+}
+
+/* Keep the shared three.ws header legible over the editorial background. */
+.cv-page .site-header {
+ position: sticky;
+ top: 0;
+ z-index: 50;
+ background: color-mix(in srgb, var(--cv-surface) 88%, transparent);
+ backdrop-filter: blur(10px);
+ -webkit-backdrop-filter: blur(10px);
+ border-bottom: 1px solid var(--cv-border);
+}
+
+.cv-container {
+ max-width: var(--cv-max-width);
+ margin: 0 auto;
+ padding: 2.5rem var(--cv-content-padding) 4rem;
+ width: 100%;
+}
+
+/* ── Typography ─────────────────────────────────────────────────────────── */
+
+.cv-h1 {
+ font-family: var(--cv-font-serif);
+ font-size: 1.875rem;
+ line-height: 1.2;
+ font-weight: 700;
+ color: var(--cv-text);
+ margin: 0 0 0.5rem;
+}
+@media (min-width: 768px) { .cv-h1 { font-size: 2.25rem; } }
+
+.cv-h2 {
+ font-family: var(--cv-font-serif);
+ font-size: 1.25rem;
+ font-weight: 700;
+ color: var(--cv-text);
+ margin: 0 0 1rem;
+}
+
+.cv-sub {
+ color: var(--cv-text-2);
+ max-width: 42rem;
+ margin: 0 0 2rem;
+}
+
+.cv-mono { font-family: var(--cv-font-mono); font-variant-numeric: tabular-nums; }
+
+/* ── Breadcrumbs ────────────────────────────────────────────────────────── */
+
+.cv-crumbs {
+ display: flex;
+ align-items: center;
+ gap: 0.25rem;
+ font-size: 0.875rem;
+ color: var(--cv-text-3);
+ margin-bottom: 1.5rem;
+ flex-wrap: wrap;
+}
+.cv-crumbs a { color: inherit; text-decoration: none; transition: color 0.15s; }
+.cv-crumbs a:hover, .cv-crumbs a:focus-visible { color: var(--cv-accent); }
+.cv-crumbs .sep { opacity: 0.7; }
+.cv-crumbs .here { color: var(--cv-text); font-weight: 500; }
+
+/* ── Cards ──────────────────────────────────────────────────────────────── */
+
+.cv-card {
+ background: var(--cv-surface);
+ border: 1px solid var(--cv-border);
+ border-radius: var(--cv-radius-lg);
+ box-shadow: var(--cv-shadow-card);
+}
+
+.cv-stat-card {
+ background: var(--cv-surface);
+ border: 1px solid var(--cv-border);
+ border-radius: var(--cv-radius-lg);
+ box-shadow: var(--cv-shadow-card);
+ padding: 1.25rem;
+ display: flex;
+ align-items: flex-start;
+ justify-content: space-between;
+ gap: 0.75rem;
+ transition: box-shadow 0.2s, border-color 0.2s;
+}
+.cv-stat-card:hover { box-shadow: var(--cv-shadow-card-hover); border-color: var(--cv-border-hover); }
+.cv-stat-card .label {
+ font-size: 0.7rem;
+ font-weight: 500;
+ letter-spacing: 0.06em;
+ text-transform: uppercase;
+ color: var(--cv-text-3);
+ margin: 0 0 0.25rem;
+}
+.cv-stat-card .value { font-size: 1.5rem; font-weight: 700; color: var(--cv-text); margin: 0; }
+.cv-stat-card .delta { margin: 0.25rem 0 0; font-size: 0.875rem; font-weight: 500; }
+.cv-stat-card .icon { color: var(--cv-accent); opacity: 0.6; flex-shrink: 0; }
+.cv-stat-card .icon svg { width: 1.25rem; height: 1.25rem; display: block; }
+
+.cv-up { color: var(--cv-green); }
+.cv-down { color: var(--cv-red); }
+
+/* Smaller stat tiles on the detail page's Market Stats grid. */
+.cv-mini-stat {
+ background: var(--cv-surface-2);
+ border: 1px solid var(--cv-border);
+ border-radius: var(--cv-radius-md);
+ padding: 1rem;
+}
+.cv-mini-stat .label { font-size: 0.75rem; color: var(--cv-text-3); margin: 0 0 0.25rem; }
+.cv-mini-stat .value { font-size: 1.125rem; font-weight: 600; color: var(--cv-text); margin: 0; }
+.cv-mini-stat .value.green { color: var(--cv-green); }
+.cv-mini-stat .value.red { color: var(--cv-red); }
+.cv-mini-stat .sub { font-size: 0.75rem; color: var(--cv-text-3); margin: 0.125rem 0 0; }
+
+/* ── Coin header (detail page) ──────────────────────────────────────────── */
+
+.cv-coin-head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 2rem; }
+.cv-coin-head img.coin-icon {
+ width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
+ background: var(--cv-surface-3);
+}
+.cv-coin-head .title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
+.cv-coin-head h1 {
+ font-family: var(--cv-font-serif);
+ font-size: 1.875rem; font-weight: 700; margin: 0; color: var(--cv-text);
+}
+@media (min-width: 768px) { .cv-coin-head h1 { font-size: 2.25rem; } }
+.cv-coin-head .ticker {
+ font-size: 1.25rem; font-weight: 500; text-transform: uppercase; color: var(--cv-text-3);
+}
+@media (min-width: 768px) { .cv-coin-head .ticker { font-size: 1.5rem; } }
+.cv-rank-badge {
+ display: inline-flex; align-items: center;
+ background: var(--cv-accent); color: #fff;
+ border-radius: 999px; padding: 0.25rem 0.625rem;
+ font-size: 0.75rem; font-weight: 600;
+}
+
+.cv-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1rem; margin-top: 0.75rem; }
+.cv-price {
+ font-size: 2.25rem; font-weight: 700; color: var(--cv-text);
+ font-variant-numeric: tabular-nums;
+}
+@media (min-width: 768px) { .cv-price { font-size: 3rem; } }
+.cv-today { color: var(--cv-text-3); font-size: 0.875rem; margin: 0.375rem 0 0; }
+
+.cv-chip {
+ display: inline-flex; align-items: center; gap: 0.25rem;
+ border-radius: var(--cv-radius); padding: 0.125rem 0.5rem;
+ font-size: 0.75rem; font-weight: 500;
+ font-variant-numeric: tabular-nums;
+}
+.cv-chip .win { font-size: 10px; opacity: 0.85; }
+.cv-chip.up { background: var(--cv-green-soft); color: var(--cv-green); }
+.cv-chip.down { background: var(--cv-red-soft); color: var(--cv-red); }
+
+/* ── Chart panel ────────────────────────────────────────────────────────── */
+
+.cv-chart-panel {
+ background: var(--cv-surface);
+ border: 1px solid var(--cv-border);
+ border-radius: var(--cv-radius-xl);
+ box-shadow: var(--cv-shadow-card);
+ padding: 1rem;
+ margin-bottom: 2.5rem;
+}
+@media (min-width: 768px) { .cv-chart-panel { padding: 1.5rem; } }
+
+.cv-chart-bar {
+ display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
+ gap: 0.5rem; margin-bottom: 1rem;
+}
+.cv-chart-bar .left { display: flex; align-items: center; gap: 0.5rem; }
+.cv-chart-bar .title { font-size: 0.875rem; font-weight: 500; color: var(--cv-text-2); }
+.cv-chart-bar .pct { font-size: 0.875rem; font-weight: 600; }
+
+.cv-ranges { display: flex; gap: 0.25rem; }
+.cv-range-btn {
+ appearance: none; border: 0; background: transparent; cursor: pointer;
+ border-radius: var(--cv-radius); padding: 0.375rem 0.75rem;
+ font-size: 0.75rem; font-weight: 500; font-family: inherit;
+ color: var(--cv-text-2);
+ transition: background 0.15s, color 0.15s;
+}
+.cv-range-btn:hover { background: var(--cv-surface-2); }
+.cv-range-btn[aria-pressed='true'] { background: var(--cv-accent); color: #fff; }
+.cv-range-btn:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: 2px; }
+
+.cv-chart-area { position: relative; }
+.cv-chart-area svg { width: 100%; height: auto; display: block; user-select: none; }
+.cv-chart-state {
+ height: 300px; display: flex; align-items: center; justify-content: center;
+ color: var(--cv-text-3); gap: 0.5rem; font-size: 0.875rem;
+}
+.cv-spinner {
+ width: 1rem; height: 1rem; border-radius: 50%;
+ border: 2px solid currentcolor; border-top-color: transparent;
+ animation: cvSpin 0.8s linear infinite;
+}
+@keyframes cvSpin { to { transform: rotate(360deg); } }
+
+.cv-chart-tip {
+ position: absolute; top: 0; z-index: 10; pointer-events: none;
+ transform: translateX(-50%);
+ background: var(--cv-surface); border: 1px solid var(--cv-border);
+ border-radius: var(--cv-radius-md); box-shadow: var(--cv-shadow-dropdown);
+ padding: 0.5rem 0.75rem; font-size: 0.75rem; white-space: nowrap;
+}
+.cv-chart-tip .p { font-weight: 600; color: var(--cv-text); margin: 0; }
+.cv-chart-tip .d { color: var(--cv-text-3); margin: 0; }
+
+/* ── Stats grid ─────────────────────────────────────────────────────────── */
+
+.cv-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
+@media (min-width: 768px) { .cv-stats-grid { grid-template-columns: repeat(4, 1fr); } }
+
+.cv-section { margin-bottom: 2.5rem; }
+
+/* ── News cards ─────────────────────────────────────────────────────────── */
+
+.cv-news-grid { display: grid; gap: 1rem; }
+@media (min-width: 640px) { .cv-news-grid { grid-template-columns: repeat(2, 1fr); } }
+
+.cv-news-card {
+ display: flex; gap: 0.875rem; align-items: flex-start;
+ background: var(--cv-surface); border: 1px solid var(--cv-border);
+ border-radius: var(--cv-radius-lg); box-shadow: var(--cv-shadow-card);
+ padding: 0.875rem; text-decoration: none;
+ transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
+}
+.cv-news-card:hover, .cv-news-card:focus-visible {
+ box-shadow: var(--cv-shadow-card-hover);
+ border-color: var(--cv-border-hover);
+ transform: translateY(-1px);
+}
+.cv-news-card img {
+ width: 72px; height: 72px; border-radius: var(--cv-radius-md);
+ object-fit: cover; flex-shrink: 0; background: var(--cv-surface-3);
+}
+.cv-news-card .t {
+ font-weight: 600; color: var(--cv-text); font-size: 0.875rem; line-height: 1.4;
+ margin: 0 0 0.25rem;
+ display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
+}
+.cv-news-card .m { font-size: 0.75rem; color: var(--cv-text-3); margin: 0; }
+.cv-news-card .m .src { color: var(--cv-accent); font-weight: 500; }
+
+/* ── About / prose ──────────────────────────────────────────────────────── */
+
+.cv-prose { color: var(--cv-text-2); font-size: 0.9375rem; max-width: none; }
+.cv-prose p { margin: 0 0 0.875rem; }
+.cv-prose p:last-child { margin-bottom: 0; }
+
+/* ── Link pills ─────────────────────────────────────────────────────────── */
+
+.cv-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
+.cv-pill {
+ display: inline-flex; align-items: center; gap: 0.25rem;
+ border: 1px solid var(--cv-border); border-radius: 999px;
+ padding: 0.375rem 0.75rem; font-size: 0.875rem;
+ color: var(--cv-text-2); text-decoration: none;
+ transition: background 0.15s, border-color 0.15s, color 0.15s;
+}
+.cv-pill:hover, .cv-pill:focus-visible {
+ background: var(--cv-surface-2); border-color: var(--cv-border-hover); color: var(--cv-text);
+}
+.cv-pill:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: 2px; }
+
+/* Contract row — mono address + copy affordance. */
+.cv-contract {
+ display: inline-flex; align-items: center; gap: 0.5rem;
+ border: 1px solid var(--cv-border); border-radius: var(--cv-radius-md);
+ background: var(--cv-surface-2); padding: 0.375rem 0.625rem;
+ font-family: var(--cv-font-mono); font-size: 0.8125rem; color: var(--cv-text-2);
+}
+.cv-contract button {
+ appearance: none; border: 0; background: transparent; cursor: pointer;
+ color: var(--cv-accent); font-size: 0.75rem; font-family: var(--cv-font-sans);
+ padding: 0.125rem 0.25rem; border-radius: var(--cv-radius-sm);
+}
+.cv-contract button:hover { color: var(--cv-accent-hover); }
+.cv-contract button:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: 1px; }
+
+/* ── Market table (/coins) ──────────────────────────────────────────────── */
+
+.cv-table-wrap {
+ overflow-x: auto;
+ border: 1px solid var(--cv-border);
+ border-radius: var(--cv-radius-lg);
+ -webkit-overflow-scrolling: touch;
+ background: var(--cv-surface);
+}
+.cv-table { width: 100%; min-width: 540px; border-collapse: collapse; font-size: 0.875rem; }
+.cv-table th {
+ position: sticky; top: 0;
+ background: var(--cv-surface);
+ border-bottom: 1px solid var(--cv-border);
+ padding: 0.75rem 1rem;
+ font-weight: 500; color: var(--cv-text-2);
+ white-space: nowrap; cursor: pointer; user-select: none;
+ transition: color 0.15s;
+ text-align: right;
+}
+.cv-table th:hover { color: var(--cv-text); }
+.cv-table th:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: -2px; }
+.cv-table th.left, .cv-table td.left { text-align: left; }
+.cv-table th .arrow { display: inline-block; margin-left: 0.25rem; opacity: 0.4; font-size: 0.6875rem; }
+.cv-table th[aria-sort] .arrow { opacity: 1; }
+
+.cv-table td {
+ padding: 0.75rem 1rem;
+ border-bottom: 1px solid var(--cv-border);
+ background: var(--cv-surface);
+ text-align: right;
+ white-space: nowrap;
+ transition: background 0.15s;
+}
+.cv-table tbody tr { cursor: pointer; }
+.cv-table tbody tr:last-child td { border-bottom: 0; }
+.cv-table tbody tr:hover td, .cv-table tbody tr:focus-within td { background: var(--cv-surface-2); }
+
+.cv-table .rank { color: var(--cv-text-2); }
+.cv-table .name-cell { position: sticky; left: 0; z-index: 5; }
+.cv-table .name-cell .inner { display: flex; align-items: center; gap: 0.5rem; }
+.cv-table .name-cell img { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; background: var(--cv-surface-3); }
+.cv-table .name-cell .nm {
+ font-weight: 500; color: var(--cv-text);
+ max-width: 140px; overflow: hidden; text-overflow: ellipsis;
+}
+.cv-table .name-cell .sym { text-transform: uppercase; color: var(--cv-text-3); font-size: 0.75rem; }
+.cv-table .name-cell a { text-decoration: none; color: inherit; display: block; }
+.cv-table .name-cell a:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: 2px; border-radius: var(--cv-radius-sm); }
+.cv-table .price { font-family: var(--cv-font-mono); color: var(--cv-text); font-variant-numeric: tabular-nums; }
+.cv-table .pct { font-family: var(--cv-font-mono); font-variant-numeric: tabular-nums; }
+.cv-table .dim { color: var(--cv-text-2); }
+
+@media (max-width: 639px) {
+ .cv-table .hide-sm { display: none; }
+ .cv-table .name-cell .sym { display: none; }
+}
+@media (max-width: 767px) { .cv-table .hide-md { display: none; } }
+@media (max-width: 1023px) { .cv-table .hide-lg { display: none; } }
+@media (max-width: 1279px) { .cv-table .hide-xl { display: none; } }
+
+/* ── Search (type-ahead) ────────────────────────────────────────────────── */
+
+.cv-search { position: relative; max-width: 22rem; flex: 1 1 16rem; }
+.cv-search input {
+ width: 100%;
+ background: var(--cv-surface);
+ border: 1px solid var(--cv-border);
+ border-radius: var(--cv-radius-md);
+ color: var(--cv-text);
+ font: inherit; font-size: 0.875rem;
+ padding: 0.5rem 0.75rem 0.5rem 2.125rem;
+ transition: border-color 0.15s, box-shadow 0.15s;
+}
+.cv-search input::placeholder { color: var(--cv-text-3); }
+.cv-search input:focus {
+ outline: none; border-color: var(--cv-accent);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--cv-accent) 20%, transparent);
+}
+.cv-search .mag {
+ position: absolute; left: 0.625rem; top: 50%; transform: translateY(-50%);
+ color: var(--cv-text-3); pointer-events: none;
+}
+.cv-search .mag svg { width: 1rem; height: 1rem; display: block; }
+
+.cv-search-pop {
+ position: absolute; top: calc(100% + 0.375rem); left: 0; right: 0; z-index: 40;
+ background: var(--cv-surface); border: 1px solid var(--cv-border);
+ border-radius: var(--cv-radius-md); box-shadow: var(--cv-shadow-dropdown);
+ overflow: hidden;
+}
+.cv-search-pop a {
+ display: flex; align-items: center; gap: 0.625rem;
+ padding: 0.5rem 0.75rem; text-decoration: none;
+ color: var(--cv-text); font-size: 0.875rem;
+}
+.cv-search-pop a:hover, .cv-search-pop a[data-active='1'] { background: var(--cv-surface-2); }
+.cv-search-pop img { width: 20px; height: 20px; border-radius: 50%; background: var(--cv-surface-3); }
+.cv-search-pop .sym { color: var(--cv-text-3); text-transform: uppercase; font-size: 0.75rem; }
+.cv-search-pop .rk { margin-left: auto; color: var(--cv-text-3); font-size: 0.75rem; }
+.cv-search-pop .none { padding: 0.75rem; color: var(--cv-text-3); font-size: 0.875rem; }
+
+/* ── Toolbar row above the table ────────────────────────────────────────── */
+
+.cv-toolbar {
+ display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
+ gap: 0.75rem; margin-bottom: 1rem;
+}
+
+.cv-load-more {
+ display: block; margin: 1.25rem auto 0;
+ appearance: none; cursor: pointer; font: inherit; font-size: 0.875rem; font-weight: 500;
+ background: var(--cv-surface); color: var(--cv-text-2);
+ border: 1px solid var(--cv-border); border-radius: var(--cv-radius-md);
+ padding: 0.5rem 1.25rem;
+ transition: background 0.15s, color 0.15s, border-color 0.15s;
+}
+.cv-load-more:hover { background: var(--cv-surface-2); color: var(--cv-text); border-color: var(--cv-border-hover); }
+.cv-load-more:focus-visible { outline: 2px solid var(--cv-accent); outline-offset: 2px; }
+.cv-load-more[disabled] { opacity: 0.5; cursor: default; }
+
+/* ── States ─────────────────────────────────────────────────────────────── */
+
+.cv-empty {
+ border: 1px solid var(--cv-border); border-radius: var(--cv-radius-lg);
+ background: var(--cv-surface); color: var(--cv-text-2);
+ padding: 3rem 1.5rem; text-align: center;
+}
+.cv-empty a { color: var(--cv-accent); }
+
+.cv-skel {
+ position: relative; overflow: hidden;
+ background: var(--cv-surface-3); border-radius: var(--cv-radius);
+}
+.cv-skel::after {
+ content: ''; position: absolute; inset: 0;
+ transform: translateX(-100%);
+ background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--cv-text) 6%, transparent), transparent);
+ animation: cvShimmer 2s infinite;
+}
+@keyframes cvShimmer { 100% { transform: translateX(100%); } }
+
+.cv-updated { color: var(--cv-text-3); font-size: 0.75rem; margin-top: 1rem; }
+
+/* Categories row on the detail page. */
+.cv-cats { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.625rem; }
+.cv-cat {
+ font-size: 0.6875rem; color: var(--cv-text-2);
+ background: var(--cv-surface-2); border: 1px solid var(--cv-border);
+ border-radius: 999px; padding: 0.125rem 0.5rem;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .cv-skel::after, .cv-spinner { animation: none; }
+ .cv-news-card, .cv-stat-card, .cv-range-btn { transition: none; }
+}
diff --git a/vercel.json b/vercel.json
index 8669a04e6..d3201046e 100644
--- a/vercel.json
+++ b/vercel.json
@@ -6,7 +6,7 @@
"NODE_OPTIONS": "--no-deprecation"
},
"functions": {
- "api/cron/{copy-fanout,mirror-fanout,signal-fanout,three-holders-snapshot,x402-autonomous-loop,pulse-tick,coin-intel-observe,launcher-tick,reflect-sweep,solana-autodeploy,db-retention}.js": {
+ "api/cron/{economy-tick,copy-fanout,mirror-fanout,signal-fanout,three-holders-snapshot,x402-autonomous-loop,pulse-tick,coin-intel-observe,launcher-tick,reflect-sweep,solana-autodeploy,db-retention}.js": {
"maxDuration": 120
},
"api/cron/{strategy-fanout,gmgn-seed}.js": {
@@ -4918,25 +4918,13 @@
"schedule": "* * * * *"
},
{
- "path": "/api/cron/x402-seed-cron",
- "schedule": "* * * * *"
- },
- {
- "path": "/api/cron/x402-autonomous-loop",
- "schedule": "*/5 * * * *"
- },
- {
- "path": "/api/cron/x402-ring-tick",
+ "path": "/api/cron/economy-tick",
"schedule": "* * * * *"
},
{
"path": "/api/cron/avatar-thumbnail-render",
"schedule": "*/10 * * * *"
},
- {
- "path": "/api/cron/pulse-tick",
- "schedule": "*/2 * * * *"
- },
{
"path": "/api/cron/coin-intel-observe",
"schedule": "*/2 * * * *"