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(knock): put the escrowed lane in front of the people who use it

nirholas5299e4ba3d9d
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e98b39d2a..76134f02d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,7 +9,10 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **A knock now holds the money until you actually get a reply**: Paying to reach someone used to send your money the instant the payment cleared, which meant an owner could take every knock and answer none, and you had no way to get it back. A new Solana program makes the payment conditional: it sits in a vault that only the knock itself controls, and exactly three things can happen to it. The owner answers inside the reply window and gets paid, the owner declines and you are refunded in full with no fee taken, or the window closes and anyone at all can trigger your refund. There is no admin key that can move a knock that is parked, the fee is capped at 10% in the program itself, and the fee you agreed to when you knocked cannot be raised on money that is already in escrow. Your message never touches the chain: only a fingerprint of it is stored, so either side can later prove what was sent without publishing it. Ten invariants covering every one of those promises run against the real compiled program on every test run. `[feature, security]`
- **Agent wallets can pay three.ws on X Layer again**: Buying agents that pay for a 3D generation on X Layer sign their payment with a wallet that carries an on-chain delegation, which is how every OKX agent wallet is built. Our checker judged those signatures with a contract call that answers a different question, so it turned away correct, fully funded payments and quoted the price a second time instead of doing the work. Payments are now checked the same way the stablecoin itself checks them, so a signed authorization that the network would honour is one we accept. `[fix]`
- **Cross-origin 3D loads no longer break on a header your site never sent**: Embedding a three.ws avatar on your own site loads the model straight from us, and the site answers every origin. One case still failed: if your loader attached any extra header (a trace id, an auth token, anything a browser does not treat as standard), the browser first asked us for permission and we answered with a 404 page, so the model never loaded. That request is now answered properly, and the answer echoes exactly the headers you asked about. Alongside it, the media docs now spell out the three ways to read a model file and which one to pick: files under three.ws load directly, generated assets load directly from three.ws/cdn, and the /api/glb proxy is there for a URL whose host you cannot identify. (`/docs/media-api`) `[fix, docs]`
+- **DeFi tables stop showing broken logos when a coin icon disappears**: The protocol and chain logos on the fees, DeFi, DEX volumes, chain, protocol and exchange pages were loaded straight from a third-party icon host. When that host renamed or removed an icon, the row rendered a broken-image glyph and every reader's browser recorded a failed request. Those logos now come from three.ws itself: we fetch and resize them on our side, cache them, and hand back an empty answer for an icon that no longer exists, so the row shows the same neutral disc a protocol without a logo already gets. Pages load a little faster too, since a 24-pixel icon no longer arrives at full size, and your browser no longer talks to an outside host on every table paint. (`/fees`) `[fix, improvement]`
+- **Knock on a stranger and get your money back if they never answer**: A door that takes escrowed knocks now shows the option on its own page, next to paying up front. Choose it and your payment goes into an on-chain vault instead of the recipient's wallet: they are paid by answering you, and if they decline or the window runs out, every unit comes back to you. Before anything is signed, a dialog states the amount, who it reaches, and the exact deadline. Afterwards the page counts down to that deadline, and the moment it passes, a button hands your payment back. three.ws holds no key that can move it either way. `[feature]`
- **Knock somebody's door and get your money back if they never answer**: Paying to reach a stranger has meant paying first and hoping. The money left your wallet the moment the payment cleared, and if the person never replied, that was that. Doors can now take escrowed knocks instead: your payment sits in a vault on Solana that the recipient cannot touch until they actually answer you. If they answer, they are paid. If they decline, you get everything back and are charged nothing, because reading something and passing on it is not a service. And if they simply never respond before the window they set, anyone at all can trigger the refund and every cent comes back to you, so it does not depend on you remembering to chase it. three.ws holds no key that can move that money, and neither does anyone else. Door owners can turn the lane on in their knock settings and choose how long they get to reply, from an hour to a month. (`/docs/knock`) `[feature, security]`
+- **Run an escrowed door from your own wallet, and see what the chain actually says**: Door settings now carry the escrowed lane: switch it on, choose how long you want to answer within, and open your on-chain door with your own wallet, which is the only thing that can. The panel reads the chain and tells you the truth rather than your intent, so a door you never opened, or one still charging last month's price, says so plainly instead of quietly turning strangers away. Escrowed knocks in your inbox show how long you have and what answering is worth, replying releases the payment, and refusing refunds the sender in full with no fee. Money still in escrow is no longer counted as earned. `[feature, improvement]`
- **The 3D services we sell to other agents quote one clear price, however they are asked**: Our four paid 3D generation services on the OKX.AI agent marketplace answer every caller with a price quote before any work happens. Two flaws in that quote are fixed. A request that arrived with no body and no content type was turned away with a formatting complaint instead of a price, and that is exactly how the marketplace's own compatibility check asks, so the check saw four services that looked like they had no payment set up at all. Separately, a request that named no specific tool got a quote listing the same payment network twice at two different prices, one of them wrong. Every unpaid request now receives a single unambiguous quote at the service's listed price, on each payment network it accepts. `[fix]`
- **The IBM partnership demos arm wherever the page is opened**: The live demo pages loaded their own payment script across the network by full address, so on any address other than the main site (a preview, a local run, a copy published on a partner domain) the browser refused it and the paid demos never armed. Each page now loads the copy it ships with. The publish-once page IBM hosts got the opposite fix: every file it pulls now carries our full address, so its language switcher no longer looks for a file on the host's own domain and comes back empty. (`/ibm/hello`) `[fix]`
- **When the payment wallets run thin, the money now reaches the right one first**: three.ws pays its own on-chain fees from a funding wallet that tops up every engine below its floor. It ranked those engines purely by the size of their shortfall, so a top-up went to whichever wallet was missing the most, and the small wallet that pays the fee on every single payment could sit under its cutoff while the rail stayed shut. The payment wallets are now funded first, so a modest top-up restores settlement instead of a large one being required to reach it by accident. Two related repairs land with it: a wallet holding stablecoins but too little native currency to open the account a swap pays out into is now told exactly how much it is short, instead of retrying the same impossible conversion every half hour, and previewing the rebalancer with a dry run no longer executes real swaps. `[fix, infra]`
diff --git a/STRUCTURE.md b/STRUCTURE.md
index f532e21a5..00ee6fd82 100644
--- a/STRUCTURE.md
+++ b/STRUCTURE.md
@@ -62,7 +62,7 @@ bottom.
| Personal companion (`/companion`) | Page [pages/companion.html](pages/companion.html) `→ /companion` + [src/companion/](src/companion) (page, source cards, voice), API [api/companion/](api/companion) (settings, sources, contacts, events, `ingest`, `stream`, `poll`), engine [api/_lib/companion/](api/_lib/companion) (store, encrypted BYOK configs, triage, lanes for Telegram / iCal / IMAP), cron [api/cron/companion-poll.js](api/cron/companion-poll.js), migration [api/_lib/migrations/20260828140000_companion_harness.sql](api/_lib/migrations/20260828140000_companion_harness.sql) | Live | Turns a person's own inbox, chats, calendar and phone into deliveries a 3D character makes **in person**. BYOK per source (a Telegram bot the user made, a private iCal URL, IMAP with an app password) plus a universal bridge token anything can POST to. Every message is scored 0-100 by the shared deterministic rules ([@three-ws/companion/triage](packages/companion-sdk/src/triage-rules.js), the same module the CLI runs locally) and optionally refined by the user's own Anthropic key; above their threshold and outside quiet hours it is delivered through `companion_delivery` notifications, so the bell, Web Push, and the avatar channel all carry it. A contact's message is spoken by **that contact's avatar and voice** (`control.announce({ avatar })` in [walk-sdk](walk-sdk)). A delivery whose lane can carry an answer (Telegram, through the user's own bot) offers a reply box in place, and the reply is stored with the message. Live SSE at `/api/companion/stream` feeds the desktop app and any third-party body. Docs: [docs/companion.md](docs/companion.md). Tests: [tests/companion-triage.test.js](tests/companion-triage.test.js), [tests/companion-calendar.test.js](tests/companion-calendar.test.js), [packages/companion-sdk/tests/](packages/companion-sdk/tests) |
| three.ws Drive: the agent in the car (`/drive`) | Page [pages/drive.html](pages/drive.html) `→ /drive` + [src/drive/](src/drive) (page controller, surface presets, native bridge, local commands, motion gate); native CarPlay scene [ios/native/App/App/CarPlaySceneDelegate.swift](ios/native/App/App/CarPlaySceneDelegate.swift) + [DriveLink.swift](ios/native/App/App/DriveLink.swift); Android Auto car app [solana-mobile/android-overlay/app/src/main/java/ws/three/app/drive/](solana-mobile/android-overlay/app/src/main/java/ws/three/app/drive) | Live (web) / built and compiled (Android Auto) / built, entitlement pending (CarPlay) | The existing talk loop (`/api/asr` → `/api/chat` → `/api/tts` → lipsync on a real rigged avatar) rebuilt for a car panel: one glanceable two-line reply instead of a transcript, exactly four controls, night by default, and a keyboard that hides itself while the wheels turn. Speed comes from `navigator.geolocation`'s real ground speed, so moving above walking pace locks text entry back and a sustained stop is what unlocks it. Control phrases ("repeat that", "stop talking", "louder", "night mode") are answered locally with no round trip, matched against the whole utterance so "stop at the next charger" still reaches the agent. Hands free ends a turn from the real captured mic level on the Riva lane. **The car screen is never ours to draw on, on either platform:** Apple's voice-based conversational category (iOS 26.4) grants templates and an audio session and no drawing surface, and Android grants a canvas only to navigation apps and has no conversational category at all, so both car screens render the same four rows and this page runs beside them, joined by the versioned `threeWsDrive` channel (a WebKit message handler on iOS, a JavaScript interface on Android). Android Auto declares `androidx.car.app.category.IOT` because that is accurate: the home tools in `api/chat.js` reach a real house, so "turn the porch light on" from the car is the product. Its web view has no window and therefore no animation frames, so `?surface=androidauto` runs the loop as audio with the stage off, and refuses tap-to-approve for guarded actions because a person who cannot see what they are approving must not be asked. A guarded action while moving is refused on every surface and offered for when the car stops. Docs: [docs/carplay.md](docs/carplay.md), [ios/docs/CARPLAY.md](ios/docs/CARPLAY.md), [solana-mobile/docs/ANDROID-AUTO.md](solana-mobile/docs/ANDROID-AUTO.md). Tests: [tests/drive-surface.test.js](tests/drive-surface.test.js) |
| Hands-free voice for the house (`/voice/home`) | Loop [src/voice/home-voice.js](src/voice/home-voice.js), VAD [src/voice/vad.js](src/voice/vad.js), wake word [src/voice/wake-word.js](src/voice/wake-word.js) + catalog [src/voice/wake-words.js](src/voice/wake-words.js), panel [src/voice/home-voice-ui.js](src/voice/home-voice-ui.js) + [public/home-voice.css](public/home-voice.css); page [pages/voice-home.html](pages/voice-home.html) `→ /voice/home` + [src/voice-home.js](src/voice-home.js); models committed under [public/models/voice/wake-word/](public/models/voice/wake-word) with the silero + onnxruntime runtime staged by [scripts/copy-voice-models.mjs](scripts/copy-voice-models.mjs) | Live | The browser half of three.ws Home: mic → silero VAD → openWakeWord → `/api/asr` → `/api/chat` (home tools) → `/api/tts/speak` → lipsync, with one `getUserMedia` shared by all three consumers. Wake-word matching runs entirely in the tab on committed openWakeWord v0.5.1 weights served from three.ws, so nothing is uploaded until after the wake word; nothing about detection is even downloaded until the user opts in. Barge-in cuts playback ~110 ms after the user starts talking, and a playback-aware guard means the agent saying its own wake word (score 0.99) wakes it zero times. A pause is not an ending: a closed segment stays open 450 ms so "Hey Jarvis… turn the kitchen light off" is one command. Guarded actions are spoken in full, shown on screen by name and entity id, and satisfied only by the token `confirm` redeemed at `POST /api/home/:id/confirm`; a general "yeah" is refused by name and a screenless surface is refused outright. Twelve designed states, mute that ends the track rather than hiding a dot, and every leg timed live. Docs: [docs/home-voice.md](docs/home-voice.md). Proof: [scripts/check-home-voice.mjs](scripts/check-home-voice.mjs) (34 assertions in a real Chromium). Tests: [tests/home-voice.test.js](tests/home-voice.test.js) |
-| Knock: a priced door to a person (`/knock`) | Hub [pages/knock.html](pages/knock.html) `→ /knock` + [src/knock/page.js](src/knock/page.js), public door [pages/knock-door.html](pages/knock-door.html) `→ /knock/<handle>` + [src/knock/door.js](src/knock/door.js), API [api/knock/](api/knock) (door, directory, send, reply, settings, inbox), paid lane [api/x402/knock.js](api/x402/knock.js), engine [api/_lib/knock/](api/_lib/knock) (pure policy, store, delivery, receipt tokens), migration [api/_lib/migrations/20260828210000_knock_doors.sql](api/_lib/migrations/20260828210000_knock_doors.sql), SDK + CLI [packages/knock-sdk/](packages/knock-sdk) (`@three-ws/knock`), MCP [packages/knock-mcp/](packages/knock-mcp) (`@three-ws/knock-mcp`) | Live | Every account can publish a door at `/knock/<username>` and set what one message from a stranger costs. Paying it buys exactly one message through, and the delivery is **in person**: the knock becomes a `companion_events` row whose importance is derived from the amount paid, so the recipient's corner avatar walks on wherever they are and says who is at the door and what they paid. **The USDC settles straight to the recipient** (`payTo` on the 402 challenge is their own address, and a priced door cannot be opened without one), so there is no platform wallet in the path and no cut. Solana leads; Base is advertised only when the owner sets an address for it. **Every refusal happens before the 402** (shut door, daily cap, block list, length limits) and again before settlement, so a knock that was never going to land is never a knock somebody paid for. Only the subject line is spoken; an untrusted body never uses the recipient's avatar as a speaker. The sender gets a derived HMAC receipt URL and reads the reply through it with no account, which is why answering someone never hands out an address. Free doors take a plain POST on a tight per-IP bucket. Spec: [specs/KNOCK_PROTOCOL.md](specs/KNOCK_PROTOCOL.md). Docs: [docs/knock.md](docs/knock.md). Tests: [tests/knock-policy.test.js](tests/knock-policy.test.js), [packages/knock-sdk/test/](packages/knock-sdk/test), [packages/knock-mcp/test/](packages/knock-mcp/test) |
+| Knock: a priced door to a person (`/knock`) | Hub [pages/knock.html](pages/knock.html) `→ /knock` + [src/knock/page.js](src/knock/page.js), public door [pages/knock-door.html](pages/knock-door.html) `→ /knock/<handle>` + [src/knock/door.js](src/knock/door.js), API [api/knock/](api/knock) (door, directory, send, reply, settings, inbox, escrowed, escrow-sync), paid lane [api/x402/knock.js](api/x402/knock.js), escrowed lane [api/_lib/knock/escrow.js](api/_lib/knock/escrow.js) + browser client [src/knock/escrow-program.js](src/knock/escrow-program.js) / [src/knock/escrow-checkout.js](src/knock/escrow-checkout.js), engine [api/_lib/knock/](api/_lib/knock) (pure policy, store, delivery, receipt tokens), migration [api/_lib/migrations/20260828210000_knock_doors.sql](api/_lib/migrations/20260828210000_knock_doors.sql), SDK + CLI [packages/knock-sdk/](packages/knock-sdk) (`@three-ws/knock`), MCP [packages/knock-mcp/](packages/knock-mcp) (`@three-ws/knock-mcp`) | Live | Every account can publish a door at `/knock/<username>` and set what one message from a stranger costs. Paying it buys exactly one message through, and the delivery is **in person**: the knock becomes a `companion_events` row whose importance is derived from the amount paid, so the recipient's corner avatar walks on wherever they are and says who is at the door and what they paid. **The USDC settles straight to the recipient** (`payTo` on the 402 challenge is their own address, and a priced door cannot be opened without one), so there is no platform wallet in the path and no cut. Solana leads; Base is advertised only when the owner sets an address for it. **Every refusal happens before the 402** (shut door, daily cap, block list, length limits) and again before settlement, so a knock that was never going to land is never a knock somebody paid for. Only the subject line is spoken; an untrusted body never uses the recipient's avatar as a speaker. The sender gets a derived HMAC receipt URL and reads the reply through it with no account, which is why answering someone never hands out an address. Free doors take a plain POST on a tight per-IP bucket. A door can also take **escrowed** knocks (row below), which the door page offers beside paying up front and the owner runs from their own wallet in the settings panel; nothing on this server can move an escrowed payment. Spec: [specs/KNOCK_PROTOCOL.md](specs/KNOCK_PROTOCOL.md). Docs: [docs/knock.md](docs/knock.md). Tests: [tests/knock-policy.test.js](tests/knock-policy.test.js), [packages/knock-sdk/test/](packages/knock-sdk/test), [packages/knock-mcp/test/](packages/knock-mcp/test) |
| Visitor feedback loop | Recorder [@three-ws/witness](packages/witness), capture + panel [src/feedback-companion.js](src/feedback-companion.js) (mounted by [src/walk-companion.js](src/walk-companion.js)), intake [api/feedback/report.js](api/feedback/report.js), queue API [api/feedback/index.js](api/feedback/index.js), scoring [api/_lib/feedback/triage.js](api/_lib/feedback/triage.js), store [api/_lib/feedback/store.js](api/_lib/feedback/store.js), cron [api/cron/feedback-triage.js](api/cron/feedback-triage.js), review page [pages/feedback.html](pages/feedback.html) `→ /feedback` + [src/feedback-page.js](src/feedback-page.js) | Live | The return channel on the corner companion: the visitor tells the avatar what broke and the report carries the route, build SHA, viewport, and the last console errors and failed requests the browser captured, so a vague sentence lands as an actionable row. The companion offers proactively at the one moment worth asking (right after the page actually threw), once per route per session, never in a background tab. **Feedback is data, never an instruction:** the model that reads untrusted visitor text writes six scalars to that report's own row and has no path to the repo, a deploy, or any other write; the admin-only `/feedback` queue groups reports into one row per problem and a person decides. **A report arrives as a runnable failing test:** the recorded session compiles into a Playwright spec asserting the failure is GONE (red until fixed, green after), reachable from the queue's Copy test button, `GET /api/feedback/repro`, `npm run feedback:repro`, and the `get_feedback_repro` MCP tool. Docs: [docs/feedback.md](docs/feedback.md), [docs/witness.md](docs/witness.md). Tests: [tests/feedback-triage.test.js](tests/feedback-triage.test.js) |
| Session-to-test recorder | [packages/witness/](packages/witness) `→ @three-ws/witness`: recorder [recorder.js](packages/witness/src/recorder.js), selector synthesis [selector.js](packages/witness/src/selector.js), capture-time privacy [redact.js](packages/witness/src/redact.js), spec compiler [compile.js](packages/witness/src/compile.js); compiled repros land in [tests/repros/](tests/repros) with [their own Playwright config](tests/repros/playwright.config.mjs) | Published as `@three-ws/witness` (Apache-2.0, zero deps) | Turns a real user session into a runnable failing test. Records INTENT (about 2 KB) rather than DOM mutations (megabytes), so it can be always-on, which is the point: the trace already exists when somebody decides to complain. Every element gets the strongest handle that is unique in the live document (test id > id > aria-label > role+name > text > name > placeholder > class > structural path), framework-generated ids and utility classes refused, and each trace carries a replay confidence equal to its WEAKEST link. The compiled spec asserts the failure is gone, never that it happened, so it locks in the fix rather than the bug; a session with no machine-visible failure emits `test.fail()` and says which assertion a human must add rather than faking green. Privacy is enforced at capture: typed values are never held (only a length and a shape), password/hidden/email/tel/date inputs and `data-witness="off"` subtrees record nothing, URLs lose their credentials before storage. Docs: [docs/witness.md](docs/witness.md). Tests: [packages/witness/test/](packages/witness/test) (36, `npm run test:witness`) |
| Prepaid credits (`/credits`) | [pages/credits.html](pages/credits.html) `→ /credits` + [src/credits.js](src/credits.js), balance/ledger [api/credits/index.js](api/credits/index.js) `→ GET /api/credits`, deposit verifier [api/credits/deposit.js](api/credits/deposit.js) `→ POST /api/credits/deposit` over [api/_lib/credit-deposit.js](api/_lib/credit-deposit.js), ledger engine [api/_lib/credits.js](api/_lib/credits.js), schema [api/_lib/migrations/20260621200000_credits.sql](api/_lib/migrations/20260621200000_credits.sql) | Live | The prepaid balance every metered action on the platform debits. Top up by sending SOL or $THREE to the platform deposit wallet (connect + SIWS-link + sign in the page, or paste a signature you already sent); crediting is server-authoritative and idempotent on the signature, so a signature that is not signed by a wallet linked to the account credits nobody. The page renders the caller's $THREE holder tier from the same `holder` block [api/pricing.js](api/pricing.js) returns ([api/_lib/three-tier.js](api/_lib/three-tier.js)), which is the discount [api/_lib/credits.js](api/_lib/credits.js) already applies to every debit, and lists what credits buy straight from the pricing catalog ([api/_lib/pricing/catalog.js](api/_lib/pricing/catalog.js)). Ledger is keyset-paginated. Docs: [docs/payment-sessions.md](docs/payment-sessions.md). Tests: [tests/credits.test.js](tests/credits.test.js) |
@@ -200,7 +200,7 @@ bottom.
| pump.fun first-claims Telegram channel (@pumpfunclaims) | Delivery lane [api/_lib/pump-claims-push.js](api/_lib/pump-claims-push.js), cron [api/cron/pump-claims-push.js](api/cron/pump-claims-push.js) (every 5 min), shared scanner [api/_lib/pump-claims.js](api/_lib/pump-claims.js) (also backs `GET /api/pump/first-claims` and the `pumpfun_first_claims` MCP tool) | In-repo · lane wired, channel dark pending `PUMPFUN_BOT_URL` + `TELEGRAM_PUMP_CLAIMS_CHAT_ID` | A live feed of first-time pump.fun creator fee claims, one message per claim: the first time a creator ever pulls accrued rewards out of the fee vault is an irreversible on-chain signal that they are engaged with their coin. Mirrors the commit-feed lane's safety properties (DB lock, seed-without-posting on first run, per-message state writes, oldest-first drain, 3h replay cutoff) but dedupes by transaction signature rather than timestamp, because claims routinely share a second and a timestamp cursor drops the second one. No fallback to the holder changelog channel on purpose. The RPC fallback inside the scanner cannot serve this feed (the pump program clears a 200-signature page in under one second, so a scan covers no useful window); an indexer is required. Docs: [docs/pump-claims-channel.md](docs/pump-claims-channel.md). Tests: [tests/pump-claims-push.test.js](tests/pump-claims-push.test.js) |
| Ship log (release notes joined to the commits that shipped them) | Package [packages/shipfeed/](packages/shipfeed/README.md), endpoint [api/ship/feed.js](api/ship/feed.js) `→ GET /api/ship/feed`, page [public/ship/index.html](public/ship/index.html) `→ /ship`, provenance for the announcement lane [api/_lib/ship-provenance.js](api/_lib/ship-provenance.js) | Live | The join between the two records of the same work this repo keeps: the changelog (readable, incomplete) and the commit log (complete, unreadable). `@three-ws/shipfeed` parses conventional commits, scores each one by audience (holder / developer / internal) and signal, and links release notes to the commits that produced them with no metadata in the workflow: a `Changelog:` trailer wins where one exists, otherwise a time window plus IDF-weighted term overlap plus tag agreement plus proximity, and every link publishes its confidence and its reasons (`?explain=<sha>` returns one commit's full reasoning). Unclaimed commits are grouped into bursts and shown as "unannounced", which is the half no changelog has ever surfaced. The same package now drives both Telegram lanes: release announcements carry a "shipped in N commits" compare link, and the raw commit feed reads its headline from the parser (`feat(resilience):` reads as "Feature · resilience") and skips merges, `chore(deps):` bumps and lockfile-only changes. Zero dependencies, works on any repository, CLI included (`npx @three-ws/shipfeed`). Docs: [docs/shipfeed.md](docs/shipfeed.md). Tests: [packages/shipfeed/tests/](packages/shipfeed/tests), [tests/ship-feed-endpoint.test.js](tests/ship-feed-endpoint.test.js), [tests/ship-provenance.test.js](tests/ship-provenance.test.js) |
| On-chain agent invocation | [contracts/agent-invocation/](contracts/agent-invocation) | In-repo | Anchor program: verifiable agent-to-agent skill invocation events. SDK: [agent-protocol-sdk/](agent-protocol-sdk) |
-| Escrowed knocks (pay-per-reply) | [contracts/knock-escrow/](contracts/knock-escrow) | In-repo | Anchor program making a knock's payment conditional instead of final: `knock` parks the price in a vault owned by the knock's own PDA, and only three things can happen to it. `answer` pays the owner minus a fee capped at 10% in the program itself, `refuse` refunds the sender in full and takes no fee, and `reclaim` refunds the sender once the reply window closes and can be called by anyone. Each `KnockRecord` snapshots the fee that was in force when it was made, so an authority cannot reprice money already in escrow, and it stores only the SHA-256 of the message and the reply, never their text. The trust-me version of this settles straight to the owner at [api/knock/](api/knock) (row above); this is the version that works between strangers. Docs: [contracts/knock-escrow/README.md](contracts/knock-escrow/README.md) |
+| Escrowed knocks (pay-per-reply) | [contracts/knock-escrow/](contracts/knock-escrow) | In-repo | Anchor program making a knock's payment conditional instead of final: `knock` parks the price in a vault owned by the knock's own PDA, and only three things can happen to it. `answer` pays the owner minus a fee capped at 10% in the program itself, `refuse` refunds the sender in full and takes no fee, and `reclaim` refunds the sender once the reply window closes and can be called by anyone. Each `KnockRecord` snapshots the fee that was in force when it was made, so an authority cannot reprice money already in escrow, and it stores only the SHA-256 of the message and the reply, never their text. The trust-me version of this settles straight to the owner at [api/knock/](api/knock) (row above); this is the version that works between strangers. Both sides are reachable from a browser: senders escrow and crank their own refund from the door page, owners open their on-chain door, answer for payment or refuse for a refund from [/knock](pages/knock.html), all signed by their own wallet ([src/knock/escrow-checkout.js](src/knock/escrow-checkout.js)). Docs: [contracts/knock-escrow/README.md](contracts/knock-escrow/README.md), [docs/knock.md](docs/knock.md). Tests: [tests/knock-escrow-program.test.js](tests/knock-escrow-program.test.js), [tests/knock-escrow-pda.test.js](tests/knock-escrow-pda.test.js), [tests/api-knock-escrowed.test.js](tests/api-knock-escrowed.test.js), [tests/api-knock-escrow-sync.test.js](tests/api-knock-escrow-sync.test.js) |
| Cross-chain SDKs | [sdk/](sdk), [solana-agent-sdk/](solana-agent-sdk), [agent-payments-sdk/](agent-payments-sdk), [agent-protocol-sdk/](agent-protocol-sdk) | Published | Cross-chain agent SDKs |
| MCP integration | [mcp-server/](mcp-server), [mcp-bridge/](mcp-bridge), [packages/*-mcp/](packages) | 43 npm servers + 7 hosted remote (50 total, incl. the free `/api/mcp-studio` 3D Studio), all in the [MCP registry](https://registry.modelcontextprotocol.io/?q=io.github.nirholas). Canonical metadata: [prompts/store-submissions/_generated/mcp-listing-source.json](prompts/store-submissions/_generated/mcp-listing-source.json), generated from the manifests by [scripts/build-mcp-listing-source.mjs](scripts/build-mcp-listing-source.mjs) (`npm run audit:mcp-listing` fails when it drifts) | Model Context Protocol surface, full server list in [docs/mcp.md](docs/mcp.md). Searchable index of every tool: [pages/mcp-tools.html](pages/mcp-tools.html) `→ /mcp-tools`, rendered from the generated [public/mcp-catalog.json](public/mcp-catalog.json) ([scripts/build-mcp-catalog.mjs](scripts/build-mcp-catalog.mjs), `npm run build:mcp-catalog`, staleness gated by `npm run audit:mcp-catalog`). Tool safety annotations are verified against each handler by [scripts/audit-mcp-safety.mjs](scripts/audit-mcp-safety.mjs) (`npm run audit:mcp-safety`, rules in [scripts/lib/mcp-safety-check.mjs](scripts/lib/mcp-safety-check.mjs), guarded-file list shared with the golden snapshot via [scripts/lib/mcp-tool-sources.mjs](scripts/lib/mcp-tool-sources.mjs)); docs [docs/mcp-safety.md](docs/mcp-safety.md) `→ /docs/mcp-safety`. Trust policy: [api/mcp-policy.js](api/mcp-policy.js) `-> GET /api/mcp-policy` turns those verified labels into a ready-to-paste client allowlist (profiles strict/balanced/open x formats claude/vscode/json), surfaced by the builder panel on `/mcp-tools`. Connector-review readiness (every paid stdio tool answers a clean x402 challenge, and the reviewer entitlement lifts it): [scripts/audit-mcp-reviewer-path.mjs](scripts/audit-mcp-reviewer-path.mjs), `npm run audit:mcp-reviewer`. Tests: [tests/mcp-safety-audit.test.js](tests/mcp-safety-audit.test.js), [tests/mcp-catalog.test.js](tests/mcp-catalog.test.js), [tests/api/mcp-policy.test.js](tests/api/mcp-policy.test.js) |
| Agent Skills pack | [.agents/skills/](.agents/skills) → manifest [.agents/skills/SKILLS.md](.agents/skills/SKILLS.md), [.agents/skills/skills-pack.json](.agents/skills/skills-pack.json) | In-repo; bundled in the `three-ws-core` [plugin](.claude-plugin/marketplace.json) | 40 portable `SKILL.md` folders (Agent Skills open standard) for any Claude surface — 3d/creative (cross-platform-safe), wallet/payments, intel/trading. Regenerate manifest: `node scripts/build-skills-pack.mjs`. Docs: [docs/agent-skills.md](docs/agent-skills.md) |
diff --git a/data/changelog.json b/data/changelog.json
index 95054220f..47cf0f0cd 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,15 @@
{
"$comment": "Curated changelog entries for three.ws, the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.",
"entries": [
+ {
+ "date": "2026-09-04",
+ "title": "Two paid endpoints now quote a price to anyone who asks, instead of an error",
+ "summary": "The 3D asset pipeline and pay-by-name resolution both checked your request for missing fields before they ever mentioned the price, so a caller who simply asked what they cost got a validation error back. Directories that index paid APIs ask exactly that way, with an empty request, and read an error as a service that sells nothing, which is why neither endpoint could be listed anywhere. Both now answer with the payment challenge and the real price first. The pipeline quotes the published example chain when the request names no stages, and anyone who pays and then sends an incomplete request still gets the same clear validation error, with nothing charged.",
+ "tags": [
+ "fix",
+ "improvement"
+ ]
+ },
{
"date": "2026-09-04",
"title": "The Smart Money directory stops asking your browser for pictures it can never get",
@@ -26455,6 +26464,23 @@
"fix",
"infra"
]
+ },
+ {
+ "date": "2026-09-04",
+ "title": "Knock on a stranger and get your money back if they never answer",
+ "summary": "A door that takes escrowed knocks now shows the option on its own page, next to paying up front. Choose it and your payment goes into an on-chain vault instead of the recipient's wallet: they are paid by answering you, and if they decline or the window runs out, every unit comes back to you. Before anything is signed, a dialog states the amount, who it reaches, and the exact deadline. Afterwards the page counts down to that deadline, and the moment it passes, a button hands your payment back. three.ws holds no key that can move it either way.",
+ "tags": [
+ "feature"
+ ]
+ },
+ {
+ "date": "2026-09-04",
+ "title": "Run an escrowed door from your own wallet, and see what the chain actually says",
+ "summary": "Door settings now carry the escrowed lane: switch it on, choose how long you want to answer within, and open your on-chain door with your own wallet, which is the only thing that can. The panel reads the chain and tells you the truth rather than your intent, so a door you never opened, or one still charging last month's price, says so plainly instead of quietly turning strangers away. Escrowed knocks in your inbox show how long you have and what answering is worth, replying releases the payment, and refusing refunds the sender in full with no fee. Money still in escrow is no longer counted as earned.",
+ "tags": [
+ "feature",
+ "improvement"
+ ]
}
]
}
diff --git a/docs/knock.md b/docs/knock.md
index ba1e9e3a2..363c93456 100644
--- a/docs/knock.md
+++ b/docs/knock.md
@@ -252,6 +252,7 @@ a 404, not a 403: an id on its own should not confirm that a knock exists.
| `POST /api/knock/send` | none | Knock on a free door. |
| `POST /api/x402/knock?to=` | x402 payment | Knock on a priced door. |
| `POST /api/knock/escrowed` | on-chain escrow | Knock on a door that takes escrowed knocks, where the money only moves if you get an answer. |
+| `POST /api/knock/escrow-sync` | none | Re-read one escrow on-chain and update the cached state on its delivered knock. Open to anybody: it can only write back what the program already recorded. |
| `GET /api/knock/reply?id=&token=` | receipt token | What became of a knock you sent. |
| `GET /api/knock/settings` | session | Your door, your totals, your block list. |
| `PATCH /api/knock/settings` | session | Change any of it. |
@@ -334,6 +335,11 @@ commits to its SHA-256, so both sides can prove later what was actually sent
without publishing a stranger's private message to a public ledger. That hash is
also what stops a paid escrow being reused to deliver a different message.
+Hash the **trimmed** message body, exactly the bytes you are about to send as
+`message`. The API hashes the same trimmed string and refuses to deliver
+anything whose hash is not the one on-chain, so a stray leading newline is the
+difference between a delivery and a `message_mismatch`.
+
### Opening an escrowed door
```bash
@@ -347,6 +353,56 @@ agreeing to when they pay. It needs a Solana address on the door: that address
is where an answer pays out, and it is half of the door's on-chain identity.
The window can be 1 hour to 30 days, the same band the program enforces.
+That call only flips the switch on three.ws. The door also has to exist
+**on-chain**, and only your wallet can create it: the account is derived from
+your own address, so no server, including ours, can open, reprice or shut it for
+you. Do it from [/knock](https://three.ws/knock), where the escrow panel reads
+the chain and shows you one of three states.
+
+| What the chain says | What the panel offers |
+| --- | --- |
+| No door account yet | **Open my door on-chain**. Until you do, escrowed knocks have nowhere to land and senders are shown the normal lane. |
+| Open, and matching your settings | Nothing to do. It shows the on-chain price, window, and how many knocks it has answered. |
+| Open but different, or shut | **Update it on-chain**, with the on-chain numbers spelled out, because those are the ones a sender is actually agreeing to. |
+
+### Keeping the cache honest
+
+The `escrow_*` columns on a delivered knock are a cache of what the program
+recorded, and nothing ever tells this server that a settlement happened: answers,
+refusals and refunds are transactions signed by wallets we do not hold. So the
+only correct move is to look.
+
+```bash
+curl -sX POST https://three.ws/api/knock/escrow-sync \
+ -H 'content-type: application/json' \
+ -d '{ "knock": "<the knock address>" }'
+```
+
+It reads the account, writes back exactly the state the program recorded, and
+answers with `{ state, changed, expires_at, expired }`. It is deliberately open
+to anybody, because it cannot be used to claim anything: a caller who lies about
+a settlement gets the truth written instead. The site calls it after an answer or
+a refusal, which is what keeps a refunded knock from sitting in an inbox looking
+like money still on the table.
+
+### From the browser
+
+Both sides of the lane work without an agent or a CLI.
+
+**Knocking.** A door that takes escrow shows a chooser on its page: pay now, or
+escrow. Pick escrow and the button says what it will do, a dialog states the
+amount, who it goes to, the deadline and the escrow's own address, and nothing
+is signed until you agree to that. Your wallet signs the `knock`; three.ws is
+handed nothing but the message afterwards. The page then shows a live countdown
+against the deadline, and the moment it passes, a button that cranks the refund
+back to you.
+
+**Answering.** An escrowed knock in your inbox says how long you have to answer
+and what answering is worth. Writing a reply saves it first and then asks your
+wallet to release the payment, in that order deliberately: a wallet prompt you
+dismiss costs you the money, never the reply you already wrote. **Refuse and
+refund** is offered beside it, and takes no fee.
+
---
## Why it is built this way
diff --git a/docs/ops/page-audit.md b/docs/ops/page-audit.md
index 8af83d581..c4791ac55 100644
--- a/docs/ops/page-audit.md
+++ b/docs/ops/page-audit.md
@@ -77,34 +77,6 @@ Run a WebKit pass before any release that touched page-level JavaScript. It is
worth the extra minutes precisely because nothing else in the pipeline looks at
a non-V8 engine.
-## Which routes get audited
-
-`scripts/lib/audit-routes.mjs` is the one answer, shared with the visual sweep
-(`scripts/page-snapshot.mjs`) so the two can never disagree about what pages
-the site has. It draws from three sources:
-
-1. **`data/pages.json`**, the public manifest that also drives `/sitemap`,
- `llms.txt` and the changelog. The machine-readable section and any non-HTML
- path are skipped: there is no DOM to audit.
-2. **`AUTHED_ROUTES`**, the signed-in surfaces the public manifest deliberately
- omits. These are read out of the `vercel.json` route table rather than
- hand-listed: every concrete `/dashboard/*` entry that serves a page, plus
- `/profile`, `/settings` and `/my-agents`. Redirect stubs and regex patterns
- are excluded, since neither addresses a page with content in it.
-3. **`seedDynamicRoutes()`**, parameterised routes (an agent id, a launch mint)
- filled with real ids read from the live API at run time.
-
-The authed list is derived because the hand-kept copy of it went stale with no
-signal at all. By 2026-09-04 ten of its eighteen entries had become 301 stubs
-pointing at consolidated dashboard pages, so a third of every authenticated
-sweep was spent loading empty redirects, while twenty-one live dashboard pages
-had never once been audited under a session. The first sweep after the change
-found real defects on two of the newly covered pages. Reading the route table
-means a dashboard page that is added, renamed or consolidated is picked up by
-the next sweep without anyone remembering to edit a second list.
-`tests/audit-routes.test.js` pins that: a stub or a pattern in `AUTHED_ROUTES`,
-or a served dashboard page missing from it, fails the suite.
-
## Targeting
`BASE_URL` selects the target and defaults to production:
diff --git a/public/changelog.json b/public/changelog.json
index 1520f754b..111042843 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-09-04T06:25:16.108Z",
+ "generated_at": "2026-09-04T06:40:04.104Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -38,6 +38,27 @@
"docs"
]
},
+ {
+ "date": "2026-09-04",
+ "type": "update",
+ "title": "DeFi tables stop showing broken logos when a coin icon disappears",
+ "summary": "The protocol and chain logos on the fees, DeFi, DEX volumes, chain, protocol and exchange pages were loaded straight from a third-party icon host. When that host renamed or removed an icon, the row rendered a broken-image glyph and every reader's browser recorded a failed request. Those logos now come from three.ws itself: we fetch and resize them on our side, cache them, and hand back an empty answer for an icon that no longer exists, so the row shows the same neutral disc a protocol without a logo already gets. Pages load a little faster too, since a 24-pixel icon no longer arrives at full size, and your browser no longer talks to an outside host on every table paint.",
+ "link": "/fees",
+ "tags": [
+ "fix",
+ "improvement"
+ ]
+ },
+ {
+ "date": "2026-09-04",
+ "type": "update",
+ "title": "Knock on a stranger and get your money back if they never answer",
+ "summary": "A door that takes escrowed knocks now shows the option on its own page, next to paying up front. Choose it and your payment goes into an on-chain vault instead of the recipient's wallet: they are paid by answering you, and if they decline or the window runs out, every unit comes back to you. Before anything is signed, a dialog states the amount, who it reaches, and the exact deadline. Afterwards the page counts down to that deadline, and the moment it passes, a button hands your payment back. three.ws holds no key that can move it either way.",
+ "link": null,
+ "tags": [
+ "feature"
+ ]
+ },
{
"date": "2026-09-04",
"type": "update",
@@ -49,6 +70,17 @@
"security"
]
},
+ {
+ "date": "2026-09-04",
+ "type": "update",
+ "title": "Run an escrowed door from your own wallet, and see what the chain actually says",
+ "summary": "Door settings now carry the escrowed lane: switch it on, choose how long you want to answer within, and open your on-chain door with your own wallet, which is the only thing that can. The panel reads the chain and tells you the truth rather than your intent, so a door you never opened, or one still charging last month's price, says so plainly instead of quietly turning strangers away. Escrowed knocks in your inbox show how long you have and what answering is worth, replying releases the payment, and refusing refunds the sender in full with no fee. Money still in escrow is no longer counted as earned.",
+ "link": null,
+ "tags": [
+ "feature",
+ "improvement"
+ ]
+ },
{
"date": "2026-09-04",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index d05b4c7d1..a4f88dd47 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -30,6 +30,22 @@
<category>fix</category>
<description>Embedding a three.ws avatar on your own site loads the model straight from us, and the site answers every origin. One case still failed: if your loader attached any extra header (a trace id, an auth token, anything a browser does not treat as standard), the browser first asked us for permission and we answered with a 404 page, so the model never loaded. That request is now answered properly, and the answer echoes exactly the headers you asked about. Alongside it, the media docs now spell out the three ways to read a model file and which one to pick: files under three.ws load directly, generated assets load directly from three.ws/cdn, and the /api/glb proxy is there for a URL whose host you cannot identify.</description>
</item>
+ <item>
+ <title>DeFi tables stop showing broken logos when a coin icon disappears</title>
+ <link>https://three.ws/fees</link>
+ <guid isPermaLink="false">2026-09-04:DeFi tables stop showing broken logos when a coin icon disappears</guid>
+ <pubDate>Fri, 04 Sep 2026 12:00:00 GMT</pubDate>
+ <category>fix</category>
+ <description>The protocol and chain logos on the fees, DeFi, DEX volumes, chain, protocol and exchange pages were loaded straight from a third-party icon host. When that host renamed or removed an icon, the row rendered a broken-image glyph and every reader's browser recorded a failed request. Those logos now come from three.ws itself: we fetch and resize them on our side, cache them, and hand back an empty answer for an icon that no longer exists, so the row shows the same neutral disc a protocol without a logo already gets. Pages load a little faster too, since a 24-pixel icon no longer arrives at full size, and your browser no longer talks to an outside host on every table paint.</description>
+ </item>
+ <item>
+ <title>Knock on a stranger and get your money back if they never answer</title>
+ <link>https://three.ws/changelog</link>
+ <guid isPermaLink="false">2026-09-04:Knock on a stranger and get your money back if they never answer</guid>
+ <pubDate>Fri, 04 Sep 2026 12:00:00 GMT</pubDate>
+ <category>feature</category>
+ <description>A door that takes escrowed knocks now shows the option on its own page, next to paying up front. Choose it and your payment goes into an on-chain vault instead of the recipient's wallet: they are paid by answering you, and if they decline or the window runs out, every unit comes back to you. Before anything is signed, a dialog states the amount, who it reaches, and the exact deadline. Afterwards the page counts down to that deadline, and the moment it passes, a button hands your payment back. three.ws holds no key that can move it either way.</description>
+ </item>
<item>
<title>Knock somebody's door and get your money back if they never answer</title>
<link>https://three.ws/docs/knock</link>
@@ -38,6 +54,14 @@
<category>feature</category>
<description>Paying to reach a stranger has meant paying first and hoping. The money left your wallet the moment the payment cleared, and if the person never replied, that was that. Doors can now take escrowed knocks instead: your payment sits in a vault on Solana that the recipient cannot touch until they actually answer you. If they answer, they are paid. If they decline, you get everything back and are charged nothing, because reading something and passing on it is not a service. And if they simply never respond before the window they set, anyone at all can trigger the refund and every cent comes back to you, so it does not depend on you remembering to chase it. three.ws holds no key that can move that money, and neither does anyone else. Door owners can turn the lane on in their knock settings and choose how long they get to reply, from an hour to a month.</description>
</item>
+ <item>
+ <title>Run an escrowed door from your own wallet, and see what the chain actually says</title>
+ <link>https://three.ws/changelog</link>
+ <guid isPermaLink="false">2026-09-04:Run an escrowed door from your own wallet, and see what the chain actually says</guid>
+ <pubDate>Fri, 04 Sep 2026 12:00:00 GMT</pubDate>
+ <category>feature</category>
+ <description>Door settings now carry the escrowed lane: switch it on, choose how long you want to answer within, and open your on-chain door with your own wallet, which is the only thing that can. The panel reads the chain and tells you the truth rather than your intent, so a door you never opened, or one still charging last month's price, says so plainly instead of quietly turning strangers away. Escrowed knocks in your inbox show how long you have and what answering is worth, replying releases the payment, and refusing refunds the sender in full with no fee. Money still in escrow is no longer counted as earned.</description>
+ </item>
<item>
<title>The 3D services we sell to other agents quote one clear price, however they are asked</title>
<link>https://three.ws/changelog</link>
diff --git a/src/knock/page.js b/src/knock/page.js
index 6c1b2ec9c..3cd291305 100644
--- a/src/knock/page.js
+++ b/src/knock/page.js
@@ -232,6 +232,11 @@ async function refreshChainState(door) {
`Open on-chain: ${formatAtomics(onChain.price)} per knock, ${Math.round(onChain.replyWindow / 3600)}h to answer. ${onChain.knocks} knock(s), ${onChain.answered} answered.`,
);
} catch (err) {
+ // An unreadable chain is not evidence that the door is fine, and it is
+ // not a reason to strand the owner: the action stays available, and
+ // opening an already-open door updates it rather than failing.
+ els['chain-actions'].hidden = false;
+ els['open-chain-door'].textContent = 'Open or update it on-chain';
setChainState('warn', `Could not read your on-chain door just now: ${err.message}`);
}
}