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(legal): clickwrap Terms acceptance at every signup surface + ToS v2 and Privacy Policy v2

nirholasa4d932696b8b
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e0d0b51a3..08cb3c7b7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,8 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Meta-Allocator: the ETF of degens** (`/meta-allocator`) — Do not pick a coin, pick a basket of proven traders. The Meta-Allocator spreads a budget across the top verified pump.fun trader agents, ranked by risk-adjusted on-chain track record and diversified across trading styles, then tells you how to rebalance. Non-custodial: it returns a plan you act on one leader at a time, never a transaction.
- **three.ws Joins the QuickNode Startup Program** (`/blog/three-ws-quicknode-startup-program`) — three.ws has been accepted into the QuickNode Startup Program and approved for free infrastructure credits, expanding the RPC backbone behind its Solana-first agent economy.
- **3D generation now switches engines by itself when one fails** — A 3D generation that dies mid-flight no longer dead-ends. The platform now re-runs the same job on the next available engine automatically (up to three backups, free engines first) while your progress bar just keeps going — most failures become invisible. In the rare case every automatic backup is exhausted, the error screen on /forge now offers one-click "Try on …" buttons for the engines still available, so you never have to re-enter your prompt or photos. Avatar tools got the same treatment: a rig step that fails no longer throws away the finished 3D model, and the avatar generator falls back to the platform's own free engines when its primary vendor is down. (`/forge`) `[improvement]`
+- **3D models are now built from multiple angles at once** — Text-to-3D generations at Standard and High quality now photograph the subject from the front, side, and back before building the model, and the 3D engine fuses all three views into one asset on our own GPUs. The parts of an object the old single view could never see (the back of a chair, the far side of a character) are now generated from real coverage instead of guessed, so models read as true to life from every angle. A second self-hosted engine (Tencent Hunyuan3D) also joins the fleet for high-fidelity reconstructions, with automatic failover between the two. (`/forge`) `[feature, improvement]`
+- **Clearer legal terms, and you now actually agree to them** — Creating an account now includes a real agreement step: the signup form has a required checkbox, wallet sign-ins carry the agreement right inside the message you sign, and the platform keeps a durable record of which Terms version you accepted and when. The Terms of Service (version 2) and Privacy Policy were rewritten to be clearer and stronger: real-funds features are explicitly 18+, disputes are handled by individual arbitration with a 30-day opt-out, the privacy policy now lists our actual infrastructure providers and your California and EU rights, and legal acceptance records are exempt from routine log cleanup so your agreement is never lost. (`/legal/tos`) `[security, improvement]`
- **Creation tools now hand off down the pipeline** — Finishing one creation step now offers the next one instead of dropping you at a dead end. A fresh selfie avatar gets a "Turn this into an agent" button that carries the 3D body straight into the agent builder. The agent builder's success screen adds a "Take it further" row: give it a voice, embed it anywhere, put it in a world, or launch its token. And a freshly cloned voice now offers "Add to an agent". Avatar to agent to deploy, with no manual re-navigation. (`/create`) `[improvement]`
- **Fewer dead ends in the creation flow** — Every generic "create an agent" button (marketplace, memory tab, search) now points at the guided /create-agent wizard instead of a stale /agent/new link; that route stays reserved for the avatar hand-off it powers. The search page's avatar CTA no longer points at a route that never existed. /scan and /create/selfie (the two photo-to-avatar paths) now cross-link each other, and Build > Start here in the nav leads with "Create anything" straight to the /create hub. (`/create`) `[improvement]`
- **Free 3D generation got a lot more reliable** — Text-to-3D on /forge was intermittently failing with a generic error even though the model had actually finished. The free NVIDIA lane's results are single-collection: two overlapping status checks could race, one collecting the model and the other reporting failure. Status checks are now coordinated, a finished model that a racing check already saved is returned instead of an error, and a genuinely lost result is silently regenerated on the same job. The free community GPU fallback also recovered: one Space reports a broken download address for its finished models, and the fetch now falls back to the address that works. (`/forge`) `[fix]`
diff --git a/api/_lib/legal.js b/api/_lib/legal.js
index cf4ed7aae..ff6f481a6 100644
--- a/api/_lib/legal.js
+++ b/api/_lib/legal.js
@@ -1,4 +1,4 @@
-// Terms of Service acceptance — shared constants + recording helper.
+// Terms of Service acceptance: shared constants + recording helper.
//
// TOS_VERSION is the integer version of the current /legal/tos document.
// Bump it whenever the Terms change materially; new signups then record the
@@ -7,9 +7,9 @@
// coverage converges without a blocking re-acceptance interstitial).
//
// Two durable records are written per acceptance:
-// - users.tos_accepted_version / users.tos_accepted_at — the current state,
+// - users.tos_accepted_version / users.tos_accepted_at: the current state,
// cheap to query (migration 20260716100000_users_tos_acceptance.sql).
-// - an audit_log 'tos-accept' row — the append-only evidentiary trail
+// - an audit_log 'tos-accept' row: the append-only evidentiary trail
// (who, which version, from which flow, when, IP, user agent).
import { sql } from './db.js';
@@ -20,7 +20,7 @@ export const TOS_VERSION = 2;
/**
* Parse the optional ToS-acceptance fields from an auth request body.
* Returns null when the client did not assert acceptance. The version is
- * clamped to [1, TOS_VERSION] — a client cannot claim a version that does
+ * clamped to [1, TOS_VERSION]: a client cannot claim a version that does
* not exist yet; an omitted/invalid version defaults to the current one.
*
* @param {unknown} body raw parsed JSON body
@@ -35,12 +35,12 @@ export function tosAcceptanceFromBody(body) {
/**
* Record a user's ToS acceptance. Fire-and-forget: auth flows must never
- * fail because acceptance bookkeeping had a bad day — the audit trail and
+ * fail because acceptance bookkeeping had a bad day: the audit trail and
* column stamp are best-effort, the acceptance UI event already happened.
*
* @param {{ userId: string, version: number, context: string, req?: import('http').IncomingMessage }} args
* context: which flow recorded it ('register', 'login', 'siwe', 'siws',
- * 'privy', 'tos-ack', …) — stored in the audit row's meta.
+ * 'privy', 'tos-ack', …): stored in the audit row's meta.
*/
export function recordTosAcceptance({ userId, version, context, req = null }) {
logAudit({
diff --git a/api/auth/[action].js b/api/auth/[action].js
index 26ae6bd07..d5add9492 100644
--- a/api/auth/[action].js
+++ b/api/auth/[action].js
@@ -68,7 +68,7 @@ async function handleLogin(req, res) {
res.setHeader('set-cookie', sessionCookie(token));
logAudit({ userId: user.id, action: 'login', req });
// The login form carries a "By signing in you agree…" notice, so each
- // sign-in re-affirms the current Terms — this is how pre-clickwrap
+ // sign-in re-affirms the current Terms: this is how pre-clickwrap
// accounts converge onto a recorded acceptance.
const tos = tosAcceptanceFromBody(raw);
if (tos) recordTosAcceptance({ userId: user.id, version: tos.version, context: 'login', req });
diff --git a/api/auth/siwe/[action].js b/api/auth/siwe/[action].js
index 7423bb414..1ab757c0d 100644
--- a/api/auth/siwe/[action].js
+++ b/api/auth/siwe/[action].js
@@ -281,7 +281,7 @@ async function handleVerify(req, res) {
}
// Terms acceptance: first-party sign-in surfaces put the agreement in the
- // signed SIWE statement and send tosAccepted alongside — record it for both
+ // signed SIWE statement and send tosAccepted alongside: record it for both
// brand-new and returning wallets so acceptance converges on every sign-in.
const tos = tosAcceptanceFromBody(raw);
if (tos) recordTosAcceptance({ userId, version: tos.version, context: 'siwe', req });
diff --git a/api/auth/siws/[action].js b/api/auth/siws/[action].js
index 2d6a8bda2..edfd60de4 100644
--- a/api/auth/siws/[action].js
+++ b/api/auth/siws/[action].js
@@ -252,7 +252,7 @@ async function handleVerify(req, res) {
}
// Terms acceptance: first-party sign-in surfaces put the agreement in the
- // signed SIWS statement and send tosAccepted alongside — record it for both
+ // signed SIWS statement and send tosAccepted alongside: record it for both
// brand-new and returning wallets so acceptance converges on every sign-in.
const tos = tosAcceptanceFromBody(raw);
if (tos) recordTosAcceptance({ userId, version: tos.version, context: 'siws', req });
diff --git a/api/cron/[name].js b/api/cron/[name].js
index 7db6d8241..b59576aee 100644
--- a/api/cron/[name].js
+++ b/api/cron/[name].js
@@ -3299,9 +3299,14 @@ async function handleSettleRoyalties(req, res) {
// ═══════════════════════════════════════════════════════════════════════════
// audit-log-cleanup — retention policy: keep 365 days of audit_log rows.
+// Legal acceptance records (Terms of Service and Risk Disclosure clickwrap,
+// written by api/legal/tos-ack.js, api/legal/risk-ack.js, and the auth
+// endpoints) are exempt: they are the durable evidence that a user agreed,
+// and must survive for the life of the account and beyond.
// ═══════════════════════════════════════════════════════════════════════════
const AUDIT_LOG_RETENTION_DAYS = 365;
+const AUDIT_LOG_RETENTION_EXEMPT_ACTIONS = ['tos-accept', 'risk-ack-accept'];
async function handleAuditLogCleanup(req, res) {
if (cors(req, res, { methods: 'GET,POST,OPTIONS' })) return;
@@ -3311,6 +3316,7 @@ async function handleAuditLogCleanup(req, res) {
const result = await sql`
delete from audit_log
where created_at < now() - (${AUDIT_LOG_RETENTION_DAYS} || ' days')::interval
+ and action != all(${AUDIT_LOG_RETENTION_EXEMPT_ACTIONS})
returning id
`;
return json(res, 200, { deleted: result.length, retention_days: AUDIT_LOG_RETENTION_DAYS });
diff --git a/api/legal/risk-ack.js b/api/legal/risk-ack.js
index 1f9558393..25fe870c4 100644
--- a/api/legal/risk-ack.js
+++ b/api/legal/risk-ack.js
@@ -7,7 +7,9 @@
// browser (localStorage, versioned); this endpoint writes the durable
// server-side record into audit_log — who (when signed in), which disclosure
// version, from which feature ('trade', 'snipe', 'x402-pay', …), when, from
-// where. audit_log has no retention pruning, so acceptance records persist.
+// where. The audit-log-cleanup cron exempts 'risk-ack-accept' (and
+// 'tos-accept') rows from its 365-day retention, so acceptance records
+// persist indefinitely.
//
// Anonymous acceptances are recorded too (userId null): the gate also runs in
// third-party x402 embeds and pre-auth flows where no session exists.
diff --git a/api/legal/tos-ack.js b/api/legal/tos-ack.js
index 1aeba1755..d0eef9a58 100644
--- a/api/legal/tos-ack.js
+++ b/api/legal/tos-ack.js
@@ -1,4 +1,4 @@
-// /api/legal/tos-ack — record a user's acceptance of the Terms of Service.
+// /api/legal/tos-ack: record a user's acceptance of the Terms of Service.
//
// POST /api/legal/tos-ack { version?, context?, path? } → 200 { ok: true, version }
//
@@ -8,9 +8,10 @@
// an already-signed-in user accepting an updated Terms version, and
// pre-auth surfaces that show the agreement before an account exists.
//
-// Mirrors /api/legal/risk-ack: every acceptance lands in audit_log (no
-// retention pruning — records persist); signed-in acceptances additionally
-// stamp users.tos_accepted_version / users.tos_accepted_at.
+// Mirrors /api/legal/risk-ack: every acceptance lands in audit_log (the
+// audit-log-cleanup cron exempts 'tos-accept' rows from its 365-day
+// retention, so acceptance records persist indefinitely); signed-in
+// acceptances additionally stamp users.tos_accepted_version / tos_accepted_at.
import { getSessionUser } from '../_lib/auth.js';
import { cors, error, json, method, readJson, wrap, rateLimited } from '../_lib/http.js';
diff --git a/data/changelog.json b/data/changelog.json
index 9fef0f4e9..adaf1a97b 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,16 @@
{
"$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-16",
+ "title": "3D models are now built from multiple angles at once",
+ "summary": "Text-to-3D generations at Standard and High quality now photograph the subject from the front, side, and back before building the model, and the 3D engine fuses all three views into one asset on our own GPUs. The parts of an object the old single view could never see (the back of a chair, the far side of a character) are now generated from real coverage instead of guessed, so models read as true to life from every angle. A second self-hosted engine (Tencent Hunyuan3D) also joins the fleet for high-fidelity reconstructions, with automatic failover between the two.",
+ "tags": [
+ "feature",
+ "improvement"
+ ],
+ "link": "/forge"
+ },
{
"date": "2026-07-16",
"title": "Generations look real by default, and every viewer renders them right",
@@ -13915,6 +13925,16 @@
"fix"
],
"link": "/forge"
+ },
+ {
+ "date": "2026-07-16",
+ "title": "Clearer legal terms, and you now actually agree to them",
+ "summary": "Creating an account now includes a real agreement step: the signup form has a required checkbox, wallet sign-ins carry the agreement right inside the message you sign, and the platform keeps a durable record of which Terms version you accepted and when. The Terms of Service (version 2) and Privacy Policy were rewritten to be clearer and stronger: real-funds features are explicitly 18+, disputes are handled by individual arbitration with a 30-day opt-out, the privacy policy now lists our actual infrastructure providers and your California and EU rights, and legal acceptance records are exempt from routine log cleanup so your agreement is never lost.",
+ "tags": [
+ "security",
+ "improvement"
+ ],
+ "link": "/legal/tos"
}
]
}
diff --git a/docs/authentication.md b/docs/authentication.md
index 160c47a69..8cce64f8f 100644
--- a/docs/authentication.md
+++ b/docs/authentication.md
@@ -101,11 +101,12 @@ const { nonce, csrf, expiresAt } = await fetch('/api/auth/siwe/nonce', {
credentials: 'include'
}).then(r => r.json());
-// 2. Build the EIP-4361 message
+// 2. Build the EIP-4361 message. Put the Terms agreement in the signed
+// statement so the signature itself evidences acceptance.
const message = new SiweMessage({
domain: window.location.host,
address: walletAddress,
- statement: 'Sign in to three.ws. This does not cost anything and proves wallet ownership.',
+ statement: 'Sign in to three.ws. This does not cost anything and proves wallet ownership. By signing, you agree to the Terms of Service (https://three.ws/legal/tos) and Privacy Policy (https://three.ws/legal/privacy).',
uri: window.location.origin,
version: '1',
chainId: 1,
@@ -116,7 +117,10 @@ const message = new SiweMessage({
// 3. Sign
const signature = await provider.getSigner().signMessage(message);
-// 4. Verify — include the CSRF token in the header
+// 4. Verify: include the CSRF token in the header. Send tosAccepted: true
+// when your UI displayed the Terms agreement (statement above or a notice
+// next to the sign-in control); the server records the acceptance and the
+// Terms version on the user record.
const res = await fetch('/api/auth/siwe/verify', {
method: 'POST',
credentials: 'include',
@@ -124,13 +128,22 @@ const res = await fetch('/api/auth/siwe/verify', {
'Content-Type': 'application/json',
'X-CSRF-Token': csrf,
},
- body: JSON.stringify({ message, signature }),
+ body: JSON.stringify({ message, signature, tosAccepted: true }),
});
const { user, wallet } = await res.json();
```
> **Security note:** Never submit the SIWE message to a domain other than where the nonce was issued. The backend validates that `domain` and `uri` in the message match the deployment's `APP_ORIGIN`. Replaying a valid signature from a phishing page is rejected.
+### Terms of Service acceptance
+
+Every auth endpoint accepts an optional `tosAccepted: true` body field. Send it whenever your UI showed the user the [Terms of Service](https://three.ws/legal/tos) agreement (a checkbox, a "By signing in you agree" notice, or the agreement sentence inside the signed wallet statement). The server writes a durable acceptance record (audit log + the accepted Terms version on the user row). Two rules:
+
+- `POST /api/auth/register` **requires** `tosAccepted: true`; account creation without it fails with `400 tos_required`. Registration UIs must show a real agreement control.
+- Wallet and Privy verifies (`/api/auth/siwe/verify`, `/api/auth/siws/verify`, `/api/auth/privy/verify`) and `POST /api/auth/login` treat it as an affirmation: acceptance is recorded on every sign-in, so users converge onto the current Terms version over time.
+
+An already-signed-in user can also record acceptance directly with `POST /api/legal/tos-ack { version?, context? }`, which mirrors the risk-acknowledgment endpoint (`/api/legal/risk-ack`).
+
---
## Privy (Social / Email Auth)
@@ -167,12 +180,14 @@ Get both values from [dashboard.privy.io](https://dashboard.privy.io). The serve
### Verify endpoint
```js
-// After Privy client gives you an idToken:
+// After Privy client gives you an idToken. Send tosAccepted: true when your
+// UI displayed the Terms of Service agreement next to the sign-in control;
+// the server records the acceptance and the Terms version on the user record.
const res = await fetch('/api/auth/privy/verify', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify({ idToken }),
+ body: JSON.stringify({ idToken, tosAccepted: true }),
});
const { user, wallet } = await res.json();
// user: { id, email, display_name, plan, avatar_url }
diff --git a/pages/aws-marketplace/welcome.html b/pages/aws-marketplace/welcome.html
index 932f2b1ea..b84a82e3a 100644
--- a/pages/aws-marketplace/welcome.html
+++ b/pages/aws-marketplace/welcome.html
@@ -37,6 +37,10 @@
/* ── auth form ── */
.form-group { margin-bottom: 16px; }
+ .tos-row { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 4px; font-size: 12.5px; line-height: 1.5; color: var(--muted); cursor: pointer; }
+ .tos-row input[type='checkbox'] { width: 15px; height: 15px; margin: 2px 0 0; flex: none; accent-color: var(--accent); cursor: pointer; }
+ .tos-row a, .tos-note a { color: var(--text); }
+ .tos-note { margin-top: 10px; font-size: 11.5px; line-height: 1.5; color: var(--muted); text-align: center; }
label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
input { width: 100%; padding: 11px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-size: 14px; outline: none; transition: border-color 0.15s; }
input:focus { border-color: var(--accent); }
@@ -139,6 +143,10 @@
<label for="su-password">Password</label>
<input id="su-password" type="password" name="password" placeholder="Min. 8 characters" required autocomplete="new-password" />
</div>
+ <label class="tos-row" for="su-tos">
+ <input id="su-tos" type="checkbox" required />
+ <span>I have read and agree to the <a href="/legal/tos" target="_blank" rel="noopener">Terms of Service</a>, <a href="/legal/privacy" target="_blank" rel="noopener">Privacy Policy</a>, and <a href="/legal/aws-marketplace-eula" target="_blank" rel="noopener">AWS Marketplace EULA</a>.</span>
+ </label>
<button class="btn" id="btn-signup" type="submit">Create account &amp; activate</button>
</form>
@@ -153,6 +161,7 @@
<input id="si-password" type="password" name="password" placeholder="Your password" required autocomplete="current-password" />
</div>
<button class="btn" id="btn-signin" type="submit">Sign in &amp; activate</button>
+ <p class="tos-note">By signing in you agree to the <a href="/legal/tos" target="_blank" rel="noopener">Terms of Service</a> and <a href="/legal/privacy" target="_blank" rel="noopener">Privacy Policy</a>.</p>
</form>
</div>
diff --git a/public/changelog.json b/public/changelog.json
index c7ed2d0bb..978ed93f1 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-16T20:12:52.121Z",
+ "generated_at": "2026-07-16T20:34:26.974Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -46,6 +46,28 @@
"improvement"
]
},
+ {
+ "date": "2026-07-16",
+ "type": "update",
+ "title": "3D models are now built from multiple angles at once",
+ "summary": "Text-to-3D generations at Standard and High quality now photograph the subject from the front, side, and back before building the model, and the 3D engine fuses all three views into one asset on our own GPUs. The parts of an object the old single view could never see (the back of a chair, the far side of a character) are now generated from real coverage instead of guessed, so models read as true to life from every angle. A second self-hosted engine (Tencent Hunyuan3D) also joins the fleet for high-fidelity reconstructions, with automatic failover between the two.",
+ "link": "/forge",
+ "tags": [
+ "feature",
+ "improvement"
+ ]
+ },
+ {
+ "date": "2026-07-16",
+ "type": "update",
+ "title": "Clearer legal terms, and you now actually agree to them",
+ "summary": "Creating an account now includes a real agreement step: the signup form has a required checkbox, wallet sign-ins carry the agreement right inside the message you sign, and the platform keeps a durable record of which Terms version you accepted and when. The Terms of Service (version 2) and Privacy Policy were rewritten to be clearer and stronger: real-funds features are explicitly 18+, disputes are handled by individual arbitration with a 30-day opt-out, the privacy policy now lists our actual infrastructure providers and your California and EU rights, and legal acceptance records are exempt from routine log cleanup so your agreement is never lost.",
+ "link": "/legal/tos",
+ "tags": [
+ "security",
+ "improvement"
+ ]
+ },
{
"date": "2026-07-16",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index 293f07905..2ef072839 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -38,6 +38,22 @@
<category>improvement</category>
<description>A 3D generation that dies mid-flight no longer dead-ends. The platform now re-runs the same job on the next available engine automatically (up to three backups, free engines first) while your progress bar just keeps going — most failures become invisible. In the rare case every automatic backup is exhausted, the error screen on /forge now offers one-click &quot;Try on …&quot; buttons for the engines still available, so you never have to re-enter your prompt or photos. Avatar tools got the same treatment: a rig step that fails no longer throws away the finished 3D model, and the avatar generator falls back to the platform's own free engines when its primary vendor is down.</description>
</item>
+ <item>
+ <title>3D models are now built from multiple angles at once</title>
+ <link>https://three.ws/forge</link>
+ <guid isPermaLink="false">2026-07-16:3D models are now built from multiple angles at once</guid>
+ <pubDate>Thu, 16 Jul 2026 12:00:00 GMT</pubDate>
+ <category>feature</category>
+ <description>Text-to-3D generations at Standard and High quality now photograph the subject from the front, side, and back before building the model, and the 3D engine fuses all three views into one asset on our own GPUs. The parts of an object the old single view could never see (the back of a chair, the far side of a character) are now generated from real coverage instead of guessed, so models read as true to life from every angle. A second self-hosted engine (Tencent Hunyuan3D) also joins the fleet for high-fidelity reconstructions, with automatic failover between the two.</description>
+ </item>
+ <item>
+ <title>Clearer legal terms, and you now actually agree to them</title>
+ <link>https://three.ws/legal/tos</link>
+ <guid isPermaLink="false">2026-07-16:Clearer legal terms, and you now actually agree to them</guid>
+ <pubDate>Thu, 16 Jul 2026 12:00:00 GMT</pubDate>
+ <category>security</category>
+ <description>Creating an account now includes a real agreement step: the signup form has a required checkbox, wallet sign-ins carry the agreement right inside the message you sign, and the platform keeps a durable record of which Terms version you accepted and when. The Terms of Service (version 2) and Privacy Policy were rewritten to be clearer and stronger: real-funds features are explicitly 18+, disputes are handled by individual arbitration with a 30-day opt-out, the privacy policy now lists our actual infrastructure providers and your California and EU rights, and legal acceptance records are exempt from routine log cleanup so your agreement is never lost.</description>
+ </item>
<item>
<title>Creation tools now hand off down the pipeline</title>
<link>https://three.ws/create</link>
diff --git a/public/features.json b/public/features.json
index 3dcdeb72c..8dd35cf31 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-16T20:08:38.942Z",
+ "generated_at": "2026-07-16T20:34:26.961Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/public/legal/privacy.html b/public/legal/privacy.html
index 9f5c21137..affbbcc50 100644
--- a/public/legal/privacy.html
+++ b/public/legal/privacy.html
@@ -50,79 +50,95 @@
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
<meta property="og:locale" content="en_US">
- <meta property="og:image:alt" content="Privacy Policy — three.ws">
+ <meta property="og:image:alt" content="Privacy Policy - three.ws">
<meta name="twitter:site" content="@trythreews">
</head>
<body>
<div class="wrap">
<a class="brand" href="/"><img src="/three.svg" alt="" class="header-logo" aria-hidden="true" />three.ws</a>
<h1>Privacy Policy</h1>
- <p class="meta">Effective: April 27, 2026 &nbsp;·&nbsp; <a href="/legal/tos.html">Terms of Service</a></p>
+ <p class="meta">Effective: July 16, 2026 &nbsp;·&nbsp; Version 2 &nbsp;·&nbsp; <a href="/legal/tos">Terms of Service</a></p>
<p>This Privacy Policy explains how three.ws ("we", "us", "our") collects, uses, and shares information about you when you use three.ws (the "Service"). We take your privacy seriously and collect only what we need to operate.</p>
<h2>1. Information We Collect</h2>
<table>
<tr><th>Category</th><th>Examples</th><th>Why</th></tr>
- <tr><td>Account identifiers</td><td>Wallet address, email (optional), display name</td><td>Authentication &amp; account management</td></tr>
+ <tr><td>Account identifiers</td><td>Wallet address, email (optional), username, display name</td><td>Authentication &amp; account management</td></tr>
<tr><td>Content you upload</td><td>3D models (GLB/glTF), thumbnails, agent metadata</td><td>Service delivery, CDN delivery to viewers</td></tr>
<tr><td>On-chain data</td><td>ERC-8004 agent registrations, Metaplex NFT mints, USDC payment tx hashes</td><td>Identity verification, subscription status</td></tr>
<tr><td>Usage data</td><td>API calls, widget load events (no IPs, no fingerprints)</td><td>Quota enforcement, abuse prevention, aggregate analytics</td></tr>
<tr><td>Session data</td><td>Hashed session token, IP address (hashed), user agent</td><td>Authentication, security</td></tr>
+ <tr><td>Legal acceptance records</td><td>Terms of Service version accepted, Risk Disclosure version accepted, timestamp, IP address, user agent, which flow recorded it</td><td>Proof of agreement, legal compliance</td></tr>
<tr><td>Email (if provided)</td><td>Email address for transactional messages</td><td>Account notices, subscription receipts</td></tr>
</table>
- <p>We do <strong>not</strong> collect advertising identifiers, third-party tracking pixels, or sell personal data to any third party.</p>
+ <p>We do <strong>not</strong> collect advertising identifiers, use third-party tracking pixels, or sell personal data to any third party.</p>
<h2>2. How We Use Your Information</h2>
<ul>
<li>To authenticate you and maintain your session.</li>
- <li>To store and serve your 3D content via Cloudflare R2.</li>
- <li>To send transactional emails (welcome, subscription receipts, security alerts) via Resend.</li>
+ <li>To store and serve your 3D content via our CDN.</li>
+ <li>To send transactional emails (welcome, subscription receipts, security alerts).</li>
<li>To enforce plan quotas and rate limits.</li>
<li>To detect and prevent abuse, fraud, and security incidents.</li>
+ <li>To keep records of your acceptance of our legal agreements.</li>
<li>To improve the Service using aggregate, anonymized analytics.</li>
</ul>
<h2>3. On-Chain Data</h2>
- <p>Wallet addresses and on-chain registrations are public by nature of blockchain technology. We index publicly available on-chain data (ERC-8004 events, Metaplex metadata) to power the agent directory. We do not create profiles that link on-chain identity to off-chain personal information beyond what you explicitly provide.</p>
+ <p>Wallet addresses and on-chain registrations are public by nature of blockchain technology. We index publicly available on-chain data (ERC-8004 events, Metaplex metadata) to power the agent directory. We do not create profiles that link on-chain identity to off-chain personal information beyond what you explicitly provide. Note that anything written to a public blockchain is permanent and outside our control; we cannot delete it.</p>
- <h2>4. Sharing & Disclosure</h2>
- <p>We do not sell your personal data. We share information only with:</p>
+ <h2>4. Sharing &amp; Disclosure</h2>
+ <p>We do not sell your personal data, and we do not share it for cross-context behavioral advertising. We share information only with:</p>
<ul>
- <li><strong>Infrastructure providers:</strong> Vercel (hosting), Neon (database), Upstash (rate limiting), Cloudflare R2 (storage), Resend (email). Each is bound by their own privacy policy and data processing agreements.</li>
- <li><strong>Legal obligations:</strong> If required by law, court order, or to protect the rights and safety of three.ws or others.</li>
- <li><strong>Business transfers:</strong> In connection with a merger, acquisition, or sale of assets, with notice to affected users.</li>
+ <li><strong>Infrastructure providers:</strong> Google Cloud Platform (hosting and compute), Neon (database), Cloudflare (storage and CDN), Resend (transactional email), and Privy (optional sign-in). Each processes data on our behalf under its own privacy policy and data-processing terms.</li>
+ <li><strong>Payment facilitators:</strong> for paid features settled on-chain (x402), payment verification runs through a facilitator such as Coinbase Developer Platform or the public x402.org facilitator. They see your public wallet address and transaction signatures, never private keys.</li>
+ <li><strong>AI model providers:</strong> generation features forward your prompts and asset URLs to upstream model APIs (see Section 10).</li>
+ <li><strong>Legal obligations:</strong> if required by law, court order, or to protect the rights and safety of three.ws or others.</li>
+ <li><strong>Business transfers:</strong> in connection with a merger, acquisition, or sale of assets, with notice to affected users.</li>
</ul>
<h2>5. Data Retention</h2>
<p>We retain your account data for as long as your account is active. Deleted accounts are soft-deleted for 30 days (for recovery), then permanently purged. Session tokens expire after 30 days. Nonces expire after 5 minutes and are purged within 24 hours.</p>
- <p>Usage events are retained for 90 days for quota and abuse analysis, then deleted. Widget view events (no personal data) are retained for 12 months.</p>
+ <p>Usage events are retained for 90 days for quota and abuse analysis, then deleted. Widget view events (no personal data) are retained for 12 months. Security audit logs are retained for 365 days.</p>
+ <p><strong>Legal acceptance records</strong> (your acceptance of the Terms of Service and Risk Disclosure) are retained for the life of your account and afterward for as long as needed to establish or defend legal claims. This retention is a legal obligation and survives an account-deletion request.</p>
<h2>6. Your Rights</h2>
- <p>Depending on your jurisdiction you may have rights to access, correct, delete, or export your personal data. To exercise any of these rights, email <a href="mailto:[email protected]">[email protected]</a> from the email address associated with your account, or sign a message with your wallet address confirming the request.</p>
- <p>We will respond within 30 days. Requests to delete your account will remove all content stored on our servers; on-chain data cannot be deleted by us.</p>
+ <p>Depending on your jurisdiction you may have rights to access, correct, delete, or export your personal data, and to object to or restrict certain processing. To exercise any of these rights, email <a href="mailto:[email protected]">[email protected]</a> from the email address associated with your account, or sign a message with your wallet address confirming the request.</p>
+ <p>We will respond within 30 days (or sooner where the law requires). Requests to delete your account will remove all content stored on our servers, except records we must keep (Section 5); on-chain data cannot be deleted by us. We will never discriminate against you for exercising a privacy right.</p>
- <h2>7. GDPR (EEA & UK Users)</h2>
- <p>For users in the European Economic Area or United Kingdom, our legal bases for processing are: <strong>contract performance</strong> (account operation, content delivery), <strong>legitimate interests</strong> (security, abuse prevention, aggregate analytics), and <strong>consent</strong> (optional email marketing, if you opt in).</p>
- <p>You have the right to lodge a complaint with your local supervisory authority.</p>
+ <h2>7. GDPR (EEA &amp; UK Users)</h2>
+ <p>For users in the European Economic Area or United Kingdom, our legal bases for processing are: <strong>contract performance</strong> (account operation, content delivery), <strong>legitimate interests</strong> (security, abuse prevention, aggregate analytics), <strong>legal obligation</strong> (records of legal acceptance, lawful requests), and <strong>consent</strong> (optional email marketing, if you opt in).</p>
+ <p>You have the right to lodge a complaint with your local supervisory authority. You may also contact us first at <a href="mailto:[email protected]">[email protected]</a>; we would welcome the chance to resolve your concern directly.</p>
- <h2>8. Cookies & Local Storage</h2>
+ <h2>8. California Privacy Rights (CCPA/CPRA)</h2>
+ <p>If you are a California resident: the categories of personal information we collect are listed in Section 1, the purposes in Section 2, and the recipients in Section 4. We do <strong>not</strong> sell personal information and do <strong>not</strong> share it for cross-context behavioral advertising, so there is nothing to opt out of; browser opt-out signals such as Global Privacy Control are honored by default because there is no sale or sharing to stop. We do not use or disclose sensitive personal information for purposes requiring a right to limit.</p>
+ <p>You have the rights to know, access, correct, delete, and port your personal information, and to not be discriminated against for exercising them. Exercise them via <a href="mailto:[email protected]">[email protected]</a> (Section 6). We verify requests using your signed-in session, your account email, or a message signed by your wallet. An authorized agent may act for you with written permission.</p>
+
+ <h2>9. International Transfers</h2>
+ <p>The Service is operated from the United States and data is processed on infrastructure located in the United States. If you use the Service from outside the U.S., your information is transferred to and processed in the U.S. Where GDPR applies, transfers to our processors rely on their standard contractual clauses or an applicable adequacy framework.</p>
+
+ <h2>9a. Security &amp; Breach Notification</h2>
+ <p>We protect your data with industry-standard measures: TLS in transit, encrypted storage, hashed session tokens and IP addresses, scoped credentials, and audit logging. No system is perfectly secure; if we learn of a breach affecting your personal data we will notify you and, where required, regulators without undue delay and within the timelines applicable law requires (for example, 72 hours to supervisory authorities under GDPR).</p>
+
+ <h2>9b. Children's Privacy</h2>
+ <p>The Service is not directed to children under 13. We do not knowingly collect personal information from children under 13. If we learn we have collected such information, we will delete it promptly. Features that move real funds additionally require users to be at least 18 (see the <a href="/legal/tos">Terms of Service</a>).</p>
+
+ <h2>Cookies &amp; Local Storage</h2>
<p>We use the following browser storage:</p>
<ul>
<li><strong>Session cookie</strong> (<code>__Host-session</code>): HttpOnly, Secure, SameSite=Strict. Required for authentication.</li>
<li><strong>CSRF cookies</strong> (<code>__Host-csrf-siwe</code>, <code>__Host-csrf-siws</code>): Short-lived, for SIWE/SIWS replay protection.</li>
<li><strong>localStorage</strong> (<code>3dagent:auth-hint</code>): Stores a non-sensitive login hint for faster page loads. Cleared on sign-out.</li>
+ <li><strong>localStorage</strong> (<code>threews:risk-ack</code>): Remembers which Risk Disclosure version you accepted so you are not re-prompted on every action; the durable record lives server-side.</li>
</ul>
<p>We do not use third-party advertising cookies.</p>
- <h2>9. Children's Privacy</h2>
- <p>The Service is not directed to children under 13. We do not knowingly collect personal information from children under 13. If we learn we have collected such information, we will delete it promptly.</p>
-
<h2>10. MCP Connectors, AI Processing &amp; Payments</h2>
<p>three.ws exposes Model Context Protocol (MCP) connectors (e.g. <code>https://three.ws/api/mcp</code> and <code>https://three.ws/api/mcp-3d</code>) that AI clients such as Claude and ChatGPT can call on your behalf. This section explains how data flows through those connectors.</p>
<ul>
- <li><strong>Tool inputs we receive:</strong> the arguments you (or your AI client) send to a tool — text prompts, reference image URLs, GLB/glTF model URLs, wallet or agent addresses, token mints, and search terms. We process these to fulfill the request and log them only as needed for quota, abuse prevention, and debugging.</li>
- <li><strong>Third-party AI model providers:</strong> generation and editing tools forward your prompts and asset URLs to upstream model APIs to produce results. Depending on the tool, these may include NVIDIA NIM (Microsoft TRELLIS), Meshy, Replicate, Stability, Hugging Face, OpenAI, Anthropic, and IBM (Granite). Each provider processes the input under its own privacy policy. Do not submit confidential or personal data in tool prompts.</li>
+ <li><strong>Tool inputs we receive:</strong> the arguments you (or your AI client) send to a tool: text prompts, reference image URLs, GLB/glTF model URLs, wallet or agent addresses, token mints, and search terms. We process these to fulfill the request and log them only as needed for quota, abuse prevention, and debugging.</li>
+ <li><strong>Third-party AI model providers:</strong> generation and editing tools forward your prompts and asset URLs to upstream model APIs to produce results. Depending on the tool, these may include NVIDIA NIM (Microsoft TRELLIS), Meshy, Replicate, Stability, Hugging Face, OpenAI, Anthropic, Google (Vertex AI), and IBM (Granite). Each provider processes the input under its own privacy policy. Do not submit confidential or personal data in tool prompts.</li>
<li><strong>Payment data (x402):</strong> paid tools settle in USDC via the x402 payment protocol. When you pay per call we receive your public wallet address and the payment/settlement transaction signature, verified through a payment facilitator (Coinbase CDP and/or the public x402.org facilitator). We never receive, request, or store your private keys or seed phrase. The only token three.ws itself references is <code>$THREE</code>; USDC is used purely for settlement.</li>
<li><strong>OAuth-scoped access:</strong> when you connect via OAuth, the connector can read and write only the three.ws account data covered by the scopes you grant (avatars, agents, memory, profile). It cannot access your AI client's chat history, memory, or local files.</li>
<li><strong>Retention of tool inputs:</strong> tool-call inputs and outputs follow the usage-data retention in Section 5 (90 days), except content you explicitly save (e.g. a saved avatar), which is retained as account content until you delete it.</li>
@@ -133,18 +149,18 @@
<ul>
<li><strong>What we receive:</strong> only the text prompt you send. We do not ask for, receive, or store any name, email, wallet address, or other personal information through this endpoint.</li>
<li><strong>How the prompt is used:</strong> the prompt is forwarded to our generation provider (NVIDIA NIM / Microsoft TRELLIS) solely to produce the model. Do not include personal or confidential information in the prompt.</li>
- <li><strong>What we return:</strong> a public URL to the generated GLB model (hosted on our Cloudflare R2 CDN) and a link to view it. The response contains no account identifiers or personal data. Generated model files are served from public URLs so you can download and share them; treat a model URL as public.</li>
+ <li><strong>What we return:</strong> a public URL to the generated GLB model (hosted on our CDN) and a link to view it. The response contains no account identifiers or personal data. Generated model files are served from public URLs so you can download and share them; treat a model URL as public.</li>
<li><strong>Abuse prevention:</strong> requests are rate-limited by IP address, used only to prevent abuse of the free lane, and prompts are screened by an automated content-safety filter so the service stays appropriate for all ages.</li>
</ul>
<h2>11. Changes to This Policy</h2>
- <p>We may update this Privacy Policy. We will notify you of material changes by email or a prominent notice on the Service. The "Effective" date at the top reflects the most recent revision.</p>
+ <p>We may update this Privacy Policy. We will notify you of material changes by email or a prominent notice on the Service. The "Effective" date and version at the top reflect the most recent revision.</p>
<h2>12. Contact</h2>
<p>Privacy questions: <a href="mailto:[email protected]">[email protected]</a></p>
<hr>
- <p class="foot">three.ws &nbsp;·&nbsp; <a href="/legal/tos.html">Terms of Service</a> &nbsp;·&nbsp; <a href="/marketplace?tab=mine">Home</a></p>
+ <p class="foot">three.ws &nbsp;·&nbsp; <a href="/legal/tos">Terms of Service</a> &nbsp;·&nbsp; <a href="/legal/risk">Risk Disclosure</a> &nbsp;·&nbsp; <a href="/">Home</a></p>
</div>
<script src="/brand.js" defer></script>
</body>
diff --git a/public/legal/risk.html b/public/legal/risk.html
index a2be25fe4..b68b45d8f 100644
--- a/public/legal/risk.html
+++ b/public/legal/risk.html
@@ -67,6 +67,8 @@
<p>This Risk Disclosure ("Disclosure") applies to every feature of three.ws ("Service") that can move real money or real digital assets — including but not limited to agent wallets, trading, token sniping, automated strategies, autopilot, token launches, swaps, transfers, withdrawals, x402 payments, and fiat onramps ("Real-Funds Features"). Before first using a Real-Funds Feature you are asked to acknowledge this Disclosure. By accepting it, or by using any Real-Funds Feature, you agree to everything below.</p>
+ <p>Real-Funds Features are available only to users who are at least 18 years old and of legal age in their jurisdiction, as set out in the Eligibility section of the <a href="/legal/tos">Terms of Service</a>. This Disclosure is part of, and incorporated into, those Terms.</p>
+
<h2>1. Experimental software</h2>
<p>The Service is an ongoing experiment in agentic and on-chain software. It is provided <strong>"as is" and "as available"</strong>, without warranties of any kind, express or implied. Features may be incomplete, may change or disappear without notice, and may contain defects. A bug, outage, network failure, chain reorganization, RPC error, or third-party dependency failure can cause transactions to fail, execute unexpectedly, or result in loss of funds.</p>
diff --git a/public/legal/tos.html b/public/legal/tos.html
index 9e16b46c3..cc00fe073 100644
--- a/public/legal/tos.html
+++ b/public/legal/tos.html
@@ -27,6 +27,7 @@
a { color: #cccccc; }
hr { border: none; border-top: 1px solid #1e1e1e; margin: 48px 0; }
.foot { color: #555; font-size: 13px; }
+ .callout { border: 1px solid #2a2a2a; border-radius: 10px; padding: 14px 18px; background: #0a0a0a; }
</style>
<meta name="description" content="Terms of service for three.ws.">
@@ -47,68 +48,109 @@
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
<meta property="og:locale" content="en_US">
- <meta property="og:image:alt" content="Terms of Use — three.ws">
+ <meta property="og:image:alt" content="Terms of Use - three.ws">
<meta name="twitter:site" content="@trythreews">
</head>
<body>
<div class="wrap">
<a class="brand" href="/"><img src="/three.svg" alt="" class="header-logo" aria-hidden="true" />three.ws</a>
<h1>Terms of Service</h1>
- <p class="meta">Effective: April 27, 2026 &nbsp;·&nbsp; <a href="/legal/privacy.html">Privacy Policy</a></p>
+ <p class="meta">Effective: July 16, 2026 &nbsp;·&nbsp; Version 2 &nbsp;·&nbsp; <a href="/legal/privacy">Privacy Policy</a> &nbsp;·&nbsp; <a href="/legal/risk">Risk Disclosure</a></p>
- <p>These Terms of Service ("Terms") govern your access to and use of three.ws ("Service"), operated by three.ws ("we", "us", "our"). By accessing the Service you agree to be bound by these Terms. If you disagree, do not use the Service.</p>
+ <p>These Terms of Service ("Terms") govern your access to and use of three.ws and its subdomains, APIs, SDKs, MCP connectors, and applications (together, the "Service"), operated by the operator of three.ws ("three.ws", "we", "us", "our"). Please read them carefully.</p>
- <h2>1. Eligibility</h2>
- <p>You must be at least 13 years old to use the Service. If you are under 18, you represent that a parent or legal guardian has reviewed and agreed to these Terms on your behalf.</p>
+ <h2>1. Acceptance of These Terms</h2>
+ <p>You accept these Terms by any of the following: checking the agreement box when creating an account; signing a wallet sign-in message that references these Terms; clicking a button next to a notice that using the Service constitutes agreement; or continuing to use the Service after notice of updated Terms. We record the Terms version you accepted and when, and retain that record for the life of your account and as long as required for legal purposes.</p>
+ <p>If you do not agree to these Terms, do not use the Service.</p>
- <h2>2. Accounts</h2>
- <p>You may sign in using a blockchain wallet (EVM or Solana) or a username and password. You are responsible for keeping your credentials secure. We are not liable for losses resulting from unauthorized access to your account.</p>
+ <h2>2. Eligibility</h2>
+ <p>You must be at least 13 years old to use the Service. If you are under 18, you represent that a parent or legal guardian has reviewed and agreed to these Terms on your behalf, and you may not use Real-Funds Features (defined below).</p>
+ <p class="callout"><strong>You must be at least 18 years old, and of legal age in your jurisdiction, to use any Real-Funds Feature</strong>: any feature that can move real money or real digital assets, including agent wallets, trading, token sniping, automated strategies, autopilot, token launches, swaps, transfers, withdrawals, x402 payments, paid plans, and fiat onramps. By using a Real-Funds Feature you represent that you meet this requirement and that your use is lawful where you live.</p>
+
+ <h2>3. Accounts and Security</h2>
+ <p>You may sign in using a blockchain wallet (EVM or Solana), a username and password, an email one-time code, or single sign-on. You are responsible for safeguarding your credentials, wallet, and private keys. We never ask for, receive, or store your private keys or seed phrase. We are not liable for losses resulting from unauthorized access to your account or wallet that is not caused by our breach of these Terms.</p>
<p>We may suspend or terminate accounts that violate these Terms, at our sole discretion, with or without notice.</p>
- <h2>3. Acceptable Use</h2>
+ <h2>4. Acceptable Use</h2>
<p>You agree not to:</p>
<ul>
- <li>Upload content that is illegal, harmful, threatening, abusive, defamatory, or infringes any third-party rights.</li>
+ <li>Upload or generate content that is illegal, harmful, threatening, abusive, defamatory, or that infringes any third-party rights. See the <a href="/legal/content-policy">Content Policy</a> for the full rules.</li>
<li>Use the Service to transmit malware, spam, or unsolicited communications.</li>
<li>Attempt to gain unauthorized access to any part of the Service or its infrastructure.</li>
+ <li>Use the Service to violate any law, including securities, commodities, anti-money-laundering, and sanctions laws.</li>
<li>Reverse-engineer, decompile, or disassemble any part of the Service not covered by an open-source licence.</li>
<li>Use automated means to scrape, index, or harvest content without our prior written permission.</li>
<li>Resell, sublicence, or otherwise commercially exploit the Service beyond what is expressly permitted.</li>
</ul>
- <h2>4. 3D Content & Intellectual Property</h2>
+ <h2>5. Your Content and Intellectual Property</h2>
<p>You retain ownership of 3D models and other content you upload ("Your Content"). By uploading, you grant three.ws a worldwide, royalty-free, non-exclusive licence to store, display, and deliver Your Content solely to operate the Service.</p>
- <p>You represent and warrant that You have all rights necessary to grant this licence and that Your Content does not infringe any third-party intellectual property rights.</p>
- <p>We respect the DMCA. To submit a takedown notice, email <a href="mailto:[email protected]">[email protected]</a>.</p>
+ <p>You represent and warrant that you have all rights necessary to grant this licence and that Your Content does not infringe any third-party intellectual property rights.</p>
+ <p>We respect the DMCA. To submit a takedown notice, email <a href="mailto:[email protected]">[email protected]</a> with the information required by 17 U.S.C. § 512(c)(3). We will remove or disable access to material identified in valid notices, and we terminate the accounts of repeat infringers in appropriate circumstances.</p>
+
+ <h2>6. AI-Generated Content</h2>
+ <p>The Service generates 3D models, images, text, and other content using machine-learning systems. Generated output may be inaccurate, incomplete, or similar to output generated for others, and is provided without any warranty of originality, accuracy, or fitness for a particular purpose. You are responsible for reviewing generated content before relying on it or distributing it, and for your use of it complying with applicable law and third-party rights. Nothing generated by the Service is professional advice of any kind.</p>
- <h2>5. Crypto Payments & Plans</h2>
- <p>Paid plans are activated by on-chain cryptocurrency payments (EVM USDC or Solana USDC via Solana Pay). All payments are final and non-refundable once confirmed on-chain unless required by applicable law.</p>
- <p>Plan access is tied to the wallet address that made the payment. If you lose access to that wallet, we cannot recover your subscription; contact <a href="mailto:[email protected]">[email protected]</a> with on-chain proof of ownership.</p>
+ <h2>7. Plans and Crypto Payments</h2>
+ <p>Paid plans and paid features are activated by on-chain cryptocurrency payments (for example USDC on Solana or an EVM chain, or x402 per-call payments). All payments are final and non-refundable once confirmed on-chain unless required by applicable law.</p>
+ <p>Plan access is tied to the wallet address or account that made the payment. If you lose access to that wallet, we cannot recover your subscription; contact <a href="mailto:[email protected]">[email protected]</a> with on-chain proof of ownership.</p>
<p>We reserve the right to change plan pricing with 30 days' notice. Existing paid subscriptions will not be affected until renewal.</p>
- <h2>6. On-Chain Agent Identity</h2>
- <p>You may register on-chain agent identities (ERC-8004 on EVM, Metaplex NFTs on Solana). These registrations are immutable on their respective blockchains; three.ws cannot reverse or delete them. You are solely responsible for gas fees and any on-chain interactions.</p>
+ <h2>8. Real-Funds Features and Risk Disclosure</h2>
+ <p>The <a href="/legal/risk">Risk Disclosure</a> is part of these Terms and is incorporated by reference. Before first using a Real-Funds Feature you must acknowledge it. In summary, and without limiting it:</p>
+ <ul>
+ <li><strong>Total loss is possible.</strong> Digital assets are volatile and speculative; any amount you commit can be lost entirely, quickly, and permanently. Blockchain transactions are irreversible.</li>
+ <li><strong>Nothing on the Service is financial, investment, legal, accounting, or tax advice</strong>, or a recommendation to buy, sell, or hold any asset. We are not your broker, adviser, or fiduciary, and no fiduciary duty is created by your use of the Service.</li>
+ <li><strong>Autonomous features act on your instructions.</strong> Features you enable (autopilot, strategies, agent delegation) can transact on your behalf without asking again. You are responsible for what you enable and for monitoring it.</li>
+ <li><strong>Taxes are yours.</strong> You are solely responsible for determining and paying any taxes that apply to your transactions.</li>
+ </ul>
+
+ <h2>9. On-Chain Agent Identity</h2>
+ <p>You may register on-chain agent identities (for example ERC-8004 on EVM chains, or Metaplex NFTs on Solana). These registrations are immutable on their respective blockchains; three.ws cannot reverse or delete them. You are solely responsible for gas fees and any on-chain interactions.</p>
+
+ <h2>10. Third-Party Services</h2>
+ <p>The Service interoperates with third parties we do not control, including blockchain networks, wallet providers, payment facilitators, AI model providers, and data sources. Your use of a third-party service is governed by that party's terms, and we are not responsible for third-party services, their availability, or their output. On-chain and token metadata (names, symbols, descriptions) is third-party content, not our statement or endorsement.</p>
+
+ <h2>11. Sanctions and Export Controls</h2>
+ <p>You may not use the Service if you are located in, or are a resident or national of, any jurisdiction subject to comprehensive sanctions by the United States, or if you are listed on any U.S. government restricted-party list. You agree to comply with all applicable export-control and sanctions laws.</p>
+
+ <h2>12. Disclaimer of Warranties</h2>
+ <p>THE SERVICE IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, OR NON-INFRINGEMENT. WE DO NOT WARRANT THAT THE SERVICE WILL BE UNINTERRUPTED, ERROR-FREE, SECURE, OR FREE OF HARMFUL COMPONENTS, OR THAT ANY DIGITAL ASSET WILL RETAIN ANY VALUE.</p>
+
+ <h2>13. Limitation of Liability</h2>
+ <p>TO THE MAXIMUM EXTENT PERMITTED BY LAW, THREE.WS SHALL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, OR ANY LOSS OF PROFITS, REVENUE, DATA, DIGITAL ASSETS, GOODWILL, OR OTHER INTANGIBLE LOSSES, ARISING OUT OF OR RELATED TO YOUR USE OF THE SERVICE.</p>
+ <p>TO THE MAXIMUM EXTENT PERMITTED BY LAW, OUR TOTAL AGGREGATE LIABILITY FOR ALL CLAIMS ARISING OUT OF OR RELATED TO THE SERVICE SHALL NOT EXCEED THE GREATER OF (A) THE AMOUNTS YOU PAID US FOR THE SERVICE IN THE TWELVE MONTHS BEFORE THE EVENT GIVING RISE TO THE CLAIM, OR (B) ONE HUNDRED U.S. DOLLARS (US$100).</p>
+ <p>Some jurisdictions do not allow certain limitations of liability, so some of the above may not apply to you.</p>
+
+ <h2>14. Indemnification</h2>
+ <p>You agree to indemnify and hold harmless three.ws and its operator, officers, directors, employees, and agents from any claims, liabilities, damages, judgments, and expenses (including reasonable attorneys' fees) arising from your violation of these Terms, Your Content, or your use of the Service.</p>
- <h2>7. Disclaimer of Warranties</h2>
- <p>THE SERVICE IS PROVIDED "AS IS" WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. WE DO NOT WARRANT THAT THE SERVICE WILL BE UNINTERRUPTED, ERROR-FREE, OR FREE OF HARMFUL COMPONENTS.</p>
+ <h2>15. Dispute Resolution: Informal Resolution, Arbitration, and Class Action Waiver</h2>
+ <p><strong>Please read this section carefully. It affects your rights.</strong></p>
+ <p><strong>Informal resolution first.</strong> Before filing a claim, you agree to email <a href="mailto:[email protected]">[email protected]</a> with a description of the dispute and give us 60 days to try to resolve it informally. Most disputes can be resolved this way.</p>
+ <p><strong>Binding arbitration.</strong> Except for the carve-outs below, any dispute arising out of or relating to these Terms or the Service that is not resolved informally shall be resolved by binding individual arbitration administered by the American Arbitration Association under its Consumer Arbitration Rules. The arbitration will be conducted in English, by videoconference or by written submissions where the rules allow, and judgment on the award may be entered in any court of competent jurisdiction.</p>
+ <p><strong>Carve-outs.</strong> Either party may bring an individual claim in small-claims court, and either party may seek injunctive or other equitable relief in court for infringement or misuse of intellectual property or for unauthorized access to the Service.</p>
+ <p><strong>Class action waiver.</strong> TO THE MAXIMUM EXTENT PERMITTED BY LAW, ALL DISPUTES SHALL BE RESOLVED ON AN INDIVIDUAL BASIS ONLY. NEITHER YOU NOR WE MAY BRING A CLAIM AS A PLAINTIFF OR CLASS MEMBER IN A CLASS, CONSOLIDATED, OR REPRESENTATIVE ACTION, AND THE ARBITRATOR MAY NOT CONSOLIDATE PROCEEDINGS OR PRESIDE OVER ANY FORM OF REPRESENTATIVE PROCEEDING.</p>
+ <p><strong>Opt-out.</strong> You may opt out of this arbitration agreement and class action waiver by emailing <a href="mailto:[email protected]">[email protected]</a> within 30 days of first accepting these Terms, stating your account identifier (username, email, or wallet address) and that you opt out of arbitration. Opting out does not affect any other part of these Terms.</p>
+ <p><strong>Severability of this section.</strong> If the class action waiver is found unenforceable as to a particular claim, that claim (and only that claim) shall proceed in court rather than arbitration, and the waiver shall remain in effect for all other claims. If this entire section is found unenforceable, Section 16 governs where disputes are heard.</p>
- <h2>8. Limitation of Liability</h2>
- <p>TO THE MAXIMUM EXTENT PERMITTED BY LAW, THREE.WS SHALL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, OR ANY LOSS OF PROFITS, REVENUE, DATA, GOODWILL, OR OTHER INTANGIBLE LOSSES, ARISING OUT OF OR RELATED TO YOUR USE OF THE SERVICE.</p>
+ <h2>16. Governing Law and Venue</h2>
+ <p>These Terms are governed by the laws of the State of Delaware, USA, without regard to its conflict-of-law provisions. Subject to Section 15, any disputes shall be resolved exclusively in the state or federal courts located in Delaware, and you consent to their jurisdiction. Nothing in this section deprives you of mandatory consumer protections of the jurisdiction where you live.</p>
- <h2>9. Indemnification</h2>
- <p>You agree to indemnify and hold harmless three.ws and its officers, directors, employees, and agents from any claims, liabilities, damages, judgments, and expenses arising from your violation of these Terms or your use of the Service.</p>
+ <h2>17. Termination</h2>
+ <p>You may stop using the Service and delete your account at any time. We may suspend or terminate your access at any time for violation of these Terms or where required by law. On termination, sections that by their nature should survive (including Sections 5, 8, and 12 through 16) survive. Termination does not affect on-chain records, which we cannot alter.</p>
- <h2>10. Governing Law</h2>
- <p>These Terms are governed by the laws of the State of Delaware, USA, without regard to its conflict-of-law provisions. Any disputes shall be resolved exclusively in the state or federal courts located in Delaware.</p>
+ <h2>18. Changes to These Terms</h2>
+ <p>We may update these Terms. Each version carries a version number and effective date at the top. We will notify you of material changes by posting a notice on the Service or by email, and your acceptance of the new version is recorded the next time you sign in or create an account. Your continued use after the effective date constitutes acceptance of the updated Terms.</p>
- <h2>11. Changes to These Terms</h2>
- <p>We may update these Terms at any time. We will notify you of material changes by posting a notice on the Service or by email. Your continued use after the effective date constitutes acceptance of the updated Terms.</p>
+ <h2>19. Miscellaneous</h2>
+ <p>These Terms, together with the <a href="/legal/privacy">Privacy Policy</a>, the <a href="/legal/risk">Risk Disclosure</a>, and the <a href="/legal/content-policy">Content Policy</a>, are the entire agreement between you and three.ws regarding the Service. If any provision is found unenforceable, the remainder stays in effect. Our failure to enforce a provision is not a waiver. You may not assign these Terms without our consent; we may assign them in connection with a merger, acquisition, or sale of assets, with notice to you. We are not liable for delay or failure caused by events beyond our reasonable control.</p>
- <h2>12. Contact</h2>
+ <h2>20. Contact</h2>
<p>Questions? Email <a href="mailto:[email protected]">[email protected]</a>.</p>
<hr>
- <p class="foot">three.ws &nbsp;·&nbsp; <a href="/legal/privacy.html">Privacy Policy</a> &nbsp;·&nbsp; <a href="/">Home</a></p>
+ <p class="foot">three.ws &nbsp;·&nbsp; <a href="/legal/privacy">Privacy Policy</a> &nbsp;·&nbsp; <a href="/legal/risk">Risk Disclosure</a> &nbsp;·&nbsp; <a href="/legal/content-policy">Content Policy</a> &nbsp;·&nbsp; <a href="/">Home</a></p>
</div>
<script src="/brand.js" defer></script>
</body>
diff --git a/public/login.html b/public/login.html
index 9d0b7c392..43fac4311 100644
--- a/public/login.html
+++ b/public/login.html
@@ -236,6 +236,15 @@
font-size: 13px;
color: #666;
}
+ .signin-legal {
+ margin-top: 10px;
+ text-align: center;
+ font-size: 11px;
+ line-height: 1.55;
+ color: #555;
+ }
+ .signin-legal a { color: #888; }
+ .signin-legal a:hover { color: #ccc; }
.brand {
margin: 0 0 18px;
text-decoration: none;
@@ -676,6 +685,7 @@
</div>
<p class="foot">No account? <a href="/register">Create one</a></p>
+ <p class="signin-legal">By signing in (with a password, Privy, SSO, or a connected wallet) you agree to the <a href="/legal/tos" target="_blank" rel="noopener">Terms of Service</a> and <a href="/legal/privacy" target="_blank" rel="noopener">Privacy Policy</a>.</p>
</form>
<div class="panel">
<a href="/" class="panel-brand" aria-label="three.ws home">three.ws</a>
@@ -1136,7 +1146,10 @@
method: 'POST',
credentials: 'include',
headers: loginHeaders,
- body: JSON.stringify({ email, password, remember: document.getElementById('remember')?.checked || false }),
+ // tosAccepted: the sign-in-wrap notice under the form ("By signing
+ // in you agree…") makes each sign-in an affirmation of the current
+ // Terms; the server re-stamps the user's accepted version.
+ body: JSON.stringify({ email, password, remember: document.getElementById('remember')?.checked || false, tosAccepted: true }),
signal: loginTimeout.signal,
});
} catch (err) {
diff --git a/public/register.html b/public/register.html
index 0194d7b1c..c78ffde38 100644
--- a/public/register.html
+++ b/public/register.html
@@ -245,6 +245,31 @@
font-size: 11px;
color: #555;
}
+ .legal a { color: #888; }
+ .tos-row {
+ display: flex;
+ align-items: flex-start;
+ gap: 8px;
+ margin: 14px 0 12px;
+ font-size: 12.5px;
+ line-height: 1.5;
+ color: #999;
+ cursor: pointer;
+ }
+ .tos-row input[type='checkbox'] {
+ width: 15px;
+ height: 15px;
+ margin: 2px 0 0;
+ flex: none;
+ accent-color: #7c8cff;
+ cursor: pointer;
+ }
+ .tos-row a { color: #ccc; }
+ .tos-row a:hover { color: #fff; }
+ .tos-row input[type='checkbox']:focus-visible {
+ outline: 2px solid #7c8cff;
+ outline-offset: 2px;
+ }
.brand {
font-size: 12px;
letter-spacing: 0.1em;
@@ -551,6 +576,10 @@
<p class="caps-warn" id="caps-warn">Caps Lock is on</p>
<div class="strength-bar"><div class="strength-fill" id="strength-fill"></div></div>
<p class="strength-label" id="strength-label">Minimum 10 characters</p>
+ <label class="tos-row" for="tos-accept">
+ <input id="tos-accept" name="tos-accept" type="checkbox" required aria-describedby="err" />
+ <span>I have read and agree to the <a href="/legal/tos" target="_blank" rel="noopener">Terms of Service</a> and <a href="/legal/privacy" target="_blank" rel="noopener">Privacy Policy</a>.</span>
+ </label>
<button id="submit" type="submit">Create account</button>
<div class="err" id="err" role="alert" aria-live="polite"></div>
@@ -577,7 +606,7 @@
</div>
<p class="foot">Already have an account? <a href="/login">Sign in</a></p>
- <p class="legal">By creating an account you agree to our <a href="/legal/tos">Terms of Service</a> and <a href="/legal/privacy">Privacy Policy</a>.</p>
+ <p class="legal">By creating an account (including with Privy or a connected wallet) you agree to the <a href="/legal/tos" target="_blank" rel="noopener">Terms of Service</a> and <a href="/legal/privacy" target="_blank" rel="noopener">Privacy Policy</a>.</p>
</form>
<div class="panel">
<a href="/" class="panel-brand" aria-label="three.ws home"><img src="/three.svg" alt="" class="header-logo" aria-hidden="true" />three.ws</a>
@@ -831,6 +860,10 @@
body: JSON.stringify({
username: document.getElementById('username').value,
password: document.getElementById('password').value,
+ // Clickwrap: the required checkbox above the submit button.
+ // Native form validation blocks submit until it is checked,
+ // and the server rejects account creation without it.
+ tosAccepted: document.getElementById('tos-accept').checked === true,
}),
});
const data = await res.json().catch(() => ({}));
diff --git a/public/wallet/connect-button-solana.js b/public/wallet/connect-button-solana.js
index 967b044ef..5e28c1c82 100644
--- a/public/wallet/connect-button-solana.js
+++ b/public/wallet/connect-button-solana.js
@@ -51,7 +51,7 @@ function buildSiwsMessage(address, nonce, { domain, uri, issuedAt, expirationTim
`${domain} wants you to sign in with your Solana account:`,
address,
'',
- 'Sign in to three.ws. This request will not trigger any blockchain transaction or cost any fees.',
+ 'Sign in to three.ws. This request will not trigger any blockchain transaction or cost any fees. By signing, you agree to the Terms of Service (https://three.ws/legal/tos) and Privacy Policy (https://three.ws/legal/privacy).',
'',
`URI: ${uri}`,
'Version: 1',
@@ -160,7 +160,9 @@ export class SolanaWalletController extends EventTarget {
method: 'POST',
credentials: 'include',
headers: { 'content-type': 'application/json', 'x-csrf-token': csrf },
- body: JSON.stringify({ message, signature: sigBase64 }),
+ // tosAccepted: the signed statement carries the agreement; the flag
+ // tells the server to stamp acceptance on the user record.
+ body: JSON.stringify({ message, signature: sigBase64, tosAccepted: true }),
});
const data = await verifyRes.json();
if (!verifyRes.ok) throw new Error(data.error_description || 'Verification failed');
diff --git a/public/wallet/connect-button.js b/public/wallet/connect-button.js
index 99f5fc5b3..6f81fb182 100644
--- a/public/wallet/connect-button.js
+++ b/public/wallet/connect-button.js
@@ -39,7 +39,7 @@ function defaultMessageBuilder(address, chainId, nonce, { domain, uri, issuedAt,
`${domain} wants you to sign in with your Ethereum account:`,
address,
'',
- 'Sign in to three.ws. This does not cost anything and proves wallet ownership.',
+ 'Sign in to three.ws. This does not cost anything and proves wallet ownership. By signing, you agree to the Terms of Service (https://three.ws/legal/tos) and Privacy Policy (https://three.ws/legal/privacy).',
'',
`URI: ${uri}`,
'Version: 1',
@@ -272,7 +272,9 @@ export class ConnectWalletController extends EventTarget {
method: 'POST',
credentials: 'include',
headers: { 'content-type': 'application/json', 'x-csrf-token': csrf },
- body: JSON.stringify({ message, signature }),
+ // tosAccepted: the signed statement carries the agreement; the flag
+ // tells the server to stamp acceptance on the user record.
+ body: JSON.stringify({ message, signature, tosAccepted: true }),
});
const data = await verifyRes.json();
if (!verifyRes.ok) throw new Error(data.error_description || 'Verification failed');
diff --git a/sdk/src/solana.js b/sdk/src/solana.js
index ea2724e79..2dc25ee43 100644
--- a/sdk/src/solana.js
+++ b/sdk/src/solana.js
@@ -59,7 +59,7 @@ export async function signInWithSolana({
const message = [
`${domain} wants you to sign in with your Solana account:`,
address, '',
- 'Sign in to three.ws. This request will not trigger any transaction.',
+ 'Sign in to three.ws. This request will not trigger any transaction. By signing, you agree to the Terms of Service (https://three.ws/legal/tos) and Privacy Policy (https://three.ws/legal/privacy).',
'',
`URI: ${uri}`, 'Version: 1', `Chain ID: ${chainId}`,
`Nonce: ${nonce}`, `Issued At: ${issuedAt}`, `Expiration Time: ${expirationTime}`,
@@ -73,7 +73,9 @@ export async function signInWithSolana({
method: 'POST',
credentials: 'include',
headers: { 'content-type': 'application/json', 'x-csrf-token': csrf },
- body: JSON.stringify({ message, signature: sigBase64 }),
+ // tosAccepted: the signed statement carries the agreement; the flag
+ // tells the server to stamp acceptance on the user record.
+ body: JSON.stringify({ message, signature: sigBase64, tosAccepted: true }),
});
const data = await verifyRes.json().catch(() => ({}));
if (!verifyRes.ok) throw new Error(data.error_description || 'SIWS verification failed');
diff --git a/src/auth/email-auth.js b/src/auth/email-auth.js
index 5a0c1bc68..6629e8f58 100644
--- a/src/auth/email-auth.js
+++ b/src/auth/email-auth.js
@@ -25,7 +25,10 @@ export async function signInWithEmail(emailOrUsername, password) {
method: 'POST',
credentials: 'include',
headers: { 'content-type': 'application/json' },
- body: JSON.stringify({ email: emailOrUsername, password }),
+ // tosAccepted: every surface that mounts this sign-in shows the
+ // "By signing in you agree…" notice, so each sign-in re-affirms the
+ // current Terms and the server re-stamps the accepted version.
+ body: JSON.stringify({ email: emailOrUsername, password, tosAccepted: true }),
});
const data = await res.json().catch(() => ({}));
if (!res.ok) {
@@ -40,9 +43,15 @@ export async function signInWithEmail(emailOrUsername, password) {
* Register a new account with email and password (no wallet needed).
* Creates a session immediately — the user is signed in on success.
*
+ * Clickwrap contract: the server rejects registration without tosAccepted,
+ * so every surface that calls this MUST display the Terms of Service and
+ * Privacy Policy agreement (checkbox or "By creating an account you agree…"
+ * notice adjacent to the submit control) and pass `tosAccepted: true` only
+ * after showing it.
+ *
* @param {string} email
* @param {string} password
- * @param {{ displayName?: string, referralCode?: string }} [opts]
+ * @param {{ displayName?: string, referralCode?: string, tosAccepted?: boolean }} [opts]
* @returns {Promise<{ user: object }>}
*/
export async function registerWithEmail(email, password, opts = {}) {
@@ -53,6 +62,7 @@ export async function registerWithEmail(email, password, opts = {}) {
body: JSON.stringify({
email,
password,
+ tosAccepted: opts.tosAccepted === true,
...(opts.displayName ? { display_name: opts.displayName } : {}),
...(opts.referralCode ? { referralCode: opts.referralCode } : {}),
}),
diff --git a/src/auth/walletconnect-bridge.js b/src/auth/walletconnect-bridge.js
index 1bd29d9be..a47d308e3 100644
--- a/src/auth/walletconnect-bridge.js
+++ b/src/auth/walletconnect-bridge.js
@@ -104,7 +104,7 @@ export async function signInWithWalletConnect({ projectId, chains } = {}) {
`${domain} wants you to sign in with your Ethereum account:`,
address,
'',
- 'Sign in to three.ws.',
+ 'Sign in to three.ws. By signing, you agree to the Terms of Service (https://three.ws/legal/tos) and Privacy Policy (https://three.ws/legal/privacy).',
'',
`URI: ${uri}`,
'Version: 1',
@@ -131,7 +131,9 @@ export async function signInWithWalletConnect({ projectId, chains } = {}) {
method: 'POST',
credentials: 'include',
headers: { 'content-type': 'application/json' },
- body: JSON.stringify({ message, signature }),
+ // tosAccepted: the signed statement carries the agreement; the flag
+ // tells the server to stamp acceptance on the user record.
+ body: JSON.stringify({ message, signature, tosAccepted: true }),
});
result = await vr.json();
if (!vr.ok) throw new Error(result.error_description || `HTTP ${vr.status}`);
diff --git a/src/aws-marketplace-welcome.js b/src/aws-marketplace-welcome.js
index 0ee157134..4307f7d9f 100644
--- a/src/aws-marketplace-welcome.js
+++ b/src/aws-marketplace-welcome.js
@@ -212,7 +212,14 @@ async function handleSignup(e) {
method: 'POST',
credentials: 'include',
headers: { 'content-type': 'application/json' },
- body: JSON.stringify({ email, password }),
+ // Clickwrap: the required checkbox in the signup form (welcome.html).
+ // Native form validation blocks submit until it is checked, and the
+ // server rejects account creation without it.
+ body: JSON.stringify({
+ email,
+ password,
+ tosAccepted: document.getElementById('su-tos')?.checked === true,
+ }),
});
const data = await resp.json().catch(() => ({}));
if (!resp.ok) throw new Error(data.error || data.message || 'Registration failed');
@@ -240,7 +247,9 @@ async function handleSignin(e) {
method: 'POST',
credentials: 'include',
headers: { 'content-type': 'application/json' },
- body: JSON.stringify({ email, password }),
+ // tosAccepted: the sign-in form shows the "By signing in you agree…"
+ // notice; each sign-in re-affirms the current Terms.
+ body: JSON.stringify({ email, password, tosAccepted: true }),
});
const data = await resp.json().catch(() => ({}));
if (!resp.ok) throw new Error(data.error || data.message || 'Sign in failed');
diff --git a/src/onchain/adapters/solana.js b/src/onchain/adapters/solana.js
index d526a17f6..e63fb63e0 100644
--- a/src/onchain/adapters/solana.js
+++ b/src/onchain/adapters/solana.js
@@ -219,7 +219,7 @@ export class SolanaAdapter {
`${domain} wants you to sign in with your Solana account:`,
this.#address,
'',
- 'Link this wallet to deploy your agent on Solana. No fees, no transaction.',
+ 'Link this wallet to deploy your agent on Solana. No fees, no transaction. By signing, you agree to the Terms of Service (https://three.ws/legal/tos) and Privacy Policy (https://three.ws/legal/privacy).',
'',
`URI: ${uri}`,
'Version: 1',
@@ -247,7 +247,9 @@ export class SolanaAdapter {
method: 'POST',
credentials: 'include',
headers: { 'content-type': 'application/json', 'x-csrf-token': csrf },
- body: JSON.stringify({ message, signature: toBase64(sig) }),
+ // tosAccepted: the signed statement carries the agreement; the flag
+ // tells the server to stamp acceptance on the user record.
+ body: JSON.stringify({ message, signature: toBase64(sig), tosAccepted: true }),
});
if (!verifyRes.ok) {
const data = await verifyRes.json().catch(() => ({}));
diff --git a/src/privy-login.js b/src/privy-login.js
index 11eb7037d..8b6f96e9e 100644
--- a/src/privy-login.js
+++ b/src/privy-login.js
@@ -114,7 +114,9 @@ async function verifyWithBackend(identity_token) {
method: 'POST',
credentials: 'include',
headers: { 'content-type': 'application/json' },
- body: JSON.stringify({ token: identity_token }),
+ // tosAccepted: the login/register pages show the agreement notice next
+ // to the Privy controls, so completing the flow affirms the Terms.
+ body: JSON.stringify({ token: identity_token, tosAccepted: true }),
});
const data = await res.json().catch(() => ({}));
if (!res.ok) throw new Error(data.error_description || 'Sign-in failed.');
@@ -376,7 +378,7 @@ function mountPrivyUI(privy, captchaConfigPromise) {
`${domain} wants you to sign in with your Solana account:`,
address,
'',
- 'Sign in to three.ws. This request will not trigger any blockchain transaction or cost any fees.',
+ 'Sign in to three.ws. This request will not trigger any blockchain transaction or cost any fees. By signing, you agree to the Terms of Service (https://three.ws/legal/tos) and Privacy Policy (https://three.ws/legal/privacy).',
'',
`URI: ${uri}`,
'Version: 1',
@@ -399,7 +401,9 @@ function mountPrivyUI(privy, captchaConfigPromise) {
method: 'POST',
credentials: 'include',
headers: { 'content-type': 'application/json', 'x-csrf-token': csrf },
- body: JSON.stringify({ message, signature }),
+ // tosAccepted: the signed statement carries the agreement; the flag
+ // tells the server to stamp acceptance on the user record.
+ body: JSON.stringify({ message, signature, tosAccepted: true }),
});
const data = await verifyRes.json().catch(() => ({}));
if (!verifyRes.ok) throw new Error(data.error_description || 'Sign-in failed.');
diff --git a/src/wallet-auth.js b/src/wallet-auth.js
index fec13579d..4d15fa422 100644
--- a/src/wallet-auth.js
+++ b/src/wallet-auth.js
@@ -49,7 +49,7 @@ export async function signInWithWallet() {
`${location.host} wants you to sign in with your Ethereum account:`,
address,
'',
- 'Sign in to three.ws.',
+ 'Sign in to three.ws. By signing, you agree to the Terms of Service (https://three.ws/legal/tos) and Privacy Policy (https://three.ws/legal/privacy).',
'',
`URI: ${location.origin}`,
'Version: 1',
@@ -67,7 +67,10 @@ export async function signInWithWallet() {
'content-type': 'application/json',
'x-csrf-token': csrf,
},
- body: JSON.stringify({ message, signature }),
+ // tosAccepted: the signed statement above carries the agreement, so the
+ // signature itself is the acceptance evidence; the flag tells the server
+ // to stamp it on the user record.
+ body: JSON.stringify({ message, signature, tosAccepted: true }),
});
const data = await verifyRes.json().catch(() => ({}));
diff --git a/src/wallet/connect-button.js b/src/wallet/connect-button.js
index c791ff3f7..ef99f1ace 100644
--- a/src/wallet/connect-button.js
+++ b/src/wallet/connect-button.js
@@ -55,7 +55,7 @@ function defaultMessageBuilder(address, chainId, nonce, { domain, uri, issuedAt,
`${domain} wants you to sign in with your Ethereum account:`,
address,
'',
- 'Sign in to three.ws. This does not cost anything and proves wallet ownership.',
+ 'Sign in to three.ws. This does not cost anything and proves wallet ownership. By signing, you agree to the Terms of Service (https://three.ws/legal/tos) and Privacy Policy (https://three.ws/legal/privacy).',
'',
`URI: ${uri}`,
'Version: 1',
@@ -351,7 +351,9 @@ export class ConnectWalletController extends EventTarget {
method: 'POST',
credentials: 'include',
headers: { 'content-type': 'application/json', 'x-csrf-token': csrf },
- body: JSON.stringify({ message, signature }),
+ // tosAccepted: the signed statement carries the agreement; the flag
+ // tells the server to stamp acceptance on the user record.
+ body: JSON.stringify({ message, signature, tosAccepted: true }),
});
const data = await verifyRes.json();
if (!verifyRes.ok) throw new Error(data.error_description || 'Verification failed');
diff --git a/tests/api/auth-email.test.js b/tests/api/auth-email.test.js
index 8b235099f..ba261bf9d 100644
--- a/tests/api/auth-email.test.js
+++ b/tests/api/auth-email.test.js
@@ -212,7 +212,7 @@ describe('POST /api/auth/register', () => {
sqlState.queue.push([{ id: 'user-new', display_name: 'Bob', plan: 'free', created_at: '2024-01-01' }]);
const { status, body, res } = await invoke({
action: 'register',
- body: { email: '[email protected]', password: 'supersecret123', display_name: 'Bob' },
+ body: { email: '[email protected]', password: 'supersecret123', display_name: 'Bob', tosAccepted: true },
});
expect(status).toBe(201);
expect(body.user).toBeDefined();
@@ -221,11 +221,46 @@ describe('POST /api/auth/register', () => {
expect(cookie).toContain('__Host-sid=test-session-token-abc');
});
+ it('rejects registration without Terms acceptance (clickwrap gate)', async () => {
+ const { status, body } = await invoke({
+ action: 'register',
+ body: { email: '[email protected]', password: 'supersecret123' },
+ });
+ expect(status).toBe(400);
+ expect(body.error).toBe('tos_required');
+ // The gate must fire before any user row can be created.
+ const inserts = sqlState.calls.filter((c) => /insert into users/.test(c.query));
+ expect(inserts).toHaveLength(0);
+ });
+
+ it('rejects a non-boolean tosAccepted (must be literal true)', async () => {
+ const { status, body } = await invoke({
+ action: 'register',
+ body: { email: '[email protected]', password: 'supersecret123', tosAccepted: 'yes' },
+ });
+ expect(status).toBe(400);
+ expect(body.error).toBe('tos_required');
+ });
+
+ it('stamps the accepted Terms version on the new user', async () => {
+ sqlState.queue.push([]); // no existing user
+ sqlState.queue.push([{ id: 'user-new', display_name: 'Bob', plan: 'free', created_at: '2024-01-01' }]);
+ await invoke({
+ action: 'register',
+ body: { email: '[email protected]', password: 'supersecret123', tosAccepted: true },
+ });
+ // recordTosAcceptance is fire-and-forget (queueMicrotask); flush it.
+ await new Promise((resolve) => setImmediate(resolve));
+ const stamps = sqlState.calls.filter((c) => /update users\s+set tos_accepted_version/.test(c.query));
+ expect(stamps).toHaveLength(1);
+ expect(stamps[0].values).toContain('user-new');
+ });
+
it('returns 409 when email is already registered', async () => {
sqlState.queue.push([{ id: 'existing-user' }]); // existing user found
const { status, body } = await invoke({
action: 'register',
- body: { email: '[email protected]', password: 'supersecret123' },
+ body: { email: '[email protected]', password: 'supersecret123', tosAccepted: true },
});
expect(status).toBe(409);
expect(body.error).toBe('conflict');
@@ -234,7 +269,7 @@ describe('POST /api/auth/register', () => {
it('returns 400 for short password (< 10 chars)', async () => {
const { status, body } = await invoke({
action: 'register',
- body: { email: '[email protected]', password: 'short' },
+ body: { email: '[email protected]', password: 'short', tosAccepted: true },
});
expect(status).toBe(400);
expect(body.error).toBeDefined();
@@ -269,7 +304,7 @@ describe('POST /api/auth/register', () => {
const { status, body } = await invoke({
action: 'register',
- body: { email: '[email protected]', password: 'supersecret123', display_name: 'Carol' },
+ body: { email: '[email protected]', password: 'supersecret123', display_name: 'Carol', tosAccepted: true },
});
expect(status).toBe(201);
@@ -294,7 +329,7 @@ describe('POST /api/auth/register', () => {
const { status, body } = await invoke({
action: 'register',
- body: { email: '[email protected]', password: 'supersecret123', display_name: 'Dora' },
+ body: { email: '[email protected]', password: 'supersecret123', display_name: 'Dora', tosAccepted: true },
});
expect(status).toBe(500);
diff --git a/tests/api/legal-tos-ack.test.js b/tests/api/legal-tos-ack.test.js
new file mode 100644
index 000000000..1dd76e891
--- /dev/null
+++ b/tests/api/legal-tos-ack.test.js
@@ -0,0 +1,157 @@
+// Terms of Service acceptance: the shared helper (api/_lib/legal.js) and the
+// re-acceptance endpoint (POST /api/legal/tos-ack). The auth-flow recording
+// (register / login) is covered in auth-email.test.js.
+
+import { describe, it, expect, beforeEach, vi } from 'vitest';
+import { Readable } from 'node:stream';
+
+process.env.PUBLIC_APP_ORIGIN ||= 'https://app.test';
+process.env.JWT_SECRET ||= 'test-legal-tos-secret-at-least-32ch';
+
+// ── Mocks ─────────────────────────────────────────────────────────────────────
+
+const sqlState = { queue: [], calls: [] };
+
+vi.mock('../../api/_lib/db.js', () => ({
+ sql: vi.fn(async (strings, ...values) => {
+ sqlState.calls.push({ query: strings.join('?'), values });
+ if (sqlState.queue.length === 0) return [];
+ const next = sqlState.queue.shift();
+ if (next instanceof Error) throw next;
+ return next;
+ }),
+ isDbUnavailableError: () => false,
+ isDbCapacityError: () => false,
+}));
+
+const rlState = { success: true };
+
+vi.mock('../../api/_lib/rate-limit.js', () => ({
+ limits: {
+ publicIp: vi.fn(async () => ({ success: rlState.success })),
+ },
+ clientIp: () => '127.0.0.1',
+}));
+
+const sessionState = { user: null };
+
+vi.mock('../../api/_lib/auth.js', () => ({
+ getSessionUser: vi.fn(async () => sessionState.user),
+}));
+
+const { TOS_VERSION, tosAcceptanceFromBody } = await import('../../api/_lib/legal.js');
+const { default: handler } = await import('../../api/legal/tos-ack.js');
+
+// ── Helpers ───────────────────────────────────────────────────────────────────
+
+function makeReq(body = null) {
+ const bodyStr = body ? JSON.stringify(body) : '';
+ const req = Readable.from([Buffer.from(bodyStr)]);
+ req.method = 'POST';
+ req.url = '/api/legal/tos-ack';
+ req.headers = {
+ host: 'app.test',
+ ...(body !== null ? { 'content-type': 'application/json' } : {}),
+ };
+ return req;
+}
+
+function makeRes() {
+ return {
+ statusCode: 200,
+ headers: {},
+ body: '',
+ writableEnded: false,
+ setHeader(k, v) { this.headers[k.toLowerCase()] = v; },
+ getHeader(k) { return this.headers[k.toLowerCase()]; },
+ end(chunk) {
+ if (chunk !== undefined) this.body += chunk;
+ this.writableEnded = true;
+ },
+ };
+}
+
+async function invoke(body) {
+ const req = makeReq(body);
+ const res = makeRes();
+ await handler(req, res);
+ // logAudit and the users-table stamp are fire-and-forget microtasks; flush
+ // them so assertions can see the resulting sql calls.
+ await new Promise((resolve) => setImmediate(resolve));
+ let json = null;
+ try { json = JSON.parse(res.body); } catch { json = res.body; }
+ return { res, status: res.statusCode, body: json };
+}
+
+beforeEach(() => {
+ sqlState.queue = [];
+ sqlState.calls = [];
+ rlState.success = true;
+ sessionState.user = null;
+});
+
+// ── tosAcceptanceFromBody ─────────────────────────────────────────────────────
+
+describe('tosAcceptanceFromBody', () => {
+ it('returns null when acceptance is absent or not literal true', () => {
+ expect(tosAcceptanceFromBody({})).toBeNull();
+ expect(tosAcceptanceFromBody(null)).toBeNull();
+ expect(tosAcceptanceFromBody({ tosAccepted: false })).toBeNull();
+ expect(tosAcceptanceFromBody({ tosAccepted: 'true' })).toBeNull();
+ expect(tosAcceptanceFromBody({ tosAccepted: 1 })).toBeNull();
+ });
+
+ it('defaults to the current version when none is sent', () => {
+ expect(tosAcceptanceFromBody({ tosAccepted: true })).toEqual({ version: TOS_VERSION });
+ });
+
+ it('accepts a valid explicit version', () => {
+ expect(tosAcceptanceFromBody({ tosAccepted: true, tosVersion: 1 })).toEqual({ version: 1 });
+ });
+
+ it('clamps out-of-range or garbage versions to the current one', () => {
+ expect(tosAcceptanceFromBody({ tosAccepted: true, tosVersion: 0 })).toEqual({ version: TOS_VERSION });
+ expect(tosAcceptanceFromBody({ tosAccepted: true, tosVersion: TOS_VERSION + 5 })).toEqual({ version: TOS_VERSION });
+ expect(tosAcceptanceFromBody({ tosAccepted: true, tosVersion: 'nine' })).toEqual({ version: TOS_VERSION });
+ expect(tosAcceptanceFromBody({ tosAccepted: true, tosVersion: 1.5 })).toEqual({ version: TOS_VERSION });
+ });
+});
+
+// ── POST /api/legal/tos-ack ───────────────────────────────────────────────────
+
+describe('POST /api/legal/tos-ack', () => {
+ it('records an anonymous acceptance in the audit log only', async () => {
+ const { status, body } = await invoke({ context: 'register-page', path: '/register' });
+ expect(status).toBe(200);
+ expect(body).toEqual({ ok: true, version: TOS_VERSION });
+ const audits = sqlState.calls.filter((c) => /insert into audit_log/.test(c.query));
+ expect(audits).toHaveLength(1);
+ expect(audits[0].values).toContain('tos-accept');
+ const stamps = sqlState.calls.filter((c) => /update users/.test(c.query));
+ expect(stamps).toHaveLength(0);
+ });
+
+ it('stamps the user row when signed in', async () => {
+ sessionState.user = { id: 'user-9' };
+ const { status, body } = await invoke({});
+ expect(status).toBe(200);
+ expect(body.ok).toBe(true);
+ const stamps = sqlState.calls.filter((c) => /update users\s+set tos_accepted_version/.test(c.query));
+ expect(stamps).toHaveLength(1);
+ expect(stamps[0].values).toContain('user-9');
+ const audits = sqlState.calls.filter((c) => /insert into audit_log/.test(c.query));
+ expect(audits).toHaveLength(1);
+ });
+
+ it('rejects a version that does not exist', async () => {
+ const { status, body } = await invoke({ version: TOS_VERSION + 1 });
+ expect(status).toBe(400);
+ expect(body.error).toBe('invalid_version');
+ });
+
+ it('rate limits', async () => {
+ rlState.success = false;
+ const { status } = await invoke({});
+ expect(status).toBe(429);
+ });
+});