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
docs: add token-security work order and de-confliction guide to x402-catalog prompts
fudjiac27a45082a97
diff --git a/prompts/x402-catalog/21-token-security-v1.md b/prompts/x402-catalog/21-token-security-v1.mdnew file mode 100644index 000000000..6a2ea9b44--- /dev/null+++ b/prompts/x402-catalog/21-token-security-v1.md@@ -0,0 +1,64 @@+# 21 — Token security check: free rug/risk signals under `/api/v1/token/security`++Read `prompts/x402-catalog/00-CONTEXT.md` first and obey every rule in it. Work alone, finish+100%, never ask questions.++## Mission++The one question every trading agent asks before touching a token: "is this a rug?" Ship a+free endpoint that answers it with on-chain facts — mint/freeze authority status, holder+concentration, liquidity depth, token age — composed into a risk report. Facts, not scores+pulled from thin air.++## Context++- Native v1 route → `api/v1/token/security.js`, registered in `api/v1/_catalog.js` (read its+ entry contract). Match the handler style of existing v1 routes (`wrap`/`json`/`error` from+ `api/_lib/http.js`).+- Data sources (all keyless or already-configured — compose, don't proxy):+ - Solana RPC (use the platform's existing RPC resolution — read `api/solana-rpc.js` and+ `api/_lib` for the env): `getAccountInfo` on the mint (jsonParsed) → `mintAuthority`,+ `freezeAuthority`, `supply`, `decimals`; `getTokenLargestAccounts` → concentration.+ - DexScreener (keyless; the repo already normalizes it in `api/_lib/token-market.js` —+ reuse) → liquidity USD, pair age, volume.+ - `api/_lib/token-market.js` also exports `buildTokenRisk` — read it first; if it already+ computes part of this, reuse it and extend rather than duplicating.+- Response contract (every field present; `null` when unresolvable, never omitted, never+ faked):+ `{ address, chain: 'solana', mint_authority: { revoked: bool|null, address: string|null },+ freeze_authority: { revoked, address }, supply, decimals,+ top_holders: { top1_pct, top5_pct, top10_pct, holders_sampled },+ liquidity: { usd, largest_pair, pair_created_at },+ flags: [ ...string ], ts }`+ where `flags` are factual, e.g. `mint_authority_active`, `freeze_authority_active`,+ `top1_holder_over_20pct`, `liquidity_under_10k`, `pair_younger_than_24h`. No composite+ "risk score", no bullish/bearish — agents weigh facts themselves.+- EVM (`0x…`) input: return 400 with a clear "solana only (for now)" message — do not+ half-build EVM support.+- Example mint everywhere: the $THREE CA `FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`.+ Never a real third-party mint in code, tests, or docs.++## Tasks++1. Read the context modules; curl the real RPC + DexScreener for the $THREE mint and record+ shapes.+2. Implement `GET /api/v1/token/security?address=<mint>` per the contract. Partial upstream+ failure degrades per-section to `null`s + a `sources` array naming what answered — the+ call succeeds if ANY section resolved; 503 only when everything failed.+3. Public, keyless, per-IP rate limit 20/min (reuse `api/_lib/rate-limit.js`),+ `cache-control` 60s.+4. Register in `api/v1/_catalog.js` — summary first sentence: "Rug-check any Solana token in+ one free call: authority status, holder concentration, liquidity depth — on-chain facts,+ no invented scores."+5. **Tests** in `tests/api/v1-token-security.test.js`: full report against captured+ real-shaped fixtures, each flag's trigger condition, partial-failure nulls + sources,+ EVM 400, unresolvable mint 404, rate limit, catalog entry present. Targeted vitest until+ green.+6. **Docs:** `docs/api-reference.md` entry with a runnable curl ($THREE mint). Changelog+ entry (`feature`): free token security checks — authorities, concentration, liquidity.+7. Commit (explicit paths) and push per 00-CONTEXT.++## Definition of done++One free call turns a mint into a factual security report with honest per-section+degradation, tests green, catalog + docs + changelog updated, committed, pushed.diff --git a/prompts/x402-catalog/README.md b/prompts/x402-catalog/README.mdindex 522b9de5c..e4ec6895b 100644--- a/prompts/x402-catalog/README.md+++ b/prompts/x402-catalog/README.md@@ -42,6 +42,7 @@ Fire them in any order. The suggested sequence below front-loads the funnel.| 18 | [storefront-cleanup](18-storefront-cleanup.md) | Delist demos, remove dead weight, rewrite every description | Storefront || 19 | [vanity-instant-inventory](19-vanity-instant-inventory.md) | Pre-ground inventory → instant delivery + premium tiers | Standalone || 20 | [fact-check-v2](20-fact-check-v2.md) | Free sample lane + published accuracy benchmark | Standalone |+| 21 | [token-security-v1](21-token-security-v1.md) | Free rug-check: authorities, concentration, liquidity facts | Crypto API |## Suggested firing order@@ -54,3 +55,24 @@ Fire them in any order. The suggested sequence below front-loads the funnel.Note: 02–05 all append to `api/v1/_providers.js`. They're order-independent, but fire them**sequentially, not simultaneously** — concurrent edits to one file in a shared worktree willcollide.++## ⚠️ De-confliction with `prompts/x402-overhaul/`++A parallel campaign (`prompts/x402-overhaul/`, authored concurrently) covers overlapping+ground with a DIFFERENT architecture: it builds brand-new standalone `/api/crypto/*` and+`/api/3d/*` surfaces, while this campaign routes everything through the existing `/api/v1`+unified API (aggregator registry + catalog). **Firing both crypto tracks builds two parallel+free crypto APIs at different URLs — the exact fragmentation this rebuild is meant to fix.**+Pick one architecture per area:++| Area | Fire | Skip (superseded by) |+|---|---|---|+| Free crypto API | this campaign 01–10, 21 | overhaul 01–11 (same data, second URL surface) |+| Free text→3D | this campaign 13 | overhaul 12 (same lane, second URL surface) |+| 3D index/docs | this campaign 09 + 14's docs | overhaul 14 |+| Listing rewrites + delistings | this campaign 18 (also removes/delists) | overhaul 17–19 (rewrites only) |+| Reputation/identity generalization | overhaul 15 + 16 (unique — not covered here) | — |+| Free GLB inspect | overhaul 13 (unique — optional) | — |++Safe from the overhaul set: **13, 15, 16** (no collision with this campaign). Fire 15/16 in a+separate session from 18, not simultaneously — they touch the same `api/x402/` files.