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(reputation): walk past the first index page so the attestation count is the real one
nirholas2b2d973d0c45
diff --git a/docs/reputation.md b/docs/reputation.mdindex 76e065adc..aad6dda1e 100644--- a/docs/reputation.md+++ b/docs/reputation.md@@ -40,7 +40,7 @@ Gas cost is minimal on L2 networks like Base (typically under $0.10). The panel**Owners cannot vouch for their own agents.** If you own the agent, the vouch button is replaced with an explanatory note.-A full reputation dashboard (showing aggregate stats and all recent reviews) is also available at [three.ws/reputation](https://three.ws/reputation) for any `(chainId, agentId)` pair.+The standalone [Reputation Explorer](https://three.ws/reputation) covers any address, not just registered agents: open `/reputation?agent=<chainId>:<agentId>` and it resolves the agent to its owner address, or search the address directly. See [The Reputation Explorer page](#the-reputation-explorer-page) below.### Via the SDK@@ -58,7 +58,7 @@ const txHash = await submitReputation({});```-`submitFeedback` is an alias for `submitReputation` — both work identically.+`submitReputation` is a back-compat alias for `submitFeedback` (the contract's own method name). Both work identically.---@@ -76,16 +76,31 @@ Recent vouches are loaded by querying `FeedbackSubmitted` event logs for the lasReads go through `readProvider(chainId)` from [src/erc8004/chain-meta.js](../src/erc8004/chain-meta.js): every keyless public node listed for the chain becomes a pinned provider and they are combined in an ethers `FallbackProvider` with quorum 1, so the first healthy node answers and a stalled or rate-limited one is passed over after four seconds instead of blanking the panel. The USD figure printed beside a stake amount comes from `getEthPriceUsd()` ([src/shared/usd-price.js](../src/shared/usd-price.js)), which walks four price feeds with per-provider cooldowns; a throttled feed leaves the ETH amount in place and only drops the USD hint.-### Full reputation dashboard+### The Reputation Explorer page-The `ReputationDashboard` class ([src/reputation-ui.js](../src/reputation-ui.js)) is used on the standalone [/reputation](https://three.ws/reputation) page. It shows:+The standalone [/reputation](https://three.ws/reputation) page is its own surface, not an instance of the agent-profile panel above. It lives in [public/reputation/index.html](../public/reputation/index.html) with its logic in [public/reputation/reputation.js](../public/reputation/reputation.js), and it reads **EAS (Ethereum Attestation Service)** rather than the ERC-8004 registry, so it works for any Ethereum address whether or not that address is a registered agent.-- Review count, average rating, time since last review-- Up to 10 recent reviews with inline transaction links-- A submit form for leaving a new review (wallet connection handled inline)-- Optimistic updates: your review appears immediately as "Pending" while the transaction confirms, then is replaced with the confirmed on-chain data. If a confirmation poll fails, the page says so ("Could not confirm your review on-chain; refresh to check.") rather than leaving the pending row looking stuck.+URLs it answers:-The dashboard reads through `getEvmProvider(chainId)` from [src/shared/evm-rpc-fallback.js](../src/shared/evm-rpc-fallback.js): the same-origin `/api/evm-rpc?chainId=N` proxy first (which inherits the server's keyed and curated RPC failover), then the chain's keyless public hosts, combined into one `FallbackProvider`. There is no per-chain RPC URL hardcoded in the dashboard any more; one dead public endpoint no longer reads as "chain unsupported".+| URL | What it shows |+|---|---|+| `/reputation` | The search form: an address or ENS field plus a network picker |+| `/reputation?address=0x…&chain=8453` | Every attestation written to that address on that chain |+| `/reputation?address=vitalik.eth&chain=8453` | The same, resolving the ENS name through Ethereum mainnet first |+| `/reputation?agent=8453:12` | Resolves ERC-8004 agent 12 on chain 8453 to its owner address and forwards to the address view |++Chains covered: Base (8453, the default), Base Sepolia (84532), Ethereum (1), Optimism (10), Arbitrum (42161), Polygon (137). Each has its own EASScan GraphQL index and block explorer.++What the page renders:++- **Aggregate stats.** Attestation count, average star rating over the scored ones, and a 1-to-5 distribution bar. The count is labelled "attestations", not "reviews": most addresses hold attestations written against other EAS schemas (verifications, name claims), and calling those reviews would overstate the address's review history.+- **The attestation list**, filterable by All / Scored / With comments, paged 30 at a time with a running "Showing X of Y" and a **Show more** button, so a heavily attested address does not silently truncate.+- **Every attestation's payload.** A review renders as stars plus its comment. An attestation written against any other schema renders its decoded fields (name and value) with the schema string as a tag, so no card is a blank row with only an address and a timestamp.+- **An ERC-8004 badge** when the address owns an agent in the Identity Registry on that chain, showing the registry's own vote count and average, linking out to the agent's registry token on the block explorer and to [/agent-identities](https://three.ws/agent-identities).+- **A review form**, wallet-gated. Writes go to Base Sepolia, a free test network, which the form states plainly before you sign.+- **A distinct failure state.** If the EASScan index does not answer, the page says the review history is unknown and offers a retry plus an EASScan link. It never reports an unreachable index as "0 reviews", which would be a false statement about the address.++`ReputationDashboard` ([src/reputation-ui.js](../src/reputation-ui.js)) is a separate ERC-8004 registry dashboard component that no page currently mounts; do not assume editing it changes what /reputation shows.### Via the SDKdiff --git a/public/reputation/index.html b/public/reputation/index.htmlindex 144578255..650762c5f 100644--- a/public/reputation/index.html+++ b/public/reputation/index.html@@ -289,6 +289,9 @@.rep-review-list { display: flex; flex-direction: column; gap: 0.625rem; margin-top: 0.5rem; }+ .rep-list-note { margin: 0; font-size: 0.8125rem; color: rgba(232,233,240,0.45); }+ .rep-list-note a { color: #ffffff; text-decoration: underline; text-underline-offset: 2px; }+/* ── Paging under the attestation list ── */.rep-list-footer:empty { display: none; }.rep-list-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; padding-top: 0.25rem; }diff --git a/public/reputation/reputation.js b/public/reputation/reputation.jsindex d71a1933b..6ecfb427a 100644--- a/public/reputation/reputation.js+++ b/public/reputation/reputation.js@@ -187,17 +187,24 @@ function scoreColor(avg) {// ── EAS GraphQL read ─────────────────────────────────────────────────────────+// One index page, and how many of them a single lookup will walk. A single+// fixed page meant the headline count for a heavily attested address was the+// page size rather than the truth, with no hint that anything was missing.+const ATTESTATION_PAGE = 100;+const MAX_ATTESTATIONS = 500;+async function fetchAttestations(address, chainId) {const chain = EAS_CHAINS[chainId];if (!chain) throw new Error(`No EAS support for chain ${chainId}`);const checksummed = getAddress(address);const query = `- query Attestations($where: AttestationWhereInput!) {+ query Attestations($where: AttestationWhereInput!, $take: Int!, $skip: Int!) {attestations(where: $whereorderBy: [{ time: desc }]- take: 100+ take: $take+ skip: $skip) {idattester@@ -213,24 +220,36 @@ async function fetchAttestations(address, chainId) {`;const where = { recipient: { equals: checksummed }, revoked: { equals: false } };- const res = await fetch(chain.graphql, {- method: 'POST',- headers: { 'content-type': 'application/json' },- body: JSON.stringify({ query, variables: { where } }),- });- if (!res.ok) throw new Error(`EASScan API error: ${res.status}`);- const body = await res.json();- if (body.errors) throw new Error(body.errors[0]?.message || 'GraphQL error');- return (body.data?.attestations || []).map((a) => ({- uid: a.id,- attester: a.attester,- recipient: a.recipient,- schemaId: a.schemaId,- schemaString: a.schema?.schema || '',- time: Number(a.time),- txid: a.txid,- decoded: decodeAttestationData(a.decodedDataJson),- }));+ const rows = [];+ let capped = false;++ for (let skip = 0; skip < MAX_ATTESTATIONS; skip += ATTESTATION_PAGE) {+ const res = await fetch(chain.graphql, {+ method: 'POST',+ headers: { 'content-type': 'application/json' },+ body: JSON.stringify({ query, variables: { where, take: ATTESTATION_PAGE, skip } }),+ });+ if (!res.ok) throw new Error(`EASScan API error: ${res.status}`);+ const body = await res.json();+ if (body.errors) throw new Error(body.errors[0]?.message || 'GraphQL error');+ const page = body.data?.attestations || [];+ for (const a of page) {+ rows.push({+ uid: a.id,+ attester: a.attester,+ recipient: a.recipient,+ schemaId: a.schemaId,+ schemaString: a.schema?.schema || '',+ time: Number(a.time),+ txid: a.txid,+ decoded: decodeAttestationData(a.decodedDataJson),+ });+ }+ if (page.length < ATTESTATION_PAGE) break;+ if (rows.length >= MAX_ATTESTATIONS) { capped = true; break; }+ }++ return { rows, capped };}async function resolveENS(name) {@@ -763,13 +782,14 @@ async function renderProfile(appEl, { address, chainId }) {// unreachable index as "0 reviews" is a false statement about the address.const [attestationResult, agentId] = await Promise.all([fetchAttestations(resolvedAddress, chainId).then(- (rows) => ({ rows }),+ (result) => result,(err) => ({ error: err })),findAgentIdForAddress(resolvedAddress, chainId).catch(() => null),]);const loadError = attestationResult.error || null;const attestations = attestationResult.rows || [];+ const capped = Boolean(attestationResult.capped);// ERC-8004 reputation (if agent is registered)let erc8004Rep = null;@@ -836,7 +856,7 @@ async function renderProfile(appEl, { address, chainId }) {</div><div class="rep-stat-card"><div class="rep-stat-label">Attestations</div>- <div class="rep-stat-value">${attestations.length}</div>+ <div class="rep-stat-value">${attestations.length}${capped ? '+' : ''}</div><div class="rep-stat-sub">${stats.count} scored · ${withComment.length} with comments</div></div><div class="rep-stat-card">@@ -858,6 +878,7 @@ async function renderProfile(appEl, { address, chainId }) {<div class="rep-reviews-section"><h2 class="rep-section-title">Attestations</h2>+ ${capped ? `<p class="rep-list-note">Reading the ${MAX_ATTESTATIONS} most recent attestations on ${esc(chain.name)}. This address has more: <a href="${esc(chain.easscan)}/address/${esc(resolvedAddress)}" target="_blank" rel="noopener">see the full index on EASScan ↗</a></p>` : ''}<div class="rep-tabs" role="tablist" aria-label="Filter attestations"><button class="rep-tab active" data-filter="all" id="rep-tab-all" role="tab" aria-selected="true" aria-controls="rep-review-list" type="button">All <span class="rep-tab-badge">${all.length}</span>